@1024pix/pix-ui 28.0.2 → 28.1.1

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.
@@ -17,6 +17,7 @@ jobs:
17
17
  build-and-test:
18
18
  docker:
19
19
  - image: cimg/node:16.19.0-browsers
20
+ resource_class: medium+
20
21
  steps:
21
22
  - checkout
22
23
  - browser-tools/install-chrome
@@ -26,3 +27,4 @@ jobs:
26
27
  - run: npm run lint:hbs
27
28
  - run: npm run lint:scss
28
29
  - run: npm test
30
+ - run: npm run test:ember-compatibility
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v28.1.1 (14/03/2023)
4
+
5
+
6
+ ### :bug: Correction
7
+ - [#361](https://github.com/1024pix/pix-ui/pull/361) [BUGFIX] Le contenu du `PixCollapsible` ne se rend plus en lazy
8
+
9
+ ## v28.1.0 (14/03/2023)
10
+
11
+
12
+ ### :rocket: Amélioration
13
+ - [#360](https://github.com/1024pix/pix-ui/pull/360) [FEATURE] Vérifie la compatibilité avec embroider sur la ci
14
+
15
+ ### :coffee: Autre
16
+ - [#357](https://github.com/1024pix/pix-ui/pull/357) [CHORE] Utiliser la propriété iconBefore dans le bouton du filterBanner (PIX-7415)
17
+
3
18
  ## v28.0.2 (09/03/2023)
4
19
 
5
20
 
@@ -25,11 +25,19 @@
25
25
  <span class="loader__not-visible-text">{{yield}}</span>
26
26
  {{else}}
27
27
  {{#if @iconBefore}}
28
- <FaIcon class="pix-button__icon pix-button__icon--before" @icon={{@iconBefore}} />
28
+ <FaIcon
29
+ class="pix-button__icon pix-button__icon--before"
30
+ @icon={{@iconBefore}}
31
+ @prefix={{@prefixIconBefore}}
32
+ />
29
33
  {{/if}}
30
34
  {{yield}}
31
35
  {{#if @iconAfter}}
32
- <FaIcon class="pix-button__icon pix-button__icon--after" @icon={{@iconAfter}} />
36
+ <FaIcon
37
+ class="pix-button__icon pix-button__icon--after"
38
+ @icon={{@iconAfter}}
39
+ @prefix={{@prefixIconAfter}}
40
+ />
33
41
  {{/if}}
34
42
  {{/if}}
35
43
  </button>
@@ -31,6 +31,8 @@
31
31
  class="pix-collapsible__content"
32
32
  aria-hidden={{if this.isCollapsed "true" "false"}}
33
33
  >
34
- {{yield}}
34
+ {{#if this.isContentRendered}}
35
+ {{yield}}
36
+ {{/if}}
35
37
  </div>
36
38
  </div>
@@ -14,6 +14,10 @@ export default class PixCollapsible extends Component {
14
14
  return !this.isCollapsed;
15
15
  }
16
16
 
17
+ get isContentRendered() {
18
+ return this.hasUnCollapsedOnce;
19
+ }
20
+
17
21
  get title() {
18
22
  if (!this.args.title || !this.args.title.trim()) {
19
23
  throw new Error('ERROR in PixCollapsible component, @title param is not provided');
@@ -22,8 +22,9 @@
22
22
  @shape="squircle"
23
23
  @size="small"
24
24
  @triggerAction={{@onClearFilters}}
25
+ @iconBefore="trash-can"
26
+ @prefixIconBefore="far"
25
27
  >
26
- <FaIcon class="pix-filter-banner-button__icon" @icon="trash-can" @prefix="far" />
27
28
  {{@clearFiltersLabel}}
28
29
  </PixButton>
29
30
  </div>
@@ -13,6 +13,8 @@ const Template = (args) => ({
13
13
  @isBorderVisible={{this.isBorderVisible}}
14
14
  @iconBefore={{this.iconBefore}}
15
15
  @iconAfter={{this.iconAfter}}
16
+ @prefixIconBefore={{this.prefixIconBefore}}
17
+ @prefixIconAfter={{this.prefixIconAfter}}
16
18
  >
17
19
  {{this.label}}
18
20
  </PixButton>
@@ -30,6 +32,8 @@ const Template = (args) => ({
30
32
  @isBorderVisible={{button.isBorderVisible}}
31
33
  @iconBefore={{button.iconBefore}}
32
34
  @iconAfter={{button.iconAfter}}
35
+ @prefixIconBefore={{this.prefixIconBefore}}
36
+ @prefixIconAfter={{this.prefixIconAfter}}
33
37
  >
34
38
  {{button.label}}
35
39
  </PixButton>
@@ -212,7 +216,7 @@ export const argsTypes = {
212
216
  description: `Nom de l'icône font-awesome à afficher **avant** le label`,
213
217
  type: { name: 'string', required: false },
214
218
  control: { type: 'select' },
215
- options: ['heart', 'magnifying-glass', 'plus', 'xmark'],
219
+ options: ['trash-can', 'heart', 'magnifying-glass', 'plus', 'xmark'],
216
220
  table: {
217
221
  type: { summary: 'string' },
218
222
  defaultValue: { summary: null },
@@ -223,7 +227,29 @@ export const argsTypes = {
223
227
  description: `Nom de l'icône font-awesome à afficher **après** le label`,
224
228
  type: { name: 'string', required: false },
225
229
  control: { type: 'select' },
226
- options: ['heart', 'magnifying-glass', 'plus', 'xmark'],
230
+ options: ['trash-can', 'heart', 'magnifying-glass', 'plus', 'xmark'],
231
+ table: {
232
+ type: { summary: 'string' },
233
+ defaultValue: { summary: null },
234
+ },
235
+ },
236
+ prefixIconBefore: {
237
+ name: 'prefixIconBefore',
238
+ description: `Permet d'ajouter un préfix à l'icone devant le label pour appliquer un style particulier`,
239
+ type: { name: 'string', required: false },
240
+ control: { type: 'select' },
241
+ options: ['fas', 'far'],
242
+ table: {
243
+ type: { summary: 'string' },
244
+ defaultValue: { summary: null },
245
+ },
246
+ },
247
+ prefixIconAfter: {
248
+ name: 'prefixIconAfter',
249
+ description: `Permet d'ajouter un préfix à l'icone derrière le label pour appliquer un style particulier`,
250
+ type: { name: 'string', required: false },
251
+ control: { type: 'select' },
252
+ options: ['fas', 'far'],
227
253
  table: {
228
254
  type: { summary: 'string' },
229
255
  defaultValue: { summary: null },
@@ -16,7 +16,6 @@ PixPagination est un élément permettant de trigger le changement de page dans
16
16
  > queryParams = { pageNumber: { refreshModel: true }, pageSize: { refreshModel: true } };
17
17
  > ```
18
18
  >
19
- > ** Installer la dépendance `@formatjs/intl` sur votre projet.**
20
19
 
21
20
  Le paramètre `pageOptions` n'est pas requis et possède une valeur par défaut.
22
21
 
@@ -12,18 +12,6 @@ A la différence d'un [PixSelect](?path=/docs/form-select--default#withsearch) s
12
12
 
13
13
  Ce composant permet d'appeler la fonction triggerFiltering passée en paramètre selon un debounce (temps d'attente avant le prochain appel) fournis.
14
14
 
15
- ⚠️ ⚠️ ⚠️ Pour utiliser ce composant des changements sont nécessaires dans l'application où est installé Pix UI :
16
-
17
- 1- Rajoutez ceci dans le `ember-cli-build.js` de votre application (mon-pix/pix-orga/pix-certif/pix-admin) :
18
-
19
- ```js
20
- app.import('node_modules/lodash.debounce/index.js', {
21
- using: [{ transformation: 'cjs', as: 'lodash.debounce' }],
22
- });
23
- ```
24
-
25
- 2- Installez la dépendance "ember-cli-cjs-transform" : `npm install ember-cli-cjs-transform`
26
-
27
15
  <Canvas>
28
16
  <Story name="Default" story={stories.Default} height={80} />
29
17
  </Canvas>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "28.0.2",
3
+ "version": "28.1.1",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -47,14 +47,14 @@
47
47
  "test:ember-compatibility": "ember try:each"
48
48
  },
49
49
  "dependencies": {
50
+ "@formatjs/intl": "^2.5.1",
50
51
  "color": "^4.2.3",
52
+ "ember-auto-import": "^2.5.0",
51
53
  "ember-cli-babel": "^7.26.8",
52
- "ember-cli-cjs-transform": "^2.0.0",
53
54
  "ember-cli-htmlbars": "^6.1.1",
54
55
  "ember-cli-sass": "^11.0.1",
55
56
  "ember-cli-string-utils": "^1.1.0",
56
57
  "ember-click-outside": "^4.0.0",
57
- "ember-prop-modifier": "^1.0.1",
58
58
  "ember-truth-helpers": "^3.1.1",
59
59
  "lodash.debounce": "^4.0.8"
60
60
  },
@@ -64,10 +64,10 @@
64
64
  "@babel/eslint-parser": "^7.19.1",
65
65
  "@babel/plugin-proposal-decorators": "^7.20.5",
66
66
  "@ember/optional-features": "^2.0.0",
67
- "@ember/render-modifiers": "^2.0.4",
67
+ "@ember/render-modifiers": "^2.0.5",
68
+ "@ember/string": "^3.0.1",
68
69
  "@ember/test-helpers": "^2.8.1",
69
70
  "@embroider/test-setup": "^0.48.1",
70
- "@formatjs/intl": "^2.5.1",
71
71
  "@fortawesome/ember-fontawesome": "^0.4.1",
72
72
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
73
73
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
@@ -84,13 +84,12 @@
84
84
  "@storybook/manager-webpack5": "^6.5.13",
85
85
  "@storybook/storybook-deployer": "^2.8.16",
86
86
  "@storybook/theming": "^6.5.13",
87
+ "@testing-library/dom": "^8.20.0",
87
88
  "@testing-library/user-event": "^14.4.3",
88
89
  "axios": "^1.2.0",
89
90
  "broccoli-asset-rev": "^3.0.0",
90
91
  "core-js": "^3.26.1",
91
- "ember-auto-import": "^2.5.0",
92
92
  "ember-cli": "^4.8.0",
93
- "ember-cli-cjs-transform": "^2.0.0",
94
93
  "ember-cli-dependency-checker": "^3.3.1",
95
94
  "ember-cli-inject-live-reload": "^2.1.0",
96
95
  "ember-cli-sri": "^2.1.1",
@@ -106,7 +105,7 @@
106
105
  "ember-source-channel-url": "^3.0.0",
107
106
  "ember-template-lint": "^4.18.2",
108
107
  "ember-template-lint-plugin-prettier": "^4.1.0",
109
- "ember-try": "^2.0.0",
108
+ "ember-try": "^3.0.0-beta",
110
109
  "eslint": "^8.28.0",
111
110
  "eslint-config-prettier": "^8.5.0",
112
111
  "eslint-plugin-ember": "^11.2.0",