yuyeon 0.1.0-rc.12 → 0.1.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/yuyeon.js +331 -317
- package/dist/yuyeon.umd.cjs +5 -5
- package/lib/components/table/YDataTableRow.mjs +25 -1
- package/lib/components/table/YDataTableRow.mjs.map +1 -1
- package/lib/components/table/types/common.mjs.map +1 -1
- package/lib/components/table/types/header.mjs.map +1 -1
- package/package.json +1 -1
- package/types/components/table/composibles/header.d.ts +2 -2
- package/types/components/table/types/common.d.ts +1 -0
- package/types/components/table/types/header.d.ts +2 -2
|
@@ -33,6 +33,18 @@ export const YDataTableRow = defineComponent({
|
|
|
33
33
|
const {
|
|
34
34
|
columns
|
|
35
35
|
} = useHeader();
|
|
36
|
+
function arrayClasses(classes) {
|
|
37
|
+
const ret = [];
|
|
38
|
+
if (typeof classes === 'string') {
|
|
39
|
+
ret.push(classes);
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(classes)) {
|
|
42
|
+
classes.forEach(c => {
|
|
43
|
+
if (typeof c === 'string') ret.push(c);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return ret;
|
|
47
|
+
}
|
|
36
48
|
useRender(() => {
|
|
37
49
|
return _createVNode("tr", {
|
|
38
50
|
"class": ['y-data-table__row'],
|
|
@@ -50,6 +62,18 @@ export const YDataTableRow = defineComponent({
|
|
|
50
62
|
selected: computed(() => isSelected(item)).value,
|
|
51
63
|
toggleSelect
|
|
52
64
|
};
|
|
65
|
+
const classes = computed(() => {
|
|
66
|
+
const ret = [];
|
|
67
|
+
if (typeof column.classes === 'function') {
|
|
68
|
+
const result = column.classes.call(null, slotProps.item, slotProps.index, column);
|
|
69
|
+
if (result) {
|
|
70
|
+
ret.push(...arrayClasses(result));
|
|
71
|
+
}
|
|
72
|
+
} else if (column.classes) {
|
|
73
|
+
ret.push(...arrayClasses(column.classes));
|
|
74
|
+
}
|
|
75
|
+
return ret;
|
|
76
|
+
});
|
|
53
77
|
const cellProps = typeof props.cellProps === 'function' ? props.cellProps({
|
|
54
78
|
index: slotProps.index,
|
|
55
79
|
column,
|
|
@@ -66,7 +90,7 @@ export const YDataTableRow = defineComponent({
|
|
|
66
90
|
"maxWidth": column.maxWidth,
|
|
67
91
|
"class": ['y-data-table-data', {
|
|
68
92
|
'y-data-table-data--select': column.key === 'data-table-select'
|
|
69
|
-
}]
|
|
93
|
+
}, ...classes.value]
|
|
70
94
|
}, cellProps), {
|
|
71
95
|
default: () => {
|
|
72
96
|
const slotName = `item.${column.key}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDataTableRow.mjs","names":["computed","defineComponent","useRender","getPropertyFromItem","propsFactory","YIconCheckbox","YDataTableCell","useHeader","useSelection","pressYDataTableRowProps","index","Number","onClick","Function","onContextmenu","onDblclick","onHover","YDataTableRow","name","props","item","Object","cellProps","setup","_ref","emit","slots","isSelected","toggleSelect","columns","_createVNode","value","map","column","colIndex","slotProps","raw","internalItem","key","selected","_mergeProps","align","fixed","lastFixed","undefined","fixedOffset","width","maxWidth","default","slotName","selectable","e","stopPropagation"],"sources":["../../../src/components/table/YDataTableRow.tsx"],"sourcesContent":["import { PropType, computed, defineComponent, ref } from 'vue';\n\nimport { useRender } from '../../composables/component';\nimport { getPropertyFromItem } from '../../util/common';\nimport { propsFactory } from '../../util/vue-component';\nimport { YIconCheckbox } from '../icons';\nimport { YDataTableCell } from './YDataTableCell';\nimport { useHeader } from './composibles/header';\nimport { useSelection } from './composibles/selection';\nimport { CellProps, DataTableItem } from './types';\n\nexport const pressYDataTableRowProps = propsFactory(\n {\n index: Number as PropType<number>,\n onClick: Function as PropType<(...args: any[]) => void>,\n onContextmenu: Function as PropType<(...args: any[]) => void>,\n onDblclick: Function as PropType<(...args: any[]) => void>,\n onHover: Function as PropType<(...args: any[]) => void>,\n },\n 'YDataTableRow',\n);\n\nexport const YDataTableRow = defineComponent({\n name: 'YDataTableRow',\n props: {\n item: Object as PropType<DataTableItem>,\n cellProps: [Object, Function] as PropType<CellProps>,\n ...pressYDataTableRowProps(),\n },\n setup(props, { emit, slots }) {\n const { isSelected, toggleSelect } = useSelection();\n const { columns } = useHeader();\n\n useRender(() => {\n return (\n <tr\n class={['y-data-table__row']}\n onClick={props.onClick as any}\n onContextmenu={props.onContextmenu as any}\n onDblclick={props.onDblclick as any}\n >\n {props.item &&\n columns.value.map((column, colIndex) => {\n const item = props.item!;\n const slotProps = {\n index: props.index!,\n item: props.item!.raw,\n internalItem: props.item!,\n columns: columns.value,\n value: getPropertyFromItem(item.columns, column.key),\n selected: computed(() => isSelected(item)).value,\n toggleSelect,\n };\n\n const cellProps =\n typeof props.cellProps === 'function'\n ? props.cellProps({\n index: slotProps.index,\n column,\n internalItem: slotProps.internalItem,\n item: slotProps.item,\n value: slotProps.value,\n selected: slotProps.selected,\n })\n : props.cellProps;\n\n return (\n <YDataTableCell\n align={column.align}\n fixed={\n column.fixed\n ? column.lastFixed\n ? 'last'\n : 'lead'\n : undefined\n }\n fixedOffset={column.fixedOffset}\n width={column.width}\n maxWidth={column.maxWidth}\n class={[\n 'y-data-table-data',\n {\n 'y-data-table-data--select':\n column.key === 'data-table-select',\n },\n ]}\n {...cellProps}\n >\n {{\n default: () => {\n const slotName = `item.${column.key}`;\n\n if (slots[slotName]) {\n return slots[slotName]?.(slotProps);\n }\n\n if (column.key === 'data-table-select') {\n return (\n slots['item.data-table-select']?.(slotProps) ?? (\n <YIconCheckbox\n checked={isSelected(item)}\n disabled={!item.selectable}\n {...{\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n toggleSelect(item);\n },\n }}\n ></YIconCheckbox>\n )\n );\n }\n\n return slotProps.value;\n },\n }}\n </YDataTableCell>\n );\n })}\n </tr>\n );\n });\n },\n});\n\nexport type YDataTableRow = InstanceType<typeof YDataTableRow>;\n"],"mappings":";AAAA,SAAmBA,QAAQ,EAAEC,eAAe,QAAa,KAAK;AAAC,SAEtDC,SAAS;AAAA,SACTC,mBAAmB;AAAA,SACnBC,YAAY;AAAA,SACZC,aAAa;AAAA,SACbC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,YAAY;AAGrB,OAAO,MAAMC,uBAAuB,GAAGL,YAAY,CACjD;EACEM,KAAK,EAAEC,MAA0B;EACjCC,OAAO,EAAEC,QAA8C;EACvDC,aAAa,EAAED,QAA8C;EAC7DE,UAAU,EAAEF,QAA8C;EAC1DG,OAAO,EAAEH;AACX,CAAC,EACD,eACF,CAAC;AAED,OAAO,MAAMI,aAAa,GAAGhB,eAAe,CAAC;EAC3CiB,IAAI,EAAE,eAAe;EACrBC,KAAK,EAAE;IACLC,IAAI,EAAEC,MAAiC;IACvCC,SAAS,EAAE,CAACD,MAAM,EAAER,QAAQ,CAAwB;IACpD,GAAGJ,uBAAuB,CAAC;EAC7B,CAAC;EACDc,KAAKA,CAACJ,KAAK,EAAAK,IAAA,EAAmB;IAAA,IAAjB;MAAEC,IAAI;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC1B,MAAM;MAAEG,UAAU;MAAEC;IAAa,CAAC,GAAGpB,YAAY,CAAC,CAAC;IACnD,MAAM;MAAEqB;IAAQ,CAAC,GAAGtB,SAAS,CAAC,CAAC;IAE/
|
|
1
|
+
{"version":3,"file":"YDataTableRow.mjs","names":["computed","defineComponent","useRender","getPropertyFromItem","propsFactory","YIconCheckbox","YDataTableCell","useHeader","useSelection","pressYDataTableRowProps","index","Number","onClick","Function","onContextmenu","onDblclick","onHover","YDataTableRow","name","props","item","Object","cellProps","setup","_ref","emit","slots","isSelected","toggleSelect","columns","arrayClasses","classes","ret","push","Array","isArray","forEach","c","_createVNode","value","map","column","colIndex","slotProps","raw","internalItem","key","selected","result","call","_mergeProps","align","fixed","lastFixed","undefined","fixedOffset","width","maxWidth","default","slotName","selectable","e","stopPropagation"],"sources":["../../../src/components/table/YDataTableRow.tsx"],"sourcesContent":["import { PropType, computed, defineComponent, ref } from 'vue';\n\nimport { useRender } from '../../composables/component';\nimport { getPropertyFromItem } from '../../util/common';\nimport { propsFactory, bindClasses } from '../../util/vue-component';\nimport { YIconCheckbox } from '../icons';\nimport { YDataTableCell } from './YDataTableCell';\nimport { useHeader } from './composibles/header';\nimport { useSelection } from './composibles/selection';\nimport { CellProps, DataTableItem } from './types';\n\nexport const pressYDataTableRowProps = propsFactory(\n {\n index: Number as PropType<number>,\n onClick: Function as PropType<(...args: any[]) => void>,\n onContextmenu: Function as PropType<(...args: any[]) => void>,\n onDblclick: Function as PropType<(...args: any[]) => void>,\n onHover: Function as PropType<(...args: any[]) => void>,\n },\n 'YDataTableRow',\n);\n\nexport const YDataTableRow = defineComponent({\n name: 'YDataTableRow',\n props: {\n item: Object as PropType<DataTableItem>,\n cellProps: [Object, Function] as PropType<CellProps>,\n ...pressYDataTableRowProps(),\n },\n setup(props, { emit, slots }) {\n const { isSelected, toggleSelect } = useSelection();\n const { columns } = useHeader();\n\n function arrayClasses(classes: string | string[]) {\n const ret: string[] = [];\n if (typeof classes === 'string') {\n ret.push(classes);\n }\n if (Array.isArray(classes)) {\n classes.forEach((c) => {\n if (typeof c === 'string') ret.push(c);\n });\n }\n return ret;\n }\n\n useRender(() => {\n return (\n <tr\n class={['y-data-table__row']}\n onClick={props.onClick as any}\n onContextmenu={props.onContextmenu as any}\n onDblclick={props.onDblclick as any}\n >\n {props.item &&\n columns.value.map((column, colIndex) => {\n const item = props.item!;\n const slotProps = {\n index: props.index!,\n item: props.item!.raw,\n internalItem: props.item!,\n columns: columns.value,\n value: getPropertyFromItem(item.columns, column.key),\n selected: computed(() => isSelected(item)).value,\n toggleSelect,\n };\n\n const classes = computed(() => {\n const ret: string[] = [];\n if (typeof column.classes === 'function') {\n const result = column.classes.call(null, slotProps.item, slotProps.index, column);\n if (result) {\n ret.push(...arrayClasses(result));\n }\n } else if (column.classes) {\n ret.push(...arrayClasses(column.classes))\n }\n \n return ret;\n });\n\n const cellProps =\n typeof props.cellProps === 'function'\n ? props.cellProps({\n index: slotProps.index,\n column,\n internalItem: slotProps.internalItem,\n item: slotProps.item,\n value: slotProps.value,\n selected: slotProps.selected,\n })\n : props.cellProps;\n\n return (\n <YDataTableCell\n align={column.align}\n fixed={\n column.fixed\n ? column.lastFixed\n ? 'last'\n : 'lead'\n : undefined\n }\n fixedOffset={column.fixedOffset}\n width={column.width}\n maxWidth={column.maxWidth}\n class={[\n 'y-data-table-data',\n {\n 'y-data-table-data--select':\n column.key === 'data-table-select',\n },\n ...classes.value\n ]}\n {...cellProps}\n >\n {{\n default: () => {\n const slotName = `item.${column.key}`;\n\n if (slots[slotName]) {\n return slots[slotName]?.(slotProps);\n }\n\n if (column.key === 'data-table-select') {\n return (\n slots['item.data-table-select']?.(slotProps) ?? (\n <YIconCheckbox\n checked={isSelected(item)}\n disabled={!item.selectable}\n {...{\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n toggleSelect(item);\n },\n }}\n ></YIconCheckbox>\n )\n );\n }\n\n return slotProps.value;\n },\n }}\n </YDataTableCell>\n );\n })}\n </tr>\n );\n });\n },\n});\n\nexport type YDataTableRow = InstanceType<typeof YDataTableRow>;\n"],"mappings":";AAAA,SAAmBA,QAAQ,EAAEC,eAAe,QAAa,KAAK;AAAC,SAEtDC,SAAS;AAAA,SACTC,mBAAmB;AAAA,SACnBC,YAAY;AAAA,SACZC,aAAa;AAAA,SACbC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,YAAY;AAGrB,OAAO,MAAMC,uBAAuB,GAAGL,YAAY,CACjD;EACEM,KAAK,EAAEC,MAA0B;EACjCC,OAAO,EAAEC,QAA8C;EACvDC,aAAa,EAAED,QAA8C;EAC7DE,UAAU,EAAEF,QAA8C;EAC1DG,OAAO,EAAEH;AACX,CAAC,EACD,eACF,CAAC;AAED,OAAO,MAAMI,aAAa,GAAGhB,eAAe,CAAC;EAC3CiB,IAAI,EAAE,eAAe;EACrBC,KAAK,EAAE;IACLC,IAAI,EAAEC,MAAiC;IACvCC,SAAS,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,GACd,MAAM,GACN,MAAM,GACRC,SAAS;UAAA,eAEFb,MAAM,CAACc,WAAW;UAAA,SACxBd,MAAM,CAACe,KAAK;UAAA,YACTf,MAAM,CAACgB,QAAQ;UAAA,SAClB,CACL,mBAAmB,EACnB;YACE,2BAA2B,EACzBhB,MAAM,CAACK,GAAG,KAAK;UACnB,CAAC,EACD,GAAGf,OAAO,CAACQ,KAAK;QACjB,GACGjB,SAAS;UAGXoC,OAAO,EAAEA,CAAA,KAAM;YACb,MAAMC,QAAQ,GAAI,QAAOlB,MAAM,CAACK,GAAI,EAAC;YAErC,IAAIpB,KAAK,CAACiC,QAAQ,CAAC,EAAE;cACnB,OAAOjC,KAAK,CAACiC,QAAQ,CAAC,GAAGhB,SAAS,CAAC;YACrC;YAEA,IAAIF,MAAM,CAACK,GAAG,KAAK,mBAAmB,EAAE;cACtC,OACEpB,KAAK,CAAC,wBAAwB,CAAC,GAAGiB,SAAS,CAAC,IAAAL,YAAA,CAAAjC,aAAA,EAAA6C,WAAA;gBAAA,WAE/BvB,UAAU,CAACP,IAAI,CAAC;gBAAA,YACf,CAACA,IAAI,CAACwC;cAAU;gBAExBhD,OAAO,EAAGiD,CAAa,IAAK;kBAC1BA,CAAC,CAACC,eAAe,CAAC,CAAC;kBACnBlC,YAAY,CAACR,IAAI,CAAC;gBACpB;cAAC,SAGN;YAEL;YAEA,OAAOuB,SAAS,CAACJ,KAAK;UACxB;QAAC;MAIT,CAAC,CAAC;IAGV,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.mjs","names":[],"sources":["../../../../src/components/table/types/common.ts"],"sourcesContent":["export type DataTableCompareFn<T = any> = (a: T, b: T) => number;\r\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"common.mjs","names":[],"sources":["../../../../src/components/table/types/common.ts"],"sourcesContent":["export type DataTableCompareFn<T = any> = (a: T, b: T) => number;\r\nexport type DataTableCellClassesFn = (\r\n item: any,\r\n index: number,\r\n header: any,\r\n) => string | string[] | undefined;\r\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/components/table/types/header.ts"],"sourcesContent":["import { DataTableCompareFn } from './common';\r\n\r\nexport type DataTableHeader = {\r\n key: string;\r\n text: string;\r\n value?: any;\r\n\r\n colspan?: number;\r\n rowspan?: number;\r\n fixed?: boolean;\r\n\r\n classes?: string | string[];\r\n align?: 'start' | 'end' | 'center';\r\n width?: number | string;\r\n minWidth?: string;\r\n maxWidth?: string;\r\n sortable?: boolean;\r\n sort?: DataTableCompareFn;\r\n mustSort?: boolean;\r\n};\r\n\r\nexport type InternalDataTableHeader = DataTableHeader & {\r\n sortable: boolean;\r\n fixedOffset?: number;\r\n lastFixed?: boolean;\r\n};\r\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/components/table/types/header.ts"],"sourcesContent":["import { type DataTableCellClassesFn, type DataTableCompareFn } from './common';\r\n\r\nexport type DataTableHeader = {\r\n key: string;\r\n text: string;\r\n value?: any;\r\n\r\n colspan?: number;\r\n rowspan?: number;\r\n fixed?: boolean;\r\n\r\n classes?: string | string[] | DataTableCellClassesFn;\r\n align?: 'start' | 'end' | 'center';\r\n width?: number | string;\r\n minWidth?: string;\r\n maxWidth?: string;\r\n sortable?: boolean;\r\n sort?: DataTableCompareFn;\r\n mustSort?: boolean;\r\n};\r\n\r\nexport type InternalDataTableHeader = DataTableHeader & {\r\n sortable: boolean;\r\n fixedOffset?: number;\r\n lastFixed?: boolean;\r\n};\r\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ export declare function createHeader(props: HeaderProps, options?: {
|
|
|
31
31
|
colspan?: number | undefined;
|
|
32
32
|
rowspan?: number | undefined;
|
|
33
33
|
fixed?: boolean | undefined;
|
|
34
|
-
classes?: string | string[] | undefined;
|
|
34
|
+
classes?: string | string[] | import("../types/common").DataTableCellClassesFn | undefined;
|
|
35
35
|
align?: "end" | "start" | "center" | undefined;
|
|
36
36
|
width?: string | number | undefined;
|
|
37
37
|
minWidth?: string | undefined;
|
|
@@ -49,7 +49,7 @@ export declare function createHeader(props: HeaderProps, options?: {
|
|
|
49
49
|
colspan?: number | undefined;
|
|
50
50
|
rowspan?: number | undefined;
|
|
51
51
|
fixed?: boolean | undefined;
|
|
52
|
-
classes?: string | string[] | undefined;
|
|
52
|
+
classes?: string | string[] | import("../types/common").DataTableCellClassesFn | undefined;
|
|
53
53
|
align?: "end" | "start" | "center" | undefined;
|
|
54
54
|
width?: string | number | undefined;
|
|
55
55
|
minWidth?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataTableCompareFn } from './common';
|
|
1
|
+
import { type DataTableCellClassesFn, type DataTableCompareFn } from './common';
|
|
2
2
|
export type DataTableHeader = {
|
|
3
3
|
key: string;
|
|
4
4
|
text: string;
|
|
@@ -6,7 +6,7 @@ export type DataTableHeader = {
|
|
|
6
6
|
colspan?: number;
|
|
7
7
|
rowspan?: number;
|
|
8
8
|
fixed?: boolean;
|
|
9
|
-
classes?: string | string[];
|
|
9
|
+
classes?: string | string[] | DataTableCellClassesFn;
|
|
10
10
|
align?: 'start' | 'end' | 'center';
|
|
11
11
|
width?: number | string;
|
|
12
12
|
minWidth?: string;
|