@voicenter-team/voicenter-ui-plus 3.0.1 → 3.0.2
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/library/components/VcTable/VcTable.vue.mjs +6 -3
- package/library/types/components/VcDelimitedList/VcDelimitedList.vue.d.ts +2 -2
- package/library/types/components/VcSelect/VcInfiniteScrollSelect.vue.d.ts +2 -2
- package/library/types/components/VcSelect/VcSelectGrouped.vue.d.ts +1 -1
- package/library/types/components/VcTable/VcTable.vue.d.ts +14 -14
- package/library/types/types/OptionAndConfig.types.d.ts +1 -1
- package/library/types/types/VcTable.types.d.ts +2 -2
- package/library/types/types/VcTree.types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -343,7 +343,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
343
343
|
if (valueToLabel.has(value)) return;
|
|
344
344
|
let label;
|
|
345
345
|
if (column.format) {
|
|
346
|
-
const formatted = column.format(option);
|
|
346
|
+
const formatted = column.format(rowAsRecord(option));
|
|
347
347
|
label = String(formatted ?? value);
|
|
348
348
|
} else {
|
|
349
349
|
label = String(value);
|
|
@@ -603,9 +603,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
603
603
|
function gettingColumnItemData(column) {
|
|
604
604
|
return column.columnItemLabel;
|
|
605
605
|
}
|
|
606
|
+
function rowAsRecord(option) {
|
|
607
|
+
return option;
|
|
608
|
+
}
|
|
606
609
|
function gettingRowItemData(option, rowColumn) {
|
|
607
610
|
if (rowColumn.format) {
|
|
608
|
-
return rowColumn.format(option);
|
|
611
|
+
return rowColumn.format(rowAsRecord(option));
|
|
609
612
|
}
|
|
610
613
|
const labelKey = rowColumn.rowItemLabelKey ? rowColumn.rowItemLabelKey : rowColumn.columnItemLabel;
|
|
611
614
|
return get(option, labelKey, "");
|
|
@@ -618,7 +621,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
618
621
|
if (optionUniqueKey === void 0) {
|
|
619
622
|
return;
|
|
620
623
|
}
|
|
621
|
-
const equalItem = localOptions.value.find((localOption) => localOption
|
|
624
|
+
const equalItem = localOptions.value.find((localOption) => get(localOption, optionUniqueKey) === get(option, optionUniqueKey));
|
|
622
625
|
if (equalItem) {
|
|
623
626
|
equalItem.selected = actionValue;
|
|
624
627
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: <Option extends
|
|
1
|
+
import { PopoverTriggerType } from '../../types';
|
|
2
|
+
declare const _default: <Option extends object = Record<string, unknown>, ValueKey extends keyof Option | undefined = undefined>(__VLS_props: {
|
|
3
3
|
list?: Option[] | undefined;
|
|
4
4
|
popoverMaxWidth?: string | number | undefined;
|
|
5
5
|
trigger?: PopoverTriggerType | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigOptionType, ExtractValueType
|
|
2
|
-
declare const _default: <Option extends
|
|
1
|
+
import { ConfigOptionType, ExtractValueType } from '../../types';
|
|
2
|
+
declare const _default: <Option extends object, Config extends ConfigOptionType<Option>, Model extends ExtractValueType<Option, Config>, Multiple extends boolean = false>(__VLS_props: {
|
|
3
3
|
id?: string | undefined;
|
|
4
4
|
size?: "" | "small" | "default" | "large" | undefined;
|
|
5
5
|
color?: "" | "primary" | "secondary" | "destructive" | "success" | "warning" | "active" | "primary-alternative" | undefined;
|
|
@@ -3,7 +3,7 @@ export type OptionObjectGroupedValueType<Option extends OptionObjectValueType> =
|
|
|
3
3
|
label: string;
|
|
4
4
|
options: Array<Option>;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: <Option extends
|
|
6
|
+
declare const _default: <Option extends object, Config extends ConfigOptionType<Option>, Model extends ExtractValueType<Option, Config>, Multiple extends boolean = false>(__VLS_props: {
|
|
7
7
|
id?: string | undefined;
|
|
8
8
|
size?: "" | "small" | "default" | "large" | undefined;
|
|
9
9
|
color?: "" | "primary" | "secondary" | "destructive" | "success" | "warning" | "active" | "primary-alternative" | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionsColumnType, ColumnFilterState, ColumnType, ColumnTypeItem, ConfigType,
|
|
2
|
-
declare const _default: <Option extends
|
|
1
|
+
import { ActionsColumnType, ColumnFilterState, ColumnType, ColumnTypeItem, ConfigType, Pagination, PaginationProp, SortingOrderDefaultType } from '../../types';
|
|
2
|
+
declare const _default: <Option extends object = Record<string, unknown>>(__VLS_props: {
|
|
3
3
|
height?: string | number | undefined;
|
|
4
4
|
loading?: boolean | undefined;
|
|
5
5
|
options?: Option[] | undefined;
|
|
@@ -55,18 +55,18 @@ declare const _default: <Option extends OptionObjectValueType>(__VLS_props: {
|
|
|
55
55
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
|
56
56
|
attrs: any;
|
|
57
57
|
slots: Partial<Record<string, (_: {
|
|
58
|
-
column: ColumnTypeItem<
|
|
58
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
59
59
|
}) => any>> & Partial<Record<`${string}-title`, (_: {
|
|
60
|
-
column: ColumnTypeItem<
|
|
60
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
61
61
|
title: string;
|
|
62
62
|
}) => any>> & Partial<Record<`${string}-filter-option`, (_: {
|
|
63
63
|
option: {
|
|
64
64
|
value: string | number;
|
|
65
65
|
label: string;
|
|
66
66
|
};
|
|
67
|
-
column: ColumnTypeItem<
|
|
67
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
68
68
|
}) => any>> & Partial<Record<`${string}-extra`, (_: {
|
|
69
|
-
column: ColumnTypeItem<
|
|
69
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
70
70
|
}) => any>> & Partial<Record<string, (_: {
|
|
71
71
|
row: Option & {
|
|
72
72
|
selected?: boolean | undefined;
|
|
@@ -189,18 +189,18 @@ declare const _default: <Option extends OptionObjectValueType>(__VLS_props: {
|
|
|
189
189
|
}): void;
|
|
190
190
|
attrs: any;
|
|
191
191
|
slots: Partial<Record<string, (_: {
|
|
192
|
-
column: ColumnTypeItem<
|
|
192
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
193
193
|
}) => any>> & Partial<Record<`${string}-title`, (_: {
|
|
194
|
-
column: ColumnTypeItem<
|
|
194
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
195
195
|
title: string;
|
|
196
196
|
}) => any>> & Partial<Record<`${string}-filter-option`, (_: {
|
|
197
197
|
option: {
|
|
198
198
|
value: string | number;
|
|
199
199
|
label: string;
|
|
200
200
|
};
|
|
201
|
-
column: ColumnTypeItem<
|
|
201
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
202
202
|
}) => any>> & Partial<Record<`${string}-extra`, (_: {
|
|
203
|
-
column: ColumnTypeItem<
|
|
203
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
204
204
|
}) => any>> & Partial<Record<string, (_: {
|
|
205
205
|
row: Option & {
|
|
206
206
|
selected?: boolean | undefined;
|
|
@@ -318,18 +318,18 @@ declare const _default: <Option extends OptionObjectValueType>(__VLS_props: {
|
|
|
318
318
|
}): void;
|
|
319
319
|
attrs: any;
|
|
320
320
|
slots: Partial<Record<string, (_: {
|
|
321
|
-
column: ColumnTypeItem<
|
|
321
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
322
322
|
}) => any>> & Partial<Record<`${string}-title`, (_: {
|
|
323
|
-
column: ColumnTypeItem<
|
|
323
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
324
324
|
title: string;
|
|
325
325
|
}) => any>> & Partial<Record<`${string}-filter-option`, (_: {
|
|
326
326
|
option: {
|
|
327
327
|
value: string | number;
|
|
328
328
|
label: string;
|
|
329
329
|
};
|
|
330
|
-
column: ColumnTypeItem<
|
|
330
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
331
331
|
}) => any>> & Partial<Record<`${string}-extra`, (_: {
|
|
332
|
-
column: ColumnTypeItem<
|
|
332
|
+
column: ColumnTypeItem<Record<string, unknown>>;
|
|
333
333
|
}) => any>> & Partial<Record<string, (_: {
|
|
334
334
|
row: Option & {
|
|
335
335
|
selected?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@ import type { StyleValue } from 'vue';
|
|
|
2
2
|
import { COMPONENT_COLOR_TYPE } from '../enum/constants';
|
|
3
3
|
import { NestedKeys, PathValue } from '.';
|
|
4
4
|
import type { TIcon } from './icons.types';
|
|
5
|
-
export type OptionObjectValueType =
|
|
5
|
+
export type OptionObjectValueType = object;
|
|
6
6
|
export type OptionNonObjectValueType = string | number | boolean;
|
|
7
7
|
export type OptionValueType = OptionObjectValueType | OptionNonObjectValueType;
|
|
8
8
|
export type ConfigOptionType<Option extends OptionValueType> = Option extends OptionObjectValueType ? {
|
|
@@ -2,7 +2,7 @@ import { OptionObjectValueType } from '.';
|
|
|
2
2
|
import { TIcon } from './icons.types';
|
|
3
3
|
export declare type Alignment = 'left' | 'center' | 'right';
|
|
4
4
|
export declare type SortFunction<Option extends OptionObjectValueType> = (a: Option, b: Option) => number;
|
|
5
|
-
export declare type FormatFunction<Option extends OptionObjectValueType =
|
|
5
|
+
export declare type FormatFunction<Option extends OptionObjectValueType = Record<string, unknown>> = (row: Option) => string | number | unknown;
|
|
6
6
|
/** @description Configuration for column filtering functionality */
|
|
7
7
|
export declare type FilterableConfig = {
|
|
8
8
|
/** @description Whether filtering is enabled for this column */
|
|
@@ -16,7 +16,7 @@ export declare type ColumnFilterState = {
|
|
|
16
16
|
};
|
|
17
17
|
/** @description Default filter options per column (always shown in filter popover) */
|
|
18
18
|
export declare type FilterOptionsMap = Record<string, Array<string | number>>;
|
|
19
|
-
export declare type ColumnTypeItem<Option extends OptionObjectValueType =
|
|
19
|
+
export declare type ColumnTypeItem<Option extends OptionObjectValueType = Record<string, unknown>> = {
|
|
20
20
|
columnItemLabel: string;
|
|
21
21
|
columnItemKey: string;
|
|
22
22
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigOptionType
|
|
1
|
+
import type { ConfigOptionType } from './OptionAndConfig.types';
|
|
2
2
|
import type { TIcon } from './icons.types';
|
|
3
3
|
export declare type VcTreeNodeType<T extends string = string> = {
|
|
4
4
|
id?: string | number;
|
|
@@ -15,7 +15,7 @@ export declare type VcTreeNodeType<T extends string = string> = {
|
|
|
15
15
|
checked?: boolean;
|
|
16
16
|
_keyPath?: string;
|
|
17
17
|
type?: T;
|
|
18
|
-
} &
|
|
18
|
+
} & Record<string, unknown>;
|
|
19
19
|
export declare type VcTreeConfig<NodeType extends VcTreeNodeType> = ConfigOptionType<NodeType> & {
|
|
20
20
|
childrenKey: keyof NodeType;
|
|
21
21
|
valueKey: keyof NodeType;
|