@voicenter-team/voicenter-ui-plus 4.0.0-beta.6 → 4.0.0-beta.8

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.
Files changed (93) hide show
  1. package/README.md +4 -1
  2. package/library/assets/components/VcFilterBar/VcFilterAddMenu.css +1 -0
  3. package/library/assets/components/VcFilterBar/VcFilterBar.css +1 -0
  4. package/library/assets/components/VcFilterBar/VcFilterChip.css +1 -0
  5. package/library/assets/components/VcFilterBar/VcFilterChipEditor.css +1 -0
  6. package/library/assets/components/VcFilterBar/VcFilterEditorModal.css +1 -0
  7. package/library/assets/components/VcFilterBar/VcFilterEditorPanel.css +1 -0
  8. package/library/assets/components/VcFilterBar/editors/VcFilterBooleanEditor.css +1 -0
  9. package/library/assets/components/VcFilterBar/editors/VcFilterMultiselectEditor.css +1 -0
  10. package/library/assets/components/VcFilterBar/editors/VcFilterRangeEditor.css +1 -0
  11. package/library/assets/components/VcFilterBar/editors/VcFilterSelectEditor.css +1 -0
  12. package/library/assets/components/VcFilterBar/editors/VcFilterTextEditor.css +1 -0
  13. package/library/assets/components/VcFilterBar/editors/VcFilterTextListEditor.css +1 -0
  14. package/library/assets/components/VcTimeInput/VcTimeInput.css +1 -1
  15. package/library/components/VcFilterBar/VcFilterAddMenu.vue.mjs +380 -0
  16. package/library/components/VcFilterBar/VcFilterAddMenu.vue3.mjs +5 -0
  17. package/library/components/VcFilterBar/VcFilterBar.vue.mjs +469 -0
  18. package/library/components/VcFilterBar/VcFilterBar.vue3.mjs +5 -0
  19. package/library/components/VcFilterBar/VcFilterChip.vue.mjs +136 -0
  20. package/library/components/VcFilterBar/VcFilterChip.vue3.mjs +5 -0
  21. package/library/components/VcFilterBar/VcFilterChipEditor.vue.mjs +133 -0
  22. package/library/components/VcFilterBar/VcFilterChipEditor.vue3.mjs +5 -0
  23. package/library/components/VcFilterBar/VcFilterEditorModal.vue.mjs +90 -0
  24. package/library/components/VcFilterBar/VcFilterEditorModal.vue3.mjs +5 -0
  25. package/library/components/VcFilterBar/VcFilterEditorPanel.vue.mjs +179 -0
  26. package/library/components/VcFilterBar/VcFilterEditorPanel.vue3.mjs +5 -0
  27. package/library/components/VcFilterBar/editors/VcFilterBooleanEditor.vue.mjs +62 -0
  28. package/library/components/VcFilterBar/editors/VcFilterBooleanEditor.vue3.mjs +5 -0
  29. package/library/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue.mjs +199 -0
  30. package/library/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue3.mjs +5 -0
  31. package/library/components/VcFilterBar/editors/VcFilterRangeEditor.vue.mjs +124 -0
  32. package/library/components/VcFilterBar/editors/VcFilterRangeEditor.vue3.mjs +5 -0
  33. package/library/components/VcFilterBar/editors/VcFilterSelectEditor.vue.mjs +96 -0
  34. package/library/components/VcFilterBar/editors/VcFilterSelectEditor.vue3.mjs +5 -0
  35. package/library/components/VcFilterBar/editors/VcFilterTextEditor.vue.mjs +58 -0
  36. package/library/components/VcFilterBar/editors/VcFilterTextEditor.vue3.mjs +5 -0
  37. package/library/components/VcFilterBar/editors/VcFilterTextListEditor.vue.mjs +155 -0
  38. package/library/components/VcFilterBar/editors/VcFilterTextListEditor.vue3.mjs +5 -0
  39. package/library/components/VcFilterBar/filterBarChip.mjs +59 -0
  40. package/library/components/VcFilterBar/filterBarDate.mjs +69 -0
  41. package/library/components/VcFilterBar/filterBarDraft.mjs +86 -0
  42. package/library/components/VcFilterBar/filterBarEditors.mjs +36 -0
  43. package/library/components/VcFilterBar/filterBarErrors.mjs +57 -0
  44. package/library/components/VcFilterBar/filterBarModel.mjs +378 -0
  45. package/library/components/VcFilterBar/filterBarOptions.mjs +253 -0
  46. package/library/components/VcFilterBar/filterBarSearch.mjs +89 -0
  47. package/library/components/VcFilterBar/filterBarValidate.mjs +99 -0
  48. package/library/components/VcTimeInput/VcTimeInput.vue.mjs +178 -36
  49. package/library/index.mjs +227 -162
  50. package/library/index.mjs.br +0 -0
  51. package/library/index.mjs.gz +0 -0
  52. package/library/localization/locales/en.json.mjs +51 -1
  53. package/library/plugin-components.gen.mjs +125 -122
  54. package/library/plugin.mjs +225 -160
  55. package/library/plugin.mjs.br +0 -0
  56. package/library/plugin.mjs.gz +0 -0
  57. package/library/style.css +25 -1
  58. package/library/style.css.br +0 -0
  59. package/library/style.css.gz +0 -0
  60. package/library/tokens/tokens.mjs +2 -0
  61. package/library/types/components/VcFilterBar/VcFilterAddMenu.vue.d.ts +39 -0
  62. package/library/types/components/VcFilterBar/VcFilterBar.vue.d.ts +132 -0
  63. package/library/types/components/VcFilterBar/VcFilterChip.vue.d.ts +42 -0
  64. package/library/types/components/VcFilterBar/VcFilterChipEditor.vue.d.ts +46 -0
  65. package/library/types/components/VcFilterBar/VcFilterEditorModal.vue.d.ts +40 -0
  66. package/library/types/components/VcFilterBar/VcFilterEditorPanel.vue.d.ts +116 -0
  67. package/library/types/components/VcFilterBar/editors/VcFilterBooleanEditor.vue.d.ts +66 -0
  68. package/library/types/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue.d.ts +73 -0
  69. package/library/types/components/VcFilterBar/editors/VcFilterRangeEditor.vue.d.ts +62 -0
  70. package/library/types/components/VcFilterBar/editors/VcFilterSelectEditor.vue.d.ts +62 -0
  71. package/library/types/components/VcFilterBar/editors/VcFilterTextEditor.vue.d.ts +68 -0
  72. package/library/types/components/VcFilterBar/editors/VcFilterTextListEditor.vue.d.ts +64 -0
  73. package/library/types/components/VcFilterBar/filterBarChip.d.ts +23 -0
  74. package/library/types/components/VcFilterBar/filterBarDate.d.ts +14 -0
  75. package/library/types/components/VcFilterBar/filterBarDraft.d.ts +28 -0
  76. package/library/types/components/VcFilterBar/filterBarEditors.d.ts +7 -0
  77. package/library/types/components/VcFilterBar/filterBarErrors.d.ts +22 -0
  78. package/library/types/components/VcFilterBar/filterBarModel.d.ts +83 -0
  79. package/library/types/components/VcFilterBar/filterBarOptions.d.ts +52 -0
  80. package/library/types/components/VcFilterBar/filterBarSearch.d.ts +23 -0
  81. package/library/types/components/VcFilterBar/filterBarValidate.d.ts +34 -0
  82. package/library/types/components/VcJsonSchema/Components/JsonSchemaEditor.vue.d.ts +1 -1
  83. package/library/types/components/VcTimeInput/VcTimeInput.vue.d.ts +29 -6
  84. package/library/types/components/exports.d.ts +3 -1
  85. package/library/types/components.gen.d.ts +1 -0
  86. package/library/types/entity/components/Table/VcEntityListTable.vue.d.ts +3 -3
  87. package/library/types/index.d.ts +8 -0
  88. package/library/types/localization/locales/en.json.d.ts +51 -1
  89. package/library/types/tokens/tokens.d.ts +2 -1
  90. package/library/types/types/VcFilterBar.types.d.ts +329 -0
  91. package/library/types/types/VcTimeInput.types.d.ts +3 -0
  92. package/library/types/types/index.d.ts +2 -0
  93. package/package.json +1 -1
@@ -1,11 +1,16 @@
1
1
  import { IVcBaseInputProps } from '../../composables/input/useInputBase';
2
+ import type { VcTimeInputFormat } from '../../types';
2
3
  type TimeSettingsType = {
3
4
  hours: string;
4
5
  minutes: string;
5
6
  seconds: string;
6
7
  };
7
8
  interface ITimeInputProps extends IVcBaseInputProps {
8
- modelValue?: number;
9
+ /**
10
+ * @description Time in seconds. Without `clearable`, `undefined` and `null` show as 0;
11
+ * with it, they are the empty field.
12
+ */
13
+ modelValue?: number | null;
9
14
  step?: number;
10
15
  minValue?: number;
11
16
  maxValue?: number;
@@ -14,6 +19,16 @@ interface ITimeInputProps extends IVcBaseInputProps {
14
19
  emptyDataText?: string;
15
20
  placeholder?: string;
16
21
  allowMouseWheel?: boolean;
22
+ /**
23
+ * @description Lets the field be empty: an empty model (`undefined` or `null`) shows the
24
+ * placeholder instead of 0, and a clear button empties the field and emits `undefined`
25
+ */
26
+ clearable?: boolean;
27
+ /**
28
+ * @description Which units the input shows. The model is always seconds; the first unit has no
29
+ * upper limit (`mm:ss` shows 90:00), the ones after it go up to 59. Default `hh:mm:ss`.
30
+ */
31
+ format?: VcTimeInputFormat;
17
32
  }
18
33
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ITimeInputProps>, {
19
34
  id: undefined;
@@ -26,16 +41,19 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
26
41
  placeholder: string;
27
42
  dataTestName: string;
28
43
  allowMouseWheel: boolean;
44
+ clearable: boolean;
45
+ format: string;
29
46
  disabled: boolean;
30
47
  isError: boolean;
31
48
  name: undefined;
32
49
  color: string;
33
50
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
51
  input: (val: {
35
- seconds: number;
52
+ seconds: number | undefined;
36
53
  string: TimeSettingsType;
37
54
  }) => void;
38
- "update:modelValue": (seconds: number) => void;
55
+ "update:modelValue": (seconds: number | undefined) => void;
56
+ clear: () => void;
39
57
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ITimeInputProps>, {
40
58
  id: undefined;
41
59
  modelValue: undefined;
@@ -47,25 +65,30 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
47
65
  placeholder: string;
48
66
  dataTestName: string;
49
67
  allowMouseWheel: boolean;
68
+ clearable: boolean;
69
+ format: string;
50
70
  disabled: boolean;
51
71
  isError: boolean;
52
72
  name: undefined;
53
73
  color: string;
54
74
  }>>> & Readonly<{
55
- "onUpdate:modelValue"?: ((seconds: number) => any) | undefined;
75
+ "onUpdate:modelValue"?: ((seconds: number | undefined) => any) | undefined;
56
76
  onInput?: ((val: {
57
- seconds: number;
77
+ seconds: number | undefined;
58
78
  string: TimeSettingsType;
59
79
  }) => any) | undefined;
80
+ onClear?: (() => any) | undefined;
60
81
  }>, {
61
82
  id: string;
62
83
  disabled: boolean;
84
+ clearable: boolean;
63
85
  isError: boolean;
64
- modelValue: number;
86
+ modelValue: number | null;
65
87
  dataTestName: string;
66
88
  name: string;
67
89
  placeholder: string;
68
90
  color: "" | "success" | "info" | "warning" | "primary" | "secondary" | "destructive";
91
+ format: VcTimeInputFormat;
69
92
  step: number;
70
93
  emptyDataText: string;
71
94
  minValue: number;
@@ -61,6 +61,7 @@ import VcBadgeTag from './VcBadgeTag/VcBadgeTag.vue';
61
61
  import VcDelimitedList from './VcDelimitedList/VcDelimitedList.vue';
62
62
  import VcSparkline from './VcSparkline/VcSparkline.vue';
63
63
  import VcSegmented from './VcSegmented/VcSegmented.vue';
64
+ import VcFilterBar from './VcFilterBar/VcFilterBar.vue';
64
65
  import VcLoading from './VcLoading/VcLoading.vue';
65
66
  import VcProgress from './VcProgress/VcProgress.vue';
66
67
  import VcProgressCircular from './VcProgress/VcProgressCircular.vue';
@@ -123,7 +124,7 @@ import VcBaseVerticalForm from '../entity/components/Form/VcBaseVerticalForm.vue
123
124
  import VcEntityVerticalCreateForm from '../entity/components/Form/VcEntityVerticalCreateForm.vue';
124
125
  import VcEntityVerticalEditForm from '../entity/components/Form/VcEntityVerticalEditForm.vue';
125
126
  import VcEntityEditPageForm from '../entity/components/Form/VcEntityEditPageForm.vue';
126
- export { VcButton, VcButtonIcon, VcToggleButton, VcInput, VcInputNumber, VcInputError, VcInputLabel, VcSelect, VcSelectGrouped, VcSelectOption, VcInfiniteScrollSelect, VcAutocomplete, VcCheckbox, VcCheckboxButton, VcCheckboxButtonGroup, VcCheckboxGroup, VcRadio, VcRadioGroup, VcRadioButtonsGroup, VcSwitch, VcSlider, VcColorPicker, VcDatePicker, VcDatePickerPanel, VcExtendedDatetimeRangePicker, VcTimeInput, VcPhoneInput, VcFlagLabel, VcTagInput, VcOtpInput, VcFileUploader, VcFileUploaderSimple, VcFileUploaderArea, VcFileItem, VcCard, VcCodeBlock, VcModal, VcConfirmModal, VcPopover, VcConfirmPopover, VcSelectPopover, VcTabs, VcTabNav, VcTabPane, VcVerticalTabs, VcRadioTabs, VcRadioTabsNav, VcCollapse, VcCollapseItem, VcWizard, VcDropdown, VcDropdownItem, VcTable, VcPagination, VcTree, VcTreeSelect, VcTransfer, VcTag, VcAvatar, VcBadgeTag, VcDelimitedList, VcSparkline, VcSegmented, VcLoading, VcProgress, VcProgressCircular, VcSkeletonLoader, VcNotification, VcPluginOverlays, VcForm, VcFormItem, VcSplitButton, VcHyperLink, VcIcon, VcIconPicker, VcMeterGroup, VcMeterGroupLabel, VcMdEditor, VcSystemUserPrompt, VcSoundPlayer, VcSoundPlayerCompact, VcJsonSchema, VcJsonViewer, VcMessage, VcMessagesWrapper, VcLightbox, VcToolCall, VcApprovalCard, VcAskUserCard, VcPlayerPlaybackRate, VcPlayerPlaybackRatePopup, VcPlayerPlayStopButton, VcPlayerSkipButtons, VcSoundCurrentTime, VcSoundDuration, VcSoundPlayerError, VcSoundPlayerMarker, VcSoundPlayerMarkers, VcSoundPlayerProgress, VcSoundPlayerWrapper, VcSoundVolume, VcHtmlEditor, VcPdfDocument, VcExcelFileUploader, VcImageUploader, VcTour, VcSipFlow, VcEmojiPicker, VcChatComposer, VcAiReasoning, VcAgentRunCard, VcAgentRunGroup, VcPdfViewer, VcEntityAddButton, VcEntityCancelButton, VcEntityDeleteIconButton, VcEntityEditIconButton, VcEntityRestoreButton, VcEntityStatusButton, VcEntityEditableTabs, VcEntityListTable, VcBaseVerticalForm, VcEntityVerticalCreateForm, VcEntityVerticalEditForm, VcEntityEditPageForm, };
127
+ export { VcButton, VcButtonIcon, VcToggleButton, VcInput, VcInputNumber, VcInputError, VcInputLabel, VcSelect, VcSelectGrouped, VcSelectOption, VcInfiniteScrollSelect, VcAutocomplete, VcCheckbox, VcCheckboxButton, VcCheckboxButtonGroup, VcCheckboxGroup, VcRadio, VcRadioGroup, VcRadioButtonsGroup, VcSwitch, VcSlider, VcColorPicker, VcDatePicker, VcDatePickerPanel, VcExtendedDatetimeRangePicker, VcTimeInput, VcPhoneInput, VcFlagLabel, VcTagInput, VcOtpInput, VcFileUploader, VcFileUploaderSimple, VcFileUploaderArea, VcFileItem, VcCard, VcCodeBlock, VcModal, VcConfirmModal, VcPopover, VcConfirmPopover, VcSelectPopover, VcTabs, VcTabNav, VcTabPane, VcVerticalTabs, VcRadioTabs, VcRadioTabsNav, VcCollapse, VcCollapseItem, VcWizard, VcDropdown, VcDropdownItem, VcTable, VcPagination, VcTree, VcTreeSelect, VcTransfer, VcTag, VcAvatar, VcBadgeTag, VcDelimitedList, VcSparkline, VcSegmented, VcFilterBar, VcLoading, VcProgress, VcProgressCircular, VcSkeletonLoader, VcNotification, VcPluginOverlays, VcForm, VcFormItem, VcSplitButton, VcHyperLink, VcIcon, VcIconPicker, VcMeterGroup, VcMeterGroupLabel, VcMdEditor, VcSystemUserPrompt, VcSoundPlayer, VcSoundPlayerCompact, VcJsonSchema, VcJsonViewer, VcMessage, VcMessagesWrapper, VcLightbox, VcToolCall, VcApprovalCard, VcAskUserCard, VcPlayerPlaybackRate, VcPlayerPlaybackRatePopup, VcPlayerPlayStopButton, VcPlayerSkipButtons, VcSoundCurrentTime, VcSoundDuration, VcSoundPlayerError, VcSoundPlayerMarker, VcSoundPlayerMarkers, VcSoundPlayerProgress, VcSoundPlayerWrapper, VcSoundVolume, VcHtmlEditor, VcPdfDocument, VcExcelFileUploader, VcImageUploader, VcTour, VcSipFlow, VcEmojiPicker, VcChatComposer, VcAiReasoning, VcAgentRunCard, VcAgentRunGroup, VcPdfViewer, VcEntityAddButton, VcEntityCancelButton, VcEntityDeleteIconButton, VcEntityEditIconButton, VcEntityRestoreButton, VcEntityStatusButton, VcEntityEditableTabs, VcEntityListTable, VcBaseVerticalForm, VcEntityVerticalCreateForm, VcEntityVerticalEditForm, VcEntityEditPageForm, };
127
128
  declare module '@vue/runtime-core' {
128
129
  interface GlobalComponents {
129
130
  VcButton: typeof VcButton;
@@ -189,6 +190,7 @@ declare module '@vue/runtime-core' {
189
190
  VcDelimitedList: typeof VcDelimitedList;
190
191
  VcSparkline: typeof VcSparkline;
191
192
  VcSegmented: typeof VcSegmented;
193
+ VcFilterBar: typeof VcFilterBar;
192
194
  VcLoading: typeof VcLoading;
193
195
  VcProgress: typeof VcProgress;
194
196
  VcProgressCircular: typeof VcProgressCircular;
@@ -61,6 +61,7 @@ export { default as VcBadgeTag } from './components/VcBadgeTag/VcBadgeTag.vue';
61
61
  export { default as VcDelimitedList } from './components/VcDelimitedList/VcDelimitedList.vue';
62
62
  export { default as VcSparkline } from './components/VcSparkline/VcSparkline.vue';
63
63
  export { default as VcSegmented } from './components/VcSegmented/VcSegmented.vue';
64
+ export { default as VcFilterBar } from './components/VcFilterBar/VcFilterBar.vue';
64
65
  export { default as VcLoading } from './components/VcLoading/VcLoading.vue';
65
66
  export { default as VcProgress } from './components/VcProgress/VcProgress.vue';
66
67
  export { default as VcProgressCircular } from './components/VcProgress/VcProgressCircular.vue';
@@ -7,8 +7,8 @@ declare const _default: <Data extends EntityListDataType>(__VLS_props: {
7
7
  readonly "onHandle-selection-change"?: ((payload: Data[]) => any) | undefined;
8
8
  columns: ColumnType<Data>;
9
9
  showSelection?: boolean | undefined;
10
- readonly onAdd?: (() => any) | undefined;
11
10
  readonly onEdit?: ((payload: Data) => any) | undefined;
11
+ readonly onAdd?: (() => any) | undefined;
12
12
  readonly "onUpdate:inputSearch"?: ((val: string) => any) | undefined;
13
13
  searchKeys?: string[] | undefined;
14
14
  showRecycleBinAction?: boolean | undefined;
@@ -52,8 +52,8 @@ declare const _default: <Data extends EntityListDataType>(__VLS_props: {
52
52
  readonly "onHandle-selection-change"?: ((payload: Data[]) => any) | undefined;
53
53
  columns: ColumnType<Data>;
54
54
  showSelection?: boolean | undefined;
55
- readonly onAdd?: (() => any) | undefined;
56
55
  readonly onEdit?: ((payload: Data) => any) | undefined;
56
+ readonly onAdd?: (() => any) | undefined;
57
57
  readonly "onUpdate:inputSearch"?: ((val: string) => any) | undefined;
58
58
  searchKeys?: string[] | undefined;
59
59
  showRecycleBinAction?: boolean | undefined;
@@ -101,8 +101,8 @@ declare const _default: <Data extends EntityListDataType>(__VLS_props: {
101
101
  readonly "onHandle-selection-change"?: ((payload: Data[]) => any) | undefined;
102
102
  columns: ColumnType<Data>;
103
103
  showSelection?: boolean | undefined;
104
- readonly onAdd?: (() => any) | undefined;
105
104
  readonly onEdit?: ((payload: Data) => any) | undefined;
105
+ readonly onAdd?: (() => any) | undefined;
106
106
  readonly "onUpdate:inputSearch"?: ((val: string) => any) | undefined;
107
107
  searchKeys?: string[] | undefined;
108
108
  showRecycleBinAction?: boolean | undefined;
@@ -33,4 +33,12 @@ export { useEntityListTableProvide, useEntityListTableInject } from './entity/co
33
33
  export { useTabsEditableDataProvide, useTabsEditableDataInject } from './entity/composable/useEntityTabsProvideInject';
34
34
  export { useEntityProvide, useEntityInject } from './entity/composable/useEntityProvideInject';
35
35
  export * from './components/VcSipFlow/sip-flow.options';
36
+ export * from './components/VcFilterBar/filterBarModel';
37
+ export * from './components/VcFilterBar/filterBarOptions';
38
+ export * from './components/VcFilterBar/filterBarSearch';
39
+ export * from './components/VcFilterBar/filterBarDate';
40
+ export * from './components/VcFilterBar/filterBarValidate';
41
+ export * from './components/VcFilterBar/filterBarErrors';
42
+ export { formatChipValue } from './components/VcFilterBar/filterBarChip';
43
+ export type { ChipText, ChipTextContext } from './components/VcFilterBar/filterBarChip';
36
44
  export type * from './components/exports';
@@ -361,7 +361,57 @@ declare const _default: {
361
361
  "voicenterUi.pdfViewer.loading": "Loading the document…",
362
362
  "voicenterUi.pdfViewer.loadError": "The document could not be loaded",
363
363
  "voicenterUi.pdfViewer.retry": "Try again",
364
- "voicenterUi.pdfViewer.empty": "No document to show"
364
+ "voicenterUi.pdfViewer.empty": "No document to show",
365
+ "voicenterUi.filterBar.label": "Filters",
366
+ "voicenterUi.filterBar.activeFilters": "Applied filters",
367
+ "voicenterUi.filterBar.addFilter": "Add filter",
368
+ "voicenterUi.filterBar.clear": "Clear",
369
+ "voicenterUi.filterBar.search": "Search",
370
+ "voicenterUi.filterBar.appliedOne": "1 filter applied",
371
+ "voicenterUi.filterBar.appliedMany": "{count} filters applied",
372
+ "voicenterUi.filterBar.showFilters": "Show applied filters",
373
+ "voicenterUi.filterBar.hideFilters": "Hide applied filters",
374
+ "voicenterUi.filterBar.editFilter": "Edit filter: {filter}",
375
+ "voicenterUi.filterBar.removeFilter": "Remove filter: {filter}",
376
+ "voicenterUi.filterBar.is": "{field} is {value}",
377
+ "voicenterUi.filterBar.isNot": "{field} is not {value}",
378
+ "voicenterUi.filterBar.excluded": "Excluded",
379
+ "voicenterUi.filterBar.yes": "Yes",
380
+ "voicenterUi.filterBar.no": "No",
381
+ "voicenterUi.filterBar.loading": "Loading…",
382
+ "voicenterUi.filterBar.dateFrom": "From",
383
+ "voicenterUi.filterBar.dateTo": "To",
384
+ "voicenterUi.filterBar.searchFilters": "Search filters",
385
+ "voicenterUi.filterBar.noFilterMatch": "No filter is called “{query}”.",
386
+ "voicenterUi.filterBar.back": "Back to all filters",
387
+ "voicenterUi.filterBar.include": "Include",
388
+ "voicenterUi.filterBar.exclude": "Exclude",
389
+ "voicenterUi.filterBar.excludePreview": "Exclude {value}",
390
+ "voicenterUi.filterBar.excludeNote": "Excluded values win, even when another filter includes them.",
391
+ "voicenterUi.filterBar.searchOptions": "Search {plural}",
392
+ "voicenterUi.filterBar.alreadyAdded": "Already added",
393
+ "voicenterUi.filterBar.alreadyIncluded": "Already included",
394
+ "voicenterUi.filterBar.alreadyExcluded": "Already excluded",
395
+ "voicenterUi.filterBar.noOptions": "Nothing to choose from.",
396
+ "voicenterUi.filterBar.noOptionsMatch": "Nothing matches that search.",
397
+ "voicenterUi.filterBar.noEditor": "This filter has no editor",
398
+ "voicenterUi.filterBar.loadFailed": "The list could not be loaded.",
399
+ "voicenterUi.filterBar.retry": "Try again",
400
+ "voicenterUi.filterBar.problem.tooShort": "At least {count} characters",
401
+ "voicenterUi.filterBar.problem.tooLong": "At most {count} characters",
402
+ "voicenterUi.filterBar.problem.pattern": "This is not a valid value",
403
+ "voicenterUi.filterBar.problem.tooMany": "Up to {count} values",
404
+ "voicenterUi.filterBar.problem.rangeOrder": "“From” is more than “To”, so nothing can match.",
405
+ "voicenterUi.filterBar.problem.belowMin": "At least {count}",
406
+ "voicenterUi.filterBar.problem.aboveMax": "At most {count}",
407
+ "voicenterUi.filterBar.done": "Done",
408
+ "voicenterUi.filterBar.any": "Any",
409
+ "voicenterUi.filterBar.alreadyAddedList": "Already added: {values}",
410
+ "voicenterUi.filterBar.removeValue": "Remove this value",
411
+ "voicenterUi.filterBar.wrongLeftOut": "Values in red are not valid or already added, and are left out.",
412
+ "voicenterUi.filterBar.notPermitted": "Not permitted",
413
+ "voicenterUi.filterBar.notPermittedList": "Not permitted: {values}",
414
+ "voicenterUi.filterBar.searchIn": "Search in"
365
415
  }
366
416
  ;
367
417
 
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ /** @description The units a VcTimeInput shows; its model is always seconds. */
2
+ export type VcTimeInputFormat = 'hh:mm:ss' | 'hh:mm' | 'mm:ss' | 'hh' | 'mm' | 'ss';
3
+ export type VcTimeInputUnit = 'hours' | 'minutes' | 'seconds';
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicenter-team/voicenter-ui-plus",
3
- "version": "4.0.0-beta.6",
3
+ "version": "4.0.0-beta.8",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",