From d5908427544b9a65bbc16a860ea6f73270ee7c26 Mon Sep 17 00:00:00 2001 From: Diego Pascual Date: Thu, 24 Oct 2024 14:08:36 +0200 Subject: [PATCH] feat: update x-components and related packages to vue 3 (#1644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Víctor CG Co-authored-by: Jose Antonio Cabañeros Co-authored-by: Alberto Monedero Martín Co-authored-by: lauramargar <114984466+lauramargar@users.noreply.github.com> Co-authored-by: acondal --- .gitignore | 1 + packages/_vue3-migration-test/CHANGELOG.md | 17 + packages/_vue3-migration-test/package.json | 2 +- .../src/components/animations/index.ts | 1 + .../animations/test-animation-factory.vue | 47 +- .../test-staggered-fade-and-slide.vue | 68 + .../src/components/index.ts | 2 +- .../src/components/test-base-switch.vue | 18 + .../src/components/test-use-layouts.vue | 36 - packages/_vue3-migration-test/src/router.ts | 20 +- packages/x-archetype-utils/CHANGELOG.md | 16 + packages/x-archetype-utils/package.json | 12 +- packages/x-archetype-utils/rollup.config.mjs | 8 +- .../src/__tests__/i18n.plugin.spec.ts | 21 +- .../src/build/rollup/rollup.config.ts | 3 +- .../x-archetype-utils/src/i18n/i18n.plugin.ts | 24 +- .../x-archetype-utils/src/i18n/i18n.types.ts | 2 +- packages/x-components/.eslintrc.js | 8 +- packages/x-components/.gitignore | 1 + packages/x-components/CHANGELOG.md | 84 + packages/x-components/build/build.ts | 37 +- packages/x-components/build/build.utils.ts | 26 +- .../build/postcss-dir-pseudo-class.d.ts | 6 - .../x-components/build/postcss-logical.d.ts | 6 - .../build/postcss-types/options.ts | 4 - .../design-system.rollup-plugin.ts | 18 +- .../x-components.rollup-plugin.ts | 10 +- packages/x-components/build/rollup.config.ts | 129 +- .../x-components/build/tools/inject-css.js | 15 + packages/x-components/cypress.config.ts | 30 +- packages/x-components/jest.config.js | 5 +- packages/x-components/package.json | 46 +- packages/x-components/src/App.vue | 8 +- packages/x-components/src/__tests__/utils.ts | 18 +- .../__tests__/auto-progress-bar.spec.ts | 67 +- .../__tests__/base-dropdown.spec.ts | 20 +- .../__tests__/base-event-button.spec.ts | 37 +- .../base-keyboard-navigation.spec.ts | 22 +- .../components/__tests__/base-rating.spec.ts | 10 +- .../components/__tests__/base-switch.spec.ts | 10 +- .../base-variable-column-grid.spec.ts | 48 +- .../__tests__/display-emitter.spec.ts | 9 +- .../__tests__/dynamic-props.mixin.spec.ts | 35 - .../components/__tests__/global-x-bus.spec.ts | 9 +- .../components/__tests__/highlight.spec.ts | 100 +- .../components/__tests__/items-list.spec.ts | 26 +- .../__tests__/location-provider.spec.ts | 48 +- .../components/__tests__/no-element.spec.ts | 19 - .../__tests__/page-loader-button.spec.ts | 33 +- .../__tests__/snippet-callbacks.spec.ts | 32 +- .../__tests__/x-component-mixin.spec.ts | 38 - .../__tests__/x-component-utils.spec.ts | 16 +- ...eate-directional-animation-factory.spec.ts | 7 +- .../staggered-fade-and-slide.spec.ts | 91 + .../staggering-transition-group.spec.ts | 204 - .../__tests__/use-disable-animation.spec.ts | 55 +- .../animate-clip-path.style.scss | 16 +- .../animate-translate.style.scss | 16 +- .../components/animations/animate-width.vue | 26 +- .../components/animations/collapse-height.vue | 16 +- .../components/animations/collapse-width.vue | 16 +- .../create-directional-animation-factory.ts | 22 +- .../src/components/animations/cross-fade.vue | 30 +- .../components/animations/fade-and-slide.vue | 43 +- .../src/components/animations/fade.vue | 22 +- .../src/components/animations/index.ts | 2 +- .../components/animations/no-animation.vue | 14 + .../animations/staggered-fade-and-slide.vue | 147 +- .../staggering-transition-group.vue | 472 -- .../src/components/auto-progress-bar.vue | 20 +- .../src/components/base-dropdown.vue | 28 +- .../src/components/base-event-button.vue | 2 +- .../x-components/src/components/base-grid.vue | 137 +- .../src/components/base-rating.vue | 48 +- .../src/components/base-switch.vue | 57 +- .../base-column-picker-dropdown.spec.ts | 48 +- .../__tests__/base-column-picker-list.spec.ts | 30 +- .../column-picker/base-column-picker-list.vue | 6 +- .../currency/__tests__/base-currency.spec.ts | 10 +- .../__tests__/bus.decorators.spec.ts | 390 -- .../__tests__/debounce.decorators.spec.ts | 102 - .../__tests__/injection.decorators.spec.ts | 174 - .../__tests__/store.decorators.spec.ts | 66 - .../components/decorators/bus.decorators.ts | 173 - .../decorators/debounce.decorators.ts | 44 - .../components/decorators/injection.consts.ts | 14 +- .../decorators/injection.decorators.ts | 254 - .../components/decorators/store.decorators.ts | 62 - .../src/components/display-emitter.vue | 5 +- .../src/components/dynamic-props.mixin.ts | 33 - .../labels/__tests__/base-price-label.spec.ts | 5 +- .../base-rating-filter-label.spec.ts | 19 +- .../labels/base-price-filter-label.vue | 24 +- .../src/components/global-x-bus.vue | 19 +- .../x-components/src/components/highlight.vue | 155 +- packages/x-components/src/components/index.ts | 6 - .../src/components/items-list.vue | 51 +- .../fixed-header-and-asides-layout.vue | 246 +- .../layouts/multi-column-max-width-layout.vue | 508 +- .../layouts/single-column-layout.vue | 160 +- .../src/components/layouts/use-layouts.ts | 32 - .../src/components/location-provider.vue | 3 +- .../base-events-close-button.spec.ts | 48 +- .../base-events-modal-open-button.spec.ts | 49 +- .../__tests__/base-events-modal.spec.ts | 32 +- .../__tests__/base-id-modal-close.spec.ts | 41 +- .../__tests__/base-id-modal-open.spec.ts | 59 +- .../modals/__tests__/base-id-modal.spec.ts | 22 +- .../modals/__tests__/close-main-modal.spec.ts | 38 +- .../modals/__tests__/main-modal.spec.ts | 39 +- .../modals/__tests__/open-main-modal.spec.ts | 33 +- .../modals/base-events-modal-close.vue | 1 - .../modals/base-events-modal-open.vue | 1 - .../components/modals/base-events-modal.vue | 1 - .../components/modals/base-id-modal-close.vue | 54 +- .../components/modals/base-id-modal-open.vue | 52 +- .../src/components/modals/base-id-modal.vue | 1 - .../src/components/modals/base-modal.vue | 42 +- .../components/modals/close-main-modal.vue | 1 - .../src/components/modals/main-modal.vue | 1 - .../src/components/modals/open-main-modal.vue | 1 - .../x-components/src/components/no-element.ts | 15 - .../base-header-toggle-panel.spec.ts | 5 +- .../base-id-toggle-panel-button.spec.ts | 29 +- .../__tests__/base-id-toggle-panel.spec.ts | 24 +- .../panels/__tests__/base-tabs-panel.spec.ts | 64 +- .../__tests__/base-toggle-panel.spec.ts | 18 +- .../panels/base-header-toggle-panel.vue | 25 +- .../panels/base-id-toggle-panel-button.vue | 1 - .../panels/base-id-toggle-panel.vue | 20 +- .../src/components/panels/base-tabs-panel.vue | 6 +- .../__tests__/base-result-add-to-cart.spec.ts | 81 +- .../base-result-current-price.spec.ts | 7 +- .../result/__tests__/base-result-link.spec.ts | 21 +- .../base-result-previous-price.spec.ts | 14 +- .../__tests__/base-result-rating.spec.ts | 22 +- ...ult-variants-provider-and-selector.spec.ts | 115 +- .../result/base-result-add-to-cart.vue | 1 - .../components/result/base-result-image.vue | 36 +- .../components/result/base-result-link.vue | 2 +- .../components/result/base-result-rating.vue | 3 +- .../result/result-variant-selector.vue | 143 +- .../result/result-variants-provider.vue | 3 +- .../scroll/__tests__/base-scroll.spec.ts | 63 +- .../src/components/scroll/base-scroll.vue | 8 +- .../src/components/scroll/use-scroll.ts | 2 +- .../src/components/sliding-panel.vue | 83 +- .../src/components/snippet-callbacks.vue | 2 +- .../__tests__/base-suggestion.spec.ts | 56 +- .../__tests__/base-suggestions.spec.ts | 32 +- .../suggestions/base-suggestion.vue | 2 +- .../suggestions/base-suggestions.vue | 12 +- .../src/components/x-component.mixin.ts | 22 - .../src/components/x-component.utils.ts | 16 +- .../__tests__/use-alias-api.spec.ts | 15 +- .../__tests__/use-debounce.spec.ts | 2 +- .../composables/__tests__/use-getter.spec.ts | 19 +- .../__tests__/use-no-element-render.spec.ts | 79 - .../composables/__tests__/use-state.spec.ts | 18 +- .../composables/__tests__/use-x-bus.spec.ts | 37 +- .../x-components/src/composables/index.ts | 1 - .../src/composables/use-no-element-render.ts | 18 - .../x-components/src/composables/use-store.ts | 6 +- .../x-components/src/composables/use-x-bus.ts | 18 +- .../utilities/dev-mode.css | 12 + .../utilities/dev-mode.scss | 14 - .../{infinite-scroll => }/infinite-scroll.ts | 116 +- .../src/directives/infinite-scroll/index.ts | 2 - .../infinite-scroll/infinite-scroll.types.ts | 26 - packages/x-components/src/main.ts | 19 +- .../plugins/__tests__/x-plugin-alias.spec.ts | 175 - .../__tests__/x-plugin-emitters.spec.ts | 64 +- .../plugins/__tests__/x-plugin-mixin.spec.ts | 235 - .../__tests__/x-plugin-search-adapter.spec.ts | 7 +- .../src/plugins/__tests__/x-plugin.spec.ts | 156 +- .../src/plugins/devtools/devtools.plugin.ts | 7 +- packages/x-components/src/plugins/index.ts | 2 - .../x-components/src/plugins/x-emitters.ts | 12 +- .../src/plugins/x-plugin.alias.ts | 141 - .../src/plugins/x-plugin.mixin.ts | 113 - packages/x-components/src/plugins/x-plugin.ts | 43 +- packages/x-components/src/router.ts | 16 +- packages/x-components/src/shims-tsx.d.ts | 8 - packages/x-components/src/shims-vue.d.ts | 5 +- .../__tests__/vuex-watchers-hack.spec.ts | 45 +- .../x-components/src/store/store.types.ts | 5 +- .../utils/__tests__/getters-proxy.spec.ts | 5 +- .../src/store/utils/config-store.utils.ts | 4 +- .../src/store/utils/getters-proxy.utils.ts | 10 +- .../src/store/utils/query.utils.ts | 3 +- .../src/store/utils/status-store.utils.ts | 6 +- packages/x-components/src/store/x.module.ts | 24 +- .../src/utils/currency-formatter.ts | 6 +- packages/x-components/src/views/ResultApp.vue | 40 +- .../accessibility/wai-base-event-button.vue | 4 +- packages/x-components/src/views/home/Home.vue | 112 +- .../x-components/src/views/home/aside.vue | 40 +- .../views/home/display-result-provider.vue | 4 +- .../x-components/src/views/home/result.vue | 10 +- packages/x-components/src/views/pdp.vue | 2 - .../x-components/src/vue-global-events.d.ts | 4 - .../namespaced-wires-factory.spec.ts | 4 +- .../__tests__/operators-testing-utils.ts | 13 +- .../src/wiring/__tests__/utils.ts | 9 +- .../wiring/__tests__/wires-factory.spec.ts | 4 +- .../wiring/__tests__/wires-operators.spec.ts | 4 +- .../src/wiring/namespaced-wires.operators.ts | 3 +- .../x-components/src/wiring/wiring.types.ts | 3 +- .../x-components/src/wiring/wiring.utils.ts | 4 +- .../api/__tests__/default-api.spec.ts | 49 +- .../x-installer/__tests__/x-installer.spec.ts | 291 +- .../src/x-installer/x-installer/types.ts | 54 +- .../x-installer/x-installer/x-installer.ts | 80 +- .../__tests__/device-detector.spec.ts | 93 +- .../device/components/device-detector.vue | 2 +- .../components/__tests__/empathize.spec.ts | 7 +- .../empathize/components/empathize.vue | 8 +- .../__tests__/experience-controls.spec.ts | 17 +- .../store/__tests__/actions.spec.ts | 15 +- .../store/__tests__/getters.spec.ts | 5 - .../experience-controls/store/module.ts | 5 +- .../components/__tests__/extra-params.spec.ts | 14 +- .../__tests__/renderless-extra-params.spec.ts | 35 +- .../snippet-config-extra-params.spec.ts | 145 +- .../extra-params/components/extra-params.vue | 4 +- .../components/renderless-extra-param.vue | 6 +- .../__tests__/clear-filters.spec.ts | 31 +- .../__tests__/preselected-filters.spec.ts | 58 +- .../facets/__tests__/facets-provider.spec.ts | 49 +- .../facets/__tests__/facets.spec.ts | 90 +- .../components/facets/facets-provider.vue | 8 +- .../facets/components/facets/facets.vue | 7 +- .../filters/__tests__/all-filter.spec.ts | 57 +- .../editable-number-range-filter.spec.ts | 185 +- .../__tests__/hierarchical-filter.spec.ts | 141 +- .../__tests__/number-range-filter.spec.ts | 25 +- .../__tests__/renderless-filter.spec.ts | 24 +- .../filters/__tests__/simple-filter.spec.ts | 20 +- .../filters/editable-number-range-filter.vue | 10 +- .../filters/hierarchical-filter.vue | 4 +- .../filters/number-range-filter.vue | 2 + .../components/filters/renderless-filter.vue | 5 +- .../components/filters/simple-filter.vue | 2 + .../exclude-filters-with-no-results.spec.ts | 45 +- .../lists/__tests__/filters-list.spec.ts | 41 +- .../lists/__tests__/filters-search.spec.ts | 22 +- .../__tests__/selected-filters-list.spec.ts | 71 +- .../lists/__tests__/selected-filters.spec.ts | 99 +- .../lists/__tests__/sliced-filters.spec.ts | 17 +- .../lists/__tests__/sorted-filters.spec.ts | 24 +- .../lists/exclude-filters-with-no-results.vue | 4 +- .../facets/components/lists/filters-list.vue | 2 +- .../components/lists/filters-search.vue | 36 +- .../lists/selected-filters-list.vue | 5 +- .../components/lists/selected-filters.vue | 2 +- .../components/lists/sorted-filters.vue | 4 +- .../facets/components/preselected-filters.vue | 3 +- .../__tests__/use-filters-injection.spec.ts | 11 +- .../facets/composables/use-facets.ts | 4 +- .../facets/entities/__tests__/utils.ts | 5 +- .../service/__tests__/facets-service.spec.ts | 12 +- .../facets/store/__tests__/getters.spec.ts | 5 +- .../src/x-modules/facets/store/module.ts | 21 +- .../__tests__/clear-history-queries.spec.ts | 68 +- .../__tests__/history-queries-switch.spec.ts | 49 +- .../__tests__/history-queries.spec.ts | 93 +- .../__tests__/history-query.spec.ts | 127 +- .../components/__tests__/my-history.spec.ts | 57 +- .../__tests__/remove-history-query.spec.ts | 25 +- .../components/history-queries-switch.vue | 2 +- .../components/history-queries.vue | 2 - .../history-queries/components/my-history.vue | 2 +- .../store/__tests__/actions.spec.ts | 4 +- .../store/__tests__/getters.spec.ts | 4 +- .../store/getters/history-queries.getter.ts | 3 +- .../__tests__/identifier-result.spec.ts | 44 +- .../__tests__/identifier-results.spec.ts | 165 +- .../components/identifier-results.vue | 2 +- .../store/__tests__/actions.spec.ts | 17 +- .../store/__tests__/getters.spec.ts | 4 +- .../__tests__/next-queries-list.spec.ts | 297 +- .../components/__tests__/next-queries.spec.ts | 287 +- .../__tests__/next-query-preview.spec.ts | 85 +- .../components/__tests__/next-query.spec.ts | 64 +- .../components/next-queries-list.vue | 116 +- .../next-queries/components/next-queries.vue | 2 - .../store/__tests__/actions.spec.ts | 17 +- .../store/__tests__/getters.spec.ts | 4 +- .../fetch-next-query-preview.action.ts | 8 +- .../__tests__/popular-search.spec.ts | 17 +- .../__tests__/popular-searches.spec.ts | 51 +- .../components/popular-searches.vue | 2 - .../store/__tests__/actions.spec.ts | 17 +- .../store/__tests__/getters.spec.ts | 18 +- .../__tests__/query-preview-button.spec.ts | 49 +- .../__tests__/query-preview-list.spec.ts | 153 +- .../__tests__/query-preview.spec.ts | 385 +- .../components/query-preview-button.vue | 1 - .../components/query-preview-list.vue | 14 +- .../components/query-preview.vue | 153 +- .../use-queries-preview.composable.spec.ts | 33 +- .../store/__tests__/actions.spec.ts | 76 +- .../store/__tests__/getters.spec.ts | 8 +- .../x-modules/queries-preview/store/module.ts | 7 +- .../x-modules/queries-preview/store/types.ts | 12 +- .../utils/__tests__/utils.spec.ts | 62 +- .../__tests__/query-suggestion.spec.ts | 24 +- .../__tests__/query-suggestions.spec.ts | 64 +- .../components/query-suggestions.vue | 2 - .../store/__tests__/actions.spec.ts | 17 +- .../store/__tests__/getter.spec.ts | 4 +- .../store/getters/query-suggestions.getter.ts | 3 +- .../__tests__/recommendations.spec.ts | 59 +- .../components/recommendations.vue | 113 +- .../store/__tests__/actions.spec.ts | 17 +- .../store/__tests__/getters.spec.ts | 4 +- .../components/__tests__/related-tag.spec.ts | 114 +- .../components/__tests__/related-tags.spec.ts | 208 +- .../related-tags/components/related-tags.vue | 2 +- .../store/__tests__/actions.spec.ts | 112 +- .../store/__tests__/getters.spec.ts | 4 +- .../__tests__/scroll-to-top.spec.ts | 65 +- .../components/__tests__/scroll.spec.ts | 14 +- .../scroll/components/main-scroll-item.vue | 11 +- .../scroll/components/main-scroll.vue | 5 +- .../scroll/components/scroll-to-top.vue | 10 +- .../scroll/components/scroll.const.ts | 2 +- .../x-modules/scroll/components/scroll.vue | 4 +- .../src/x-modules/scroll/store/module.ts | 7 +- .../__tests__/clear-search-input.spec.ts | 22 +- .../__tests__/search-button.spec.ts | 80 +- .../search-input-placeholder.spec.ts | 46 +- .../components/__tests__/search-input.spec.ts | 175 +- .../search-box/components/search-button.vue | 4 +- .../components/search-input-placeholder.vue | 4 +- .../search-box/components/search-input.vue | 3 +- .../store/__tests__/actions.spec.ts | 13 +- .../components/__tests__/banner.spec.ts | 23 +- .../components/__tests__/banners-list.spec.ts | 175 +- .../__tests__/fallback-disclaimer.spec.ts | 40 +- .../__tests__/partial-query-button.spec.ts | 30 +- .../__tests__/partial-results-list.spec.ts | 59 +- .../components/__tests__/promoted.spec.ts | 18 +- .../__tests__/promoteds-list.spec.ts | 184 +- .../components/__tests__/redirection.spec.ts | 82 +- .../components/__tests__/results-list.spec.ts | 241 +- .../__tests__/sort-dropdown.spec.ts | 37 +- .../components/__tests__/sort-list.spec.ts | 36 +- .../__tests__/sort-picker-list.spec.ts | 43 +- .../__tests__/spellcheck-button.spec.ts | 49 +- .../components/__tests__/spellcheck.spec.ts | 44 +- .../x-modules/search/components/banner.vue | 10 +- .../search/components/banners-list.vue | 82 +- .../components/partial-results-list.vue | 2 +- .../x-modules/search/components/promoted.vue | 10 +- .../search/components/promoteds-list.vue | 64 +- .../search/components/redirection.vue | 2 - .../search/components/results-list.vue | 94 +- .../x-modules/search/components/sort-list.vue | 2 +- .../search/store/__tests__/actions.spec.ts | 17 +- .../search/store/__tests__/getters.spec.ts | 4 +- .../src/x-modules/search/store/module.ts | 2 +- .../__tests__/semantic-queries.spec.ts | 81 +- .../__tests__/semantic-query.spec.ts | 20 +- .../components/semantic-queries.vue | 93 +- .../store/__tests__/actions.spec.ts | 16 +- .../store/__tests__/getters.spec.ts | 4 +- .../components/__tests__/tagging.spec.ts | 13 +- .../__tests__/pdp-add-to-cart.service.spec.ts | 5 +- .../tagging/store/__tests__/actions.spec.ts | 11 +- .../components/__tests__/url-handler.spec.ts | 173 +- .../x-modules/url/components/url-handler.vue | 2 +- .../x-modules/url/store/__tests__/utils.ts | 10 +- .../store/mutations/set-params.mutation.ts | 3 +- packages/x-components/tests/.eslintrc.js | 5 +- .../tests/e2e/clear-filters.feature | 2 + .../tests/e2e/common/common-steps.spec.ts | 15 +- .../x-components/tests/e2e/scroll.feature | 23 +- .../tests/e2e/scroll/scroll.spec.ts | 26 +- .../tests/e2e/search-box/search-box.spec.ts | 2 +- packages/x-components/tests/shims-vue.d.ts | 5 + packages/x-components/tests/support/index.ts | 16 +- .../x-components/tests/tsconfig.eslint.json | 3 - packages/x-components/tests/tsconfig.json | 9 +- .../x-components/tests/unit/banner.spec.ts | 78 +- .../tests/unit/base-column-pickers.spec.ts | 127 +- .../tests/unit/base-events-modal.spec.ts | 95 +- .../x-components/tests/unit/base-grid.spec.ts | 176 +- .../tests/unit/base-modal.spec.ts | 124 +- .../tests/unit/base-result-image.spec.ts | 216 +- packages/x-components/tests/unit/html.spec.ts | 63 +- .../tests/unit/main-scroll.spec.ts | 256 +- .../tests/unit/search-input.spec.ts | 43 +- .../tests/unit/sliding-panel.spec.ts | 259 +- .../x-components/tests/unit/useDevice.spec.ts | 54 +- packages/x-components/vite.config.ts | 13 +- packages/x-tailwindcss/CHANGELOG.md | 8 + packages/x-tailwindcss/package.json | 6 +- pnpm-lock.yaml | 6168 ++++++++--------- 399 files changed, 9389 insertions(+), 14664 deletions(-) create mode 100644 packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue create mode 100644 packages/_vue3-migration-test/src/components/test-base-switch.vue delete mode 100644 packages/_vue3-migration-test/src/components/test-use-layouts.vue delete mode 100644 packages/x-components/build/postcss-dir-pseudo-class.d.ts delete mode 100644 packages/x-components/build/postcss-logical.d.ts delete mode 100644 packages/x-components/build/postcss-types/options.ts create mode 100644 packages/x-components/build/tools/inject-css.js delete mode 100644 packages/x-components/src/components/__tests__/dynamic-props.mixin.spec.ts delete mode 100644 packages/x-components/src/components/__tests__/no-element.spec.ts delete mode 100644 packages/x-components/src/components/__tests__/x-component-mixin.spec.ts create mode 100644 packages/x-components/src/components/animations/__tests__/staggered-fade-and-slide.spec.ts delete mode 100644 packages/x-components/src/components/animations/__tests__/staggering-transition-group.spec.ts create mode 100644 packages/x-components/src/components/animations/no-animation.vue delete mode 100644 packages/x-components/src/components/animations/staggering-transition-group.vue delete mode 100644 packages/x-components/src/components/decorators/__tests__/bus.decorators.spec.ts delete mode 100644 packages/x-components/src/components/decorators/__tests__/debounce.decorators.spec.ts delete mode 100644 packages/x-components/src/components/decorators/__tests__/injection.decorators.spec.ts delete mode 100644 packages/x-components/src/components/decorators/__tests__/store.decorators.spec.ts delete mode 100644 packages/x-components/src/components/decorators/bus.decorators.ts delete mode 100644 packages/x-components/src/components/decorators/debounce.decorators.ts delete mode 100644 packages/x-components/src/components/decorators/injection.decorators.ts delete mode 100644 packages/x-components/src/components/decorators/store.decorators.ts delete mode 100644 packages/x-components/src/components/dynamic-props.mixin.ts delete mode 100644 packages/x-components/src/components/layouts/use-layouts.ts delete mode 100644 packages/x-components/src/components/no-element.ts delete mode 100644 packages/x-components/src/components/x-component.mixin.ts delete mode 100644 packages/x-components/src/composables/__tests__/use-no-element-render.spec.ts delete mode 100644 packages/x-components/src/composables/use-no-element-render.ts create mode 100644 packages/x-components/src/design-system-deprecated/utilities/dev-mode.css delete mode 100644 packages/x-components/src/design-system-deprecated/utilities/dev-mode.scss rename packages/x-components/src/directives/{infinite-scroll => }/infinite-scroll.ts (53%) delete mode 100644 packages/x-components/src/directives/infinite-scroll/index.ts delete mode 100644 packages/x-components/src/directives/infinite-scroll/infinite-scroll.types.ts delete mode 100644 packages/x-components/src/plugins/__tests__/x-plugin-alias.spec.ts delete mode 100644 packages/x-components/src/plugins/__tests__/x-plugin-mixin.spec.ts delete mode 100644 packages/x-components/src/plugins/x-plugin.alias.ts delete mode 100644 packages/x-components/src/plugins/x-plugin.mixin.ts delete mode 100644 packages/x-components/src/shims-tsx.d.ts delete mode 100644 packages/x-components/src/vue-global-events.d.ts create mode 100644 packages/x-components/tests/shims-vue.d.ts delete mode 100644 packages/x-components/tests/tsconfig.eslint.json diff --git a/.gitignore b/.gitignore index 43fcc33e38..1d2bd429e4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ **/tests/e2e/videos/ **/tests/e2e/screenshots/ +**/tests/e2e/downloads/ # local env files .env.local diff --git a/packages/_vue3-migration-test/CHANGELOG.md b/packages/_vue3-migration-test/CHANGELOG.md index 521e723310..8003a068f7 100644 --- a/packages/_vue3-migration-test/CHANGELOG.md +++ b/packages/_vue3-migration-test/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.0-alpha.51](https://github.com/empathyco/x/compare/vue3-migration-test@1.0.0-alpha.50...vue3-migration-test@1.0.0-alpha.51) (2024-09-05) + + +### Bug Fixes + +* **list-components:** fix list components, migrate infinite-scroll directive and deprecated layouts (#1576) ([4b57f19](https://github.com/empathyco/x/commit/4b57f19be601220a4dc6874dc1d5efa8fdbcf991)) + + +### Code Refactoring + +* **animation-factory:** fix Vue3 breaking changes (#1579) ([f915731](https://github.com/empathyco/x/commit/f915731cc8ea662a2066fee054f47885ee2154a9)) +* **base-switch:** decommission of value prop (#1589) ([35968eb](https://github.com/empathyco/x/commit/35968ebb69634984e867b03221d373efe4af96c8)) +* **base-switch:** migrate component to vue3 (#1588) ([875a6e2](https://github.com/empathyco/x/commit/875a6e2638885498396db362753550857ec8d7e2)) +* **staggered-fade-and-slide:** use Vue native staggered transition (#1578) ([79e136f](https://github.com/empathyco/x/commit/79e136f04b0b75ddea77c464b8f5ea0ed6602eb1)) + + + ## [1.0.0-alpha.50](https://github.com/empathyco/x/compare/vue3-migration-test@1.0.0-alpha.49...vue3-migration-test@1.0.0-alpha.50) (2024-07-23) diff --git a/packages/_vue3-migration-test/package.json b/packages/_vue3-migration-test/package.json index 382a7b12e4..620805f50e 100644 --- a/packages/_vue3-migration-test/package.json +++ b/packages/_vue3-migration-test/package.json @@ -1,7 +1,7 @@ { "name": "vue3-migration-test", "private": "true", - "version": "1.0.0-alpha.50", + "version": "1.0.0-alpha.51", "scripts": { "dev": "vite", "preview": "vite preview", diff --git a/packages/_vue3-migration-test/src/components/animations/index.ts b/packages/_vue3-migration-test/src/components/animations/index.ts index b951da74a4..ca0d8338a1 100644 --- a/packages/_vue3-migration-test/src/components/animations/index.ts +++ b/packages/_vue3-migration-test/src/components/animations/index.ts @@ -5,3 +5,4 @@ export { default as TestCrossFade } from './test-cross-fade.vue'; export { default as TestFade } from './test-fade.vue'; export { default as TestFadeAndSlide } from './test-fade-and-slide.vue'; export { default as TestAnimationFactory } from './test-animation-factory.vue'; +export { default as TestStaggeredFadeAndSlide } from './test-staggered-fade-and-slide.vue'; diff --git a/packages/_vue3-migration-test/src/components/animations/test-animation-factory.vue b/packages/_vue3-migration-test/src/components/animations/test-animation-factory.vue index 3aa3de66cf..e27e830812 100644 --- a/packages/_vue3-migration-test/src/components/animations/test-animation-factory.vue +++ b/packages/_vue3-migration-test/src/components/animations/test-animation-factory.vue @@ -1,35 +1,5 @@ diff --git a/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue b/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue new file mode 100644 index 0000000000..dadcd355f5 --- /dev/null +++ b/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue @@ -0,0 +1,68 @@ + + + diff --git a/packages/_vue3-migration-test/src/components/index.ts b/packages/_vue3-migration-test/src/components/index.ts index 77985e8f78..d9005ffb9a 100644 --- a/packages/_vue3-migration-test/src/components/index.ts +++ b/packages/_vue3-migration-test/src/components/index.ts @@ -6,7 +6,6 @@ export { default as TestBaseDropdown } from './test-base-dropdown.vue'; export { default as TestBaseEventButton } from './test-base-event-button.vue'; export { default as TestBaseVariableColumnGrid } from './test-base-variable-column-grid.vue'; export { default as TestSlidingPanel } from './test-sliding-panel.vue'; -export { default as TestUseLayouts } from './test-use-layouts.vue'; export { default as TestBaseSuggestions } from './suggestions/test-base-suggestions.vue'; export { default as TestHighlight } from './test-highlight.vue'; export { default as TestBaseResultImages } from './result/test-base-result-images.vue'; @@ -20,3 +19,4 @@ export { default as TestTagging } from './tagging/test-tagging.vue'; export { default as TestRenderlessExtraParam } from './extra-params/test-renderless-extra-param.vue'; export { default as TestIcons } from './icons/test-icons.vue'; export { default as TestDisplayEmitter } from './test-display-emitter.vue'; +export { default as TestBaseSwitch } from './test-base-switch.vue'; diff --git a/packages/_vue3-migration-test/src/components/test-base-switch.vue b/packages/_vue3-migration-test/src/components/test-base-switch.vue new file mode 100644 index 0000000000..5ecb913878 --- /dev/null +++ b/packages/_vue3-migration-test/src/components/test-base-switch.vue @@ -0,0 +1,18 @@ + + + diff --git a/packages/_vue3-migration-test/src/components/test-use-layouts.vue b/packages/_vue3-migration-test/src/components/test-use-layouts.vue deleted file mode 100644 index c925c8c5eb..0000000000 --- a/packages/_vue3-migration-test/src/components/test-use-layouts.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts index c040f9f98c..9dd876ef80 100644 --- a/packages/_vue3-migration-test/src/router.ts +++ b/packages/_vue3-migration-test/src/router.ts @@ -22,7 +22,6 @@ import { TestSearchBox, TestBaseVariableColumnGrid, TestEmpathize, - TestUseLayouts, TestSlidingPanel, TestBaseSuggestions, TestHighlight, @@ -50,7 +49,9 @@ import { TestRenderlessExtraParam, TestAnimationFactory, TestIcons, - TestDisplayEmitter + TestDisplayEmitter, + TestBaseSwitch, + TestStaggeredFadeAndSlide } from './'; const routes = [ @@ -174,11 +175,6 @@ const routes = [ name: 'BaseVariableColumnGrid', component: TestBaseVariableColumnGrid }, - { - path: '/test-use-layouts', - name: 'UseLayouts', - component: TestUseLayouts - }, { path: '/base-suggestions', name: 'BaseSuggestions', @@ -308,6 +304,16 @@ const routes = [ path: '/display-emitter', name: 'DisplayEmitter', component: TestDisplayEmitter + }, + { + path: '/base-switch', + name: 'BaseSwitch', + component: TestBaseSwitch + }, + { + path: '/staggered-fade-and-slide', + name: 'StaggeredFadeAndSlide', + component: TestStaggeredFadeAndSlide } ]; diff --git a/packages/x-archetype-utils/CHANGELOG.md b/packages/x-archetype-utils/CHANGELOG.md index e326fed8eb..d3884d2e86 100644 --- a/packages/x-archetype-utils/CHANGELOG.md +++ b/packages/x-archetype-utils/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.0-alpha.1](https://github.com/empathyco/x/compare/@empathyco/x-archetype-utils@1.1.0-alpha.2...@empathyco/x-archetype-utils@2.0.0-alpha.1) (2024-09-05) + + +### ⚠ BREAKING CHANGES + +* @empathyco/x-components v6 and @empathyco/x-archetype-utils v2 are only compatible with Vue 3 and if you are looking for the Vue 2 versions, take look at the main brach. +* @empathyco/x-archetype-utils is only compatible with vue 3 + +### Features + +* bump packages versions (#1611) ([eb7d377](https://github.com/empathyco/x/commit/eb7d377f0da3d09b78bc964de90529326889eb62)) +* bump vue18n version (#1604) ([9320c57](https://github.com/empathyco/x/commit/9320c57bd1aa2ff01fea8133238dc8fb809484c0)) +* **rollup:** update replace config to align CSS injector with Vue 3 (#1607) ([b98a31e](https://github.com/empathyco/x/commit/b98a31e488b788bab0a2fede87739e4cc9d1df57)) + + + ## [1.1.0-alpha.2](https://github.com/empathyco/x/compare/@empathyco/x-archetype-utils@1.1.0-alpha.1...@empathyco/x-archetype-utils@1.1.0-alpha.2) (2024-02-08) diff --git a/packages/x-archetype-utils/package.json b/packages/x-archetype-utils/package.json index 8cf14fe964..9e5403bd01 100644 --- a/packages/x-archetype-utils/package.json +++ b/packages/x-archetype-utils/package.json @@ -1,6 +1,6 @@ { "name": "@empathyco/x-archetype-utils", - "version": "1.1.0-alpha.2", + "version": "2.0.0-alpha.1", "description": "Utilities for x-archetype", "author": "Empathy Systems Corporation S.L.", "license": "Apache-2.0", @@ -39,12 +39,12 @@ "@empathyco/x-deep-merge": "^2.0.3-alpha.1", "@empathyco/x-utils": "workspace:^1.0.3-alpha.1", "tslib": "~2.6.0", - "vue-i18n": "~8.28.2" + "vue-i18n": "~9.14.0" }, "devDependencies": { "@types/jest": "~27.5.0", "@types/node": "~18.19.0", - "@vue/test-utils": "~1.0.3", + "@vue/test-utils": "~2.4.6", "jest": "~27.5.0", "rimraf": "~3.0.2", "rollup": "~4.9.1", @@ -53,11 +53,11 @@ "rollup-plugin-typescript2": "~0.36.0", "ts-jest": "~27.1.0", "typescript": "~4.9.4", - "vue": "~2.7.14" + "vue": "~3.4.31" }, "peerDependencies": { - "vue": "^2.7.0", - "vue-i18n": "^8.0.0" + "vue": "^3.4.31", + "vue-i18n": "^9.14.0" }, "publishConfig": { "access": "public" diff --git a/packages/x-archetype-utils/rollup.config.mjs b/packages/x-archetype-utils/rollup.config.mjs index 3173eb269e..d5b739bc33 100644 --- a/packages/x-archetype-utils/rollup.config.mjs +++ b/packages/x-archetype-utils/rollup.config.mjs @@ -24,7 +24,13 @@ export default { }), typescript({ clean: true, - useTsconfigDeclarationDir: true + useTsconfigDeclarationDir: true, + tsconfigOverride: { + exclude: [ + 'node_modules', + '**/__tests__/**', + ] + } }) ] }; diff --git a/packages/x-archetype-utils/src/__tests__/i18n.plugin.spec.ts b/packages/x-archetype-utils/src/__tests__/i18n.plugin.spec.ts index 82becaa99f..a050a695a0 100644 --- a/packages/x-archetype-utils/src/__tests__/i18n.plugin.spec.ts +++ b/packages/x-archetype-utils/src/__tests__/i18n.plugin.spec.ts @@ -1,6 +1,5 @@ import { DeepPartial } from '@empathyco/x-utils'; -import Vue from 'vue'; -import { mount, createLocalVue, Wrapper } from '@vue/test-utils'; +import { mount, VueWrapper } from '@vue/test-utils'; import { I18n } from '../i18n/i18n.plugin'; import { Device, I18nOptions, Locale } from '../i18n/i18n.types'; @@ -24,10 +23,6 @@ describe('Test custom i18n plugin for several use cases', () => { i18nOptions: Partial>> = {}, key = 'testComponent.title' ): Promise { - const TestComponent = Vue.component('testComponent', { - template: `
{{ $t("${key}") }}
` - }); - const localVue = createLocalVue(); const i18n = await I18n.create({ locale: 'en', messages: { @@ -43,11 +38,19 @@ describe('Test custom i18n plugin for several use cases', () => { fallbackLocale: 'en', ...i18nOptions }); - localVue.use(i18n); const setLocale = i18n.setLocale.bind(i18n); const setLocaleDevice = i18n.setDevice.bind(i18n); - const wrapper = mount(TestComponent, { localVue, i18n: i18n.vueI18n }); + const wrapper = mount( + { + template: `
{{ $t("${key}") }}
` + }, + { + global: { + plugins: [i18n] + } + } + ); return { wrapper, setLocale, setLocaleDevice }; } @@ -158,7 +161,7 @@ describe('Test custom i18n plugin for several use cases', () => { }); interface RenderComponentAPI { - wrapper: Wrapper; + wrapper: VueWrapper; setLocale: (newLocale: Locale) => Promise; setLocaleDevice: (newDevice: Device) => Promise; } diff --git a/packages/x-archetype-utils/src/build/rollup/rollup.config.ts b/packages/x-archetype-utils/src/build/rollup/rollup.config.ts index cfc387a831..21218c4227 100644 --- a/packages/x-archetype-utils/src/build/rollup/rollup.config.ts +++ b/packages/x-archetype-utils/src/build/rollup/rollup.config.ts @@ -1,7 +1,8 @@ export const rollupCssInjectorConfig = { replace: { // Replace X CSS injector by our custom one. - 'addStyle(id, style);': 'window.xCSSInjector.addStyle(style);', + 'export default injectCss;': + 'export default (css) => window.xCSSInjector.addStyle({ source: css });', delimiters: ['', ''] }, styles: { diff --git a/packages/x-archetype-utils/src/i18n/i18n.plugin.ts b/packages/x-archetype-utils/src/i18n/i18n.plugin.ts index ec3b18440c..853b26f94d 100644 --- a/packages/x-archetype-utils/src/i18n/i18n.plugin.ts +++ b/packages/x-archetype-utils/src/i18n/i18n.plugin.ts @@ -1,6 +1,6 @@ import { isObject } from '@empathyco/x-utils'; -import { VueConstructor } from 'vue'; -import VueI18n, { LocaleMessageObject, LocaleMessage } from 'vue-i18n'; +import { App } from 'vue'; +import { createI18n, LocaleMessageObject, I18n as VueI18n } from 'vue-i18n'; import { deepMerge } from '@empathyco/x-deep-merge'; import { AnyMessages, Device, I18nOptions, LoadLazyMessagesByDevice, Locale } from './i18n.types'; @@ -49,19 +49,20 @@ export class I18n { * * @param vue - The Vue instance. */ - install(vue: VueConstructor): void { - vue.use(VueI18n); - this.vueI18n = new VueI18n({ + install(vue: App): void { + this.vueI18n = createI18n({ locale: this.locale, - messages: this.currentMessages ? { [this.locale]: this.currentMessages } : {}, silentFallbackWarn: true, - missing: (locale, key) => { + messages: this.currentMessages ? ({ [this.locale]: this.currentMessages } as any) : {}, + missing: (_, key: string) => { return ( this.getMessageWithDotsInKey(key) ?? - `[i18n] Key '${key}' is missing for locale: '${locale}'` + `[i18n] Key '${key}' is missing for locale: '${this.locale}'` ); } }); + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + vue.use(this.vueI18n); } /** @@ -76,7 +77,7 @@ export class I18n { // TO-DO Support function or array messages const message = path .split('.') - .reduce( + .reduce( (messages, key, index, pathParts) => isObject(messages) ? messages[key] ?? messages[pathParts.slice(index).join('.')] @@ -98,7 +99,7 @@ export class I18n { this.locale = newLocale; await this.changeMessages(); - this.vueI18n.locale = this.locale; + this.vueI18n.global.locale = this.locale; } } @@ -123,7 +124,8 @@ export class I18n { protected async changeMessages(): Promise { this.currentMessages = await this.getCurrentMessages(); - this.vueI18n.setLocaleMessage(this.locale, this.currentMessages); + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + this.vueI18n.global.setLocaleMessage(this.locale, this.currentMessages); } /** diff --git a/packages/x-archetype-utils/src/i18n/i18n.types.ts b/packages/x-archetype-utils/src/i18n/i18n.types.ts index 0b37a1974d..aa85223e4c 100644 --- a/packages/x-archetype-utils/src/i18n/i18n.types.ts +++ b/packages/x-archetype-utils/src/i18n/i18n.types.ts @@ -1,5 +1,5 @@ -import VueI18n from 'vue-i18n'; import { DeepPartial } from '@empathyco/x-utils'; +import { I18n as VueI18n } from 'vue-i18n'; /** Supported locales. */ export type Locale = string; diff --git a/packages/x-components/.eslintrc.js b/packages/x-components/.eslintrc.js index 75aafd665d..91454f1566 100644 --- a/packages/x-components/.eslintrc.js +++ b/packages/x-components/.eslintrc.js @@ -8,8 +8,10 @@ module.exports = { rules: { 'no-dupe-class-members': 'off', '@typescript-eslint/no-unused-vars-experimental': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', 'vue/require-default-prop': 'off', - '@typescript-eslint/explicit-function-return-type': 'off' + 'vue/multi-word-component-names': 'off', + 'vue/no-v-for-template-key': 'off' }, overrides: [ { @@ -34,7 +36,9 @@ module.exports = { { files: ['*.spec.ts'], rules: { - 'max-len': 'off' + 'max-len': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + 'vue/one-component-per-file': 'off' } } ] diff --git a/packages/x-components/.gitignore b/packages/x-components/.gitignore index e4ef8b47ee..a11c342ad7 100644 --- a/packages/x-components/.gitignore +++ b/packages/x-components/.gitignore @@ -8,6 +8,7 @@ /tests/e2e/videos/ /tests/e2e/screenshots/ +/tests/e2e/downloads/ # local env files .env.local diff --git a/packages/x-components/CHANGELOG.md b/packages/x-components/CHANGELOG.md index 91c54294a2..d1bc9a83f0 100644 --- a/packages/x-components/CHANGELOG.md +++ b/packages/x-components/CHANGELOG.md @@ -3,6 +3,90 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.0.0-alpha.3](https://github.com/empathyco/x/compare/@empathyco/x-components@6.0.0-alpha.2...@empathyco/x-components@6.0.0-alpha.3) (2024-10-04) + + +### Bug Fixes + +* **scroll:** scroll direction inconsistency (#1629) ([ad970ae](https://github.com/empathyco/x/commit/ad970ae8cd7898f23baa11d3a128d3251cd57cdb)) + + + +## [6.0.0-alpha.2](https://github.com/empathyco/x/compare/@empathyco/x-components@6.0.0-alpha.1...@empathyco/x-components@6.0.0-alpha.2) (2024-09-25) + + +### ⚠ BREAKING CHANGES + +* **history-queries-switch:** remove `change` event emission in favour of `update:modelValue` in `BaseSwitch` component. + +### Bug Fixes + +* **history-queries-switch:** migrate value to modelValue (#1618) ([82a6e27](https://github.com/empathyco/x/commit/82a6e27b9a78388b6c0b42c57ce7ff6e63293686)) + + +### Testing + +* active and fix linter for tests (#1616) ([0f35e7c](https://github.com/empathyco/x/commit/0f35e7caf529e7a06252abe0ea64b119c1206566)) +* adjust test to vue3 (#1608) ([0f4bb97](https://github.com/empathyco/x/commit/0f4bb97dcba50b21c98575d51bda944bfe532b1f)) +* **e2e-components:** rewrite all e2e sheet components to accomplish vue3 (#1619) ([5a419b2](https://github.com/empathyco/x/commit/5a419b2d882c151f81d9921d591140e5471f5b05)) +* **e2e:** fix e2e tests (#1617) ([f81add6](https://github.com/empathyco/x/commit/f81add665e5b2f36ecedf25d14eb5f6573f0e0fb)) + + + +## [6.0.0-alpha.1](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.81...@empathyco/x-components@6.0.0-alpha.1) (2024-09-05) + + +### ⚠ BREAKING CHANGES + +* @empathyco/x-components v6 and @empathyco/x-archetype-utils v2 are only compatible with Vue 3 and if you are looking for the Vue 2 versions, take look at the main brach. +* refactors the GlobalXBus to use a prop to receive the listeners instead of relying on attributes. + +### Features + +* bump packages versions (#1611) ([eb7d377](https://github.com/empathyco/x/commit/eb7d377f0da3d09b78bc964de90529326889eb62)) +* make internal demo app functional (#1574) ([a485dea](https://github.com/empathyco/x/commit/a485dea768918280e2fec46cae0d5a3f4932002f)) +* **x-installer:** update to vue3 and adapt x-installer (#1572) ([c6b28e5](https://github.com/empathyco/x/commit/c6b28e5e9a07832e992f27a40d7513dbec90d2f2)) + + +### Bug Fixes + +* adjust to new vue render function API (#1596) ([7ec2b97](https://github.com/empathyco/x/commit/7ec2b9719f18275e7843544f26f94c393fef7090)) +* **infinite-scroll:** getting xBus from XPlugin instead useXBus ([b936ae5](https://github.com/empathyco/x/commit/b936ae585b4ef5ae390515cfc2c3a0dfc782ad39)) +* **layout:** avoid shared CSS classes between layouts with scoped (#1605) ([b3cc3f5](https://github.com/empathyco/x/commit/b3cc3f528f71b0877a406c65cadfbecda7aca756)) +* **list-components:** fix list components, migrate infinite-scroll directive and deprecated layouts (#1576) ([4b57f19](https://github.com/empathyco/x/commit/4b57f19be601220a4dc6874dc1d5efa8fdbcf991)) +* **search:** replace results state to append new results instead of pushing them (#1597) ([e64e3cb](https://github.com/empathyco/x/commit/e64e3cb9f3c046d1c30249fb56b0b3ad32f97925)) + + +### Testing + +* **auto-progress-bar:** fix test after Vue3 update (#1582) ([335c370](https://github.com/empathyco/x/commit/335c37021f9a0f6fefaec01714cc31fb6bf66391)) +* **components:** fix tests after Vue3 update BATCH 1 ([5d4dec8](https://github.com/empathyco/x/commit/5d4dec81b5b9ee99f1cbfc1d88bbf58cd5188602)) +* **vue-jest:** update vue-jest dependency (#1581) ([46ff08b](https://github.com/empathyco/x/commit/46ff08bb5834d790b0c6414fc549141b9a64f1d1)) + + +### Code Refactoring + +* **animation-factory:** fix Vue3 breaking changes (#1579) ([f915731](https://github.com/empathyco/x/commit/f915731cc8ea662a2066fee054f47885ee2154a9)) +* **base-switch:** decommission of value prop (#1589) ([35968eb](https://github.com/empathyco/x/commit/35968ebb69634984e867b03221d373efe4af96c8)) +* **base-switch:** migrate component to vue3 (#1588) ([875a6e2](https://github.com/empathyco/x/commit/875a6e2638885498396db362753550857ec8d7e2)) +* **components:** remove warnings first batch (#1575) ([1877da6](https://github.com/empathyco/x/commit/1877da61c2eb5aff5742387dc2285b3db86afda5)) +* get rid of NoElement component and useNoElementRender composable (#1583) ([059eecc](https://github.com/empathyco/x/commit/059eecc0fd5aa1612c1fc7b4d5ec08cfe5fc5b84)) +* **render-function:** clear void calls (#1580) ([7875ff5](https://github.com/empathyco/x/commit/7875ff5b8420ea1ed03edd3fee28a822582b4641)) +* **staggered-fade-and-slide:** use Vue native staggered transition (#1578) ([79e136f](https://github.com/empathyco/x/commit/79e136f04b0b75ddea77c464b8f5ea0ed6602eb1)) +* **v-deep:** replace by :deep() (#1577) ([71c08db](https://github.com/empathyco/x/commit/71c08dbc175093bbfc56160e3b07b8774fcbc683)) + + +### Build System + +* adjust rollup production build for Vue3 (#1603) ([ed587b1](https://github.com/empathyco/x/commit/ed587b16a56b32734e9cf3ff05311954627f3820)) + + +### Continuous Integration + +* **linter:** fix linter issues to pass the CI (#1606) ([aff3151](https://github.com/empathyco/x/commit/aff3151818c64885d7c28e69f511d33ae41b38f5)) + + + ## [5.0.0-alpha.83](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.82...@empathyco/x-components@5.0.0-alpha.83) (2024-10-03) diff --git a/packages/x-components/build/build.ts b/packages/x-components/build/build.ts index 42b28542fe..5bf2451666 100644 --- a/packages/x-components/build/build.ts +++ b/packages/x-components/build/build.ts @@ -1,35 +1,16 @@ -import * as path from 'path'; -import fs from 'fs'; -import { rollup } from 'rollup'; -import { cssDeprecatedComponentsRollupConfig, rollupConfig } from './rollup.config'; - -const rootDir = path.resolve(__dirname, '../'); - -// eslint-disable-next-line no-console -build().catch(console.error); +import { OutputOptions, rollup } from 'rollup'; +import { cssDeprecatedRollupConfig, rollupConfig } from './rollup.config'; /** * Entry point for building the project. */ -async function build(): Promise { - try { - const bundle = await rollup(rollupConfig); - await bundle.write(rollupConfig.output); - - const bundleCssDeprecatedComponents = await rollup(cssDeprecatedComponentsRollupConfig); - await bundleCssDeprecatedComponents.write(cssDeprecatedComponentsRollupConfig.output); +async function build() { + const bundle = await rollup(rollupConfig); + await bundle.write(rollupConfig.output as OutputOptions); - return removeTempFiles(); - } catch (error) { - // eslint-disable-next-line no-console - console.error('Build failed: ', (error as Error).message); - process.exit(1); - } + const bundleCssDeprecatedComponents = await rollup(cssDeprecatedRollupConfig); + await bundleCssDeprecatedComponents.write(cssDeprecatedRollupConfig.output as OutputOptions); } -/** - * Function for deleting useless folders. - */ -function removeTempFiles(): void { - fs.rmSync(path.join(rootDir, 'temp'), { recursive: true }); -} +// eslint-disable-next-line no-console +build().catch(console.error); diff --git a/packages/x-components/build/build.utils.ts b/packages/x-components/build/build.utils.ts index 398eba5fb4..9cd88ad004 100644 --- a/packages/x-components/build/build.utils.ts +++ b/packages/x-components/build/build.utils.ts @@ -2,24 +2,24 @@ import fs from 'fs'; import path from 'path'; /** - * Asserts a file path directory exists recursively, creating it if it does not. + * Asserts a directory exist recursively, creating it if it does not. * - * @param filePath - The full path to the file, that may or may not exist. + * @param directoryPath - The full directory path, that may or may not exist. */ -export function ensureFilePathExists(filePath: string): void { - const dirName = path.dirname(filePath); - ensureDirectoryPathExists(dirName); +export function ensureDirectoryPathExists(directoryPath: string) { + if (!fs.existsSync(directoryPath)) { + fs.mkdirSync(directoryPath, { recursive: true }); + } } /** - * Asserts a directory exist recursively, creating it if it does not. + * Asserts a file path directory exists recursively, creating it if it does not. * - * @param directoryPath - The full directory path, that may or may not exists. + * @param filePath - The full path to the file, that may or may not exist. */ -export function ensureDirectoryPathExists(directoryPath: string): void { - if (!fs.existsSync(directoryPath)) { - fs.mkdirSync(directoryPath, { recursive: true }); - } +export function ensureFilePathExists(filePath: string) { + const dirName = path.dirname(filePath); + ensureDirectoryPathExists(dirName); } /** @@ -28,7 +28,7 @@ export function ensureDirectoryPathExists(directoryPath: string): void { * @param sourceFolder - Source folder to be copied. * @param targetFolder - Target folder. */ -export function copyFolderSync(sourceFolder: string, targetFolder: string): void { +export function copyFolderSync(sourceFolder: string, targetFolder: string) { if (!fs.existsSync(targetFolder)) { fs.mkdirSync(targetFolder); } @@ -49,6 +49,6 @@ export function copyFolderSync(sourceFolder: string, targetFolder: string): void * @param path - The path to normalize. * @returns A normalized path. */ -export function normalizePath(path: string): string { +export function normalizePath(path: string) { return path.replace(/\\/g, '/'); } diff --git a/packages/x-components/build/postcss-dir-pseudo-class.d.ts b/packages/x-components/build/postcss-dir-pseudo-class.d.ts deleted file mode 100644 index 97c67b6cbc..0000000000 --- a/packages/x-components/build/postcss-dir-pseudo-class.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module 'postcss-dir-pseudo-class' { - import { Options } from './postcss-types/options'; - - function postcssDirPseudoClass(options?: Options = {}): Plugin; - export = postcssDirPseudoClass; -} diff --git a/packages/x-components/build/postcss-logical.d.ts b/packages/x-components/build/postcss-logical.d.ts deleted file mode 100644 index 3e9b159118..0000000000 --- a/packages/x-components/build/postcss-logical.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module 'postcss-logical' { - import { Options } from './postcss-types/options'; - - function postcssLogical(options?: Options = {}): Plugin; - export = postcssLogical; -} diff --git a/packages/x-components/build/postcss-types/options.ts b/packages/x-components/build/postcss-types/options.ts deleted file mode 100644 index 39996ec735..0000000000 --- a/packages/x-components/build/postcss-types/options.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Options { - dir?: 'rtl' | 'ltr'; - preserve?: boolean; -} diff --git a/packages/x-components/build/rollup-plugins/design-system.rollup-plugin.ts b/packages/x-components/build/rollup-plugins/design-system.rollup-plugin.ts index 19295040b1..18a73605dc 100644 --- a/packages/x-components/build/rollup-plugins/design-system.rollup-plugin.ts +++ b/packages/x-components/build/rollup-plugins/design-system.rollup-plugin.ts @@ -1,5 +1,4 @@ import fs from 'fs'; -import path from 'path'; import { Plugin } from 'rollup'; import { normalizePath } from '../build.utils'; @@ -12,28 +11,13 @@ import { normalizePath } from '../build.utils'; * returns `src/design-system/button/default.tokens.scss` if exists. * @internal */ -function getTokensFilePath(file: string): string | null { +function getTokensFilePath(file: string) { const fileParts = file.split('.'); const fileExtension = fileParts.pop() ?? ''; const tokensFile = `${fileParts.join('.')}.tokens.${fileExtension}`; return fs.existsSync(tokensFile) ? normalizePath(tokensFile) : null; } -/** - * This function returns the name for the CSS file using the component name and the variant. - * The component name is extracted from the folder name, and the variant name is extracted from - * the file name. - * - * @param file - The path of the file processed. - * @returns The name for the CSS file with the component and the variant. - * @example For `src/style/components/button/pill.scss` file this function returns `button-pill`. - * @internal - */ -export function renameComponentCssFile(file: string): string { - const parentFolder = path.dirname(file).split(path.sep)?.pop() ?? ''; - return `${parentFolder}-${path.basename(file).replace('.scss', '')}`; -} - /** * This function returns a {@link Plugin | RollupJS Plugin} to import the tokens files into the * components .scss files. For each `xxx.scss` processed, it looks for the `xxx.tokens.scss` tokens diff --git a/packages/x-components/build/rollup-plugins/x-components.rollup-plugin.ts b/packages/x-components/build/rollup-plugins/x-components.rollup-plugin.ts index 30719690bc..8de6bd9f38 100644 --- a/packages/x-components/build/rollup-plugins/x-components.rollup-plugin.ts +++ b/packages/x-components/build/rollup-plugins/x-components.rollup-plugin.ts @@ -17,9 +17,9 @@ export interface GenerateEntryFilesOptions { /** The path where the build will go. */ buildPath: string; /** The path to the directory where generated js files are stored. */ - jsOutputDirectory: string; + jsOutputDir: string; /** The path to the directory where generated .d.ts files are stored. */ - typesOutputDirectory: string; + typesOutputDir: string; } /** @@ -44,9 +44,9 @@ export function generateEntryFiles(options: GenerateEntryFilesOptions): Plugin { * - 1 Typings file per entry point. */ writeBundle() { - generateEntryPoints(options.buildPath, options.jsOutputDirectory, 'js'); - generateEntryPoints(options.buildPath, options.typesOutputDirectory, 'd.ts'); - copyIndexSourcemap(options.buildPath, options.jsOutputDirectory); + generateEntryPoints(options.buildPath, options.jsOutputDir, 'js'); + generateEntryPoints(options.buildPath, options.typesOutputDir, 'd.ts'); + copyIndexSourcemap(options.buildPath, options.jsOutputDir); } }; } diff --git a/packages/x-components/build/rollup.config.ts b/packages/x-components/build/rollup.config.ts index 7b3e71215e..bd23383a29 100644 --- a/packages/x-components/build/rollup.config.ts +++ b/packages/x-components/build/rollup.config.ts @@ -1,14 +1,12 @@ import path from 'path'; -import commonjs from '@rollup/plugin-commonjs'; import { sync as glob } from 'glob'; -import { RollupOptions } from 'rollup'; +import { RollupOptions, Plugin } from 'rollup'; import copy from 'rollup-plugin-copy'; import del from 'rollup-plugin-delete'; import styles from 'rollup-plugin-styles'; import typescript from 'rollup-plugin-typescript2'; -import vue, { VuePluginOptions } from 'rollup-plugin-vue'; -import packageJSON from '../package.json'; -import { normalizePath } from './build.utils'; +import vue3 from '@vitejs/plugin-vue'; +import { dependencies as pkgDeps, peerDependencies as pkgPeerDeps } from '../package.json'; import { apiDocumentation } from './docgen/documentation.rollup-plugin'; import { importTokens, omitJsFiles } from './rollup-plugins/design-system.rollup-plugin'; import { generateEntryFiles } from './rollup-plugins/x-components.rollup-plugin'; @@ -16,17 +14,21 @@ import { generateEntryFiles } from './rollup-plugins/x-components.rollup-plugin' const rootDir = path.resolve(__dirname, '../'); const buildPath = path.join(rootDir, 'dist'); -const dependencies = new Set( - Object.keys(packageJSON.dependencies).concat(Object.keys(packageJSON.peerDependencies)) -); -const jsOutputDirectory = path.join(buildPath, 'js'); -const typesOutputDirectory = path.join(buildPath, 'types'); -const cssOutputDirectory = path.join(buildPath, 'design-system'); +const jsOutputDir = path.join(buildPath, 'js'); +const typesOutputDir = path.join(buildPath, 'types'); -export const rollupConfig = createRollupOptions({ +const dependencies = new Set(Object.keys(pkgDeps).concat(Object.keys(pkgPeerDeps))); + +const vueDocs = { + name: 'vue-docs', + transform: (_code: unknown, id: string) => + !/vue&type=docs/.test(id) ? undefined : `export default ''` +}; + +export const rollupConfig: RollupOptions = { input: path.join(rootDir, 'src/index.ts'), output: { - dir: jsOutputDirectory, + dir: jsOutputDir, format: 'esm', sourcemap: true, preserveModules: true @@ -36,7 +38,7 @@ export const rollupConfig = createRollupOptions({ * Because of that, when rollup detects a circular dependency (it emits a warning), we stop * the build with an error */ if (warning.code === 'CIRCULAR_DEPENDENCY') { - throw Error(`Circular dependency found: ${warning.ids?.join(' ') as string}`); + throw Error(`Circular dependency found: ${warning.ids?.join(' ') ?? ''}`); } }, external(id) { @@ -44,26 +46,28 @@ export const rollupConfig = createRollupOptions({ Rollup treats by default all node_modules dependencies as external, but will launch a warning if you don't manually specify them. In our case apart from the package.json ones, we also need to add any dependency that starts with rxjs (due to rxjs having multiple - entry points), and the vue-runtime-helpers, which is a dependency added by the SFC compiler + entry points) */ return ( dependencies.has(id) || // Package.json dependencies /* As rxjs has multiple entry points, it needs to be declared this way */ - id.startsWith('rxjs') || - /* Vue SFC dependency. Needs to be here because rollup generates a relative import to the - node_modules folder */ - id.includes('vue-runtime-helpers') + id.startsWith('rxjs') ); }, plugins: [ - del({ targets: [`${buildPath}/*`, `${path.join(rootDir, 'docs')}/*`] }), - commonjs(), + del({ + targets: [ + `${buildPath}/*`, + `${path.join(rootDir, 'docs')}/*`, + `${path.join(rootDir, 'temp')}/*` + ] + }), typescript({ useTsconfigDeclarationDir: true, tsconfig: path.resolve(rootDir, 'tsconfig.json'), tsconfigOverride: { compilerOptions: { - declarationDir: typesOutputDirectory, + declarationDir: typesOutputDir, target: 'es2020' }, exclude: [ @@ -75,91 +79,50 @@ export const rollupConfig = createRollupOptions({ ] } }), - vue({ - css: false, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore Undocumented option to disable vue sourcemap generation because it breaks if - // lang is set to ts: - // https://github.com/vuejs/rollup-plugin-vue/issues/272#issuecomment-491721842 - needMap: false, + vue3({ template: { compilerOptions: { whitespace: 'condense' } - } as VuePluginOptions['template'], - style: { - postcssCleanOptions: { disabled: true } } - }), + }) as Plugin, styles({ + minimize: true, mode: [ 'inject', - (varname: string, id: string) => - `import { createInjector, createInjectorSSR } from 'vue-runtime-helpers'; - const isBrowser = /*#__PURE__*/ (function () { - return ( - Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) !== - '[object process]' - ); - })(); - const useBrowserInjector = - (typeof STRIP_SSR_INJECTOR !== 'undefined' && STRIP_SSR_INJECTOR) || isBrowser; - const injector = useBrowserInjector ? createInjector({}) : createInjectorSSR({}); - injector('${normalizePath(id)}',{source:${varname}});` + varname => { + const pathInjector = path.resolve('./tools/inject-css.js'); + return `import injectCss from '${pathInjector}';injectCss(${varname});`; + } ] }), - generateEntryFiles({ - buildPath, - jsOutputDirectory, - typesOutputDirectory - }), - apiDocumentation({ - buildPath - }), + vueDocs, + generateEntryFiles({ buildPath, jsOutputDir, typesOutputDir }), + apiDocumentation({ buildPath }), copy({ targets: [ - { - src: ['CHANGELOG.md', 'package.json', 'README.md', 'docs'], - dest: buildPath - } + { src: ['build/tools'], dest: buildPath }, + { src: ['CHANGELOG.md', 'package.json', 'README.md', 'docs'], dest: buildPath } ], hook: 'writeBundle' }) ] -}); +}; // Design System CSS generation +const cssOutputDir = path.join(buildPath, 'design-system'); -/** - * Common options for all CSS Rollup configs. - */ -const commonCssOptions = createRollupOptions({ +/** The config to generate one `.css` file with all the deprecated styles. */ +export const cssDeprecatedRollupConfig: RollupOptions = { + input: glob('src/design-system-deprecated/**/*.scss'), output: { - dir: cssOutputDirectory, + dir: cssOutputDir, assetFileNames: '[name][extname]', preserveModules: true - } -}); - -/** - * The config to generate one `.css` file with all the deprecated styles. - */ -export const cssDeprecatedComponentsRollupConfig = createRollupOptions({ - ...commonCssOptions, - input: glob('src/design-system-deprecated/**/*.scss'), + }, plugins: [ importTokens(), styles({ mode: ['extract', 'deprecated-full-theme.css'] }), omitJsFiles() ] -}); - -/** - * Util function to create type-safe Rollup options. - * - * @param options - The Rollup options to create. - * @returns Type-safe Rollup options. - */ -export function createRollupOptions(options: T): T { - return options; -} +}; diff --git a/packages/x-components/build/tools/inject-css.js b/packages/x-components/build/tools/inject-css.js new file mode 100644 index 0000000000..514bb56c30 --- /dev/null +++ b/packages/x-components/build/tools/inject-css.js @@ -0,0 +1,15 @@ +/** + * Simple CSS injector to append styles to the head. + * This injector can be overwritten at build time. + * + * @params css - CSS code. + */ +function injectCss(css) { + if (document) { + const el = document.createElement('style'); + el.textContent = css; + document.head.appendChild(el); + } +} + +export default injectCss; diff --git a/packages/x-components/cypress.config.ts b/packages/x-components/cypress.config.ts index 03daafc26b..afb2975fd1 100644 --- a/packages/x-components/cypress.config.ts +++ b/packages/x-components/cypress.config.ts @@ -1,6 +1,7 @@ +import { defineConfig } from 'cypress'; +import createBundler from '@bahmutov/cypress-esbuild-preprocessor'; import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'; import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild'; -import { defineConfig } from 'cypress'; export default defineConfig({ e2e: { @@ -9,34 +10,37 @@ export default defineConfig({ requestTimeout: 7000, viewportHeight: 1080, viewportWidth: 1920, - screenshotOnRunFailure: false, - video: false, + specPattern: 'tests/e2e/**/*.feature', supportFile: 'tests/support/index.ts', fixturesFolder: 'tests/e2e/fixtures', screenshotsFolder: 'tests/e2e/screenshots', + downloadsFolder: 'tests/e2e/downloads', + experimentalRunAllSpecs: true, + screenshotOnRunFailure: false, + video: false, retries: { openMode: 0, runMode: 1 }, + // https://github.com/badeball/cypress-cucumber-preprocessor/blob/master/docs/quick-start.md async setupNodeEvents(on, config) { + // This is required for the preprocessor to be able to generate JSON reports after each run, and more. await addCucumberPreprocessorPlugin(on, config); - on( - 'file:preprocessor', - require('@bahmutov/cypress-esbuild-preprocessor')({ - plugins: [createEsbuildPlugin(config)] - }) - ); + + on('file:preprocessor', createBundler({ plugins: [createEsbuildPlugin(config)] })); + + // Make sure to return the config object as it might have been modified by the plugin. return config; - }, - specPattern: 'tests/e2e/**/*.feature', - experimentalRunAllSpecs: true + } }, component: { defaultCommandTimeout: 7000, - experimentalSingleTabRunMode: true, + viewportHeight: 1080, + viewportWidth: 1920, specPattern: 'tests/unit/**/*.spec.ts', supportFile: 'tests/support/index.ts', indexHtmlFile: 'tests/support/component-index.html', + experimentalSingleTabRunMode: true, screenshotOnRunFailure: false, video: false, retries: { diff --git a/packages/x-components/jest.config.js b/packages/x-components/jest.config.js index ceb4f32f37..fecc057095 100644 --- a/packages/x-components/jest.config.js +++ b/packages/x-components/jest.config.js @@ -1,9 +1,12 @@ module.exports = { preset: 'ts-jest', transform: { - '^.+\\.vue$': '@vue/vue2-jest', + '^.+\\.vue$': '@vue/vue3-jest', '^.+\\.scss$': 'jest-scss-transform' }, + moduleNameMapper: { + 'vue-global-events': '/node_modules/vue-global-events/dist/index.cjs' + }, testMatch: ['/src/**/*.spec.ts'], setupFilesAfterEnv: ['./jest.setup.ts'], // jest 27 changes the default environment to node instead of jsdom diff --git a/packages/x-components/package.json b/packages/x-components/package.json index b1baf28daa..c7c967bbff 100644 --- a/packages/x-components/package.json +++ b/packages/x-components/package.json @@ -1,6 +1,6 @@ { "name": "@empathyco/x-components", - "version": "5.0.0-alpha.83", + "version": "6.0.0-alpha.3", "description": "Empathy X Components", "author": "Empathy Systems Corporation S.L.", "license": "Apache-2.0", @@ -30,8 +30,8 @@ "./tests/**/*", "**/*.scss", "**/*.scss.js", - "**/*vue[0-9].js", "**/*.css", + "**/*vue[0-9].js", "**/*.vue" ], "repository": { @@ -54,9 +54,9 @@ "lint": "eslint . --ext .ts,.vue", "test:unit": "jest --silent", "test:unit-jest": "jest", - "test:unit-cypress": "cypress run --component --browser chrome", "test:unit-coverage": "jest --coverage", "test:unit-watch": "jest --watch", + "test:unit-cypress": "cypress run --component --browser chrome", "test:e2e": "start-server-and-test preview http://localhost:8080 cypress:open", "test:e2e:firefox": "start-server-and-test serve http://localhost:8080 cypress:open:firefox", "test:e2e:ci": "start-server-and-test serve http://localhost:8080 cypress:run:ci", @@ -79,35 +79,30 @@ "@empathyco/x-utils": "^1.0.3-alpha.1", "@vue/devtools-api": "~6.5.0", "@vueuse/core": "~10.7.1", - "js-md5": "^0.8.3", + "js-md5": "~0.8.3", "rxjs": "~7.8.0", "tslib": "~2.6.0", - "vue-class-component": "~7.2.6", - "vue-global-events": "~1.2.1", - "vue-property-decorator": "~8.5.0", - "vue-runtime-helpers": "~1.1.2" + "vue-global-events": "~3.0.1" }, "peerDependencies": { - "vue": "~2.7.0", - "vuex": "^3.0.0" + "vue": "~3.4.31", + "vuex": "4.0.2" }, "devDependencies": { "@badeball/cypress-cucumber-preprocessor": "~20.0.0", "@bahmutov/cypress-esbuild-preprocessor": "~2.2.0", - "@cypress/vue2": "~2.0.1", - "@empathyco/x-tailwindcss": "^1.2.0-alpha.5", + "@empathyco/x-tailwindcss": "^1.2.0-alpha.6", "@microsoft/api-documenter": "~7.23.0", "@microsoft/api-extractor": "~7.39.0", - "@rollup/plugin-commonjs": "~25.0.7", "@testing-library/jest-dom": "~5.17.0", "@types/autoprefixer": "~10.2.0", - "@types/glob": "^8.0.1", + "@types/glob": "~8.0.1", "@types/jest": "~27.5.0", "@types/node": "~18.19.0", "@types/testing-library__jest-dom": "~5.14.5", - "@vitejs/plugin-vue2": "^2.2.0", - "@vue/test-utils": "~1.0.3", - "@vue/vue2-jest": "~27.0.0-alpha.3", + "@vitejs/plugin-vue": "~5.1.2", + "@vue/test-utils": "~2.4.6", + "@vue/vue3-jest": "~27.0.0", "autoprefixer": "~10.4.4", "convert-source-map": "~2.0.0", "cypress": "~13.6.0", @@ -124,20 +119,19 @@ "rollup-plugin-delete": "~2.0.0", "rollup-plugin-styles": "~4.0.0", "rollup-plugin-typescript2": "~0.36.0", - "rollup-plugin-vue": "~5.1.9", + "rollup-plugin-vue": "~6.0.0", "sass": "~1.70.0", "start-server-and-test": "~2.0.0", "tailwindcss": "~3.4.0", "ts-jest": "~27.1.0", - "ts-node": "~10.9.1", + "ts-node": "~10.9.2", "typescript": "~4.9.4", - "vite": "^4.5.0", - "vite-plugin-vue-inspector": "^4.0.0", - "vue": "~2.7.14", - "vue-docgen-cli": "~4.67.0", - "vue-router": "~3.6.5", - "vue-template-compiler": "~2.7.14", - "vuex": "~3.6.2" + "vite": "~4.5.0", + "vite-plugin-vue-inspector": "~5.1.2", + "vue": "~3.4.31", + "vue-docgen-cli": "~4.79.0", + "vue-router": "~4.4.0", + "vuex": "4.0.2" }, "publishConfig": { "access": "public", diff --git a/packages/x-components/src/App.vue b/packages/x-components/src/App.vue index ac2acc6692..38a0ad4873 100644 --- a/packages/x-components/src/App.vue +++ b/packages/x-components/src/App.vue @@ -10,11 +10,7 @@ - - - - diff --git a/packages/x-components/src/components/animations/collapse-height.vue b/packages/x-components/src/components/animations/collapse-height.vue index 7c512b4871..3bb53e95ce 100644 --- a/packages/x-components/src/components/animations/collapse-height.vue +++ b/packages/x-components/src/components/animations/collapse-height.vue @@ -1,8 +1,5 @@