Skip to content

Commit 4997df8

Browse files
[BUMP] Update dependency @1024pix/pix-ui to v47 (orga) (PIX-14842)
#10329
2 parents b30c0b9 + 5dc26fe commit 4997df8

26 files changed

+63
-59
lines changed

orga/app/components/campaign/activity/participants-list.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default class ParticipantsList extends Component {
147147
<PixIconButton
148148
@ariaLabel={{t "pages.campaign-activity.table.delete-button-label"}}
149149
@withBackground={{true}}
150-
@icon="trash-can"
150+
@iconName="delete"
151151
@triggerAction={{fn this.openModal participation}}
152152
@size="small"
153153
class="campaign-activity-table-actions__button campaign-activity-table-actions__button--delete"

orga/app/components/campaign/cards/participants-count.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { t } from 'ember-intl';
44
<template>
55
<PixIndicatorCard
66
@title={{t "cards.participants-count.title"}}
7-
@icon="users"
7+
@iconName="users"
88
@color="blue"
99
@info={{t "cards.participants-count.information"}}
1010
@loadingMessage={{t "cards.participants-count.loader"}}

orga/app/components/campaign/cards/result-average.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { t } from 'ember-intl';
44
<template>
55
<PixIndicatorCard
66
@title={{t "cards.participants-average-results.title"}}
7-
@icon="crown"
7+
@iconName="awards"
88
@color="blue"
99
@info={{t "cards.participants-average-results.information"}}
1010
@isLoading={{@isLoading}}

orga/app/components/campaign/cards/shared-count.gjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ import { t } from 'ember-intl';
44
<template>
55
<PixIndicatorCard
66
@title={{if @isTypeAssessment (t "cards.submitted-count.title") (t "cards.submitted-count.title-profiles")}}
7-
@icon="inbox-in"
7+
@iconName="inboxIn"
88
@color="green"
99
@info={{t "cards.submitted-count.information"}}
1010
@loadingMessage={{t "cards.submitted-count.loader"}}
1111
@isLoading={{@isLoading}}
12-
@iconPrefix="fapix"
1312
...attributes
1413
>
1514
<:default>{{@value}}</:default>

orga/app/components/campaign/cards/stage-average.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class StageAverage extends Component {
2424
<template>
2525
<PixIndicatorCard
2626
@title={{t "cards.participants-average-stages.title"}}
27-
@icon="crown"
27+
@iconName="awards"
2828
@color="blue"
2929
@info={{t "cards.participants-average-stages.information"}}
3030
@isLoading={{@isLoading}}

orga/app/components/campaign/filter/campaign-filters.gjs

+3-7
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,10 @@ export default class CampaignFilters extends Component {
5252
/>
5353
{{/unless}}
5454

55-
<PixToggle
56-
@onLabel={{t "pages.campaigns-list.action.campaign.ongoing"}}
57-
@offLabel={{t "pages.campaigns-list.action.campaign.archived"}}
58-
@toggled={{this.isToggleSwitched}}
59-
@onChange={{this.onToggle}}
60-
@screenReaderOnly={{true}}
61-
>
55+
<PixToggle @toggled={{this.isToggleSwitched}} @onChange={{this.onToggle}} @screenReaderOnly={{true}}>
6256
<:label>{{t "pages.campaigns-list.action.campaign.label"}}</:label>
57+
<:on>{{t "pages.campaigns-list.action.campaign.ongoing"}}</:on>
58+
<:off>{{t "pages.campaigns-list.action.campaign.archived"}}</:off>
6359
</PixToggle>
6460
</PixFilterBanner>
6561
</template>

orga/app/components/dropdown/icon-trigger.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="icon-trigger" class="dropdown" ...attributes>
22
<PixIconButton
3-
@icon={{@icon}}
3+
@iconName={{@icon}}
44
aria-label="{{@ariaLabel}}"
55
class="{{@dropdownButtonClass}}"
66
@triggerAction={{this.toggle}}

orga/app/components/language-switcher.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<PixSelect
22
@id="language-switcher"
33
@screenReaderOnly={{true}}
4-
@icon="earth-europe"
4+
@iconName="globe"
55
@value={{this.selectedLanguage}}
66
@options={{this.availableLanguages}}
77
@onChange={{this.onChange}}

orga/app/components/organization-learner/activity.hbs

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<PixIndicatorCard
66
@title={{t "pages.organization-learner.activity.cards.title.assessment"}}
77
@color="purple"
8-
@icon="tachometer"
9-
@iconPrefix="fapix"
8+
@iconName="speed"
109
>
1110
<:default>{{this.assessmentStatistics.total}}</:default>
1211
<:sub>
@@ -23,8 +22,7 @@
2322
<PixIndicatorCard
2423
@title={{t "pages.organization-learner.activity.cards.title.profiles-collection"}}
2524
@color="blue"
26-
@icon="person-export"
27-
@iconPrefix="fapix"
25+
@iconName="profileShare"
2826
>
2927
<:default>{{this.profileCollectionsStatistics.total}}</:default>
3028
<:sub>

orga/app/components/places/statistics.gjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { t } from 'ember-intl';
33

44
<template>
55
<section class="statistics">
6-
<PixIndicatorCard @title={{t "cards.available-seats-count.title"}} @color="success" @icon="users">
6+
<PixIndicatorCard @title={{t "cards.available-seats-count.title"}} @color="success" @iconName="users">
77
{{@model.available}}
88
<span class="statistics__total">{{t "cards.available-seats-count.value" total=@model.total}}</span>
99
</PixIndicatorCard>
10-
<PixIndicatorCard @title={{t "cards.occupied-seats-count.title"}} @color="warning" @icon="users">
10+
<PixIndicatorCard @title={{t "cards.occupied-seats-count.title"}} @color="warning" @iconName="users">
1111
<:default>
1212
{{@model.occupied}}
1313

orga/app/components/sco-organization-participant/table-row.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<td class="organization-participant-list-page__actions hide-on-mobile">
5353
{{#if @student.isAssociated}}
5454
<Dropdown::IconTrigger
55-
@icon="ellipsis-vertical"
55+
@icon="moreVert"
5656
@dropdownButtonClass="organization-participant-list-page__dropdown-button"
5757
@dropdownContentClass="organization-participant-list-page__dropdown-content"
5858
@ariaLabel={{t "pages.sco-organization-participants.actions.show-actions"}}

orga/app/components/sup-organization-participant/table-row.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<td class="organization-participant-list-page__actions hide-on-mobile">
4848
{{#if @isAdminInOrganization}}
4949
<Dropdown::IconTrigger
50-
@icon="ellipsis-vertical"
50+
@icon="moreVert"
5151
@dropdownButtonClass="organization-participant-list-page__dropdown-button"
5252
@dropdownContentClass="organization-participant-list-page__dropdown-content"
5353
@ariaLabel={{t "pages.sup-organization-participants.actions.show-actions"}}

orga/app/components/table/header-sort.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{yield}}
44
{{#unless @isDisabled}}
55
<PixIconButton
6-
@icon={{this.icon}}
6+
@iconName={{this.icon}}
77
@triggerAction={{this.toggleSort}}
88
@withBackground={{false}}
99
@size="small"

orga/app/components/table/header-sort.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class HeaderSort extends Component {
1414
if (!this.args.order) {
1515
return 'sort';
1616
}
17-
return this.args.order === 'asc' ? 'sort-up' : 'sort-down';
17+
return this.args.order === 'asc' ? 'arrowTop' : 'arrowBottom';
1818
}
1919

2020
get ariaLabel() {

orga/app/components/table/pagination-control.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{{/if}}
2727
</p>
2828
<PixIconButton
29-
@icon="arrow-left"
29+
@iconName="arrowLeft"
3030
aria-label={{t "common.pagination.action.previous"}}
3131
@triggerAction={{this.goToPreviousPage}}
3232
@withBackground={{false}}
@@ -40,7 +40,7 @@
4040
{{t "common.pagination.page-number" current=this.currentPage total=this.pageCount}}
4141
</p>
4242
<PixIconButton
43-
@icon="arrow-right"
43+
@iconName="arrowRight"
4444
aria-label={{t "common.pagination.action.next"}}
4545
@triggerAction={{this.goToNextPage}}
4646
@withBackground={{false}}

orga/app/components/team/invitations-list-item.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<:triggerElement>
1010
<PixIconButton
1111
@ariaLabel={{t "pages.team-invitations.resend-invitation"}}
12-
@icon="redo"
12+
@iconName="refresh"
1313
@triggerAction={{fn this.resendInvitation @invitation}}
1414
@withBackground={{true}}
1515
disabled={{this.isResending}}
@@ -29,7 +29,7 @@
2929
<:triggerElement>
3030
<PixIconButton
3131
@ariaLabel={{t "pages.team-invitations.cancel-invitation"}}
32-
@icon="trash-can"
32+
@iconName="delete"
3333
@triggerAction={{fn @cancelInvitation @invitation}}
3434
@withBackground={{true}}
3535
/>

orga/app/components/team/members-list-item.hbs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<td class="zone-edit-role hide-on-mobile">
99
{{#if this.isNotCurrentUserMembership}}
1010
<Dropdown::IconTrigger
11-
@icon="ellipsis-vertical"
11+
@icon="moreVert"
1212
@dropdownButtonClass="zone-edit-role__dropdown-button"
1313
@dropdownContentClass="zone-edit-role__dropdown-content"
1414
@ariaLabel={{t "pages.team-members.actions.manage"}}
@@ -23,7 +23,7 @@
2323
{{else}}
2424
{{#if @isMultipleAdminsAvailable}}
2525
<Dropdown::IconTrigger
26-
@icon="ellipsis-vertical"
26+
@icon="moreVert"
2727
@dropdownButtonClass="zone-edit-role__dropdown-button"
2828
@dropdownContentClass="zone-edit-role__dropdown-content"
2929
@ariaLabel={{t "pages.team-members.actions.manage"}}
@@ -65,7 +65,7 @@
6565
{{t "pages.team-members.actions.save"}}
6666
</PixButton>
6767
<PixIconButton
68-
@icon="xmark"
68+
@iconName="close"
6969
id="cancel-update-organization-role"
7070
aria-label="{{t 'common.actions.cancel'}}"
7171
@triggerAction={{this.cancelUpdateRoleOfMember}}

orga/app/components/tube/list.hbs

+7-6
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
{{/if}}
2424
</div>
2525
{{#each this.sortedAreas as |area|}}
26-
<PixCollapsible @title="{{area.code}} · {{area.title}}" class="{{area.color}}">
27-
{{#each area.sortedCompetences as |competence|}}
28-
<h2>{{competence.index}} {{competence.name}}</h2>
29-
<div class="panel">
26+
<PixCollapsible class="{{area.color}}">
27+
<:title>{{area.code}} · {{area.title}}</:title>
28+
<:default>
29+
{{#each area.sortedCompetences as |competence|}}
30+
<h2>{{competence.index}} {{competence.name}}</h2>
3031
<table class="table content-text content-text--small preselect-tube-table">
3132
<caption>{{t "pages.preselect-target-profile.table.caption"}}</caption>
3233
<thead>
@@ -72,8 +73,8 @@
7273
{{/each}}
7374
</tbody>
7475
</table>
75-
</div>
76-
{{/each}}
76+
{{/each}}
77+
</:default>
7778
</PixCollapsible>
7879

7980
{{/each}}

orga/app/components/ui/chevron.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<PixIconButton
22
aria-label={{@ariaLabel}}
3-
@icon="{{if @isOpen 'chevron-up' 'chevron-down'}}"
3+
@iconName="{{if @isOpen 'chevronTop' 'chevronBottom'}}"
44
aria-expanded="{{@isOpen}}"
55
@triggerAction={{@onClick}}
66
@withBackground={{false}}

orga/app/components/ui/previous-page-button.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="previous-page-button">
22
<PixIconButton
3-
@icon="arrow-left"
3+
@iconName="arrowLeft"
44
aria-label={{@backButtonAriaLabel}}
55
class="previous-page-button__return-button hide-on-mobile"
66
@triggerAction={{this.goToPage}}

orga/package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

orga/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@1024pix/ember-cli-notifications": "^8.0.2",
5555
"@1024pix/ember-testing-library": "^3.0.6",
5656
"@1024pix/eslint-config": "^1.3.8",
57-
"@1024pix/pix-ui": "^46.15.2",
57+
"@1024pix/pix-ui": "^47.2.0",
5858
"@1024pix/stylelint-config": "^5.1.20",
5959
"@babel/eslint-parser": "^7.19.1",
6060
"@babel/plugin-proposal-decorators": "^7.20.13",

orga/tests/acceptance/campaign-activity-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module('Acceptance | Campaign Activity', function (hooks) {
100100
// when
101101
const screen = await visit('/campagnes/1');
102102

103-
await click(screen.getByLabelText('Supprimer la participation'));
103+
await click(screen.getByRole('button', { name: /Supprimer la participation/ }));
104104

105105
await screen.findByRole('dialog');
106106

@@ -121,7 +121,7 @@ module('Acceptance | Campaign Activity', function (hooks) {
121121
);
122122

123123
const screen = await visit('/campagnes/1');
124-
await click(screen.getByLabelText('Supprimer la participation'));
124+
await click(screen.getByRole('button', { name: /Supprimer la participation/ }));
125125

126126
await screen.findByRole('dialog');
127127

orga/tests/integration/components/campaign/analysis/tube-recommendation-row-test.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { render } from '@1024pix/ember-testing-library';
22
import { click } from '@ember/test-helpers';
33
import { hbs } from 'ember-cli-htmlbars';
4+
import { t } from 'ember-intl/test-support';
45
import { module, test } from 'qunit';
56

67
import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering';
@@ -58,7 +59,7 @@ module('Integration | Component | Campaign::Analysis::TubeRecommendationRow', fu
5859
);
5960

6061
// when
61-
await click('[data-icon="chevron-down"]');
62+
await click(screen.getByLabelText(t('pages.campaign-review.table.analysis.column.tutorial.aria-label')));
6263

6364
// then
6465
assert.dom('tr[aria-hidden="false"]').containsText('1 tuto recommandé par la communauté Pix');
@@ -93,10 +94,12 @@ module('Integration | Component | Campaign::Analysis::TubeRecommendationRow', fu
9394
// given
9495
this.tubeRecommendation.tutorials = [tutorial1, tutorial2];
9596

96-
await render(hbs`<Campaign::Analysis::TubeRecommendationRow @tubeRecommendation={{this.tubeRecommendation}} />`);
97+
const screen = await render(
98+
hbs`<Campaign::Analysis::TubeRecommendationRow @tubeRecommendation={{this.tubeRecommendation}} />`,
99+
);
97100

98101
// when
99-
await click('[data-icon="chevron-down"]');
102+
await click(screen.getByLabelText(t('pages.campaign-review.table.analysis.column.tutorial.aria-label')));
100103

101104
// then
102105
assert.dom('[aria-hidden="false"]').containsText('2 tutos recommandés par la communauté Pix');
@@ -106,11 +109,13 @@ module('Integration | Component | Campaign::Analysis::TubeRecommendationRow', fu
106109
// given
107110
this.tubeRecommendation.tutorials = [tutorial1, tutorial2];
108111

109-
await render(hbs`<Campaign::Analysis::TubeRecommendationRow @tubeRecommendation={{this.tubeRecommendation}} />`);
110-
await click('[data-icon="chevron-down"]');
112+
const screen = await render(
113+
hbs`<Campaign::Analysis::TubeRecommendationRow @tubeRecommendation={{this.tubeRecommendation}} />`,
114+
);
115+
await click(screen.getByLabelText(t('pages.campaign-review.table.analysis.column.tutorial.aria-label')));
111116

112117
// when
113-
await click('[data-icon="chevron-up"]');
118+
await click(screen.getByLabelText(t('pages.campaign-review.table.analysis.column.tutorial.aria-label')));
114119

115120
// then
116121
assert.dom('[aria-hidden="false"]').doesNotExist();

orga/tests/integration/components/tables/header-sort-test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ module('Integration | Component | Tables | header-sort', function (hooks) {
2525

2626
module('When header sort is enabled', function () {
2727
test('should display sort-icon', async function (assert) {
28+
// given
29+
this.set('defaultLabel', 'mon-label');
2830
// when
29-
await render(hbs`<Table::HeaderSort @isDisabled={{false}}>Header</Table::HeaderSort>`);
31+
const screen = await render(
32+
hbs`<Table::HeaderSort @isDisabled={{false}} @ariaLabelDefaultSort={{this.defaultLabel}}>Header</Table::HeaderSort>`,
33+
);
3034

3135
// then
32-
assert.dom('[data-icon="sort"]').exists();
36+
assert.ok(screen.getByLabelText('mon-label'));
3337
});
3438

3539
test('it call onSort with "asc" when no order is given', async function (assert) {

0 commit comments

Comments
 (0)