You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
1.7 KiB
1 line
1.7 KiB
{"ast":null,"code":"import { isVNode, createVNode, mergeProps } from 'vue';\nimport TableGrid from '../table-grid.mjs';\nfunction _isSlot(s) {\n return typeof s === \"function\" || Object.prototype.toString.call(s) === \"[object Object]\" && !isVNode(s);\n}\nconst LeftTable = (props, {\n slots\n}) => {\n if (!props.columns.length) return;\n const {\n rightTableRef,\n ...rest\n } = props;\n return createVNode(TableGrid, mergeProps({\n \"ref\": rightTableRef\n }, rest), _isSlot(slots) ? slots : {\n default: () => [slots]\n });\n};\nexport { LeftTable as default };","map":{"version":3,"names":["props","columns","length","rightTableRef","rest","createVNode","TableGrid","mergeProps","_isSlot","slots","default"],"sources":["../../../../../../../packages/components/table-v2/src/renderers/right-table.tsx"],"sourcesContent":["import Table from '../table-grid'\n\nimport type { FunctionalComponent, Ref } from 'vue'\nimport type { TableV2GridProps } from '../grid'\nimport type { TableGridInstance } from '../table-grid'\n\ntype LeftTableProps = TableV2GridProps & {\n rightTableRef: Ref<TableGridInstance | undefined>\n}\n\nconst LeftTable: FunctionalComponent<LeftTableProps> = (props, { slots }) => {\n if (!props.columns.length) return\n\n const { rightTableRef, ...rest } = props\n\n return (\n <Table ref={rightTableRef} {...rest}>\n {slots}\n </Table>\n )\n}\n\nexport default LeftTable\n"],"mappings":";;;;;;;AAUA,MAAM;EAA2D,KAAAA,KAAA,CAAAC,OAAA,CAAAC,MAAA,EAAY;EAC3E,MAAU;IAEJC,aAAA;IAAE,GAAFC;MAAoBJ,KAAA;EAApB,OAANK,WAAA,CAAAC,SAAA,EAAAC,UAAA;IAEA,OAAAJ;KACcC,IAAA,GAAAI,OAAA,CAAAC,KAAA,IAAAA,KAAA;IADdC,OAAA,EAAAA,CAAA,MAEKD,KAFL;EAAA;AAAA","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |