@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
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
const isPageHidden = () =>
|
|
2
|
-
document.hidden ||
|
|
2
|
+
document.hidden ||
|
|
3
|
+
document.msHidden ||
|
|
4
|
+
document.webkitHidden ||
|
|
5
|
+
document.mozHidden;
|
|
3
6
|
|
|
4
|
-
const preventHiddenPageCallsDecorator = (method) => (args) =>
|
|
7
|
+
const preventHiddenPageCallsDecorator = (method) => (args) =>
|
|
8
|
+
isPageHidden() || method(args);
|
|
5
9
|
export default preventHiddenPageCallsDecorator;
|
|
@@ -2,7 +2,9 @@ import { saveAs } from 'file-saver-es';
|
|
|
2
2
|
|
|
3
3
|
const saveAsJSON = (name, content) => {
|
|
4
4
|
const fileName = name.replace(/[ ,]+/g, '-');
|
|
5
|
-
const file = new Blob([JSON.stringify(content, null, 4)], {
|
|
5
|
+
const file = new Blob([JSON.stringify(content, null, 4)], {
|
|
6
|
+
type: 'application/json',
|
|
7
|
+
});
|
|
6
8
|
saveAs(file, fileName);
|
|
7
9
|
};
|
|
8
10
|
|
|
@@ -25,3 +25,14 @@ export const queryToSortAdapter = (order) => {
|
|
|
25
25
|
return SortSymbols.NONE;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
+
|
|
29
|
+
export const getNextSortOrder = (sort) => {
|
|
30
|
+
switch (sort) {
|
|
31
|
+
case SortSymbols.ASC:
|
|
32
|
+
return SortSymbols.DESC;
|
|
33
|
+
case SortSymbols.DESC:
|
|
34
|
+
return SortSymbols.NONE;
|
|
35
|
+
default:
|
|
36
|
+
return SortSymbols.ASC;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import BaseStoreModule from './BaseStoreModule.js';
|
|
2
2
|
|
|
3
|
-
const getParentIdFromContext = (context) =>
|
|
3
|
+
const getParentIdFromContext = (context) =>
|
|
4
|
+
context?.getters?.PARENT_ID || context?.state?.parentId;
|
|
4
5
|
|
|
5
6
|
export default class ApiStoreModule extends BaseStoreModule {
|
|
6
7
|
generateAPIActions(api) {
|
|
7
8
|
if (!api) throw new ReferenceError('pass API module!');
|
|
8
|
-
this.actions.GET_LIST = (
|
|
9
|
+
this.actions.GET_LIST = (
|
|
10
|
+
_,
|
|
11
|
+
{ context: callerContext = {}, params = {} },
|
|
12
|
+
) => {
|
|
9
13
|
if (!api.getList) throw Error('No API "getList" method provided');
|
|
10
14
|
return api.getList({
|
|
11
15
|
...callerContext.state,
|
|
@@ -14,7 +18,10 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
14
18
|
});
|
|
15
19
|
};
|
|
16
20
|
|
|
17
|
-
this.actions.GET_ITEM = (
|
|
21
|
+
this.actions.GET_ITEM = (
|
|
22
|
+
_,
|
|
23
|
+
{ context: callerContext = {}, params = {} } = {},
|
|
24
|
+
) => {
|
|
18
25
|
if (!api.get) throw Error('No API "get" method provided');
|
|
19
26
|
return api.get({
|
|
20
27
|
...callerContext.state,
|
|
@@ -23,7 +30,10 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
23
30
|
});
|
|
24
31
|
};
|
|
25
32
|
|
|
26
|
-
this.actions.POST_ITEM = (
|
|
33
|
+
this.actions.POST_ITEM = (
|
|
34
|
+
_,
|
|
35
|
+
{ context: callerContext = {}, ...rest } = {},
|
|
36
|
+
) => {
|
|
27
37
|
if (!api.add) throw Error('No API "add" method provided');
|
|
28
38
|
return api.add({
|
|
29
39
|
...callerContext.state,
|
|
@@ -32,7 +42,10 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
|
|
35
|
-
this.actions.PATCH_ITEM = (
|
|
45
|
+
this.actions.PATCH_ITEM = (
|
|
46
|
+
_,
|
|
47
|
+
{ context: callerContext = {}, id, changes, ...rest },
|
|
48
|
+
) => {
|
|
36
49
|
if (!api.patch) throw Error('No API "patch" method provided');
|
|
37
50
|
return api.patch({
|
|
38
51
|
...callerContext.state,
|
|
@@ -43,7 +56,10 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
43
56
|
});
|
|
44
57
|
};
|
|
45
58
|
|
|
46
|
-
this.actions.UPD_ITEM = (
|
|
59
|
+
this.actions.UPD_ITEM = (
|
|
60
|
+
_,
|
|
61
|
+
{ context: callerContext = {}, ...rest } = {},
|
|
62
|
+
) => {
|
|
47
63
|
if (!api.update) throw Error('No API "update" method provided');
|
|
48
64
|
return api.update({
|
|
49
65
|
...callerContext.state,
|
|
@@ -52,7 +68,10 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
52
68
|
});
|
|
53
69
|
};
|
|
54
70
|
|
|
55
|
-
this.actions.DELETE_ITEM = (
|
|
71
|
+
this.actions.DELETE_ITEM = (
|
|
72
|
+
_,
|
|
73
|
+
{ context: callerContext = {}, id, ...rest },
|
|
74
|
+
) => {
|
|
56
75
|
if (!api.delete) throw Error('No API "delete" method provided');
|
|
57
76
|
return api.delete({
|
|
58
77
|
...callerContext.state,
|
|
@@ -26,7 +26,8 @@ export default class BaseStoreModule {
|
|
|
26
26
|
this.actions.PATCH_ITEM = (context, { id, changes }) =>
|
|
27
27
|
this._APIModule.patch({ ...context.state, id, changes });
|
|
28
28
|
this.actions.UPD_ITEM = (context) => this._APIModule.update(context.state);
|
|
29
|
-
this.actions.DELETE_ITEM = (context, id) =>
|
|
29
|
+
this.actions.DELETE_ITEM = (context, id) =>
|
|
30
|
+
this._APIModule.delete({ ...context.state, id });
|
|
30
31
|
return this;
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -15,7 +15,10 @@ describe('Base Store Module', () => {
|
|
|
15
15
|
module = new BaseStoreModule();
|
|
16
16
|
});
|
|
17
17
|
it('attaches api module and generates API actions from it', () => {
|
|
18
|
-
const _module = module
|
|
18
|
+
const _module = module
|
|
19
|
+
.attachAPIModule(APIModule)
|
|
20
|
+
.generateAPIActions()
|
|
21
|
+
.getModule();
|
|
19
22
|
expect(_module.actions.GET_LIST).toBeTruthy();
|
|
20
23
|
expect(_module.actions.GET_ITEM).toBeTruthy();
|
|
21
24
|
expect(_module.actions.POST_ITEM).toBeTruthy();
|
|
@@ -28,7 +31,10 @@ describe('Base Store Module', () => {
|
|
|
28
31
|
const params = { jest2: 'jest1' };
|
|
29
32
|
const context = { state };
|
|
30
33
|
const expectedParams = { jest: 'jest', jest2: 'jest1' };
|
|
31
|
-
const _module = module
|
|
34
|
+
const _module = module
|
|
35
|
+
.attachAPIModule(APIModule)
|
|
36
|
+
.generateAPIActions()
|
|
37
|
+
.getModule();
|
|
32
38
|
_module.actions.GET_LIST(context, params);
|
|
33
39
|
expect(APIModule.getList).toHaveBeenCalledWith(expectedParams);
|
|
34
40
|
});
|
|
@@ -37,7 +43,10 @@ describe('Base Store Module', () => {
|
|
|
37
43
|
const params = { jest2: 'jest1' };
|
|
38
44
|
const context = { state };
|
|
39
45
|
const expectedParams = { jest: 'jest', jest2: 'jest1' };
|
|
40
|
-
const _module = module
|
|
46
|
+
const _module = module
|
|
47
|
+
.attachAPIModule(APIModule)
|
|
48
|
+
.generateAPIActions()
|
|
49
|
+
.getModule();
|
|
41
50
|
_module.actions.GET_ITEM(context, params);
|
|
42
51
|
expect(APIModule.get).toHaveBeenCalledWith(expectedParams);
|
|
43
52
|
});
|
|
@@ -45,7 +54,10 @@ describe('Base Store Module', () => {
|
|
|
45
54
|
const state = { jest: 'jest' };
|
|
46
55
|
const context = { state };
|
|
47
56
|
const expectedParams = { jest: 'jest' };
|
|
48
|
-
const _module = module
|
|
57
|
+
const _module = module
|
|
58
|
+
.attachAPIModule(APIModule)
|
|
59
|
+
.generateAPIActions()
|
|
60
|
+
.getModule();
|
|
49
61
|
_module.actions.POST_ITEM(context);
|
|
50
62
|
expect(APIModule.add).toHaveBeenCalledWith(expectedParams);
|
|
51
63
|
});
|
|
@@ -58,7 +70,10 @@ describe('Base Store Module', () => {
|
|
|
58
70
|
id: '1',
|
|
59
71
|
changes: { jest: 'my change!' },
|
|
60
72
|
};
|
|
61
|
-
const _module = module
|
|
73
|
+
const _module = module
|
|
74
|
+
.attachAPIModule(APIModule)
|
|
75
|
+
.generateAPIActions()
|
|
76
|
+
.getModule();
|
|
62
77
|
_module.actions.PATCH_ITEM(context, params);
|
|
63
78
|
expect(APIModule.patch).toHaveBeenCalledWith(expectedParams);
|
|
64
79
|
});
|
|
@@ -66,7 +81,10 @@ describe('Base Store Module', () => {
|
|
|
66
81
|
const state = { jest: 'jest' };
|
|
67
82
|
const context = { state };
|
|
68
83
|
const expectedParams = { jest: 'jest' };
|
|
69
|
-
const _module = module
|
|
84
|
+
const _module = module
|
|
85
|
+
.attachAPIModule(APIModule)
|
|
86
|
+
.generateAPIActions()
|
|
87
|
+
.getModule();
|
|
70
88
|
_module.actions.UPD_ITEM(context);
|
|
71
89
|
expect(APIModule.update).toHaveBeenCalledWith(expectedParams);
|
|
72
90
|
});
|
|
@@ -75,7 +93,10 @@ describe('Base Store Module', () => {
|
|
|
75
93
|
const params = '1';
|
|
76
94
|
const context = { state };
|
|
77
95
|
const expectedParams = { jest: 'jest', id: '1' };
|
|
78
|
-
const _module = module
|
|
96
|
+
const _module = module
|
|
97
|
+
.attachAPIModule(APIModule)
|
|
98
|
+
.generateAPIActions()
|
|
99
|
+
.getModule();
|
|
79
100
|
_module.actions.DELETE_ITEM(context, params);
|
|
80
101
|
expect(APIModule.delete).toHaveBeenCalledWith(expectedParams);
|
|
81
102
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const getNamespacedState = (state, namespace) =>
|
|
2
|
-
namespace
|
|
2
|
+
namespace
|
|
3
|
+
.split('/')
|
|
4
|
+
.reduce((subState, subNamespace) => subState[subNamespace], state);
|
|
3
5
|
|
|
4
6
|
export default getNamespacedState;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const getParentIdFromContext = (context) =>
|
|
1
|
+
const getParentIdFromContext = (context) =>
|
|
2
|
+
context?.getters?.PARENT_ID || context?.state?.parentId;
|
|
2
3
|
|
|
3
4
|
const state = () => ({
|
|
4
5
|
api: null,
|
|
@@ -8,7 +9,8 @@ const getters = {};
|
|
|
8
9
|
|
|
9
10
|
const actions = {
|
|
10
11
|
GET_LIST: (apiContext, { context: callerContext = {}, params = {} }) => {
|
|
11
|
-
if (!apiContext.state.api.getList)
|
|
12
|
+
if (!apiContext.state.api.getList)
|
|
13
|
+
throw Error('No API "getList" method provided');
|
|
12
14
|
return apiContext.state.api.getList({
|
|
13
15
|
...callerContext.state,
|
|
14
16
|
parentId: getParentIdFromContext(callerContext),
|
|
@@ -35,7 +37,8 @@ const actions = {
|
|
|
35
37
|
},
|
|
36
38
|
|
|
37
39
|
UPD_ITEM: (apiContext, { context: callerContext = {}, ...rest } = {}) => {
|
|
38
|
-
if (!apiContext.state.api.update)
|
|
40
|
+
if (!apiContext.state.api.update)
|
|
41
|
+
throw Error('No API "update" method provided');
|
|
39
42
|
return apiContext.state.api.update({
|
|
40
43
|
...callerContext.state,
|
|
41
44
|
parentId: getParentIdFromContext(callerContext),
|
|
@@ -43,8 +46,12 @@ const actions = {
|
|
|
43
46
|
});
|
|
44
47
|
},
|
|
45
48
|
|
|
46
|
-
PATCH_ITEM: (
|
|
47
|
-
|
|
49
|
+
PATCH_ITEM: (
|
|
50
|
+
apiContext,
|
|
51
|
+
{ context: callerContext = {}, id, changes, ...rest },
|
|
52
|
+
) => {
|
|
53
|
+
if (!apiContext.state.api.patch)
|
|
54
|
+
throw Error('No API "patch" method provided');
|
|
48
55
|
return apiContext.state.api.patch({
|
|
49
56
|
...callerContext.state,
|
|
50
57
|
parentId: getParentIdFromContext(callerContext),
|
|
@@ -55,7 +62,8 @@ const actions = {
|
|
|
55
62
|
},
|
|
56
63
|
|
|
57
64
|
DELETE_ITEM: (apiContext, { context: callerContext = {}, id, ...rest }) => {
|
|
58
|
-
if (!apiContext.state.api.delete)
|
|
65
|
+
if (!apiContext.state.api.delete)
|
|
66
|
+
throw Error('No API "delete" method provided');
|
|
59
67
|
return apiContext.state.api.delete({
|
|
60
68
|
...callerContext.state,
|
|
61
69
|
parentId: getParentIdFromContext(callerContext),
|
|
@@ -68,7 +76,8 @@ const actions = {
|
|
|
68
76
|
apiContext,
|
|
69
77
|
{ context: callerContext = {}, params = {} },
|
|
70
78
|
) => {
|
|
71
|
-
if (!apiContext.state.api.getList)
|
|
79
|
+
if (!apiContext.state.api.getList)
|
|
80
|
+
throw Error('No API "getPermissionsList" method provided');
|
|
72
81
|
return apiContext.state.api.getPermissionsList({
|
|
73
82
|
...callerContext.state,
|
|
74
83
|
parentId: getParentIdFromContext(callerContext),
|
|
@@ -78,14 +87,10 @@ const actions = {
|
|
|
78
87
|
|
|
79
88
|
PATCH_OBJECT_PERMISSIONS_ITEM: (
|
|
80
89
|
apiContext,
|
|
81
|
-
{
|
|
82
|
-
context: callerContext = {},
|
|
83
|
-
id,
|
|
84
|
-
changes,
|
|
85
|
-
...rest
|
|
86
|
-
},
|
|
90
|
+
{ context: callerContext = {}, id, changes, ...rest },
|
|
87
91
|
) => {
|
|
88
|
-
if (!apiContext.state.api.patch)
|
|
92
|
+
if (!apiContext.state.api.patch)
|
|
93
|
+
throw Error('No API "patchPermissions" method provided');
|
|
89
94
|
return apiContext.state.api.patchPermissions({
|
|
90
95
|
...callerContext.state,
|
|
91
96
|
parentId: getParentIdFromContext(callerContext),
|
|
@@ -9,8 +9,12 @@ export const useCardStore = (namespace) => {
|
|
|
9
9
|
? namespace
|
|
10
10
|
: `${namespace}/card`;
|
|
11
11
|
|
|
12
|
-
const id = computed(
|
|
13
|
-
|
|
12
|
+
const id = computed(
|
|
13
|
+
() => getNamespacedState(store.state, cardNamespace).itemId,
|
|
14
|
+
);
|
|
15
|
+
const itemInstance = computed(
|
|
16
|
+
() => getNamespacedState(store.state, cardNamespace).itemInstance,
|
|
17
|
+
);
|
|
14
18
|
|
|
15
19
|
function loadItem(payload) {
|
|
16
20
|
return store.dispatch(`${cardNamespace}/LOAD_ITEM`, payload);
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
2
2
|
import { createStore } from 'vuex';
|
|
3
|
-
import FilterEvent
|
|
4
|
-
|
|
5
|
-
import FiltersStoreModule
|
|
6
|
-
from '../../../../../modules/Filters/store/FiltersStoreModule.js';
|
|
3
|
+
import FilterEvent from '../../../../../modules/Filters/enums/FilterEvent.enum.js';
|
|
4
|
+
import FiltersStoreModule from '../../../../../modules/Filters/store/FiltersStoreModule.js';
|
|
7
5
|
import { SortSymbols } from '../../../../../scripts/sortQueryAdapters.js';
|
|
8
|
-
import {
|
|
9
|
-
createTableStoreModule,
|
|
10
|
-
} from '../../../helpers/createTableStoreModule.js';
|
|
6
|
+
import { createTableStoreModule } from '../../../helpers/createTableStoreModule.js';
|
|
11
7
|
|
|
12
8
|
describe('TableStoreModule', () => {
|
|
13
9
|
it('correctly computes FIELDS getter', () => {
|
|
@@ -240,7 +236,9 @@ describe('TableStoreModule integration with FiltersStoreModule', () => {
|
|
|
240
236
|
value: ['surname'],
|
|
241
237
|
});
|
|
242
238
|
|
|
243
|
-
expect(store.getters['table/filters/GET_FILTER']('fields')).toEqual([
|
|
239
|
+
expect(store.getters['table/filters/GET_FILTER']('fields')).toEqual([
|
|
240
|
+
'surname',
|
|
241
|
+
]);
|
|
244
242
|
|
|
245
243
|
expect(store.getters['table/FIELDS']).toEqual(['id', 'included']);
|
|
246
244
|
|
|
@@ -48,7 +48,8 @@ const getters = {
|
|
|
48
48
|
|
|
49
49
|
const actions = {
|
|
50
50
|
// FIXME: maybe move to filters module?
|
|
51
|
-
SET_FILTER: (context, payload) =>
|
|
51
|
+
SET_FILTER: (context, payload) =>
|
|
52
|
+
context.dispatch('filters/SET_FILTER', payload),
|
|
52
53
|
|
|
53
54
|
// FIXME: maybe move to filters module?
|
|
54
55
|
ON_FILTER_EVENT: async (context, { event, payload }) => {
|
|
@@ -67,14 +68,16 @@ const actions = {
|
|
|
67
68
|
// FIXME: maybe move to filters module?
|
|
68
69
|
HANDLE_FILTERS_RESTORE: async (context, { fields, sort }) => {
|
|
69
70
|
if (sort) await context.dispatch('HANDLE_SORT_CHANGE', { value: sort });
|
|
70
|
-
if (fields?.length)
|
|
71
|
+
if (fields?.length)
|
|
72
|
+
await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
|
|
71
73
|
return context.dispatch('LOAD_DATA_LIST');
|
|
72
74
|
},
|
|
73
75
|
|
|
74
76
|
// FIXME: maybe move to filters module?
|
|
75
77
|
HANDLE_FILTER_RESET: async (context, { fields, sort }) => {
|
|
76
78
|
if (sort) await context.dispatch('HANDLE_SORT_CHANGE', { value: sort });
|
|
77
|
-
if (fields?.length)
|
|
79
|
+
if (fields?.length)
|
|
80
|
+
await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
|
|
78
81
|
return context.dispatch('LOAD_DATA_LIST');
|
|
79
82
|
},
|
|
80
83
|
|
|
@@ -112,17 +115,19 @@ const actions = {
|
|
|
112
115
|
const nextSort = queryToSortAdapter(value?.slice(0, 1) || '');
|
|
113
116
|
const field = nextSort ? value.slice(1) : value;
|
|
114
117
|
|
|
115
|
-
const headers = context.state.headers.map(
|
|
116
|
-
|
|
118
|
+
const headers = context.state.headers.map(
|
|
119
|
+
({ sort: currentSort, ...header }) => {
|
|
120
|
+
let sort;
|
|
117
121
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
if (field) {
|
|
123
|
+
sort = field === header.field ? nextSort : currentSort;
|
|
124
|
+
} else {
|
|
125
|
+
sort = nextSort; // null
|
|
126
|
+
}
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
return { ...header, sort };
|
|
129
|
+
},
|
|
130
|
+
);
|
|
126
131
|
|
|
127
132
|
context.commit('SET', { path: 'headers', value: headers });
|
|
128
133
|
},
|
|
@@ -133,13 +138,13 @@ const actions = {
|
|
|
133
138
|
|
|
134
139
|
const params = context.getters.GET_LIST_PARAMS(query);
|
|
135
140
|
try {
|
|
136
|
-
const {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
const { items = [], next = false } = await context.dispatch(
|
|
142
|
+
'GET_LIST_API',
|
|
143
|
+
{
|
|
144
|
+
context,
|
|
145
|
+
params,
|
|
146
|
+
},
|
|
147
|
+
);
|
|
143
148
|
|
|
144
149
|
context.commit('SET', { path: 'dataList', value: items });
|
|
145
150
|
context.commit('SET', { path: 'isNextPage', value: next });
|
|
@@ -222,21 +227,19 @@ const actions = {
|
|
|
222
227
|
},
|
|
223
228
|
|
|
224
229
|
DELETE_BULK: async (context, deleted) =>
|
|
225
|
-
Promise.allSettled(
|
|
230
|
+
Promise.allSettled(
|
|
231
|
+
deleted.map((item) => context.dispatch('DELETE_SINGLE', item)),
|
|
232
|
+
),
|
|
226
233
|
|
|
227
234
|
SET_SELECTED: (context, selected) => {
|
|
228
235
|
context.commit('SET', { path: 'selected', value: selected });
|
|
229
236
|
},
|
|
230
237
|
|
|
231
238
|
GET_LIST_API: (context, payload) => context.dispatch('api/GET_LIST', payload),
|
|
232
|
-
PATCH_ITEM_API: (
|
|
233
|
-
context,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
DELETE_ITEM_API: (
|
|
237
|
-
context,
|
|
238
|
-
payload,
|
|
239
|
-
) => context.dispatch('api/DELETE_ITEM', payload),
|
|
239
|
+
PATCH_ITEM_API: (context, payload) =>
|
|
240
|
+
context.dispatch('api/PATCH_ITEM', payload),
|
|
241
|
+
DELETE_ITEM_API: (context, payload) =>
|
|
242
|
+
context.dispatch('api/DELETE_ITEM', payload),
|
|
240
243
|
|
|
241
244
|
RESET_TABLE_STATE: async (context) => {
|
|
242
245
|
context.commit('RESET_TABLE_STATE');
|
|
@@ -7,17 +7,29 @@ export const useTableStore = (namespace) => {
|
|
|
7
7
|
|
|
8
8
|
const tableNamespace = `${namespace}/table`;
|
|
9
9
|
|
|
10
|
-
const dataList = computed(
|
|
10
|
+
const dataList = computed(
|
|
11
|
+
() => getNamespacedState(store.state, tableNamespace).dataList,
|
|
12
|
+
);
|
|
11
13
|
|
|
12
|
-
const selected = computed(
|
|
14
|
+
const selected = computed(
|
|
15
|
+
() => getNamespacedState(store.state, tableNamespace).selected,
|
|
16
|
+
);
|
|
13
17
|
|
|
14
|
-
const isLoading = computed(
|
|
18
|
+
const isLoading = computed(
|
|
19
|
+
() => getNamespacedState(store.state, tableNamespace).isLoading,
|
|
20
|
+
);
|
|
15
21
|
|
|
16
|
-
const headers = computed(
|
|
22
|
+
const headers = computed(
|
|
23
|
+
() => getNamespacedState(store.state, tableNamespace).headers,
|
|
24
|
+
);
|
|
17
25
|
|
|
18
|
-
const isNext = computed(
|
|
26
|
+
const isNext = computed(
|
|
27
|
+
() => getNamespacedState(store.state, tableNamespace).isNextPage,
|
|
28
|
+
);
|
|
19
29
|
|
|
20
|
-
const error = computed(
|
|
30
|
+
const error = computed(
|
|
31
|
+
() => getNamespacedState(store.state, tableNamespace).errors,
|
|
32
|
+
);
|
|
21
33
|
|
|
22
34
|
function loadData(payload) {
|
|
23
35
|
return store.dispatch(`${tableNamespace}/LOAD_DATA_LIST`, payload);
|
|
@@ -42,7 +42,8 @@ describe('Variable search validator', () => {
|
|
|
42
42
|
expect(variableSearchValidator(searchValue)).toBe(true);
|
|
43
43
|
});
|
|
44
44
|
it('Multiple "=" search', () => {
|
|
45
|
-
const searchValue =
|
|
45
|
+
const searchValue =
|
|
46
|
+
'height=5 feet 5½ inches (166 cm), age=1231, fin=123231';
|
|
46
47
|
expect(variableSearchValidator(searchValue)).toBe(false);
|
|
47
48
|
});
|
|
48
49
|
});
|
|
@@ -20,7 +20,9 @@ describe('websocketValidator', () => {
|
|
|
20
20
|
expect(websocketValidator('wss://example.com/ws')).toBe(true);
|
|
21
21
|
});
|
|
22
22
|
it('truthy case 7: dns name', () => {
|
|
23
|
-
expect(
|
|
23
|
+
expect(
|
|
24
|
+
websocketValidator('wss://socket.socket.com/v3/channel_123?api_key=123'),
|
|
25
|
+
).toBe(true);
|
|
24
26
|
});
|
|
25
27
|
it('falsy case 1: empty string', () => {
|
|
26
28
|
expect(websocketValidator('')).toBe(false);
|
|
File without changes
|
|
File without changes
|