@webitel/ui-sdk 0.1.3-vue3 → 0.1.4-vite
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/README.md +1 -1
- package/dist/img/sprite/arrow-mix.svg +5 -0
- package/dist/img/sprite/azure.svg +19 -0
- package/dist/img/sprite/email.svg +3 -0
- package/dist/img/sprite/index.js +1 -1
- package/dist/img/sprite/meta.svg +17 -0
- package/dist/img/sprite/options.svg +5 -0
- package/dist/img/sprite/role.svg +3 -0
- package/dist/img/sprite/scorecard.svg +4 -0
- package/dist/img/sprite/user.svg +3 -0
- package/dist/ui-sdk.common.js +36397 -11631
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +36402 -11636
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +27 -4
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +24 -8
- package/src/api/axios/generateInstance.js +25 -0
- package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.js +6 -0
- package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.js +9 -0
- package/src/api/defaults/index.js +7 -0
- package/src/api/interceptors/request/updateToken.interceptor.js +10 -0
- package/src/api/interceptors/response/handleUnauthorized.interceptor.js +12 -0
- package/src/api/transformers/applyTransform.js +8 -0
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.js +4 -0
- package/src/api/transformers/generateUrl/generateUrl.transformer.js +13 -0
- package/src/api/transformers/index.js +23 -0
- package/src/api/transformers/log/log.transformer.js +6 -0
- package/src/api/transformers/merge/merge.transformer.js +5 -0
- package/src/api/transformers/mergeEach/mergeEach.transformer.js +8 -0
- package/src/api/transformers/notify/notify.transformer.js +32 -0
- package/src/api/transformers/sanitize/sanitize.transformer.js +12 -0
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.js +4 -0
- package/src/api/transformers/starToSearch/starToSearch.transformer.js +12 -0
- package/src/components/index.js +63 -55
- package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +25 -0
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +48 -0
- package/src/components/transitions/wt-expand-transition.vue +41 -39
- package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppNavigator.spec.js +2 -2
- package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtHeaderActions.spec.js +1 -1
- package/src/{css/components/organisms → components}/wt-app-header/_variables.scss +3 -2
- package/src/components/wt-app-header/wt-app-header.vue +29 -0
- package/src/components/{organisms/wt-app-header → wt-app-header}/wt-app-navigator.vue +69 -40
- package/src/components/wt-avatar/_variables.scss +32 -0
- package/src/components/wt-avatar/wt-avatar.vue +187 -0
- package/src/components/{atoms/wt-badge → wt-badge}/wt-badge.vue +20 -13
- package/src/components/wt-button/Readme.md +23 -0
- package/src/components/{atoms/wt-button → wt-button}/__tests__/WtButton.spec.js +1 -1
- package/src/components/wt-button/_variables.scss +41 -0
- package/src/components/wt-button/wt-button.vue +205 -0
- package/src/components/wt-button-select/Readme.md +13 -0
- package/src/components/{molecules/wt-button-select → wt-button-select}/__tests__/WtButtonSelect.spec.js +16 -5
- package/src/components/wt-button-select/_variables.scss +7 -0
- package/src/components/wt-button-select/wt-button-select.vue +130 -0
- package/src/components/{molecules/wt-checkbox → wt-checkbox}/__tests__/WtCheckbox.spec.js +6 -6
- package/src/components/wt-checkbox/wt-checkbox.vue +191 -0
- package/src/{css/components/atoms → components}/wt-chip/wt-chip.scss +1 -1
- package/src/components/wt-chip/wt-chip.vue +24 -0
- package/src/components/{atoms/wt-context-menu → wt-context-menu}/__tests__/WtContextMenu.spec.js +1 -1
- package/src/{css/components/atoms → components}/wt-context-menu/_variables.scss +2 -0
- package/src/components/{atoms/wt-context-menu → wt-context-menu}/wt-context-menu.vue +68 -42
- package/src/components/{molecules/wt-datepicker → wt-datepicker}/__tests__/WtDatepicker.spec.js +4 -4
- package/src/components/wt-datepicker/_variables.scss +56 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +240 -0
- package/src/components/wt-divider/wt-divider.vue +30 -0
- package/src/components/wt-dummy/__tests__/WtDummy.spec.js +9 -0
- package/src/components/wt-dummy/wt-dummy.vue +73 -0
- package/src/components/{organisms/wt-error-page → wt-error-page}/__tests__/wt-error-page.spec.js +3 -3
- package/src/components/{organisms/wt-error-page → wt-error-page}/wt-error-page.vue +2 -2
- package/src/components/wt-expansion-panel/__tests__/WtExpansionPanel.spec.js +9 -0
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +67 -0
- package/src/components/{organisms/wt-filters-panel-wrapper → wt-filters-panel-wrapper}/wt-filters-panel-wrapper.vue +6 -6
- package/src/components/{organisms/wt-headline → wt-headline}/wt-headline.vue +5 -0
- package/src/components/wt-headline-nav/Readme.md +9 -0
- package/src/components/{organisms/wt-headline-nav → wt-headline-nav}/__tests__/wt-headline-nav.spec.js +1 -1
- package/src/components/wt-headline-nav/_variables.scss +8 -0
- package/src/components/{organisms/wt-headline-nav → wt-headline-nav}/wt-headline-nav.vue +41 -29
- package/src/components/{molecules/wt-hint → wt-hint}/wt-hint.vue +7 -1
- package/src/components/wt-icon/Readme.md +327 -0
- package/src/components/{atoms/wt-icon → wt-icon}/__tests__/WtIcon.spec.js +2 -2
- package/src/components/wt-icon/_variables.scss +31 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
- package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
- package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
- package/src/components/wt-icon/wt-icon.vue +172 -0
- package/src/components/wt-icon-action/__tests__/WtIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtAddIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDownloadIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtEditIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtHistoryIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtRefreshIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +27 -0
- package/src/components/wt-icon-action/wt-icon-action.vue +54 -0
- package/src/components/wt-icon-btn/Readme.md +10 -0
- package/src/components/{molecules/wt-icon-btn → wt-icon-btn}/__tests__/WtIconBtn.spec.js +2 -2
- package/src/components/wt-icon-btn/_variables.scss +9 -0
- package/src/components/wt-icon-btn/wt-icon-btn.vue +47 -0
- package/src/components/{atoms/wt-indicator → wt-indicator}/__tests__/WtIndicator.spec.js +2 -2
- package/src/{css/components/atoms → components}/wt-indicator/_variables.scss +3 -3
- package/src/components/{atoms/wt-indicator → wt-indicator}/wt-indicator.vue +5 -0
- package/src/components/{molecules/wt-input → wt-input}/__tests__/WtInput.spec.js +3 -3
- package/src/components/{molecules/wt-input → wt-input}/wt-input.vue +40 -20
- package/src/{css/components/atoms → components}/wt-input-info/_variables.scss +2 -2
- package/src/components/wt-input-info/wt-input-info.vue +40 -0
- package/src/components/wt-item-link/__tests__/WtItemLink.spec.js +9 -0
- package/src/components/wt-item-link/wt-item-link.vue +57 -0
- package/src/components/{molecules/wt-label → wt-label}/wt-label.vue +5 -0
- package/src/components/{molecules/wt-load-bar → wt-load-bar}/wt-load-bar.vue +7 -2
- package/src/{css/components/atoms → components}/wt-loader/_variables.scss +2 -2
- package/src/components/{atoms/wt-loader → wt-loader}/wt-loader.vue +22 -17
- package/src/components/{organisms/wt-navigation-bar → wt-navigation-bar}/__tests__/WtNavigationBar.spec.js +22 -18
- package/src/components/{organisms/wt-navigation-bar → wt-navigation-bar}/wt-navigation-bar.vue +27 -16
- package/src/components/{molecules/wt-notification → wt-notification}/__tests__/WtNotification.spec.js +1 -1
- package/src/components/wt-notification/wt-notification.vue +86 -0
- package/src/components/{organisms/wt-notifications-bar → wt-notifications-bar}/__tests__/WtNotificationsBar.spec.js +6 -6
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +78 -0
- package/src/components/wt-page-header/__tests__/wt-page-header.spec.js +9 -0
- package/src/components/wt-page-header/wt-page-header.vue +83 -0
- package/src/components/{organisms/wt-page-wrapper → wt-page-wrapper}/wt-page-wrapper.vue +6 -0
- package/src/components/{organisms/wt-pagination → wt-pagination}/__tests__/WtPagination.spec.js +2 -1
- package/src/components/{organisms/wt-pagination → wt-pagination}/wt-pagination.vue +7 -1
- package/src/{css/components/organisms → components}/wt-player/_variables.scss +1 -1
- package/src/components/{organisms/wt-player → wt-player}/wt-player.vue +10 -5
- package/src/components/{molecules/wt-popup → wt-popup}/wt-popup.vue +5 -0
- package/src/components/{molecules/wt-progress-bar → wt-progress-bar}/__tests__/WtProgressBar.spec.js +2 -2
- package/src/{css/components/molecules → components}/wt-progress-bar/_variables.scss +2 -2
- package/src/components/{molecules/wt-progress-bar → wt-progress-bar}/wt-progress-bar.vue +13 -3
- package/src/components/{molecules/wt-radio → wt-radio}/__tests__/WtRadio.spec.js +6 -6
- package/src/components/wt-radio/wt-radio.vue +180 -0
- package/src/components/wt-rounded-action/Readme.md +68 -0
- package/src/components/{atoms/wt-rounded-action → wt-rounded-action}/__tests__/WtRoundedAction.spec.js +1 -1
- package/src/components/wt-rounded-action/_variables.scss +14 -0
- package/src/components/wt-rounded-action/wt-rounded-action.vue +139 -0
- package/src/components/{molecules/wt-search-bar → wt-search-bar}/__tests__/WtSearchBar.spec.js +9 -0
- package/src/components/wt-search-bar/wt-search-bar.vue +222 -0
- package/src/components/{molecules/wt-select → wt-select}/__tests__/WtSelect.spec.js +3 -3
- package/src/components/{molecules/wt-select → wt-select}/mixins/__tests__/multiselectMixin.spec.js +4 -4
- package/src/components/{molecules/wt-select → wt-select}/mixins/multiselectMixin.js +9 -4
- package/src/components/{molecules/wt-select → wt-select}/wt-select.vue +23 -9
- package/src/components/{molecules/wt-slider → wt-slider}/wt-slider.vue +8 -3
- package/src/components/{organisms/wt-status-select → wt-status-select}/__tests__/WtStatusSelect.spec.js +1 -1
- package/src/components/{organisms/wt-status-select → wt-status-select}/_internals/StatusOptions.lookup.js +1 -1
- package/src/components/{organisms/wt-status-select → wt-status-select}/wt-status-select.vue +27 -23
- package/src/components/wt-stepper/__tests__/WtStepper.spec.vue.js +18 -0
- package/src/components/wt-stepper/wt-stepper.vue +89 -0
- package/src/components/{molecules/wt-switcher → wt-switcher}/__tests__/WtSwitcher.spec.js +5 -5
- package/src/components/wt-switcher/wt-switcher.vue +191 -0
- package/src/components/{organisms/wt-table → wt-table}/__tests__/WtTable.spec.js +11 -11
- package/src/components/{organisms/wt-table → wt-table}/wt-table.vue +20 -3
- package/src/components/{organisms/wt-table-actions → wt-table-actions}/wt-table-actions.vue +5 -0
- package/src/components/{organisms/wt-table-column-select → wt-table-column-select}/__tests__/WtTableColumnSelect.spec.js +3 -3
- package/src/components/wt-table-column-select/wt-table-column-select.vue +178 -0
- package/src/components/{molecules/wt-tabs → wt-tabs}/__tests__/WtTabs.spec.js +3 -3
- package/src/{css/components/molecules → components}/wt-tabs/_variables.scss +1 -1
- package/src/components/{molecules/wt-tabs → wt-tabs}/wt-tabs.vue +9 -1
- package/src/components/{molecules/wt-tags-input → wt-tags-input}/__tests__/WtTagsInput.spec.js +7 -7
- package/src/components/{molecules/wt-tags-input → wt-tags-input}/wt-tags-input.vue +18 -7
- package/src/components/{molecules/wt-textarea → wt-textarea}/__tests__/WtTextarea.spec.js +4 -4
- package/src/components/wt-textarea/wt-textarea.vue +223 -0
- package/src/components/{molecules/wt-time-input → wt-time-input}/__tests__/WtTimeInput.spec.js +3 -3
- package/src/components/wt-time-input/wt-time-input.vue +187 -0
- package/src/components/{molecules/wt-timepicker → wt-timepicker}/__tests__/WtTimepicker.spec.js +13 -13
- package/src/components/{molecules/wt-timepicker → wt-timepicker}/wt-timepicker.vue +13 -5
- package/src/components/{atoms/wt-tooltip → wt-tooltip}/__tests__/WtTooltip.spec.js +1 -1
- package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +68 -0
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +48 -0
- package/src/components/wt-tooltip/_variables.scss +11 -0
- package/src/components/wt-tooltip/wt-tooltip.vue +150 -0
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +14 -0
- package/src/composables/useCachedInterval/useCachedInterval.js +21 -0
- package/src/composables/useDestroyableSortable/useDestroyableSortable.js +66 -0
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +83 -0
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +37 -0
- package/src/css/main.scss +0 -3
- package/src/css/styleguide/colors/_colors.scss +177 -147
- package/src/css/styleguide/colors/_deprecated.scss +151 -0
- package/src/css/styleguide/colors/_palette.scss +358 -0
- package/src/directives/clickaway/clickaway.js +3 -0
- package/src/directives/index.js +7 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +4 -0
- package/src/enums/WebitelApplications/AuditorSections.enum.js +5 -0
- package/src/enums/WebitelApplications/CrmSections.enum.js +5 -0
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +1 -0
- package/src/locale/.DS_Store +0 -0
- package/src/locale/en/en.js +96 -13
- package/src/locale/es/es.js +282 -0
- package/src/locale/i18n.js +4 -0
- package/src/locale/ru/ru.js +97 -12
- package/src/locale/ua/ua.js +98 -13
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +5 -7
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +17 -13
- package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +23 -31
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +12 -15
- package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +12 -12
- package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +2 -2
- package/src/mixins/dataFilterMixins/paginationFilterMixin.js +3 -3
- package/src/mixins/dataFilterMixins/sortFilterMixin.js +2 -2
- package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +5 -5
- package/src/mixins/validationMixin/useValidation.js +41 -0
- package/src/mixins/validationMixin/validationMixin.js +17 -12
- package/src/modules/AgentStatusSelect/api/agent-status.js +24 -0
- package/src/modules/AgentStatusSelect/api/pause-cause.js +47 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +83 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +18 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +122 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +55 -0
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +107 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-read-wrapper.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +60 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +70 -0
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +132 -0
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +154 -0
- package/src/modules/AuditForm/components/audit-form-question.vue +136 -0
- package/src/modules/AuditForm/components/audit-form.vue +183 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +24 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +45 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +89 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +97 -0
- package/src/modules/AuditForm/components/questions/score/__tests__/audit-form-question-score.spec.js +30 -0
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +132 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionOptionsSchema.js +13 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionSchema.js +8 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionScoreSchema.js +8 -0
- package/src/modules/CardStoreModule/composables/useCardStore.js +55 -0
- package/src/modules/CardStoreModule/store/CardStoreModule.js +84 -0
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +87 -0
- package/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js +28 -0
- package/src/modules/FilesExport/FilesExport.js +4 -1
- package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -1
- package/src/modules/Filters/classes/BaseFilterSchema.js +13 -0
- package/src/modules/Filters/components/filter-pagination.vue +61 -0
- package/src/modules/Filters/components/filter-table-fields.vue +61 -0
- package/src/modules/Filters/composables/useTableFilters.js +17 -0
- package/src/modules/Filters/restores/filterFieldsRestore.js +9 -0
- package/src/modules/Filters/restores/readme.md +1 -0
- package/src/modules/Filters/store/FiltersStoreModule.js +181 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +10 -12
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +10 -12
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +12 -12
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +10 -12
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +10 -12
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +1 -1
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +1 -1
- package/src/modules/QueryFilters/components/filter-datetime.vue +4 -3
- package/src/modules/QueryFilters/components/filter-from-to.vue +15 -8
- package/src/modules/QueryFilters/components/filter-table-fields.vue +101 -0
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +11 -11
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +11 -13
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +18 -25
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +14 -9
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +12 -14
- package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +2 -2
- package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +4 -4
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +21 -8
- package/src/modules/TableStoreModule/composables/useTableStore.js +58 -0
- package/src/modules/TableStoreModule/store/TableStoreModule.js +207 -0
- package/src/modules/Userinfo/api/auth.js +6 -4
- package/src/modules/Userinfo/api/userinfo.js +16 -4
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +27 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +11 -12
- package/src/modules/Userinfo/components/the-auth.vue +1 -1
- package/src/modules/Userinfo/enums/Permissions.enum.js +7 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +41 -1
- package/src/plugins/breakpoint/breakpoint.plugin.js +5 -4
- package/src/scripts/__tests__/updateObject.spec.js +19 -0
- package/src/scripts/caseConverters.js +2 -2
- package/src/scripts/debounce.js +3 -9
- package/src/scripts/eventBus.js +7 -3
- package/src/scripts/updateObject.js +6 -0
- package/src/store/BaseStoreModules/ApiStoreModule.js +93 -0
- package/src/store/ReactiveNowStoreModule/ReactiveNowStoreModule.js +27 -0
- package/src/validators/decimalValidator.js +9 -0
- package/src/validators/domainValidator.js +5 -0
- package/src/components/atoms/wt-avatar/wt-avatar.vue +0 -102
- package/src/components/atoms/wt-button/wt-button.vue +0 -288
- package/src/components/atoms/wt-chip/wt-chip.vue +0 -23
- package/src/components/atoms/wt-divider/wt-divider.vue +0 -25
- package/src/components/atoms/wt-icon/wt-icon.vue +0 -150
- package/src/components/atoms/wt-input-info/wt-input-info.vue +0 -35
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +0 -156
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +0 -48
- package/src/components/molecules/wt-button-select/wt-button-select.vue +0 -184
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +0 -179
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +0 -203
- package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +0 -79
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +0 -300
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +0 -75
- package/src/components/molecules/wt-notification/wt-notification.vue +0 -75
- package/src/components/molecules/wt-radio/wt-radio.vue +0 -170
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +0 -194
- package/src/components/molecules/wt-switcher/wt-switcher.vue +0 -182
- package/src/components/molecules/wt-textarea/wt-textarea.vue +0 -215
- package/src/components/molecules/wt-time-input/wt-time-input.vue +0 -190
- package/src/components/organisms/wt-app-header/wt-app-header.vue +0 -24
- package/src/components/organisms/wt-notifications-bar/wt-notifications-bar.vue +0 -71
- package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +0 -9
- package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +0 -9
- package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +0 -21
- package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +0 -22
- package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +0 -120
- package/src/css/components/_components.scss +0 -45
- package/src/css/components/atoms/wt-avatar/_variables.scss +0 -14
- package/src/css/components/atoms/wt-button/_variables.scss +0 -47
- package/src/css/components/atoms/wt-icon/_variables.scss +0 -8
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +0 -7
- package/src/css/components/atoms/wt-tooltip/_variables.scss +0 -29
- package/src/css/components/molecules/wt-button-select/_variables.scss +0 -18
- package/src/css/components/molecules/wt-datepicker/_variables.scss +0 -21
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +0 -90
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +0 -11
- package/src/css/components/molecules/wt-icon-btn/_variables.scss +0 -3
- package/src/css/components/organisms/wt-headline-nav/_variables.scss +0 -5
- /package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppHeader.spec.js +0 -0
- /package/src/components/{organisms/wt-app-header → wt-app-header}/wt-header-actions.vue +0 -0
- /package/src/components/{atoms/wt-avatar → wt-avatar}/__tests__/wt-avatar.spec.js +0 -0
- /package/src/components/{atoms/wt-badge → wt-badge}/__tests__/wt-badge.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-badge/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-checkbox/_variables.scss +0 -0
- /package/src/components/{atoms/wt-chip → wt-chip}/__tests__/WtChip.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-chip/_variables.scss +0 -0
- /package/src/components/{molecules/wt-copy-action → wt-copy-action}/__tests__/WtCopyAction.spec.js +0 -0
- /package/src/components/{molecules/wt-copy-action → wt-copy-action}/wt-copy-action.vue +0 -0
- /package/src/components/{atoms/wt-divider → wt-divider}/__tests__/WtDivider.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-divider/_variables.scss +0 -0
- /package/src/components/{organisms/wt-filters-panel-wrapper/__tests__/wt-filters-panel-wrapper.spec.js → wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js} +0 -0
- /package/src/components/{organisms/wt-headline → wt-headline}/__tests__/WtHeadline.spec.js +0 -0
- /package/src/{css/components/organisms → components}/wt-headline/_variables.scss +0 -0
- /package/src/components/{molecules/wt-hint → wt-hint}/__tests__/WtHint.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-input/_variables.scss +0 -0
- /package/src/components/{atoms/wt-input-info → wt-input-info}/__tests__/WtInputInfo.spec.js +0 -0
- /package/src/components/{molecules/wt-label → wt-label}/__tests__/WtLabel.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-label/_variables.scss +0 -0
- /package/src/components/{molecules/wt-label → wt-label}/mixins/labelUsageMixin.js +0 -0
- /package/src/components/{molecules/wt-load-bar → wt-load-bar}/__tests__/WtLoadBar.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-load-bar/_variables.scss +0 -0
- /package/src/components/{atoms/wt-loader → wt-loader}/__tests__/WtLoader.spec.js +0 -0
- /package/src/components/{atoms/wt-loader → wt-loader}/_internals/wt-loader--md.vue +0 -0
- /package/src/components/{atoms/wt-loader → wt-loader}/_internals/wt-loader--sm.vue +0 -0
- /package/src/{css/components/organisms → components}/wt-navigation-bar/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-notification/_variables.scss +0 -0
- /package/src/{css/components/organisms → components}/wt-notifications-bar/_variables.scss +0 -0
- /package/src/components/{organisms/wt-page-wrapper → wt-page-wrapper}/__tests__/WtPageWrapper.spec.js +0 -0
- /package/src/{css/components/organisms → components}/wt-page-wrapper/_variables.scss +0 -0
- /package/src/{css/components/organisms → components}/wt-pagination/_variables.scss +0 -0
- /package/src/components/{organisms/wt-player → wt-player}/__tests__/WtPlayer.spec.js +0 -0
- /package/src/components/{molecules/wt-popup → wt-popup}/__tests__/WtPopup.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-popup/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-radio/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-search-bar/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-select/_multiselect.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-select/_variables.scss +0 -0
- /package/src/components/{molecules/wt-slider → wt-slider}/__tests__/WtSlider.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-slider/_variables.scss +0 -0
- /package/src/{css/components/organisms → components}/wt-status-select/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-switcher/_variables.scss +0 -0
- /package/src/components/{organisms/wt-table → wt-table}/_internals/getSortOrder.js +0 -0
- /package/src/{css/components/organisms → components}/wt-table/_variables.scss +0 -0
- /package/src/components/{organisms/wt-table-actions → wt-table-actions}/__tests__/WtTableActions.spec.js +0 -0
- /package/src/{css/components/organisms → components}/wt-table-actions/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-tags-input/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-textarea/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-timepicker/_variables.scss +0 -0
|
@@ -1,75 +1,93 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<wt-tooltip
|
|
3
3
|
class="wt-context-menu"
|
|
4
|
-
:
|
|
4
|
+
:visible="visible"
|
|
5
5
|
:triggers="['click', 'touch']"
|
|
6
6
|
placement="bottom-end"
|
|
7
|
+
popper-class="wt-context-menu__floating-wrapper"
|
|
7
8
|
>
|
|
8
|
-
<slot
|
|
9
|
-
|
|
9
|
+
<template v-slot:activator>
|
|
10
|
+
<slot name="activator"></slot>
|
|
11
|
+
</template>
|
|
12
|
+
<template v-slot:default="{ hide }">
|
|
10
13
|
<ul
|
|
11
14
|
class="wt-context-menu__menu"
|
|
12
15
|
:style="`width: ${width}; min-width: ${minWidth}; max-width: ${maxWidth};`"
|
|
13
16
|
>
|
|
14
17
|
<li
|
|
15
18
|
class="wt-context-menu__option-wrapper"
|
|
16
|
-
v-for="(option, index)
|
|
19
|
+
v-for="(option, index) of options"
|
|
17
20
|
:key="index"
|
|
18
21
|
>
|
|
19
22
|
<!-- <a> click.prevent prevents redirect to # -->
|
|
20
23
|
<a
|
|
24
|
+
:class="[
|
|
25
|
+
{ 'wt-context-menu__option--disabled': option.disabled },
|
|
26
|
+
]"
|
|
21
27
|
class="wt-context-menu__option"
|
|
22
28
|
href="#"
|
|
23
29
|
@click.prevent="handleOptionClick({ option, index, hide })"
|
|
24
30
|
>
|
|
25
|
-
<slot
|
|
31
|
+
<slot
|
|
32
|
+
v-bind="option"
|
|
33
|
+
name="option"
|
|
34
|
+
>
|
|
26
35
|
{{ option.text || option }}
|
|
27
36
|
</slot>
|
|
28
37
|
</a>
|
|
29
38
|
</li>
|
|
30
39
|
</ul>
|
|
31
40
|
</template>
|
|
32
|
-
</
|
|
41
|
+
</wt-tooltip>
|
|
33
42
|
</template>
|
|
34
43
|
|
|
35
|
-
<script>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
width: {
|
|
49
|
-
type: [String],
|
|
50
|
-
default: 'auto',
|
|
51
|
-
},
|
|
52
|
-
minWidth: {
|
|
53
|
-
type: [String],
|
|
54
|
-
default: '160px',
|
|
55
|
-
},
|
|
56
|
-
maxWidth: {
|
|
57
|
-
type: [String],
|
|
58
|
-
default: '300px',
|
|
59
|
-
},
|
|
44
|
+
<script setup>
|
|
45
|
+
const props = defineProps({
|
|
46
|
+
options: {
|
|
47
|
+
type: Array,
|
|
48
|
+
required: true,
|
|
49
|
+
description: '[{ text, disabled, ... anything you need }]',
|
|
50
|
+
},
|
|
51
|
+
visible: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
},
|
|
54
|
+
width: {
|
|
55
|
+
type: [String],
|
|
56
|
+
default: 'auto',
|
|
60
57
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
hide();
|
|
65
|
-
},
|
|
58
|
+
minWidth: {
|
|
59
|
+
type: [String],
|
|
60
|
+
default: '160px',
|
|
66
61
|
},
|
|
67
|
-
|
|
62
|
+
maxWidth: {
|
|
63
|
+
type: [String],
|
|
64
|
+
default: '300px',
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const emit = defineEmits([
|
|
69
|
+
'click',
|
|
70
|
+
]);
|
|
71
|
+
|
|
72
|
+
function handleOptionClick({ option, index, hide }) {
|
|
73
|
+
emit('click', { option, index });
|
|
74
|
+
hide();
|
|
75
|
+
}
|
|
76
|
+
|
|
68
77
|
</script>
|
|
69
78
|
|
|
79
|
+
<style lang="scss">
|
|
80
|
+
@import './variables.scss';
|
|
81
|
+
</style>
|
|
82
|
+
|
|
70
83
|
<style lang="scss" scoped>
|
|
84
|
+
|
|
71
85
|
.wt-context-menu {
|
|
72
86
|
line-height: 0;
|
|
87
|
+
|
|
88
|
+
&.wt-tooltip :deep(.wt-context-menu__floating-wrapper) {
|
|
89
|
+
padding: 0;
|
|
90
|
+
}
|
|
73
91
|
}
|
|
74
92
|
|
|
75
93
|
.wt-context-menu__menu {
|
|
@@ -85,21 +103,29 @@ export default {
|
|
|
85
103
|
&:first-of-type {
|
|
86
104
|
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
|
87
105
|
}
|
|
106
|
+
|
|
88
107
|
&:last-of-type {
|
|
89
108
|
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
90
109
|
}
|
|
110
|
+
|
|
91
111
|
&:only-of-type {
|
|
92
112
|
border-radius: var(--border-radius);
|
|
93
113
|
}
|
|
94
|
-
&:hover {
|
|
95
|
-
background-color: var( --context-menu-option-color--hover);
|
|
96
|
-
transition: var(--transition);
|
|
97
|
-
}
|
|
98
114
|
}
|
|
99
115
|
|
|
100
116
|
.wt-context-menu__option {
|
|
101
117
|
display: block;
|
|
102
118
|
padding: var(--context-menu-option-padding);
|
|
103
119
|
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
background-color: var(--context-menu-option-color--hover);
|
|
123
|
+
transition: var(--transition);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--disabled {
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
color: var(--context-menu-option-color--disabled);
|
|
129
|
+
}
|
|
104
130
|
}
|
|
105
131
|
</style>
|
package/src/components/{molecules/wt-datepicker → wt-datepicker}/__tests__/WtDatepicker.spec.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
1
|
+
import { shallowMount, mount } from '@vue/test-utils';
|
|
2
2
|
import WtDatepicker from '../wt-datepicker.vue';
|
|
3
3
|
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
-
import WtIcon from '
|
|
4
|
+
import WtIcon from '../../wt-icon/wt-icon.vue';
|
|
5
5
|
|
|
6
6
|
describe('WtDatepicker', () => {
|
|
7
7
|
it('renders a component', () => {
|
|
@@ -16,12 +16,12 @@ describe('WtDatepicker', () => {
|
|
|
16
16
|
|
|
17
17
|
it('renders label text when passed', () => {
|
|
18
18
|
const label = 'Hello there';
|
|
19
|
-
const wrapper =
|
|
19
|
+
const wrapper = mount(WtDatepicker, {
|
|
20
20
|
stubs: {
|
|
21
21
|
WtLabel,
|
|
22
22
|
WtIcon,
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
props: { label },
|
|
25
25
|
});
|
|
26
26
|
expect(wrapper.find('.wt-label').text()).toBe(label);
|
|
27
27
|
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/*General*/
|
|
3
|
+
--dp-font-family: 'Montserrat';
|
|
4
|
+
--dp-border-radius: var(--border-radius); /*Configurable border-radius*/
|
|
5
|
+
--dp-cell-border-radius: var(--border-radius); /*Specific border radius for the calendar cell*/
|
|
6
|
+
|
|
7
|
+
/*Sizing*/
|
|
8
|
+
--dp-button-heigh: 32px; /*Size for buttons in overlays*/
|
|
9
|
+
--dp-month-year-row-height: 24px; /*Height of the month-year select row*/
|
|
10
|
+
--dp-month-year-row-button-size: 24px; /*Specific height for the next/previous buttons*/
|
|
11
|
+
--dp-button-icon-height: var(--icon-md-size); /*Icon sizing in buttons*/
|
|
12
|
+
--dp-cell-size: 24px; /*Width and height of calendar cell*/
|
|
13
|
+
--dp-cell-padding: var(--spacing-2xs); /*Padding in the cell*/
|
|
14
|
+
--dp-common-padding: var(--spacing-xs); /*Common padding used*/
|
|
15
|
+
--dp-input-icon-padding: calc(var(--icon-md-size) + 2 * var(--spacing-xs)); /*Padding on the left side of the input if icon is present*/
|
|
16
|
+
--dp-input-padding: calc(var(--spacing-xs) - 1px) calc(var(--icon-md-size) + 2 * var(--spacing-xs)); /*Padding in the input*/
|
|
17
|
+
//--dp-menu-min-width: 260px; /*Adjust the min width of the menu*/
|
|
18
|
+
--dp-action-buttons-padding: 2px 5px; /*Adjust padding for the action buttons in action row*/
|
|
19
|
+
--dp-row-maring: var(--spacing-3xs); /*Adjust the spacing between rows in the calendar*/
|
|
20
|
+
--dp-calendar-header-cell-padding: 0.5rem; /*Adjust padding in calendar header cells*/
|
|
21
|
+
--dp-two-calendars-spacing: 10px; /*Space between multiple calendars*/
|
|
22
|
+
--dp-overlay-col-padding: 3px; /*Padding in the overlay column*/
|
|
23
|
+
--dp-time-inc-dec-button-size: 24px; /*Sizing for arrow buttons in the time picker*/
|
|
24
|
+
|
|
25
|
+
/*Font sizes*/
|
|
26
|
+
--dp-font-size: 12px; /*Default font-size*/
|
|
27
|
+
--dp-preview-font-size: 12px; /*Font size of the date preview in the action row*/
|
|
28
|
+
--dp-time-font-size: 12px; /*Font size in the time picker*/
|
|
29
|
+
|
|
30
|
+
/*Transitions*/
|
|
31
|
+
--dp-animation-duration: var(--transition); /*Transition duration*/
|
|
32
|
+
--dp-menu-appear-transition-timing: cubic-bezier(.4, 0, 1, 1); /*Timing on menu appear animation*/
|
|
33
|
+
--dp-transition-timing: ease-out; /*Timing on slide animations*/
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dp__theme_light {
|
|
37
|
+
--dp-background-color: var(--main-color);
|
|
38
|
+
--dp-text-color: var(--contrast-color);
|
|
39
|
+
--dp-hover-color: var(--secondary-color-50);
|
|
40
|
+
--dp-hover-text-color: var(--contrast-color);
|
|
41
|
+
--dp-hover-icon-color: var(--icon-color--hover);
|
|
42
|
+
--dp-primary-color: var(--primary-color);
|
|
43
|
+
--dp-primary-text-color: var(--main-color);
|
|
44
|
+
--dp-secondary-color: var(--secondary-color);
|
|
45
|
+
--dp-border-color: var(--form-border-color);
|
|
46
|
+
--dp-menu-border-color: transparent;
|
|
47
|
+
--dp-border-color-hover: var(--form-border--hover-color);
|
|
48
|
+
--dp-disabled-color: var(--disabled-color);
|
|
49
|
+
//--dp-scroll-bar-background: #f3f3f3;
|
|
50
|
+
//--dp-scroll-bar-color: #959595;
|
|
51
|
+
--dp-success-color: var(--true-color);
|
|
52
|
+
//--dp-success-color-disabled: #a3d9b1;
|
|
53
|
+
--dp-icon-color: var(--icon-color);
|
|
54
|
+
--dp-danger-color: var(--false-color);
|
|
55
|
+
//--dp-highlight-color: rgba(25, 118, 210, 0.1);
|
|
56
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="{
|
|
4
|
+
'wt-datepicker--disabled': disabled,
|
|
5
|
+
}"
|
|
6
|
+
class="wt-datepicker"
|
|
7
|
+
>
|
|
8
|
+
<wt-label
|
|
9
|
+
v-bind="labelProps"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
>
|
|
12
|
+
<!-- @slot Custom input label -->
|
|
13
|
+
<slot
|
|
14
|
+
v-bind="{ label }"
|
|
15
|
+
name="label"
|
|
16
|
+
>{{ label }}</slot>
|
|
17
|
+
</wt-label>
|
|
18
|
+
<vue-datepicker
|
|
19
|
+
v-bind="{ ...$attrs, ...$props }"
|
|
20
|
+
ref="datepicker"
|
|
21
|
+
:locale="$i18n.locale === 'ua' ? 'uk' : $i18n.locale"
|
|
22
|
+
:model-value="+value"
|
|
23
|
+
:placeholder="label || placeholder"
|
|
24
|
+
class="wt-datepicker__datepicker"
|
|
25
|
+
:format="isDateTime ? 'dd/MM/yyyy HH:mm' : 'dd/MM/yyyy'"
|
|
26
|
+
:close-on-auto-apply="false"
|
|
27
|
+
auto-apply
|
|
28
|
+
@closed="isOpened = false"
|
|
29
|
+
@open="isOpened = true"
|
|
30
|
+
@update:model-value="emit('input', $event.getTime())"
|
|
31
|
+
>
|
|
32
|
+
<template v-slot:input-icon>
|
|
33
|
+
<wt-icon
|
|
34
|
+
:color="disabled ? 'disabled' : 'default'"
|
|
35
|
+
icon="calendar"
|
|
36
|
+
></wt-icon>
|
|
37
|
+
</template>
|
|
38
|
+
<template v-slot:clear-icon>
|
|
39
|
+
<wt-icon
|
|
40
|
+
:class="{ 'wt-datepicker__open-arrow--opened': isOpened }"
|
|
41
|
+
:color="disabled ? 'disabled' : 'default'"
|
|
42
|
+
class="wt-datepicker__open-arrow"
|
|
43
|
+
icon="arrow-down"
|
|
44
|
+
></wt-icon>
|
|
45
|
+
</template>
|
|
46
|
+
<template v-slot:arrow-left>
|
|
47
|
+
<wt-icon-btn
|
|
48
|
+
icon="arrow-left"
|
|
49
|
+
></wt-icon-btn>
|
|
50
|
+
</template>
|
|
51
|
+
<template v-slot:arrow-right>
|
|
52
|
+
<wt-icon-btn
|
|
53
|
+
icon="arrow-right"
|
|
54
|
+
></wt-icon-btn>
|
|
55
|
+
</template>
|
|
56
|
+
<template
|
|
57
|
+
v-if="isDateTime"
|
|
58
|
+
v-slot:time-picker="{ time, updateTime }"
|
|
59
|
+
>
|
|
60
|
+
<div class="datepicker__timepicker">
|
|
61
|
+
<wt-time-input
|
|
62
|
+
:value="time.hours"
|
|
63
|
+
max-value="23"
|
|
64
|
+
@input="updateTime"
|
|
65
|
+
></wt-time-input>
|
|
66
|
+
:
|
|
67
|
+
<wt-time-input
|
|
68
|
+
:value="time.minutes"
|
|
69
|
+
max-value="59"
|
|
70
|
+
@input="updateTime($event, false)"
|
|
71
|
+
></wt-time-input>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
|
+
</vue-datepicker>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script setup>
|
|
79
|
+
import VueDatepicker from '@vuepic/vue-datepicker';
|
|
80
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
|
81
|
+
import { ref } from 'vue';
|
|
82
|
+
|
|
83
|
+
const props = defineProps({
|
|
84
|
+
mode: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: 'date',
|
|
87
|
+
options: ['date', 'datetime'],
|
|
88
|
+
},
|
|
89
|
+
value: {
|
|
90
|
+
type: [String, Number],
|
|
91
|
+
default: 'Date.now()',
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* label above calendar input
|
|
95
|
+
*/
|
|
96
|
+
label: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: '',
|
|
99
|
+
},
|
|
100
|
+
placeholder: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: '',
|
|
103
|
+
},
|
|
104
|
+
disabled: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false,
|
|
107
|
+
},
|
|
108
|
+
disabledDates: {
|
|
109
|
+
type: Object,
|
|
110
|
+
},
|
|
111
|
+
lang: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: 'en',
|
|
114
|
+
},
|
|
115
|
+
labelProps: {
|
|
116
|
+
type: Object,
|
|
117
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
const emit = defineEmits(['input']);
|
|
121
|
+
|
|
122
|
+
const isOpened = ref(false);
|
|
123
|
+
const datepicker = ref(null); // template ref
|
|
124
|
+
|
|
125
|
+
const isDateTime = props.mode === 'datetime';
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<style lang="scss">
|
|
129
|
+
@import './variables.scss';
|
|
130
|
+
</style>
|
|
131
|
+
|
|
132
|
+
<style lang="scss" scoped>
|
|
133
|
+
|
|
134
|
+
.wt-datepicker :deep(.dp__main) {
|
|
135
|
+
.dp__input_icon {
|
|
136
|
+
left: var(--spacing-xs);
|
|
137
|
+
line-height: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.dp__clear_icon {
|
|
141
|
+
right: var(--spacing-xs);
|
|
142
|
+
line-height: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.dp__input {
|
|
146
|
+
@extend %typo-body-1;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.dp__arrow_top {
|
|
150
|
+
display: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/*
|
|
154
|
+
don't know why but month or year selection doesn't work
|
|
155
|
+
suppose its related to compatibility build
|
|
156
|
+
*/
|
|
157
|
+
.dp__month_year_wrap {
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.dp__month_year_select,
|
|
162
|
+
.dp__cell_inner {
|
|
163
|
+
@extend %typo-body-2;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// reset right/left arrow hover
|
|
167
|
+
.dp__inner_nav:hover {
|
|
168
|
+
background: inherit;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.dp__menu {
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
min-width: 196px;
|
|
174
|
+
width: 196px;
|
|
175
|
+
padding: var(--spacing-xs);
|
|
176
|
+
border-radius: var(--border-radius);
|
|
177
|
+
box-shadow: var(--elevation-10);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.dp__calendar_wrap {
|
|
181
|
+
gap: var(--spacing-2xs);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.dp__calendar_header_item {
|
|
185
|
+
@extend %typo-subtitle-2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dp__calendar_header_separator {
|
|
189
|
+
background: var(--secondary-color);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dp__calendar_header,
|
|
193
|
+
.dp__calendar_row {
|
|
194
|
+
gap: var(--spacing-3xs);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// switch to time view
|
|
198
|
+
.dp__button {
|
|
199
|
+
display: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.dp__action_row {
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
gap: var(--spacing-xs);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.dp__selection_preview,
|
|
208
|
+
.dp__action_buttons {
|
|
209
|
+
width: 100%;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.dp__selection_preview {
|
|
213
|
+
text-align: center;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.dp__action_buttons {
|
|
217
|
+
display: flex;
|
|
218
|
+
gap: var(--spacing-xs);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.datepicker__timepicker {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
gap: var(--spacing-xs);
|
|
226
|
+
margin-top: var(--spacing-xs);
|
|
227
|
+
|
|
228
|
+
.wt-time-input {
|
|
229
|
+
flex-grow: 1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.wt-datepicker__open-arrow {
|
|
234
|
+
transition: var(--transition);
|
|
235
|
+
|
|
236
|
+
&--opened {
|
|
237
|
+
transform: rotate(180deg);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<hr class="wt-divider">
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: 'wt-divider',
|
|
8
|
+
};
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<style lang="scss">
|
|
12
|
+
@import './variables.scss';
|
|
13
|
+
</style>
|
|
14
|
+
|
|
15
|
+
<style lang="scss" scoped>
|
|
16
|
+
|
|
17
|
+
.wt-divider {
|
|
18
|
+
display: block;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
width: 100%;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
height: 0;
|
|
23
|
+
max-height: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
border: var(--divider-border);
|
|
27
|
+
border-color: var(--divider-border-color);
|
|
28
|
+
border-top-width: thin;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wt-dummy">
|
|
3
|
+
<div class="wt-dummy__img">
|
|
4
|
+
<img
|
|
5
|
+
:src="src || dummy"
|
|
6
|
+
:width="size"
|
|
7
|
+
:height="size"
|
|
8
|
+
alt="dummy-picture"
|
|
9
|
+
>
|
|
10
|
+
</div>
|
|
11
|
+
<p
|
|
12
|
+
v-if="!hiddenText"
|
|
13
|
+
class="wt-dummy__text">{{ text || $t('webitelUI.dummy.text') }}</p>
|
|
14
|
+
<wt-button
|
|
15
|
+
v-if="showAction"
|
|
16
|
+
@click="emits('create')"
|
|
17
|
+
>{{ buttonText || $t('reusable.add') }}
|
|
18
|
+
</wt-button>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import dummy from '../../assets/components/molecules/wt-dummy/dummy.svg';
|
|
24
|
+
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
src: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
29
|
+
text: {
|
|
30
|
+
type: String,
|
|
31
|
+
},
|
|
32
|
+
buttonText: {
|
|
33
|
+
type: String,
|
|
34
|
+
},
|
|
35
|
+
showAction: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
type: [String, Number],
|
|
41
|
+
default: 200,
|
|
42
|
+
},
|
|
43
|
+
hiddenText: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const emits = defineEmits([
|
|
50
|
+
'create',
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style lang="scss" scoped>
|
|
56
|
+
.wt-dummy {
|
|
57
|
+
text-align: center;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
gap: var(--spacing-sm);
|
|
63
|
+
|
|
64
|
+
&__img {
|
|
65
|
+
height: 200px;
|
|
66
|
+
width: 200px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__text {
|
|
70
|
+
@extend %typo-body-1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</style>
|
package/src/components/{organisms/wt-error-page → wt-error-page}/__tests__/wt-error-page.spec.js
RENAMED
|
@@ -3,15 +3,15 @@ import ErrorPage from '../wt-error-page.vue';
|
|
|
3
3
|
|
|
4
4
|
describe('Error Page', () => {
|
|
5
5
|
it('renders a component', () => {
|
|
6
|
-
const wrapper = shallowMount(ErrorPage, {
|
|
6
|
+
const wrapper = shallowMount(ErrorPage, { props: { type: '' } });
|
|
7
7
|
expect(wrapper.exists()).toBe(true);
|
|
8
8
|
});
|
|
9
9
|
it('renders a component with 404 type', () => {
|
|
10
|
-
const wrapper = shallowMount(ErrorPage, {
|
|
10
|
+
const wrapper = shallowMount(ErrorPage, { props: { type: '404' } });
|
|
11
11
|
expect(wrapper.exists()).toBe(true);
|
|
12
12
|
});
|
|
13
13
|
it('renders a component with 403 type', () => {
|
|
14
|
-
const wrapper = shallowMount(ErrorPage, {
|
|
14
|
+
const wrapper = shallowMount(ErrorPage, { props: { type: '403' } });
|
|
15
15
|
expect(wrapper.exists()).toBe(true);
|
|
16
16
|
});
|
|
17
17
|
});
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
import pic403 from '
|
|
23
|
-
import pic404 from '
|
|
22
|
+
import pic403 from '../../assets/components/organisms/wt-error-page/403.svg';
|
|
23
|
+
import pic404 from '../../assets/components/organisms/wt-error-page/404.svg';
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
26
|
name: 'wt-error-page',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtExpansionPanel from '../wt-expansion-panel.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtExpansionPanel', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtExpansionPanel);
|
|
7
|
+
expect(wrapper.isVisible()).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
});
|