@webitel/ui-sdk 24.12.29 → 24.12.34
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/CHANGELOG.md +271 -131
- package/README.md +6 -0
- package/dist/img/sprite/index.js +8 -2
- package/dist/img/sprite/tree-collapse.svg +4 -0
- package/dist/img/sprite/tree-cross.svg +5 -0
- package/dist/img/sprite/tree-line.svg +10 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +7736 -7442
- package/dist/ui-sdk.umd.cjs +17 -17
- package/package.json +13 -6
- package/src/api/axios/generateInstance.js +6 -2
- package/src/api/clients/agents/agentChats.js +18 -19
- package/src/api/clients/agents/agents.js +29 -7
- package/src/api/clients/buckets/buckets.js +16 -3
- package/src/api/clients/calendars/calendars.js +21 -3
- package/src/api/clients/catalog/catalog.js +1 -3
- package/src/api/clients/chatGateways/chatGateways.js +41 -12
- package/src/api/clients/communications/communications.js +25 -6
- package/src/api/clients/configurations/configurations.js +13 -3
- package/src/api/clients/flows/flow.js +20 -9
- package/src/api/clients/gateways/gateways.js +12 -3
- package/src/api/clients/lists/blacklists.js +16 -3
- package/src/api/clients/media/media.js +16 -3
- package/src/api/clients/queues/queues.js +16 -6
- package/src/api/clients/roles/roles.js +3 -1
- package/src/api/clients/skills/skills.js +16 -3
- package/src/api/clients/teams/teams.js +17 -7
- package/src/api/clients/users/__tests__/users.spec.js +3 -1
- package/src/api/clients/users/users.js +8 -2
- package/src/api/clients//321/201ontacts/contactChatMessagesHistory.js +21 -13
- package/src/api/clients//321/201ontacts/contacts.js +38 -15
- package/src/api/history/transcript/callTranscript.js +10 -2
- package/src/api/interceptors/request/updateToken.interceptor.js +2 -1
- package/src/api/transformers/applyTransform.js +5 -1
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.js +2 -1
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.js +2 -1
- package/src/assets/icons/sprite/index.js +8 -2
- package/src/assets/icons/sprite/tree-collapse.svg +4 -0
- package/src/assets/icons/sprite/tree-cross.svg +5 -0
- package/src/assets/icons/sprite/tree-line.svg +10 -0
- package/src/components/index.js +8 -12
- package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-1.vue +4 -2
- package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-2.vue +3 -4
- package/src/components/on-demand/wt-navigation-menu/components/wt-navigation-menu.vue +6 -6
- package/src/components/on-demand/wt-route-transition/wt-route-transition.vue +12 -12
- package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +1 -3
- package/src/components/on-demand/wt-selection-popup/wt-selection-popup.vue +3 -3
- package/src/components/on-demand/wt-start-page/components/start-page-card.vue +4 -2
- package/src/components/on-demand/wt-start-page/components/start-page-logo.vue +1 -1
- package/src/components/on-demand/wt-start-page/components/wt-start-page.vue +2 -3
- package/src/components/on-demand/wt-table-transition/wt-table-transition.vue +7 -7
- package/src/components/wt-action-bar/wt-action-bar.vue +16 -12
- package/src/components/wt-app-header/__tests__/WtHeaderActions.spec.js +3 -1
- package/src/components/wt-app-header/_variables.scss +0 -1
- package/src/components/wt-app-header/wt-app-header.vue +4 -4
- package/src/components/wt-app-header/wt-app-navigator.vue +6 -7
- package/src/components/wt-app-header/wt-header-actions.vue +6 -8
- package/src/components/wt-avatar/wt-avatar.vue +4 -3
- package/src/components/wt-badge/wt-badge.vue +1 -2
- package/src/components/wt-button/wt-button.vue +3 -5
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +6 -2
- package/src/components/wt-button-select/wt-button-select.vue +3 -4
- package/src/components/wt-checkbox/_variables.scss +1 -2
- package/src/components/wt-checkbox/wt-checkbox.vue +1 -2
- package/src/components/wt-chip/_variables.scss +0 -1
- package/src/components/wt-confirm-dialog/wt-confirm-dialog.vue +15 -5
- package/src/components/wt-context-menu/_variables.scss +3 -1
- package/src/components/wt-context-menu/wt-context-menu.vue +1 -3
- package/src/components/wt-copy-action/wt-copy-action.vue +1 -2
- package/src/components/wt-datepicker/_variables.scss +17 -5
- package/src/components/wt-datepicker/wt-datepicker.vue +2 -7
- package/src/components/wt-divider/_variables.scss +0 -1
- package/src/components/wt-divider/wt-divider.vue +5 -3
- package/src/components/wt-dual-panel/__tests__/WtDualPanel.js +2 -2
- package/src/components/wt-dual-panel/wt-dual-panel.vue +6 -5
- package/src/components/wt-dummy/_variables.scss +0 -1
- package/src/components/wt-dummy/wt-dummy.vue +1 -1
- package/src/components/wt-empty/wt-empty.vue +42 -34
- package/src/components/wt-error-page/_variables.scss +0 -1
- package/src/components/wt-error-page/wt-error-page.vue +2 -4
- package/src/components/wt-expansion-panel/_variables.scss +0 -1
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +3 -8
- package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +12 -4
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +8 -7
- package/src/components/wt-headline/_variables.scss +0 -1
- package/src/components/wt-headline-nav/_variables.scss +0 -1
- package/src/components/wt-headline-nav/wt-headline-nav.vue +2 -1
- package/src/components/wt-hint/wt-hint.vue +1 -3
- package/src/components/wt-icon/_variables.scss +0 -1
- package/src/components/wt-icon-action/wt-icon-action.vue +13 -12
- package/src/components/wt-icon-btn/_variables.scss +0 -2
- package/src/components/wt-icon-btn/wt-icon-btn.vue +4 -6
- package/src/components/wt-image/wt-image.vue +14 -13
- package/src/components/wt-indicator/wt-indicator.vue +2 -7
- package/src/components/wt-input/_variables.scss +1 -2
- package/src/components/wt-input/wt-input.vue +13 -10
- package/src/components/wt-input-info/_variables.scss +0 -1
- package/src/components/wt-intersection-observer/__tests__/WtIntersectionObserver.spec.js +1 -1
- package/src/components/wt-intersection-observer/wt-intersection-observer.vue +9 -8
- package/src/components/wt-item-link/_variables.scss +0 -1
- package/src/components/wt-label/_variables.scss +0 -1
- package/src/components/wt-label/wt-label.vue +1 -4
- package/src/components/wt-load-bar/_variables.scss +0 -1
- package/src/components/wt-load-bar/wt-load-bar.vue +0 -1
- package/src/components/wt-loader/_variables.scss +0 -2
- package/src/components/wt-loader/wt-loader.vue +1 -3
- package/src/components/wt-logo/wt-logo.vue +1 -1
- package/src/components/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +9 -3
- package/src/components/wt-navigation-bar/_variables.scss +9 -3
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +27 -11
- package/src/components/wt-notification/_variables.scss +0 -1
- package/src/components/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +1 -1
- package/src/components/wt-notifications-bar/_variables.scss +1 -2
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +4 -2
- package/src/components/wt-page-header/wt-page-header.vue +3 -2
- package/src/components/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +3 -1
- package/src/components/wt-page-wrapper/_variables.scss +0 -1
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +0 -2
- package/src/components/wt-pagination/_variables.scss +1 -2
- package/src/components/wt-pagination/wt-pagination.vue +2 -1
- package/src/components/wt-player/_variables.scss +6 -2
- package/src/components/wt-player/wt-player.vue +52 -53
- package/src/components/wt-popup/_variables.scss +0 -1
- package/src/components/wt-popup/wt-popup.vue +2 -8
- package/src/components/wt-progress-bar/_variables.scss +0 -1
- package/src/components/wt-progress-bar/wt-progress-bar.vue +7 -6
- package/src/components/wt-radio/_variables.scss +1 -2
- package/src/components/wt-radio/wt-radio.vue +1 -2
- package/src/components/wt-rounded-action/_variables.scss +3 -1
- package/src/components/wt-search-bar/_variables.scss +4 -2
- package/src/components/wt-search-bar/wt-search-bar.vue +10 -4
- package/src/components/wt-select/_multiselect.scss +9 -15
- package/src/components/wt-select/_variables.scss +3 -2
- package/src/components/wt-select/mixins/multiselectMixin.js +2 -1
- package/src/components/wt-select/wt-select.vue +25 -26
- package/src/components/wt-slider/_variables.scss +0 -1
- package/src/components/wt-slider/wt-slider.vue +3 -3
- package/src/components/wt-status-select/_variables.scss +8 -4
- package/src/components/wt-stepper/_variables.scss +0 -1
- package/src/components/wt-stepper/wt-stepper.vue +5 -5
- package/src/components/wt-switcher/_variables.scss +0 -1
- package/src/components/wt-switcher/wt-switcher.vue +2 -3
- package/src/components/wt-table/__tests__/WtTable.spec.js +8 -2
- package/src/components/wt-table/_variables.scss +0 -1
- package/src/components/wt-table/types/table-header.ts +8 -0
- package/src/components/wt-table/wt-table.vue +111 -109
- package/src/components/wt-table-actions/_variables.scss +1 -2
- package/src/components/wt-table-actions/wt-table-actions.vue +1 -2
- package/src/components/wt-table-column-select/wt-table-column-select.vue +11 -8
- package/src/components/wt-tabs/_variables.scss +0 -1
- package/src/components/wt-tabs/wt-tabs.vue +6 -6
- package/src/components/wt-tags-input/__tests__/WtTagsInput.spec.js +6 -6
- package/src/components/wt-tags-input/mixin/taggableMixin.js +3 -1
- package/src/components/wt-tags-input/wt-tags-input.vue +8 -10
- package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +6 -2
- package/src/components/wt-textarea/_variables.scss +0 -1
- package/src/components/wt-textarea/wt-textarea.vue +6 -7
- package/src/components/wt-time-input/wt-time-input.vue +1 -2
- package/src/components/wt-timepicker/_variables.scss +1 -2
- package/src/components/wt-timepicker/wt-timepicker.vue +10 -8
- package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +6 -1
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +1 -3
- package/src/components/wt-tooltip/_variables.scss +0 -1
- package/src/components/wt-tooltip/wt-tooltip.vue +13 -2
- package/src/components/wt-tree-table/_variables.scss +19 -0
- package/src/components/wt-tree-table/wt-tree-table.vue +323 -0
- package/src/components/wt-tree-table-row/wt-tree-table-row.vue +171 -0
- package/src/composables/useAccessControl/useAccessControl.js +12 -4
- package/src/composables/useCachedInterval/useCachedInterval.js +6 -2
- package/src/composables/useCachedItemInstanceName/useCachedItemInstanceName.js +4 -1
- package/src/composables/useCard/useCardComponent.js +10 -9
- package/src/composables/useCard/useCardTabs.js +6 -3
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +20 -10
- package/src/composables/useValidate/useValidate.js +1 -1
- package/src/composables/useWtTable/useWtTable.ts +25 -0
- package/src/css/main.scss +7 -1
- package/src/css/pages/table-page.scss +1 -2
- package/src/css/styleguide/border-radius/_border-radius.scss +1 -1
- package/src/css/styleguide/colors/_deprecated.scss +83 -24
- package/src/css/styleguide/colors/_palette.scss +1340 -251
- package/src/css/styleguide/colors/reusable/_text-field.scss +6 -2
- package/src/css/styleguide/fonts/_fonts.scss +36 -18
- package/src/css/styleguide/spacings/_spacings.scss +1 -1
- package/src/css/styleguide/transitions/_transitions.scss +1 -1
- package/src/css/styleguide/transitions/fade/_fade.scss +5 -4
- package/src/css/styleguide/viewport-breakpoints/_viewport-breakpoints.scss +0 -1
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +7 -7
- package/src/enums/index.js +5 -10
- package/src/locale/en/en.js +5 -2
- package/src/locale/ru/ru.js +7 -3
- package/src/locale/ua/ua.js +7 -3
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +2 -1
- package/src/mixins/dataFilterMixins/apiFilterMixin.js +3 -1
- package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +2 -1
- package/src/mixins/dataFilterMixins/enumFilterMixin.js +2 -1
- package/src/mixins/dataFilterMixins/paginationFilterMixin.js +4 -1
- package/src/mixins/dataFilterMixins/sortFilterMixin.js +2 -1
- package/src/mixins/validationMixin/useValidation.js +17 -7
- package/src/mixins/validationMixin/validationMixin.js +16 -8
- package/src/modules/AgentStatusSelect/api/pause-cause.js +4 -1
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +18 -6
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +3 -2
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +5 -2
- package/src/modules/Appearance/components/__tests__/wt-dark-mode-switcher.spec.js +6 -2
- package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +12 -4
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +18 -5
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +4 -2
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +15 -5
- package/src/modules/AuditForm/components/audit-form-question.vue +10 -4
- package/src/modules/AuditForm/components/audit-form.vue +24 -7
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +6 -2
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +5 -5
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +9 -4
- package/src/modules/CSVExport/CSVExport.js +5 -2
- package/src/modules/CSVExport/XLSExport.js +7 -7
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +4 -1
- package/src/modules/CSVExport/mixins/exportCSVMixin.js +3 -1
- package/src/modules/CSVExport/mixins/exportXLSMixin.js +3 -1
- package/src/modules/CardStoreModule/composables/useCardStore.js +6 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +3 -3
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +6 -3
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -2
- package/src/modules/FilesExport/mixins/exportFilesMixin.js +6 -2
- package/src/modules/FilesExport/scripts/generateMediaURL.js +2 -1
- package/src/modules/Filters/classes/BaseFilterSchema.js +15 -6
- package/src/modules/Filters/components/filter-datetime.vue +7 -5
- package/src/modules/Filters/components/filter-pagination.vue +7 -5
- package/src/modules/Filters/components/filter-search.vue +4 -4
- package/src/modules/Filters/components/filter-select.vue +33 -24
- package/src/modules/Filters/components/filter-table-fields.vue +1 -3
- package/src/modules/Filters/composables/useTableFilters.js +3 -1
- package/src/modules/Filters/scripts/getters/localStorageGetter.js +6 -2
- package/src/modules/Filters/scripts/getters/queryGetter.js +2 -1
- package/src/modules/Filters/scripts/setters/localStorageSetter.js +6 -2
- package/src/modules/Filters/scripts/setters/querySetter.js +2 -1
- package/src/modules/Filters/scripts/utils/changeRouteQuery.js +2 -1
- package/src/modules/Filters/store/FiltersStoreModule.js +3 -3
- package/src/modules/Notifications/store/NotificationsStoreModule.js +14 -5
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +10 -3
- package/src/modules/ObjectPermissions/_internals/components/permissions-role-row.vue +1 -3
- package/src/modules/ObjectPermissions/_internals/components/permissions-role-select.vue +1 -3
- package/src/modules/ObjectPermissions/_internals/components/permissions-tab-role-popup.vue +8 -5
- package/src/modules/ObjectPermissions/_internals/modules/filters/store/filters.store.js +3 -4
- package/src/modules/ObjectPermissions/_internals/store/helpers/createObjectPermissionsStoreModule.js +1 -2
- package/src/modules/ObjectPermissions/_internals/store/modules/objectPermissionsStoreModule.js +10 -14
- package/src/modules/ObjectPermissions/components/permissions-tab.vue +12 -12
- package/src/modules/ObjectPermissions/store/index.js +2 -6
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +3 -1
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +6 -2
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +7 -2
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +15 -5
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +15 -5
- package/src/modules/QueryFilters/components/filter-datetime.vue +1 -3
- package/src/modules/QueryFilters/components/filter-from-to.vue +1 -1
- package/src/modules/QueryFilters/components/filter-search.vue +1 -3
- package/src/modules/QueryFilters/components/filter-table-fields.vue +1 -3
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +4 -1
- package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +9 -3
- package/src/modules/QueryFilters/mixins/enumFilterMixin.js +10 -3
- package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +4 -2
- package/src/modules/QueryFilters/mixins/sortFilterMixin.js +2 -1
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +2 -1
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +10 -3
- package/src/modules/TableComponentModule/composables/useTableEmpty.js +13 -4
- package/src/modules/TableStoreModule/composables/useTableStore.js +18 -6
- package/src/modules/TableStoreModule/store/TableStoreModule.js +36 -21
- package/src/modules/TableStoreModule/store/__tests__/TableStoreModule.spec.js +7 -2
- package/src/modules/Userinfo/api/userinfo.js +4 -1
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +3 -1
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +25 -9
- package/src/plugins/breakpoint/breakpoint.plugin.js +2 -1
- package/src/scripts/__tests__/caseConverters.spec.js +4 -1
- package/src/scripts/__tests__/updateObject.spec.js +6 -2
- package/src/scripts/caseConverters.js +37 -29
- package/src/scripts/compareSize.ts +9 -6
- package/src/scripts/debounce.js +2 -1
- package/src/scripts/index.js +2 -8
- package/src/scripts/logger.js +4 -4
- package/src/scripts/preventHiddenPageCallsDecorator.js +6 -2
- package/src/scripts/saveAsJSON.js +3 -1
- package/src/scripts/sortQueryAdapters.js +11 -0
- package/src/store/BaseStoreModules/ApiStoreModule.js +26 -7
- package/src/store/BaseStoreModules/BaseStoreModule.js +2 -1
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +28 -7
- package/src/store/helpers/getNamespacedState.js +3 -1
- package/src/store/new/modules/apiStoreModule/apiStoreModule.js +19 -14
- package/src/store/new/modules/cardStoreModule/useCardStore.js +6 -2
- package/src/store/new/modules/tableStoreModule/__tests__/tableStoreModule.spec.js +6 -8
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +31 -28
- package/src/store/new/modules/tableStoreModule/useTableStore.js +18 -6
- package/src/validators/variableSearchValidator/__tests__/variableSearchValidator.spec.js +2 -1
- package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +3 -1
- package/src/components/wt-table/_internals/getSortOrder.js +0 -12
- /package/dist/img/sprite/{plus.svg → tree-expand.svg} +0 -0
- /package/src/assets/icons/sprite/{plus.svg → tree-expand.svg} +0 -0
|
@@ -47,7 +47,9 @@ function setValue(payload) {
|
|
|
47
47
|
return store.dispatch(`${props.namespace}/SET_FILTER`, payload);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const filterName = ref(
|
|
50
|
+
const filterName = ref(
|
|
51
|
+
props.multisearch ? props.searchModeOpts[0].value : props.name,
|
|
52
|
+
);
|
|
51
53
|
|
|
52
54
|
const currentSearchMode = computed(() =>
|
|
53
55
|
props.searchModeOpts.find(({ value }) => value === filterName.value),
|
|
@@ -100,6 +102,4 @@ watch(
|
|
|
100
102
|
);
|
|
101
103
|
</script>
|
|
102
104
|
|
|
103
|
-
<style lang="scss" scoped>
|
|
104
|
-
|
|
105
|
-
</style>
|
|
105
|
+
<style lang="scss" scoped></style>
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script setup>
|
|
15
|
-
|
|
16
15
|
import { computed, reactive, useAttrs } from 'vue';
|
|
17
16
|
import { useI18n } from 'vue-i18n';
|
|
18
17
|
import { useStore } from 'vuex';
|
|
@@ -34,7 +33,9 @@ const attrs = useAttrs();
|
|
|
34
33
|
const store = useStore();
|
|
35
34
|
const { t } = useI18n();
|
|
36
35
|
|
|
37
|
-
const filterSchema = computed(
|
|
36
|
+
const filterSchema = computed(
|
|
37
|
+
() => getNamespacedState(store.state, props.namespace)[props.filterQuery],
|
|
38
|
+
);
|
|
38
39
|
|
|
39
40
|
const trackBy = computed(() => {
|
|
40
41
|
if (filterSchema.value.storedProp !== undefined) {
|
|
@@ -52,31 +53,37 @@ const trackBy = computed(() => {
|
|
|
52
53
|
return 'id';
|
|
53
54
|
});
|
|
54
55
|
|
|
55
|
-
const rawValue = computed(
|
|
56
|
+
const rawValue = computed(
|
|
57
|
+
() => store.getters[`${props.namespace}/FILTER_${props.filterQuery}`],
|
|
58
|
+
);
|
|
56
59
|
|
|
57
60
|
const cachedSearchOpts = reactive({});
|
|
58
61
|
|
|
59
|
-
const search =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
const search =
|
|
63
|
+
filterSchema.value.search &&
|
|
64
|
+
(async (selectParams) => {
|
|
65
|
+
const params = {
|
|
66
|
+
...selectParams,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
if (trackBy.value === 'id') {
|
|
70
|
+
params.ids = Array.isArray(rawValue.value)
|
|
71
|
+
? rawValue.value
|
|
72
|
+
: [rawValue.value];
|
|
73
|
+
}
|
|
63
74
|
|
|
64
|
-
|
|
65
|
-
params.ids = Array.isArray(rawValue.value) ? rawValue.value : [rawValue.value];
|
|
66
|
-
}
|
|
75
|
+
const { items, ...rest } = await filterSchema.value.search(params);
|
|
67
76
|
|
|
68
|
-
|
|
77
|
+
items.forEach((item) => {
|
|
78
|
+
cachedSearchOpts[item.id] = item;
|
|
79
|
+
});
|
|
69
80
|
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
return {
|
|
82
|
+
items,
|
|
83
|
+
...rest,
|
|
84
|
+
};
|
|
72
85
|
});
|
|
73
86
|
|
|
74
|
-
return {
|
|
75
|
-
items,
|
|
76
|
-
...rest,
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
|
|
80
87
|
const options = computed(() => {
|
|
81
88
|
const options = filterSchema.value.options;
|
|
82
89
|
|
|
@@ -86,10 +93,14 @@ const options = computed(() => {
|
|
|
86
93
|
const value = computed(() => {
|
|
87
94
|
if (options.value) {
|
|
88
95
|
if (filterSchema.value.multiple) {
|
|
89
|
-
return options.value.filter((option) =>
|
|
96
|
+
return options.value.filter((option) =>
|
|
97
|
+
rawValue.value.includes(option[trackBy.value]),
|
|
98
|
+
);
|
|
90
99
|
}
|
|
91
100
|
|
|
92
|
-
return options.value.find(
|
|
101
|
+
return options.value.find(
|
|
102
|
+
(option) => option[trackBy.value] === rawValue.value,
|
|
103
|
+
);
|
|
93
104
|
}
|
|
94
105
|
|
|
95
106
|
if (filterSchema.value.search) {
|
|
@@ -113,6 +124,4 @@ const setValue = (value) => {
|
|
|
113
124
|
};
|
|
114
125
|
</script>
|
|
115
126
|
|
|
116
|
-
<style scoped>
|
|
117
|
-
|
|
118
|
-
</style>
|
|
127
|
+
<style scoped></style>
|
|
@@ -6,7 +6,9 @@ export const useTableFilters = (namespace) => {
|
|
|
6
6
|
|
|
7
7
|
const filtersNamespace = `${namespace}/filters`;
|
|
8
8
|
|
|
9
|
-
const filtersValue = computed(() =>
|
|
9
|
+
const filtersValue = computed(() =>
|
|
10
|
+
store.getters[`${filtersNamespace}/GET_FILTERS`](),
|
|
11
|
+
);
|
|
10
12
|
|
|
11
13
|
function subscribe(payload) {
|
|
12
14
|
return store.dispatch(`${filtersNamespace}/SUBSCRIBE`, payload);
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
// context === filter "this"
|
|
2
2
|
const localStorageGetter = (context) => () => {
|
|
3
|
-
if (!context)
|
|
3
|
+
if (!context)
|
|
4
|
+
throw new Error('Filter context is required for localStorageGetter!');
|
|
4
5
|
|
|
5
6
|
const key = context.localStorageKey;
|
|
6
7
|
|
|
7
|
-
if (!key)
|
|
8
|
+
if (!key)
|
|
9
|
+
throw new Error(
|
|
10
|
+
`Please provide "localStorageKey" for ${context.name} filter!`,
|
|
11
|
+
);
|
|
8
12
|
|
|
9
13
|
const value = localStorage.getItem(key);
|
|
10
14
|
if (!value) return null;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
const queryGetter = (context) => (router) => () => {
|
|
3
3
|
if (!router) throw new Error('Router is required for queryGetter!');
|
|
4
4
|
|
|
5
|
-
const query =
|
|
5
|
+
const query =
|
|
6
|
+
router.currentRoute.value?.query || router.currentRoute.query || {};
|
|
6
7
|
|
|
7
8
|
const value = query[context.name];
|
|
8
9
|
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// context === filter "this"
|
|
2
2
|
|
|
3
3
|
const localStorageSetter = (context) => (rawValue) => {
|
|
4
|
-
if (!context)
|
|
4
|
+
if (!context)
|
|
5
|
+
throw new Error('Filter context is required for localStorageSetter!');
|
|
5
6
|
|
|
6
7
|
const key = context.localStorageKey;
|
|
7
8
|
|
|
8
|
-
if (!key)
|
|
9
|
+
if (!key)
|
|
10
|
+
throw new Error(
|
|
11
|
+
`Please provide "localStorageKey" for ${context.name} filter!`,
|
|
12
|
+
);
|
|
9
13
|
|
|
10
14
|
const value = Array.isArray(rawValue) ? rawValue.join(',') : rawValue;
|
|
11
15
|
localStorage.setItem(key, value);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import changeRouteQuery from '../utils/changeRouteQuery.js';
|
|
2
2
|
|
|
3
|
-
const isObject = (value) =>
|
|
3
|
+
const isObject = (value) =>
|
|
4
|
+
typeof value === 'object' && !Array.isArray(value) && value !== null;
|
|
4
5
|
|
|
5
6
|
const handlePrimitive = ({ value }) => value;
|
|
6
7
|
|
|
@@ -4,7 +4,8 @@ const changeRouteQuery =
|
|
|
4
4
|
(router) =>
|
|
5
5
|
({ filterQuery, value }) => {
|
|
6
6
|
const name = router.currentRoute?.value?.name || router.currentRoute?.name;
|
|
7
|
-
const query =
|
|
7
|
+
const query =
|
|
8
|
+
router.currentRoute?.value?.query || router.currentRoute?.query || {};
|
|
8
9
|
|
|
9
10
|
if (deepEqual(query[filterQuery], value)) return;
|
|
10
11
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import mitt from 'mitt';
|
|
2
2
|
import isEmpty from '../../../scripts/isEmpty.js';
|
|
3
|
-
import BaseStoreModule
|
|
4
|
-
from '../../../store/BaseStoreModules/BaseStoreModule.js';
|
|
3
|
+
import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
|
|
5
4
|
import BaseFilterSchema from '../classes/BaseFilterSchema.js';
|
|
6
5
|
import FilterEvent from '../enums/FilterEvent.enum.js';
|
|
7
6
|
|
|
@@ -23,7 +22,8 @@ export default class FiltersStoreModule extends BaseStoreModule {
|
|
|
23
22
|
|
|
24
23
|
_STATE_FILTER_NAMES: (state) => {
|
|
25
24
|
return Object.values(state).reduce(
|
|
26
|
-
(names, prop) =>
|
|
25
|
+
(names, prop) =>
|
|
26
|
+
prop.value || prop.name ? [...names, prop.name] : names,
|
|
27
27
|
[],
|
|
28
28
|
);
|
|
29
29
|
},
|
|
@@ -45,7 +45,8 @@ export default class NotificationsStoreModule extends BaseStoreModule {
|
|
|
45
45
|
|
|
46
46
|
getters = {
|
|
47
47
|
IS_MAIN_TAB: (state) => state.thisTabId === state.currentTabId,
|
|
48
|
-
IS_SOUND_ALLOWED: (state, getters) =>
|
|
48
|
+
IS_SOUND_ALLOWED: (state, getters) =>
|
|
49
|
+
getters.IS_MAIN_TAB && !state.currentlyPlaying,
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
actions = {
|
|
@@ -114,9 +115,16 @@ export default class NotificationsStoreModule extends BaseStoreModule {
|
|
|
114
115
|
context.dispatch('_REMOVE_CURRENT_TAB_ID'),
|
|
115
116
|
]),
|
|
116
117
|
|
|
117
|
-
PLAY_SOUND: async (
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
PLAY_SOUND: async (
|
|
119
|
+
context,
|
|
120
|
+
{ action, sound = getNotificationSound(action), volume = 1.0 },
|
|
121
|
+
) => {
|
|
122
|
+
if (
|
|
123
|
+
context.getters.IS_SOUND_ALLOWED &&
|
|
124
|
+
!localStorage.getItem('wtIsPlaying')
|
|
125
|
+
) {
|
|
126
|
+
const audio =
|
|
127
|
+
sound instanceof Audio || sound.play ? sound : new Audio(sound);
|
|
120
128
|
audio.volume = volume;
|
|
121
129
|
|
|
122
130
|
audio.addEventListener(
|
|
@@ -137,7 +145,8 @@ export default class NotificationsStoreModule extends BaseStoreModule {
|
|
|
137
145
|
|
|
138
146
|
STOP_SOUND: (context) => {
|
|
139
147
|
const { currentlyPlaying } = context.state;
|
|
140
|
-
if (currentlyPlaying && currentlyPlaying instanceof Audio)
|
|
148
|
+
if (currentlyPlaying && currentlyPlaying instanceof Audio)
|
|
149
|
+
currentlyPlaying.pause();
|
|
141
150
|
localStorage.removeItem('wtIsPlaying');
|
|
142
151
|
context.commit('RESET_CURRENTLY_PLAYING');
|
|
143
152
|
},
|
|
@@ -38,7 +38,9 @@ describe('features/notifications store: actions', () => {
|
|
|
38
38
|
|
|
39
39
|
it('INITIALIZE action dispatches _SETUP_UNREAD_COUND_BROADCAST_LISTENING action', () => {
|
|
40
40
|
notificationsModule.actions.INITIALIZE(context);
|
|
41
|
-
expect(context.dispatch.mock.calls[1][0]).toContain(
|
|
41
|
+
expect(context.dispatch.mock.calls[1][0]).toContain(
|
|
42
|
+
'_SETUP_UNREAD_COUND_BROADCAST_LISTENING',
|
|
43
|
+
);
|
|
42
44
|
});
|
|
43
45
|
|
|
44
46
|
it('INITIALIZE action dispatches _SETUP_THIS_TAB_ID action', () => {
|
|
@@ -65,7 +67,9 @@ describe('features/notifications store: actions', () => {
|
|
|
65
67
|
});
|
|
66
68
|
|
|
67
69
|
it('_SETUP_UNREAD_COUND_BROADCAST_LISTENING action commits SET_BROADCAST_CHANNEL mutation', () => {
|
|
68
|
-
notificationsModule.actions._SETUP_UNREAD_COUND_BROADCAST_LISTENING(
|
|
70
|
+
notificationsModule.actions._SETUP_UNREAD_COUND_BROADCAST_LISTENING(
|
|
71
|
+
context,
|
|
72
|
+
);
|
|
69
73
|
expect(context.commit.mock.calls[0][0]).toContain('SET_BROADCAST_CHANNEL');
|
|
70
74
|
});
|
|
71
75
|
|
|
@@ -100,7 +104,10 @@ describe('features/notifications store: actions', () => {
|
|
|
100
104
|
it('_SET_UNREAD_COUNT action commits _SET_UNREAD_COUNT mutation with count', () => {
|
|
101
105
|
const unreadCount = 5;
|
|
102
106
|
notificationsModule.actions._SET_UNREAD_COUNT(context, unreadCount);
|
|
103
|
-
expect(context.commit).toHaveBeenCalledWith(
|
|
107
|
+
expect(context.commit).toHaveBeenCalledWith(
|
|
108
|
+
'SET_UNREAD_COUNT',
|
|
109
|
+
unreadCount,
|
|
110
|
+
);
|
|
104
111
|
});
|
|
105
112
|
|
|
106
113
|
it('_RESET_UNREAD_COUNT action does not dispatch if unread count is 0', () => {
|
|
@@ -61,7 +61,9 @@ const route = useRoute();
|
|
|
61
61
|
|
|
62
62
|
const grantee = ref(null);
|
|
63
63
|
|
|
64
|
-
const existingGranteesList = computed(
|
|
64
|
+
const existingGranteesList = computed(
|
|
65
|
+
() => getNamespacedState(store.state, props.namespace).dataList,
|
|
66
|
+
);
|
|
65
67
|
|
|
66
68
|
const shown = computed(() => !!route.params.permissionId);
|
|
67
69
|
|
|
@@ -101,7 +103,10 @@ const getAvailableGrantees = async (params) => {
|
|
|
101
103
|
const { items, ...rest } = await loadGrantees(params);
|
|
102
104
|
return {
|
|
103
105
|
items: items.filter(
|
|
104
|
-
(role) =>
|
|
106
|
+
(role) =>
|
|
107
|
+
!existingGranteesList.value.some(
|
|
108
|
+
(usedRoles) => role.id === usedRoles.grantee.id,
|
|
109
|
+
),
|
|
105
110
|
),
|
|
106
111
|
...rest,
|
|
107
112
|
};
|
|
@@ -111,8 +116,6 @@ const save = async (grantee) => {
|
|
|
111
116
|
await store.dispatch(`${props.namespace}/ADD_ROLE_PERMISSIONS`, grantee);
|
|
112
117
|
return close();
|
|
113
118
|
};
|
|
114
|
-
|
|
115
119
|
</script>
|
|
116
120
|
|
|
117
|
-
<style lang="scss" scoped>
|
|
118
|
-
</style>
|
|
121
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import deepCopy from 'deep-copy';
|
|
2
|
-
import FiltersStoreModule
|
|
3
|
-
from '../../../../../Filters/store/FiltersStoreModule';
|
|
2
|
+
import FiltersStoreModule from '../../../../../Filters/store/FiltersStoreModule';
|
|
4
3
|
|
|
5
4
|
const filtersList = [
|
|
6
5
|
{
|
|
@@ -16,8 +15,8 @@ const filtersList = [
|
|
|
16
15
|
|
|
17
16
|
export default () => {
|
|
18
17
|
const filters = new FiltersStoreModule()
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
.addFilter(deepCopy(filtersList))
|
|
19
|
+
.getModule();
|
|
21
20
|
|
|
22
21
|
return filters;
|
|
23
22
|
};
|
package/src/modules/ObjectPermissions/_internals/store/helpers/createObjectPermissionsStoreModule.js
CHANGED
|
@@ -2,8 +2,7 @@ import {
|
|
|
2
2
|
createBaseStoreModule,
|
|
3
3
|
createTableStoreModule,
|
|
4
4
|
} from '../../../../../store/new/index.js';
|
|
5
|
-
import objectPermissionsStoreModule
|
|
6
|
-
from '../modules/objectPermissionsStoreModule.js';
|
|
5
|
+
import objectPermissionsStoreModule from '../modules/objectPermissionsStoreModule.js';
|
|
7
6
|
|
|
8
7
|
export const createObjectPermissionsStoreModule = (modules) => {
|
|
9
8
|
const modulesArr = Array.isArray(modules) ? modules : [modules];
|
package/src/modules/ObjectPermissions/_internals/store/modules/objectPermissionsStoreModule.js
CHANGED
|
@@ -40,9 +40,9 @@ const actions = {
|
|
|
40
40
|
}
|
|
41
41
|
const changes = [
|
|
42
42
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
43
|
+
grantee: +item.grantee.id,
|
|
44
|
+
grants: want,
|
|
45
|
+
},
|
|
46
46
|
];
|
|
47
47
|
try {
|
|
48
48
|
await context.dispatch('PATCH_ITEM_API', {
|
|
@@ -57,9 +57,9 @@ const actions = {
|
|
|
57
57
|
console.info(role);
|
|
58
58
|
const changes = [
|
|
59
59
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
60
|
+
grantee: +role.id,
|
|
61
|
+
grants: 'r',
|
|
62
|
+
},
|
|
63
63
|
];
|
|
64
64
|
try {
|
|
65
65
|
await context.dispatch('PATCH_ITEM_API', {
|
|
@@ -71,14 +71,10 @@ const actions = {
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
|
|
74
|
-
GET_LIST_API: (
|
|
75
|
-
context,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
PATCH_ITEM_API: (
|
|
79
|
-
context,
|
|
80
|
-
payload,
|
|
81
|
-
) => context.dispatch('api/PATCH_OBJECT_PERMISSIONS_ITEM', payload),
|
|
74
|
+
GET_LIST_API: (context, payload) =>
|
|
75
|
+
context.dispatch('api/GET_OBJECT_PERMISSIONS_LIST', payload),
|
|
76
|
+
PATCH_ITEM_API: (context, payload) =>
|
|
77
|
+
context.dispatch('api/PATCH_OBJECT_PERMISSIONS_ITEM', payload),
|
|
82
78
|
};
|
|
83
79
|
|
|
84
80
|
export default () => {
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="table-section__table-wrapper">
|
|
31
31
|
<div>
|
|
32
|
-
<wt-table-transition
|
|
33
|
-
v-if="dataList.length && !isLoading">
|
|
32
|
+
<wt-table-transition v-if="dataList.length && !isLoading">
|
|
34
33
|
<wt-table
|
|
35
34
|
:data="localizedDataList"
|
|
36
35
|
:grid-actions="access.edit"
|
|
@@ -40,9 +39,7 @@
|
|
|
40
39
|
@sort="sort"
|
|
41
40
|
>
|
|
42
41
|
<template #grantee="{ item }">
|
|
43
|
-
<role-column
|
|
44
|
-
:role="item.grantee"
|
|
45
|
-
/>
|
|
42
|
+
<role-column :role="item.grantee" />
|
|
46
43
|
</template>
|
|
47
44
|
|
|
48
45
|
<template #read="{ item }">
|
|
@@ -77,7 +74,13 @@
|
|
|
77
74
|
<template #actions="{ item }">
|
|
78
75
|
<wt-icon-action
|
|
79
76
|
action="delete"
|
|
80
|
-
@click="
|
|
77
|
+
@click="
|
|
78
|
+
changeAccessMode({
|
|
79
|
+
item,
|
|
80
|
+
ruleName: 'r',
|
|
81
|
+
mode: { id: AccessMode.FORBIDDEN },
|
|
82
|
+
})
|
|
83
|
+
"
|
|
81
84
|
/>
|
|
82
85
|
</template>
|
|
83
86
|
</wt-table>
|
|
@@ -194,11 +197,8 @@ const accessOptions = computed(() => {
|
|
|
194
197
|
}));
|
|
195
198
|
});
|
|
196
199
|
|
|
197
|
-
const changeAccessMode = (payload) =>
|
|
198
|
-
store.dispatch(`${tableNamespace}/CHANGE_ACCESS_MODE`, payload)
|
|
199
|
-
);
|
|
200
|
-
|
|
200
|
+
const changeAccessMode = (payload) =>
|
|
201
|
+
store.dispatch(`${tableNamespace}/CHANGE_ACCESS_MODE`, payload);
|
|
201
202
|
</script>
|
|
202
203
|
|
|
203
|
-
<style lang="scss" scoped>
|
|
204
|
-
</style>
|
|
204
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createObjectPermissionsStoreModule,
|
|
3
|
-
} from '../_internals/store/helpers/createObjectPermissionsStoreModule.js';
|
|
1
|
+
import { createObjectPermissionsStoreModule } from '../_internals/store/helpers/createObjectPermissionsStoreModule.js';
|
|
4
2
|
|
|
5
|
-
export {
|
|
6
|
-
createObjectPermissionsStoreModule,
|
|
7
|
-
};
|
|
3
|
+
export { createObjectPermissionsStoreModule };
|
|
@@ -42,7 +42,9 @@ describe('DatetimeFilter Filter', () => {
|
|
|
42
42
|
const value = Date.now();
|
|
43
43
|
await router.replace({ query: { [filterQuery]: value } });
|
|
44
44
|
const setValueMock = vi.fn();
|
|
45
|
-
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(
|
|
45
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(
|
|
46
|
+
setValueMock,
|
|
47
|
+
);
|
|
46
48
|
shallowMount(DatetimeFilter, mountOptions);
|
|
47
49
|
expect(setValueMock).toHaveBeenCalledWith({ filter: filterQuery, value });
|
|
48
50
|
});
|
|
@@ -40,7 +40,9 @@ describe('FilterFromTo Filter', () => {
|
|
|
40
40
|
const value = 10;
|
|
41
41
|
await router.replace({ query: { [`${filterQuery}From`]: value } });
|
|
42
42
|
const setValueMock = vi.fn();
|
|
43
|
-
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementation(
|
|
43
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementation(
|
|
44
|
+
setValueMock,
|
|
45
|
+
);
|
|
44
46
|
shallowMount(FilterFromTo, mountOptions);
|
|
45
47
|
expect(setValueMock).toHaveBeenNthCalledWith(1, {
|
|
46
48
|
filter: filterQuery,
|
|
@@ -51,7 +53,9 @@ describe('FilterFromTo Filter', () => {
|
|
|
51
53
|
const value = 10;
|
|
52
54
|
await router.replace({ query: { [`${filterQuery}To`]: value } });
|
|
53
55
|
const setValueMock = vi.fn();
|
|
54
|
-
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementation(
|
|
56
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementation(
|
|
57
|
+
setValueMock,
|
|
58
|
+
);
|
|
55
59
|
shallowMount(FilterFromTo, mountOptions);
|
|
56
60
|
expect(setValueMock).toHaveBeenNthCalledWith(2, {
|
|
57
61
|
filter: filterQuery,
|
|
@@ -40,8 +40,13 @@ describe('Search Filter', () => {
|
|
|
40
40
|
const search = 'jest';
|
|
41
41
|
await router.replace({ query: { [filterQuery]: search } });
|
|
42
42
|
const setValueMock = vi.fn();
|
|
43
|
-
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(
|
|
43
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(
|
|
44
|
+
setValueMock,
|
|
45
|
+
);
|
|
44
46
|
shallowMount(SearchFilter, mountOptions);
|
|
45
|
-
expect(setValueMock).toHaveBeenCalledWith({
|
|
47
|
+
expect(setValueMock).toHaveBeenCalledWith({
|
|
48
|
+
filter: filterQuery,
|
|
49
|
+
value: search,
|
|
50
|
+
});
|
|
46
51
|
});
|
|
47
52
|
});
|
|
@@ -7,9 +7,21 @@
|
|
|
7
7
|
:track-by="filterSchema.storedProp"
|
|
8
8
|
:value="filterSchema.value"
|
|
9
9
|
v-bind="$attrs"
|
|
10
|
-
@closed="
|
|
10
|
+
@closed="
|
|
11
|
+
setValueToQuery({
|
|
12
|
+
value,
|
|
13
|
+
filterQuery,
|
|
14
|
+
storedProp: filterSchema.storedProp,
|
|
15
|
+
})
|
|
16
|
+
"
|
|
11
17
|
@input="setValue({ filter: filterQuery, value: $event })"
|
|
12
|
-
@reset="
|
|
18
|
+
@reset="
|
|
19
|
+
setValueToQuery({
|
|
20
|
+
value,
|
|
21
|
+
filterQuery,
|
|
22
|
+
storedProp: filterSchema.storedProp,
|
|
23
|
+
})
|
|
24
|
+
"
|
|
13
25
|
/>
|
|
14
26
|
</template>
|
|
15
27
|
|
|
@@ -37,6 +49,4 @@ export default {
|
|
|
37
49
|
};
|
|
38
50
|
</script>
|
|
39
51
|
|
|
40
|
-
<style scoped>
|
|
41
|
-
|
|
42
|
-
</style>
|
|
52
|
+
<style scoped></style>
|
|
@@ -7,9 +7,21 @@
|
|
|
7
7
|
:track-by="filterSchema.storedProp"
|
|
8
8
|
:value="value"
|
|
9
9
|
v-bind="$attrs"
|
|
10
|
-
@closed="
|
|
10
|
+
@closed="
|
|
11
|
+
setValueToQuery({
|
|
12
|
+
value,
|
|
13
|
+
filterQuery,
|
|
14
|
+
storedProp: filterSchema.storedProp,
|
|
15
|
+
})
|
|
16
|
+
"
|
|
11
17
|
@input="setValue({ filter: filterQuery, value: $event })"
|
|
12
|
-
@reset="
|
|
18
|
+
@reset="
|
|
19
|
+
setValueToQuery({
|
|
20
|
+
value,
|
|
21
|
+
filterQuery,
|
|
22
|
+
storedProp: filterSchema.storedProp,
|
|
23
|
+
})
|
|
24
|
+
"
|
|
13
25
|
/>
|
|
14
26
|
</template>
|
|
15
27
|
|
|
@@ -28,6 +40,4 @@ export default {
|
|
|
28
40
|
};
|
|
29
41
|
</script>
|
|
30
42
|
|
|
31
|
-
<style scoped>
|
|
32
|
-
|
|
33
|
-
</style>
|
|
43
|
+
<style scoped></style>
|
|
@@ -42,7 +42,10 @@ describe('Enum filter mixin', () => {
|
|
|
42
42
|
global: { plugins: [router] },
|
|
43
43
|
});
|
|
44
44
|
await wrapper.vm.$nextTick();
|
|
45
|
-
expect(setValue).toHaveBeenCalledWith({
|
|
45
|
+
expect(setValue).toHaveBeenCalledWith({
|
|
46
|
+
filter: 'direction',
|
|
47
|
+
value: options[0],
|
|
48
|
+
});
|
|
46
49
|
});
|
|
47
50
|
|
|
48
51
|
it('Sets empty array value if $route query is empty', async () => {
|