@webitel/ui-sdk 0.1.2-vue3 → 0.1.3-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 +36361 -11605
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +36342 -11586
- 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 +2 -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,203 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="{
|
|
4
|
-
'wt-datepicker--disabled': disabled,
|
|
5
|
-
}"
|
|
6
|
-
class="wt-datepicker"
|
|
7
|
-
>
|
|
8
|
-
<wt-label v-bind="labelProps" :disabled="disabled">
|
|
9
|
-
<!-- @slot Custom input label -->
|
|
10
|
-
<slot v-bind="{ label }" name="label">{{ label }}</slot>
|
|
11
|
-
</wt-label>
|
|
12
|
-
<vue-datepicker
|
|
13
|
-
v-bind="{ ...$attrs, ...$props }"
|
|
14
|
-
:placeholder="label || placeholder"
|
|
15
|
-
:value="+value"
|
|
16
|
-
class="wt-datepicker__datepicker"
|
|
17
|
-
monday-first
|
|
18
|
-
@input="$emit('change', $event.getTime())"
|
|
19
|
-
>
|
|
20
|
-
<template slot="afterDateInput">
|
|
21
|
-
<wt-icon
|
|
22
|
-
:color="disabled ? 'disabled' : 'default'"
|
|
23
|
-
class="wt-datepicker__calendar-icon"
|
|
24
|
-
icon="calendar"
|
|
25
|
-
></wt-icon>
|
|
26
|
-
<wt-icon
|
|
27
|
-
:color="disabled ? 'disabled' : 'default'"
|
|
28
|
-
class="wt-datepicker__arrow-icon"
|
|
29
|
-
icon="arrow-down"
|
|
30
|
-
></wt-icon>
|
|
31
|
-
</template>
|
|
32
|
-
<template slot="beforeCalendarHeader">
|
|
33
|
-
<wt-icon
|
|
34
|
-
class="wt-datepicker__month-arrow wt-datepicker__month-arrow--left"
|
|
35
|
-
icon="arrow-left"
|
|
36
|
-
></wt-icon>
|
|
37
|
-
<wt-icon
|
|
38
|
-
class="wt-datepicker__month-arrow wt-datepicker__month-arrow--right"
|
|
39
|
-
icon="arrow-right"
|
|
40
|
-
></wt-icon>
|
|
41
|
-
</template>
|
|
42
|
-
</vue-datepicker>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<script>
|
|
47
|
-
import VueDatepicker from 'vuejs-datepicker';
|
|
48
|
-
|
|
49
|
-
export default {
|
|
50
|
-
name: 'wt-datepicker',
|
|
51
|
-
components: {
|
|
52
|
-
VueDatepicker,
|
|
53
|
-
},
|
|
54
|
-
props: {
|
|
55
|
-
value: {
|
|
56
|
-
type: [String, Number],
|
|
57
|
-
default: 'Date.now()',
|
|
58
|
-
},
|
|
59
|
-
/**
|
|
60
|
-
* label above calendar input
|
|
61
|
-
*/
|
|
62
|
-
label: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: '',
|
|
65
|
-
},
|
|
66
|
-
placeholder: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: '',
|
|
69
|
-
},
|
|
70
|
-
format: {
|
|
71
|
-
type: [String, Function],
|
|
72
|
-
},
|
|
73
|
-
maximumView: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: 'day',
|
|
76
|
-
},
|
|
77
|
-
disabled: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false,
|
|
80
|
-
},
|
|
81
|
-
disabledDates: {
|
|
82
|
-
type: Object,
|
|
83
|
-
},
|
|
84
|
-
lang: {
|
|
85
|
-
type: String,
|
|
86
|
-
default: 'en',
|
|
87
|
-
},
|
|
88
|
-
labelProps: {
|
|
89
|
-
type: Object,
|
|
90
|
-
description: 'Object with props, passed down to wt-label as props',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
model: {
|
|
94
|
-
prop: 'value',
|
|
95
|
-
event: 'change',
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style lang="scss" scoped>
|
|
101
|
-
.wt-datepicker__calendar-icon {
|
|
102
|
-
position: absolute;
|
|
103
|
-
top: var(--spacing-xs);
|
|
104
|
-
left: var(--input-padding);
|
|
105
|
-
pointer-events: none;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.wt-datepicker__arrow-icon {
|
|
109
|
-
position: absolute;
|
|
110
|
-
top: var(--spacing-xs);
|
|
111
|
-
right: var(--input-padding);
|
|
112
|
-
pointer-events: none;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.wt-datepicker__month-arrow {
|
|
116
|
-
position: absolute;
|
|
117
|
-
top: var(--spacing-xs);
|
|
118
|
-
pointer-events: none;
|
|
119
|
-
|
|
120
|
-
&--right {
|
|
121
|
-
right: var(--spacing-xs);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&--left {
|
|
125
|
-
left: var(--spacing-xs);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
::v-deep .vdp-datepicker {
|
|
130
|
-
min-width: var(--datepicker-width);
|
|
131
|
-
|
|
132
|
-
// preview input
|
|
133
|
-
> div:first-child {
|
|
134
|
-
position: relative;
|
|
135
|
-
|
|
136
|
-
input {
|
|
137
|
-
@extend %typo-body-1;
|
|
138
|
-
@include wt-placeholder;
|
|
139
|
-
box-sizing: border-box;
|
|
140
|
-
width: 100%;
|
|
141
|
-
padding: var(--datepicker-padding);
|
|
142
|
-
border: var(--datepicker-border);
|
|
143
|
-
border-color: var(--form-border-color);
|
|
144
|
-
border-radius: var(--border-radius);
|
|
145
|
-
|
|
146
|
-
&:focus {
|
|
147
|
-
@include wt-placeholder('focus');
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.vdp-datepicker__calendar-button {
|
|
152
|
-
display: none;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
@import '../../../css/components/molecules/wt-datepicker/datepicker-calendar';
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.wt-datepicker:hover,
|
|
160
|
-
.wt-datepicker:focus-within {
|
|
161
|
-
.wt-label {
|
|
162
|
-
color: var(--form-label--hover-color);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
::v-deep .vdp-datepicker {
|
|
166
|
-
min-width: var(--datepicker-width);
|
|
167
|
-
|
|
168
|
-
// preview input
|
|
169
|
-
> div:first-child {
|
|
170
|
-
|
|
171
|
-
input {
|
|
172
|
-
border-color: var(--form-border--hover-color);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.wt-datepicker:focus-within {
|
|
179
|
-
::v-deep .vdp-datepicker {
|
|
180
|
-
// arrow down icon
|
|
181
|
-
.vdp-datepicker__calendar-button:before {
|
|
182
|
-
transform: rotate(180deg);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.wt-datepicker--disabled {
|
|
188
|
-
pointer-events: none;
|
|
189
|
-
|
|
190
|
-
::v-deep .vdp-datepicker {
|
|
191
|
-
min-width: var(--datepicker-width);
|
|
192
|
-
|
|
193
|
-
// preview input
|
|
194
|
-
> div:first-child {
|
|
195
|
-
|
|
196
|
-
input {
|
|
197
|
-
border-color: var(--form-border--disabled-color);
|
|
198
|
-
background: var(--form-border--disabled-color);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
</style>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { shallowMount, mount, createLocalVue } from '@vue/test-utils';
|
|
2
|
-
import FloatingVue, { Dropdown, Popper } from 'floating-vue';
|
|
3
|
-
import WtDatetimepicker from '../wt-datetimepicker.vue';
|
|
4
|
-
import WtLabel from '../../wt-label/wt-label.vue';
|
|
5
|
-
import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
|
|
6
|
-
import WtButton from '../../../atoms/wt-button/wt-button.vue';
|
|
7
|
-
|
|
8
|
-
const localVue = createLocalVue();
|
|
9
|
-
localVue.use(FloatingVue);
|
|
10
|
-
|
|
11
|
-
describe('WtDatetimepicker', () => {
|
|
12
|
-
it('renders a component', () => {
|
|
13
|
-
const wrapper = shallowMount(WtDatetimepicker, {
|
|
14
|
-
stubs: {
|
|
15
|
-
WtLabel,
|
|
16
|
-
WtIcon,
|
|
17
|
-
WtButton,
|
|
18
|
-
WtTimepicker: true,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
expect(wrapper.classes('wt-datetimepicker')).toBe(true);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('renders label text when passed', () => {
|
|
25
|
-
const label = 'Hello there';
|
|
26
|
-
const wrapper = shallowMount(WtDatetimepicker, {
|
|
27
|
-
stubs: {
|
|
28
|
-
WtLabel,
|
|
29
|
-
WtIcon,
|
|
30
|
-
WtButton,
|
|
31
|
-
WtTimepicker: true,
|
|
32
|
-
},
|
|
33
|
-
propsData: { label },
|
|
34
|
-
});
|
|
35
|
-
expect(wrapper.find('.wt-label').text()).toBe(label);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it('opens form at preview click', async () => {
|
|
39
|
-
const wrapper = shallowMount(WtDatetimepicker, {
|
|
40
|
-
// stubs: {
|
|
41
|
-
// WtLabel,
|
|
42
|
-
// WtIcon,
|
|
43
|
-
// WtButton,
|
|
44
|
-
// WtTimepicker: true,
|
|
45
|
-
// },
|
|
46
|
-
});
|
|
47
|
-
expect(wrapper.find('.wt-datetimepicker__form').element).not.toBeVisible();
|
|
48
|
-
wrapper.find('.wt-datetimepicker__preview').trigger('click');
|
|
49
|
-
await wrapper.vm.$nextTick();
|
|
50
|
-
expect(wrapper.find('.wt-datetimepicker__form').isVisible()).toBe(true);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// dunno how to test content of VDropdown popper template :(
|
|
54
|
-
// it('Triggers change event after button "add" click', async () => {
|
|
55
|
-
// const now = Date.now();
|
|
56
|
-
// const wrapper = mount(WtDatetimepicker, {
|
|
57
|
-
// localVue,
|
|
58
|
-
// stubs: {
|
|
59
|
-
// WtLabel,
|
|
60
|
-
// WtIcon,
|
|
61
|
-
// WtButton,
|
|
62
|
-
// VDropdown: Dropdown,
|
|
63
|
-
// WtTimepicker: true,
|
|
64
|
-
// },
|
|
65
|
-
// propsData: {
|
|
66
|
-
// value: now,
|
|
67
|
-
// },
|
|
68
|
-
// });
|
|
69
|
-
// wrapper.setData({ isOpened: true });
|
|
70
|
-
// // wrapper.find('.wt-datetimepicker__preview').trigger('keyup.enter');
|
|
71
|
-
// await wrapper.vm.$nextTick();
|
|
72
|
-
// await wrapper.vm.$nextTick();
|
|
73
|
-
// await wrapper.vm.$nextTick();
|
|
74
|
-
// console.info(wrapper.html());
|
|
75
|
-
// expect(wrapper.find('.wt-datetimepicker__form').exists()).toBe(true);
|
|
76
|
-
// wrapper.find('.wt-datetimepicker__actions > .wt-button').trigger('click');
|
|
77
|
-
// expect(wrapper.emitted().change.pop()).toEqual([now]);
|
|
78
|
-
// });
|
|
79
|
-
});
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-dropdown
|
|
3
|
-
class="wt-datetimepicker"
|
|
4
|
-
:class="{
|
|
5
|
-
'wt-datetimepicker--active': isOpened,
|
|
6
|
-
'wt-datetimepicker--disabled': disabled,
|
|
7
|
-
}"
|
|
8
|
-
:shown.sync="isOpened"
|
|
9
|
-
placement="bottom-start"
|
|
10
|
-
>
|
|
11
|
-
<wt-label :disabled="disabled" v-bind="labelProps">
|
|
12
|
-
<!-- @slot Custom input label -->
|
|
13
|
-
<slot name="label" v-bind="{ label }">{{ label }}</slot>
|
|
14
|
-
</wt-label>
|
|
15
|
-
<div
|
|
16
|
-
class="wt-datetimepicker__preview"
|
|
17
|
-
tabindex="0"
|
|
18
|
-
@keyup.enter="isOpened = !isOpened"
|
|
19
|
-
>
|
|
20
|
-
<wt-icon class="wt-datetimepicker__calendar-icon" icon="calendar"></wt-icon>
|
|
21
|
-
<input
|
|
22
|
-
class="wt-datetimepicker__preview__input"
|
|
23
|
-
:value="displayValue"
|
|
24
|
-
autocomplete="off"
|
|
25
|
-
readonly
|
|
26
|
-
>
|
|
27
|
-
<wt-icon
|
|
28
|
-
class="wt-datetimepicker__arrow-icon"
|
|
29
|
-
icon="arrow-down"
|
|
30
|
-
></wt-icon>
|
|
31
|
-
</div>
|
|
32
|
-
<template v-slot:popper>
|
|
33
|
-
<div
|
|
34
|
-
class="wt-datetimepicker__form"
|
|
35
|
-
>
|
|
36
|
-
<div class="wt-datetimepicker__quick-filters-wrapper">
|
|
37
|
-
<span class="wt-datetimepicker__quick-filter" @click="setLastHour">
|
|
38
|
-
{{$t('webitelUI.datetimepicker.lastHour')}}
|
|
39
|
-
</span>
|
|
40
|
-
<span class="wt-datetimepicker__quick-filter" @click="setLastDay">
|
|
41
|
-
{{$t('webitelUI.datetimepicker.lastDay')}}
|
|
42
|
-
</span>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="wt-datetimepicker__form-wrapper">
|
|
45
|
-
<!-- <datepicker-->
|
|
46
|
-
<!-- class="wt-datetimepicker__datepicker"-->
|
|
47
|
-
<!-- :value="draft"-->
|
|
48
|
-
<!-- :maximum-view="'day'"-->
|
|
49
|
-
<!-- :disabled-dates="disabledDates"-->
|
|
50
|
-
<!-- monday-first-->
|
|
51
|
-
<!-- inline-->
|
|
52
|
-
<!-- @input="setDraft($event.getTime())"-->
|
|
53
|
-
<!-- ></datepicker>-->
|
|
54
|
-
<wt-datepicker
|
|
55
|
-
class="wt-datetimepicker__datepicker"
|
|
56
|
-
:value="draft"
|
|
57
|
-
:maximum-view="'day'"
|
|
58
|
-
:disabled-dates="disabledDates"
|
|
59
|
-
monday-first
|
|
60
|
-
inline
|
|
61
|
-
@change="setDraft"
|
|
62
|
-
></wt-datepicker>
|
|
63
|
-
<wt-timepicker
|
|
64
|
-
class="wt-datetimepicker__timepicker"
|
|
65
|
-
v-model="draft"
|
|
66
|
-
format="hh:mm"
|
|
67
|
-
date-mode
|
|
68
|
-
></wt-timepicker>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="wt-datetimepicker__actions">
|
|
71
|
-
<wt-button @click="input">
|
|
72
|
-
{{$t('reusable.add')}}
|
|
73
|
-
</wt-button>
|
|
74
|
-
<wt-button color="secondary" @click="close">
|
|
75
|
-
{{$t('reusable.cancel')}}
|
|
76
|
-
</wt-button>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
</template>
|
|
81
|
-
</v-dropdown>
|
|
82
|
-
</template>
|
|
83
|
-
|
|
84
|
-
<script>
|
|
85
|
-
// import Datepicker from 'vuejs-datepicker';
|
|
86
|
-
|
|
87
|
-
export default {
|
|
88
|
-
name: 'wt-datetimepicker',
|
|
89
|
-
components: {
|
|
90
|
-
// Datepicker,
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
props: {
|
|
94
|
-
value: {
|
|
95
|
-
type: [String, Number],
|
|
96
|
-
default: 0,
|
|
97
|
-
},
|
|
98
|
-
label: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: '',
|
|
101
|
-
},
|
|
102
|
-
disabled: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
default: false,
|
|
105
|
-
},
|
|
106
|
-
disabledDates: {
|
|
107
|
-
type: Object,
|
|
108
|
-
},
|
|
109
|
-
labelProps: {
|
|
110
|
-
type: Object,
|
|
111
|
-
description: 'Object with props, passed down to wt-label as props',
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
model: {
|
|
115
|
-
prop: 'value',
|
|
116
|
-
event: 'change',
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
watch: {
|
|
120
|
-
isOpened: {
|
|
121
|
-
handler() {
|
|
122
|
-
this.draft = this.value;
|
|
123
|
-
},
|
|
124
|
-
immediate: true,
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
data: () => ({
|
|
129
|
-
isOpened: false,
|
|
130
|
-
draft: 0,
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
computed: {
|
|
134
|
-
// prop value representation on picker preview
|
|
135
|
-
displayValue() {
|
|
136
|
-
// const date = new Date(+this.value).toLocaleDateString();
|
|
137
|
-
// const time = new Date(+this.value).toLocaleTimeString() // https://stackoverflow.com/questions/17913681/how-do-i-use-tolocaletimestring-without-displaying-seconds
|
|
138
|
-
// .slice(0, 5);
|
|
139
|
-
// return `${date} ${time}`;
|
|
140
|
-
return new Date(+this.value).toLocaleString();
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
methods: {
|
|
145
|
-
setLastHour() {
|
|
146
|
-
const value = Date.now() - 60 * 60 * 10 ** 3; // 60 min x 60 sec x 1000 ms
|
|
147
|
-
this.$emit('change', value);
|
|
148
|
-
this.close();
|
|
149
|
-
},
|
|
150
|
-
setLastDay() {
|
|
151
|
-
const value = Date.now() - 24 * 60 * 60 * 10 ** 3; // 24hour x 60 min x 60 sec x 1000 ms
|
|
152
|
-
this.$emit('change', value);
|
|
153
|
-
this.close();
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
input() {
|
|
157
|
-
this.$emit('change', this.draft);
|
|
158
|
-
this.close();
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
setDraft(value) {
|
|
162
|
-
this.draft = value;
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
close() {
|
|
166
|
-
this.isOpened = false;
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
};
|
|
170
|
-
</script>
|
|
171
|
-
|
|
172
|
-
<style lang="scss" scoped>
|
|
173
|
-
.wt-datetimepicker {
|
|
174
|
-
position: relative;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.wt-datetimepicker__preview {
|
|
178
|
-
position: relative;
|
|
179
|
-
cursor: text;
|
|
180
|
-
outline: none;
|
|
181
|
-
|
|
182
|
-
&__input {
|
|
183
|
-
@extend %typo-body-1;
|
|
184
|
-
display: block;
|
|
185
|
-
width: 100%;
|
|
186
|
-
box-sizing: border-box;
|
|
187
|
-
padding: var(--datetimepicker-padding);
|
|
188
|
-
border: var(--datetimepicker-border);
|
|
189
|
-
border-color: var(--form-border-color);
|
|
190
|
-
border-radius: var(--border-radius);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.wt-datetimepicker__calendar-icon {
|
|
194
|
-
position: absolute;
|
|
195
|
-
top: 50%;
|
|
196
|
-
left: var(--datetimepicker-icon-margin);
|
|
197
|
-
transform: translateY(-50%);
|
|
198
|
-
pointer-events: none;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.wt-datetimepicker__arrow-icon {
|
|
202
|
-
position: absolute;
|
|
203
|
-
top: 50%;
|
|
204
|
-
right: var(--datetimepicker-icon-margin);
|
|
205
|
-
transform: translateY(-50%);
|
|
206
|
-
pointer-events: none;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.wt-datetimepicker__form {
|
|
211
|
-
padding: var(--datetimepicker-form-padding);
|
|
212
|
-
background: var(--datetimepicker-form-bg-color);
|
|
213
|
-
box-sizing: border-box;
|
|
214
|
-
border: var(--datetimepicker-border);
|
|
215
|
-
border-color: var(--form-border-color);
|
|
216
|
-
border-radius: var(--border-radius);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.wt-datetimepicker__quick-filters-wrapper {
|
|
220
|
-
text-align: center;
|
|
221
|
-
display: flex;
|
|
222
|
-
justify-content: space-evenly;
|
|
223
|
-
margin-bottom: var(--datetimepicker-form-content-margin);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.wt-datetimepicker__quick-filter {
|
|
227
|
-
@extend %typo-caption;
|
|
228
|
-
text-decoration: underline;
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.wt-datetimepicker__form-wrapper {
|
|
233
|
-
display: flex;
|
|
234
|
-
flex-direction: column;
|
|
235
|
-
|
|
236
|
-
.wt-datetimepicker__datepicker ::v-deep {
|
|
237
|
-
.wt-datepicker__calendar-icon,
|
|
238
|
-
.wt-datepicker__arrow-icon {
|
|
239
|
-
display: none;
|
|
240
|
-
}
|
|
241
|
-
.vdp-datepicker__calendar {
|
|
242
|
-
padding: 0;
|
|
243
|
-
border-color: transparent;
|
|
244
|
-
box-shadow: none;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.wt-datetimepicker__timepicker {
|
|
249
|
-
margin: var(--datetimepicker-form-content-margin) auto 0;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.wt-datetimepicker__actions {
|
|
254
|
-
display: flex;
|
|
255
|
-
justify-content: center;
|
|
256
|
-
margin-top: var(--datetimepicker-form-content-margin);
|
|
257
|
-
|
|
258
|
-
.wt-button {
|
|
259
|
-
&.secondary {
|
|
260
|
-
margin-left: var(--datetimepicker-form-content-margin);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.wt-datetimepicker:hover {
|
|
266
|
-
.wt-label {
|
|
267
|
-
color: var(--form-label--hover-color);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.wt-datetimepicker__preview__input {
|
|
271
|
-
border-color: var(--form-border--hover-color);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.wt-datetimepicker:focus-within,
|
|
276
|
-
.wt-datetimepicker--active {
|
|
277
|
-
.wt-label {
|
|
278
|
-
color: var(--form-label--active-color);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.wt-datetimepicker__preview__input {
|
|
282
|
-
border-color: var(--form-border--active-color);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.wt-datetimepicker--active {
|
|
287
|
-
.wt-datetimepicker__arrow-icon {
|
|
288
|
-
transform: translateY(-50%) rotate(180deg);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.wt-datetimepicker--disabled {
|
|
293
|
-
pointer-events: none;
|
|
294
|
-
|
|
295
|
-
.wt-datetimepicker__preview__input {
|
|
296
|
-
border-color: var(--form-border--disabled-color);
|
|
297
|
-
background: var(--form-border--disabled-color);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
</style>
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="{ 'wt-icon-btn--disabled': disabled }" class="wt-icon-btn">
|
|
3
|
-
<button class="wt-icon-btn__button" type="button">
|
|
4
|
-
<wt-icon
|
|
5
|
-
:color="iconColor"
|
|
6
|
-
:icon="icon"
|
|
7
|
-
:icon-prefix="iconPrefix"
|
|
8
|
-
:size="size"
|
|
9
|
-
@click.native="$emit('click', $event)"
|
|
10
|
-
></wt-icon>
|
|
11
|
-
</button>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
export default {
|
|
17
|
-
name: 'wt-icon-btn',
|
|
18
|
-
props: {
|
|
19
|
-
icon: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
iconPrefix: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: '',
|
|
26
|
-
},
|
|
27
|
-
size: {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
disabled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
color: {
|
|
35
|
-
type: String,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
computed: {
|
|
39
|
-
iconColor() {
|
|
40
|
-
if (this.disabled) return 'disabled';
|
|
41
|
-
return this.color;
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<style lang="scss" scoped>
|
|
48
|
-
.wt-icon-btn {
|
|
49
|
-
position: relative;
|
|
50
|
-
display: inline-block;
|
|
51
|
-
|
|
52
|
-
.wt-icon {
|
|
53
|
-
display: flex;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// add hover style only for "default" icon color cause non-default already may have opacity 1
|
|
57
|
-
&:hover ::v-deep .wt-icon__icon.wt-icon__icon--color-default {
|
|
58
|
-
fill: var(--icon-color--hover);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:hover ::v-deep .wt-icon--color-icon-secondary .wt-icon__icon {
|
|
62
|
-
fill: var(--icon-color);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// icon "disabled" color is set from iconColor computed
|
|
66
|
-
&--disabled {
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.wt-icon-btn,
|
|
72
|
-
.wt-icon-btn__button {
|
|
73
|
-
line-height: 0;
|
|
74
|
-
}
|
|
75
|
-
</style>
|