-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update x-components and related packages to vue 3 (#1644)
Co-authored-by: Víctor CG <[email protected]> Co-authored-by: Jose Antonio Cabañeros <[email protected]> Co-authored-by: Alberto Monedero Martín <[email protected]> Co-authored-by: lauramargar <[email protected]> Co-authored-by: acondal <[email protected]>
- Loading branch information
1 parent
5415b6b
commit d590842
Showing
399 changed files
with
9,389 additions
and
14,664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
|
||
**/tests/e2e/videos/ | ||
**/tests/e2e/screenshots/ | ||
**/tests/e2e/downloads/ | ||
|
||
# local env files | ||
.env.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]@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/[email protected]@1.0.0-alpha.50) (2024-07-23) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<template> | ||
<h1>Dinamic content:</h1> | ||
<button @click="insert">Insert at random index</button> | ||
<button @click="reset">Reset</button> | ||
|
||
<StaggeredFadeAndSlide :stagger="500"> | ||
<li v-for="item in items" :key="item.id"> | ||
{{ item.id }} - {{ item.name }} | ||
<button @click="remove(item)">x</button> | ||
</li> | ||
</StaggeredFadeAndSlide> | ||
|
||
<br /> | ||
<h1>Animation as prop</h1> | ||
<BaseSuggestions :suggestions="suggestions" :animation="StaggeredFadeAndSlide" :stagger="50"> | ||
<template #default="{ suggestion }"> | ||
<span>{{ suggestion.query }}</span> | ||
</template> | ||
</BaseSuggestions> | ||
|
||
<br /> | ||
<h1>Static content:</h1> | ||
<StaggeredFadeAndSlide :stagger="50"> | ||
<li key="1">Element to animate</li> | ||
<li key="2">Element to animate</li> | ||
<li key="3">Element to animate</li> | ||
</StaggeredFadeAndSlide> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import StaggeredFadeAndSlide from '../../../../x-components/src/components/animations/staggered-fade-and-slide.vue'; | ||
import BaseSuggestions from '../../../../x-components/src/components/suggestions/base-suggestions.vue'; | ||
import { | ||
getQuerySuggestionsStub, | ||
createResultStub, | ||
getResultsStub | ||
} from '../../../../x-components/src/__stubs__'; | ||
const suggestions = getQuerySuggestionsStub('chip', 5); | ||
const getInitialItems = () => getResultsStub(5); | ||
const items = ref(getInitialItems()); | ||
let id = items.value.length + 1; | ||
/** | ||
* Insert a new item at a random index. | ||
*/ | ||
function insert() { | ||
const i = Math.round(Math.random() * items.value.length); | ||
items.value.splice(i, 0, createResultStub(`Product ${id++}`)); | ||
} | ||
/** | ||
* Reset the list of items. | ||
*/ | ||
function reset() { | ||
items.value = getInitialItems(); | ||
id = items.value.length + 1; | ||
} | ||
/** | ||
* Remove an item from the list. | ||
* | ||
* @param item - The item to remove. | ||
*/ | ||
function remove(item: any) { | ||
const i = items.value.indexOf(item); | ||
if (i > -1) { | ||
items.value.splice(i, 1); | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/_vue3-migration-test/src/components/test-base-switch.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<p>Using props and events:</p> | ||
<BaseSwitch @change="value = !value" :modelValue="value" /> | ||
{{ value }} | ||
<br /> | ||
<p>Using the `v-model` directive:</p> | ||
<BaseSwitch v-model="value2" /> | ||
{{ value2 }} | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import BaseSwitch from '../../../x-components/src/components/base-switch.vue'; | ||
const value = ref(true); | ||
const value2 = ref(true); | ||
</script> |
36 changes: 0 additions & 36 deletions
36
packages/_vue3-migration-test/src/components/test-use-layouts.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]...@empathyco/[email protected]) (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/[email protected]...@empathyco/[email protected]) (2024-02-08) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.