class = " border rounded-lg "
: theme = " isDark ? ' darkMaterial ' : ' material '"
: additionalData = " additionalData "
: column-types = " ECOMMERCE_COLUMNS_TYPES "
import { shallowRef } from ' vue ' ;
import { currentThemeVue } from ' ../composables/useRandomData ' ;
import { makeData } from ' ../composables/makeData ' ;
import RevoGrid, { type ColumnRegular } from ' @revolist/vue3-datagrid ' ;
} from ' @revolist/revogrid-pro ' ;
import { ECOMMERCE_COLUMNS_TYPES } from ' ../sys-data/ecommerce.columns ' ;
const { isDark } = currentThemeVue ();
const columns = shallowRef < ColumnRegular []>([
cellTemplate : ( h , { value , model }) => [
class : ' rounded mx-2 self-center ' ,
cellProperties : ({ model }) => ({
subRow : !! model.parentId,
cellProperties : ({ model }) => ({
subRow : !! model.parentId,
cellTemplate : badgeRenderer,
Designer : { backgroundColor : ' #008620 ' , color : ' #fff ' },
Developer : { backgroundColor : ' #008620 ' , color : ' #fff ' },
Strategist : { backgroundColor : ' #008620 ' , color : ' #fff ' },
Producer : { backgroundColor : ' #008620 ' , color : ' #fff ' },
Technician : { backgroundColor : ' #ff9800 ' , color : ' #fff ' },
Administrator : { backgroundColor : ' #0068ba ' , color : ' #fff ' },
Agent : { backgroundColor : ' #0068ba ' , color : ' #fff ' },
Architect : { backgroundColor : ' #0068ba ' , color : ' #fff ' },
Analyst : { backgroundColor : ' #0068ba ' , color : ' #fff ' },
Officer : { backgroundColor : ' #ff9800 ' , color : ' #fff ' },
Planner : { backgroundColor : ' #0068ba ' , color : ' #fff ' },
Representative : { backgroundColor : ' #f44336 ' , color : ' #fff ' },
cellProperties : ({ model }) => ({
subRow : !! model.parentId,
cellProperties : ({ model }) => ({
subRow : !! model.parentId,
const plugins = shallowRef ([
makeData ( 20 , 1 , 1 ). flatMap (( v ) => [
... (v.subRows?. flatMap (( v ) => [
... (v.subRows?. flatMap (( v ) => [v]) || []),
const additionalData = shallowRef ({
expandedRowIds : new Set ([rows.value[ 0 ].id]),