@voicenter-team/voicenter-ui-plus 4.0.0-beta.6 → 4.0.0-beta.7
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/MIGRATION_v3.md +196 -196
- package/README.md +2 -1
- package/library/assets/components/VcFileUploader/VcFileUploaderSimple.css +1 -1
- package/library/assets/components/VcFilterBar/VcFilterAddMenu.css +1 -0
- package/library/assets/components/VcFilterBar/VcFilterBar.css +1 -0
- package/library/assets/components/VcFilterBar/VcFilterChip.css +1 -0
- package/library/assets/components/VcFilterBar/VcFilterChipEditor.css +1 -0
- package/library/assets/components/VcFilterBar/VcFilterEditorModal.css +1 -0
- package/library/assets/components/VcFilterBar/VcFilterEditorPanel.css +1 -0
- package/library/assets/components/VcFilterBar/editors/VcFilterBooleanEditor.css +1 -0
- package/library/assets/components/VcFilterBar/editors/VcFilterMultiselectEditor.css +1 -0
- package/library/assets/components/VcFilterBar/editors/VcFilterRangeEditor.css +1 -0
- package/library/assets/components/VcFilterBar/editors/VcFilterSelectEditor.css +1 -0
- package/library/assets/components/VcFilterBar/editors/VcFilterTextEditor.css +1 -0
- package/library/assets/components/VcFilterBar/editors/VcFilterTextListEditor.css +1 -0
- package/library/assets/components/VcJsonSchema/Components/JsonSchemaEditor.css +1 -1
- package/library/assets/components/VcLoading/Loaders/Circles.css +1 -1
- package/library/assets/components/VcLoading/Loaders/DotSpinner.css +1 -1
- package/library/assets/components/VcLoading/Loaders/LdsSpinner.css +1 -1
- package/library/assets/components/VcLoading/Loaders/LoadIcon.css +1 -1
- package/library/assets/components/VcLoading/Loaders/Stretch.css +1 -1
- package/library/assets/components/VcLoading/VcLoading.css +1 -1
- package/library/assets/components/VcMdEditor/ParameterNode.css +1 -1
- package/library/assets/components/VcSegmented/VcSegmented.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Card.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Circle.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Row.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Square.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Text.css +1 -1
- package/library/assets/components/VcTimeInput/VcTimeInput.css +1 -1
- package/library/components/VcCheckbox/VcCheckbox.vue.mjs +1 -1
- package/library/components/VcCheckbox/VcCheckboxButton.vue.mjs +1 -1
- package/library/components/VcDatePicker/VcDatePicker.vue.mjs +1 -1
- package/library/components/VcDropdown/VcDropdownItem.vue.mjs +1 -1
- package/library/components/VcFileUploader/VcFileUploaderSimple.vue.mjs +1 -1
- package/library/components/VcFilterBar/VcFilterAddMenu.vue.mjs +380 -0
- package/library/components/VcFilterBar/VcFilterAddMenu.vue3.mjs +5 -0
- package/library/components/VcFilterBar/VcFilterBar.vue.mjs +469 -0
- package/library/components/VcFilterBar/VcFilterBar.vue3.mjs +5 -0
- package/library/components/VcFilterBar/VcFilterChip.vue.mjs +136 -0
- package/library/components/VcFilterBar/VcFilterChip.vue3.mjs +5 -0
- package/library/components/VcFilterBar/VcFilterChipEditor.vue.mjs +133 -0
- package/library/components/VcFilterBar/VcFilterChipEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/VcFilterEditorModal.vue.mjs +90 -0
- package/library/components/VcFilterBar/VcFilterEditorModal.vue3.mjs +5 -0
- package/library/components/VcFilterBar/VcFilterEditorPanel.vue.mjs +179 -0
- package/library/components/VcFilterBar/VcFilterEditorPanel.vue3.mjs +5 -0
- package/library/components/VcFilterBar/editors/VcFilterBooleanEditor.vue.mjs +62 -0
- package/library/components/VcFilterBar/editors/VcFilterBooleanEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue.mjs +199 -0
- package/library/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/editors/VcFilterRangeEditor.vue.mjs +124 -0
- package/library/components/VcFilterBar/editors/VcFilterRangeEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/editors/VcFilterSelectEditor.vue.mjs +96 -0
- package/library/components/VcFilterBar/editors/VcFilterSelectEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/editors/VcFilterTextEditor.vue.mjs +58 -0
- package/library/components/VcFilterBar/editors/VcFilterTextEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/editors/VcFilterTextListEditor.vue.mjs +155 -0
- package/library/components/VcFilterBar/editors/VcFilterTextListEditor.vue3.mjs +5 -0
- package/library/components/VcFilterBar/filterBarChip.mjs +59 -0
- package/library/components/VcFilterBar/filterBarDate.mjs +69 -0
- package/library/components/VcFilterBar/filterBarDraft.mjs +86 -0
- package/library/components/VcFilterBar/filterBarEditors.mjs +36 -0
- package/library/components/VcFilterBar/filterBarErrors.mjs +57 -0
- package/library/components/VcFilterBar/filterBarModel.mjs +378 -0
- package/library/components/VcFilterBar/filterBarOptions.mjs +253 -0
- package/library/components/VcFilterBar/filterBarSearch.mjs +89 -0
- package/library/components/VcFilterBar/filterBarValidate.mjs +99 -0
- package/library/components/VcForm/VcForm.vue.mjs +1 -1
- package/library/components/VcForm/VcFormItem.vue.mjs +1 -1
- package/library/components/VcHtmlEditor/VcHtmlEditorToolbar.vue.mjs +1 -1
- package/library/components/VcInput/VcInput.vue.mjs +1 -1
- package/library/components/VcJsonSchema/Components/JsonSchemaEditor.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/Circles.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/DotSpinner.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/DotSpinner.vue2.mjs +2 -2
- package/library/components/VcLoading/Loaders/LdsSpinner.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/LoadIcon.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/Stretch.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/Stretch.vue2.mjs +1 -1
- package/library/components/VcLoading/VcLoading.vue.mjs +1 -1
- package/library/components/VcMdEditor/ParameterNode.vue.mjs +1 -1
- package/library/components/VcMdEditor/VcMdEditor.vue.mjs +1 -1
- package/library/components/VcMdEditor/VcMdEditorToolbar.vue.mjs +1 -1
- package/library/components/VcMessage/reactions/VcMessageReactionBar.vue.mjs +1 -1
- package/library/components/VcRadio/VcRadio.vue.mjs +1 -1
- package/library/components/VcSegmented/VcSegmented.vue.mjs +1 -1
- package/library/components/VcSelect/VcSelect.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Card.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Circle.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Row.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Square.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Text.vue.mjs +1 -1
- package/library/components/VcSlider/VcSlider.vue.mjs +1 -1
- package/library/components/VcTimeInput/VcTimeInput.vue.mjs +61 -27
- package/library/index.mjs +227 -162
- package/library/index.mjs.br +0 -0
- package/library/index.mjs.gz +0 -0
- package/library/localization/index.mjs.gz +0 -0
- package/library/localization/locales/en.json.mjs +51 -1
- package/library/plugin-components.gen.mjs +125 -122
- package/library/plugin.mjs +225 -160
- package/library/plugin.mjs.br +0 -0
- package/library/plugin.mjs.gz +0 -0
- package/library/style.css +40 -16
- package/library/style.css.br +0 -0
- package/library/style.css.gz +0 -0
- package/library/theme/index.mjs.gz +0 -0
- package/library/tokens/tokens.mjs +2 -0
- package/library/types/components/VcFilterBar/VcFilterAddMenu.vue.d.ts +39 -0
- package/library/types/components/VcFilterBar/VcFilterBar.vue.d.ts +132 -0
- package/library/types/components/VcFilterBar/VcFilterChip.vue.d.ts +42 -0
- package/library/types/components/VcFilterBar/VcFilterChipEditor.vue.d.ts +46 -0
- package/library/types/components/VcFilterBar/VcFilterEditorModal.vue.d.ts +40 -0
- package/library/types/components/VcFilterBar/VcFilterEditorPanel.vue.d.ts +116 -0
- package/library/types/components/VcFilterBar/editors/VcFilterBooleanEditor.vue.d.ts +66 -0
- package/library/types/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue.d.ts +73 -0
- package/library/types/components/VcFilterBar/editors/VcFilterRangeEditor.vue.d.ts +62 -0
- package/library/types/components/VcFilterBar/editors/VcFilterSelectEditor.vue.d.ts +62 -0
- package/library/types/components/VcFilterBar/editors/VcFilterTextEditor.vue.d.ts +68 -0
- package/library/types/components/VcFilterBar/editors/VcFilterTextListEditor.vue.d.ts +64 -0
- package/library/types/components/VcFilterBar/filterBarChip.d.ts +23 -0
- package/library/types/components/VcFilterBar/filterBarDate.d.ts +14 -0
- package/library/types/components/VcFilterBar/filterBarDraft.d.ts +28 -0
- package/library/types/components/VcFilterBar/filterBarEditors.d.ts +7 -0
- package/library/types/components/VcFilterBar/filterBarErrors.d.ts +22 -0
- package/library/types/components/VcFilterBar/filterBarModel.d.ts +83 -0
- package/library/types/components/VcFilterBar/filterBarOptions.d.ts +52 -0
- package/library/types/components/VcFilterBar/filterBarSearch.d.ts +23 -0
- package/library/types/components/VcFilterBar/filterBarValidate.d.ts +34 -0
- package/library/types/components/VcJsonSchema/Components/JsonSchemaEditor.vue.d.ts +1 -1
- package/library/types/components/VcTimeInput/VcTimeInput.vue.d.ts +9 -0
- package/library/types/components/exports.d.ts +3 -1
- package/library/types/components.gen.d.ts +1 -0
- package/library/types/entity/components/Table/VcEntityListTable.vue.d.ts +3 -3
- package/library/types/index.d.ts +8 -0
- package/library/types/localization/locales/en.json.d.ts +415 -365
- package/library/types/theme/themes.json.d.ts +72 -72
- package/library/types/tokens/tokens.d.ts +2 -1
- package/library/types/types/VcFilterBar.types.d.ts +329 -0
- package/library/types/types/VcTimeInput.types.d.ts +3 -0
- package/library/types/types/index.d.ts +2 -0
- package/library/utils/jsonSchema/index.mjs.gz +0 -0
- package/package.json +311 -311
- package/src/theme/index.ts +101 -101
- package/src/theme/tailwindScheme.js +78 -78
- package/src/theme/theme.types.ts +31 -31
- package/src/theme/themeMerge.ts +63 -63
- package/src/theme/themes.json +72 -72
- package/tailwind.config.d.ts +5 -5
- package/tailwind.config.js +178 -178
- /package/library/assets/node_modules/element-plus/theme-chalk/src/{tooltip.css → date-picker.css} +0 -0
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"voicenter": {
|
|
3
|
-
"vc-content-primary": "#161922",
|
|
4
|
-
"vc-content-secondary": "#525D70",
|
|
5
|
-
"vc-content-tertiary": "#567391",
|
|
6
|
-
"vc-content-brand": "#C20027",
|
|
7
|
-
"vc-content-disabled": "#A6B0C0",
|
|
8
|
-
"vc-bg-page": "#F8F9FB",
|
|
9
|
-
"vc-bg-surface": "#FFFFFF",
|
|
10
|
-
"vc-bg-inset": "#F8F9FB",
|
|
11
|
-
"vc-bg-inset-strong": "#EEF1F4",
|
|
12
|
-
"vc-bg-field": "#FFFFFF",
|
|
13
|
-
"vc-bg-muted": "#EEF1F4",
|
|
14
|
-
"vc-bg-overlay": "#16192280",
|
|
15
|
-
"vc-action-primary": "#E80130",
|
|
16
|
-
"vc-onfill": "#FFFFFF",
|
|
17
|
-
"vc-onfill-primary": "#FFFFFF",
|
|
18
|
-
"vc-action-info": "#2759DA",
|
|
19
|
-
"vc-action-success": "#007D47",
|
|
20
|
-
"vc-content-success": "#007D47",
|
|
21
|
-
"vc-content-warning": "#BF5001",
|
|
22
|
-
"vc-action-warning": "#FEC635",
|
|
23
|
-
"vc-onfill-warning": "#161922",
|
|
24
|
-
"vc-action-danger": "#750830",
|
|
25
|
-
"vc-action-secondary": "#4A607A",
|
|
26
|
-
"vc-border": "#E2E6EE",
|
|
27
|
-
"vc-border-strong": "#CDD4E0",
|
|
28
|
-
"vc-input": "#CDD4E0",
|
|
29
|
-
"vc-ring": "#4087FF",
|
|
30
|
-
"vc-mix-anchor": "#000000",
|
|
31
|
-
"vc-mix-anchor-primary": "#000000",
|
|
32
|
-
"vc-mix-anchor-warning": "#000000",
|
|
33
|
-
"vc-shadow-color": "#161922",
|
|
34
|
-
"vc-content-danger": "#750830",
|
|
35
|
-
"vc-content-info": "#2759DA"
|
|
36
|
-
},
|
|
37
|
-
"voicenterDark": {
|
|
38
|
-
"vc-content-primary": "#E2ECF7",
|
|
39
|
-
"vc-content-secondary": "#93A0B5",
|
|
40
|
-
"vc-content-tertiary": "#6D8AAA",
|
|
41
|
-
"vc-content-brand": "#FF6B6A",
|
|
42
|
-
"vc-content-disabled": "#48515F",
|
|
43
|
-
"vc-bg-page": "#0E1015",
|
|
44
|
-
"vc-bg-surface": "#161922",
|
|
45
|
-
"vc-bg-inset": "#0E1015",
|
|
46
|
-
"vc-bg-inset-strong": "#232427",
|
|
47
|
-
"vc-bg-field": "#161922",
|
|
48
|
-
"vc-bg-muted": "#232427",
|
|
49
|
-
"vc-bg-overlay": "#000000B3",
|
|
50
|
-
"vc-action-primary": "#E50A3B",
|
|
51
|
-
"vc-onfill": "#FFFFFF",
|
|
52
|
-
"vc-onfill-primary": "#FFFFFF",
|
|
53
|
-
"vc-action-info": "#2268DE",
|
|
54
|
-
"vc-action-success": "#007A45",
|
|
55
|
-
"vc-content-success": "#00B96B",
|
|
56
|
-
"vc-content-warning": "#D66527",
|
|
57
|
-
"vc-action-warning": "#A25600",
|
|
58
|
-
"vc-onfill-warning": "#FFFFFF",
|
|
59
|
-
"vc-action-danger": "#934A5A",
|
|
60
|
-
"vc-action-secondary": "#5A7189",
|
|
61
|
-
"vc-border": "#282C32",
|
|
62
|
-
"vc-border-strong": "#333841",
|
|
63
|
-
"vc-input": "#333841",
|
|
64
|
-
"vc-ring": "#2268DE",
|
|
65
|
-
"vc-mix-anchor": "#000000",
|
|
66
|
-
"vc-mix-anchor-primary": "#000000",
|
|
67
|
-
"vc-mix-anchor-warning": "#000000",
|
|
68
|
-
"vc-shadow-color": "#000000",
|
|
69
|
-
"vc-content-danger": "#FF9BAD",
|
|
70
|
-
"vc-content-info": "#6293FF"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"voicenter": {
|
|
3
|
+
"vc-content-primary": "#161922",
|
|
4
|
+
"vc-content-secondary": "#525D70",
|
|
5
|
+
"vc-content-tertiary": "#567391",
|
|
6
|
+
"vc-content-brand": "#C20027",
|
|
7
|
+
"vc-content-disabled": "#A6B0C0",
|
|
8
|
+
"vc-bg-page": "#F8F9FB",
|
|
9
|
+
"vc-bg-surface": "#FFFFFF",
|
|
10
|
+
"vc-bg-inset": "#F8F9FB",
|
|
11
|
+
"vc-bg-inset-strong": "#EEF1F4",
|
|
12
|
+
"vc-bg-field": "#FFFFFF",
|
|
13
|
+
"vc-bg-muted": "#EEF1F4",
|
|
14
|
+
"vc-bg-overlay": "#16192280",
|
|
15
|
+
"vc-action-primary": "#E80130",
|
|
16
|
+
"vc-onfill": "#FFFFFF",
|
|
17
|
+
"vc-onfill-primary": "#FFFFFF",
|
|
18
|
+
"vc-action-info": "#2759DA",
|
|
19
|
+
"vc-action-success": "#007D47",
|
|
20
|
+
"vc-content-success": "#007D47",
|
|
21
|
+
"vc-content-warning": "#BF5001",
|
|
22
|
+
"vc-action-warning": "#FEC635",
|
|
23
|
+
"vc-onfill-warning": "#161922",
|
|
24
|
+
"vc-action-danger": "#750830",
|
|
25
|
+
"vc-action-secondary": "#4A607A",
|
|
26
|
+
"vc-border": "#E2E6EE",
|
|
27
|
+
"vc-border-strong": "#CDD4E0",
|
|
28
|
+
"vc-input": "#CDD4E0",
|
|
29
|
+
"vc-ring": "#4087FF",
|
|
30
|
+
"vc-mix-anchor": "#000000",
|
|
31
|
+
"vc-mix-anchor-primary": "#000000",
|
|
32
|
+
"vc-mix-anchor-warning": "#000000",
|
|
33
|
+
"vc-shadow-color": "#161922",
|
|
34
|
+
"vc-content-danger": "#750830",
|
|
35
|
+
"vc-content-info": "#2759DA"
|
|
36
|
+
},
|
|
37
|
+
"voicenterDark": {
|
|
38
|
+
"vc-content-primary": "#E2ECF7",
|
|
39
|
+
"vc-content-secondary": "#93A0B5",
|
|
40
|
+
"vc-content-tertiary": "#6D8AAA",
|
|
41
|
+
"vc-content-brand": "#FF6B6A",
|
|
42
|
+
"vc-content-disabled": "#48515F",
|
|
43
|
+
"vc-bg-page": "#0E1015",
|
|
44
|
+
"vc-bg-surface": "#161922",
|
|
45
|
+
"vc-bg-inset": "#0E1015",
|
|
46
|
+
"vc-bg-inset-strong": "#232427",
|
|
47
|
+
"vc-bg-field": "#161922",
|
|
48
|
+
"vc-bg-muted": "#232427",
|
|
49
|
+
"vc-bg-overlay": "#000000B3",
|
|
50
|
+
"vc-action-primary": "#E50A3B",
|
|
51
|
+
"vc-onfill": "#FFFFFF",
|
|
52
|
+
"vc-onfill-primary": "#FFFFFF",
|
|
53
|
+
"vc-action-info": "#2268DE",
|
|
54
|
+
"vc-action-success": "#007A45",
|
|
55
|
+
"vc-content-success": "#00B96B",
|
|
56
|
+
"vc-content-warning": "#D66527",
|
|
57
|
+
"vc-action-warning": "#A25600",
|
|
58
|
+
"vc-onfill-warning": "#FFFFFF",
|
|
59
|
+
"vc-action-danger": "#934A5A",
|
|
60
|
+
"vc-action-secondary": "#5A7189",
|
|
61
|
+
"vc-border": "#282C32",
|
|
62
|
+
"vc-border-strong": "#333841",
|
|
63
|
+
"vc-input": "#333841",
|
|
64
|
+
"vc-ring": "#2268DE",
|
|
65
|
+
"vc-mix-anchor": "#000000",
|
|
66
|
+
"vc-mix-anchor-primary": "#000000",
|
|
67
|
+
"vc-mix-anchor-warning": "#000000",
|
|
68
|
+
"vc-shadow-color": "#000000",
|
|
69
|
+
"vc-content-danger": "#FF9BAD",
|
|
70
|
+
"vc-content-info": "#6293FF"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
73
|
;
|
|
74
74
|
|
|
75
75
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
|
-
import { VcCollapseProvideType, VcTabPaneProvideType, VcTabsProvideType, VcSoundPlayerProvideType, VcJsonViewerProvideType } from '../types';
|
|
2
|
+
import { VcCollapseProvideType, VcTabPaneProvideType, VcTabsProvideType, VcSoundPlayerProvideType, VcJsonViewerProvideType, VcFilterOptionsStore } from '../types';
|
|
3
3
|
export declare const VcCollapseProvideKey: InjectionKey<VcCollapseProvideType>;
|
|
4
4
|
export declare const VcTabsProvideKey: InjectionKey<VcTabsProvideType>;
|
|
5
5
|
export declare const VcTabPaneProvideKey: InjectionKey<VcTabPaneProvideType>;
|
|
@@ -8,3 +8,4 @@ export declare const VcJsonViewerProvideKey: InjectionKey<VcJsonViewerProvideTyp
|
|
|
8
8
|
export declare const VcEntityToken: symbol;
|
|
9
9
|
export declare const VcEditableTabsDataToken: symbol;
|
|
10
10
|
export declare const VcEntityListTableExternalPaginateToken: symbol;
|
|
11
|
+
export declare const VcFilterOptionsStoreKey: InjectionKey<VcFilterOptionsStore>;
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { TIcon } from './icons.types';
|
|
3
|
+
import type { VcTimeInputFormat } from './VcTimeInput.types';
|
|
4
|
+
/**
|
|
5
|
+
* @description The value of a filter bar: a plain object, sent to the server as it is.
|
|
6
|
+
* Empty values (`[]`, `null`, `undefined`, `''`) are left out; `false` and `0` are values.
|
|
7
|
+
*/
|
|
8
|
+
export type VcFilterModel = Record<string, unknown>;
|
|
9
|
+
/** @description Which side of the filter a value is on: calls that match it, or calls that do not. */
|
|
10
|
+
export type VcFilterMode = 'include' | 'exclude';
|
|
11
|
+
export type VcFilterFieldKind = 'multiselect' | 'range' | 'text' | 'textList' | 'boolean' | 'select' | 'custom';
|
|
12
|
+
/** @description A single value of a list field: an entity id or a fixed key. */
|
|
13
|
+
export type VcFilterListItem = string | number;
|
|
14
|
+
export interface VcFilterRangeValue {
|
|
15
|
+
from: number | null;
|
|
16
|
+
to: number | null;
|
|
17
|
+
}
|
|
18
|
+
/** @description The keys of a custom field and their values, as they are in the model. */
|
|
19
|
+
export type VcFilterCustomValue = Record<string, unknown>;
|
|
20
|
+
/** @description The value of one field on one side, by the kind of the field. */
|
|
21
|
+
export interface VcFilterValueByKind {
|
|
22
|
+
multiselect: Array<VcFilterListItem>;
|
|
23
|
+
textList: Array<VcFilterListItem>;
|
|
24
|
+
range: VcFilterRangeValue;
|
|
25
|
+
text: string;
|
|
26
|
+
boolean: boolean;
|
|
27
|
+
select: VcFilterListItem;
|
|
28
|
+
custom: VcFilterCustomValue;
|
|
29
|
+
}
|
|
30
|
+
export type VcFilterFieldValue = VcFilterValueByKind[VcFilterFieldKind];
|
|
31
|
+
/**
|
|
32
|
+
* @description Where the excluded values of a field go.
|
|
33
|
+
* `true` puts them under the same keys inside the bar's exclude object (`Exclude.UserList`).
|
|
34
|
+
* An object names the keys at the top of the model instead, for an API that keeps exclusions flat.
|
|
35
|
+
*/
|
|
36
|
+
export type VcFilterExcludeConfig = boolean | {
|
|
37
|
+
valueKey: string | Array<string>;
|
|
38
|
+
};
|
|
39
|
+
interface VcFilterFieldBase {
|
|
40
|
+
/** @description Id of the field; also its model key when `valueKey` is not given. */
|
|
41
|
+
key: string;
|
|
42
|
+
label: string;
|
|
43
|
+
/** @description Heading the field is listed under in the Add filter menu. */
|
|
44
|
+
group?: string;
|
|
45
|
+
icon?: TIcon;
|
|
46
|
+
/** @description Whether the field can switch to "is not". */
|
|
47
|
+
exclude?: VcFilterExcludeConfig;
|
|
48
|
+
/** @description `true`, or the reason, shown in the Add filter menu. */
|
|
49
|
+
disabled?: boolean | string;
|
|
50
|
+
/**
|
|
51
|
+
* @description The editor of the field, in place of the built-in one of its kind; the kind still decides
|
|
52
|
+
* how the value is read, written and compared. It follows the editor contract:
|
|
53
|
+
* the props of `VcFilterEditorProps` and the emits of `VcFilterEditorEmits`.
|
|
54
|
+
* A `#editor-<key>` slot of the bar takes precedence over it.
|
|
55
|
+
*/
|
|
56
|
+
editor?: Component;
|
|
57
|
+
/** @description Where the editor opens. Default: a popover. */
|
|
58
|
+
editorContainer?: VcFilterEditorContainer;
|
|
59
|
+
/** @description The chip text of a value, in place of the default text of the kind. */
|
|
60
|
+
formatValue?: (value: VcFilterFieldValue) => string;
|
|
61
|
+
}
|
|
62
|
+
export interface VcFilterEditorContainer {
|
|
63
|
+
in: 'popover' | 'modal';
|
|
64
|
+
width?: string | number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @description The props every filter editor gets: the built-in ones, an `editor` component and a `#editor-<key>` slot.
|
|
68
|
+
* `modelValue` is the editor's working copy; the bar writes it to its model when the editor closes.
|
|
69
|
+
*/
|
|
70
|
+
export interface VcFilterEditorProps<Value = VcFilterFieldValue> {
|
|
71
|
+
modelValue: Value | undefined;
|
|
72
|
+
field: VcFilterField;
|
|
73
|
+
mode: VcFilterMode;
|
|
74
|
+
/** @description Values the other side of a list field has, which this side cannot take. */
|
|
75
|
+
blocked: Array<VcFilterListItem>;
|
|
76
|
+
/**
|
|
77
|
+
* @description Values a list field already has on this side. In the Add filter menu the draft starts empty and
|
|
78
|
+
* these show as already added; Add filter puts the draft into the same chip.
|
|
79
|
+
*/
|
|
80
|
+
applied?: Array<VcFilterListItem>;
|
|
81
|
+
/** @description The server's error for this field and side. */
|
|
82
|
+
error?: string;
|
|
83
|
+
/** @description Values of a list field the login may not use (403 entity_not_permitted). */
|
|
84
|
+
refused?: Array<VcFilterListItem>;
|
|
85
|
+
}
|
|
86
|
+
/** @description The events of every filter editor: a new working copy, and a request to close (commits it). */
|
|
87
|
+
export interface VcFilterEditorEmits<Value = VcFilterFieldValue> {
|
|
88
|
+
(e: 'update:modelValue', value: Value | undefined): void;
|
|
89
|
+
(e: 'close'): void;
|
|
90
|
+
}
|
|
91
|
+
/** @description An option of a list: any object; the bar reads it through `optionConfig`. */
|
|
92
|
+
export type VcFilterOption = object;
|
|
93
|
+
export type VcFilterOptionsParams = Record<string, unknown>;
|
|
94
|
+
/**
|
|
95
|
+
* @description Where a list comes from. Lists with the same `id` and params share one cache entry,
|
|
96
|
+
* so the same list in the include and the exclude editor, or in a second filter on the same store,
|
|
97
|
+
* makes one request.
|
|
98
|
+
*/
|
|
99
|
+
export interface VcFilterOptionsSource {
|
|
100
|
+
/** @description The cache namespace, e.g. `users`. */
|
|
101
|
+
id: string;
|
|
102
|
+
load: (params: VcFilterOptionsParams) => Promise<Array<VcFilterOption>>;
|
|
103
|
+
/** @description How long a loaded list stays fresh, in milliseconds. Default: the store's. */
|
|
104
|
+
ttl?: number;
|
|
105
|
+
}
|
|
106
|
+
/** @description The keys of an option the bar reads. */
|
|
107
|
+
export interface VcFilterOptionConfig {
|
|
108
|
+
valueKey: string;
|
|
109
|
+
labelKey: string;
|
|
110
|
+
/** @description A number shown at the right of the option, e.g. the calls in the period. */
|
|
111
|
+
countKey?: string;
|
|
112
|
+
disabledKey?: string;
|
|
113
|
+
/** @description Why a disabled option cannot be picked. */
|
|
114
|
+
disabledHintKey?: string;
|
|
115
|
+
}
|
|
116
|
+
/** @description The state of one list in the store. */
|
|
117
|
+
export interface VcFilterOptionsEntry {
|
|
118
|
+
key: string;
|
|
119
|
+
sourceId: string;
|
|
120
|
+
params: VcFilterOptionsParams;
|
|
121
|
+
data: Array<VcFilterOption>;
|
|
122
|
+
loading: boolean;
|
|
123
|
+
/** @description Whether a load has finished with data at least once. */
|
|
124
|
+
loaded: boolean;
|
|
125
|
+
error: unknown;
|
|
126
|
+
/** @description Set when the login may not read the list: the field is disabled with this reason. */
|
|
127
|
+
deniedReason: string | undefined;
|
|
128
|
+
/** @description When the data (or the refusal) arrived, from the store's clock. */
|
|
129
|
+
loadedAt: number | undefined;
|
|
130
|
+
/** @description How many chips and editors use the list now. */
|
|
131
|
+
users: number;
|
|
132
|
+
}
|
|
133
|
+
export interface VcFilterOptionsStoreOptions {
|
|
134
|
+
/** @description How long a loaded list stays fresh, in milliseconds. Default 5 minutes. */
|
|
135
|
+
ttl?: number;
|
|
136
|
+
/** @description Drop a list as soon as no chip or editor uses it. The bar's own store does; a shared store keeps lists until their TTL. */
|
|
137
|
+
dropUnused?: boolean;
|
|
138
|
+
/** @description The clock, for tests. Default `Date.now`. */
|
|
139
|
+
now?: () => number;
|
|
140
|
+
}
|
|
141
|
+
export interface VcFilterOptionsStore {
|
|
142
|
+
/** @description Every list by its cache key; reactive. */
|
|
143
|
+
readonly entries: Readonly<Record<string, VcFilterOptionsEntry>>;
|
|
144
|
+
/** @description The list: from the cache while it is fresh, from a request already running, or from a new request. */
|
|
145
|
+
get: (source: VcFilterOptionsSource, params?: VcFilterOptionsParams) => Promise<Array<VcFilterOption>>;
|
|
146
|
+
/** @description The list from a new request, whatever the cache holds. */
|
|
147
|
+
refresh: (source: VcFilterOptionsSource, params?: VcFilterOptionsParams) => Promise<Array<VcFilterOption>>;
|
|
148
|
+
/** @description The state of a list, without loading it. */
|
|
149
|
+
peek: (source: VcFilterOptionsSource, params?: VcFilterOptionsParams) => VcFilterOptionsEntry | undefined;
|
|
150
|
+
/** @description Marks the list as used; the returned function marks it as no longer used. */
|
|
151
|
+
retain: (source: VcFilterOptionsSource, params?: VcFilterOptionsParams) => () => void;
|
|
152
|
+
clear: () => void;
|
|
153
|
+
}
|
|
154
|
+
export interface VcFilterMultiselectField extends VcFilterFieldBase {
|
|
155
|
+
kind: 'multiselect';
|
|
156
|
+
valueKey?: string;
|
|
157
|
+
maxValues?: number;
|
|
158
|
+
/** @description The options, or where they load from. */
|
|
159
|
+
options?: Array<VcFilterOption> | VcFilterOptionsSource;
|
|
160
|
+
/** @description The params of the loader; a function is read again each time. */
|
|
161
|
+
optionsParams?: VcFilterOptionsParams | (() => VcFilterOptionsParams);
|
|
162
|
+
optionConfig?: VcFilterOptionConfig;
|
|
163
|
+
/** @description The plural name, for "Search agents". */
|
|
164
|
+
plural?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface VcFilterTextListField extends VcFilterFieldBase {
|
|
167
|
+
kind: 'textList';
|
|
168
|
+
valueKey?: string;
|
|
169
|
+
maxValues?: number;
|
|
170
|
+
/** @description Each value must match it. */
|
|
171
|
+
pattern?: RegExp;
|
|
172
|
+
}
|
|
173
|
+
export interface VcFilterRangeField extends VcFilterFieldBase {
|
|
174
|
+
kind: 'range';
|
|
175
|
+
/** @description The model keys of the lower and the upper bound. */
|
|
176
|
+
valueKey: [string, string];
|
|
177
|
+
min?: number;
|
|
178
|
+
max?: number;
|
|
179
|
+
/** @description The text of one bound on the chip, e.g. seconds as 1:30. */
|
|
180
|
+
formatBound?: (bound: number) => string;
|
|
181
|
+
/**
|
|
182
|
+
* @description How a bound is typed: a number, or a duration in seconds with VcTimeInput.
|
|
183
|
+
* In a time range, 0 is no bound. Default `number`.
|
|
184
|
+
*/
|
|
185
|
+
input?: 'number' | 'time';
|
|
186
|
+
/** @description The units of a time range's inputs. Default `mm:ss`. */
|
|
187
|
+
timeFormat?: VcTimeInputFormat;
|
|
188
|
+
/** @description The step of the inputs' arrows. */
|
|
189
|
+
step?: number;
|
|
190
|
+
}
|
|
191
|
+
export interface VcFilterTextField extends VcFilterFieldBase {
|
|
192
|
+
kind: 'text';
|
|
193
|
+
valueKey?: string;
|
|
194
|
+
minLength?: number;
|
|
195
|
+
maxLength?: number;
|
|
196
|
+
pattern?: RegExp;
|
|
197
|
+
}
|
|
198
|
+
export interface VcFilterBooleanField extends VcFilterFieldBase {
|
|
199
|
+
kind: 'boolean';
|
|
200
|
+
valueKey?: string;
|
|
201
|
+
}
|
|
202
|
+
export interface VcFilterSelectField extends VcFilterFieldBase {
|
|
203
|
+
kind: 'select';
|
|
204
|
+
valueKey?: string;
|
|
205
|
+
options?: Array<VcFilterOption> | VcFilterOptionsSource;
|
|
206
|
+
optionsParams?: VcFilterOptionsParams | (() => VcFilterOptionsParams);
|
|
207
|
+
optionConfig?: VcFilterOptionConfig;
|
|
208
|
+
}
|
|
209
|
+
export interface VcFilterCustomField extends VcFilterFieldBase {
|
|
210
|
+
kind: 'custom';
|
|
211
|
+
/** @description The model keys the field owns; its editor gets and returns them as one object. */
|
|
212
|
+
valueKey: string | Array<string>;
|
|
213
|
+
/** @description Whether the value filters nothing, so the field has no chip. By default: every key is empty. */
|
|
214
|
+
isEmpty?: (value: VcFilterCustomValue) => boolean;
|
|
215
|
+
/** @description The chip text. */
|
|
216
|
+
summary?: (value: VcFilterCustomValue) => string;
|
|
217
|
+
/** @description Whether two values filter the same. By default: equal deeply, empty keys left out. */
|
|
218
|
+
isSame?: (a: VcFilterCustomValue, b: VcFilterCustomValue) => boolean;
|
|
219
|
+
/**
|
|
220
|
+
* @description How a value added through Add filter joins the value the field already has on that side,
|
|
221
|
+
* e.g. appending condition rows. By default the added value replaces it.
|
|
222
|
+
*/
|
|
223
|
+
merge?: (current: VcFilterCustomValue, added: VcFilterCustomValue) => VcFilterCustomValue;
|
|
224
|
+
}
|
|
225
|
+
export type VcFilterField = VcFilterMultiselectField | VcFilterTextListField | VcFilterRangeField | VcFilterTextField | VcFilterBooleanField | VcFilterSelectField | VcFilterCustomField;
|
|
226
|
+
export interface VcFilterModelOptions {
|
|
227
|
+
/** @description The model key of the exclude object. Default `Exclude`. */
|
|
228
|
+
excludeKey?: string;
|
|
229
|
+
}
|
|
230
|
+
/** @description One applied field on one side: a chip. */
|
|
231
|
+
export interface VcFilterApplied<Value = VcFilterFieldValue> {
|
|
232
|
+
/** @description `<field key>:<mode>`, unique in the bar. */
|
|
233
|
+
id: string;
|
|
234
|
+
field: VcFilterField;
|
|
235
|
+
mode: VcFilterMode;
|
|
236
|
+
value: Value;
|
|
237
|
+
}
|
|
238
|
+
/** @description A value that is on both sides of a field. */
|
|
239
|
+
export interface VcFilterOverlap {
|
|
240
|
+
field: VcFilterField;
|
|
241
|
+
values: Array<VcFilterListItem>;
|
|
242
|
+
}
|
|
243
|
+
/** @description A control shown beside the search line while a target matches, e.g. which side of the call a number is on. */
|
|
244
|
+
export interface VcFilterSearchLinked {
|
|
245
|
+
valueKey: string;
|
|
246
|
+
options: Array<{
|
|
247
|
+
value: VcFilterListItem;
|
|
248
|
+
label: string;
|
|
249
|
+
}>;
|
|
250
|
+
/** @description The value while the user has not picked one. */
|
|
251
|
+
default: VcFilterListItem;
|
|
252
|
+
/** @description Leave the key out of the model while it holds the default. */
|
|
253
|
+
omitDefault?: boolean;
|
|
254
|
+
icon?: TIcon;
|
|
255
|
+
/** @description The accessible name of the control. */
|
|
256
|
+
label?: string;
|
|
257
|
+
}
|
|
258
|
+
/** @description Where the text typed in the search line goes. The first target that matches the text takes it. */
|
|
259
|
+
export interface VcFilterSearchTarget {
|
|
260
|
+
/** @description The model key (`set`), or the key of the list field the text is added to (`append`). */
|
|
261
|
+
valueKey: string;
|
|
262
|
+
/** @description Whether the text is for this target. Default: any text. */
|
|
263
|
+
match?: (text: string) => boolean;
|
|
264
|
+
/** @description The text as the model keeps it, e.g. without spaces and dashes. */
|
|
265
|
+
normalize?: (text: string) => string;
|
|
266
|
+
/**
|
|
267
|
+
* @description `set`: the text is the key's value while it is typed.
|
|
268
|
+
* `append`: Enter adds the text to the list field and its chip, and empties the search line.
|
|
269
|
+
*/
|
|
270
|
+
mode?: 'set' | 'append';
|
|
271
|
+
/** @description The name of the target in the picker, e.g. "Caller". */
|
|
272
|
+
label?: string;
|
|
273
|
+
/** @description A word shown beside the search line while this target matches, e.g. "Call ID". */
|
|
274
|
+
tag?: string;
|
|
275
|
+
/** @description A sentence shown beside the search line while this target matches. */
|
|
276
|
+
hint?: string;
|
|
277
|
+
linked?: VcFilterSearchLinked;
|
|
278
|
+
}
|
|
279
|
+
export interface VcFilterSearchConfig {
|
|
280
|
+
placeholder?: string;
|
|
281
|
+
/** @description Milliseconds without typing before a `set` target is written. Default 400. Enter writes at once. */
|
|
282
|
+
debounce?: number;
|
|
283
|
+
targets: Array<VcFilterSearchTarget>;
|
|
284
|
+
/** @description Shown beside the search line when the text matches no target. */
|
|
285
|
+
noMatchHint?: string;
|
|
286
|
+
/**
|
|
287
|
+
* @description A select beside the search line, of the targets by `label`: the text goes to the one the user
|
|
288
|
+
* picks, or, while none is picked, to the first that matches it.
|
|
289
|
+
*/
|
|
290
|
+
picker?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* @description The text is for the page only, e.g. to search rows it already has: the bar writes nothing to
|
|
293
|
+
* the model and emits `search` with the text (after the debounce, at once on Enter and when cleared).
|
|
294
|
+
*/
|
|
295
|
+
local?: boolean;
|
|
296
|
+
}
|
|
297
|
+
export type VcFilterDateValueFormat = 'date' | 'datetime' | 'unix';
|
|
298
|
+
export interface VcFilterDateRangeConfig {
|
|
299
|
+
/** @description Default `StartTime`. */
|
|
300
|
+
startKey?: string;
|
|
301
|
+
/** @description Default `EndTime`. */
|
|
302
|
+
endKey?: string;
|
|
303
|
+
/**
|
|
304
|
+
* @description How the model keeps the bounds. `date`: `2026-11-01`. `datetime`: a local date-time
|
|
305
|
+
* without offset, `2026-11-01T00:00:00`, the end at 23:59:59. `unix`: seconds. Default `date`.
|
|
306
|
+
*/
|
|
307
|
+
valueFormat?: VcFilterDateValueFormat;
|
|
308
|
+
shortcuts?: Array<{
|
|
309
|
+
text: string;
|
|
310
|
+
value: [Date, Date] | (() => [Date, Date]);
|
|
311
|
+
}>;
|
|
312
|
+
/** @description Whether the range can be emptied. Default `false`: a search always has a period. */
|
|
313
|
+
clearable?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* @description What the user picks: whole days (the start at 00:00:00, the end at 23:59:59), or days
|
|
316
|
+
* and times, kept as picked. Default `date`.
|
|
317
|
+
*/
|
|
318
|
+
picker?: 'date' | 'datetime';
|
|
319
|
+
/** @description How the picker shows dates. Default `D MMM YYYY`, or `D MMM YYYY, HH:mm` with `picker: 'datetime'`. */
|
|
320
|
+
format?: string;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @description Server errors by the path they name: a field (`UserList`, `Exclude.UserList`,
|
|
324
|
+
* `LabelConditions[0].Value`), the date range or the search keys, or anything else.
|
|
325
|
+
*/
|
|
326
|
+
export type VcFilterErrors = Record<string, string>;
|
|
327
|
+
/** @description Values the login may not use, by the path of their field and side (`UserList`, `Exclude.QueueList`). */
|
|
328
|
+
export type VcFilterRefusedValues = Record<string, Array<VcFilterListItem>>;
|
|
329
|
+
export {};
|
|
@@ -58,6 +58,8 @@ export * from './VcApprovalCard.types';
|
|
|
58
58
|
export * from './VcAskUserCard.types';
|
|
59
59
|
export * from './VcAgentRun.types';
|
|
60
60
|
export * from './VcPdfViewer.types';
|
|
61
|
+
export * from './VcFilterBar.types';
|
|
62
|
+
export * from './VcTimeInput.types';
|
|
61
63
|
export * from './Entity.basic.types';
|
|
62
64
|
export * from './Entity.types';
|
|
63
65
|
export * from './Tabs';
|
|
Binary file
|