@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
package/README.md CHANGED
@@ -640,7 +640,7 @@ The components draw Lucide icons (`@lucide/vue`) where 3.x drew the `vc-icon-*`
640
640
  - **The `actions` slot of `VcChatComposer` (3.4.8) is `toolbar-start`**, with the slot props `{ disabled, streaming }`; `toolbar-end` (new) sits right before Send / Stop.
641
641
  - **`VcMessagesWrapper`'s `scrollToMessage` takes options**, as in 3.4.8: `scrollToMessage(id, 'auto')` of 3.4.7 and earlier becomes `scrollToMessage(id, { behavior: 'auto' })`, and `block` and `offset` place the message. It scrolls only the wrapper, not the page, and the view stays on the message while the list grows below it.
642
642
  - **Exported types**: `VcFileItemProps` (with the new `errorText`), `VcChatComposerEmits`, and props / emits / slot-props / exposed interfaces of every new component.
643
- - **Localization**: the library ships only `en`. An application with another locale adds the keys new since 3.4.8 with `tVUManage.updateLocaleMessages`: `voicenterUi.jsonViewer.*`, `voicenterUi.aiChat.*`, `voicenterUi.lightbox.*`, `voicenterUi.aiReasoning.*`, `voicenterUi.toolCall.*`, `voicenterUi.approvalCard.*`, `voicenterUi.askUserCard.*`, `voicenterUi.agentRun.*`, `voicenterUi.agentRunGroup.*`, `voicenterUi.pdfViewer.*`, `voicenterUi.messagesWrapper.jumpToBottom`, `voicenterUi.message.download`, `voicenterUi.chatComposer.stop`, `voicenterUi.chatComposer.stopGenerating`, `voicenterUi.chatComposer.unsupportedFile`, `voicenterUi.fileItem.preview`, `voicenterUi.fileItem.remove` (English texts in `src/localization/locales/en.json`). An application on 3.4.7 or earlier also adds the keys of 3.4.8: `voicenterUi.message.video`, `voicenterUi.message.status.*`, `voicenterUi.messagesWrapper.newMessages`.
643
+ - **Localization**: the library ships only `en`. An application with another locale adds the keys new since 3.4.8 with `tVUManage.updateLocaleMessages`: `voicenterUi.jsonViewer.*`, `voicenterUi.aiChat.*`, `voicenterUi.lightbox.*`, `voicenterUi.aiReasoning.*`, `voicenterUi.toolCall.*`, `voicenterUi.approvalCard.*`, `voicenterUi.askUserCard.*`, `voicenterUi.agentRun.*`, `voicenterUi.agentRunGroup.*`, `voicenterUi.pdfViewer.*`, `voicenterUi.filterBar.*`, `voicenterUi.messagesWrapper.jumpToBottom`, `voicenterUi.message.download`, `voicenterUi.chatComposer.stop`, `voicenterUi.chatComposer.stopGenerating`, `voicenterUi.chatComposer.unsupportedFile`, `voicenterUi.fileItem.preview`, `voicenterUi.fileItem.remove` (English texts in `src/localization/locales/en.json`). An application on 3.4.7 or earlier also adds the keys of 3.4.8: `voicenterUi.message.video`, `voicenterUi.message.status.*`, `voicenterUi.messagesWrapper.newMessages`.
644
644
 
645
645
  Fixes in the components 3.x had:
646
646
 
@@ -672,6 +672,9 @@ Additions that ask nothing of an application (new components, props, theme keys
672
672
  | `4.0.0-beta.5` | `VcViewSwitcher` is removed; `VcSegmented` takes icons, disabled hints and the `surface` variant, its `change` passes `(value, option)`, and its `color` prop is removed | Every `<VcViewSwitcher>` becomes `<VcSegmented variant="surface">` by the list under **`VcViewSwitcher` is removed** ([AI chat components](#ai-chat-components)); a `@change` handler of an existing `VcSegmented` that read the earlier value as its second argument is updated, `color` is removed from every `<VcSegmented>`, and a style on `.el-segmented__item-selected` moves to `.el-segmented__item.is-selected` |
673
673
  | `4.0.0-beta.5` | `VcDatetimeRangePicker`, the step keys `beforeStepFn` and `onEnterStepFn` of `VcWizard`, and the types `BindResultObjectType`, `VcPresetRangesType` and `VcDatetimeRangePickerModelType` are removed | The application searches for these names (`grep -rnE "VcDatetimeRangePicker|vc-datetime-range-picker|beforeStepFn|onEnterStepFn|BindResultObjectType|VcPresetRangesType" src`) and replaces each hit by its row in **Styles and component defaults** ([Styles and component defaults](#styles-and-component-defaults)); a wizard step with the old keys otherwise skips its validation silently |
674
674
  | `4.0.0-beta.5` | The `columns` of `VcTable` are typed by the table's row: `ColumnType<Row>` | Nothing at runtime. Where `vue-tsc` reports the `columns` of a `<VcTable>`, the columns are declared as `ColumnType<Row>` with the type of the table's `options` ([Styles and component defaults](#styles-and-component-defaults)) |
675
+ | `4.0.0-beta.7` | `VcTimeInput` takes `clearable`, and its events are typed for the cleared field: `update:modelValue` passes `number \| undefined`, the `seconds` of `input` is `number \| undefined`, and `modelValue` accepts `null` | Nothing at runtime: without `clearable` the field emits numbers as before. Where `vue-tsc` reports a `@update:model-value` or `@input` handler of a `<VcTimeInput>` typed with `number`, the handler takes `number \| undefined`; `v-model` needs no change |
676
+
677
+ | `4.0.0-beta.5` | `VcTimeInput` mounted with a value above `maxValue` sends `maxValue`, where the earlier betas showed `maxValue` and sent `minValue`; with `maxValue` 0 (no upper limit) its + button adds a step, where the earlier betas set the value to 0; on an RTL page its digits stay left to right (01:30, where the earlier betas showed 30:01) | An application with a time input whose starting value can be above its `maxValue`, or with `max-value="0"`, checks the value it receives; one that styled around the reversed RTL digits removes that style |
675
678
 
676
679
  After its rows the application runs the search of [Finding the 3.x names](#finding-the-3x-names) again: it finds a 3.x name that the guide of an earlier beta did not list.
677
680
 
@@ -0,0 +1 @@
1
+ .vc-filter-add-menu__popover.vc-popover{padding:0}.vc-filter-add-menu{display:flex;flex-direction:column;color:var(--vc-content-primary)}.vc-filter-add-menu__reference{display:inline-flex}.vc-filter-add-menu__search{padding:12px 12px 4px}.vc-filter-add-menu__list{display:flex;flex-direction:column;max-height:360px;overflow-y:auto;padding:0 6px 8px}.vc-filter-add-menu__group{margin:10px 10px 4px;font-size:12px;font-weight:600;color:var(--vc-content-tertiary)}.vc-filter-add-menu__item{display:flex;align-items:center;gap:10px;width:100%;min-height:36px;padding:0 10px;border:0;border-radius:var(--vc-radius-control);background:transparent;font:inherit;font-size:14px;color:var(--vc-content-primary);text-align:start;cursor:pointer}.vc-filter-add-menu__item:hover,.vc-filter-add-menu__item:focus-visible{outline:none;background:var(--vc-bg-inset)}.vc-filter-add-menu__item.is-disabled{color:var(--vc-content-disabled);cursor:default}.vc-filter-add-menu__icon{flex-shrink:0;font-size:16px;color:var(--vc-content-secondary)}.vc-filter-add-menu__label{flex-shrink:0}.vc-filter-add-menu__preview{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:end;font-size:12px;color:var(--vc-content-tertiary)}.vc-filter-add-menu__empty{margin:0;padding:12px 10px;font-size:14px;color:var(--vc-content-secondary)}
@@ -0,0 +1 @@
1
+ .vc-filter-bar{display:flex;flex-direction:column;min-width:0}.vc-filter-bar__toolbar{display:flex;flex-direction:column;gap:10px;padding:14px 16px 12px}.vc-filter-bar__row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}.vc-filter-bar__date.el-date-editor.el-range-editor{flex:0 0 236px;width:236px}.vc-filter-bar__date.el-date-editor.el-range-editor.el-date-editor--datetimerange{flex-basis:352px;width:352px}.vc-filter-bar__search{flex:1 1 260px;min-width:200px;max-width:340px}.vc-filter-bar__picker{flex:0 0 140px;width:140px}.vc-filter-bar__linked{flex:0 0 160px;width:160px}.vc-filter-bar__hint{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:14px;color:var(--vc-content-secondary)}.vc-filter-bar__end{display:flex;align-items:center;gap:6px;margin-inline-start:auto}.vc-filter-bar__toggle{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid var(--vc-input);border-radius:var(--vc-radius-control);background:var(--vc-bg-field);font:inherit;font-size:14px;color:var(--vc-content-primary);white-space:nowrap;cursor:pointer;transition:background-color .15s ease}.vc-filter-bar__toggle:hover{background:var(--vc-bg-inset)}.vc-filter-bar__toggle:focus-visible{outline:none;box-shadow:0 0 0 2px var(--vc-ring)}.vc-filter-bar__toggle-icon{flex-shrink:0;font-size:16px;color:var(--vc-content-tertiary)}.vc-filter-bar__chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.vc-filter-bar__date--error.el-date-editor.el-range-editor{box-shadow:0 0 0 1px var(--vc-content-danger) inset}.vc-filter-bar__errors{display:flex;align-items:flex-start;gap:8px;font-size:14px;color:var(--vc-content-danger)}.vc-filter-bar__errors-icon{flex-shrink:0;margin-top:2px;font-size:16px}.vc-filter-bar__footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;padding:10px 16px;border-top:1px solid var(--vc-border)}.vc-filter-bar__footer-start,.vc-filter-bar__footer-end{display:flex;flex-wrap:wrap;align-items:center;gap:8px}@media (max-width: 640px){.vc-filter-bar__date.el-date-editor.el-range-editor,.vc-filter-bar__search,.vc-filter-bar__linked{flex:1 1 100%;width:100%}.vc-filter-bar__end{margin-inline-start:0}}
@@ -0,0 +1 @@
1
+ .vc-filter-chip{display:inline-flex;align-items:stretch;height:28px;max-width:100%;border:1px solid var(--vc-border-strong);border-radius:var(--vc-radius-control);background:var(--vc-bg-surface);font-size:13px;line-height:26px;white-space:nowrap;overflow:hidden}.vc-filter-chip.is-exclude{border-color:color-mix(in srgb,var(--vc-action-danger) 45%,var(--vc-border-strong))}.vc-filter-chip.is-error{border-color:var(--vc-content-danger)}.vc-filter-chip__main{display:inline-flex;align-items:stretch;min-width:0;padding:0;border:0;background:transparent;font:inherit;color:var(--vc-content-secondary);cursor:pointer}.vc-filter-chip__main:hover .vc-filter-chip__segment:not(.vc-filter-chip__segment--mode){background:var(--vc-bg-inset)}.vc-filter-chip__main:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--vc-ring)}.vc-filter-chip__segment{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0 8px;transition:background-color .15s ease}.vc-filter-chip__segment+.vc-filter-chip__segment{border-inline-start:1px solid var(--vc-border)}.vc-filter-chip__segment--mode{padding:0 6px;background:color-mix(in srgb,var(--vc-action-danger) 14%,var(--vc-bg-surface));color:var(--vc-content-danger)}.vc-filter-chip__icon{flex-shrink:0;font-size:14px}.vc-filter-chip__value{display:block;min-width:0;max-width:220px;overflow:hidden;text-overflow:ellipsis;color:var(--vc-content-primary);font-weight:500}.vc-filter-chip__value.is-pending{color:var(--vc-content-tertiary);font-weight:400}.vc-filter-chip__alert{color:var(--vc-content-danger)}.vc-filter-chip__remove{display:inline-flex;align-items:center;justify-content:center;width:26px;padding:0;border:0;border-inline-start:1px solid var(--vc-border);background:transparent;color:var(--vc-content-tertiary);cursor:pointer;font-size:14px}.vc-filter-chip__remove:hover{background:var(--vc-bg-inset);color:var(--vc-content-primary)}.vc-filter-chip__remove:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--vc-ring)}
@@ -0,0 +1 @@
1
+ .vc-filter-chip-editor__reference{display:inline-flex;max-width:100%}
@@ -0,0 +1 @@
1
+ .vc-filter-editor-modal__panel .vc-filter-editor-panel__head{padding-top:0}
@@ -0,0 +1 @@
1
+ .vc-filter-editor-panel{display:flex;flex-direction:column;color:var(--vc-content-primary)}.vc-filter-editor-panel__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px 10px 8px;border-bottom:1px solid var(--vc-border)}.vc-filter-editor-panel__head-start{display:inline-flex;align-items:center;gap:4px;min-width:0;padding-inline-start:8px}.vc-filter-editor-panel__title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vc-filter-editor-panel__note{display:flex;align-items:flex-start;gap:8px;margin:12px 16px 0;padding:8px 10px;border-radius:var(--vc-radius-control);background:var(--vc-bg-inset);font-size:12px;color:var(--vc-content-secondary)}.vc-filter-editor-panel__note-icon{flex-shrink:0;margin-top:1px;font-size:14px}.vc-filter-editor-panel__error{margin:12px 16px 0;font-size:12px;color:var(--vc-content-danger)}.vc-filter-editor-panel__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-top:1px solid var(--vc-border);font-size:14px}.vc-filter-editor-panel__foot-start{min-width:0;color:var(--vc-content-secondary)}
@@ -0,0 +1 @@
1
+ .vc-filter-boolean-editor__error{margin:0 0 8px;font-size:12px;color:var(--vc-content-danger)}.vc-filter-boolean-editor{padding:12px 16px}
@@ -0,0 +1 @@
1
+ .vc-filter-multiselect-editor{display:flex;flex-direction:column}.vc-filter-multiselect-editor__search{padding:12px 16px 4px}.vc-filter-multiselect-editor__list{display:flex;flex-direction:column;max-height:280px;overflow-y:auto;padding:4px 16px 8px}.vc-filter-multiselect-editor__caption{margin:4px 0 2px;font-size:12px;color:var(--vc-content-tertiary)}.vc-filter-multiselect-editor__row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px}.vc-filter-multiselect-editor__aside{flex-shrink:0;font-size:12px;color:var(--vc-content-tertiary)}.vc-filter-multiselect-editor__aside.is-refused{color:var(--vc-content-danger)}.vc-filter-multiselect-editor__message{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;padding:12px 16px;font-size:14px;color:var(--vc-content-secondary)}.vc-filter-multiselect-editor__problem{margin:0;padding:0 16px 8px;font-size:12px;color:var(--vc-content-danger)}
@@ -0,0 +1 @@
1
+ .vc-filter-range-editor{display:flex;flex-direction:column;gap:8px;padding:12px 16px}.vc-filter-range-editor__bounds{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px 12px}.vc-filter-range-editor__bound{display:contents}.vc-filter-range-editor__label{font-size:14px;color:var(--vc-content-secondary)}.vc-filter-range-editor__problem{margin:0;font-size:12px;color:var(--vc-content-danger)}
@@ -0,0 +1 @@
1
+ .vc-filter-select-editor__error{margin:0 0 8px;font-size:12px;color:var(--vc-content-danger)}.vc-filter-select-editor__list{display:flex;flex-direction:column;gap:4px;max-height:280px;overflow-y:auto;padding:12px 16px}.vc-filter-select-editor__message{margin:0;padding:12px 16px;font-size:14px;color:var(--vc-content-secondary)}
@@ -0,0 +1 @@
1
+ .vc-filter-text-editor{display:flex;flex-direction:column;gap:6px;padding:12px 16px}.vc-filter-text-editor__problem{margin:0;font-size:12px;color:var(--vc-content-danger)}
@@ -0,0 +1 @@
1
+ .vc-filter-text-list-editor{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow-y:auto;padding:12px 16px}.vc-filter-text-list-editor__row{display:flex;align-items:center;gap:4px}.vc-filter-text-list-editor__note{margin:0;font-size:12px;color:var(--vc-content-tertiary)}.vc-filter-text-list-editor__problem{margin:0;font-size:12px;color:var(--vc-content-danger)}
@@ -1 +1 @@
1
- .vc-time-input{width:100%}.vc-time-input__container{position:relative;display:flex;align-items:center;justify-content:space-between;overflow:hidden;border-radius:var(--vc-radius-control);border-width:1px;border-color:var(--vc-input);font-size:.875rem;outline:2px solid transparent;outline-offset:2px;height:var(--vc-size-control-md)}.vc-time-input__container:hover:not(.is-disabled):not(.is-error){border-color:var(--vc-input--hover)}.vc-time-input__container.vc-time-input-color--primary:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-primary) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--primary.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-primary--hover)}.vc-time-input__container.vc-time-input-color--secondary:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-secondary) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--secondary.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-secondary--hover)}.vc-time-input__container.vc-time-input-color--destructive:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-danger) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--destructive.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-danger--hover)}.vc-time-input__container.vc-time-input-color--success:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-success) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--success.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-success--hover)}.vc-time-input__container.vc-time-input-color--warning:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-warning) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--warning.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-warning--hover)}.vc-time-input__container.vc-time-input-color--info:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-info) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--info.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-info--hover)}.vc-time-input__container.is-disabled,.vc-time-input__container.is-disabled .vc-time-input__times,.vc-time-input__container.is-disabled input{background-color:var(--vc-bg-inset)}.vc-time-input__container.is-disabled:hover,.vc-time-input__container.is-disabled input{cursor:not-allowed}.vc-time-input__container.is-error{border-color:var(--vc-action-danger)}.vc-time-input__btn-decrease,.vc-time-input__btn-increase{display:flex;height:100%;width:2rem;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:center;background-color:var(--vc-action-secondary--subtle-hover)}.vc-time-input__btn-decrease:hover,.vc-time-input__btn-increase:hover{cursor:pointer}.vc-time-input__btn-decrease .icon,.vc-time-input__btn-increase .icon{color:var(--vc-content-primary)}.vc-time-input__btn-decrease.is-disabled:hover,.vc-time-input__btn-increase.is-disabled:hover{cursor:not-allowed}.vc-time-input__btn-decrease.is-disabled .icon,.vc-time-input__btn-increase.is-disabled .icon{color:var(--vc-content-primary);opacity:.5}.vc-time-input__input-wrapper{height:100%;flex-grow:1;background-color:var(--vc-bg-field)}.vc-time-input__empty-placeholder{display:flex;height:100%;width:100%;align-items:center;justify-content:center;color:var(--vc-content-tertiary)}.vc-time-input__empty-placeholder:hover{cursor:text}.vc-time-input__times{display:flex;height:100%;align-items:center;justify-content:center}.vc-time-input__times .vc-time-input__input{height:100%;width:1.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--vc-bg-field);padding:.125rem;text-align:center;font-size:.875rem;outline:2px solid transparent;outline-offset:2px}.vc-time-input__times .vc-time-input__input::-webkit-outer-spin-button,.vc-time-input__times .vc-time-input__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.vc-time-input .divider-wrapper{display:inline-flex;height:100%;align-items:center}
1
+ .vc-time-input{width:100%}.vc-time-input__container{position:relative;display:flex;align-items:center;justify-content:space-between;overflow:hidden;border-radius:var(--vc-radius-control);border-width:1px;border-color:var(--vc-input);font-size:.875rem;outline:2px solid transparent;outline-offset:2px;height:var(--vc-size-control-md)}.vc-time-input__container:hover:not(.is-disabled):not(.is-error){border-color:var(--vc-input--hover)}.vc-time-input__container.vc-time-input-color--primary:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-primary) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--primary.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-primary--hover)}.vc-time-input__container.vc-time-input-color--primary .vc-time-input__clearable svg{color:var(--vc-content-brand)}.vc-time-input__container.vc-time-input-color--primary .vc-time-input__clearable svg:hover{color:var(--vc-content-brand--hover)}.vc-time-input__container.vc-time-input-color--secondary:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-secondary) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--secondary.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-secondary--hover)}.vc-time-input__container.vc-time-input-color--secondary .vc-time-input__clearable svg{color:var(--vc-content-secondary)}.vc-time-input__container.vc-time-input-color--secondary .vc-time-input__clearable svg:hover{color:var(--vc-content-secondary--hover)}.vc-time-input__container.vc-time-input-color--destructive:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-danger) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--destructive.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-danger--hover)}.vc-time-input__container.vc-time-input-color--destructive .vc-time-input__clearable svg{color:var(--vc-content-danger)}.vc-time-input__container.vc-time-input-color--destructive .vc-time-input__clearable svg:hover{color:var(--vc-content-danger--hover)}.vc-time-input__container.vc-time-input-color--success:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-success) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--success.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-success--hover)}.vc-time-input__container.vc-time-input-color--success .vc-time-input__clearable svg{color:var(--vc-content-success)}.vc-time-input__container.vc-time-input-color--success .vc-time-input__clearable svg:hover{color:var(--vc-content-success--hover)}.vc-time-input__container.vc-time-input-color--warning:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-warning) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--warning.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-warning--hover)}.vc-time-input__container.vc-time-input-color--warning .vc-time-input__clearable svg{color:var(--vc-content-warning)}.vc-time-input__container.vc-time-input-color--warning .vc-time-input__clearable svg:hover{color:var(--vc-content-warning--hover)}.vc-time-input__container.vc-time-input-color--info:hover:not(.is-disabled):not(.is-error){border-color:color-mix(in srgb,var(--vc-action-info) 45%,var(--vc-input))}.vc-time-input__container.vc-time-input-color--info.is-focused:not(.is-disabled):not(.is-error){border-color:var(--vc-action-info--hover)}.vc-time-input__container.vc-time-input-color--info .vc-time-input__clearable svg{color:var(--vc-content-info)}.vc-time-input__container.vc-time-input-color--info .vc-time-input__clearable svg:hover{color:var(--vc-content-info--hover)}.vc-time-input__container.is-disabled,.vc-time-input__container.is-disabled .vc-time-input__times,.vc-time-input__container.is-disabled .vc-time-input__clearable,.vc-time-input__container.is-disabled input{background-color:var(--vc-bg-inset)}.vc-time-input__container.is-disabled:hover,.vc-time-input__container.is-disabled input{cursor:not-allowed}.vc-time-input__container.is-error{border-color:var(--vc-action-danger)}.vc-time-input__btn-decrease,.vc-time-input__btn-increase{display:flex;height:100%;width:2rem;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:center;background-color:var(--vc-action-secondary--subtle-hover)}.vc-time-input__btn-decrease:hover,.vc-time-input__btn-increase:hover{cursor:pointer}.vc-time-input__btn-decrease .icon,.vc-time-input__btn-increase .icon{color:var(--vc-content-primary)}.vc-time-input__btn-decrease.is-disabled:hover,.vc-time-input__btn-increase.is-disabled:hover{cursor:not-allowed}.vc-time-input__btn-decrease.is-disabled .icon,.vc-time-input__btn-increase.is-disabled .icon{color:var(--vc-content-primary);opacity:.5}.vc-time-input__input-wrapper{height:100%;flex-grow:1;background-color:var(--vc-bg-field)}.vc-time-input__clearable{display:flex;height:100%;flex-shrink:0;align-items:center;justify-content:center;background-color:var(--vc-bg-field);padding-left:.25rem;padding-right:.25rem}.vc-time-input__clearable svg{cursor:pointer;color:var(--vc-content-brand);transition:all .3s ease}.vc-time-input__clearable svg:hover{color:var(--vc-content-brand--hover)}.vc-time-input__empty-placeholder{display:flex;height:100%;width:100%;align-items:center;justify-content:center;color:var(--vc-content-tertiary)}.vc-time-input__empty-placeholder:hover{cursor:text}.vc-time-input__times{display:flex;height:100%;align-items:center;justify-content:center;padding-left:.75rem;padding-right:.75rem;direction:ltr}.vc-time-input__times .vc-time-input__input{height:100%;width:1.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--vc-bg-field);padding:.125rem;text-align:center;font-size:.875rem;outline:2px solid transparent;outline-offset:2px}.vc-time-input__times .vc-time-input__input::-moz-placeholder{color:var(--vc-content-tertiary)}.vc-time-input__times .vc-time-input__input::placeholder{color:var(--vc-content-tertiary)}.vc-time-input__times .vc-time-input__input::-webkit-outer-spin-button,.vc-time-input__times .vc-time-input__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.vc-time-input .divider-wrapper{display:inline-flex;height:100%;align-items:center}
@@ -0,0 +1,380 @@
1
+ import '../../assets/components/VcFilterBar/VcFilterAddMenu.css';
2
+ import { defineComponent, ref, shallowRef, computed, openBlock, createBlock, withCtx, withDirectives, createElementBlock, withKeys, withModifiers, unref, Fragment, createElementVNode, createVNode, renderList, toDisplayString, createCommentVNode, normalizeClass, createTextVNode, nextTick } from "vue";
3
+ import { Search, Plus } from "@lucide/vue";
4
+ import _sfc_main$5 from "../VcButton/VcButton.vue.mjs";
5
+ import '../../assets/components/VcFilterBar/VcFilterEditorPanel.css';import '../../assets/components/VcPopover/VcPopover.css';import '../../assets/components/VcInput/VcInput.css';import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcButton/VcButton.css';/* empty css */
6
+ import _sfc_main$3 from "../VcIcon/VcIcon.vue.mjs";
7
+ /* empty css */
8
+ import _sfc_main$2 from "../VcInput/VcInput.vue.mjs";
9
+ /* empty css */
10
+ import _sfc_main$1 from "../VcPopover/VcPopover.vue.mjs";
11
+ /* empty css */
12
+ import { ClickOutside } from "element-plus";
13
+ import { tVU } from "../../localization/index.mjs";
14
+ import { getTextDirection, formatChipValue, readOptionKey } from "./filterBarChip.mjs";
15
+ import { getFieldModes, getAppliedValues, getBlockedValues, addFieldValue, readFieldValue, isFilterListValue } from "./filterBarModel.mjs";
16
+ import { useFilterOptionsStore } from "./filterBarOptions.mjs";
17
+ import { canAddFieldValue } from "./filterBarValidate.mjs";
18
+ import { isModalField, hasFilterEditor } from "./filterBarEditors.mjs";
19
+ import _sfc_main$4 from "./VcFilterEditorPanel.vue.mjs";
20
+ /* empty css */
21
+ const _hoisted_1 = ["aria-label", "onKeydown"];
22
+ const _hoisted_2 = { class: "vc-filter-add-menu__search" };
23
+ const _hoisted_3 = {
24
+ key: 0,
25
+ class: "vc-filter-add-menu__group"
26
+ };
27
+ const _hoisted_4 = ["aria-disabled", "title", "data-test", "onClick"];
28
+ const _hoisted_5 = { class: "vc-filter-add-menu__label" };
29
+ const _hoisted_6 = ["dir"];
30
+ const _hoisted_7 = {
31
+ key: 0,
32
+ class: "vc-filter-add-menu__empty"
33
+ };
34
+ const _sfc_main = /* @__PURE__ */ defineComponent({
35
+ __name: "VcFilterAddMenu",
36
+ props: {
37
+ fields: {},
38
+ modelValue: {},
39
+ modelOptions: {},
40
+ editorSlots: {},
41
+ footerSlot: { type: Function },
42
+ optionsCaption: {}
43
+ },
44
+ emits: ["update:modelValue", "open-modal"],
45
+ setup(__props, { emit: __emit }) {
46
+ const props = __props;
47
+ const emit = __emit;
48
+ const store = useFilterOptionsStore();
49
+ const open = ref(false);
50
+ const menuQuery = ref("");
51
+ const referenceRef = ref();
52
+ const contentRef = ref();
53
+ const listRef = ref();
54
+ const draftField = shallowRef();
55
+ const draftMode = ref("include");
56
+ const draftValue = ref();
57
+ function hasEditor(field) {
58
+ return hasFilterEditor(field, props.editorSlots);
59
+ }
60
+ function sourceOf(field) {
61
+ if (field.kind !== "multiselect" && field.kind !== "select") {
62
+ return void 0;
63
+ }
64
+ return field.options && !Array.isArray(field.options) ? field.options : void 0;
65
+ }
66
+ function paramsOf(field) {
67
+ if (field.kind !== "multiselect" && field.kind !== "select") {
68
+ return void 0;
69
+ }
70
+ return typeof field.optionsParams === "function" ? field.optionsParams() : field.optionsParams;
71
+ }
72
+ function knownOptions(field) {
73
+ var _a;
74
+ if (field.kind !== "multiselect" && field.kind !== "select") {
75
+ return [];
76
+ }
77
+ if (Array.isArray(field.options)) {
78
+ return field.options;
79
+ }
80
+ const source = sourceOf(field);
81
+ return source ? ((_a = store.peek(source, paramsOf(field))) == null ? void 0 : _a.data) ?? [] : [];
82
+ }
83
+ function preview(field) {
84
+ var _a, _b;
85
+ const valueKey = field.kind === "multiselect" || field.kind === "select" ? ((_a = field.optionConfig) == null ? void 0 : _a.valueKey) ?? "value" : "value";
86
+ const labelKey = field.kind === "multiselect" || field.kind === "select" ? ((_b = field.optionConfig) == null ? void 0 : _b.labelKey) ?? "label" : "label";
87
+ const options = knownOptions(field);
88
+ const optionLabel = (item) => {
89
+ const option = options.find((candidate) => readOptionKey(candidate, valueKey) === item);
90
+ const label = option ? readOptionKey(option, labelKey) : void 0;
91
+ return typeof label === "string" || typeof label === "number" ? String(label) : void 0;
92
+ };
93
+ const context = {
94
+ optionLabel,
95
+ yes: tVU.t("voicenterUi.filterBar.yes"),
96
+ no: tVU.t("voicenterUi.filterBar.no")
97
+ };
98
+ return getFieldModes(field).flatMap((mode) => {
99
+ const value = readFieldValue(props.modelValue, field, mode, props.modelOptions);
100
+ if (value === void 0) {
101
+ return [];
102
+ }
103
+ const text = formatChipValue(field, value, context).text;
104
+ return [mode === "exclude" ? tVU.t("voicenterUi.filterBar.excludePreview", { value: text }) : text];
105
+ }).join("; ");
106
+ }
107
+ function disabledReason(field) {
108
+ var _a;
109
+ if (typeof field.disabled === "string") {
110
+ return field.disabled;
111
+ }
112
+ const source = sourceOf(field);
113
+ const denied = source ? (_a = store.peek(source, paramsOf(field))) == null ? void 0 : _a.deniedReason : void 0;
114
+ if (denied) {
115
+ return denied;
116
+ }
117
+ return hasEditor(field) ? "" : tVU.t("voicenterUi.filterBar.noEditor");
118
+ }
119
+ const groups = computed(() => {
120
+ const query = menuQuery.value.trim().toLowerCase();
121
+ const result = [];
122
+ props.fields.forEach((field) => {
123
+ if (query && !field.label.toLowerCase().includes(query) && !(field.group ?? "").toLowerCase().includes(query)) {
124
+ return;
125
+ }
126
+ const name = field.group ?? "";
127
+ let group = result.find((item) => item.name === name);
128
+ if (!group) {
129
+ group = {
130
+ name,
131
+ rows: []
132
+ };
133
+ result.push(group);
134
+ }
135
+ const reason = disabledReason(field);
136
+ group.rows.push({
137
+ field,
138
+ preview: preview(field),
139
+ disabledReason: reason,
140
+ disabled: field.disabled === true || !!reason
141
+ });
142
+ });
143
+ return result;
144
+ });
145
+ function focusMenuSearch() {
146
+ void nextTick(() => {
147
+ var _a, _b;
148
+ return (_b = (_a = contentRef.value) == null ? void 0 : _a.querySelector(".vc-filter-add-menu__search input")) == null ? void 0 : _b.focus();
149
+ });
150
+ }
151
+ function reset() {
152
+ menuQuery.value = "";
153
+ draftField.value = void 0;
154
+ draftMode.value = "include";
155
+ draftValue.value = void 0;
156
+ }
157
+ function toggle() {
158
+ if (open.value) {
159
+ close();
160
+ return;
161
+ }
162
+ reset();
163
+ open.value = true;
164
+ focusMenuSearch();
165
+ }
166
+ function close() {
167
+ var _a, _b;
168
+ if (!open.value) {
169
+ return;
170
+ }
171
+ open.value = false;
172
+ reset();
173
+ (_b = (_a = referenceRef.value) == null ? void 0 : _a.querySelector("button")) == null ? void 0 : _b.focus();
174
+ }
175
+ function backToMenu() {
176
+ draftField.value = void 0;
177
+ draftValue.value = void 0;
178
+ focusMenuSearch();
179
+ }
180
+ function onEscape() {
181
+ if (draftField.value) {
182
+ backToMenu();
183
+ return;
184
+ }
185
+ close();
186
+ }
187
+ function rowButtons() {
188
+ var _a;
189
+ return Array.from(((_a = listRef.value) == null ? void 0 : _a.querySelectorAll(".vc-filter-add-menu__item")) ?? []);
190
+ }
191
+ function focusRow(index) {
192
+ var _a;
193
+ (_a = rowButtons()[index]) == null ? void 0 : _a.focus();
194
+ }
195
+ function moveFocus(step) {
196
+ var _a, _b, _c;
197
+ const buttons = rowButtons();
198
+ const current = buttons.findIndex((button) => button === document.activeElement);
199
+ const next = current + step;
200
+ if (next < 0) {
201
+ (_b = (_a = contentRef.value) == null ? void 0 : _a.querySelector(".vc-filter-add-menu__search input")) == null ? void 0 : _b.focus();
202
+ return;
203
+ }
204
+ (_c = buttons[Math.min(next, buttons.length - 1)]) == null ? void 0 : _c.focus();
205
+ }
206
+ function pick(row) {
207
+ if (row.disabled) {
208
+ return;
209
+ }
210
+ if (isModalField(row.field)) {
211
+ close();
212
+ emit("open-modal", row.field);
213
+ return;
214
+ }
215
+ draftField.value = row.field;
216
+ draftMode.value = "include";
217
+ draftValue.value = void 0;
218
+ void nextTick(() => {
219
+ var _a, _b;
220
+ return (_b = (_a = contentRef.value) == null ? void 0 : _a.querySelector("input")) == null ? void 0 : _b.focus();
221
+ });
222
+ }
223
+ function pickFirst() {
224
+ const first = groups.value.flatMap((group) => group.rows).find((row) => !row.disabled);
225
+ if (first) {
226
+ pick(first);
227
+ }
228
+ }
229
+ const canExclude = computed(() => !!draftField.value && getFieldModes(draftField.value).includes("exclude"));
230
+ const applied = computed(() => draftField.value ? getAppliedValues(props.modelValue, draftField.value, draftMode.value, props.modelOptions) : []);
231
+ const blocked = computed(() => draftField.value ? getBlockedValues(props.modelValue, draftField.value, draftMode.value, props.modelOptions) : []);
232
+ function setMode(mode) {
233
+ if (mode !== "include" && mode !== "exclude") {
234
+ return;
235
+ }
236
+ draftMode.value = mode;
237
+ if (isFilterListValue(draftValue.value)) {
238
+ const kept = draftValue.value.filter((item) => !blocked.value.includes(item) && !applied.value.includes(item));
239
+ draftValue.value = kept.length ? kept : void 0;
240
+ }
241
+ }
242
+ const canAdd = computed(() => !!draftField.value && canAddFieldValue(draftField.value, draftValue.value, applied.value));
243
+ const draftPreview = computed(() => draftField.value && canAdd.value ? addFieldValue(props.modelValue, draftField.value, draftMode.value, draftValue.value, props.modelOptions) : props.modelValue);
244
+ function commit() {
245
+ const field = draftField.value;
246
+ if (!field || !canAdd.value) {
247
+ return;
248
+ }
249
+ emit("update:modelValue", addFieldValue(props.modelValue, field, draftMode.value, draftValue.value, props.modelOptions));
250
+ close();
251
+ }
252
+ return (_ctx, _cache) => {
253
+ return openBlock(), createBlock(_sfc_main$1, {
254
+ open: open.value,
255
+ trigger: "manual",
256
+ placement: "bottom-start",
257
+ "popover-width": draftField.value ? 320 : 340,
258
+ "popover-class": "vc-filter-add-menu__popover"
259
+ }, {
260
+ reference: withCtx(() => [
261
+ createElementVNode("span", {
262
+ ref_key: "referenceRef",
263
+ ref: referenceRef,
264
+ class: "vc-filter-add-menu__reference"
265
+ }, [
266
+ createVNode(_sfc_main$5, {
267
+ type: "outline",
268
+ color: "primary",
269
+ size: "small",
270
+ icon: unref(Plus),
271
+ "aria-expanded": open.value ? "true" : "false",
272
+ "aria-haspopup": "dialog",
273
+ "data-test": "vc-filter-bar-add",
274
+ onClick: toggle
275
+ }, {
276
+ default: withCtx(() => [
277
+ createTextVNode(toDisplayString(unref(tVU).t("voicenterUi.filterBar.addFilter")), 1)
278
+ ]),
279
+ _: 1
280
+ }, 8, ["icon", "aria-expanded"])
281
+ ], 512)
282
+ ]),
283
+ default: withCtx(() => [
284
+ withDirectives((openBlock(), createElementBlock("div", {
285
+ ref_key: "contentRef",
286
+ ref: contentRef,
287
+ class: "vc-filter-add-menu",
288
+ role: "dialog",
289
+ "aria-label": unref(tVU).t("voicenterUi.filterBar.addFilter"),
290
+ "data-test": "vc-filter-add-menu",
291
+ onKeydown: withKeys(withModifiers(onEscape, ["stop", "prevent"]), ["esc"])
292
+ }, [
293
+ !draftField.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
294
+ createElementVNode("div", _hoisted_2, [
295
+ createVNode(_sfc_main$2, {
296
+ modelValue: menuQuery.value,
297
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => menuQuery.value = $event),
298
+ "prefix-icon": unref(Search),
299
+ placeholder: unref(tVU).t("voicenterUi.filterBar.searchFilters"),
300
+ "aria-label": unref(tVU).t("voicenterUi.filterBar.searchFilters"),
301
+ clearable: "",
302
+ "data-test": "vc-filter-menu-search",
303
+ onKeydown: [
304
+ _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => focusRow(0), ["prevent"]), ["down"])),
305
+ withKeys(withModifiers(pickFirst, ["prevent"]), ["enter"])
306
+ ]
307
+ }, null, 8, ["modelValue", "prefix-icon", "placeholder", "aria-label", "onKeydown"])
308
+ ]),
309
+ createElementVNode("div", {
310
+ ref_key: "listRef",
311
+ ref: listRef,
312
+ class: "vc-filter-add-menu__list",
313
+ onKeydown: [
314
+ _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => moveFocus(1), ["prevent"]), ["down"])),
315
+ _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => moveFocus(-1), ["prevent"]), ["up"]))
316
+ ]
317
+ }, [
318
+ (openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group) => {
319
+ return openBlock(), createElementBlock(Fragment, {
320
+ key: group.name
321
+ }, [
322
+ group.name ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(group.name), 1)) : createCommentVNode("", true),
323
+ (openBlock(true), createElementBlock(Fragment, null, renderList(group.rows, (row) => {
324
+ return openBlock(), createElementBlock("button", {
325
+ key: row.field.key,
326
+ type: "button",
327
+ class: normalizeClass(["vc-filter-add-menu__item", { "is-disabled": !!row.disabledReason || row.disabled }]),
328
+ "aria-disabled": row.disabled ? "true" : void 0,
329
+ title: row.disabledReason || row.preview,
330
+ "data-test": `vc-filter-menu-item-${row.field.key}`,
331
+ onClick: ($event) => pick(row)
332
+ }, [
333
+ row.field.icon ? (openBlock(), createBlock(_sfc_main$3, {
334
+ key: 0,
335
+ icon: row.field.icon,
336
+ class: "vc-filter-add-menu__icon"
337
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
338
+ createElementVNode("span", _hoisted_5, toDisplayString(row.field.label), 1),
339
+ createElementVNode("span", {
340
+ class: "vc-filter-add-menu__preview",
341
+ dir: unref(getTextDirection)(row.disabledReason || row.preview)
342
+ }, toDisplayString(row.disabledReason || row.preview), 9, _hoisted_6)
343
+ ], 10, _hoisted_4);
344
+ }), 128))
345
+ ], 64);
346
+ }), 128)),
347
+ !groups.value.length ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(unref(tVU).t("voicenterUi.filterBar.noFilterMatch", { query: menuQuery.value })), 1)) : createCommentVNode("", true)
348
+ ], 544)
349
+ ], 64)) : (openBlock(), createBlock(_sfc_main$4, {
350
+ key: 1,
351
+ field: draftField.value,
352
+ mode: draftMode.value,
353
+ value: draftValue.value,
354
+ applied: applied.value,
355
+ blocked: blocked.value,
356
+ "can-exclude": canExclude.value,
357
+ "show-back": "",
358
+ "commit-label": unref(tVU).t("voicenterUi.filterBar.addFilter"),
359
+ "can-commit": canAdd.value,
360
+ preview: draftPreview.value,
361
+ "editor-slots": __props.editorSlots,
362
+ "footer-slot": __props.footerSlot,
363
+ caption: __props.optionsCaption,
364
+ "onUpdate:mode": setMode,
365
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => draftValue.value = $event),
366
+ onBack: backToMenu,
367
+ onCommit: commit
368
+ }, null, 8, ["field", "mode", "value", "applied", "blocked", "can-exclude", "commit-label", "can-commit", "preview", "editor-slots", "footer-slot", "caption"]))
369
+ ], 40, _hoisted_1)), [
370
+ [unref(ClickOutside), close, referenceRef.value]
371
+ ])
372
+ ]),
373
+ _: 1
374
+ }, 8, ["open", "popover-width"]);
375
+ };
376
+ }
377
+ });
378
+ export {
379
+ _sfc_main as default
380
+ };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./VcFilterAddMenu.vue.mjs";
2
+ import '../../assets/components/VcFilterBar/VcFilterAddMenu.css';/* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };