@forgeroute/ui 0.4.90 → 0.4.92
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/forgeroute-ui-offline.mjs +2 -2
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-D3a6iMnB.mjs → forgeroute-ui-ui-labels.es-Rw5Xm65S.mjs} +11 -2
- package/fesm2022/{forgeroute-ui-ui-labels.es-D3a6iMnB.mjs.map → forgeroute-ui-ui-labels.es-Rw5Xm65S.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui.mjs +487 -20
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-offline.d.ts +14 -3
- package/types/forgeroute-ui.d.ts +214 -14
|
@@ -1833,6 +1833,8 @@ const UI_DEFAULT_LABELS = {
|
|
|
1833
1833
|
"dataTable.skipAlreadyHas_other": "{{ count }} selected rows already have this value and will be skipped.",
|
|
1834
1834
|
"dataTable.noChangesBlocked": "No changes — the selected rows can't be changed to {{ option }}.",
|
|
1835
1835
|
"dataTable.noChangesAlready": "No changes — all selected {{ item }} already have {{ option }}.",
|
|
1836
|
+
"dataTable.bulkCannotApply": "The selected rows can't all be changed to {{ option }} together.",
|
|
1837
|
+
"dataTable.bulkOptionBlocked": "{{ option }}: {{ reason }}",
|
|
1836
1838
|
"dataTable.doneUpdated": "updated",
|
|
1837
1839
|
"dataTable.doneDeleted": "deleted",
|
|
1838
1840
|
"dataTable.doneDownloaded": "downloaded",
|
|
@@ -2116,7 +2118,14 @@ const UI_DEFAULT_LABELS = {
|
|
|
2116
2118
|
"notificationBell.allCaughtUp": "All caught up",
|
|
2117
2119
|
"notificationBell.announce.none": "You have no unread notifications.",
|
|
2118
2120
|
"notificationBell.announce.one": "You have 1 unread notification.",
|
|
2119
|
-
"notificationBell.announce.other": "You have {{ count }} unread notifications."
|
|
2121
|
+
"notificationBell.announce.other": "You have {{ count }} unread notifications.",
|
|
2122
|
+
"stackingPlan.legend": "Legend",
|
|
2123
|
+
"stackingPlan.showTable": "Show as table",
|
|
2124
|
+
"stackingPlan.showPlan": "Show as plan",
|
|
2125
|
+
"stackingPlan.floor": "Floor",
|
|
2126
|
+
"stackingPlan.unit": "Unit",
|
|
2127
|
+
"stackingPlan.size": "Size",
|
|
2128
|
+
"stackingPlan.details": "Details"
|
|
2120
2129
|
};
|
|
2121
2130
|
function interpolate$1(text, params) {
|
|
2122
2131
|
if (!params) return text;
|
|
@@ -14699,9 +14708,35 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14699
14708
|
}
|
|
14700
14709
|
}
|
|
14701
14710
|
_bulkOptionsFor(def) {
|
|
14702
|
-
const opts = this._getOptionsForField(def.field);
|
|
14711
|
+
const opts = def.listAll ? this._listAllOptions(def) : this._getOptionsForField(def.field);
|
|
14703
14712
|
return def.exclude?.length ? opts.filter((o) => !this._isBulkExcluded(def, o.value)) : opts;
|
|
14704
14713
|
}
|
|
14714
|
+
_listAllOptions(def) {
|
|
14715
|
+
const col = this.columns().find((c) => c.key === def.field);
|
|
14716
|
+
const label = (value) => col?.badgeFn ? col.badgeFn(value, null)?.label || value : value;
|
|
14717
|
+
const values = Array.isArray(def.listAll) ? [...def.listAll] : [...this._getOptionsForField(def.field).map((o) => o.value), ...Object.keys(def.allowedFrom ?? {})];
|
|
14718
|
+
return [...new Set(values.filter((v) => typeof v === "string" && v.trim() !== ""))].map((value) => ({
|
|
14719
|
+
value,
|
|
14720
|
+
label: label(value)
|
|
14721
|
+
}));
|
|
14722
|
+
}
|
|
14723
|
+
_selectedRows() {
|
|
14724
|
+
return this._items().filter((i) => this._selectedIds().has(i["id"]));
|
|
14725
|
+
}
|
|
14726
|
+
_applyVerdict(def, target, rows, optionLabel) {
|
|
14727
|
+
if (!def.canApply) return { ok: true };
|
|
14728
|
+
let verdict;
|
|
14729
|
+
try {
|
|
14730
|
+
verdict = def.canApply([...rows], target);
|
|
14731
|
+
} catch {
|
|
14732
|
+
verdict = false;
|
|
14733
|
+
}
|
|
14734
|
+
if (verdict === true) return { ok: true };
|
|
14735
|
+
return {
|
|
14736
|
+
ok: false,
|
|
14737
|
+
reason: typeof verdict === "string" && verdict.trim() !== "" ? verdict.trim() : this.labels.t("dataTable.bulkCannotApply", { option: optionLabel })
|
|
14738
|
+
};
|
|
14739
|
+
}
|
|
14705
14740
|
_canBulkMove(def, current, target, row) {
|
|
14706
14741
|
const cur = String(current ?? "");
|
|
14707
14742
|
if (cur === String(target)) return false;
|
|
@@ -15028,7 +15063,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
15028
15063
|
if (def.field) {
|
|
15029
15064
|
this._activeBulkType.set(def.type);
|
|
15030
15065
|
const opts = this._eligibleBulkOptions();
|
|
15031
|
-
this._bulkSelectStr = opts
|
|
15066
|
+
this._bulkSelectStr = opts.find((o) => !o.disabled)?.value ?? "";
|
|
15032
15067
|
}
|
|
15033
15068
|
}
|
|
15034
15069
|
async applyBulkAction() {
|
|
@@ -15036,9 +15071,14 @@ var DataTableComponent = class DataTableComponent {
|
|
|
15036
15071
|
if (!def || !this._bulkSelectStr || !def.field) return;
|
|
15037
15072
|
if (this._confirmingBulk || this._applyingBulk()) return;
|
|
15038
15073
|
if (this._isBulkExcluded(def, this._bulkSelectStr)) return;
|
|
15039
|
-
const { eligibleIds, skippedCount } = this._getEligible(def.type, this._bulkSelectStr, def);
|
|
15040
15074
|
const selectedValue = this._bulkSelectStr;
|
|
15041
15075
|
const optionLabel = this._bulkOptionsFor(def).find((o) => o.value === selectedValue)?.label ?? selectedValue;
|
|
15076
|
+
const verdict = this._applyVerdict(def, selectedValue, this._selectedRows(), optionLabel);
|
|
15077
|
+
if (!verdict.ok) {
|
|
15078
|
+
this._toast.error(verdict.reason);
|
|
15079
|
+
return;
|
|
15080
|
+
}
|
|
15081
|
+
const { eligibleIds, skippedCount } = this._getEligible(def.type, selectedValue, def);
|
|
15042
15082
|
const selectedRows = this._items().filter((i) => this._selectedIds().has(i.id));
|
|
15043
15083
|
const alreadyCount = selectedRows.filter((i) => String(i[def.field] ?? "") === selectedValue).length;
|
|
15044
15084
|
const blockedCount = skippedCount - alreadyCount;
|
|
@@ -15464,6 +15504,8 @@ var DataTableComponent = class DataTableComponent {
|
|
|
15464
15504
|
const col = this.columns().find((c) => c.key === key);
|
|
15465
15505
|
const allowedFrom = typeof entry === "string" ? void 0 : entry.allowedFrom;
|
|
15466
15506
|
const canChange = typeof entry === "string" ? void 0 : entry.canChange;
|
|
15507
|
+
const canApply = typeof entry === "string" ? void 0 : entry.canApply;
|
|
15508
|
+
const listAll = typeof entry === "string" ? void 0 : entry.listAll;
|
|
15467
15509
|
const custom = typeof entry === "string" ? "" : entry.label?.trim() ?? "";
|
|
15468
15510
|
return {
|
|
15469
15511
|
type: `change-${key}`,
|
|
@@ -15474,6 +15516,8 @@ var DataTableComponent = class DataTableComponent {
|
|
|
15474
15516
|
...exclude.length ? { exclude } : {},
|
|
15475
15517
|
...allowedFrom ? { allowedFrom } : {},
|
|
15476
15518
|
...canChange ? { canChange } : {},
|
|
15519
|
+
...canApply ? { canApply } : {},
|
|
15520
|
+
...listAll === true || Array.isArray(listAll) && listAll.length ? { listAll } : {},
|
|
15477
15521
|
...confirm ? { confirm } : {}
|
|
15478
15522
|
};
|
|
15479
15523
|
}).filter((def) => !def.field || !def.exclude?.length || this._bulkOptionsFor(def).length > 0).filter((def, i, all) => !def.action || all.findIndex((d) => d.type === def.type) === i), ...ngDevMode ? [{ debugName: "_bulkDefs" }] : /* istanbul ignore next */ []);
|
|
@@ -15491,9 +15535,27 @@ var DataTableComponent = class DataTableComponent {
|
|
|
15491
15535
|
const allOpts = this._bulkOptionsFor(def);
|
|
15492
15536
|
const selected = this._items().filter((i) => this._selectedIds().has(i["id"]));
|
|
15493
15537
|
const eligible = getEligibleOptions(allOpts, selected, def.field);
|
|
15494
|
-
|
|
15495
|
-
|
|
15538
|
+
const reachable = !def.allowedFrom && !def.canChange ? eligible : eligible.filter((o) => selected.some((i) => this._canBulkMove(def, i[def.field], o.value, i)));
|
|
15539
|
+
if (!def.canApply) return reachable;
|
|
15540
|
+
return reachable.map((o) => this._applyVerdict(def, o.value, selected, o.label).ok ? o : {
|
|
15541
|
+
...o,
|
|
15542
|
+
disabled: true
|
|
15543
|
+
});
|
|
15496
15544
|
}, ...ngDevMode ? [{ debugName: "_eligibleBulkOptions" }] : /* istanbul ignore next */ []);
|
|
15545
|
+
this._bulkHintId = `dt-bulk-hint-${Math.random().toString(36).slice(2, 8)}`;
|
|
15546
|
+
this._bulkOptionHintIds = computed(() => this._bulkOptionHints().map((_, i) => `${this._bulkHintId}-${i}`).join(" "), ...ngDevMode ? [{ debugName: "_bulkOptionHintIds" }] : /* istanbul ignore next */ []);
|
|
15547
|
+
this._bulkOptionHints = computed(() => {
|
|
15548
|
+
const def = this._activeBulkDef();
|
|
15549
|
+
if (!def?.canApply) return [];
|
|
15550
|
+
const selected = this._items().filter((i) => this._selectedIds().has(i["id"]));
|
|
15551
|
+
return this._eligibleBulkOptions().filter((o) => o.disabled).flatMap((o) => {
|
|
15552
|
+
const verdict = this._applyVerdict(def, o.value, selected, o.label);
|
|
15553
|
+
return verdict.ok ? [] : [this.labels.t("dataTable.bulkOptionBlocked", {
|
|
15554
|
+
option: o.label,
|
|
15555
|
+
reason: verdict.reason
|
|
15556
|
+
})];
|
|
15557
|
+
});
|
|
15558
|
+
}, ...ngDevMode ? [{ debugName: "_bulkOptionHints" }] : /* istanbul ignore next */ []);
|
|
15497
15559
|
this._allSelected = computed(() => {
|
|
15498
15560
|
const items = this._items();
|
|
15499
15561
|
const sel = this._selectedIds();
|
|
@@ -16589,9 +16651,12 @@ var DataTableComponent = class DataTableComponent {
|
|
|
16589
16651
|
<div class="dt-bulk-actions">
|
|
16590
16652
|
@if (_activeBulkDef(); as def) {
|
|
16591
16653
|
<!-- Inline select for field-based bulk actions -->
|
|
16592
|
-
<ui-select name="dt-bulk" size="sm" [ariaLabel]="def.label" [ngModel]="_bulkSelectStr" (ngModelChange)="_bulkSelectStr = $event" [options]="_eligibleBulkOptions()" />
|
|
16654
|
+
<ui-select name="dt-bulk" size="sm" [ariaLabel]="def.label" [ngModel]="_bulkSelectStr" (ngModelChange)="_bulkSelectStr = $event" [options]="_eligibleBulkOptions()" [ariaDescribedBy]="_bulkOptionHintIds()" />
|
|
16593
16655
|
<ui-button variant="primary" size="sm" [disabled]="!_bulkSelectStr" [loading]="_applyingBulk()" (click)="applyBulkAction()">{{ labels.t('dataTable.apply') }}</ui-button>
|
|
16594
16656
|
<ui-button variant="ghost" size="sm" [disabled]="_applyingBulk()" (click)="_activeBulkType.set(null)">{{ labels.t('dataTable.cancel') }}</ui-button>
|
|
16657
|
+
@for (hint of _bulkOptionHints(); track $index) {
|
|
16658
|
+
<span class="dt-bulk-hint" role="status" data-testid="dt-bulk-option-hint" [id]="_bulkHintId + '-' + $index">{{ hint }}</span>
|
|
16659
|
+
}
|
|
16595
16660
|
} @else {
|
|
16596
16661
|
@for (def of _bulkDefs(); track def.type) {
|
|
16597
16662
|
@if (!_bulkHidden(def)) {
|
|
@@ -17737,9 +17802,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
17737
17802
|
<div class="dt-bulk-actions">
|
|
17738
17803
|
@if (_activeBulkDef(); as def) {
|
|
17739
17804
|
<!-- Inline select for field-based bulk actions -->
|
|
17740
|
-
<ui-select name="dt-bulk" size="sm" [ariaLabel]="def.label" [ngModel]="_bulkSelectStr" (ngModelChange)="_bulkSelectStr = $event" [options]="_eligibleBulkOptions()" />
|
|
17805
|
+
<ui-select name="dt-bulk" size="sm" [ariaLabel]="def.label" [ngModel]="_bulkSelectStr" (ngModelChange)="_bulkSelectStr = $event" [options]="_eligibleBulkOptions()" [ariaDescribedBy]="_bulkOptionHintIds()" />
|
|
17741
17806
|
<ui-button variant="primary" size="sm" [disabled]="!_bulkSelectStr" [loading]="_applyingBulk()" (click)="applyBulkAction()">{{ labels.t('dataTable.apply') }}</ui-button>
|
|
17742
17807
|
<ui-button variant="ghost" size="sm" [disabled]="_applyingBulk()" (click)="_activeBulkType.set(null)">{{ labels.t('dataTable.cancel') }}</ui-button>
|
|
17808
|
+
@for (hint of _bulkOptionHints(); track $index) {
|
|
17809
|
+
<span class="dt-bulk-hint" role="status" data-testid="dt-bulk-option-hint" [id]="_bulkHintId + '-' + $index">{{ hint }}</span>
|
|
17810
|
+
}
|
|
17743
17811
|
} @else {
|
|
17744
17812
|
@for (def of _bulkDefs(); track def.type) {
|
|
17745
17813
|
@if (!_bulkHidden(def)) {
|
|
@@ -19487,6 +19555,364 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
19487
19555
|
}]
|
|
19488
19556
|
}
|
|
19489
19557
|
});
|
|
19558
|
+
let nextPlanId = 0;
|
|
19559
|
+
var StackingPlanComponent = class StackingPlanComponent {
|
|
19560
|
+
constructor() {
|
|
19561
|
+
this.uid = `sp-${nextPlanId++}`;
|
|
19562
|
+
this.labels = inject(UiLabelsService);
|
|
19563
|
+
this.host = inject(ElementRef);
|
|
19564
|
+
this.floors = input([], ...ngDevMode ? [{ debugName: "floors" }] : /* istanbul ignore next */ []);
|
|
19565
|
+
this.legend = input([], ...ngDevMode ? [{ debugName: "legend" }] : /* istanbul ignore next */ []);
|
|
19566
|
+
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
19567
|
+
this.selectedId = input(null, ...ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []);
|
|
19568
|
+
this.formatSize = input(null, ...ngDevMode ? [{ debugName: "formatSize" }] : /* istanbul ignore next */ []);
|
|
19569
|
+
this.unitClick = output();
|
|
19570
|
+
this.asTable = signal(false, ...ngDevMode ? [{ debugName: "asTable" }] : /* istanbul ignore next */ []);
|
|
19571
|
+
this.rows = computed(() => {
|
|
19572
|
+
const floors = this.floors().map((f) => ({
|
|
19573
|
+
f,
|
|
19574
|
+
total: f.units.reduce((n, u) => n + this.weight(u), 0)
|
|
19575
|
+
}));
|
|
19576
|
+
const widest = floors.reduce((n, x) => Math.max(n, x.total), 0);
|
|
19577
|
+
return floors.map(({ f, total }) => ({
|
|
19578
|
+
key: f.key,
|
|
19579
|
+
label: f.label,
|
|
19580
|
+
widthPct: widest > 0 ? Math.max(Math.round(total / widest * 100), 8) : 100,
|
|
19581
|
+
units: f.units.map((u) => ({
|
|
19582
|
+
id: u.id,
|
|
19583
|
+
label: u.label,
|
|
19584
|
+
variant: u.variant,
|
|
19585
|
+
weight: this.weight(u),
|
|
19586
|
+
name: `${u.label}: ${u.description}`,
|
|
19587
|
+
tip: u.tooltip || u.description,
|
|
19588
|
+
sameTip: !u.tooltip || u.tooltip === u.description,
|
|
19589
|
+
unit: u
|
|
19590
|
+
}))
|
|
19591
|
+
}));
|
|
19592
|
+
}, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
19593
|
+
this.tableRows = computed(() => this.floors().flatMap((f) => f.units.map((u) => ({
|
|
19594
|
+
id: u.id,
|
|
19595
|
+
floor: f.label,
|
|
19596
|
+
label: u.label,
|
|
19597
|
+
sizeText: this.format(u.size),
|
|
19598
|
+
description: u.description
|
|
19599
|
+
}))), ...ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []);
|
|
19600
|
+
}
|
|
19601
|
+
format(size) {
|
|
19602
|
+
return (this.formatSize() ?? ((n) => this.labels.formatNumber(n)))(size);
|
|
19603
|
+
}
|
|
19604
|
+
weight(u) {
|
|
19605
|
+
return Number.isFinite(u.size) && u.size > 0 ? u.size : 1;
|
|
19606
|
+
}
|
|
19607
|
+
swatchClass(variant) {
|
|
19608
|
+
return `sp-swatch sp-${variant}`;
|
|
19609
|
+
}
|
|
19610
|
+
unitClass(u) {
|
|
19611
|
+
return `sp-unit sp-${u.variant}${u.id === this.selectedId() ? " sp-selected" : ""}`;
|
|
19612
|
+
}
|
|
19613
|
+
onKey(event) {
|
|
19614
|
+
if (![
|
|
19615
|
+
"ArrowLeft",
|
|
19616
|
+
"ArrowRight",
|
|
19617
|
+
"ArrowUp",
|
|
19618
|
+
"ArrowDown",
|
|
19619
|
+
"Home",
|
|
19620
|
+
"End"
|
|
19621
|
+
].includes(event.key)) return;
|
|
19622
|
+
const el = event.currentTarget;
|
|
19623
|
+
const floor = el.closest(".sp-floor");
|
|
19624
|
+
const floors = Array.from(this.host.nativeElement.querySelectorAll(".sp-floor"));
|
|
19625
|
+
const units = floor ? Array.from(floor.querySelectorAll(".sp-unit")) : [];
|
|
19626
|
+
const i = units.indexOf(el);
|
|
19627
|
+
const f = floor ? floors.indexOf(floor) : -1;
|
|
19628
|
+
let target;
|
|
19629
|
+
if (event.key === "ArrowRight") target = units[i + 1];
|
|
19630
|
+
else if (event.key === "ArrowLeft") target = units[i - 1];
|
|
19631
|
+
else if (event.key === "Home") target = units[0];
|
|
19632
|
+
else if (event.key === "End") target = units[units.length - 1];
|
|
19633
|
+
else {
|
|
19634
|
+
const other = floors[f + (event.key === "ArrowDown" ? 1 : -1)];
|
|
19635
|
+
const row = other ? Array.from(other.querySelectorAll(".sp-unit")) : [];
|
|
19636
|
+
target = row[Math.min(i, row.length - 1)];
|
|
19637
|
+
}
|
|
19638
|
+
if (target) {
|
|
19639
|
+
event.preventDefault();
|
|
19640
|
+
target.focus();
|
|
19641
|
+
}
|
|
19642
|
+
}
|
|
19643
|
+
static {
|
|
19644
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
19645
|
+
minVersion: "12.0.0",
|
|
19646
|
+
version: "22.2.2",
|
|
19647
|
+
ngImport: i0,
|
|
19648
|
+
type: StackingPlanComponent,
|
|
19649
|
+
deps: [],
|
|
19650
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
19651
|
+
});
|
|
19652
|
+
}
|
|
19653
|
+
static {
|
|
19654
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
19655
|
+
minVersion: "17.0.0",
|
|
19656
|
+
version: "22.2.2",
|
|
19657
|
+
type: StackingPlanComponent,
|
|
19658
|
+
isStandalone: true,
|
|
19659
|
+
selector: "ui-stacking-plan",
|
|
19660
|
+
inputs: {
|
|
19661
|
+
floors: {
|
|
19662
|
+
classPropertyName: "floors",
|
|
19663
|
+
publicName: "floors",
|
|
19664
|
+
isSignal: true,
|
|
19665
|
+
isRequired: false,
|
|
19666
|
+
transformFunction: null
|
|
19667
|
+
},
|
|
19668
|
+
legend: {
|
|
19669
|
+
classPropertyName: "legend",
|
|
19670
|
+
publicName: "legend",
|
|
19671
|
+
isSignal: true,
|
|
19672
|
+
isRequired: false,
|
|
19673
|
+
transformFunction: null
|
|
19674
|
+
},
|
|
19675
|
+
ariaLabel: {
|
|
19676
|
+
classPropertyName: "ariaLabel",
|
|
19677
|
+
publicName: "ariaLabel",
|
|
19678
|
+
isSignal: true,
|
|
19679
|
+
isRequired: false,
|
|
19680
|
+
transformFunction: null
|
|
19681
|
+
},
|
|
19682
|
+
selectedId: {
|
|
19683
|
+
classPropertyName: "selectedId",
|
|
19684
|
+
publicName: "selectedId",
|
|
19685
|
+
isSignal: true,
|
|
19686
|
+
isRequired: false,
|
|
19687
|
+
transformFunction: null
|
|
19688
|
+
},
|
|
19689
|
+
formatSize: {
|
|
19690
|
+
classPropertyName: "formatSize",
|
|
19691
|
+
publicName: "formatSize",
|
|
19692
|
+
isSignal: true,
|
|
19693
|
+
isRequired: false,
|
|
19694
|
+
transformFunction: null
|
|
19695
|
+
}
|
|
19696
|
+
},
|
|
19697
|
+
outputs: { unitClick: "unitClick" },
|
|
19698
|
+
ngImport: i0,
|
|
19699
|
+
template: `
|
|
19700
|
+
<div class="sp">
|
|
19701
|
+
<div class="sp-head">
|
|
19702
|
+
@if (legend().length > 0) {
|
|
19703
|
+
<ul class="sp-legend" role="list" [attr.aria-label]="labels.t('stackingPlan.legend')">
|
|
19704
|
+
@for (item of legend(); track $index) {
|
|
19705
|
+
<li class="sp-legend-item"><span [class]="swatchClass(item.variant)" aria-hidden="true"></span>{{ item.label }}</li>
|
|
19706
|
+
}
|
|
19707
|
+
</ul>
|
|
19708
|
+
}
|
|
19709
|
+
<ui-button variant="secondary" size="sm" (click)="asTable.set(!asTable())" data-testid="stacking-plan-toggle">{{ asTable() ? labels.t('stackingPlan.showPlan') : labels.t('stackingPlan.showTable') }}</ui-button>
|
|
19710
|
+
</div>
|
|
19711
|
+
@if (asTable()) {
|
|
19712
|
+
<div class="sp-table-wrap">
|
|
19713
|
+
<table class="sp-table" data-testid="stacking-plan-table">
|
|
19714
|
+
<caption class="sp-caption">{{ ariaLabel() }}</caption>
|
|
19715
|
+
<thead>
|
|
19716
|
+
<tr>
|
|
19717
|
+
<th scope="col">{{ labels.t('stackingPlan.floor') }}</th>
|
|
19718
|
+
<th scope="col">{{ labels.t('stackingPlan.unit') }}</th>
|
|
19719
|
+
<th scope="col" class="sp-num">{{ labels.t('stackingPlan.size') }}</th>
|
|
19720
|
+
<th scope="col">{{ labels.t('stackingPlan.details') }}</th>
|
|
19721
|
+
</tr>
|
|
19722
|
+
</thead>
|
|
19723
|
+
<tbody>
|
|
19724
|
+
@for (row of tableRows(); track row.id) {
|
|
19725
|
+
<tr [class.sp-row-selected]="row.id === selectedId()">
|
|
19726
|
+
<th scope="row">{{ row.floor }}</th>
|
|
19727
|
+
<td>{{ row.label }}</td>
|
|
19728
|
+
<td class="sp-num">{{ row.sizeText }}</td>
|
|
19729
|
+
<td>{{ row.description }}</td>
|
|
19730
|
+
</tr>
|
|
19731
|
+
}
|
|
19732
|
+
</tbody>
|
|
19733
|
+
</table>
|
|
19734
|
+
</div>
|
|
19735
|
+
} @else {
|
|
19736
|
+
<div class="sp-floors" role="group" [attr.aria-label]="ariaLabel() || null" data-testid="stacking-plan-floors">
|
|
19737
|
+
@for (f of rows(); track f.key; let fi = $index) {
|
|
19738
|
+
<div class="sp-floor" role="group" [attr.aria-labelledby]="uid + '-floor-' + fi" [attr.data-floor]="f.key">
|
|
19739
|
+
<span class="sp-floor-label" [id]="uid + '-floor-' + fi">{{ f.label }}</span>
|
|
19740
|
+
<div class="sp-units" [style.width.%]="f.widthPct">
|
|
19741
|
+
@for (u of f.units; track u.id) {
|
|
19742
|
+
<span class="sp-unit-wrap" [style.flex-grow]="u.weight" [uiTooltip]="u.sameTip ? u.tip : ''">
|
|
19743
|
+
<button type="button" [class]="unitClass(u)" [uiTooltip]="u.sameTip ? '' : u.tip" [attr.aria-label]="u.name" [attr.aria-current]="u.id === selectedId() ? 'true' : null"
|
|
19744
|
+
[attr.data-unit]="u.id" (click)="unitClick.emit(u.unit)" (keydown)="onKey($event)">
|
|
19745
|
+
<span class="sp-unit-text">{{ u.label }}</span>
|
|
19746
|
+
</button>
|
|
19747
|
+
</span>
|
|
19748
|
+
}
|
|
19749
|
+
</div>
|
|
19750
|
+
</div>
|
|
19751
|
+
}
|
|
19752
|
+
</div>
|
|
19753
|
+
}
|
|
19754
|
+
</div>
|
|
19755
|
+
`,
|
|
19756
|
+
isInline: true,
|
|
19757
|
+
styles: [":host{display:block}.sp-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 12px}.sp-legend{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px}.sp-legend-item{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;color:#334155}.sp-swatch{width:12px;height:12px;border-radius:3px;flex:none}.sp-floors{display:flex;flex-direction:column;gap:6px}.sp-floor{display:flex;align-items:stretch;gap:10px}.sp-floor-label{flex:0 0 64px;display:flex;align-items:center;font-size:.8125rem;font-weight:600;color:#475569}.sp-units{display:flex;flex-wrap:wrap;gap:2px;min-width:0;max-width:100%}.sp-unit-wrap{display:flex;flex-basis:0;flex-shrink:1;min-width:44px;min-height:44px}.sp-unit{flex:1 1 0;min-width:0;min-height:44px;padding:4px 6px;margin:0;border:2px solid transparent;border-radius:4px;font:inherit;font-size:.8125rem;font-weight:600;color:#fff;cursor:pointer;overflow:hidden;text-align:center}.sp-unit:focus-visible{outline:3px solid #0f172a;outline-offset:2px}.sp-unit-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp-selected{border-color:#0f172a;box-shadow:inset 0 0 0 2px #fff}.sp-green{background:#15803d}.sp-blue{background:#1d4ed8}.sp-amber{background:#b45309}.sp-orange{background:#c2410c}.sp-red{background:#b91c1c}.sp-slate{background:#475569}.sp-purple{background:#7e22ce}.sp-teal{background:#0f766e}.sp-gray{background:#e2e8f0;color:#0f172a}.sp-table-wrap{overflow-x:auto}.sp-table{width:100%;border-collapse:collapse;font-size:.875rem}.sp-caption{text-align:left;font-size:.8125rem;color:#475569;padding:0 0 8px}.sp-table th,.sp-table td{text-align:left;padding:8px 10px;border-bottom:1px solid #e2e8f0;color:#0f172a}.sp-table thead th{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#475569}.sp-num{text-align:right!important}.sp-row-selected{background:#f1f5f9}@media(max-width:640px){.sp-floor{flex-direction:column;gap:4px}.sp-floor-label{flex-basis:auto}.sp-units{width:100%!important}}@media(forced-colors:active){.sp-unit{forced-color-adjust:none;background:Canvas;color:CanvasText;border:2px solid CanvasText}.sp-selected{border-color:Highlight}.sp-swatch{background:CanvasText!important}}\n"],
|
|
19758
|
+
dependencies: [{
|
|
19759
|
+
kind: "component",
|
|
19760
|
+
type: ButtonComponent,
|
|
19761
|
+
selector: "ui-button",
|
|
19762
|
+
inputs: [
|
|
19763
|
+
"variant",
|
|
19764
|
+
"routerLink",
|
|
19765
|
+
"queryParams",
|
|
19766
|
+
"fragment",
|
|
19767
|
+
"state",
|
|
19768
|
+
"href",
|
|
19769
|
+
"target",
|
|
19770
|
+
"rel",
|
|
19771
|
+
"shortLabel",
|
|
19772
|
+
"shortBelow",
|
|
19773
|
+
"color",
|
|
19774
|
+
"active",
|
|
19775
|
+
"size",
|
|
19776
|
+
"type",
|
|
19777
|
+
"disabled",
|
|
19778
|
+
"loading",
|
|
19779
|
+
"fullWidth",
|
|
19780
|
+
"ariaLabel",
|
|
19781
|
+
"ariaExpanded",
|
|
19782
|
+
"ariaPressed",
|
|
19783
|
+
"ariaDescribedBy",
|
|
19784
|
+
"modal-footer-left",
|
|
19785
|
+
"modal-footer-right"
|
|
19786
|
+
]
|
|
19787
|
+
}, {
|
|
19788
|
+
kind: "directive",
|
|
19789
|
+
type: TooltipDirective,
|
|
19790
|
+
selector: "[uiTooltip]",
|
|
19791
|
+
inputs: ["uiTooltip", "tooltipPosition"]
|
|
19792
|
+
}],
|
|
19793
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
19794
|
+
});
|
|
19795
|
+
}
|
|
19796
|
+
};
|
|
19797
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
19798
|
+
minVersion: "12.0.0",
|
|
19799
|
+
version: "22.2.2",
|
|
19800
|
+
ngImport: i0,
|
|
19801
|
+
type: StackingPlanComponent,
|
|
19802
|
+
decorators: [{
|
|
19803
|
+
type: Component,
|
|
19804
|
+
args: [{
|
|
19805
|
+
selector: "ui-stacking-plan",
|
|
19806
|
+
standalone: true,
|
|
19807
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19808
|
+
imports: [ButtonComponent, TooltipDirective],
|
|
19809
|
+
template: `
|
|
19810
|
+
<div class="sp">
|
|
19811
|
+
<div class="sp-head">
|
|
19812
|
+
@if (legend().length > 0) {
|
|
19813
|
+
<ul class="sp-legend" role="list" [attr.aria-label]="labels.t('stackingPlan.legend')">
|
|
19814
|
+
@for (item of legend(); track $index) {
|
|
19815
|
+
<li class="sp-legend-item"><span [class]="swatchClass(item.variant)" aria-hidden="true"></span>{{ item.label }}</li>
|
|
19816
|
+
}
|
|
19817
|
+
</ul>
|
|
19818
|
+
}
|
|
19819
|
+
<ui-button variant="secondary" size="sm" (click)="asTable.set(!asTable())" data-testid="stacking-plan-toggle">{{ asTable() ? labels.t('stackingPlan.showPlan') : labels.t('stackingPlan.showTable') }}</ui-button>
|
|
19820
|
+
</div>
|
|
19821
|
+
@if (asTable()) {
|
|
19822
|
+
<div class="sp-table-wrap">
|
|
19823
|
+
<table class="sp-table" data-testid="stacking-plan-table">
|
|
19824
|
+
<caption class="sp-caption">{{ ariaLabel() }}</caption>
|
|
19825
|
+
<thead>
|
|
19826
|
+
<tr>
|
|
19827
|
+
<th scope="col">{{ labels.t('stackingPlan.floor') }}</th>
|
|
19828
|
+
<th scope="col">{{ labels.t('stackingPlan.unit') }}</th>
|
|
19829
|
+
<th scope="col" class="sp-num">{{ labels.t('stackingPlan.size') }}</th>
|
|
19830
|
+
<th scope="col">{{ labels.t('stackingPlan.details') }}</th>
|
|
19831
|
+
</tr>
|
|
19832
|
+
</thead>
|
|
19833
|
+
<tbody>
|
|
19834
|
+
@for (row of tableRows(); track row.id) {
|
|
19835
|
+
<tr [class.sp-row-selected]="row.id === selectedId()">
|
|
19836
|
+
<th scope="row">{{ row.floor }}</th>
|
|
19837
|
+
<td>{{ row.label }}</td>
|
|
19838
|
+
<td class="sp-num">{{ row.sizeText }}</td>
|
|
19839
|
+
<td>{{ row.description }}</td>
|
|
19840
|
+
</tr>
|
|
19841
|
+
}
|
|
19842
|
+
</tbody>
|
|
19843
|
+
</table>
|
|
19844
|
+
</div>
|
|
19845
|
+
} @else {
|
|
19846
|
+
<div class="sp-floors" role="group" [attr.aria-label]="ariaLabel() || null" data-testid="stacking-plan-floors">
|
|
19847
|
+
@for (f of rows(); track f.key; let fi = $index) {
|
|
19848
|
+
<div class="sp-floor" role="group" [attr.aria-labelledby]="uid + '-floor-' + fi" [attr.data-floor]="f.key">
|
|
19849
|
+
<span class="sp-floor-label" [id]="uid + '-floor-' + fi">{{ f.label }}</span>
|
|
19850
|
+
<div class="sp-units" [style.width.%]="f.widthPct">
|
|
19851
|
+
@for (u of f.units; track u.id) {
|
|
19852
|
+
<span class="sp-unit-wrap" [style.flex-grow]="u.weight" [uiTooltip]="u.sameTip ? u.tip : ''">
|
|
19853
|
+
<button type="button" [class]="unitClass(u)" [uiTooltip]="u.sameTip ? '' : u.tip" [attr.aria-label]="u.name" [attr.aria-current]="u.id === selectedId() ? 'true' : null"
|
|
19854
|
+
[attr.data-unit]="u.id" (click)="unitClick.emit(u.unit)" (keydown)="onKey($event)">
|
|
19855
|
+
<span class="sp-unit-text">{{ u.label }}</span>
|
|
19856
|
+
</button>
|
|
19857
|
+
</span>
|
|
19858
|
+
}
|
|
19859
|
+
</div>
|
|
19860
|
+
</div>
|
|
19861
|
+
}
|
|
19862
|
+
</div>
|
|
19863
|
+
}
|
|
19864
|
+
</div>
|
|
19865
|
+
`,
|
|
19866
|
+
styles: [":host{display:block}.sp-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 12px}.sp-legend{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px}.sp-legend-item{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;color:#334155}.sp-swatch{width:12px;height:12px;border-radius:3px;flex:none}.sp-floors{display:flex;flex-direction:column;gap:6px}.sp-floor{display:flex;align-items:stretch;gap:10px}.sp-floor-label{flex:0 0 64px;display:flex;align-items:center;font-size:.8125rem;font-weight:600;color:#475569}.sp-units{display:flex;flex-wrap:wrap;gap:2px;min-width:0;max-width:100%}.sp-unit-wrap{display:flex;flex-basis:0;flex-shrink:1;min-width:44px;min-height:44px}.sp-unit{flex:1 1 0;min-width:0;min-height:44px;padding:4px 6px;margin:0;border:2px solid transparent;border-radius:4px;font:inherit;font-size:.8125rem;font-weight:600;color:#fff;cursor:pointer;overflow:hidden;text-align:center}.sp-unit:focus-visible{outline:3px solid #0f172a;outline-offset:2px}.sp-unit-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp-selected{border-color:#0f172a;box-shadow:inset 0 0 0 2px #fff}.sp-green{background:#15803d}.sp-blue{background:#1d4ed8}.sp-amber{background:#b45309}.sp-orange{background:#c2410c}.sp-red{background:#b91c1c}.sp-slate{background:#475569}.sp-purple{background:#7e22ce}.sp-teal{background:#0f766e}.sp-gray{background:#e2e8f0;color:#0f172a}.sp-table-wrap{overflow-x:auto}.sp-table{width:100%;border-collapse:collapse;font-size:.875rem}.sp-caption{text-align:left;font-size:.8125rem;color:#475569;padding:0 0 8px}.sp-table th,.sp-table td{text-align:left;padding:8px 10px;border-bottom:1px solid #e2e8f0;color:#0f172a}.sp-table thead th{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#475569}.sp-num{text-align:right!important}.sp-row-selected{background:#f1f5f9}@media(max-width:640px){.sp-floor{flex-direction:column;gap:4px}.sp-floor-label{flex-basis:auto}.sp-units{width:100%!important}}@media(forced-colors:active){.sp-unit{forced-color-adjust:none;background:Canvas;color:CanvasText;border:2px solid CanvasText}.sp-selected{border-color:Highlight}.sp-swatch{background:CanvasText!important}}\n"]
|
|
19867
|
+
}]
|
|
19868
|
+
}],
|
|
19869
|
+
propDecorators: {
|
|
19870
|
+
floors: [{
|
|
19871
|
+
type: i0.Input,
|
|
19872
|
+
args: [{
|
|
19873
|
+
isSignal: true,
|
|
19874
|
+
alias: "floors",
|
|
19875
|
+
required: false
|
|
19876
|
+
}]
|
|
19877
|
+
}],
|
|
19878
|
+
legend: [{
|
|
19879
|
+
type: i0.Input,
|
|
19880
|
+
args: [{
|
|
19881
|
+
isSignal: true,
|
|
19882
|
+
alias: "legend",
|
|
19883
|
+
required: false
|
|
19884
|
+
}]
|
|
19885
|
+
}],
|
|
19886
|
+
ariaLabel: [{
|
|
19887
|
+
type: i0.Input,
|
|
19888
|
+
args: [{
|
|
19889
|
+
isSignal: true,
|
|
19890
|
+
alias: "ariaLabel",
|
|
19891
|
+
required: false
|
|
19892
|
+
}]
|
|
19893
|
+
}],
|
|
19894
|
+
selectedId: [{
|
|
19895
|
+
type: i0.Input,
|
|
19896
|
+
args: [{
|
|
19897
|
+
isSignal: true,
|
|
19898
|
+
alias: "selectedId",
|
|
19899
|
+
required: false
|
|
19900
|
+
}]
|
|
19901
|
+
}],
|
|
19902
|
+
formatSize: [{
|
|
19903
|
+
type: i0.Input,
|
|
19904
|
+
args: [{
|
|
19905
|
+
isSignal: true,
|
|
19906
|
+
alias: "formatSize",
|
|
19907
|
+
required: false
|
|
19908
|
+
}]
|
|
19909
|
+
}],
|
|
19910
|
+
unitClick: [{
|
|
19911
|
+
type: i0.Output,
|
|
19912
|
+
args: ["unitClick"]
|
|
19913
|
+
}]
|
|
19914
|
+
}
|
|
19915
|
+
});
|
|
19490
19916
|
var ProgressRingComponent = class ProgressRingComponent {
|
|
19491
19917
|
constructor() {
|
|
19492
19918
|
this.value = input(0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
@@ -35537,10 +35963,15 @@ function actionFromMethod(error) {
|
|
|
35537
35963
|
function withoutLeadingArticle(ctx) {
|
|
35538
35964
|
return ctx.replace(/^(?:the|an?)\s+/i, "") || ctx;
|
|
35539
35965
|
}
|
|
35966
|
+
const usableText = (value) => typeof value === "string" && value.trim() !== "";
|
|
35967
|
+
const sentenceOf = (value) => usableText(value) ? value.trim() : null;
|
|
35968
|
+
const withFullStop = (text) => /[.!?…。!?‼⁇⁈⁉][)\]}"'”’»›)]}」』】〉》]*$/.test(text) ? text : `${text}.`;
|
|
35540
35969
|
function getErrorMessage(error, fallbackContext, action) {
|
|
35541
|
-
const
|
|
35970
|
+
const sentences = fallbackContext !== null && typeof fallbackContext === "object" ? fallbackContext : null;
|
|
35971
|
+
const noun = sentences ? sentences.context : fallbackContext;
|
|
35972
|
+
const ctx = (typeof noun === "string" ? noun.trim() : "") || uiText("errors.dataWord");
|
|
35542
35973
|
const act = action ?? (error instanceof HttpErrorResponse ? actionFromMethod(error) : "load");
|
|
35543
|
-
const failed = uiText("errors.failed", {
|
|
35974
|
+
const failed = sentenceOf(sentences?.failed) !== null ? withFullStop(sentenceOf(sentences?.failed)) : uiText("errors.failed", {
|
|
35544
35975
|
verb: uiText(`errors.verb.${act}`),
|
|
35545
35976
|
ctx
|
|
35546
35977
|
});
|
|
@@ -35550,11 +35981,11 @@ function getErrorMessage(error, fallbackContext, action) {
|
|
|
35550
35981
|
switch (error.status) {
|
|
35551
35982
|
case 0: return `${failed} ${uiText("errors.checkConnection")}`;
|
|
35552
35983
|
case 401: return uiText("errors.sessionExpired");
|
|
35553
|
-
case 403: return uiText("errors.noPermission", {
|
|
35984
|
+
case 403: return sentenceOf(sentences?.noPermission) ?? uiText("errors.noPermission", {
|
|
35554
35985
|
verb: uiText(`errors.permissionVerb.${act}`),
|
|
35555
35986
|
ctx
|
|
35556
35987
|
});
|
|
35557
|
-
case 404: return uiText("errors.notFound", { ctx: withoutLeadingArticle(ctx) });
|
|
35988
|
+
case 404: return sentenceOf(sentences?.notFound) ?? uiText("errors.notFound", { ctx: withoutLeadingArticle(ctx) });
|
|
35558
35989
|
case 408: return `${failed} ${uiText("errors.timedOut")}`;
|
|
35559
35990
|
case 422: return uiText("errors.invalidData");
|
|
35560
35991
|
case 429: return `${failed} ${uiText("errors.tooManyRequests")}`;
|
|
@@ -68084,7 +68515,7 @@ const BUILT_IN_ENDONYMS = {
|
|
|
68084
68515
|
ko: "한국어",
|
|
68085
68516
|
ru: "Русский"
|
|
68086
68517
|
};
|
|
68087
|
-
const BUILT_IN_LOADERS = /* @__PURE__ */ new Map([["es", () => import("./forgeroute-ui-ui-labels.es-
|
|
68518
|
+
const BUILT_IN_LOADERS = /* @__PURE__ */ new Map([["es", () => import("./forgeroute-ui-ui-labels.es-Rw5Xm65S.mjs").then((m) => m.UI_LABELS_ES)]]);
|
|
68088
68519
|
const normalizeTag = (tag) => tag.trim().toLowerCase().replace(/_/g, "-");
|
|
68089
68520
|
const baseOf = (tag) => normalizeTag(tag).split("-")[0];
|
|
68090
68521
|
const builtInLoader = (lang) => BUILT_IN_LOADERS.get(normalizeTag(lang)) ?? BUILT_IN_LOADERS.get(baseOf(lang));
|
|
@@ -68408,16 +68839,22 @@ var ModuleLabelsRegistry = class ModuleLabelsRegistry {
|
|
|
68408
68839
|
en: {},
|
|
68409
68840
|
es: {}
|
|
68410
68841
|
};
|
|
68411
|
-
|
|
68412
|
-
|
|
68413
|
-
|
|
68414
|
-
Object.assign(overrides.
|
|
68842
|
+
const own = this.entries.filter((entry) => entry.namespace === handle.namespace).map((entry) => entry.overrides);
|
|
68843
|
+
for (const source of own) {
|
|
68844
|
+
if (typeof source === "function") continue;
|
|
68845
|
+
Object.assign(overrides.en, clean(handle, source.en, true));
|
|
68846
|
+
Object.assign(overrides.es, clean(handle, source.es, true));
|
|
68415
68847
|
}
|
|
68848
|
+
const sources = own.some((source) => typeof source === "function") ? own.map((source) => typeof source === "function" ? source : {
|
|
68849
|
+
en: clean(handle, source.en, true),
|
|
68850
|
+
es: clean(handle, source.es, true)
|
|
68851
|
+
}) : null;
|
|
68416
68852
|
state = {
|
|
68417
68853
|
handle,
|
|
68418
68854
|
status: signal("idle"),
|
|
68419
68855
|
spanish: signal(null),
|
|
68420
|
-
overrides
|
|
68856
|
+
overrides,
|
|
68857
|
+
sources
|
|
68421
68858
|
};
|
|
68422
68859
|
this.states.set(handle, state);
|
|
68423
68860
|
const made = state;
|
|
@@ -68446,11 +68883,41 @@ var ModuleLabelsRegistry = class ModuleLabelsRegistry {
|
|
|
68446
68883
|
if (!this.destroyed) state.status.set("failed");
|
|
68447
68884
|
});
|
|
68448
68885
|
}
|
|
68886
|
+
currentOverrides(state) {
|
|
68887
|
+
if (!state.sources) return state.overrides;
|
|
68888
|
+
const merged = {
|
|
68889
|
+
en: {},
|
|
68890
|
+
es: {}
|
|
68891
|
+
};
|
|
68892
|
+
for (const source of state.sources) {
|
|
68893
|
+
if (typeof source !== "function") {
|
|
68894
|
+
Object.assign(merged.en, source.en);
|
|
68895
|
+
Object.assign(merged.es, source.es);
|
|
68896
|
+
continue;
|
|
68897
|
+
}
|
|
68898
|
+
let value;
|
|
68899
|
+
try {
|
|
68900
|
+
value = source();
|
|
68901
|
+
} catch (error) {
|
|
68902
|
+
value = void 0;
|
|
68903
|
+
if (!state.warned && isDevMode()) {
|
|
68904
|
+
state.warned = true;
|
|
68905
|
+
console.warn(`[module labels] The override function for "${state.handle.namespace}" threw and was ignored. It runs on every text lookup, outside any injection context: build the function (or a computed) where inject() works and capture the service there; do not call inject() inside it.`, error);
|
|
68906
|
+
}
|
|
68907
|
+
}
|
|
68908
|
+
if (!value || typeof value !== "object") continue;
|
|
68909
|
+
Object.assign(merged.en, clean(state.handle, value.en, true));
|
|
68910
|
+
Object.assign(merged.es, clean(state.handle, value.es, true));
|
|
68911
|
+
}
|
|
68912
|
+
return merged;
|
|
68913
|
+
}
|
|
68449
68914
|
create(handle) {
|
|
68450
68915
|
const state = this.stateFor(handle);
|
|
68451
68916
|
const language = this.language;
|
|
68452
68917
|
const text = (key) => {
|
|
68453
|
-
|
|
68918
|
+
const lang = language();
|
|
68919
|
+
const overrides = this.currentOverrides(state);
|
|
68920
|
+
return (lang === "es" ? overrides.es[key] ?? state.spanish()?.[key] : void 0) ?? overrides.en[key] ?? state.handle.en[key] ?? key;
|
|
68454
68921
|
};
|
|
68455
68922
|
const labels = this.labels;
|
|
68456
68923
|
return {
|
|
@@ -71825,6 +72292,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
71825
72292
|
}]
|
|
71826
72293
|
}
|
|
71827
72294
|
});
|
|
71828
|
-
export { ALLOCATION_CUSTOM, ASCII_SPECIAL_PASSWORD_RULES, ActionBarComponent, AddressInputComponent, AlertComponent, AppShellComponent, AudioPlayerComponent, AvatarComponent, BADGE_VARIANT_STYLES, BadgeComponent, BankAccountFormComponent, BarRowComponent, BoardCardDirective, BoardComponent, BulkMessagePanelComponent, BusinessHoursComponent, ButtonComponent, COMMON_DETAIL_GROUP_STYLES, CalendarComponent, CardListItemComponent, ChargeFormComponent, CheckboxComponent, CheckboxTrailingDirective, ChipComponent, ChipGroupComponent, ColorInputComponent, ColumnFilterComponent, ColumnsComponent, ComboboxComponent, ConfirmAfterCheckService, ConfirmOutletComponent, ConfirmService, ContactPickerComponent, ConversationRichBodyComponent, ConversationsComponent, CopyFieldComponent, DEFAULT_ALLOCATION_MODES, DEFAULT_BANK_ACCOUNT_TYPE_OPTIONS, DEFAULT_BANK_HOLDER_TYPE_OPTIONS, DEFAULT_BANK_MANDATE_TEXT, DEFAULT_EMAIL_TEMPLATE_BLOCK_GROUPS, DEFAULT_EMAIL_TEMPLATE_VARIABLE_GROUPS, DEFAULT_PASSWORD_RULES, DEFAULT_PAYMENT_METHODS, DEFAULT_REFUND_REASONS, DETAIL_CARD_HEADER_BG, DETAIL_GROUP_HEADER_BG, DROPDOWN_GROUP, DataTableComponent, DateInputComponent, DateRangePickerComponent, DatetimeInputComponent, DetailCardComponent, DiscountSelectorComponent, DividerComponent, DropdownComponent, EMAIL_BLOCK_DRAG_TYPE, EMAIL_TEMPLATE_MAX_BODY, EMAIL_TEMPLATE_MAX_TEXT, EMAIL_TEMPLATE_START_TEXT, EMBEDDING_PARENT, EmailTemplateEditorComponent, EmptyStateComponent, ErrorComponent, ErrorStateComponent, FORGEROUTE_CONFIG, FadeComponent, FileInputComponent, FillViewportDirective, FixedFooterComponent, FormColSpanDirective, FormComponent, FormRowComponent, FormSectionComponent, HintComponent, ICON_NAMES, IDX_BEHAVIOR_SIGNALS, IDX_BEHAVIOR_SIGNALS_ES, INTEGRATION_CATALOG, INTEGRATION_FIELD_DEFS, INTEGRATION_FIELD_TEXTS_ES, INTEGRATION_GROUP_LABELS_ES, INTEGRATION_GROUP_ORDER, INTEGRATION_OPTION_DEFS, INTEGRATION_OPTION_TEXTS_ES, INTEGRATION_TEXTS_ES, IconComponent, IconPickerComponent, ImageComponent, ImageGalleryComponent, ImageGalleryDialogComponent, ImagePreviewComponent, ImageRepositionComponent, ImportExportComponent, ImportSourceGridComponent, InspectionTemplatePrintService, KanbanBoardComponent, KanbanCardDirective, KeypadComponent, KpiCardComponent, LAYOUT_GAP_PX, LISTED_SPECIAL_PASSWORD_RULES, ListComponent, ListItemComponent, LiveRegionComponent, MAX_EMAIL_ADDRESS_LENGTH, MAX_PAYMENT_AMOUNT, MIN_PAYMENT_AMOUNT, ModalComponent, ModuleLabelsRegistry, MoreMenuComponent, MultiSelectComponent, NOTES_MAX_LENGTH, NotesComponent, NotificationBellComponent, OfflineBannerComponent, OptionCardComponent, PASSWORD_MAX_BYTES, PASSWORD_MAX_LENGTH, PAYMENT_METHOD, PAYMENT_METHOD_PLUGIN, PHONE_NUMBER_AREA_CODE_LENGTH, PHONE_NUMBER_ZIP_LENGTH, PageComponent, PaginationComponent, PanelInfoListComponent, PasswordRequirementsComponent, PaymentCustomMethodComponent, PaymentMethodPlugin, PaymentSidePanelComponent, PdfHotspotComponent, PhoneNumberPickerComponent, PillTabPanelDirective, PillTabsComponent, PrintService, ProgressBarComponent, ProgressRingComponent, QrCodeComponent, QuickFilterTabsComponent, RICH_TEXT_OPTIONS, RadioComponent, RadioGroupComponent, RadioMatrixComponent, RadioOptionContentDirective, ReadonlyFieldsetComponent, RefundPanelComponent, ReminderAlertsComponent, RichTextEditorComponent, SEMANTIC_BADGE_MAP, SEMANTIC_BADGE_MAP_ES, SETUP_DONE_KEY, SETUP_INTEGRATIONS, SearchInputComponent, SectionHeaderComponent, SelectComponent, SetupWizardComponent, SetupWizardStepDirective, SetupWizardStepHeaderDirective, ShareMenuComponent, ShowComponent, SidePanelComponent, SidebarLayoutComponent, SignaturePadComponent, SkeletonComponent, SkipLinkComponent, SnackbarComponent, SnackbarService, StackComponent, StackedBarComponent, StarComponent, StarRatingComponent, StepperComponent, SwatchPickerComponent, TableToolbarComponent, TextComponent, TextInputComponent, TextTemplatePickerComponent, TextareaInputComponent, TimeInputComponent, TimelineComponent, ToastComponent, ToastService, ToggleBadgeComponent, ToggleComponent, TooltipDirective, TourComponent, UI_DEFAULT_LABELS, UI_LANGUAGE_AUTO, UI_LANGUAGE_CONFIG, UI_NOTES_QUEUE, US_LOCATIONS, US_STATES, US_STATE_OPTIONS, US_ZIP_PATTERN, UiFieldValidity, UiLabelsService, UiLanguageService, UiLanguageSwitcherComponent, acceptLabel, appShellGroupsStorageKey, assertModuleLabelParity, autoVariant, blockHasContent, buildDefaultSchedule, buildInspectionTemplateHtml, buildMapsEmbedUrl, buildMapsUrl, buildPreviewDocument, buildVideoBlockHtml, builtInActionIcon, businessTimeOptions, callHost, conversationDateLabel, conversationHtmlToText, conversationInitial, conversationMessageStatusLabel, conversationMessageStatusMark, createFieldReveal, createModuleLabels, createPasswordPolicyValidator, csvCell, csvSafeText, decodeFilterValues, defaultChargeAmount, defaultLabel, digitsOnly, downloadBlob, downloadCsv, emailShareUrl, emptyAddress, encodeFilterValue, encodeFilterValues, errorContextInterceptor, escapeHtml, facebookShareUrl, fileMatchesAccept, fileNameFromContentDisposition, formatAddress, formatAddressValue, formatAddressValueOneLine, formatAttachmentSize, formatCategoryLabel, formatConversationPhone, formatConversationTime, formatCurrency, formatDuration, formatEnum, formatFileSize, formatIsoDate, formatIsoDateTime, formatMessageTime, formatPhone, formatPhoneDisplay, formatShortDate, formatTime, formatTimeAgo, formatVideoDuration, getEligibleIds, getEligibleOptions, getErrorMessage, getInitials, gmailShareUrl, groupMessagesByDay, hostErrorMessage, humanReadableMessage, iconPath, injectModuleLabels, insideEditorBlock, inspectionTemplateStatusLabel, integrationGroupLabel, integrationPlainText, integrationsForApp, integrationsOnlyFor, isBlockDrag, isEmptyAddress, isValidAmount, isValidEmailAddress, isValidZip, isWebUrl, isoKey, issueToErrors, last4Error, linkedInShareUrl, loadUiLabels, localizeIntegration, localizeIntegrationFields, localizeIntegrationOptions, localizedAllocationModes, localizedDetailGroupStyle, localizedEmailBlockGroups, localizedEmailVariableGroups, localizedIdxBehaviorSignals, localizedIntegrationDescription, localizedIntegrationTitle, localizedPaymentMethods, maxLengthIssue, mergeDescribedBy, moduleLabelsTesting, normalizeAddress, normalizeHexColor, outlookShareUrl, parseAddressOneLine, parseAddressValue, parseBizHours, parseIso, parseTime, passwordByteLength, passwordMeetsRules, passwordTooLongMessage, passwordWithinLimits, periodGroup, pillTabDescriptionId, pillTabId, pillTabPanelId, pillTabTitleId, pluralize, provideForgerouteToast, provideModuleLabelOverrides, provideUiLanguage, reorderItems, requiredIssue, resolveLayoutGap, resolvePreset, safeLocale, semanticBadgeVariant, serializeBizHours, serializedTextLength, setupIntegrations, splitIntro, terminalTimeoutText, terminalVerdict, timelineItemsFromEvents, toCsv, todayInTimezone, truncateConversationText, uiCurrencyFormatter, uiFormatClock, uiFormatCurrency, uiFormatDate, uiFormatHour, uiFormatNumber, uiLocale, uiMonthName, uiText, uiWeekdayName, usStateName, usdCurrencyDisplay, xShareUrl };
|
|
72295
|
+
export { ALLOCATION_CUSTOM, ASCII_SPECIAL_PASSWORD_RULES, ActionBarComponent, AddressInputComponent, AlertComponent, AppShellComponent, AudioPlayerComponent, AvatarComponent, BADGE_VARIANT_STYLES, BadgeComponent, BankAccountFormComponent, BarRowComponent, BoardCardDirective, BoardComponent, BulkMessagePanelComponent, BusinessHoursComponent, ButtonComponent, COMMON_DETAIL_GROUP_STYLES, CalendarComponent, CardListItemComponent, ChargeFormComponent, CheckboxComponent, CheckboxTrailingDirective, ChipComponent, ChipGroupComponent, ColorInputComponent, ColumnFilterComponent, ColumnsComponent, ComboboxComponent, ConfirmAfterCheckService, ConfirmOutletComponent, ConfirmService, ContactPickerComponent, ConversationRichBodyComponent, ConversationsComponent, CopyFieldComponent, DEFAULT_ALLOCATION_MODES, DEFAULT_BANK_ACCOUNT_TYPE_OPTIONS, DEFAULT_BANK_HOLDER_TYPE_OPTIONS, DEFAULT_BANK_MANDATE_TEXT, DEFAULT_EMAIL_TEMPLATE_BLOCK_GROUPS, DEFAULT_EMAIL_TEMPLATE_VARIABLE_GROUPS, DEFAULT_PASSWORD_RULES, DEFAULT_PAYMENT_METHODS, DEFAULT_REFUND_REASONS, DETAIL_CARD_HEADER_BG, DETAIL_GROUP_HEADER_BG, DROPDOWN_GROUP, DataTableComponent, DateInputComponent, DateRangePickerComponent, DatetimeInputComponent, DetailCardComponent, DiscountSelectorComponent, DividerComponent, DropdownComponent, EMAIL_BLOCK_DRAG_TYPE, EMAIL_TEMPLATE_MAX_BODY, EMAIL_TEMPLATE_MAX_TEXT, EMAIL_TEMPLATE_START_TEXT, EMBEDDING_PARENT, EmailTemplateEditorComponent, EmptyStateComponent, ErrorComponent, ErrorStateComponent, FORGEROUTE_CONFIG, FadeComponent, FileInputComponent, FillViewportDirective, FixedFooterComponent, FormColSpanDirective, FormComponent, FormRowComponent, FormSectionComponent, HintComponent, ICON_NAMES, IDX_BEHAVIOR_SIGNALS, IDX_BEHAVIOR_SIGNALS_ES, INTEGRATION_CATALOG, INTEGRATION_FIELD_DEFS, INTEGRATION_FIELD_TEXTS_ES, INTEGRATION_GROUP_LABELS_ES, INTEGRATION_GROUP_ORDER, INTEGRATION_OPTION_DEFS, INTEGRATION_OPTION_TEXTS_ES, INTEGRATION_TEXTS_ES, IconComponent, IconPickerComponent, ImageComponent, ImageGalleryComponent, ImageGalleryDialogComponent, ImagePreviewComponent, ImageRepositionComponent, ImportExportComponent, ImportSourceGridComponent, InspectionTemplatePrintService, KanbanBoardComponent, KanbanCardDirective, KeypadComponent, KpiCardComponent, LAYOUT_GAP_PX, LISTED_SPECIAL_PASSWORD_RULES, ListComponent, ListItemComponent, LiveRegionComponent, MAX_EMAIL_ADDRESS_LENGTH, MAX_PAYMENT_AMOUNT, MIN_PAYMENT_AMOUNT, ModalComponent, ModuleLabelsRegistry, MoreMenuComponent, MultiSelectComponent, NOTES_MAX_LENGTH, NotesComponent, NotificationBellComponent, OfflineBannerComponent, OptionCardComponent, PASSWORD_MAX_BYTES, PASSWORD_MAX_LENGTH, PAYMENT_METHOD, PAYMENT_METHOD_PLUGIN, PHONE_NUMBER_AREA_CODE_LENGTH, PHONE_NUMBER_ZIP_LENGTH, PageComponent, PaginationComponent, PanelInfoListComponent, PasswordRequirementsComponent, PaymentCustomMethodComponent, PaymentMethodPlugin, PaymentSidePanelComponent, PdfHotspotComponent, PhoneNumberPickerComponent, PillTabPanelDirective, PillTabsComponent, PrintService, ProgressBarComponent, ProgressRingComponent, QrCodeComponent, QuickFilterTabsComponent, RICH_TEXT_OPTIONS, RadioComponent, RadioGroupComponent, RadioMatrixComponent, RadioOptionContentDirective, ReadonlyFieldsetComponent, RefundPanelComponent, ReminderAlertsComponent, RichTextEditorComponent, SEMANTIC_BADGE_MAP, SEMANTIC_BADGE_MAP_ES, SETUP_DONE_KEY, SETUP_INTEGRATIONS, SearchInputComponent, SectionHeaderComponent, SelectComponent, SetupWizardComponent, SetupWizardStepDirective, SetupWizardStepHeaderDirective, ShareMenuComponent, ShowComponent, SidePanelComponent, SidebarLayoutComponent, SignaturePadComponent, SkeletonComponent, SkipLinkComponent, SnackbarComponent, SnackbarService, StackComponent, StackedBarComponent, StackingPlanComponent, StarComponent, StarRatingComponent, StepperComponent, SwatchPickerComponent, TableToolbarComponent, TextComponent, TextInputComponent, TextTemplatePickerComponent, TextareaInputComponent, TimeInputComponent, TimelineComponent, ToastComponent, ToastService, ToggleBadgeComponent, ToggleComponent, TooltipDirective, TourComponent, UI_DEFAULT_LABELS, UI_LANGUAGE_AUTO, UI_LANGUAGE_CONFIG, UI_NOTES_QUEUE, US_LOCATIONS, US_STATES, US_STATE_OPTIONS, US_ZIP_PATTERN, UiFieldValidity, UiLabelsService, UiLanguageService, UiLanguageSwitcherComponent, acceptLabel, appShellGroupsStorageKey, assertModuleLabelParity, autoVariant, blockHasContent, buildDefaultSchedule, buildInspectionTemplateHtml, buildMapsEmbedUrl, buildMapsUrl, buildPreviewDocument, buildVideoBlockHtml, builtInActionIcon, businessTimeOptions, callHost, conversationDateLabel, conversationHtmlToText, conversationInitial, conversationMessageStatusLabel, conversationMessageStatusMark, createFieldReveal, createModuleLabels, createPasswordPolicyValidator, csvCell, csvSafeText, decodeFilterValues, defaultChargeAmount, defaultLabel, digitsOnly, downloadBlob, downloadCsv, emailShareUrl, emptyAddress, encodeFilterValue, encodeFilterValues, errorContextInterceptor, escapeHtml, facebookShareUrl, fileMatchesAccept, fileNameFromContentDisposition, formatAddress, formatAddressValue, formatAddressValueOneLine, formatAttachmentSize, formatCategoryLabel, formatConversationPhone, formatConversationTime, formatCurrency, formatDuration, formatEnum, formatFileSize, formatIsoDate, formatIsoDateTime, formatMessageTime, formatPhone, formatPhoneDisplay, formatShortDate, formatTime, formatTimeAgo, formatVideoDuration, getEligibleIds, getEligibleOptions, getErrorMessage, getInitials, gmailShareUrl, groupMessagesByDay, hostErrorMessage, humanReadableMessage, iconPath, injectModuleLabels, insideEditorBlock, inspectionTemplateStatusLabel, integrationGroupLabel, integrationPlainText, integrationsForApp, integrationsOnlyFor, isBlockDrag, isEmptyAddress, isValidAmount, isValidEmailAddress, isValidZip, isWebUrl, isoKey, issueToErrors, last4Error, linkedInShareUrl, loadUiLabels, localizeIntegration, localizeIntegrationFields, localizeIntegrationOptions, localizedAllocationModes, localizedDetailGroupStyle, localizedEmailBlockGroups, localizedEmailVariableGroups, localizedIdxBehaviorSignals, localizedIntegrationDescription, localizedIntegrationTitle, localizedPaymentMethods, maxLengthIssue, mergeDescribedBy, moduleLabelsTesting, normalizeAddress, normalizeHexColor, outlookShareUrl, parseAddressOneLine, parseAddressValue, parseBizHours, parseIso, parseTime, passwordByteLength, passwordMeetsRules, passwordTooLongMessage, passwordWithinLimits, periodGroup, pillTabDescriptionId, pillTabId, pillTabPanelId, pillTabTitleId, pluralize, provideForgerouteToast, provideModuleLabelOverrides, provideUiLanguage, reorderItems, requiredIssue, resolveLayoutGap, resolvePreset, safeLocale, semanticBadgeVariant, serializeBizHours, serializedTextLength, setupIntegrations, splitIntro, terminalTimeoutText, terminalVerdict, timelineItemsFromEvents, toCsv, todayInTimezone, truncateConversationText, uiCurrencyFormatter, uiFormatClock, uiFormatCurrency, uiFormatDate, uiFormatHour, uiFormatNumber, uiLocale, uiMonthName, uiText, uiWeekdayName, usStateName, usdCurrencyDisplay, xShareUrl };
|
|
71829
72296
|
|
|
71830
72297
|
//# sourceMappingURL=forgeroute-ui.mjs.map
|