@eagami/ui 5.93.0 → 5.94.0
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/fesm2022/eagami-ui.mjs +73 -37
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +14 -2
package/fesm2022/eagami-ui.mjs
CHANGED
|
@@ -609,10 +609,10 @@ const ar = {
|
|
|
609
609
|
sourceLabel: "المتاح",
|
|
610
610
|
targetLabel: "المحدد",
|
|
611
611
|
controlsLabel: "عناصر التحكم بالنقل",
|
|
612
|
-
moveSelectedToTarget: "نقل المحدد إلى
|
|
613
|
-
moveAllToTarget: "نقل الكل إلى
|
|
614
|
-
moveSelectedToSource: "نقل المحدد إلى
|
|
615
|
-
moveAllToSource: "نقل الكل إلى
|
|
612
|
+
moveSelectedToTarget: "نقل المحدد إلى الهدف",
|
|
613
|
+
moveAllToTarget: "نقل الكل إلى الهدف",
|
|
614
|
+
moveSelectedToSource: "نقل المحدد إلى المصدر",
|
|
615
|
+
moveAllToSource: "نقل الكل إلى المصدر",
|
|
616
616
|
empty: "لا توجد عناصر",
|
|
617
617
|
moved: (count, listLabel) => `تم نقل ${count} إلى ${listLabel}`
|
|
618
618
|
},
|
|
@@ -837,10 +837,10 @@ const de = {
|
|
|
837
837
|
sourceLabel: "Verfügbar",
|
|
838
838
|
targetLabel: "Ausgewählt",
|
|
839
839
|
controlsLabel: "Übertragungssteuerung",
|
|
840
|
-
moveSelectedToTarget: "Ausgewählte
|
|
841
|
-
moveAllToTarget: "Alle
|
|
842
|
-
moveSelectedToSource: "Ausgewählte
|
|
843
|
-
moveAllToSource: "Alle
|
|
840
|
+
moveSelectedToTarget: "Ausgewählte zum Ziel verschieben",
|
|
841
|
+
moveAllToTarget: "Alle zum Ziel verschieben",
|
|
842
|
+
moveSelectedToSource: "Ausgewählte zur Quelle verschieben",
|
|
843
|
+
moveAllToSource: "Alle zur Quelle verschieben",
|
|
844
844
|
empty: "Keine Einträge",
|
|
845
845
|
moved: (count, listLabel) => `${count} nach ${listLabel} verschoben`
|
|
846
846
|
},
|
|
@@ -2661,10 +2661,10 @@ const nl = {
|
|
|
2661
2661
|
sourceLabel: "Beschikbaar",
|
|
2662
2662
|
targetLabel: "Geselecteerd",
|
|
2663
2663
|
controlsLabel: "Overdrachtsbediening",
|
|
2664
|
-
moveSelectedToTarget: "Selectie naar
|
|
2665
|
-
moveAllToTarget: "Alles naar
|
|
2666
|
-
moveSelectedToSource: "Selectie naar
|
|
2667
|
-
moveAllToSource: "Alles naar
|
|
2664
|
+
moveSelectedToTarget: "Selectie naar het doel verplaatsen",
|
|
2665
|
+
moveAllToTarget: "Alles naar het doel verplaatsen",
|
|
2666
|
+
moveSelectedToSource: "Selectie naar de bron verplaatsen",
|
|
2667
|
+
moveAllToSource: "Alles naar de bron verplaatsen",
|
|
2668
2668
|
empty: "Geen items",
|
|
2669
2669
|
moved: (count, listLabel) => `${count} verplaatst naar ${listLabel}`
|
|
2670
2670
|
},
|
|
@@ -3345,10 +3345,10 @@ const ru = {
|
|
|
3345
3345
|
sourceLabel: "Доступно",
|
|
3346
3346
|
targetLabel: "Выбрано",
|
|
3347
3347
|
controlsLabel: "Элементы управления переносом",
|
|
3348
|
-
moveSelectedToTarget: "Переместить выбранное
|
|
3349
|
-
moveAllToTarget: "Переместить все
|
|
3350
|
-
moveSelectedToSource: "Переместить выбранное
|
|
3351
|
-
moveAllToSource: "Переместить все
|
|
3348
|
+
moveSelectedToTarget: "Переместить выбранное в целевой список",
|
|
3349
|
+
moveAllToTarget: "Переместить все в целевой список",
|
|
3350
|
+
moveSelectedToSource: "Переместить выбранное в исходный список",
|
|
3351
|
+
moveAllToSource: "Переместить все в исходный список",
|
|
3352
3352
|
empty: "Нет элементов",
|
|
3353
3353
|
moved: (count, listLabel) => `Перемещено ${count} в список «${listLabel}»`
|
|
3354
3354
|
},
|
|
@@ -3573,10 +3573,10 @@ const uk = {
|
|
|
3573
3573
|
sourceLabel: "Доступні",
|
|
3574
3574
|
targetLabel: "Вибрані",
|
|
3575
3575
|
controlsLabel: "Елементи керування перенесенням",
|
|
3576
|
-
moveSelectedToTarget: "Перенести вибрані
|
|
3577
|
-
moveAllToTarget: "Перенести все
|
|
3578
|
-
moveSelectedToSource: "Перенести вибрані
|
|
3579
|
-
moveAllToSource: "Перенести все
|
|
3576
|
+
moveSelectedToTarget: "Перенести вибрані до цільового списку",
|
|
3577
|
+
moveAllToTarget: "Перенести все до цільового списку",
|
|
3578
|
+
moveSelectedToSource: "Перенести вибрані до вихідного списку",
|
|
3579
|
+
moveAllToSource: "Перенести все до вихідного списку",
|
|
3580
3580
|
empty: "Немає елементів",
|
|
3581
3581
|
moved: (count, listLabel) => `Переміщено ${count} до списку «${listLabel}»`
|
|
3582
3582
|
},
|
|
@@ -3801,10 +3801,10 @@ const zhCN = {
|
|
|
3801
3801
|
sourceLabel: "可选",
|
|
3802
3802
|
targetLabel: "已选",
|
|
3803
3803
|
controlsLabel: "穿梭控件",
|
|
3804
|
-
moveSelectedToTarget: "
|
|
3805
|
-
moveAllToTarget: "
|
|
3806
|
-
moveSelectedToSource: "
|
|
3807
|
-
moveAllToSource: "
|
|
3804
|
+
moveSelectedToTarget: "将所选项移至目标列表",
|
|
3805
|
+
moveAllToTarget: "将全部移至目标列表",
|
|
3806
|
+
moveSelectedToSource: "将所选项移至源列表",
|
|
3807
|
+
moveAllToSource: "将全部移至源列表",
|
|
3808
3808
|
empty: "无项目",
|
|
3809
3809
|
moved: (count, listLabel) => `已将 ${count} 项移至 ${listLabel}`
|
|
3810
3810
|
},
|
|
@@ -33046,6 +33046,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
33046
33046
|
});
|
|
33047
33047
|
var TransferListComponent = class TransferListComponent {
|
|
33048
33048
|
i18n = inject(EagamiI18nService);
|
|
33049
|
+
host = inject(ElementRef);
|
|
33049
33050
|
items = input.required(...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
33050
33051
|
selectedIds = model([], ...ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []);
|
|
33051
33052
|
sourceLabel = input(void 0, ...ngDevMode ? [{ debugName: "sourceLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -33053,6 +33054,10 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33053
33054
|
headingLevel = input("h3", ...ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []);
|
|
33054
33055
|
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
33055
33056
|
disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
33057
|
+
_formDisabled = signal(false, ...ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []);
|
|
33058
|
+
onChange = () => {};
|
|
33059
|
+
onTouched = () => {};
|
|
33060
|
+
isDisabled = computed(() => this.disabled() || this._formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
33056
33061
|
messages = this.i18n.messages;
|
|
33057
33062
|
leftHighlighted = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "leftHighlighted" }] : /* istanbul ignore next */ []);
|
|
33058
33063
|
rightHighlighted = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "rightHighlighted" }] : /* istanbul ignore next */ []);
|
|
@@ -33071,23 +33076,23 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33071
33076
|
return this.items().filter((item) => selected.has(item.id));
|
|
33072
33077
|
}, ...ngDevMode ? [{ debugName: "targetItems" }] : /* istanbul ignore next */ []);
|
|
33073
33078
|
canMoveRight = computed(() => {
|
|
33074
|
-
if (this.
|
|
33079
|
+
if (this.isDisabled()) return false;
|
|
33075
33080
|
const highlighted = this.leftHighlighted();
|
|
33076
33081
|
const allowed = new Set(this.sourceItems().filter((i) => !i.disabled).map((i) => i.id));
|
|
33077
33082
|
return Array.from(highlighted).some((id) => allowed.has(id));
|
|
33078
33083
|
}, ...ngDevMode ? [{ debugName: "canMoveRight" }] : /* istanbul ignore next */ []);
|
|
33079
33084
|
canMoveAllRight = computed(() => {
|
|
33080
|
-
if (this.
|
|
33085
|
+
if (this.isDisabled()) return false;
|
|
33081
33086
|
return this.sourceItems().some((i) => !i.disabled);
|
|
33082
33087
|
}, ...ngDevMode ? [{ debugName: "canMoveAllRight" }] : /* istanbul ignore next */ []);
|
|
33083
33088
|
canMoveLeft = computed(() => {
|
|
33084
|
-
if (this.
|
|
33089
|
+
if (this.isDisabled()) return false;
|
|
33085
33090
|
const highlighted = this.rightHighlighted();
|
|
33086
33091
|
const allowed = new Set(this.targetItems().filter((i) => !i.disabled).map((i) => i.id));
|
|
33087
33092
|
return Array.from(highlighted).some((id) => allowed.has(id));
|
|
33088
33093
|
}, ...ngDevMode ? [{ debugName: "canMoveLeft" }] : /* istanbul ignore next */ []);
|
|
33089
33094
|
canMoveAllLeft = computed(() => {
|
|
33090
|
-
if (this.
|
|
33095
|
+
if (this.isDisabled()) return false;
|
|
33091
33096
|
return this.targetItems().some((i) => !i.disabled);
|
|
33092
33097
|
}, ...ngDevMode ? [{ debugName: "canMoveAllLeft" }] : /* istanbul ignore next */ []);
|
|
33093
33098
|
resolvedSourceLabel = computed(() => this.sourceLabel() ?? this.messages().transferList.sourceLabel, ...ngDevMode ? [{ debugName: "resolvedSourceLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -33096,17 +33101,33 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33096
33101
|
hostClasses = computed(() => [
|
|
33097
33102
|
"ea-transfer-list",
|
|
33098
33103
|
`ea-transfer-list--${this.size()}`,
|
|
33099
|
-
this.
|
|
33104
|
+
this.isDisabled() ? "ea-transfer-list--disabled" : ""
|
|
33100
33105
|
], ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
33106
|
+
writeValue(val) {
|
|
33107
|
+
this.selectedIds.set(val ?? []);
|
|
33108
|
+
}
|
|
33109
|
+
registerOnChange(fn) {
|
|
33110
|
+
this.onChange = fn;
|
|
33111
|
+
}
|
|
33112
|
+
registerOnTouched(fn) {
|
|
33113
|
+
this.onTouched = fn;
|
|
33114
|
+
}
|
|
33115
|
+
setDisabledState(isDisabled) {
|
|
33116
|
+
this._formDisabled.set(isDisabled);
|
|
33117
|
+
}
|
|
33118
|
+
onFocusOut(event) {
|
|
33119
|
+
if (event.relatedTarget instanceof Node && this.host.nativeElement.contains(event.relatedTarget)) return;
|
|
33120
|
+
this.onTouched();
|
|
33121
|
+
}
|
|
33101
33122
|
isHighlighted(pane, id) {
|
|
33102
33123
|
return (pane === "source" ? this.leftHighlighted() : this.rightHighlighted()).has(id);
|
|
33103
33124
|
}
|
|
33104
33125
|
itemTabindex(pane, index, item) {
|
|
33105
|
-
if (item.disabled || this.
|
|
33126
|
+
if (item.disabled || this.isDisabled()) return -1;
|
|
33106
33127
|
return index === (pane === "source" ? this.leftActiveIndex() : this.rightActiveIndex()) ? 0 : -1;
|
|
33107
33128
|
}
|
|
33108
33129
|
onItemClick(pane, item, event) {
|
|
33109
|
-
if (this.
|
|
33130
|
+
if (this.isDisabled() || item.disabled) return;
|
|
33110
33131
|
this.setActive(pane, item.id);
|
|
33111
33132
|
if (event.shiftKey) this.selectRangeTo(pane, item);
|
|
33112
33133
|
else this.toggleHighlight(pane, item);
|
|
@@ -33188,14 +33209,14 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33188
33209
|
const highlighted = this.leftHighlighted();
|
|
33189
33210
|
const sourceIds = new Set(this.sourceItems().filter((i) => !i.disabled).map((i) => i.id));
|
|
33190
33211
|
const toMove = Array.from(highlighted).filter((id) => sourceIds.has(id));
|
|
33191
|
-
this.
|
|
33212
|
+
this.commit([...this.selectedIds(), ...toMove]);
|
|
33192
33213
|
this.leftHighlighted.set(/* @__PURE__ */ new Set());
|
|
33193
33214
|
this.announceMove(toMove.length, this.resolvedTargetLabel());
|
|
33194
33215
|
}
|
|
33195
33216
|
moveAllRight() {
|
|
33196
33217
|
if (!this.canMoveAllRight()) return;
|
|
33197
33218
|
const moveable = this.sourceItems().filter((i) => !i.disabled).map((i) => i.id);
|
|
33198
|
-
this.
|
|
33219
|
+
this.commit([...this.selectedIds(), ...moveable]);
|
|
33199
33220
|
this.leftHighlighted.set(/* @__PURE__ */ new Set());
|
|
33200
33221
|
this.announceMove(moveable.length, this.resolvedTargetLabel());
|
|
33201
33222
|
}
|
|
@@ -33204,7 +33225,7 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33204
33225
|
const highlighted = this.rightHighlighted();
|
|
33205
33226
|
const targetIds = new Set(this.targetItems().filter((i) => !i.disabled).map((i) => i.id));
|
|
33206
33227
|
const toRemove = new Set(Array.from(highlighted).filter((id) => targetIds.has(id)));
|
|
33207
|
-
this.
|
|
33228
|
+
this.commit(this.selectedIds().filter((id) => !toRemove.has(id)));
|
|
33208
33229
|
this.rightHighlighted.set(/* @__PURE__ */ new Set());
|
|
33209
33230
|
this.announceMove(toRemove.size, this.resolvedSourceLabel());
|
|
33210
33231
|
}
|
|
@@ -33212,10 +33233,15 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33212
33233
|
if (!this.canMoveAllLeft()) return;
|
|
33213
33234
|
const stickyIds = new Set(this.targetItems().filter((i) => i.disabled).map((i) => i.id));
|
|
33214
33235
|
const movedCount = this.targetItems().filter((i) => !i.disabled).length;
|
|
33215
|
-
this.
|
|
33236
|
+
this.commit(this.selectedIds().filter((id) => stickyIds.has(id)));
|
|
33216
33237
|
this.rightHighlighted.set(/* @__PURE__ */ new Set());
|
|
33217
33238
|
this.announceMove(movedCount, this.resolvedSourceLabel());
|
|
33218
33239
|
}
|
|
33240
|
+
commit(next) {
|
|
33241
|
+
this.selectedIds.set(next);
|
|
33242
|
+
this.onChange(next);
|
|
33243
|
+
this.onTouched();
|
|
33244
|
+
}
|
|
33219
33245
|
announceMove(count, listLabel) {
|
|
33220
33246
|
if (count > 0) this.announcement.set(this.messages().transferList.moved(`${count}`, listLabel));
|
|
33221
33247
|
}
|
|
@@ -33285,8 +33311,13 @@ var TransferListComponent = class TransferListComponent {
|
|
|
33285
33311
|
}
|
|
33286
33312
|
},
|
|
33287
33313
|
outputs: { selectedIds: "selectedIdsChange" },
|
|
33314
|
+
providers: [{
|
|
33315
|
+
provide: NG_VALUE_ACCESSOR,
|
|
33316
|
+
useExisting: forwardRef(() => TransferListComponent),
|
|
33317
|
+
multi: true
|
|
33318
|
+
}],
|
|
33288
33319
|
ngImport: i0,
|
|
33289
|
-
template: "<div
|
|
33320
|
+
template: "<div\n [class]=\"hostClasses()\"\n (focusout)=\"onFocusOut($event)\">\n <div class=\"ea-transfer-list__pane\">\n @if (resolvedSourceLabel(); as sourceLabel) {\n <ng-container *ngTemplateOutlet=\"paneLabel; context: { $implicit: sourceLabel }\" />\n }\n <ul\n class=\"ea-transfer-list__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"resolvedSourceLabel() || messages().transferList.sourceLabel\"\n [attr.aria-disabled]=\"isDisabled() || null\">\n @for (item of sourceItems(); track item.id) {\n <li\n class=\"ea-transfer-list__item\"\n role=\"option\"\n [attr.aria-selected]=\"isHighlighted('source', item.id)\"\n [attr.aria-disabled]=\"item.disabled || isDisabled() || null\"\n [class.ea-transfer-list__item--highlighted]=\"isHighlighted('source', item.id)\"\n [class.ea-transfer-list__item--disabled]=\"item.disabled || isDisabled()\"\n [attr.tabindex]=\"itemTabindex('source', $index, item)\"\n (click)=\"onItemClick('source', item, $event)\"\n (keydown)=\"onItemKeydown($event, 'source', item)\">\n {{ item.label }}\n </li>\n } @empty {\n <li\n class=\"ea-transfer-list__empty\"\n aria-hidden=\"true\">\n {{ messages().transferList.empty }}\n </li>\n }\n </ul>\n </div>\n\n <div\n class=\"ea-transfer-list__buttons\"\n role=\"group\"\n [attr.aria-label]=\"messages().transferList.controlsLabel\">\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveAllToTarget\"\n [disabled]=\"!canMoveAllRight()\"\n (click)=\"moveAllRight()\">\n <ea-icon-chevrons-right class=\"ea-rtl-flip\" />\n </button>\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveSelectedToTarget\"\n [disabled]=\"!canMoveRight()\"\n (click)=\"moveSelectedRight()\">\n <ea-icon-chevron-right class=\"ea-rtl-flip\" />\n </button>\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveSelectedToSource\"\n [disabled]=\"!canMoveLeft()\"\n (click)=\"moveSelectedLeft()\">\n <ea-icon-chevron-left class=\"ea-rtl-flip\" />\n </button>\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveAllToSource\"\n [disabled]=\"!canMoveAllLeft()\"\n (click)=\"moveAllLeft()\">\n <ea-icon-chevrons-left class=\"ea-rtl-flip\" />\n </button>\n </div>\n\n <div class=\"ea-transfer-list__pane\">\n @if (resolvedTargetLabel(); as targetLabel) {\n <ng-container *ngTemplateOutlet=\"paneLabel; context: { $implicit: targetLabel }\" />\n }\n <ul\n class=\"ea-transfer-list__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"resolvedTargetLabel() || messages().transferList.targetLabel\"\n [attr.aria-disabled]=\"isDisabled() || null\">\n @for (item of targetItems(); track item.id) {\n <li\n class=\"ea-transfer-list__item\"\n role=\"option\"\n [attr.aria-selected]=\"isHighlighted('target', item.id)\"\n [attr.aria-disabled]=\"item.disabled || isDisabled() || null\"\n [class.ea-transfer-list__item--highlighted]=\"isHighlighted('target', item.id)\"\n [class.ea-transfer-list__item--disabled]=\"item.disabled || isDisabled()\"\n [attr.tabindex]=\"itemTabindex('target', $index, item)\"\n (click)=\"onItemClick('target', item, $event)\"\n (keydown)=\"onItemKeydown($event, 'target', item)\">\n {{ item.label }}\n </li>\n } @empty {\n <li\n class=\"ea-transfer-list__empty\"\n aria-hidden=\"true\">\n {{ messages().transferList.empty }}\n </li>\n }\n </ul>\n </div>\n\n <p\n class=\"ea-transfer-list__announcement\"\n role=\"status\">\n {{ announcement() }}\n </p>\n</div>\n\n<ng-template\n #paneLabel\n let-text>\n @switch (headingLevel()) {\n @case ('h2') {\n <h2 class=\"ea-transfer-list__pane-label\">{{ text }}</h2>\n }\n @case ('h3') {\n <h3 class=\"ea-transfer-list__pane-label\">{{ text }}</h3>\n }\n @case ('h4') {\n <h4 class=\"ea-transfer-list__pane-label\">{{ text }}</h4>\n }\n @case ('h5') {\n <h5 class=\"ea-transfer-list__pane-label\">{{ text }}</h5>\n }\n @case ('h6') {\n <h6 class=\"ea-transfer-list__pane-label\">{{ text }}</h6>\n }\n @default {\n <h3 class=\"ea-transfer-list__pane-label\">{{ text }}</h3>\n }\n }\n</ng-template>\n",
|
|
33290
33321
|
styles: [":host{display:block}.ea-transfer-list{display:grid;grid-template-columns:1fr auto 1fr;gap:.75em;color:var(--color-text-primary)}.ea-transfer-list__pane{display:flex;flex-direction:column;gap:.5em;min-width:6em}.ea-transfer-list__pane-label{margin:0;font-size:.875em;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-transfer-list__list{display:flex;flex:1;flex-direction:column;gap:2px;min-height:10em;padding:.25em;margin:0;overflow-y:auto;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);list-style:none}.ea-transfer-list__list:focus-visible{outline:none}.ea-transfer-list__item{padding:.5em .75em;border-radius:var(--radius-sm);cursor:pointer;transition:var(--transition-colors);-webkit-user-select:none;user-select:none}.ea-transfer-list__item:hover:not(.ea-transfer-list__item--disabled){background-color:var(--color-state-hover)}.ea-transfer-list__item:focus-visible{outline:none;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:calc(-2 * var(--border-width-medium))}@media(forced-colors:active){.ea-transfer-list__item:focus-visible{outline-color:Highlight}}.ea-transfer-list__item--highlighted{background-color:var(--color-brand-subtle, var(--color-state-hover));color:var(--color-text-primary)}@media(forced-colors:active){.ea-transfer-list__item--highlighted{background-color:Highlight;color:HighlightText}}.ea-transfer-list__item--disabled{opacity:.5;cursor:default}.ea-transfer-list__empty{padding:.75em;font-size:inherit;text-align:center;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-transfer-list__buttons{display:flex;flex-direction:column;align-self:center;gap:.5em}.ea-transfer-list__button{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-transfer-list__button>*{font-size:1.25em}.ea-transfer-list__button:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-transfer-list__button:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-transfer-list__button:focus-visible{outline:none;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-transfer-list__button:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-transfer-list__button:disabled{cursor:default;opacity:.5}.ea-transfer-list__button{--ea-icon-button-size: 2em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary)}.ea-transfer-list__button:hover:not(:disabled){border-color:var(--color-border-strong)}.ea-transfer-list--2xs{font-size:var(--font-size-2xs)}.ea-transfer-list--xs{font-size:var(--font-size-xs)}.ea-transfer-list--sm{font-size:var(--font-size-sm)}.ea-transfer-list--md{font-size:var(--font-size-md)}.ea-transfer-list--lg{font-size:var(--font-size-lg)}.ea-transfer-list--xl{font-size:var(--font-size-xl)}.ea-transfer-list--disabled{pointer-events:none;opacity:.6}.ea-transfer-list__announcement{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}\n"],
|
|
33291
33322
|
dependencies: [
|
|
33292
33323
|
{
|
|
@@ -33340,7 +33371,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
33340
33371
|
ChevronsRightIconComponent,
|
|
33341
33372
|
NgTemplateOutlet
|
|
33342
33373
|
],
|
|
33343
|
-
|
|
33374
|
+
providers: [{
|
|
33375
|
+
provide: NG_VALUE_ACCESSOR,
|
|
33376
|
+
useExisting: forwardRef(() => TransferListComponent),
|
|
33377
|
+
multi: true
|
|
33378
|
+
}],
|
|
33379
|
+
template: "<div\n [class]=\"hostClasses()\"\n (focusout)=\"onFocusOut($event)\">\n <div class=\"ea-transfer-list__pane\">\n @if (resolvedSourceLabel(); as sourceLabel) {\n <ng-container *ngTemplateOutlet=\"paneLabel; context: { $implicit: sourceLabel }\" />\n }\n <ul\n class=\"ea-transfer-list__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"resolvedSourceLabel() || messages().transferList.sourceLabel\"\n [attr.aria-disabled]=\"isDisabled() || null\">\n @for (item of sourceItems(); track item.id) {\n <li\n class=\"ea-transfer-list__item\"\n role=\"option\"\n [attr.aria-selected]=\"isHighlighted('source', item.id)\"\n [attr.aria-disabled]=\"item.disabled || isDisabled() || null\"\n [class.ea-transfer-list__item--highlighted]=\"isHighlighted('source', item.id)\"\n [class.ea-transfer-list__item--disabled]=\"item.disabled || isDisabled()\"\n [attr.tabindex]=\"itemTabindex('source', $index, item)\"\n (click)=\"onItemClick('source', item, $event)\"\n (keydown)=\"onItemKeydown($event, 'source', item)\">\n {{ item.label }}\n </li>\n } @empty {\n <li\n class=\"ea-transfer-list__empty\"\n aria-hidden=\"true\">\n {{ messages().transferList.empty }}\n </li>\n }\n </ul>\n </div>\n\n <div\n class=\"ea-transfer-list__buttons\"\n role=\"group\"\n [attr.aria-label]=\"messages().transferList.controlsLabel\">\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveAllToTarget\"\n [disabled]=\"!canMoveAllRight()\"\n (click)=\"moveAllRight()\">\n <ea-icon-chevrons-right class=\"ea-rtl-flip\" />\n </button>\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveSelectedToTarget\"\n [disabled]=\"!canMoveRight()\"\n (click)=\"moveSelectedRight()\">\n <ea-icon-chevron-right class=\"ea-rtl-flip\" />\n </button>\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveSelectedToSource\"\n [disabled]=\"!canMoveLeft()\"\n (click)=\"moveSelectedLeft()\">\n <ea-icon-chevron-left class=\"ea-rtl-flip\" />\n </button>\n <button\n type=\"button\"\n class=\"ea-transfer-list__button\"\n [attr.aria-label]=\"messages().transferList.moveAllToSource\"\n [disabled]=\"!canMoveAllLeft()\"\n (click)=\"moveAllLeft()\">\n <ea-icon-chevrons-left class=\"ea-rtl-flip\" />\n </button>\n </div>\n\n <div class=\"ea-transfer-list__pane\">\n @if (resolvedTargetLabel(); as targetLabel) {\n <ng-container *ngTemplateOutlet=\"paneLabel; context: { $implicit: targetLabel }\" />\n }\n <ul\n class=\"ea-transfer-list__list\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [attr.aria-label]=\"resolvedTargetLabel() || messages().transferList.targetLabel\"\n [attr.aria-disabled]=\"isDisabled() || null\">\n @for (item of targetItems(); track item.id) {\n <li\n class=\"ea-transfer-list__item\"\n role=\"option\"\n [attr.aria-selected]=\"isHighlighted('target', item.id)\"\n [attr.aria-disabled]=\"item.disabled || isDisabled() || null\"\n [class.ea-transfer-list__item--highlighted]=\"isHighlighted('target', item.id)\"\n [class.ea-transfer-list__item--disabled]=\"item.disabled || isDisabled()\"\n [attr.tabindex]=\"itemTabindex('target', $index, item)\"\n (click)=\"onItemClick('target', item, $event)\"\n (keydown)=\"onItemKeydown($event, 'target', item)\">\n {{ item.label }}\n </li>\n } @empty {\n <li\n class=\"ea-transfer-list__empty\"\n aria-hidden=\"true\">\n {{ messages().transferList.empty }}\n </li>\n }\n </ul>\n </div>\n\n <p\n class=\"ea-transfer-list__announcement\"\n role=\"status\">\n {{ announcement() }}\n </p>\n</div>\n\n<ng-template\n #paneLabel\n let-text>\n @switch (headingLevel()) {\n @case ('h2') {\n <h2 class=\"ea-transfer-list__pane-label\">{{ text }}</h2>\n }\n @case ('h3') {\n <h3 class=\"ea-transfer-list__pane-label\">{{ text }}</h3>\n }\n @case ('h4') {\n <h4 class=\"ea-transfer-list__pane-label\">{{ text }}</h4>\n }\n @case ('h5') {\n <h5 class=\"ea-transfer-list__pane-label\">{{ text }}</h5>\n }\n @case ('h6') {\n <h6 class=\"ea-transfer-list__pane-label\">{{ text }}</h6>\n }\n @default {\n <h3 class=\"ea-transfer-list__pane-label\">{{ text }}</h3>\n }\n }\n</ng-template>\n",
|
|
33344
33380
|
styles: [":host{display:block}.ea-transfer-list{display:grid;grid-template-columns:1fr auto 1fr;gap:.75em;color:var(--color-text-primary)}.ea-transfer-list__pane{display:flex;flex-direction:column;gap:.5em;min-width:6em}.ea-transfer-list__pane-label{margin:0;font-size:.875em;font-weight:var(--font-weight-medium);color:var(--color-text-secondary)}.ea-transfer-list__list{display:flex;flex:1;flex-direction:column;gap:2px;min-height:10em;padding:.25em;margin:0;overflow-y:auto;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);list-style:none}.ea-transfer-list__list:focus-visible{outline:none}.ea-transfer-list__item{padding:.5em .75em;border-radius:var(--radius-sm);cursor:pointer;transition:var(--transition-colors);-webkit-user-select:none;user-select:none}.ea-transfer-list__item:hover:not(.ea-transfer-list__item--disabled){background-color:var(--color-state-hover)}.ea-transfer-list__item:focus-visible{outline:none;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:calc(-2 * var(--border-width-medium))}@media(forced-colors:active){.ea-transfer-list__item:focus-visible{outline-color:Highlight}}.ea-transfer-list__item--highlighted{background-color:var(--color-brand-subtle, var(--color-state-hover));color:var(--color-text-primary)}@media(forced-colors:active){.ea-transfer-list__item--highlighted{background-color:Highlight;color:HighlightText}}.ea-transfer-list__item--disabled{opacity:.5;cursor:default}.ea-transfer-list__empty{padding:.75em;font-size:inherit;text-align:center;color:var(--color-text-tertiary);-webkit-user-select:none;user-select:none}.ea-transfer-list__buttons{display:flex;flex-direction:column;align-self:center;gap:.5em}.ea-transfer-list__button{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ea-icon-button-size, 1.75em);height:var(--ea-icon-button-size, 1.75em);padding:0;border:none;border-radius:var(--radius-sm);background:none;color:var(--color-text-secondary);cursor:pointer;transition:var(--transition-colors)}.ea-transfer-list__button>*{font-size:1.25em}.ea-transfer-list__button:after{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--ea-icon-button-target, 24px));height:max(100%,var(--ea-icon-button-target, 24px));transform:translate(-50%,-50%)}.ea-transfer-list__button:hover{background-color:var(--color-state-hover);color:var(--color-text-primary)}.ea-transfer-list__button:focus-visible{outline:none;outline:var(--border-width-medium) solid var(--color-border-focus);outline-offset:2px}@media(forced-colors:active){.ea-transfer-list__button:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.ea-transfer-list__button:disabled{cursor:default;opacity:.5}.ea-transfer-list__button{--ea-icon-button-size: 2em;border:var(--border-width-thin) solid var(--color-border-default);border-radius:var(--radius-md);background-color:var(--color-bg-base);color:var(--color-text-primary)}.ea-transfer-list__button:hover:not(:disabled){border-color:var(--color-border-strong)}.ea-transfer-list--2xs{font-size:var(--font-size-2xs)}.ea-transfer-list--xs{font-size:var(--font-size-xs)}.ea-transfer-list--sm{font-size:var(--font-size-sm)}.ea-transfer-list--md{font-size:var(--font-size-md)}.ea-transfer-list--lg{font-size:var(--font-size-lg)}.ea-transfer-list--xl{font-size:var(--font-size-xl)}.ea-transfer-list--disabled{pointer-events:none;opacity:.6}.ea-transfer-list__announcement{position:absolute;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap;border:0}\n"]
|
|
33345
33381
|
}]
|
|
33346
33382
|
}],
|