@cityway/bo-ui 1.1.0-beta017 → 1.1.0-beta019
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cityway-bo-ui-1.1.0-beta019.tgz +0 -0
- package/docs/components/drag-n-drop-nested-list.md +47 -1
- package/docs/components/page-header.md +60 -3
- package/docs/i18n.md +1 -0
- package/fesm2022/cityway-bo-ui.mjs +99 -18
- package/fesm2022/cityway-bo-ui.mjs.map +1 -1
- package/index.d.ts +82 -7
- package/lib/assets/i18n/common.en.json +5 -0
- package/lib/assets/i18n/common.fr.json +5 -0
- package/package.json +2 -2
- package/styles/bo-ui.styles.min.css +1 -1
- package/styles/bo-ui.styles.min.css.map +1 -1
- package/cityway-bo-ui-1.1.0-beta017.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, ChangeDetectionStrategy, Component, output, effect, signal, computed, isDevMode, inject, contentChild, isSignal, DestroyRef, viewChildren, viewChild, afterRenderEffect, afterNextRender, contentChildren } from '@angular/core';
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component, output, effect, signal, computed, untracked, isDevMode, inject, contentChild, isSignal, DestroyRef, viewChildren, viewChild, afterRenderEffect, InjectionToken, makeEnvironmentProviders, afterNextRender, contentChildren } from '@angular/core';
|
|
3
3
|
import * as i1 from '@ngx-translate/core';
|
|
4
4
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import * as i1$3 from '@angular/common';
|
|
@@ -192,6 +192,11 @@ class DragNDropNestedListComponent {
|
|
|
192
192
|
/** Émis quand on clique « Restaurer » sur une carte `pendingDelete` (au lieu de `delete`). */
|
|
193
193
|
this.restore = output();
|
|
194
194
|
this.add = output();
|
|
195
|
+
/**
|
|
196
|
+
* Émis quand l'utilisateur plie / déplie une carte (chevron). L'hôte peut le refléter dans
|
|
197
|
+
* `DragItem.expanded`. Jamais émis pour un état posé par l'hôte (`expanded`, `expandSelected`).
|
|
198
|
+
*/
|
|
199
|
+
this.expandedChange = output();
|
|
195
200
|
this.spriteIcon = SpriteIconEnum;
|
|
196
201
|
this.iconSize = IconSizeEnum;
|
|
197
202
|
this.buttonType = BoButtonTypeEnum;
|
|
@@ -201,8 +206,9 @@ class DragNDropNestedListComponent {
|
|
|
201
206
|
// Copie interne mutable sur laquelle le CDK opère (pas un signal — cf. DragNDropListComponent)
|
|
202
207
|
this._items = [];
|
|
203
208
|
/**
|
|
204
|
-
* État de pliage par carte, alimenté par `(collapseClicked)` de `cw-card
|
|
205
|
-
*
|
|
209
|
+
* État de pliage par carte, alimenté par `(collapseClicked)` de `cw-card` (utilisateur), par
|
|
210
|
+
* `DragItem.expanded` à chaque nouvel `items` et par `column.expandSelected` (hôte).
|
|
211
|
+
* Une carte absente de la map n'a jamais été pilotée : son état est celui posé à l'init
|
|
206
212
|
* (`isCollapsible`, cf. `isCollapsedCard`). Sert au marquage « sélection repliée » des ancêtres.
|
|
207
213
|
*/
|
|
208
214
|
this.collapsedById = signal(new Map(), ...(ngDevMode ? [{ debugName: "collapsedById" }] : []));
|
|
@@ -229,6 +235,34 @@ class DragNDropNestedListComponent {
|
|
|
229
235
|
effect(() => {
|
|
230
236
|
this._items = this.cloneTree(this.items());
|
|
231
237
|
});
|
|
238
|
+
// `DragItem.expanded` : réappliqué à chaque nouvelle valeur de `items` (et seulement là),
|
|
239
|
+
// pour que l'utilisateur garde la main entre deux mises à jour de l'hôte.
|
|
240
|
+
effect(() => {
|
|
241
|
+
const items = this.items();
|
|
242
|
+
untracked(() => {
|
|
243
|
+
const updates = new Map();
|
|
244
|
+
const walk = (nodes) => {
|
|
245
|
+
for (const node of nodes) {
|
|
246
|
+
if (node.expanded !== undefined)
|
|
247
|
+
updates.set(node.id, !node.expanded);
|
|
248
|
+
if (node.children?.length)
|
|
249
|
+
walk(node.children);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
walk(items);
|
|
253
|
+
this.applyCollapsed(updates);
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
// `column.expandSelected` : ancêtres de la sélection dépliés. Déclaré après l'effet
|
|
257
|
+
// `expanded`, qui s'exécute avant lui : la sélection visible prime.
|
|
258
|
+
effect(() => {
|
|
259
|
+
const ancestors = this.selectedAncestorIds();
|
|
260
|
+
if (!this.column()?.expandSelected)
|
|
261
|
+
return;
|
|
262
|
+
untracked(() => {
|
|
263
|
+
this.applyCollapsed(new Map([...ancestors].map(id => [id, false])));
|
|
264
|
+
});
|
|
265
|
+
});
|
|
232
266
|
// Diagnostic dev : `selectedId` doit désigner UNE carte. Des `id` qui se répètent d'un
|
|
233
267
|
// niveau à l'autre (thème `1` / fichier `1`, typique quand chaque niveau vient d'une table
|
|
234
268
|
// différente) en allument plusieurs — symptôme : « toute la branche est en surbrillance ».
|
|
@@ -327,6 +361,13 @@ class DragNDropNestedListComponent {
|
|
|
327
361
|
const max = this.levelMax(0);
|
|
328
362
|
return max !== undefined ? `${count}/${max}` : `${count}`;
|
|
329
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* Carte réordonnable : override item → défaut colonne → true. `false` : ni poignée ni drag
|
|
366
|
+
* (≠ `disabled`, qui garde la poignée affichée mais inerte).
|
|
367
|
+
*/
|
|
368
|
+
isSortable(item) {
|
|
369
|
+
return item.sortable ?? this.column()?.sortable ?? true;
|
|
370
|
+
}
|
|
330
371
|
/** Visibilité d'une action (view/edit/delete) : override item → défaut colonne → true. */
|
|
331
372
|
showAction(item, action) {
|
|
332
373
|
const override = item.actions?.[action];
|
|
@@ -373,8 +414,16 @@ class DragNDropNestedListComponent {
|
|
|
373
414
|
return this.collapsedById().get(item.id) ?? this.isCollapsible(item, depth);
|
|
374
415
|
}
|
|
375
416
|
onCollapseChange(item, collapsed) {
|
|
376
|
-
|
|
377
|
-
|
|
417
|
+
this.applyCollapsed(new Map([[item.id, collapsed]]));
|
|
418
|
+
this.expandedChange.emit({ item, expanded: !collapsed });
|
|
419
|
+
}
|
|
420
|
+
/** Fusionne des états de pliage dans `collapsedById` (sans nouvelle référence si rien ne change). */
|
|
421
|
+
applyCollapsed(updates) {
|
|
422
|
+
const current = this.collapsedById();
|
|
423
|
+
if ([...updates].every(([id, collapsed]) => current.get(id) === collapsed))
|
|
424
|
+
return;
|
|
425
|
+
const next = new Map(current);
|
|
426
|
+
updates.forEach((collapsed, id) => next.set(id, collapsed));
|
|
378
427
|
this.collapsedById.set(next);
|
|
379
428
|
}
|
|
380
429
|
/**
|
|
@@ -417,12 +466,12 @@ class DragNDropNestedListComponent {
|
|
|
417
466
|
}));
|
|
418
467
|
}
|
|
419
468
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: DragNDropNestedListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
420
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: DragNDropNestedListComponent, isStandalone: true, selector: "cw-drag-n-drop-nested-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, reorderOnDrop: { classPropertyName: "reorderOnDrop", publicName: "reorderOnDrop", isSignal: true, isRequired: false, transformFunction: null }, maxDepth: { classPropertyName: "maxDepth", publicName: "maxDepth", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemsChange: "itemsChange", view: "view", edit: "edit", delete: "delete", restore: "restore", add: "add" }, ngImport: i0, template: "<div class=\"ddn-list d-flex-v gap-md\">\n <div class=\"d-flex-h justify-between\">\n @if (column()?.title) {\n <h2>{{ column()!.title | translate }} ({{ columnCountLabel() }})</h2>\n }\n\n @if (column()?.showAddRoot) {\n <cw-button cssClass=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addRootLabel ?? column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(_items, 0)\" (btnAction)=\"onAdd(undefined, 0)\" />\n }\n </div>\n\n <ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: _items, depth: 0, parent: undefined }\" />\n</div>\n\n<!--\n Template r\u00E9cursif : \u00E0 chaque niveau, on rend un cdkDropList isol\u00E9\n (pas de cdkDropListConnectedTo => transfert inter-listes impossible),\n puis on r\u00E9-instancie le m\u00EAme template pour la sous-liste de chaque enfant.\n-->\n<ng-template #nodeTpl let-nodes let-depth=\"depth\" let-parent=\"parent\">\n @if (isLevelFull(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-max-alert\">\n {{ (column()?.maxReachedLabel ?? '_COMMON.MAX_ITEMS_REACHED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <ul class=\"list-unstyled d-flex-v gap-md ms-none\" [ngClass]=\"column()?.cssClass\" [attr.data-depth]=\"depth\"\n cdkDropList [cdkDropListData]=\"nodes\" (cdkDropListDropped)=\"drop($event)\">\n\n @for (item of nodes; track item.id) {\n <li cdkDrag [cdkDragDisabled]=\"(item.disabled ?? false) || (item.pendingDelete ?? false)\" cdkDragPreviewClass=\"ddn-list-card-preview\">\n <cw-card [cssClass]=\"cardCssClass(item, depth)\" [title]=\"(item.title ?? item.label) || ''\"\n [subtitle]=\"item.subtitle ?? ''\" [truncateSubtitle]=\"true\" [type]=\"cardType(depth)\" [collapsible]=\"isCollapsible(item, depth)\"\n [collapsed]=\"isCollapsedCard(item, depth)\" [collapseStretched]=\"false\"\n (collapseClicked)=\"onCollapseChange(item, $event)\">\n\n <!-- Poign\u00E9e de drag (\u00E0 gauche du titre) : le glisser ne d\u00E9marre que d'ici -->\n <button header-start type=\"button\" class=\"ddn-list-handle btn btn-ghost\" cdkDragHandle\n [disabled]=\"(item.disabled ?? false) || (item.pendingDelete ?? false)\" [attr.aria-label]=\"'_COMMON._ACTION.MOVE' | translate\">\n <cw-icon [icon]=\"spriteIcon.grip\" [iconSize]=\"iconSize['md']\" />\n </button>\n\n <!-- En-t\u00EAte : compteur d'enfants + badge + actions -->\n <div header-custom-area class=\"d-flex-h gap-2xs justify-end align-start\">\n @if (childrenCountLabel(item, depth); as count) {\n <span class=\"ddn-list-count fs fs-xs\">{{ count }}</span>\n }\n\n @if (item.badge) {\n <cw-badge [type]=\"item.badge.type\" [label]=\"item.badge.label\" [withIcon]=\"item.badge.icon\" />\n }\n\n <!-- Sur une carte pendingDelete, seul \u00AB Restaurer \u00BB est propos\u00E9 (view/edit masqu\u00E9s). -->\n @if (!item.pendingDelete && showAction(item, 'view')) {\n <cw-button label=\"_COMMON._ACTION.VIEW\" [withIcon]=\"spriteIcon.search\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"view.emit(item)\" />\n }\n @if (!item.pendingDelete && showAction(item, 'edit')) {\n <cw-button label=\"_COMMON._ACTION.EDIT\" [withIcon]=\"spriteIcon.edit\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"edit.emit(item)\" />\n }\n @if (showAction(item, 'delete')) {\n @if (item.pendingDelete) {\n <!-- Soft-delete : la corbeille bascule en \u00AB Restaurer \u00BB (d\u00E9sactiv\u00E9 si le niveau est plein). -->\n <cw-button label=\"_COMMON._ACTION.RESTORE\" [withIcon]=\"spriteIcon.toolbarRefresh\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" cssClass=\"ddn-list-action-restore\"\n [isDisabled]=\"isRestoreBlocked(nodes, depth)\"\n [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"restore.emit(item)\" />\n } @else {\n <cw-button label=\"_COMMON._ACTION.DELETE\" [withIcon]=\"spriteIcon.trash\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" cssClass=\"ddn-list-action-delete\"\n [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"delete.emit(item)\" />\n }\n }\n </div>\n\n <!-- Restauration impossible : niveau plein (mode excludePendingDeleteFromMax). -->\n @if (item.pendingDelete && isRestoreBlocked(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-restore-blocked-alert\">\n {{ (column()?.restoreBlockedLabel ?? '_COMMON.MAX_RESTORE_BLOCKED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <!-- Corps masqu\u00E9 sur une carte pendingDelete : on n'affiche que l'en-t\u00EAte (carte compacte,\n non pliable, non d\u00E9pla\u00E7able). L'encart \u00AB restauration impossible \u00BB ci-dessus reste, lui, visible. -->\n @if (!item.pendingDelete) {\n <!-- Corps : template custom (slot). Sans slot, on ne rend que ce que l'en-t\u00EAte ne porte\n pas d\u00E9j\u00E0 (le titre vaut `title ?? label`) : le code seul, s'il existe. -->\n @if (itemTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: item, depth: depth }\" />\n } @else if (item.code) {\n <div class=\"default-item\"><span class=\"text-muted\">({{ item.code }})</span></div>\n }\n\n @if (item.children?.length) {\n <ng-container\n *ngTemplateOutlet=\"nodeTpl; context: { $implicit: item.children, depth: depth + 1, parent: item }\" />\n }\n\n @if (canAdd(item, depth)) {\n <div class=\"d-flex-h justify-end\">\n <cw-button class=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(item.children ?? [], depth + 1)\" (btnAction)=\"onAdd(item, depth + 1)\" />\n </div>\n }\n }\n </cw-card>\n </li>\n }\n\n </ul>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: CardComponent, selector: "cw-card", inputs: ["title", "subtitle", "truncateSubtitle", "type", "titleRank", "cssClass", "collapsible", "collapsed", "disabled", "collapseLocked", "collapseStretched", "collapseId", "destroyOnHide", "fullHeight"], outputs: ["collapsibleChange", "destroyOnHideChange", "collapseClicked"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: AlertComponent, selector: "cw-alert", inputs: ["type", "title", "isDismissible", "cssClass", "dataTest"], outputs: ["close"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: DragNDropNestedListComponent, isStandalone: true, selector: "cw-drag-n-drop-nested-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, reorderOnDrop: { classPropertyName: "reorderOnDrop", publicName: "reorderOnDrop", isSignal: true, isRequired: false, transformFunction: null }, maxDepth: { classPropertyName: "maxDepth", publicName: "maxDepth", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemsChange: "itemsChange", view: "view", edit: "edit", delete: "delete", restore: "restore", add: "add", expandedChange: "expandedChange" }, ngImport: i0, template: "<div class=\"ddn-list d-flex-v gap-md\">\n <div class=\"d-flex-h justify-between\">\n @if (column()?.title) {\n <h2>{{ column()!.title | translate }} ({{ columnCountLabel() }})</h2>\n }\n\n @if (column()?.showAddRoot) {\n <cw-button cssClass=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addRootLabel ?? column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(_items, 0)\" (btnAction)=\"onAdd(undefined, 0)\" />\n }\n </div>\n\n <ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: _items, depth: 0, parent: undefined }\" />\n</div>\n\n<!--\n Template r\u00E9cursif : \u00E0 chaque niveau, on rend un cdkDropList isol\u00E9\n (pas de cdkDropListConnectedTo => transfert inter-listes impossible),\n puis on r\u00E9-instancie le m\u00EAme template pour la sous-liste de chaque enfant.\n-->\n<ng-template #nodeTpl let-nodes let-depth=\"depth\" let-parent=\"parent\">\n @if (isLevelFull(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-max-alert\">\n {{ (column()?.maxReachedLabel ?? '_COMMON.MAX_ITEMS_REACHED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <ul class=\"list-unstyled d-flex-v gap-md ms-none\" [ngClass]=\"column()?.cssClass\" [attr.data-depth]=\"depth\"\n cdkDropList [cdkDropListData]=\"nodes\" (cdkDropListDropped)=\"drop($event)\">\n\n @for (item of nodes; track item.id) {\n <li cdkDrag [cdkDragDisabled]=\"!isSortable(item) || (item.disabled ?? false) || (item.pendingDelete ?? false)\" cdkDragPreviewClass=\"ddn-list-card-preview\">\n <cw-card [cssClass]=\"cardCssClass(item, depth)\" [title]=\"(item.title ?? item.label) || ''\"\n [subtitle]=\"item.subtitle ?? ''\" [truncateSubtitle]=\"true\" [type]=\"cardType(depth)\" [collapsible]=\"isCollapsible(item, depth)\"\n [collapsed]=\"isCollapsedCard(item, depth)\" [collapseStretched]=\"false\"\n (collapseClicked)=\"onCollapseChange(item, $event)\">\n\n <!-- Poign\u00E9e de drag (\u00E0 gauche du titre) : le glisser ne d\u00E9marre que d'ici.\n Non rendue si la carte n'est pas triable (ordre non manipulable) ; `disabled`\n la garde affich\u00E9e mais inerte. -->\n @if (isSortable(item)) {\n <button header-start type=\"button\" class=\"ddn-list-handle btn btn-ghost\" cdkDragHandle\n [disabled]=\"(item.disabled ?? false) || (item.pendingDelete ?? false)\" [attr.aria-label]=\"'_COMMON._ACTION.MOVE' | translate\">\n <cw-icon [icon]=\"spriteIcon.grip\" [iconSize]=\"iconSize['md']\" />\n </button>\n }\n\n <!-- En-t\u00EAte : compteur d'enfants + badge + actions -->\n <div header-custom-area class=\"d-flex-h gap-2xs justify-end align-start\">\n @if (childrenCountLabel(item, depth); as count) {\n <span class=\"ddn-list-count fs fs-xs\">{{ count }}</span>\n }\n\n @if (item.badge) {\n <cw-badge [type]=\"item.badge.type\" [label]=\"item.badge.label\" [withIcon]=\"item.badge.icon\" />\n }\n\n <!-- Sur une carte pendingDelete, seul \u00AB Restaurer \u00BB est propos\u00E9 (view/edit masqu\u00E9s). -->\n @if (!item.pendingDelete && showAction(item, 'view')) {\n <cw-button label=\"_COMMON._ACTION.VIEW\" [withIcon]=\"spriteIcon.search\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"view.emit(item)\" />\n }\n @if (!item.pendingDelete && showAction(item, 'edit')) {\n <cw-button label=\"_COMMON._ACTION.EDIT\" [withIcon]=\"spriteIcon.edit\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"edit.emit(item)\" />\n }\n @if (showAction(item, 'delete')) {\n @if (item.pendingDelete) {\n <!-- Soft-delete : la corbeille bascule en \u00AB Restaurer \u00BB (d\u00E9sactiv\u00E9 si le niveau est plein). -->\n <cw-button label=\"_COMMON._ACTION.RESTORE\" [withIcon]=\"spriteIcon.toolbarRefresh\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" cssClass=\"ddn-list-action-restore\"\n [isDisabled]=\"isRestoreBlocked(nodes, depth)\"\n [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"restore.emit(item)\" />\n } @else {\n <cw-button label=\"_COMMON._ACTION.DELETE\" [withIcon]=\"spriteIcon.trash\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" cssClass=\"ddn-list-action-delete\"\n [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"delete.emit(item)\" />\n }\n }\n </div>\n\n <!-- Restauration impossible : niveau plein (mode excludePendingDeleteFromMax). -->\n @if (item.pendingDelete && isRestoreBlocked(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-restore-blocked-alert\">\n {{ (column()?.restoreBlockedLabel ?? '_COMMON.MAX_RESTORE_BLOCKED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <!-- Corps masqu\u00E9 sur une carte pendingDelete : on n'affiche que l'en-t\u00EAte (carte compacte,\n non pliable, non d\u00E9pla\u00E7able). L'encart \u00AB restauration impossible \u00BB ci-dessus reste, lui, visible. -->\n @if (!item.pendingDelete) {\n <!-- Corps : template custom (slot). Sans slot, on ne rend que ce que l'en-t\u00EAte ne porte\n pas d\u00E9j\u00E0 (le titre vaut `title ?? label`) : le code seul, s'il existe. -->\n @if (itemTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: item, depth: depth }\" />\n } @else if (item.code) {\n <div class=\"default-item\"><span class=\"text-muted\">({{ item.code }})</span></div>\n }\n\n @if (item.children?.length) {\n <ng-container\n *ngTemplateOutlet=\"nodeTpl; context: { $implicit: item.children, depth: depth + 1, parent: item }\" />\n }\n\n @if (canAdd(item, depth)) {\n <div class=\"d-flex-h justify-end\">\n <cw-button class=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(item.children ?? [], depth + 1)\" (btnAction)=\"onAdd(item, depth + 1)\" />\n </div>\n }\n }\n </cw-card>\n </li>\n }\n\n </ul>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: CardComponent, selector: "cw-card", inputs: ["title", "subtitle", "truncateSubtitle", "type", "titleRank", "cssClass", "collapsible", "collapsed", "disabled", "collapseLocked", "collapseStretched", "collapseId", "destroyOnHide", "fullHeight"], outputs: ["collapsibleChange", "destroyOnHideChange", "collapseClicked"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: AlertComponent, selector: "cw-alert", inputs: ["type", "title", "isDismissible", "cssClass", "dataTest"], outputs: ["close"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
421
470
|
}
|
|
422
471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: DragNDropNestedListComponent, decorators: [{
|
|
423
472
|
type: Component,
|
|
424
|
-
args: [{ selector: 'cw-drag-n-drop-nested-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, NgTemplateOutlet, TranslateModule, DragDropModule, CardComponent, BadgeComponent, IconComponent, ButtonComponent, AlertComponent], template: "<div class=\"ddn-list d-flex-v gap-md\">\n <div class=\"d-flex-h justify-between\">\n @if (column()?.title) {\n <h2>{{ column()!.title | translate }} ({{ columnCountLabel() }})</h2>\n }\n\n @if (column()?.showAddRoot) {\n <cw-button cssClass=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addRootLabel ?? column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(_items, 0)\" (btnAction)=\"onAdd(undefined, 0)\" />\n }\n </div>\n\n <ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: _items, depth: 0, parent: undefined }\" />\n</div>\n\n<!--\n Template r\u00E9cursif : \u00E0 chaque niveau, on rend un cdkDropList isol\u00E9\n (pas de cdkDropListConnectedTo => transfert inter-listes impossible),\n puis on r\u00E9-instancie le m\u00EAme template pour la sous-liste de chaque enfant.\n-->\n<ng-template #nodeTpl let-nodes let-depth=\"depth\" let-parent=\"parent\">\n @if (isLevelFull(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-max-alert\">\n {{ (column()?.maxReachedLabel ?? '_COMMON.MAX_ITEMS_REACHED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <ul class=\"list-unstyled d-flex-v gap-md ms-none\" [ngClass]=\"column()?.cssClass\" [attr.data-depth]=\"depth\"\n cdkDropList [cdkDropListData]=\"nodes\" (cdkDropListDropped)=\"drop($event)\">\n\n @for (item of nodes; track item.id) {\n <li cdkDrag [cdkDragDisabled]=\"(item.disabled ?? false) || (item.pendingDelete ?? false)\" cdkDragPreviewClass=\"ddn-list-card-preview\">\n <cw-card [cssClass]=\"cardCssClass(item, depth)\" [title]=\"(item.title ?? item.label) || ''\"\n [subtitle]=\"item.subtitle ?? ''\" [truncateSubtitle]=\"true\" [type]=\"cardType(depth)\" [collapsible]=\"isCollapsible(item, depth)\"\n [collapsed]=\"isCollapsedCard(item, depth)\" [collapseStretched]=\"false\"\n (collapseClicked)=\"onCollapseChange(item, $event)\">\n\n <!-- Poign\u00E9e de drag (\u00E0 gauche du titre) : le glisser ne d\u00E9marre que d'ici -->\n <button header-start type=\"button\" class=\"ddn-list-handle btn btn-ghost\" cdkDragHandle\n
|
|
425
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: false }] }], reorderOnDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderOnDrop", required: false }] }], maxDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepth", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }], itemsChange: [{ type: i0.Output, args: ["itemsChange"] }], view: [{ type: i0.Output, args: ["view"] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], restore: [{ type: i0.Output, args: ["restore"] }], add: [{ type: i0.Output, args: ["add"] }] } });
|
|
473
|
+
args: [{ selector: 'cw-drag-n-drop-nested-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, NgTemplateOutlet, TranslateModule, DragDropModule, CardComponent, BadgeComponent, IconComponent, ButtonComponent, AlertComponent], template: "<div class=\"ddn-list d-flex-v gap-md\">\n <div class=\"d-flex-h justify-between\">\n @if (column()?.title) {\n <h2>{{ column()!.title | translate }} ({{ columnCountLabel() }})</h2>\n }\n\n @if (column()?.showAddRoot) {\n <cw-button cssClass=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addRootLabel ?? column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(_items, 0)\" (btnAction)=\"onAdd(undefined, 0)\" />\n }\n </div>\n\n <ng-container *ngTemplateOutlet=\"nodeTpl; context: { $implicit: _items, depth: 0, parent: undefined }\" />\n</div>\n\n<!--\n Template r\u00E9cursif : \u00E0 chaque niveau, on rend un cdkDropList isol\u00E9\n (pas de cdkDropListConnectedTo => transfert inter-listes impossible),\n puis on r\u00E9-instancie le m\u00EAme template pour la sous-liste de chaque enfant.\n-->\n<ng-template #nodeTpl let-nodes let-depth=\"depth\" let-parent=\"parent\">\n @if (isLevelFull(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-max-alert\">\n {{ (column()?.maxReachedLabel ?? '_COMMON.MAX_ITEMS_REACHED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <ul class=\"list-unstyled d-flex-v gap-md ms-none\" [ngClass]=\"column()?.cssClass\" [attr.data-depth]=\"depth\"\n cdkDropList [cdkDropListData]=\"nodes\" (cdkDropListDropped)=\"drop($event)\">\n\n @for (item of nodes; track item.id) {\n <li cdkDrag [cdkDragDisabled]=\"!isSortable(item) || (item.disabled ?? false) || (item.pendingDelete ?? false)\" cdkDragPreviewClass=\"ddn-list-card-preview\">\n <cw-card [cssClass]=\"cardCssClass(item, depth)\" [title]=\"(item.title ?? item.label) || ''\"\n [subtitle]=\"item.subtitle ?? ''\" [truncateSubtitle]=\"true\" [type]=\"cardType(depth)\" [collapsible]=\"isCollapsible(item, depth)\"\n [collapsed]=\"isCollapsedCard(item, depth)\" [collapseStretched]=\"false\"\n (collapseClicked)=\"onCollapseChange(item, $event)\">\n\n <!-- Poign\u00E9e de drag (\u00E0 gauche du titre) : le glisser ne d\u00E9marre que d'ici.\n Non rendue si la carte n'est pas triable (ordre non manipulable) ; `disabled`\n la garde affich\u00E9e mais inerte. -->\n @if (isSortable(item)) {\n <button header-start type=\"button\" class=\"ddn-list-handle btn btn-ghost\" cdkDragHandle\n [disabled]=\"(item.disabled ?? false) || (item.pendingDelete ?? false)\" [attr.aria-label]=\"'_COMMON._ACTION.MOVE' | translate\">\n <cw-icon [icon]=\"spriteIcon.grip\" [iconSize]=\"iconSize['md']\" />\n </button>\n }\n\n <!-- En-t\u00EAte : compteur d'enfants + badge + actions -->\n <div header-custom-area class=\"d-flex-h gap-2xs justify-end align-start\">\n @if (childrenCountLabel(item, depth); as count) {\n <span class=\"ddn-list-count fs fs-xs\">{{ count }}</span>\n }\n\n @if (item.badge) {\n <cw-badge [type]=\"item.badge.type\" [label]=\"item.badge.label\" [withIcon]=\"item.badge.icon\" />\n }\n\n <!-- Sur une carte pendingDelete, seul \u00AB Restaurer \u00BB est propos\u00E9 (view/edit masqu\u00E9s). -->\n @if (!item.pendingDelete && showAction(item, 'view')) {\n <cw-button label=\"_COMMON._ACTION.VIEW\" [withIcon]=\"spriteIcon.search\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"view.emit(item)\" />\n }\n @if (!item.pendingDelete && showAction(item, 'edit')) {\n <cw-button label=\"_COMMON._ACTION.EDIT\" [withIcon]=\"spriteIcon.edit\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"edit.emit(item)\" />\n }\n @if (showAction(item, 'delete')) {\n @if (item.pendingDelete) {\n <!-- Soft-delete : la corbeille bascule en \u00AB Restaurer \u00BB (d\u00E9sactiv\u00E9 si le niveau est plein). -->\n <cw-button label=\"_COMMON._ACTION.RESTORE\" [withIcon]=\"spriteIcon.toolbarRefresh\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" cssClass=\"ddn-list-action-restore\"\n [isDisabled]=\"isRestoreBlocked(nodes, depth)\"\n [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"restore.emit(item)\" />\n } @else {\n <cw-button label=\"_COMMON._ACTION.DELETE\" [withIcon]=\"spriteIcon.trash\" [withOnlyIcon]=\"true\"\n [type]=\"buttonType.secondary\" cssClass=\"ddn-list-action-delete\"\n [iconSize]=\"buttonIconSize.xsmall\" (btnAction)=\"delete.emit(item)\" />\n }\n }\n </div>\n\n <!-- Restauration impossible : niveau plein (mode excludePendingDeleteFromMax). -->\n @if (item.pendingDelete && isRestoreBlocked(nodes, depth)) {\n <cw-alert [type]=\"alertType.warning\" cssClass=\"ddn-list-restore-blocked-alert\">\n {{ (column()?.restoreBlockedLabel ?? '_COMMON.MAX_RESTORE_BLOCKED') | translate:{ max: levelMax(depth) } }}\n </cw-alert>\n }\n\n <!-- Corps masqu\u00E9 sur une carte pendingDelete : on n'affiche que l'en-t\u00EAte (carte compacte,\n non pliable, non d\u00E9pla\u00E7able). L'encart \u00AB restauration impossible \u00BB ci-dessus reste, lui, visible. -->\n @if (!item.pendingDelete) {\n <!-- Corps : template custom (slot). Sans slot, on ne rend que ce que l'en-t\u00EAte ne porte\n pas d\u00E9j\u00E0 (le titre vaut `title ?? label`) : le code seul, s'il existe. -->\n @if (itemTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: item, depth: depth }\" />\n } @else if (item.code) {\n <div class=\"default-item\"><span class=\"text-muted\">({{ item.code }})</span></div>\n }\n\n @if (item.children?.length) {\n <ng-container\n *ngTemplateOutlet=\"nodeTpl; context: { $implicit: item.children, depth: depth + 1, parent: item }\" />\n }\n\n @if (canAdd(item, depth)) {\n <div class=\"d-flex-h justify-end\">\n <cw-button class=\"ddn-list-add\" [type]=\"buttonType.link\" [withIcon]=\"spriteIcon.add\"\n [iconPosition]=\"buttonPosition.left\" [label]=\"column()?.addLabel ?? '_COMMON._ACTION.ADD'\"\n [isDisabled]=\"isLevelFull(item.children ?? [], depth + 1)\" (btnAction)=\"onAdd(item, depth + 1)\" />\n </div>\n }\n }\n </cw-card>\n </li>\n }\n\n </ul>\n</ng-template>\n" }]
|
|
474
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: false }] }], reorderOnDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderOnDrop", required: false }] }], maxDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepth", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }], itemsChange: [{ type: i0.Output, args: ["itemsChange"] }], view: [{ type: i0.Output, args: ["view"] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], restore: [{ type: i0.Output, args: ["restore"] }], add: [{ type: i0.Output, args: ["add"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
|
|
426
475
|
|
|
427
476
|
class PaginationComponent {
|
|
428
477
|
constructor() {
|
|
@@ -509,7 +558,7 @@ class PaginationComponent {
|
|
|
509
558
|
});
|
|
510
559
|
}
|
|
511
560
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
512
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: PaginationComponent, isStandalone: true, selector: "cw-pagination", inputs: { pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { paginationChange: "paginationChange" }, ngImport: i0, template: "@if (pagination().totalPages > 0) {\r\n<div class=\"pagination d-flex-h gap-md justify-between fs fs-sm\">\r\n\r\n <!-- LEFT PART -->\r\n <div class=\"d-flex-h gap-sm\">\r\n {{ '_COMMON._PAGINATION.RESULT_P' | translate: {total: pagination().totalItems } }}\r\n -\r\n {{ '_COMMON._PAGINATION.DISPLAY' | translate }}\r\n\r\n <cw-form-field\r\n [label]=\"'_COMMON._PAGINATION.ITEMS_PER_PAGE'\"\r\n [type]=\"typeField.select\"\r\n [control]=\"itemsPerPageControl\"\r\n [options]=\"pageSizesOptions\"\r\n [displayLabel]=\"false\"\r\n [clearable]=\"false\">\r\n </cw-form-field>\r\n\r\n {{ '_COMMON._PAGINATION.ITEMS_PER_PAGE' | translate }}\r\n </div>\r\n\r\n <!-- PAGINATION -->\r\n <ul class=\"list-unstyled d-flex-h gap-3xs\">\r\n\r\n <!-- PREVIOUS -->\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n [withOnlyIcon]=\"true\"\r\n [withIcon]=\"spriteIcon.nextLeft\"\r\n [isDisabled]=\"pagination().currentPage <= 1\"\r\n [iconSize]=\"buttonIconSize.small\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(pagination().currentPage - 1)\">\r\n </cw-button>\r\n </li>\r\n\r\n <!-- PAGES -->\r\n @for (item of visiblePages(); track item) {\r\n\r\n <!-- NUMBER -->\r\n @if (typeof item === 'number') {\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n [label]=\"item.toString()\"\r\n [cssClass]=\"item === pagination().currentPage ? 'btn-pagination btn-pagination-active' : 'btn-pagination'\"\r\n (btnAction)=\"emit(item)\">\r\n </cw-button>\r\n </li>\r\n }\r\n\r\n <!-- JUMP PREV -->\r\n @else if (item.type === 'jump-prev') {\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n label=\"...\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(item.page)\">\r\n </cw-button>\r\n </li>\r\n }\r\n\r\n <!-- JUMP NEXT -->\r\n @else if (item.type === 'jump-next') {\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n label=\"...\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(item.page)\">\r\n </cw-button>\r\n </li>\r\n }\r\n }\r\n\r\n <!-- NEXT -->\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n [withOnlyIcon]=\"true\"\r\n [withIcon]=\"spriteIcon.nextRight\"\r\n [isDisabled]=\"pagination().currentPage >= pagination().totalPages\"\r\n [iconSize]=\"buttonIconSize.small\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(pagination().currentPage + 1)\">\r\n </cw-button>\r\n </li>\r\n\r\n </ul>\r\n</div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: FormFieldComponent, selector: "cw-form-field", inputs: ["control", "formGroup", "type", "label", "displayLabel", "name", "placeholder", "autocomplete", "options", "rangeOptions", "validationOptions", "autocompleteOptions", "richTextOptions", "errorMessages", "isRequired", "help", "tooltip", "addonLeft", "addonRight", "isInAddon", "isReadonly", "isDisabled", "sliderValue", "sliderOptions", "cssClass", "skeletonMode", "clearable", "appendTo", "initialCountry", "recommendedDimensions", "showPreview", "existingFile", "indeterminate"], outputs: ["refreshEvent", "fileRemoved", "textChanged", "valueChange", "phoneRegionChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
561
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: PaginationComponent, isStandalone: true, selector: "cw-pagination", inputs: { pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { paginationChange: "paginationChange" }, ngImport: i0, template: "@if (pagination().totalPages > 0) {\r\n<div class=\"pagination d-flex-h gap-md justify-between fs fs-sm\">\r\n\r\n <!-- LEFT PART -->\r\n <div class=\"d-flex-h gap-sm\">\r\n {{ '_COMMON._PAGINATION.RESULT_P' | translate: {total: pagination().totalItems } }}\r\n -\r\n {{ '_COMMON._PAGINATION.DISPLAY' | translate }}\r\n\r\n <cw-form-field\r\n [label]=\"'_COMMON._PAGINATION.ITEMS_PER_PAGE'\"\r\n [type]=\"typeField.select\"\r\n [control]=\"itemsPerPageControl\"\r\n [options]=\"pageSizesOptions\"\r\n [displayLabel]=\"false\"\r\n [clearable]=\"false\">\r\n </cw-form-field>\r\n\r\n {{ '_COMMON._PAGINATION.ITEMS_PER_PAGE' | translate }}\r\n </div>\r\n\r\n <!-- PAGINATION -->\r\n <ul class=\"list-unstyled d-flex-h gap-3xs\">\r\n\r\n <!-- PREVIOUS -->\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n [withOnlyIcon]=\"true\"\r\n [withIcon]=\"spriteIcon.nextLeft\"\r\n [isDisabled]=\"pagination().currentPage <= 1\"\r\n [iconSize]=\"buttonIconSize.small\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(pagination().currentPage - 1)\">\r\n </cw-button>\r\n </li>\r\n\r\n <!-- PAGES -->\r\n @for (item of visiblePages(); track item) {\r\n\r\n <!-- NUMBER -->\r\n @if (typeof item === 'number') {\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n [label]=\"item.toString()\"\r\n [cssClass]=\"item === pagination().currentPage ? 'btn-pagination btn-pagination-active' : 'btn-pagination'\"\r\n (btnAction)=\"emit(item)\">\r\n </cw-button>\r\n </li>\r\n }\r\n\r\n <!-- JUMP PREV -->\r\n @else if (item.type === 'jump-prev') {\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n label=\"...\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(item.page)\">\r\n </cw-button>\r\n </li>\r\n }\r\n\r\n <!-- JUMP NEXT -->\r\n @else if (item.type === 'jump-next') {\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n label=\"...\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(item.page)\">\r\n </cw-button>\r\n </li>\r\n }\r\n }\r\n\r\n <!-- NEXT -->\r\n <li>\r\n <cw-button\r\n [type]=\"typeButton.ghost\"\r\n [withOnlyIcon]=\"true\"\r\n [withIcon]=\"spriteIcon.nextRight\"\r\n [isDisabled]=\"pagination().currentPage >= pagination().totalPages\"\r\n [iconSize]=\"buttonIconSize.small\"\r\n cssClass=\"btn-pagination\"\r\n (btnAction)=\"emit(pagination().currentPage + 1)\">\r\n </cw-button>\r\n </li>\r\n\r\n </ul>\r\n</div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: FormFieldComponent, selector: "cw-form-field", inputs: ["control", "formGroup", "type", "label", "displayLabel", "name", "placeholder", "autocomplete", "options", "rangeOptions", "validationOptions", "autocompleteOptions", "richTextOptions", "errorMessages", "isRequired", "help", "tooltip", "addonLeft", "addonRight", "isInAddon", "isReadonly", "isDisabled", "sliderValue", "sliderOptions", "cssClass", "skeletonMode", "clearable", "appendTo", "initialCountry", "recommendedDimensions", "showPreview", "existingFile", "indeterminate"], outputs: ["refreshEvent", "fileRemoved", "textChanged", "valueChange", "phoneRegionChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
513
562
|
}
|
|
514
563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
515
564
|
type: Component,
|
|
@@ -883,7 +932,7 @@ class TableComponent {
|
|
|
883
932
|
return typeof descriptor.link === 'function' ? descriptor.link(row) : descriptor.link;
|
|
884
933
|
}
|
|
885
934
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
886
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: TableComponent, isStandalone: true, selector: "cw-table", inputs: { checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, rowClassFn: { classPropertyName: "rowClassFn", publicName: "rowClassFn", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, bulkActions: { classPropertyName: "bulkActions", publicName: "bulkActions", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, emptyStateNoData: { classPropertyName: "emptyStateNoData", publicName: "emptyStateNoData", isSignal: true, isRequired: false, transformFunction: null }, emptyStateNoResult: { classPropertyName: "emptyStateNoResult", publicName: "emptyStateNoResult", isSignal: true, isRequired: false, transformFunction: null }, isFiltered: { classPropertyName: "isFiltered", publicName: "isFiltered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cellClick: "cellClick", sortChange: "sortChange", selectionChange: "selectionChange", paginationChange: "paginationChange", bulkDelete: "bulkDelete", bulkAction: "bulkAction" }, host: { classAttribute: "cw-table" }, queries: [{ propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (checkbox() && selectionCount() > 0) {\n <!-- Espacement DS : gap-md = 16px = component/button/set/gap (espacement entre\n boutons d'un set). Utilitaires basic-ui (adosses a l'echelle $sizing des\n tokens) et non ceux de Bootstrap : gap-2 valait 8px. d-flex-h centre deja\n verticalement, align-items-center est donc inutile. -->\n <div class=\"table-selection-info mb-md d-flex-h gap-md flex-wrap\">\n <span class=\"flex-grow-1\">\n {{ selectionCount() }} {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEMS_CURRENT_PAGE' | translate }}\n </span>\n @for (action of bulkActions(); track $index) {\n <cw-button\n [type]=\"resolveVariant(action)\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [isDisabled]=\"resolveDisabled(action)\"\n (btnAction)=\"onBulkActionClick(action)\">\n </cw-button>\n }\n </div>\n}\n\n<div class=\"table-responsive\">\n <table class=\"table\">\n <caption class=\"visually-hidden\"\n [innerHTML]=\"'_COMMON._TABLE.CAPTION' | translate: { label: (title() | translate) }\"></caption>\n <thead>\n <tr>\n @if(checkbox()) {\n <th scope=\"col\" width=\"10\">\n <div class=\"field-check\">\n <input class=\"field-check-input\" type=\"checkbox\" [id]=\"uid + '-all'\" [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\" (change)=\"toggleAll()\">\n <label class=\"field-check-label\" [for]=\"uid + '-all'\">\n <span class=\"visually-hidden\">{{ '_COMMON._TABLE._THEAD.CHECK_LINE' | translate }}</span>\n </label>\n </div>\n </th>\n }\n\n @for (column of columns(); track column.key) {\n @if (!column.hidden) {\n <th scope=\"col\" [class.p-0]=\"column.sort\" [attr.aria-sort]=\"column.sort ? getAriaSort(column.key) : null\">\n @if (column.sort) {\n <button class=\"d-flex-h gap-2xs\" [class]=\"getSortClass(column.key)\" (click)=\"setSortProperty(column.key)\">\n {{ column.label | translate}}\n <cw-icon\n [icon]=\"getSortIcon(column.key)\"\n [label]=\"'_COMMON._TABLE._SORT.LABEL' | translate\"\n [type]=\"iconType.default\"\n [iconSize]=\"iconSize['xs']\"></cw-icon>\n </button>\n }\n @else {\n {{ column.label | translate }}\n }\n </th>\n }\n }\n </tr>\n </thead>\n <tbody>\n @if (loading()) {\n <tr>\n <td [attr.colspan]=\"visibleColumnCount()\">\n <cw-loader></cw-loader>\n </td>\n </tr>\n }\n @else if (!data() || data().length === 0) {\n <tr>\n <td class=\"table-info no-result\" [attr.colspan]=\"visibleColumnCount()\">\n @if (currentEmptyState(); as empty) {\n <cw-empty-state\n [illustration]=\"empty.illustration ?? (isFiltered() ? illustrationEnum.noResult : illustrationEnum.noData)\"\n [imageSource]=\"empty.imageSource\"\n [title]=\"empty.title\"\n [description]=\"empty.description\"\n [primaryButton]=\"empty.primaryButton\"\n [secondaryButton]=\"empty.secondaryButton\"\n (primaryClick)=\"empty.primaryButton?.click?.()\"\n (secondaryClick)=\"empty.secondaryButton?.click?.()\">\n </cw-empty-state>\n } @else {\n {{ '_COMMON._TABLE.NO_RESULT' | translate }}\n }\n </td>\n </tr>\n }\n @else {\n @for (row of data(); track row) {\n <tr [class.tr-selected]=\"isSelected(row)\" [class]=\"getRowClass(row)\">\n @if (checkbox()) {\n <td>\n <input class=\"field-check-input\" type=\"checkbox\" [checked]=\"isSelected(row)\" (change)=\"toggleRow(row)\" [id]=\"uid + '-check-' + row.id\"\n [attr.aria-label]=\"('_COMMON._TABLE._THEAD.CHECK_LINE' | translate) + ' ' + row.id\">\n <label class=\"visually-hidden\" [for]=\"uid + '-check-' + row.id\">{{ '_COMMON._TABLE._THEAD.CHECK_LINE' | translate }} {{ row.id }}</label>\n </td>\n }\n @for (column of columns(); track column.key) {\n @if (!column.hidden) {\n <td [class.text-end]=\"column.align === 'right'\" [class.text-center]=\"column.align === 'center'\"\n [class.td-actions]=\"column.type === 'actions'\">\n @switch (column.type) {\n @case ('link') {\n <button type=\"button\" class=\"btn btn-link-like\" (click)=\"onCellClick(row, column)\">\n {{ column.translate ? (row[column.key] | translate) : row[column.key] }}\n </button>\n }\n @case ('badge') {\n <cw-badge\n [type]=\"getBadge(column, row[column.key]).type\"\n [label]=\"getBadge(column, row[column.key]).label ?? row[column.key]\"\n [withIcon]=\"getBadge(column, row[column.key]).withIcon\"\n [iconPosition]=\"getBadge(column, row[column.key]).iconPosition\"></cw-badge>\n }\n @case ('icon') {\n @if (isClickable(column)) {\n <button type=\"button\" class=\"btn btn-link-like\" (click)=\"onCellClick(row, column)\" [attr.aria-label]=\"row[column.key].label\">\n <cw-icon\n [icon]=\"row[column.key].icon\"\n [label]=\"row[column.key].label\"\n [type]=\"iconType.default\"\n [iconSize]=\"iconSize['md']\"\n [iconCssClass]=\"row[column.key].iconCssClass\"\n ></cw-icon>\n </button>\n } @else {\n <cw-icon\n [icon]=\"row[column.key].icon\"\n [label]=\"row[column.key].label\"\n [type]=\"iconType.default\"\n [iconSize]=\"iconSize['md']\"\n [iconCssClass]=\"row[column.key].iconCssClass\"\n ></cw-icon>\n }\n }\n @case ('image') {\n @if (isClickable(column)) {\n <button type=\"button\" class=\"btn btn-link-like\" (click)=\"onCellClick(row, column)\" [attr.aria-label]=\"row[column.key].label\">\n <cw-image\n [source]=\"row[column.key].source\"\n [alt]=\"row[column.key].label\"\n [isAriaHidden]=\"true\"\n [cssClass]=\"row[column.key].iconCssClass\"\n width=\"32\"\n height=\"32\"\n ></cw-image>\n </button>\n } @else {\n <cw-image\n [source]=\"row[column.key].source\"\n [alt]=\"row[column.key].label\"\n [isAriaHidden]=\"true\"\n [cssClass]=\"row[column.key].iconCssClass\"\n width=\"32\"\n height=\"32\"\n ></cw-image>\n }\n }\n @case ('check') {\n @if (isTruthy(row[column.key])) {\n <cw-icon\n [icon]=\"spriteIcon.checkCircle\"\n [label]=\"'_COMMON._PRO_SENTENCE.YES' | translate\"\n [type]=\"iconType.default\"\n iconCssClass=\"text-success\"\n [iconSize]=\"iconSize['md']\"></cw-icon>\n } @else {\n <cw-icon\n [icon]=\"spriteIcon.closeCircle\"\n [label]=\"'_COMMON._PRO_SENTENCE.NO' | translate\"\n [type]=\"iconType.default\"\n iconCssClass=\"text-danger\"\n [iconSize]=\"iconSize['md']\"></cw-icon>\n }\n }\n @case ('progressbar') {\n <div class=\"td-progressbar\">\n <cw-progress-bar\n [value]=\"row[column.key]\"\n [size]=\"progressBarSize.sm\"\n [type]=\"progressBarType.information\"></cw-progress-bar>\n <span class=\"td-progressbar-value\">{{ row[column.key] }}%</span>\n </div>\n }\n @case ('actions') {\n @if (usingRowActions) {\n @let actions = getResolvedActions(row);\n @if (actions.length > 0) {\n @if (!useDropdownActions()) {\n @for (action of actions; track $index) {\n <cw-button\n [type]=\"buttonType.ghost\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [link]=\"action.link\"\n [isDisabled]=\"action.disabled\"\n [cssClass]=\"actionCssClass(action)\"\n (btnAction)=\"onRowActionClick(action, row)\">\n </cw-button>\n }\n } @else {\n <cw-button\n [label]=\"'_COMMON._TABLE.ACTIONS_MENU'\"\n [withIcon]=\"spriteIcon.menuVertical\"\n [withOnlyIcon]=\"true\"\n [type]=\"buttonType.ghost\"\n [isDropdown]=\"true\"\n [hideCaret]=\"true\">\n <ul class=\"p-0 m-0\">\n @for (action of actions; track $index) {\n <li>\n @if (action.link) {\n <cw-button\n [type]=\"buttonType.ghost\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [link]=\"action.link\"\n [isDisabled]=\"action.disabled\"\n [cssClass]=\"'dropdown-item ' + actionCssClass(action)\">\n </cw-button>\n } @else {\n <cw-button\n [type]=\"buttonType.ghost\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [isDisabled]=\"action.disabled\"\n [cssClass]=\"'dropdown-item ' + actionCssClass(action)\"\n (btnAction)=\"onRowActionClick(action, row)\">\n </cw-button>\n }\n </li>\n }\n </ul>\n </cw-button>\n }\n }\n } @else {\n <ng-container\n *ngTemplateOutlet=\"actionsTemplate(); context: { $implicit: row }\">\n </ng-container>\n }\n }\n @default {\n {{ column.translate ? (row[column.key] | translate) : row[column.key] }}\n }\n }\n </td>\n }\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n@if (pagination()) {\n <cw-pagination\n [pagination]=\"pagination()!\"\n (paginationChange)=\"paginationChange.emit($event)\">\n </cw-pagination>\n}\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginationComponent, selector: "cw-pagination", inputs: ["pagination"], outputs: ["paginationChange"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ImageComponent, selector: "cw-image", inputs: ["source", "alt", "isAriaHidden", "cssClass", "width", "height"] }, { kind: "component", type: EmptyStateComponent, selector: "cw-empty-state", inputs: ["illustration", "illustrationBasePath", "imageSource", "imageAlt", "title", "description", "primaryButton", "secondaryButton", "dataTest"], outputs: ["primaryClick", "secondaryClick"] }, { kind: "component", type: ProgressBarComponent, selector: "cw-progress-bar", inputs: ["value", "max", "size", "type", "showValue", "label", "dataTest"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
935
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: TableComponent, isStandalone: true, selector: "cw-table", inputs: { checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, rowClassFn: { classPropertyName: "rowClassFn", publicName: "rowClassFn", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, bulkActions: { classPropertyName: "bulkActions", publicName: "bulkActions", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, emptyStateNoData: { classPropertyName: "emptyStateNoData", publicName: "emptyStateNoData", isSignal: true, isRequired: false, transformFunction: null }, emptyStateNoResult: { classPropertyName: "emptyStateNoResult", publicName: "emptyStateNoResult", isSignal: true, isRequired: false, transformFunction: null }, isFiltered: { classPropertyName: "isFiltered", publicName: "isFiltered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cellClick: "cellClick", sortChange: "sortChange", selectionChange: "selectionChange", paginationChange: "paginationChange", bulkDelete: "bulkDelete", bulkAction: "bulkAction" }, host: { classAttribute: "cw-table" }, queries: [{ propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (checkbox() && selectionCount() > 0) {\n <!-- Espacement DS : gap-md = 16px = component/button/set/gap (espacement entre\n boutons d'un set). Utilitaires basic-ui (adosses a l'echelle $sizing des\n tokens) et non ceux de Bootstrap : gap-2 valait 8px. d-flex-h centre deja\n verticalement, align-items-center est donc inutile. -->\n <div class=\"table-selection-info mb-md d-flex-h gap-md flex-wrap\">\n <span class=\"flex-grow-1\">\n {{ selectionCount() }} {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEMS_CURRENT_PAGE' | translate }}\n </span>\n @for (action of bulkActions(); track $index) {\n <cw-button\n [type]=\"resolveVariant(action)\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [isDisabled]=\"resolveDisabled(action)\"\n (btnAction)=\"onBulkActionClick(action)\">\n </cw-button>\n }\n </div>\n}\n\n<div class=\"table-responsive\">\n <table class=\"table\">\n <caption class=\"visually-hidden\"\n [innerHTML]=\"'_COMMON._TABLE.CAPTION' | translate: { label: (title() | translate) }\"></caption>\n <thead>\n <tr>\n @if(checkbox()) {\n <th scope=\"col\" width=\"10\">\n <div class=\"field-check\">\n <input class=\"field-check-input\" type=\"checkbox\" [id]=\"uid + '-all'\" [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\" (change)=\"toggleAll()\">\n <label class=\"field-check-label\" [for]=\"uid + '-all'\">\n <span class=\"visually-hidden\">{{ '_COMMON._TABLE._THEAD.CHECK_LINE' | translate }}</span>\n </label>\n </div>\n </th>\n }\n\n @for (column of columns(); track column.key) {\n @if (!column.hidden) {\n <th scope=\"col\" [class.p-0]=\"column.sort\" [attr.aria-sort]=\"column.sort ? getAriaSort(column.key) : null\">\n @if (column.sort) {\n <button class=\"d-flex-h gap-2xs\" [class]=\"getSortClass(column.key)\" (click)=\"setSortProperty(column.key)\">\n {{ column.label | translate}}\n <cw-icon\n [icon]=\"getSortIcon(column.key)\"\n [label]=\"'_COMMON._TABLE._SORT.LABEL' | translate\"\n [type]=\"iconType.default\"\n [iconSize]=\"iconSize['xs']\"></cw-icon>\n </button>\n }\n @else {\n {{ column.label | translate }}\n }\n </th>\n }\n }\n </tr>\n </thead>\n <tbody>\n @if (loading()) {\n <tr>\n <td [attr.colspan]=\"visibleColumnCount()\">\n <cw-loader></cw-loader>\n </td>\n </tr>\n }\n @else if (!data() || data().length === 0) {\n <tr>\n <td class=\"table-info no-result\" [attr.colspan]=\"visibleColumnCount()\">\n @if (currentEmptyState(); as empty) {\n <cw-empty-state\n [illustration]=\"empty.illustration ?? (isFiltered() ? illustrationEnum.noResult : illustrationEnum.noData)\"\n [imageSource]=\"empty.imageSource\"\n [title]=\"empty.title\"\n [description]=\"empty.description\"\n [primaryButton]=\"empty.primaryButton\"\n [secondaryButton]=\"empty.secondaryButton\"\n (primaryClick)=\"empty.primaryButton?.click?.()\"\n (secondaryClick)=\"empty.secondaryButton?.click?.()\">\n </cw-empty-state>\n } @else {\n {{ '_COMMON._TABLE.NO_RESULT' | translate }}\n }\n </td>\n </tr>\n }\n @else {\n @for (row of data(); track row) {\n <tr [class.tr-selected]=\"isSelected(row)\" [class]=\"getRowClass(row)\">\n @if (checkbox()) {\n <td>\n <input class=\"field-check-input\" type=\"checkbox\" [checked]=\"isSelected(row)\" (change)=\"toggleRow(row)\" [id]=\"uid + '-check-' + row.id\"\n [attr.aria-label]=\"('_COMMON._TABLE._THEAD.CHECK_LINE' | translate) + ' ' + row.id\">\n <label class=\"visually-hidden\" [for]=\"uid + '-check-' + row.id\">{{ '_COMMON._TABLE._THEAD.CHECK_LINE' | translate }} {{ row.id }}</label>\n </td>\n }\n @for (column of columns(); track column.key) {\n @if (!column.hidden) {\n <td [class.text-end]=\"column.align === 'right'\" [class.text-center]=\"column.align === 'center'\"\n [class.td-actions]=\"column.type === 'actions'\">\n @switch (column.type) {\n @case ('link') {\n <button type=\"button\" class=\"btn btn-link-like\" (click)=\"onCellClick(row, column)\">\n {{ column.translate ? (row[column.key] | translate) : row[column.key] }}\n </button>\n }\n @case ('badge') {\n <cw-badge\n [type]=\"getBadge(column, row[column.key]).type\"\n [label]=\"getBadge(column, row[column.key]).label ?? row[column.key]\"\n [withIcon]=\"getBadge(column, row[column.key]).withIcon\"\n [iconPosition]=\"getBadge(column, row[column.key]).iconPosition\"></cw-badge>\n }\n @case ('icon') {\n @if (isClickable(column)) {\n <button type=\"button\" class=\"btn btn-link-like\" (click)=\"onCellClick(row, column)\" [attr.aria-label]=\"row[column.key].label\">\n <cw-icon\n [icon]=\"row[column.key].icon\"\n [label]=\"row[column.key].label\"\n [type]=\"iconType.default\"\n [iconSize]=\"iconSize['md']\"\n [iconCssClass]=\"row[column.key].iconCssClass\"\n ></cw-icon>\n </button>\n } @else {\n <cw-icon\n [icon]=\"row[column.key].icon\"\n [label]=\"row[column.key].label\"\n [type]=\"iconType.default\"\n [iconSize]=\"iconSize['md']\"\n [iconCssClass]=\"row[column.key].iconCssClass\"\n ></cw-icon>\n }\n }\n @case ('image') {\n @if (isClickable(column)) {\n <button type=\"button\" class=\"btn btn-link-like\" (click)=\"onCellClick(row, column)\" [attr.aria-label]=\"row[column.key].label\">\n <cw-image\n [source]=\"row[column.key].source\"\n [alt]=\"row[column.key].label\"\n [isAriaHidden]=\"true\"\n [cssClass]=\"row[column.key].iconCssClass\"\n width=\"32\"\n height=\"32\"\n ></cw-image>\n </button>\n } @else {\n <cw-image\n [source]=\"row[column.key].source\"\n [alt]=\"row[column.key].label\"\n [isAriaHidden]=\"true\"\n [cssClass]=\"row[column.key].iconCssClass\"\n width=\"32\"\n height=\"32\"\n ></cw-image>\n }\n }\n @case ('check') {\n @if (isTruthy(row[column.key])) {\n <cw-icon\n [icon]=\"spriteIcon.checkCircle\"\n [label]=\"'_COMMON._PRO_SENTENCE.YES' | translate\"\n [type]=\"iconType.default\"\n iconCssClass=\"text-success\"\n [iconSize]=\"iconSize['md']\"></cw-icon>\n } @else {\n <cw-icon\n [icon]=\"spriteIcon.closeCircle\"\n [label]=\"'_COMMON._PRO_SENTENCE.NO' | translate\"\n [type]=\"iconType.default\"\n iconCssClass=\"text-danger\"\n [iconSize]=\"iconSize['md']\"></cw-icon>\n }\n }\n @case ('progressbar') {\n <div class=\"td-progressbar\">\n <cw-progress-bar\n [value]=\"row[column.key]\"\n [size]=\"progressBarSize.sm\"\n [type]=\"progressBarType.information\"></cw-progress-bar>\n <span class=\"td-progressbar-value\">{{ row[column.key] }}%</span>\n </div>\n }\n @case ('actions') {\n @if (usingRowActions) {\n @let actions = getResolvedActions(row);\n @if (actions.length > 0) {\n @if (!useDropdownActions()) {\n @for (action of actions; track $index) {\n <cw-button\n [type]=\"buttonType.ghost\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [link]=\"action.link\"\n [isDisabled]=\"action.disabled\"\n [cssClass]=\"actionCssClass(action)\"\n (btnAction)=\"onRowActionClick(action, row)\">\n </cw-button>\n }\n } @else {\n <cw-button\n [label]=\"'_COMMON._TABLE.ACTIONS_MENU'\"\n [withIcon]=\"spriteIcon.menuVertical\"\n [withOnlyIcon]=\"true\"\n [type]=\"buttonType.ghost\"\n [isDropdown]=\"true\"\n [hideCaret]=\"true\">\n <ul class=\"p-0 m-0\">\n @for (action of actions; track $index) {\n <li>\n @if (action.link) {\n <cw-button\n [type]=\"buttonType.ghost\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [link]=\"action.link\"\n [isDisabled]=\"action.disabled\"\n [cssClass]=\"'dropdown-item ' + actionCssClass(action)\">\n </cw-button>\n } @else {\n <cw-button\n [type]=\"buttonType.ghost\"\n [label]=\"action.label\"\n [withIcon]=\"action.icon\"\n [isDisabled]=\"action.disabled\"\n [cssClass]=\"'dropdown-item ' + actionCssClass(action)\"\n (btnAction)=\"onRowActionClick(action, row)\">\n </cw-button>\n }\n </li>\n }\n </ul>\n </cw-button>\n }\n }\n } @else {\n <ng-container\n *ngTemplateOutlet=\"actionsTemplate(); context: { $implicit: row }\">\n </ng-container>\n }\n }\n @default {\n {{ column.translate ? (row[column.key] | translate) : row[column.key] }}\n }\n }\n </td>\n }\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n@if (pagination()) {\n <cw-pagination\n [pagination]=\"pagination()!\"\n (paginationChange)=\"paginationChange.emit($event)\">\n </cw-pagination>\n}\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginationComponent, selector: "cw-pagination", inputs: ["pagination"], outputs: ["paginationChange"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ImageComponent, selector: "cw-image", inputs: ["source", "alt", "isAriaHidden", "cssClass", "width", "height"] }, { kind: "component", type: EmptyStateComponent, selector: "cw-empty-state", inputs: ["illustration", "illustrationBasePath", "imageSource", "imageAlt", "title", "description", "primaryButton", "secondaryButton", "dataTest"], outputs: ["primaryClick", "secondaryClick"] }, { kind: "component", type: ProgressBarComponent, selector: "cw-progress-bar", inputs: ["value", "max", "size", "type", "showValue", "label", "dataTest"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
887
936
|
}
|
|
888
937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: TableComponent, decorators: [{
|
|
889
938
|
type: Component,
|
|
@@ -1039,7 +1088,7 @@ class FilterBarComponent {
|
|
|
1039
1088
|
}
|
|
1040
1089
|
}
|
|
1041
1090
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1042
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FilterBarComponent, isStandalone: true, selector: "cw-filter-bar", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: true, transformFunction: null }, manual: { classPropertyName: "manual", publicName: "manual", isSignal: true, isRequired: false, transformFunction: null }, syncUrl: { classPropertyName: "syncUrl", publicName: "syncUrl", isSignal: true, isRequired: false, transformFunction: null }, applyLabel: { classPropertyName: "applyLabel", publicName: "applyLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filtersApplied: "filtersApplied", filtersReset: "filtersReset" }, ngImport: i0, template: "<!-- Cl\u00E9s i18n pass\u00E9es telles quelles : cw-form-field et cw-button traduisent label et placeholder eux-m\u00EAmes. -->\n<form [formGroup]=\"filterForm\" (ngSubmit)=\"apply()\" class=\"filter-bar\">\n <div class=\"d-flex-h flex-wrap gap-md\">\n @for (field of filters(); track field.key) {\n <div class=\"filter-field\" [class]=\"field.colClass ?? ''\">\n <cw-form-field\n [label]=\"field.label\"\n [displayLabel]=\"false\"\n [type]=\"field.type\"\n [placeholder]=\"field.placeholder ?? ''\"\n [options]=\"resolveOptions(field)\"\n [control]=\"getControl(field.key)\"\n [clearable]=\"false\">\n </cw-form-field>\n </div>\n }\n <div class=\"d-flex-h gap-md\">\n @if (manual()) {\n <cw-button\n [label]=\"applyLabel()\"\n [type]=\"uiType.link\"\n (btnAction)=\"apply()\">\n </cw-button>\n }\n <cw-button\n [label]=\"resetLabel()\"\n [type]=\"uiType.link\"\n (btnAction)=\"reset()\">\n </cw-button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "cw-form-field", inputs: ["control", "formGroup", "type", "label", "displayLabel", "name", "placeholder", "autocomplete", "options", "rangeOptions", "validationOptions", "autocompleteOptions", "richTextOptions", "errorMessages", "isRequired", "help", "tooltip", "addonLeft", "addonRight", "isInAddon", "isReadonly", "isDisabled", "sliderValue", "sliderOptions", "cssClass", "skeletonMode", "clearable", "appendTo", "initialCountry", "recommendedDimensions", "showPreview", "existingFile", "indeterminate"], outputs: ["refreshEvent", "fileRemoved", "textChanged", "valueChange", "phoneRegionChange"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1091
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FilterBarComponent, isStandalone: true, selector: "cw-filter-bar", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: true, transformFunction: null }, manual: { classPropertyName: "manual", publicName: "manual", isSignal: true, isRequired: false, transformFunction: null }, syncUrl: { classPropertyName: "syncUrl", publicName: "syncUrl", isSignal: true, isRequired: false, transformFunction: null }, applyLabel: { classPropertyName: "applyLabel", publicName: "applyLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filtersApplied: "filtersApplied", filtersReset: "filtersReset" }, ngImport: i0, template: "<!-- Cl\u00E9s i18n pass\u00E9es telles quelles : cw-form-field et cw-button traduisent label et placeholder eux-m\u00EAmes. -->\n<form [formGroup]=\"filterForm\" (ngSubmit)=\"apply()\" class=\"filter-bar\">\n <div class=\"d-flex-h flex-wrap gap-md\">\n @for (field of filters(); track field.key) {\n <div class=\"filter-field\" [class]=\"field.colClass ?? ''\">\n <cw-form-field\n [label]=\"field.label\"\n [displayLabel]=\"false\"\n [type]=\"field.type\"\n [placeholder]=\"field.placeholder ?? ''\"\n [options]=\"resolveOptions(field)\"\n [control]=\"getControl(field.key)\"\n [clearable]=\"false\">\n </cw-form-field>\n </div>\n }\n <div class=\"d-flex-h gap-md\">\n @if (manual()) {\n <cw-button\n [label]=\"applyLabel()\"\n [type]=\"uiType.link\"\n (btnAction)=\"apply()\">\n </cw-button>\n }\n <cw-button\n [label]=\"resetLabel()\"\n [type]=\"uiType.link\"\n (btnAction)=\"reset()\">\n </cw-button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "cw-form-field", inputs: ["control", "formGroup", "type", "label", "displayLabel", "name", "placeholder", "autocomplete", "options", "rangeOptions", "validationOptions", "autocompleteOptions", "richTextOptions", "errorMessages", "isRequired", "help", "tooltip", "addonLeft", "addonRight", "isInAddon", "isReadonly", "isDisabled", "sliderValue", "sliderOptions", "cssClass", "skeletonMode", "clearable", "appendTo", "initialCountry", "recommendedDimensions", "showPreview", "existingFile", "indeterminate"], outputs: ["refreshEvent", "fileRemoved", "textChanged", "valueChange", "phoneRegionChange"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1043
1092
|
}
|
|
1044
1093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FilterBarComponent, decorators: [{
|
|
1045
1094
|
type: Component,
|
|
@@ -1231,7 +1280,7 @@ class ExportButtonComponent {
|
|
|
1231
1280
|
});
|
|
1232
1281
|
}
|
|
1233
1282
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ExportButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1234
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ExportButtonComponent, isStandalone: true, selector: "cw-export-button", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, errorKey: { classPropertyName: "errorKey", publicName: "errorKey", isSignal: true, isRequired: false, transformFunction: null }, successKey: { classPropertyName: "successKey", publicName: "successKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cw-export-button" }, ngImport: i0, template: "@if (isMenu()) {\n <cw-button [type]=\"buttonType.secondary\" [label]=\"label()\" [isDropdown]=\"true\" [isDisabled]=\"allDisabled()\"\n [isLoading]=\"running()\" [loadingAnnounce]=\"false\">\n <!-- Motif documente de basic-ui : `<button cwDropdownItem>` en direct, et non un\n `cw-button` imbrique. La directive pose la classe `dropdown-item` sur la CIBLE du\n clic, seule condition pour que `cw-button` referme son menu apres la selection. -->\n <ul>\n @for (option of options(); track $index) {\n <li>\n <button type=\"button\" class=\"btn btn-ghost\" cwDropdownItem [disabled]=\"option.disabled\" (click)=\"run(option)\">\n {{ option.label | translate }}\n </button>\n </li>\n }\n </ul>\n </cw-button>\n} @else {\n <!-- Option unique : c'est le libelle de L'OPTION qui nomme le bouton, pas `label()`.\n L'inverse rendait `ExportOption.label` obligatoire mais mort dans ce mode \u2014 l'hote\n ecrivait un libelle qui n'apparaissait nulle part. `label()` reste le libelle du\n declencheur de MENU, ou les options sont nommees une a une. -->\n <cw-button [type]=\"buttonType.secondary\" [label]=\"options()[0].label\" [isDisabled]=\"!!options()[0].disabled\"\n [isLoading]=\"running()\" [loadingAnnounce]=\"false\" (btnAction)=\"run(options()[0])\">\n </cw-button>\n}\n\n<!-- Region live PERMANENTE : seul son contenu change. La creer et la detruire avec le\n message ferait manquer l'annonce aux technologies d'assistance, qui doivent avoir\n observe la region AVANT sa mise a jour. -->\n<span class=\"visually-hidden\" role=\"status\">\n @if (liveMessage(); as message) {\n {{ message.key | translate: message.params }}\n }\n</span>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "directive", type: DropdownItemDirective, selector: "[cwDropdownItem]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1283
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ExportButtonComponent, isStandalone: true, selector: "cw-export-button", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, errorKey: { classPropertyName: "errorKey", publicName: "errorKey", isSignal: true, isRequired: false, transformFunction: null }, successKey: { classPropertyName: "successKey", publicName: "successKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cw-export-button" }, ngImport: i0, template: "@if (isMenu()) {\n <cw-button [type]=\"buttonType.secondary\" [label]=\"label()\" [isDropdown]=\"true\" [isDisabled]=\"allDisabled()\"\n [isLoading]=\"running()\" [loadingAnnounce]=\"false\">\n <!-- Motif documente de basic-ui : `<button cwDropdownItem>` en direct, et non un\n `cw-button` imbrique. La directive pose la classe `dropdown-item` sur la CIBLE du\n clic, seule condition pour que `cw-button` referme son menu apres la selection. -->\n <ul>\n @for (option of options(); track $index) {\n <li>\n <button type=\"button\" class=\"btn btn-ghost\" cwDropdownItem [disabled]=\"option.disabled\" (click)=\"run(option)\">\n {{ option.label | translate }}\n </button>\n </li>\n }\n </ul>\n </cw-button>\n} @else {\n <!-- Option unique : c'est le libelle de L'OPTION qui nomme le bouton, pas `label()`.\n L'inverse rendait `ExportOption.label` obligatoire mais mort dans ce mode \u2014 l'hote\n ecrivait un libelle qui n'apparaissait nulle part. `label()` reste le libelle du\n declencheur de MENU, ou les options sont nommees une a une. -->\n <cw-button [type]=\"buttonType.secondary\" [label]=\"options()[0].label\" [isDisabled]=\"!!options()[0].disabled\"\n [isLoading]=\"running()\" [loadingAnnounce]=\"false\" (btnAction)=\"run(options()[0])\">\n </cw-button>\n}\n\n<!-- Region live PERMANENTE : seul son contenu change. La creer et la detruire avec le\n message ferait manquer l'annonce aux technologies d'assistance, qui doivent avoir\n observe la region AVANT sa mise a jour. -->\n<span class=\"visually-hidden\" role=\"status\">\n @if (liveMessage(); as message) {\n {{ message.key | translate: message.params }}\n }\n</span>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "directive", type: DropdownItemDirective, selector: "[cwDropdownItem]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1235
1284
|
}
|
|
1236
1285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ExportButtonComponent, decorators: [{
|
|
1237
1286
|
type: Component,
|
|
@@ -1875,7 +1924,7 @@ class ImportWizardComponent {
|
|
|
1875
1924
|
}));
|
|
1876
1925
|
}
|
|
1877
1926
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ImportWizardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1878
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ImportWizardComponent, isStandalone: true, selector: "cw-import-wizard", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { completed: "completed" }, host: { classAttribute: "cw-import-wizard" }, viewQueries: [{ propertyName: "panels", predicate: ["stepPanel"], descendants: true, read: CardComponent, isSignal: true }, { propertyName: "selectionTarget", first: true, predicate: ["selectionTarget"], descendants: true, isSignal: true }, { propertyName: "analysisStatus", first: true, predicate: ["analysisStatus"], descendants: true, isSignal: true }, { propertyName: "analysisOutcome", first: true, predicate: ["analysisOutcome"], descendants: true, isSignal: true }, { propertyName: "executionStatus", first: true, predicate: ["executionStatus"], descendants: true, isSignal: true }, { propertyName: "cancellingStatus", first: true, predicate: ["cancellingStatus"], descendants: true, isSignal: true }, { propertyName: "reportOutcome", first: true, predicate: ["reportOutcome"], descendants: true, isSignal: true }, { propertyName: "interruptedOutcome", first: true, predicate: ["interruptedOutcome"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Pastille d'etape : icone ronde verte (terminee) / rouge (echec), sinon le numero.\n Rendue dans [header-start] pour etre AVANT le titre, comme sur les maquettes.\n Le numero seul n'etant pas parlant a l'oreille, le statut est double en visually-hidden --\n et c'est LUI qui distingue \u00AB en cours \u00BB de \u00AB a venir \u00BB pour qui ne voit pas la couleur. -->\n<ng-template #badge let-stepKey=\"stepKey\" let-number=\"number\">\n @if (stateOf(stepKey) === stepState.done) {\n <cw-icon [icon]=\"spriteIcon.check\" [type]=\"iconType.circular\" [iconSize]=\"iconSize['sm']\"\n [iconUiType]=\"iconUiType.success\" [label]=\"stepStatusLabel(stepKey) | translate\"></cw-icon>\n }\n @else if (stateOf(stepKey) === stepState.error) {\n <cw-icon [icon]=\"spriteIcon.close\" [type]=\"iconType.circular\" [iconSize]=\"iconSize['sm']\"\n [iconUiType]=\"iconUiType.danger\" [label]=\"stepStatusLabel(stepKey) | translate\"></cw-icon>\n }\n @else {\n <div class=\"icon-circular icon-circular-sm\" [class]=\"'icon-circular-' + badgeVariant(stepKey)\">\n <span aria-hidden=\"true\">{{ number }}</span>\n <span class=\"visually-hidden\">{{ stepStatusLabel(stepKey) | translate }}</span>\n </div>\n }\n</ng-template>\n\n<ng-template #counts let-rows=\"rows\">\n <ul class=\"list-unstyled d-flex-h gap-md\">\n @for (row of rows; track row.key) {\n <li>\n <span class=\"fs-lg fw-bold\" [class]=\"'text-' + row.tone\">{{ row.count }}</span> {{ row.key | translate: row.params }}\n </li>\n }\n </ul>\n</ng-template>\n\n<cw-accordion [closeOthers]=\"true\" [destroyOnHide]=\"false\">\n\n <!-- Etape 1 : fichier + type d'import -->\n <cw-card\n #stepPanel\n [title]=\"'_COMMON._IMPORT._STEP.SELECT'\"\n [collapseId]=\"'import-step-select'\"\n [collapsed]=\"!isPanelOpen(step.select)\"\n [collapseLocked]=\"stateOf(step.select) === stepState.done\"\n [disabled]=\"stateOf(step.select) === stepState.todo\"\n [collapseStretched]=\"false\">\n\n <ng-container ngProjectAs=\"[header-start]\">\n <ng-container *ngTemplateOutlet=\"badge; context: { stepKey: step.select, number: 1 }\"></ng-container>\n </ng-container>\n\n <div class=\"d-flex-v gap-md\">\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <!-- Retour depuis une analyse non conforme : cible de focus. Le bouton qui declenche\n ce retour disparait avec le repli du panneau 2, le focus retomberait sur <body>. -->\n @if (selectionReopened()) {\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #selectionTarget>\n {{ '_COMMON._IMPORT._A11Y.SELECTION' | translate }}\n </h3>\n }\n\n <cw-file-drop\n [formControl]=\"file\"\n [accept]=\"config().accept\"\n [acceptLabel]=\"config().acceptLabel\"\n [maxSizeMb]=\"maxSizeMb()\"\n [label]=\"'_COMMON._IMPORT.FILE_TO_IMPORT' | translate\">\n </cw-file-drop>\n </div>\n\n @if (config().templateFile) {\n <div class=\"col-lg-6\">\n <cw-card [type]=\"cardType.light\">\n <strong>{{ '_COMMON._IMPORT._TEMPLATE.TITLE' | translate }}</strong>\n <span>{{ '_COMMON._IMPORT._TEMPLATE.TEXT' | translate }}</span>\n <cw-file-to-download [attachments]=\"templateAttachments()\"></cw-file-to-download>\n </cw-card>\n </div>\n }\n </div>\n\n <!-- Mode IMPOSE : aucun champ, et pas davantage de ligne \u00AB Type d'import : ... \u00BB \u2014 la\n maquette ne rend que l'alerte de portee ci-dessous, qui informe deja du mode retenu.\n Le champ cle de rapprochement y est replie (voir l'alerte).\n Choix LIBRE : groupe radio, dont la selection est REQUISE (pas de preselection). -->\n @if (!isModeImposed()) {\n <cw-form-field\n [type]=\"fieldType.radio\"\n [control]=\"mode\"\n [name]=\"'importMode'\"\n [label]=\"'_COMMON._IMPORT._MODE.LABEL'\"\n [options]=\"modeOptions()\"\n [isRequired]=\"true\"\n [help]=\"selectedKeyFieldHint()\">\n </cw-form-field>\n }\n\n <!-- Portee du mode retenu (destructif ou non) : exigence SFD \u00AB l'utilisateur est\n informe du type d'import selectionne ou impose \u00BB. Rien tant qu'aucun mode n'est\n retenu : l'alerte ne decrit jamais un mode que l'utilisateur n'a pas choisi. -->\n @if (modeNotice(); as notice) {\n <cw-alert [type]=\"modeNoticeType()\">\n {{ notice.lead | translate }}\n @if (notice.items.length) {\n <ul class=\"mb-none\">\n @for (item of notice.items; track $index) {\n <li>{{ item | translate }}</li>\n }\n </ul>\n }\n <!-- Mode impose : l'alerte est le SEUL endroit qui reste pour dire sur quoi porte\n le rapprochement. En choix libre, c'est l'aide du groupe radio qui le porte. -->\n @if (isModeImposed() && selectedKeyFieldHint(); as keyFieldHint) {\n <p class=\"mb-none\">{{ keyFieldHint | translate }}</p>\n }\n </cw-alert>\n }\n\n <!-- Un bouton desactive muet est un cul-de-sac : ce texte dit ce qui manque, et il est\n place AVANT le bouton, seul chemin possible puisqu'un bouton desactive n'est pas\n focusable (donc pas d'aria-describedby exploitable). Pas de classe de couleur\n atenuee : c'est une information necessaire, elle garde le contraste du corps. -->\n <div class=\"d-flex-h justify-end gap-md\">\n @if (missingRequirementKey(); as missing) {\n <p class=\"mb-none fs-xs\">{{ missing | translate }}</p>\n }\n\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"'_COMMON._IMPORT.CONTINUE'\"\n [dataTest]=\"'btn-import-continue'\"\n [isDisabled]=\"!canContinue()\"\n (btnAction)=\"continueToAnalysis()\">\n </cw-button>\n </div>\n </div>\n </cw-card>\n\n <!-- Etape 2 : analyse a blanc -->\n <cw-card\n #stepPanel\n [title]=\"'_COMMON._IMPORT._STEP.ANALYSIS'\"\n [collapseId]=\"'import-step-analysis'\"\n [collapsed]=\"!isPanelOpen(step.analysis)\"\n [collapseLocked]=\"stateOf(step.analysis) === stepState.done\"\n [disabled]=\"stateOf(step.analysis) === stepState.todo\"\n [collapseStretched]=\"false\">\n\n <ng-container ngProjectAs=\"[header-start]\">\n <ng-container *ngTemplateOutlet=\"badge; context: { stepKey: step.analysis, number: 2 }\"></ng-container>\n </ng-container>\n\n <div class=\"d-flex-v gap-md\">\n @if (analyzing()) {\n <!-- Cible de focus : ce texte EST le message d'etat, il est donc lu une fois et une\n seule (aucune region live en doublon). -->\n <span tabindex=\"-1\" #analysisStatus>{{ '_COMMON._IMPORT.ANALYSIS_IN_PROGRESS' | translate }}</span>\n }\n @else if (analysis(); as result) {\n <!-- Cible de focus a l'arrivee du resultat : libelle de section, pas une reprise du\n message, pour que la lecture enchaine sur l'alerte puis les compteurs. -->\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #analysisOutcome>\n {{ '_COMMON._IMPORT._A11Y.ANALYSIS_RESULT' | translate }}\n </h3>\n\n @if (result.valid) {\n <cw-alert [type]=\"alertType.success\">\n {{ '_COMMON._IMPORT.ANALYSIS_OK' | translate }}\n </cw-alert>\n\n <!-- scope=list : previsualisation chiffree. scope=singleConfig : le message ci-dessus suffit. -->\n @if (isList() && previewRows().length) {\n <ng-container *ngTemplateOutlet=\"counts; context: { rows: previewRows() }\"></ng-container>\n }\n\n <div class=\"list-unstyled d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"'_COMMON._IMPORT.START'\"\n [dataTest]=\"'btn-import-start'\"\n (btnAction)=\"startImport()\">\n </cw-button>\n </div>\n }\n @else {\n <cw-alert [type]=\"alertType.danger\">\n {{ '_COMMON._IMPORT.ANALYSIS_KO' | translate }}\n </cw-alert>\n\n @if (errorCountRow(); as errorCount) {\n <p class=\"mb-none\">\n <span class=\"fs-lg fw-bold\" [class]=\"'text-' + errorCount.tone\">{{ errorCount.count }}</span>\n {{ errorCount.key | translate }}\n </p>\n\n <!-- Une alerte par anomalie, et non une liste a puces : c'est le rendu de la\n maquette, et chaque message reste lisible isolement. -->\n @for (issue of errors(); track $index) {\n <cw-alert [type]=\"alertType.danger\">\n @if (issue.line !== undefined) {\n <strong>{{ '_COMMON._IMPORT.ERROR_LINE' | translate: { line: issue.line } }}</strong>\n }\n {{ issue.messageKey ? (issue.messageKey | translate: issue.messageParams) : issue.message }}\n </cw-alert>\n }\n }\n\n <div class=\"d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._IMPORT.BACK_TO_SELECTION'\"\n [dataTest]=\"'btn-import-back'\"\n (btnAction)=\"backToSelection()\">\n </cw-button>\n </div>\n }\n }\n </div>\n </cw-card>\n\n <!-- Etape 3 : import -->\n <cw-card\n #stepPanel\n [title]=\"'_COMMON._IMPORT._STEP.EXECUTION'\"\n [collapseId]=\"'import-step-execution'\"\n [collapsed]=\"!isPanelOpen(step.execution)\"\n [disabled]=\"stateOf(step.execution) === stepState.todo\"\n [collapseStretched]=\"false\">\n\n <ng-container ngProjectAs=\"[header-start]\">\n <ng-container *ngTemplateOutlet=\"badge; context: { stepKey: step.execution, number: 3 }\"></ng-container>\n </ng-container>\n\n <div class=\"d-flex-v gap-md\">\n @if (isImporting) {\n <div class=\"d-flex-v gap-2xs\">\n <!-- Cible de focus. Le bouton \u00AB Arreter l'import \u00BB est le focusable suivant. -->\n <span tabindex=\"-1\" #executionStatus>{{ '_COMMON._IMPORT.IN_PROGRESS' | translate }}</span>\n @if (progress()?.remainingLabel; as remaining) {\n <span>{{ '_COMMON._IMPORT.REMAINING' | translate: { value: remaining } }}</span>\n }\n </div>\n\n <!-- Avancement connu => barre deterministe. Aucune progression recue => spinner\n indetermine, plutot qu'une barre figee a 0 %. La bascule se fait a la premiere\n emission `ImportProgress` : une source qui n'en emet jamais reste sur le spinner.\n `displayText` a false : le libelle \u00AB Import en cours \u00BB est deja au-dessus. -->\n @if (progress(); as current) {\n <cw-progress-bar\n [value]=\"current.percent\"\n [type]=\"progressType.information\"\n [label]=\"'_COMMON._IMPORT.IN_PROGRESS' | translate\">\n </cw-progress-bar>\n }\n @else {\n <cw-loader [size]=\"loaderSize.sm\" [displayText]=\"false\"></cw-loader>\n }\n\n <!-- Pas de bouton d'arret quand l'objet declare l'import non interruptible : un\n bouton qui ne peut rien arreter serait pire que son absence. -->\n @if (canInterrupt()) {\n <div class=\"d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.dangerOutline\"\n [label]=\"'_COMMON._IMPORT.STOP'\"\n [dataTest]=\"'btn-import-stop'\"\n (btnAction)=\"stopImport()\">\n </cw-button>\n </div>\n }\n }\n @else if (cancelling()) {\n <!-- Annulation demandee au serveur, reponse en attente. Cible de focus. -->\n <span tabindex=\"-1\" #cancellingStatus>{{ '_COMMON._IMPORT.CANCELLING' | translate }}</span>\n\n <cw-loader [size]=\"loaderSize.sm\" [displayText]=\"false\"></cw-loader>\n\n <!-- Sortie de secours : aucun delai n'etant defendable depuis la lib, c'est\n l'utilisateur qui decide d'arreter d'attendre. Conclut en \u00AB etat incertain \u00BB. -->\n <div class=\"d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._IMPORT.STOP_WAITING'\"\n [dataTest]=\"'btn-import-stop-waiting'\"\n (btnAction)=\"stopWaiting()\">\n </cw-button>\n </div>\n }\n @else if (interruptionMessageKey(); as interruptionMessage) {\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #interruptedOutcome>\n {{ '_COMMON._IMPORT._A11Y.IMPORT_RESULT' | translate }}\n </h3>\n\n <cw-alert [type]=\"interruptionAlertType()\">\n {{ interruptionMessage | translate }}\n </cw-alert>\n }\n @else if (report(); as result) {\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #reportOutcome>\n {{ '_COMMON._IMPORT._A11Y.IMPORT_RESULT' | translate }}\n </h3>\n\n @if (result.success) {\n <cw-alert [type]=\"alertType.success\">\n {{ '_COMMON._IMPORT.SUCCESS' | translate }}\n </cw-alert>\n\n @if (isList() && reportRows().length) {\n <ng-container *ngTemplateOutlet=\"counts; context: { rows: reportRows() }\"></ng-container>\n }\n }\n @else {\n <!-- Le message generique ne promet l'absence d'ecriture que si l'atomicite est\n declaree (cf. `failureMessageKey`). -->\n <cw-alert [type]=\"alertType.danger\">\n {{ result.errorMessage ?? (failureMessageKey() | translate) }}\n </cw-alert>\n }\n }\n </div>\n </cw-card>\n\n</cw-accordion>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: AccordionComponent, selector: "cw-accordion", inputs: ["closeOthers", "allowMultiple", "destroyOnHide"], outputs: ["panelOpened", "panelClosed"] }, { kind: "component", type: AlertComponent, selector: "cw-alert", inputs: ["type", "title", "isDismissible", "cssClass", "dataTest"], outputs: ["close"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: CardComponent, selector: "cw-card", inputs: ["title", "subtitle", "truncateSubtitle", "type", "titleRank", "cssClass", "collapsible", "collapsed", "disabled", "collapseLocked", "collapseStretched", "collapseId", "destroyOnHide", "fullHeight"], outputs: ["collapsibleChange", "destroyOnHideChange", "collapseClicked"] }, { kind: "component", type: FileDropComponent, selector: "cw-file-drop", inputs: ["mode", "multiple", "maxFiles", "accept", "acceptLabel", "maxSizeMb", "recommendedDimensions", "label", "isDisabled", "errorMessage", "dataTest"], outputs: ["filesChange", "rejected", "retry"] }, { kind: "component", type: FileToDownloadComponent, selector: "cw-file-to-download", inputs: ["attachments"] }, { kind: "component", type: FormFieldComponent, selector: "cw-form-field", inputs: ["control", "formGroup", "type", "label", "displayLabel", "name", "placeholder", "autocomplete", "options", "rangeOptions", "validationOptions", "autocompleteOptions", "richTextOptions", "errorMessages", "isRequired", "help", "tooltip", "addonLeft", "addonRight", "isInAddon", "isReadonly", "isDisabled", "sliderValue", "sliderOptions", "cssClass", "skeletonMode", "clearable", "appendTo", "initialCountry", "recommendedDimensions", "showPreview", "existingFile", "indeterminate"], outputs: ["refreshEvent", "fileRemoved", "textChanged", "valueChange", "phoneRegionChange"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: ProgressBarComponent, selector: "cw-progress-bar", inputs: ["value", "max", "size", "type", "showValue", "label", "dataTest"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1927
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ImportWizardComponent, isStandalone: true, selector: "cw-import-wizard", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { completed: "completed" }, host: { classAttribute: "cw-import-wizard" }, viewQueries: [{ propertyName: "panels", predicate: ["stepPanel"], descendants: true, read: CardComponent, isSignal: true }, { propertyName: "selectionTarget", first: true, predicate: ["selectionTarget"], descendants: true, isSignal: true }, { propertyName: "analysisStatus", first: true, predicate: ["analysisStatus"], descendants: true, isSignal: true }, { propertyName: "analysisOutcome", first: true, predicate: ["analysisOutcome"], descendants: true, isSignal: true }, { propertyName: "executionStatus", first: true, predicate: ["executionStatus"], descendants: true, isSignal: true }, { propertyName: "cancellingStatus", first: true, predicate: ["cancellingStatus"], descendants: true, isSignal: true }, { propertyName: "reportOutcome", first: true, predicate: ["reportOutcome"], descendants: true, isSignal: true }, { propertyName: "interruptedOutcome", first: true, predicate: ["interruptedOutcome"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Pastille d'etape : icone ronde verte (terminee) / rouge (echec), sinon le numero.\n Rendue dans [header-start] pour etre AVANT le titre, comme sur les maquettes.\n Le numero seul n'etant pas parlant a l'oreille, le statut est double en visually-hidden --\n et c'est LUI qui distingue \u00AB en cours \u00BB de \u00AB a venir \u00BB pour qui ne voit pas la couleur. -->\n<ng-template #badge let-stepKey=\"stepKey\" let-number=\"number\">\n @if (stateOf(stepKey) === stepState.done) {\n <cw-icon [icon]=\"spriteIcon.check\" [type]=\"iconType.circular\" [iconSize]=\"iconSize['sm']\"\n [iconUiType]=\"iconUiType.success\" [label]=\"stepStatusLabel(stepKey) | translate\"></cw-icon>\n }\n @else if (stateOf(stepKey) === stepState.error) {\n <cw-icon [icon]=\"spriteIcon.close\" [type]=\"iconType.circular\" [iconSize]=\"iconSize['sm']\"\n [iconUiType]=\"iconUiType.danger\" [label]=\"stepStatusLabel(stepKey) | translate\"></cw-icon>\n }\n @else {\n <div class=\"icon-circular icon-circular-sm\" [class]=\"'icon-circular-' + badgeVariant(stepKey)\">\n <span aria-hidden=\"true\">{{ number }}</span>\n <span class=\"visually-hidden\">{{ stepStatusLabel(stepKey) | translate }}</span>\n </div>\n }\n</ng-template>\n\n<ng-template #counts let-rows=\"rows\">\n <ul class=\"list-unstyled d-flex-h gap-md\">\n @for (row of rows; track row.key) {\n <li>\n <span class=\"fs-lg fw-bold\" [class]=\"'text-' + row.tone\">{{ row.count }}</span> {{ row.key | translate: row.params }}\n </li>\n }\n </ul>\n</ng-template>\n\n<cw-accordion [closeOthers]=\"true\" [destroyOnHide]=\"false\">\n\n <!-- Etape 1 : fichier + type d'import -->\n <cw-card\n #stepPanel\n [title]=\"'_COMMON._IMPORT._STEP.SELECT'\"\n [collapseId]=\"'import-step-select'\"\n [collapsed]=\"!isPanelOpen(step.select)\"\n [collapseLocked]=\"stateOf(step.select) === stepState.done\"\n [disabled]=\"stateOf(step.select) === stepState.todo\"\n [collapseStretched]=\"false\">\n\n <ng-container ngProjectAs=\"[header-start]\">\n <ng-container *ngTemplateOutlet=\"badge; context: { stepKey: step.select, number: 1 }\"></ng-container>\n </ng-container>\n\n <div class=\"d-flex-v gap-md\">\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <!-- Retour depuis une analyse non conforme : cible de focus. Le bouton qui declenche\n ce retour disparait avec le repli du panneau 2, le focus retomberait sur <body>. -->\n @if (selectionReopened()) {\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #selectionTarget>\n {{ '_COMMON._IMPORT._A11Y.SELECTION' | translate }}\n </h3>\n }\n\n <cw-file-drop\n [formControl]=\"file\"\n [accept]=\"config().accept\"\n [acceptLabel]=\"config().acceptLabel\"\n [maxSizeMb]=\"maxSizeMb()\"\n [label]=\"'_COMMON._IMPORT.FILE_TO_IMPORT' | translate\">\n </cw-file-drop>\n </div>\n\n @if (config().templateFile) {\n <div class=\"col-lg-6\">\n <cw-card [type]=\"cardType.light\">\n <strong>{{ '_COMMON._IMPORT._TEMPLATE.TITLE' | translate }}</strong>\n <span>{{ '_COMMON._IMPORT._TEMPLATE.TEXT' | translate }}</span>\n <cw-file-to-download [attachments]=\"templateAttachments()\"></cw-file-to-download>\n </cw-card>\n </div>\n }\n </div>\n\n <!-- Mode IMPOSE : aucun champ, et pas davantage de ligne \u00AB Type d'import : ... \u00BB \u2014 la\n maquette ne rend que l'alerte de portee ci-dessous, qui informe deja du mode retenu.\n Le champ cle de rapprochement y est replie (voir l'alerte).\n Choix LIBRE : groupe radio, dont la selection est REQUISE (pas de preselection). -->\n @if (!isModeImposed()) {\n <cw-form-field\n [type]=\"fieldType.radio\"\n [control]=\"mode\"\n [name]=\"'importMode'\"\n [label]=\"'_COMMON._IMPORT._MODE.LABEL'\"\n [options]=\"modeOptions()\"\n [isRequired]=\"true\"\n [help]=\"selectedKeyFieldHint()\">\n </cw-form-field>\n }\n\n <!-- Portee du mode retenu (destructif ou non) : exigence SFD \u00AB l'utilisateur est\n informe du type d'import selectionne ou impose \u00BB. Rien tant qu'aucun mode n'est\n retenu : l'alerte ne decrit jamais un mode que l'utilisateur n'a pas choisi. -->\n @if (modeNotice(); as notice) {\n <cw-alert [type]=\"modeNoticeType()\">\n {{ notice.lead | translate }}\n @if (notice.items.length) {\n <ul class=\"mb-none\">\n @for (item of notice.items; track $index) {\n <li>{{ item | translate }}</li>\n }\n </ul>\n }\n <!-- Mode impose : l'alerte est le SEUL endroit qui reste pour dire sur quoi porte\n le rapprochement. En choix libre, c'est l'aide du groupe radio qui le porte. -->\n @if (isModeImposed() && selectedKeyFieldHint(); as keyFieldHint) {\n <p class=\"mb-none\">{{ keyFieldHint | translate }}</p>\n }\n </cw-alert>\n }\n\n <!-- Un bouton desactive muet est un cul-de-sac : ce texte dit ce qui manque, et il est\n place AVANT le bouton, seul chemin possible puisqu'un bouton desactive n'est pas\n focusable (donc pas d'aria-describedby exploitable). Pas de classe de couleur\n atenuee : c'est une information necessaire, elle garde le contraste du corps. -->\n <div class=\"d-flex-h justify-end gap-md\">\n @if (missingRequirementKey(); as missing) {\n <p class=\"mb-none fs-xs\">{{ missing | translate }}</p>\n }\n\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"'_COMMON._IMPORT.CONTINUE'\"\n [dataTest]=\"'btn-import-continue'\"\n [isDisabled]=\"!canContinue()\"\n (btnAction)=\"continueToAnalysis()\">\n </cw-button>\n </div>\n </div>\n </cw-card>\n\n <!-- Etape 2 : analyse a blanc -->\n <cw-card\n #stepPanel\n [title]=\"'_COMMON._IMPORT._STEP.ANALYSIS'\"\n [collapseId]=\"'import-step-analysis'\"\n [collapsed]=\"!isPanelOpen(step.analysis)\"\n [collapseLocked]=\"stateOf(step.analysis) === stepState.done\"\n [disabled]=\"stateOf(step.analysis) === stepState.todo\"\n [collapseStretched]=\"false\">\n\n <ng-container ngProjectAs=\"[header-start]\">\n <ng-container *ngTemplateOutlet=\"badge; context: { stepKey: step.analysis, number: 2 }\"></ng-container>\n </ng-container>\n\n <div class=\"d-flex-v gap-md\">\n @if (analyzing()) {\n <!-- Cible de focus : ce texte EST le message d'etat, il est donc lu une fois et une\n seule (aucune region live en doublon). -->\n <span tabindex=\"-1\" #analysisStatus>{{ '_COMMON._IMPORT.ANALYSIS_IN_PROGRESS' | translate }}</span>\n }\n @else if (analysis(); as result) {\n <!-- Cible de focus a l'arrivee du resultat : libelle de section, pas une reprise du\n message, pour que la lecture enchaine sur l'alerte puis les compteurs. -->\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #analysisOutcome>\n {{ '_COMMON._IMPORT._A11Y.ANALYSIS_RESULT' | translate }}\n </h3>\n\n @if (result.valid) {\n <cw-alert [type]=\"alertType.success\">\n {{ '_COMMON._IMPORT.ANALYSIS_OK' | translate }}\n </cw-alert>\n\n <!-- scope=list : previsualisation chiffree. scope=singleConfig : le message ci-dessus suffit. -->\n @if (isList() && previewRows().length) {\n <ng-container *ngTemplateOutlet=\"counts; context: { rows: previewRows() }\"></ng-container>\n }\n\n <div class=\"list-unstyled d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"'_COMMON._IMPORT.START'\"\n [dataTest]=\"'btn-import-start'\"\n (btnAction)=\"startImport()\">\n </cw-button>\n </div>\n }\n @else {\n <cw-alert [type]=\"alertType.danger\">\n {{ '_COMMON._IMPORT.ANALYSIS_KO' | translate }}\n </cw-alert>\n\n @if (errorCountRow(); as errorCount) {\n <p class=\"mb-none\">\n <span class=\"fs-lg fw-bold\" [class]=\"'text-' + errorCount.tone\">{{ errorCount.count }}</span>\n {{ errorCount.key | translate }}\n </p>\n\n <!-- Une alerte par anomalie, et non une liste a puces : c'est le rendu de la\n maquette, et chaque message reste lisible isolement. -->\n @for (issue of errors(); track $index) {\n <cw-alert [type]=\"alertType.danger\">\n @if (issue.line !== undefined) {\n <strong>{{ '_COMMON._IMPORT.ERROR_LINE' | translate: { line: issue.line } }}</strong>\n }\n {{ issue.messageKey ? (issue.messageKey | translate: issue.messageParams) : issue.message }}\n </cw-alert>\n }\n }\n\n <div class=\"d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._IMPORT.BACK_TO_SELECTION'\"\n [dataTest]=\"'btn-import-back'\"\n (btnAction)=\"backToSelection()\">\n </cw-button>\n </div>\n }\n }\n </div>\n </cw-card>\n\n <!-- Etape 3 : import -->\n <cw-card\n #stepPanel\n [title]=\"'_COMMON._IMPORT._STEP.EXECUTION'\"\n [collapseId]=\"'import-step-execution'\"\n [collapsed]=\"!isPanelOpen(step.execution)\"\n [disabled]=\"stateOf(step.execution) === stepState.todo\"\n [collapseStretched]=\"false\">\n\n <ng-container ngProjectAs=\"[header-start]\">\n <ng-container *ngTemplateOutlet=\"badge; context: { stepKey: step.execution, number: 3 }\"></ng-container>\n </ng-container>\n\n <div class=\"d-flex-v gap-md\">\n @if (isImporting) {\n <div class=\"d-flex-v gap-2xs\">\n <!-- Cible de focus. Le bouton \u00AB Arreter l'import \u00BB est le focusable suivant. -->\n <span tabindex=\"-1\" #executionStatus>{{ '_COMMON._IMPORT.IN_PROGRESS' | translate }}</span>\n @if (progress()?.remainingLabel; as remaining) {\n <span>{{ '_COMMON._IMPORT.REMAINING' | translate: { value: remaining } }}</span>\n }\n </div>\n\n <!-- Avancement connu => barre deterministe. Aucune progression recue => spinner\n indetermine, plutot qu'une barre figee a 0 %. La bascule se fait a la premiere\n emission `ImportProgress` : une source qui n'en emet jamais reste sur le spinner.\n `displayText` a false : le libelle \u00AB Import en cours \u00BB est deja au-dessus. -->\n @if (progress(); as current) {\n <cw-progress-bar\n [value]=\"current.percent\"\n [type]=\"progressType.information\"\n [label]=\"'_COMMON._IMPORT.IN_PROGRESS' | translate\">\n </cw-progress-bar>\n }\n @else {\n <cw-loader [size]=\"loaderSize.sm\" [displayText]=\"false\"></cw-loader>\n }\n\n <!-- Pas de bouton d'arret quand l'objet declare l'import non interruptible : un\n bouton qui ne peut rien arreter serait pire que son absence. -->\n @if (canInterrupt()) {\n <div class=\"d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.dangerOutline\"\n [label]=\"'_COMMON._IMPORT.STOP'\"\n [dataTest]=\"'btn-import-stop'\"\n (btnAction)=\"stopImport()\">\n </cw-button>\n </div>\n }\n }\n @else if (cancelling()) {\n <!-- Annulation demandee au serveur, reponse en attente. Cible de focus. -->\n <span tabindex=\"-1\" #cancellingStatus>{{ '_COMMON._IMPORT.CANCELLING' | translate }}</span>\n\n <cw-loader [size]=\"loaderSize.sm\" [displayText]=\"false\"></cw-loader>\n\n <!-- Sortie de secours : aucun delai n'etant defendable depuis la lib, c'est\n l'utilisateur qui decide d'arreter d'attendre. Conclut en \u00AB etat incertain \u00BB. -->\n <div class=\"d-flex-h justify-end\">\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._IMPORT.STOP_WAITING'\"\n [dataTest]=\"'btn-import-stop-waiting'\"\n (btnAction)=\"stopWaiting()\">\n </cw-button>\n </div>\n }\n @else if (interruptionMessageKey(); as interruptionMessage) {\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #interruptedOutcome>\n {{ '_COMMON._IMPORT._A11Y.IMPORT_RESULT' | translate }}\n </h3>\n\n <cw-alert [type]=\"interruptionAlertType()\">\n {{ interruptionMessage | translate }}\n </cw-alert>\n }\n @else if (report(); as result) {\n <h3 class=\"visually-hidden\" tabindex=\"-1\" #reportOutcome>\n {{ '_COMMON._IMPORT._A11Y.IMPORT_RESULT' | translate }}\n </h3>\n\n @if (result.success) {\n <cw-alert [type]=\"alertType.success\">\n {{ '_COMMON._IMPORT.SUCCESS' | translate }}\n </cw-alert>\n\n @if (isList() && reportRows().length) {\n <ng-container *ngTemplateOutlet=\"counts; context: { rows: reportRows() }\"></ng-container>\n }\n }\n @else {\n <!-- Le message generique ne promet l'absence d'ecriture que si l'atomicite est\n declaree (cf. `failureMessageKey`). -->\n <cw-alert [type]=\"alertType.danger\">\n {{ result.errorMessage ?? (failureMessageKey() | translate) }}\n </cw-alert>\n }\n }\n </div>\n </cw-card>\n\n</cw-accordion>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: AccordionComponent, selector: "cw-accordion", inputs: ["closeOthers", "allowMultiple", "destroyOnHide"], outputs: ["panelOpened", "panelClosed"] }, { kind: "component", type: AlertComponent, selector: "cw-alert", inputs: ["type", "title", "isDismissible", "cssClass", "dataTest"], outputs: ["close"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: CardComponent, selector: "cw-card", inputs: ["title", "subtitle", "truncateSubtitle", "type", "titleRank", "cssClass", "collapsible", "collapsed", "disabled", "collapseLocked", "collapseStretched", "collapseId", "destroyOnHide", "fullHeight"], outputs: ["collapsibleChange", "destroyOnHideChange", "collapseClicked"] }, { kind: "component", type: FileDropComponent, selector: "cw-file-drop", inputs: ["mode", "multiple", "maxFiles", "accept", "acceptLabel", "maxSizeMb", "recommendedDimensions", "label", "isDisabled", "errorMessage", "dataTest"], outputs: ["filesChange", "rejected", "retry"] }, { kind: "component", type: FileToDownloadComponent, selector: "cw-file-to-download", inputs: ["attachments"] }, { kind: "component", type: FormFieldComponent, selector: "cw-form-field", inputs: ["control", "formGroup", "type", "label", "displayLabel", "name", "placeholder", "autocomplete", "options", "rangeOptions", "validationOptions", "autocompleteOptions", "richTextOptions", "errorMessages", "isRequired", "help", "tooltip", "addonLeft", "addonRight", "isInAddon", "isReadonly", "isDisabled", "sliderValue", "sliderOptions", "cssClass", "skeletonMode", "clearable", "appendTo", "initialCountry", "recommendedDimensions", "showPreview", "existingFile", "indeterminate"], outputs: ["refreshEvent", "fileRemoved", "textChanged", "valueChange", "phoneRegionChange"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: ProgressBarComponent, selector: "cw-progress-bar", inputs: ["value", "max", "size", "type", "showValue", "label", "dataTest"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1879
1928
|
}
|
|
1880
1929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ImportWizardComponent, decorators: [{
|
|
1881
1930
|
type: Component,
|
|
@@ -1949,7 +1998,7 @@ class ImportButtonComponent {
|
|
|
1949
1998
|
ref.result.then(emitClosed, emitClosed);
|
|
1950
1999
|
}
|
|
1951
2000
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ImportButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1952
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.20", type: ImportButtonComponent, isStandalone: true, selector: "cw-import-button", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", completed: "completed" }, host: { classAttribute: "cw-import-button" }, viewQueries: [{ propertyName: "bodyTemplate", first: true, predicate: ["bodyTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button [type]=\"buttonType.secondary\" [label]=\"label()\" [isDisabled]=\"disabled()\" (btnAction)=\"open()\">\n</cw-button>\n\n<!-- L'assistant n'est que le CORPS de la modale : titre, croix et bouton \u00AB Fermer \u00BB du\n pied viennent de `ModalsService`. Le composant ne ferme jamais la modale lui-meme. -->\n<ng-template #bodyTemplate>\n <cw-import-wizard [config]=\"config()\" (completed)=\"completed.emit($event)\"></cw-import-wizard>\n</ng-template>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: ImportWizardComponent, selector: "cw-import-wizard", inputs: ["config"], outputs: ["completed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2001
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.20", type: ImportButtonComponent, isStandalone: true, selector: "cw-import-button", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", completed: "completed" }, host: { classAttribute: "cw-import-button" }, viewQueries: [{ propertyName: "bodyTemplate", first: true, predicate: ["bodyTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button [type]=\"buttonType.secondary\" [label]=\"label()\" [isDisabled]=\"disabled()\" (btnAction)=\"open()\">\n</cw-button>\n\n<!-- L'assistant n'est que le CORPS de la modale : titre, croix et bouton \u00AB Fermer \u00BB du\n pied viennent de `ModalsService`. Le composant ne ferme jamais la modale lui-meme. -->\n<ng-template #bodyTemplate>\n <cw-import-wizard [config]=\"config()\" (completed)=\"completed.emit($event)\"></cw-import-wizard>\n</ng-template>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: ImportWizardComponent, selector: "cw-import-wizard", inputs: ["config"], outputs: ["completed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1953
2002
|
}
|
|
1954
2003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ImportButtonComponent, decorators: [{
|
|
1955
2004
|
type: Component,
|
|
@@ -1972,6 +2021,23 @@ var PageHeaderActionEnum;
|
|
|
1972
2021
|
PageHeaderActionEnum["reset"] = "reset";
|
|
1973
2022
|
})(PageHeaderActionEnum || (PageHeaderActionEnum = {}));
|
|
1974
2023
|
|
|
2024
|
+
/**
|
|
2025
|
+
* Portée courante lue par `cw-page-header`. La lib ne connait ni le routeur ni la notion
|
|
2026
|
+
* d'instance : elle affiche ce que le consommateur fournit via `provideCwPageScope`.
|
|
2027
|
+
*/
|
|
2028
|
+
const CW_PAGE_SCOPE = new InjectionToken('CW_PAGE_SCOPE', {
|
|
2029
|
+
providedIn: 'root',
|
|
2030
|
+
// Sans provider : aucun badge. La lib reste utilisable telle quelle par les autres BO.
|
|
2031
|
+
factory: () => signal(null).asReadonly(),
|
|
2032
|
+
});
|
|
2033
|
+
/**
|
|
2034
|
+
* Fournit la portée courante, une seule fois dans `app.config`. `factory` s'exécute dans un
|
|
2035
|
+
* contexte d'injection : elle peut appeler `inject()` (routeur, service d'instance).
|
|
2036
|
+
*/
|
|
2037
|
+
function provideCwPageScope(factory) {
|
|
2038
|
+
return makeEnvironmentProviders([{ provide: CW_PAGE_SCOPE, useFactory: factory }]);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
1975
2041
|
// Persistance de la visibilite des colonnes de `cw-table` (pilotee par `cw-page-header`).
|
|
1976
2042
|
// Une SEULE cle localStorage pour N tableaux : objet indexe par `storageKey`.
|
|
1977
2043
|
// On ne stocke QUE les cles des colonnes MASQUEES (eviter de surcharger le localStorage).
|
|
@@ -2024,15 +2090,21 @@ function saveHiddenColumns(storageKey, hiddenKeys) {
|
|
|
2024
2090
|
}
|
|
2025
2091
|
}
|
|
2026
2092
|
|
|
2093
|
+
/** Compteur de module pour l'id du rappel de portee (pas de `crypto.randomUUID`, cf. ESLint). */
|
|
2094
|
+
let nextReminderId = 0;
|
|
2027
2095
|
class PageHeaderComponent {
|
|
2028
2096
|
constructor() {
|
|
2029
2097
|
this.location = inject(Location);
|
|
2098
|
+
/** Portee courante fournie par l'app (`provideCwPageScope`) ; `null` sans provider. */
|
|
2099
|
+
this.pageScope = inject(CW_PAGE_SCOPE);
|
|
2030
2100
|
this.title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
2031
2101
|
this.description = input(...(ngDevMode ? [undefined, { debugName: "description" }] : []));
|
|
2032
2102
|
this.showBack = input(true, ...(ngDevMode ? [{ debugName: "showBack" }] : []));
|
|
2033
2103
|
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
2034
2104
|
this.isLoading = input({}, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
2035
2105
|
this.isDisabled = input({}, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
2106
|
+
/** Opt-out du badge de portee, pour une page qui porte elle-meme sa portee. */
|
|
2107
|
+
this.showScope = input(true, ...(ngDevMode ? [{ debugName: "showScope" }] : []));
|
|
2036
2108
|
// --- Menu « Colonnes » -------------------------------------------------
|
|
2037
2109
|
/** Colonnes du tableau associe. Fourni => le dropdown « Colonnes » apparait. */
|
|
2038
2110
|
this.columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
@@ -2045,11 +2117,18 @@ class PageHeaderComponent {
|
|
|
2045
2117
|
this.columnsChange = output();
|
|
2046
2118
|
this.buttonType = BoButtonTypeEnum;
|
|
2047
2119
|
this.iconSize = ButtonIconSizeEnum;
|
|
2120
|
+
this.iconSizeEnum = IconSizeEnum;
|
|
2048
2121
|
this.spriteIcon = SpriteIconEnum;
|
|
2049
2122
|
this.actionEnum = PageHeaderActionEnum;
|
|
2123
|
+
/** Badge de portee globale (`light-info`) ; l'instance a son badge maison. */
|
|
2124
|
+
this.badgeType = BadgeTypeEnum;
|
|
2050
2125
|
this.showReset = computed(() => this.actions().includes(PageHeaderActionEnum.reset), ...(ngDevMode ? [{ debugName: "showReset" }] : []));
|
|
2051
2126
|
this.showAdd = computed(() => this.actions().includes(PageHeaderActionEnum.add), ...(ngDevMode ? [{ debugName: "showAdd" }] : []));
|
|
2052
2127
|
this.showSave = computed(() => this.actions().includes(PageHeaderActionEnum.save), ...(ngDevMode ? [{ debugName: "showSave" }] : []));
|
|
2128
|
+
/** Rappel sous Enregistrer : portee globale ET action `save` affichee. */
|
|
2129
|
+
this.showScopeReminder = computed(() => this.showSave() && this.pageScope()?.kind === 'global', ...(ngDevMode ? [{ debugName: "showScopeReminder" }] : []));
|
|
2130
|
+
/** Id du rappel (cible d'un futur `aria-describedby` sur Enregistrer). */
|
|
2131
|
+
this.reminderId = `cw-page-header-scope-reminder-${nextReminderId++}`;
|
|
2053
2132
|
/** Colonnes masquables (hors `actions` et hors `hideable === false`). */
|
|
2054
2133
|
this.toggleableColumns = computed(() => this.columns().filter(c => c.type !== 'actions' && c.hideable !== false), ...(ngDevMode ? [{ debugName: "toggleableColumns" }] : []));
|
|
2055
2134
|
/** Le dropdown « Colonnes » n'apparait que s'il existe au moins une colonne masquable. */
|
|
@@ -2111,15 +2190,17 @@ class PageHeaderComponent {
|
|
|
2111
2190
|
return !!this.isDisabled()[action];
|
|
2112
2191
|
}
|
|
2113
2192
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2114
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: PageHeaderComponent, isStandalone: true, selector: "cw-page-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null }, columnsLabel: { classPropertyName: "columnsLabel", publicName: "columnsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action", columnsChange: "columnsChange" }, ngImport: i0, template: "<div class=\"page-header d-flex-v gap-2xs\">\n @if (showBack()) {\n <cw-button [type]=\"buttonType.ghost\" [label]=\"'_COMMON._FORM.BACK'\" [withIcon]=\"spriteIcon.left1\"\n (btnAction)=\"goBack()\" />\n }\n <div class=\"d-flex-h gap-md items-start justify-between flex-wrap\">\n <div class=\"d-flex-v\">\n <h1 class=\"page-header-title\">{{ title() | translate}}</h1>\n @if (description(); as desc) {\n <p class=\"fs-md page-header-description\" [innerHTML]=\"desc | translate\"></p>\n }\n </div>\n\n <div class=\"page-header-actions d-flex-h gap-md flex-wrap items-center\">\n
|
|
2193
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: PageHeaderComponent, isStandalone: true, selector: "cw-page-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, showScope: { classPropertyName: "showScope", publicName: "showScope", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null }, columnsLabel: { classPropertyName: "columnsLabel", publicName: "columnsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action", columnsChange: "columnsChange" }, ngImport: i0, template: "<div class=\"page-header d-flex-v gap-2xs\">\n @if (showBack()) {\n <cw-button [type]=\"buttonType.ghost\" [label]=\"'_COMMON._FORM.BACK'\" [withIcon]=\"spriteIcon.left1\"\n (btnAction)=\"goBack()\" />\n }\n <div class=\"d-flex-h gap-md items-start justify-between flex-wrap\">\n <div class=\"d-flex-v\">\n <!-- Badge de portee HORS du <h1> : le nom accessible du titre reste le titre. -->\n <div class=\"page-header-heading d-flex-h gap-sm flex-wrap items-center\">\n <h1 class=\"page-header-title\">{{ title() | translate}}</h1>\n @if (showScope() && pageScope(); as scope) {\n @if (scope.kind === 'instance') {\n <!-- Badge maison : structure `.badge` de basic-ui, couleurs et logo propres (cf. _page-header.scss). -->\n <span class=\"badge page-header-scope-instance\">\n @if (scope.imageUrl; as img) {\n <img class=\"page-header-scope-logo\" [src]=\"img\" alt=\"\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiCompany\" aria-hidden=\"true\" />\n }\n <span class=\"visually-hidden\">{{ '_COMMON._PAGE_SCOPE.INSTANCE_PREFIX' | translate }}</span>\n <span>{{ scope.label }}</span>\n </span>\n } @else {\n <cw-badge [type]=\"badgeType.lightInfo\" [label]=\"'_COMMON._PAGE_SCOPE.ALL_INSTANCES'\"\n [withIcon]=\"spriteIcon.mapWorld\" />\n }\n }\n </div>\n @if (description(); as desc) {\n <p class=\"fs-md page-header-description\" [innerHTML]=\"desc | translate\"></p>\n }\n </div>\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"page-header-actions d-flex-h gap-md flex-wrap items-center justify-end\">\n @if (showColumns()) {\n <cw-button [type]=\"buttonType.secondary\" [label]=\"columnsLabel()\" [withIcon]=\"spriteIcon.miscNews\"\n [isDropdown]=\"true\">\n <ul class=\"d-flex-v gap-2xs p-md\">\n @for (col of toggleableColumns(); track col.key) {\n <li class=\"field-check\">\n <input class=\"field-check-input\" type=\"checkbox\" [id]=\"'col-toggle-' + col.key\"\n [checked]=\"!col.hidden\" [disabled]=\"isLastVisible(col)\" (change)=\"toggleColumn(col)\">\n <label class=\"field-check-label\" [for]=\"'col-toggle-' + col.key\">{{ col.label | translate }}</label>\n </li>\n }\n </ul>\n </cw-button>\n }\n\n <!-- Slot de l'import : `<cw-import-button cwPageHeaderImport \u2026>`. Projete plutot que\n rendu, pour que `cw-page-header` ne reference pas `cw-import-wizard`. -->\n <ng-content select=\"[cwPageHeaderImport]\"></ng-content>\n\n <!-- Slot de l'export : `<cw-export-button cwPageHeaderExport \u2026>`. -->\n <ng-content select=\"[cwPageHeaderExport]\"></ng-content>\n\n <!-- Slot libre, inchange : tout ce qui n'est marque ni import ni export atterrit ici.\n C'est l'echappatoire d'un hote qui veut piloter son propre bouton. -->\n <ng-content></ng-content>\n\n @if (showReset()) {\n <cw-button [type]=\"buttonType.secondary\" [label]=\"'_COMMON._ACTION.RESET'\"\n [isDisabled]=\"disabled(actionEnum.reset)\" [isLoading]=\"loading(actionEnum.reset)\"\n (btnAction)=\"emit(actionEnum.reset)\">\n </cw-button>\n }\n\n @if (showAdd()) {\n <cw-button [type]=\"buttonType.primary\" [label]=\"'_COMMON._ACTION.ADD'\" [withIcon]=\"spriteIcon.add\"\n [isDisabled]=\"disabled(actionEnum.add)\" [isLoading]=\"loading(actionEnum.add)\"\n (btnAction)=\"emit(actionEnum.add)\">\n </cw-button>\n }\n\n @if (showSave()) {\n <cw-button [type]=\"buttonType.primary\" [label]=\"'_COMMON._ACTION.SAVE'\" [isDisabled]=\"disabled(actionEnum.save)\"\n [isLoading]=\"loading(actionEnum.save)\" (btnAction)=\"emit(actionEnum.save)\">\n </cw-button>\n }\n </div>\n <!-- Rappel sous Enregistrer, hors de la barre d'actions (ordre DOM des actions inchange).\n `cw-button` n'expose pas d'aria-describedby : le lien vers `reminderId` viendra avec. -->\n @if (showScopeReminder()) {\n <!-- Icone en currentColor : herite de `.text-info`. Decorative (le texte suit). -->\n <p class=\"text-info fs-xs d-flex-h gap-3xs items-center justify-end\" [id]=\"reminderId\">\n <cw-icon [icon]=\"spriteIcon.info\" [iconSize]=\"iconSizeEnum.xs\" aria-hidden=\"true\" />\n <span>{{ '_COMMON._PAGE_SCOPE.GLOBAL_SAVE_REMINDER' | translate }}</span>\n </p>\n }\n </div>\n </div>\n\n</div>\n", dependencies: [{ kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2115
2194
|
}
|
|
2116
2195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: PageHeaderComponent, decorators: [{
|
|
2117
2196
|
type: Component,
|
|
2118
2197
|
args: [{ selector: 'cw-page-header', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2198
|
+
BadgeComponent,
|
|
2119
2199
|
ButtonComponent,
|
|
2200
|
+
IconComponent,
|
|
2120
2201
|
TranslateModule
|
|
2121
|
-
], template: "<div class=\"page-header d-flex-v gap-2xs\">\n @if (showBack()) {\n <cw-button [type]=\"buttonType.ghost\" [label]=\"'_COMMON._FORM.BACK'\" [withIcon]=\"spriteIcon.left1\"\n (btnAction)=\"goBack()\" />\n }\n <div class=\"d-flex-h gap-md items-start justify-between flex-wrap\">\n <div class=\"d-flex-v\">\n <h1 class=\"page-header-title\">{{ title() | translate}}</h1>\n @if (description(); as desc) {\n <p class=\"fs-md page-header-description\" [innerHTML]=\"desc | translate\"></p>\n }\n </div>\n\n <div class=\"page-header-actions d-flex-h gap-md flex-wrap items-center\">\n
|
|
2122
|
-
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], showBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBack", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], columnsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsLabel", required: false }] }], action: [{ type: i0.Output, args: ["action"] }], columnsChange: [{ type: i0.Output, args: ["columnsChange"] }] } });
|
|
2202
|
+
], template: "<div class=\"page-header d-flex-v gap-2xs\">\n @if (showBack()) {\n <cw-button [type]=\"buttonType.ghost\" [label]=\"'_COMMON._FORM.BACK'\" [withIcon]=\"spriteIcon.left1\"\n (btnAction)=\"goBack()\" />\n }\n <div class=\"d-flex-h gap-md items-start justify-between flex-wrap\">\n <div class=\"d-flex-v\">\n <!-- Badge de portee HORS du <h1> : le nom accessible du titre reste le titre. -->\n <div class=\"page-header-heading d-flex-h gap-sm flex-wrap items-center\">\n <h1 class=\"page-header-title\">{{ title() | translate}}</h1>\n @if (showScope() && pageScope(); as scope) {\n @if (scope.kind === 'instance') {\n <!-- Badge maison : structure `.badge` de basic-ui, couleurs et logo propres (cf. _page-header.scss). -->\n <span class=\"badge page-header-scope-instance\">\n @if (scope.imageUrl; as img) {\n <img class=\"page-header-scope-logo\" [src]=\"img\" alt=\"\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiCompany\" aria-hidden=\"true\" />\n }\n <span class=\"visually-hidden\">{{ '_COMMON._PAGE_SCOPE.INSTANCE_PREFIX' | translate }}</span>\n <span>{{ scope.label }}</span>\n </span>\n } @else {\n <cw-badge [type]=\"badgeType.lightInfo\" [label]=\"'_COMMON._PAGE_SCOPE.ALL_INSTANCES'\"\n [withIcon]=\"spriteIcon.mapWorld\" />\n }\n }\n </div>\n @if (description(); as desc) {\n <p class=\"fs-md page-header-description\" [innerHTML]=\"desc | translate\"></p>\n }\n </div>\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"page-header-actions d-flex-h gap-md flex-wrap items-center justify-end\">\n @if (showColumns()) {\n <cw-button [type]=\"buttonType.secondary\" [label]=\"columnsLabel()\" [withIcon]=\"spriteIcon.miscNews\"\n [isDropdown]=\"true\">\n <ul class=\"d-flex-v gap-2xs p-md\">\n @for (col of toggleableColumns(); track col.key) {\n <li class=\"field-check\">\n <input class=\"field-check-input\" type=\"checkbox\" [id]=\"'col-toggle-' + col.key\"\n [checked]=\"!col.hidden\" [disabled]=\"isLastVisible(col)\" (change)=\"toggleColumn(col)\">\n <label class=\"field-check-label\" [for]=\"'col-toggle-' + col.key\">{{ col.label | translate }}</label>\n </li>\n }\n </ul>\n </cw-button>\n }\n\n <!-- Slot de l'import : `<cw-import-button cwPageHeaderImport \u2026>`. Projete plutot que\n rendu, pour que `cw-page-header` ne reference pas `cw-import-wizard`. -->\n <ng-content select=\"[cwPageHeaderImport]\"></ng-content>\n\n <!-- Slot de l'export : `<cw-export-button cwPageHeaderExport \u2026>`. -->\n <ng-content select=\"[cwPageHeaderExport]\"></ng-content>\n\n <!-- Slot libre, inchange : tout ce qui n'est marque ni import ni export atterrit ici.\n C'est l'echappatoire d'un hote qui veut piloter son propre bouton. -->\n <ng-content></ng-content>\n\n @if (showReset()) {\n <cw-button [type]=\"buttonType.secondary\" [label]=\"'_COMMON._ACTION.RESET'\"\n [isDisabled]=\"disabled(actionEnum.reset)\" [isLoading]=\"loading(actionEnum.reset)\"\n (btnAction)=\"emit(actionEnum.reset)\">\n </cw-button>\n }\n\n @if (showAdd()) {\n <cw-button [type]=\"buttonType.primary\" [label]=\"'_COMMON._ACTION.ADD'\" [withIcon]=\"spriteIcon.add\"\n [isDisabled]=\"disabled(actionEnum.add)\" [isLoading]=\"loading(actionEnum.add)\"\n (btnAction)=\"emit(actionEnum.add)\">\n </cw-button>\n }\n\n @if (showSave()) {\n <cw-button [type]=\"buttonType.primary\" [label]=\"'_COMMON._ACTION.SAVE'\" [isDisabled]=\"disabled(actionEnum.save)\"\n [isLoading]=\"loading(actionEnum.save)\" (btnAction)=\"emit(actionEnum.save)\">\n </cw-button>\n }\n </div>\n <!-- Rappel sous Enregistrer, hors de la barre d'actions (ordre DOM des actions inchange).\n `cw-button` n'expose pas d'aria-describedby : le lien vers `reminderId` viendra avec. -->\n @if (showScopeReminder()) {\n <!-- Icone en currentColor : herite de `.text-info`. Decorative (le texte suit). -->\n <p class=\"text-info fs-xs d-flex-h gap-3xs items-center justify-end\" [id]=\"reminderId\">\n <cw-icon [icon]=\"spriteIcon.info\" [iconSize]=\"iconSizeEnum.xs\" aria-hidden=\"true\" />\n <span>{{ '_COMMON._PAGE_SCOPE.GLOBAL_SAVE_REMINDER' | translate }}</span>\n </p>\n }\n </div>\n </div>\n\n</div>\n" }]
|
|
2203
|
+
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], showBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBack", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], showScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "showScope", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], columnsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsLabel", required: false }] }], action: [{ type: i0.Output, args: ["action"] }], columnsChange: [{ type: i0.Output, args: ["columnsChange"] }] } });
|
|
2123
2204
|
|
|
2124
2205
|
class WizardStepComponent {
|
|
2125
2206
|
constructor() {
|
|
@@ -2245,5 +2326,5 @@ function buildFilterParams(filters, keyMap) {
|
|
|
2245
2326
|
* Generated bundle index. Do not edit.
|
|
2246
2327
|
*/
|
|
2247
2328
|
|
|
2248
|
-
export { ArrayAdapter, CustomListComponent, DragNDropListComponent, DragNDropNestedListComponent, ExportButtonComponent, FilterBarComponent, FormArrayAdapter, IMPORT_WIZARD_STEPS, ImportButtonComponent, ImportEventKindEnum, ImportInterruptionEnum, ImportInterruptionStateEnum, ImportModeEnum, ImportScopeEnum, ImportWizardComponent, ImportWizardStepEnum, ImportWizardStepStateEnum, PageHeaderActionEnum, PageHeaderComponent, PaginationComponent, ProgressBarComponent, ProgressBarSizeEnum, ProgressBarTypeEnum, TableComponent, WizardStepComponent, WizardStepperComponent, buildFilename, buildFilterParams, downloadBlob, formatCount, i18nKey, importWizardStepRank, jsonBlob, loadHiddenColumns, pluralizedCountKey, saveHiddenColumns, todayIsoDate };
|
|
2329
|
+
export { ArrayAdapter, CW_PAGE_SCOPE, CustomListComponent, DragNDropListComponent, DragNDropNestedListComponent, ExportButtonComponent, FilterBarComponent, FormArrayAdapter, IMPORT_WIZARD_STEPS, ImportButtonComponent, ImportEventKindEnum, ImportInterruptionEnum, ImportInterruptionStateEnum, ImportModeEnum, ImportScopeEnum, ImportWizardComponent, ImportWizardStepEnum, ImportWizardStepStateEnum, PageHeaderActionEnum, PageHeaderComponent, PaginationComponent, ProgressBarComponent, ProgressBarSizeEnum, ProgressBarTypeEnum, TableComponent, WizardStepComponent, WizardStepperComponent, buildFilename, buildFilterParams, downloadBlob, formatCount, i18nKey, importWizardStepRank, jsonBlob, loadHiddenColumns, pluralizedCountKey, provideCwPageScope, saveHiddenColumns, todayIsoDate };
|
|
2249
2330
|
//# sourceMappingURL=cityway-bo-ui.mjs.map
|