@forgeroute/ui 0.4.73 → 0.4.75
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-messaging.mjs +139 -7
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +10 -2
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +1766 -285
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +51 -2
- package/types/forgeroute-ui-stripe.d.ts +1 -1
- package/types/forgeroute-ui.d.ts +482 -36
|
@@ -1385,15 +1385,49 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1385
1385
|
}]
|
|
1386
1386
|
}
|
|
1387
1387
|
});
|
|
1388
|
+
const HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
1389
|
+
const BADGE_INK_DARK = "#0f172a";
|
|
1390
|
+
const BADGE_INK_LIGHT = "#ffffff";
|
|
1391
|
+
function normalizeBadgeColor(value) {
|
|
1392
|
+
const raw = (value ?? "").trim();
|
|
1393
|
+
if (!HEX.test(raw)) return null;
|
|
1394
|
+
const hex = raw.slice(1).toLowerCase();
|
|
1395
|
+
return "#" + (hex.length === 3 ? hex.split("").map((c) => c + c).join("") : hex);
|
|
1396
|
+
}
|
|
1397
|
+
function channel(v) {
|
|
1398
|
+
const s = v / 255;
|
|
1399
|
+
return s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4);
|
|
1400
|
+
}
|
|
1401
|
+
function relativeLuminance(hex) {
|
|
1402
|
+
const n = parseInt(hex.slice(1), 16);
|
|
1403
|
+
return .2126 * channel(n >> 16 & 255) + .7152 * channel(n >> 8 & 255) + .0722 * channel(n & 255);
|
|
1404
|
+
}
|
|
1405
|
+
function contrastRatio(a, b) {
|
|
1406
|
+
const la = relativeLuminance(a), lb = relativeLuminance(b);
|
|
1407
|
+
const [hi, lo] = la >= lb ? [la, lb] : [lb, la];
|
|
1408
|
+
return (hi + .05) / (lo + .05);
|
|
1409
|
+
}
|
|
1410
|
+
function readableInk(background) {
|
|
1411
|
+
return contrastRatio(background, "#0f172a") >= contrastRatio(background, "#ffffff") ? BADGE_INK_DARK : BADGE_INK_LIGHT;
|
|
1412
|
+
}
|
|
1413
|
+
function customBadgeStyles(value) {
|
|
1414
|
+
const bg = normalizeBadgeColor(value);
|
|
1415
|
+
return bg ? {
|
|
1416
|
+
bg,
|
|
1417
|
+
color: readableInk(bg)
|
|
1418
|
+
} : null;
|
|
1419
|
+
}
|
|
1388
1420
|
var BadgeComponent = class BadgeComponent {
|
|
1389
1421
|
constructor() {
|
|
1390
1422
|
this.label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
1391
1423
|
this.variant = input(null, ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
1424
|
+
this.color = input(null, ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
|
|
1392
1425
|
this.resolvedVariant = computed(() => {
|
|
1393
1426
|
if (this.variant()) return this.variant();
|
|
1394
1427
|
return SEMANTIC_BADGE_MAP[this.label()] ?? autoVariant(this.label());
|
|
1395
1428
|
}, ...ngDevMode ? [{ debugName: "resolvedVariant" }] : /* istanbul ignore next */ []);
|
|
1396
|
-
this.
|
|
1429
|
+
this.customStyles = computed(() => customBadgeStyles(this.color()), ...ngDevMode ? [{ debugName: "customStyles" }] : /* istanbul ignore next */ []);
|
|
1430
|
+
this.styles = computed(() => this.customStyles() ?? BADGE_VARIANT_STYLES[this.resolvedVariant()] ?? BADGE_VARIANT_STYLES["gray"], ...ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []);
|
|
1397
1431
|
}
|
|
1398
1432
|
static {
|
|
1399
1433
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -1426,13 +1460,20 @@ var BadgeComponent = class BadgeComponent {
|
|
|
1426
1460
|
isSignal: true,
|
|
1427
1461
|
isRequired: false,
|
|
1428
1462
|
transformFunction: null
|
|
1463
|
+
},
|
|
1464
|
+
color: {
|
|
1465
|
+
classPropertyName: "color",
|
|
1466
|
+
publicName: "color",
|
|
1467
|
+
isSignal: true,
|
|
1468
|
+
isRequired: false,
|
|
1469
|
+
transformFunction: null
|
|
1429
1470
|
}
|
|
1430
1471
|
},
|
|
1431
1472
|
ngImport: i0,
|
|
1432
1473
|
template: `
|
|
1433
1474
|
<span
|
|
1434
1475
|
class="badge"
|
|
1435
|
-
[class.badge-gray]="resolvedVariant() === 'gray'"
|
|
1476
|
+
[class.badge-gray]="!customStyles() && resolvedVariant() === 'gray'"
|
|
1436
1477
|
[style.background]="styles().bg"
|
|
1437
1478
|
[style.color]="styles().color">
|
|
1438
1479
|
{{ label() }}
|
|
@@ -1458,7 +1499,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1458
1499
|
template: `
|
|
1459
1500
|
<span
|
|
1460
1501
|
class="badge"
|
|
1461
|
-
[class.badge-gray]="resolvedVariant() === 'gray'"
|
|
1502
|
+
[class.badge-gray]="!customStyles() && resolvedVariant() === 'gray'"
|
|
1462
1503
|
[style.background]="styles().bg"
|
|
1463
1504
|
[style.color]="styles().color">
|
|
1464
1505
|
{{ label() }}
|
|
@@ -1483,6 +1524,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1483
1524
|
alias: "variant",
|
|
1484
1525
|
required: false
|
|
1485
1526
|
}]
|
|
1527
|
+
}],
|
|
1528
|
+
color: [{
|
|
1529
|
+
type: i0.Input,
|
|
1530
|
+
args: [{
|
|
1531
|
+
isSignal: true,
|
|
1532
|
+
alias: "color",
|
|
1533
|
+
required: false
|
|
1534
|
+
}]
|
|
1486
1535
|
}]
|
|
1487
1536
|
}
|
|
1488
1537
|
});
|
|
@@ -1829,6 +1878,9 @@ const BUILT_IN_ICONS = {
|
|
|
1829
1878
|
"create-invoice": "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8",
|
|
1830
1879
|
"create-estimate": "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M12 18v-6 M9 15h6",
|
|
1831
1880
|
"add-note": "M12 20h9 M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z",
|
|
1881
|
+
"history": "M3 3v5h5 M3.05 13A9 9 0 1 0 6 5.3L3 8 M12 7v5l4 2",
|
|
1882
|
+
"move-up": "M12 19V5 M5 12l7-7 7 7",
|
|
1883
|
+
"move-down": "M12 5v14 M19 12l-7 7-7-7",
|
|
1832
1884
|
"invite-portal": "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z M15 9l3 3-3 3 M18 12H8"
|
|
1833
1885
|
};
|
|
1834
1886
|
function builtInActionIcon(type) {
|
|
@@ -2085,6 +2137,7 @@ var MoreMenuComponent = class MoreMenuComponent {
|
|
|
2085
2137
|
<div class="mm-wrapper">
|
|
2086
2138
|
<button
|
|
2087
2139
|
class="mm-trigger"
|
|
2140
|
+
data-testid="more-menu-trigger"
|
|
2088
2141
|
[attr.aria-expanded]="open()"
|
|
2089
2142
|
aria-haspopup="menu"
|
|
2090
2143
|
[attr.aria-label]="ariaLabel()"
|
|
@@ -2101,6 +2154,7 @@ var MoreMenuComponent = class MoreMenuComponent {
|
|
|
2101
2154
|
@for (action of visibleActions(); track action.type) {
|
|
2102
2155
|
<button
|
|
2103
2156
|
class="mm-item"
|
|
2157
|
+
data-testid="more-menu-item"
|
|
2104
2158
|
[class.mm-danger]="action.variant === 'danger'"
|
|
2105
2159
|
[disabled]="isDisabled(action)"
|
|
2106
2160
|
role="menuitem"
|
|
@@ -2141,6 +2195,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2141
2195
|
<div class="mm-wrapper">
|
|
2142
2196
|
<button
|
|
2143
2197
|
class="mm-trigger"
|
|
2198
|
+
data-testid="more-menu-trigger"
|
|
2144
2199
|
[attr.aria-expanded]="open()"
|
|
2145
2200
|
aria-haspopup="menu"
|
|
2146
2201
|
[attr.aria-label]="ariaLabel()"
|
|
@@ -2157,6 +2212,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2157
2212
|
@for (action of visibleActions(); track action.type) {
|
|
2158
2213
|
<button
|
|
2159
2214
|
class="mm-item"
|
|
2215
|
+
data-testid="more-menu-item"
|
|
2160
2216
|
[class.mm-danger]="action.variant === 'danger'"
|
|
2161
2217
|
[disabled]="isDisabled(action)"
|
|
2162
2218
|
role="menuitem"
|
|
@@ -4647,6 +4703,8 @@ const EXTRA_ICONS = {
|
|
|
4647
4703
|
"refresh": "M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15",
|
|
4648
4704
|
"search": "M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35",
|
|
4649
4705
|
"cup": "M18 8h1a4 4 0 0 1 0 8h-1 M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z M6 1v3 M10 1v3 M14 1v3",
|
|
4706
|
+
"cash": "M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M6 12h.01 M18 12h.01",
|
|
4707
|
+
"dollar": "M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",
|
|
4650
4708
|
"wrench": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"
|
|
4651
4709
|
};
|
|
4652
4710
|
const ICON_NAMES = Object.freeze(Object.keys(EXTRA_ICONS));
|
|
@@ -7413,7 +7471,7 @@ var ProgressBarComponent = class ProgressBarComponent {
|
|
|
7413
7471
|
</div>
|
|
7414
7472
|
`,
|
|
7415
7473
|
isInline: true,
|
|
7416
|
-
styles: [":host{display:block}.pb{display:flex;align-items:center;gap:8px;min-width:100px}.pb-track{flex:1;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}.pb-fill{height:100%;border-radius:3px;transition:width .3s}@media(prefers-reduced-motion:reduce){.pb-fill{transition:none}}.pb-blue{background:var(--ui-progress-fill, var(--ui-accent, #3b82f6))}.pb-green{background:#16a34a}.pb-amber{background:#f59e0b}.pb-red{background:#ef4444}.pb-slate{background:#94a3b8}@media(forced-colors:active){.pb-track{background:Canvas;border:1px solid CanvasText}.pb-fill{background:Highlight;forced-color-adjust:none}}.pb-label{font-size:.75rem;font-weight:500;color:#64748b;white-space:nowrap}\n"],
|
|
7474
|
+
styles: [":host{display:block}.pb{display:flex;align-items:center;gap:8px;min-width:100px}.pb-track{flex:1;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}.pb-fill{height:100%;border-radius:3px;transition:width .3s}@media(prefers-reduced-motion:reduce){.pb-fill{transition:none}}.pb-blue{background:var(--ui-progress-fill, var(--ui-accent, #3b82f6))}.pb-green{background:#16a34a}.pb-amber{background:#f59e0b}.pb-orange{background:#f97316}.pb-red{background:#ef4444}.pb-slate{background:#94a3b8}@media(forced-colors:active){.pb-track{background:Canvas;border:1px solid CanvasText}.pb-fill{background:Highlight;forced-color-adjust:none}}.pb-label{font-size:.75rem;font-weight:500;color:#64748b;white-space:nowrap}\n"],
|
|
7417
7475
|
dependencies: [{
|
|
7418
7476
|
kind: "directive",
|
|
7419
7477
|
type: TooltipDirective,
|
|
@@ -7451,7 +7509,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7451
7509
|
@if (label()) { <span class="pb-label">{{ label() }}</span> }
|
|
7452
7510
|
</div>
|
|
7453
7511
|
`,
|
|
7454
|
-
styles: [":host{display:block}.pb{display:flex;align-items:center;gap:8px;min-width:100px}.pb-track{flex:1;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}.pb-fill{height:100%;border-radius:3px;transition:width .3s}@media(prefers-reduced-motion:reduce){.pb-fill{transition:none}}.pb-blue{background:var(--ui-progress-fill, var(--ui-accent, #3b82f6))}.pb-green{background:#16a34a}.pb-amber{background:#f59e0b}.pb-red{background:#ef4444}.pb-slate{background:#94a3b8}@media(forced-colors:active){.pb-track{background:Canvas;border:1px solid CanvasText}.pb-fill{background:Highlight;forced-color-adjust:none}}.pb-label{font-size:.75rem;font-weight:500;color:#64748b;white-space:nowrap}\n"]
|
|
7512
|
+
styles: [":host{display:block}.pb{display:flex;align-items:center;gap:8px;min-width:100px}.pb-track{flex:1;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}.pb-fill{height:100%;border-radius:3px;transition:width .3s}@media(prefers-reduced-motion:reduce){.pb-fill{transition:none}}.pb-blue{background:var(--ui-progress-fill, var(--ui-accent, #3b82f6))}.pb-green{background:#16a34a}.pb-amber{background:#f59e0b}.pb-orange{background:#f97316}.pb-red{background:#ef4444}.pb-slate{background:#94a3b8}@media(forced-colors:active){.pb-track{background:Canvas;border:1px solid CanvasText}.pb-fill{background:Highlight;forced-color-adjust:none}}.pb-label{font-size:.75rem;font-weight:500;color:#64748b;white-space:nowrap}\n"]
|
|
7455
7513
|
}]
|
|
7456
7514
|
}],
|
|
7457
7515
|
propDecorators: {
|
|
@@ -9905,6 +9963,48 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9905
9963
|
}]
|
|
9906
9964
|
}
|
|
9907
9965
|
});
|
|
9966
|
+
var HintComponent = class HintComponent {
|
|
9967
|
+
static {
|
|
9968
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
9969
|
+
minVersion: "12.0.0",
|
|
9970
|
+
version: "22.2.2",
|
|
9971
|
+
ngImport: i0,
|
|
9972
|
+
type: HintComponent,
|
|
9973
|
+
deps: [],
|
|
9974
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
9975
|
+
});
|
|
9976
|
+
}
|
|
9977
|
+
static {
|
|
9978
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
9979
|
+
minVersion: "14.0.0",
|
|
9980
|
+
version: "22.2.2",
|
|
9981
|
+
type: HintComponent,
|
|
9982
|
+
isStandalone: true,
|
|
9983
|
+
selector: "ui-hint",
|
|
9984
|
+
ngImport: i0,
|
|
9985
|
+
template: `<p class="hint"><ng-content /></p>`,
|
|
9986
|
+
isInline: true,
|
|
9987
|
+
styles: [":host{display:block}.hint{font-size:.75rem;line-height:1.4;color:#64748b;margin:0}\n"],
|
|
9988
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
9989
|
+
});
|
|
9990
|
+
}
|
|
9991
|
+
};
|
|
9992
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
9993
|
+
minVersion: "12.0.0",
|
|
9994
|
+
version: "22.2.2",
|
|
9995
|
+
ngImport: i0,
|
|
9996
|
+
type: HintComponent,
|
|
9997
|
+
decorators: [{
|
|
9998
|
+
type: Component,
|
|
9999
|
+
args: [{
|
|
10000
|
+
selector: "ui-hint",
|
|
10001
|
+
standalone: true,
|
|
10002
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10003
|
+
template: `<p class="hint"><ng-content /></p>`,
|
|
10004
|
+
styles: [":host{display:block}.hint{font-size:.75rem;line-height:1.4;color:#64748b;margin:0}\n"]
|
|
10005
|
+
}]
|
|
10006
|
+
}]
|
|
10007
|
+
});
|
|
9908
10008
|
function detectCsvDelimiter(text) {
|
|
9909
10009
|
const counts = {
|
|
9910
10010
|
",": 0,
|
|
@@ -10014,6 +10114,7 @@ var ImportExportComponent = class ImportExportComponent {
|
|
|
10014
10114
|
this.importing = false;
|
|
10015
10115
|
this.importResult = null;
|
|
10016
10116
|
this.csvFile = null;
|
|
10117
|
+
this.idPrefix = `ie-ex-${ImportExportComponent.nextId++}-`;
|
|
10017
10118
|
this.destroyRef.onDestroy(() => this.stopImportTimer());
|
|
10018
10119
|
effect(() => {
|
|
10019
10120
|
const v = this._configInput();
|
|
@@ -10209,6 +10310,12 @@ var ImportExportComponent = class ImportExportComponent {
|
|
|
10209
10310
|
if (new Set(candidates).size === 1) this.columnMapping[field.key] = candidates[0];
|
|
10210
10311
|
}
|
|
10211
10312
|
}
|
|
10313
|
+
static {
|
|
10314
|
+
this.nextId = 0;
|
|
10315
|
+
}
|
|
10316
|
+
exampleId(field) {
|
|
10317
|
+
return this.idPrefix + field.key;
|
|
10318
|
+
}
|
|
10212
10319
|
get canSubmit() {
|
|
10213
10320
|
return (this.config.importFields ?? []).filter((f) => f.required).every((f) => !!this.columnMapping[f.key]);
|
|
10214
10321
|
}
|
|
@@ -10496,10 +10603,12 @@ var ImportExportComponent = class ImportExportComponent {
|
|
|
10496
10603
|
}
|
|
10497
10604
|
{{ field.label }}
|
|
10498
10605
|
@if (field.required) { <span class="ie-required" aria-hidden="true">*</span> }
|
|
10606
|
+
@if (field.example) { <ui-hint class="ie-field-example" [attr.id]="exampleId(field)">e.g. {{ field.example }}</ui-hint> }
|
|
10499
10607
|
</span>
|
|
10500
10608
|
<div role="cell">
|
|
10501
10609
|
<ui-select
|
|
10502
10610
|
[ariaLabel]="field.label + ' column' + (field.required ? ', required' : '')"
|
|
10611
|
+
[ariaDescribedBy]="field.example ? exampleId(field) : ''"
|
|
10503
10612
|
[options]="csvHeaderOptions"
|
|
10504
10613
|
[(ngModel)]="columnMapping[field.key]"
|
|
10505
10614
|
[error]="field.required && !columnMapping[field.key] ? 'Required' : ''" />
|
|
@@ -10653,7 +10762,7 @@ var ImportExportComponent = class ImportExportComponent {
|
|
|
10653
10762
|
</ui-modal>
|
|
10654
10763
|
`,
|
|
10655
10764
|
isInline: true,
|
|
10656
|
-
styles: [".ie-actions{display:flex;gap:8px}.ie-steps{display:flex;align-items:center;margin-bottom:24px;gap:0;list-style:none;padding:0}.ie-step{display:flex;align-items:center;gap:6px;flex-shrink:0}.ie-step-num{width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.ie-step-label{font-size:.8125rem;color:#64748b;font-weight:500}.ie-step.active .ie-step-num{background:#3b82f6;color:#fff}.ie-step.active .ie-step-label{color:#1e293b;font-weight:600}.ie-step.done .ie-step-num{background:#22c55e;color:#fff}.ie-step.done .ie-step-label{color:#64748b}.ie-step:not(:last-child){flex:1 1 auto}.ie-step:not(:last-child):after{content:\"\";flex:1;height:1px;background:#e2e8f0;margin:0 8px;min-width:16px}.ie-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-source-step{display:flex;flex-direction:column;gap:16px}.ie-upload-area{display:flex;flex-direction:column;gap:12px}.ie-template-hint{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.875rem;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 14px}.ie-file-hidden{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;overflow:hidden;cursor:pointer}.ie-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 24px;border:2px dashed #7c8ba1;border-radius:10px;cursor:pointer;transition:border-color .18s ease,background .18s ease}.ie-dropzone:hover,.ie-dropzone:focus-within{border-color:#3b82f6;background:#f0f7ff}.ie-dropzone:focus-within{outline:2px solid #3b82f6;outline-offset:2px}.ie-dropzone.has-error{border-color:#ef4444}.ie-dropzone-text{font-size:.9375rem;font-weight:600;color:#1e293b}.ie-dropzone-sub{font-size:.8125rem;color:#64748b}.ie-mapping{display:flex;flex-direction:column;gap:12px}.ie-mapping-hint{font-size:.875rem;color:#64748b;margin:0}.ie-mapping-success{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:.875rem;color:#15803d}.ie-mapping-success svg{flex-shrink:0;margin-top:1px;color:#16a34a}.ie-mapping-unmatched{display:flex;align-items:flex-start;gap:6px;font-size:.8125rem;color:#64748b;margin:0;padding-top:4px}.ie-mapping-unmatched svg{flex-shrink:0;margin-top:1px}.ie-mapping-unmatched em{font-style:normal;color:#475569}.ie-mapping-table{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.ie-mapping-header{display:grid;grid-template-columns:1fr 1fr 1fr;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase}.ie-mapping-row{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:start;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:8px}.ie-mapping-row:last-child{border-bottom:none}.ie-mapping-row.ie-mapping-row--required-missing{background:#fff7ed}.ie-mapping-row.ie-mapping-row--required-missing .ie-field-label{color:#c2410c}.ie-match-icon{color:#16a34a;margin-right:4px;vertical-align:-1px}.ie-field-label{display:flex;align-items:center;font-size:.875rem;color:#1e293b;font-weight:500}.ie-required{color:#dc2626;margin-left:2px}.ie-sample{font-size:.8125rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview{display:flex;flex-direction:column;gap:12px}.ie-preview-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.ie-preview-scroll:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ie-result:focus,.ie-source-step:focus,.ie-upload-area:focus,.ie-mapping:focus,.ie-preview:focus{outline:none}.ie-result-list{list-style:none;margin:0;padding:0}.ie-preview-table{width:100%;border-collapse:collapse;font-size:.8125rem}.ie-preview-table th{background:#f8fafc;padding:8px 12px;text-align:left;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;border-bottom:1px solid #e2e8f0;white-space:nowrap}.ie-preview-table td{padding:7px 12px;color:#1e293b;border-bottom:1px solid #f1f5f9;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview-table tr:last-child td{border-bottom:none}.ie-result{display:flex;flex-direction:column;gap:16px}.ie-result-summary{display:flex;flex-direction:column;gap:8px}.ie-result-stat{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:8px;font-size:.9375rem}.ie-result-stat.success{background:#f0fdf4;color:#15803d}.ie-result-stat.success svg{stroke:#22c55e}.ie-result-stat.error{background:#fef2f2;color:#b91c1c}.ie-result-stat.error svg{stroke:#ef4444}.ie-result-stat.warning{background:#fffbeb;color:#b45309}.ie-result-stat.warning svg{stroke:#f59e0b}.ie-progress{margin-top:14px}.ie-progress-track{height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden;position:relative}.ie-progress-bar{position:absolute;inset:0 auto 0 0;width:35%;border-radius:999px;background:#2563eb;animation:ie-progress-slide 1.2s ease-in-out infinite}.ie-progress-text{margin:8px 0 0;font-size:.8125rem;color:#475569}@keyframes ie-progress-slide{0%{left:-35%}to{left:100%}}@media(prefers-reduced-motion:reduce){.ie-progress-bar{animation:none;width:100%;opacity:.5}}.ie-errors-list{border:1px solid #fecaca;border-radius:8px;overflow:hidden}.ie-errors-title{font-size:.8125rem;font-weight:600;color:#b91c1c;padding:8px 12px;background:#fef2f2;margin:0;border-bottom:1px solid #fecaca}.ie-error-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fff1f2;font-size:.8125rem;color:#374151}.ie-error-row:last-child{border-bottom:none}.ie-error-row-num{font-weight:600;color:#b91c1c;flex-shrink:0}.ie-warnings-list{border:1px solid #fde68a;border-radius:8px;overflow:hidden}.ie-warnings-title{font-size:.8125rem;font-weight:600;color:#b45309;padding:8px 12px;background:#fffbeb;margin:0;border-bottom:1px solid #fde68a}.ie-warning-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fef3c7;font-size:.8125rem;color:#374151}.ie-warning-row:last-child{border-bottom:none}.ie-warning-row-num{font-weight:600;color:#b45309;flex-shrink:0}.ie-error{font-size:.875rem;color:#dc2626;margin:0}.ie-footer-right{display:flex;gap:8px;align-items:center}@media(max-width:600px){.ie-step-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-dropzone{padding:24px 16px}.ie-mapping-header{grid-template-columns:1fr 1fr}.ie-mapping-header span:last-child{display:none}.ie-mapping-row{grid-template-columns:1fr 1fr}.ie-mapping-row .ie-sample{display:none}}\n"],
|
|
10765
|
+
styles: [".ie-actions{display:flex;gap:8px}.ie-steps{display:flex;align-items:center;margin-bottom:24px;gap:0;list-style:none;padding:0}.ie-step{display:flex;align-items:center;gap:6px;flex-shrink:0}.ie-step-num{width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.ie-step-label{font-size:.8125rem;color:#64748b;font-weight:500}.ie-step.active .ie-step-num{background:#3b82f6;color:#fff}.ie-step.active .ie-step-label{color:#1e293b;font-weight:600}.ie-step.done .ie-step-num{background:#22c55e;color:#fff}.ie-step.done .ie-step-label{color:#64748b}.ie-step:not(:last-child){flex:1 1 auto}.ie-step:not(:last-child):after{content:\"\";flex:1;height:1px;background:#e2e8f0;margin:0 8px;min-width:16px}.ie-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-source-step{display:flex;flex-direction:column;gap:16px}.ie-upload-area{display:flex;flex-direction:column;gap:12px}.ie-template-hint{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.875rem;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 14px}.ie-file-hidden{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;overflow:hidden;cursor:pointer}.ie-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 24px;border:2px dashed #7c8ba1;border-radius:10px;cursor:pointer;transition:border-color .18s ease,background .18s ease}.ie-dropzone:hover,.ie-dropzone:focus-within{border-color:#3b82f6;background:#f0f7ff}.ie-dropzone:focus-within{outline:2px solid #3b82f6;outline-offset:2px}.ie-dropzone.has-error{border-color:#ef4444}.ie-dropzone-text{font-size:.9375rem;font-weight:600;color:#1e293b}.ie-dropzone-sub{font-size:.8125rem;color:#64748b}.ie-mapping{display:flex;flex-direction:column;gap:12px}.ie-mapping-hint{font-size:.875rem;color:#64748b;margin:0}.ie-mapping-success{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:.875rem;color:#15803d}.ie-mapping-success svg{flex-shrink:0;margin-top:1px;color:#16a34a}.ie-mapping-unmatched{display:flex;align-items:flex-start;gap:6px;font-size:.8125rem;color:#64748b;margin:0;padding-top:4px}.ie-mapping-unmatched svg{flex-shrink:0;margin-top:1px}.ie-mapping-unmatched em{font-style:normal;color:#475569}.ie-mapping-table{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.ie-mapping-header{display:grid;grid-template-columns:1fr 1fr 1fr;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase}.ie-mapping-row{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:start;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:8px}.ie-mapping-row:last-child{border-bottom:none}.ie-mapping-row.ie-mapping-row--required-missing{background:#fff7ed}.ie-mapping-row.ie-mapping-row--required-missing .ie-field-label{color:#c2410c}.ie-match-icon{color:#16a34a;margin-right:4px;vertical-align:-1px}.ie-field-label{display:flex;flex-wrap:wrap;align-items:center;font-size:.875rem;color:#1e293b;font-weight:500}.ie-field-example{flex-basis:100%;font-weight:400}.ie-required{color:#dc2626;margin-left:2px}.ie-sample{font-size:.8125rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview{display:flex;flex-direction:column;gap:12px}.ie-preview-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.ie-preview-scroll:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ie-result:focus,.ie-source-step:focus,.ie-upload-area:focus,.ie-mapping:focus,.ie-preview:focus{outline:none}.ie-result-list{list-style:none;margin:0;padding:0}.ie-preview-table{width:100%;border-collapse:collapse;font-size:.8125rem}.ie-preview-table th{background:#f8fafc;padding:8px 12px;text-align:left;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;border-bottom:1px solid #e2e8f0;white-space:nowrap}.ie-preview-table td{padding:7px 12px;color:#1e293b;border-bottom:1px solid #f1f5f9;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview-table tr:last-child td{border-bottom:none}.ie-result{display:flex;flex-direction:column;gap:16px}.ie-result-summary{display:flex;flex-direction:column;gap:8px}.ie-result-stat{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:8px;font-size:.9375rem}.ie-result-stat.success{background:#f0fdf4;color:#15803d}.ie-result-stat.success svg{stroke:#22c55e}.ie-result-stat.error{background:#fef2f2;color:#b91c1c}.ie-result-stat.error svg{stroke:#ef4444}.ie-result-stat.warning{background:#fffbeb;color:#b45309}.ie-result-stat.warning svg{stroke:#f59e0b}.ie-progress{margin-top:14px}.ie-progress-track{height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden;position:relative}.ie-progress-bar{position:absolute;inset:0 auto 0 0;width:35%;border-radius:999px;background:#2563eb;animation:ie-progress-slide 1.2s ease-in-out infinite}.ie-progress-text{margin:8px 0 0;font-size:.8125rem;color:#475569}@keyframes ie-progress-slide{0%{left:-35%}to{left:100%}}@media(prefers-reduced-motion:reduce){.ie-progress-bar{animation:none;width:100%;opacity:.5}}.ie-errors-list{border:1px solid #fecaca;border-radius:8px;overflow:hidden}.ie-errors-title{font-size:.8125rem;font-weight:600;color:#b91c1c;padding:8px 12px;background:#fef2f2;margin:0;border-bottom:1px solid #fecaca}.ie-error-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fff1f2;font-size:.8125rem;color:#374151}.ie-error-row:last-child{border-bottom:none}.ie-error-row-num{font-weight:600;color:#b91c1c;flex-shrink:0}.ie-warnings-list{border:1px solid #fde68a;border-radius:8px;overflow:hidden}.ie-warnings-title{font-size:.8125rem;font-weight:600;color:#b45309;padding:8px 12px;background:#fffbeb;margin:0;border-bottom:1px solid #fde68a}.ie-warning-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fef3c7;font-size:.8125rem;color:#374151}.ie-warning-row:last-child{border-bottom:none}.ie-warning-row-num{font-weight:600;color:#b45309;flex-shrink:0}.ie-error{font-size:.875rem;color:#dc2626;margin:0}.ie-footer-right{display:flex;gap:8px;align-items:center}@media(max-width:600px){.ie-step-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-dropzone{padding:24px 16px}.ie-mapping-header{grid-template-columns:1fr 1fr}.ie-mapping-header span:last-child{display:none}.ie-mapping-row{grid-template-columns:1fr 1fr}.ie-mapping-row .ie-sample{display:none}}\n"],
|
|
10657
10766
|
dependencies: [
|
|
10658
10767
|
{
|
|
10659
10768
|
kind: "ngmodule",
|
|
@@ -10764,6 +10873,11 @@ var ImportExportComponent = class ImportExportComponent {
|
|
|
10764
10873
|
"ariaLabel"
|
|
10765
10874
|
],
|
|
10766
10875
|
outputs: ["sourceSelect"]
|
|
10876
|
+
},
|
|
10877
|
+
{
|
|
10878
|
+
kind: "component",
|
|
10879
|
+
type: HintComponent,
|
|
10880
|
+
selector: "ui-hint"
|
|
10767
10881
|
}
|
|
10768
10882
|
],
|
|
10769
10883
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
@@ -10786,7 +10900,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10786
10900
|
ModalComponent,
|
|
10787
10901
|
ButtonComponent,
|
|
10788
10902
|
SelectComponent,
|
|
10789
|
-
ImportSourceGridComponent
|
|
10903
|
+
ImportSourceGridComponent,
|
|
10904
|
+
HintComponent
|
|
10790
10905
|
],
|
|
10791
10906
|
template: `
|
|
10792
10907
|
<!-- Trigger buttons -->
|
|
@@ -10872,10 +10987,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10872
10987
|
}
|
|
10873
10988
|
{{ field.label }}
|
|
10874
10989
|
@if (field.required) { <span class="ie-required" aria-hidden="true">*</span> }
|
|
10990
|
+
@if (field.example) { <ui-hint class="ie-field-example" [attr.id]="exampleId(field)">e.g. {{ field.example }}</ui-hint> }
|
|
10875
10991
|
</span>
|
|
10876
10992
|
<div role="cell">
|
|
10877
10993
|
<ui-select
|
|
10878
10994
|
[ariaLabel]="field.label + ' column' + (field.required ? ', required' : '')"
|
|
10995
|
+
[ariaDescribedBy]="field.example ? exampleId(field) : ''"
|
|
10879
10996
|
[options]="csvHeaderOptions"
|
|
10880
10997
|
[(ngModel)]="columnMapping[field.key]"
|
|
10881
10998
|
[error]="field.required && !columnMapping[field.key] ? 'Required' : ''" />
|
|
@@ -11028,7 +11145,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11028
11145
|
|
|
11029
11146
|
</ui-modal>
|
|
11030
11147
|
`,
|
|
11031
|
-
styles: [".ie-actions{display:flex;gap:8px}.ie-steps{display:flex;align-items:center;margin-bottom:24px;gap:0;list-style:none;padding:0}.ie-step{display:flex;align-items:center;gap:6px;flex-shrink:0}.ie-step-num{width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.ie-step-label{font-size:.8125rem;color:#64748b;font-weight:500}.ie-step.active .ie-step-num{background:#3b82f6;color:#fff}.ie-step.active .ie-step-label{color:#1e293b;font-weight:600}.ie-step.done .ie-step-num{background:#22c55e;color:#fff}.ie-step.done .ie-step-label{color:#64748b}.ie-step:not(:last-child){flex:1 1 auto}.ie-step:not(:last-child):after{content:\"\";flex:1;height:1px;background:#e2e8f0;margin:0 8px;min-width:16px}.ie-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-source-step{display:flex;flex-direction:column;gap:16px}.ie-upload-area{display:flex;flex-direction:column;gap:12px}.ie-template-hint{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.875rem;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 14px}.ie-file-hidden{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;overflow:hidden;cursor:pointer}.ie-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 24px;border:2px dashed #7c8ba1;border-radius:10px;cursor:pointer;transition:border-color .18s ease,background .18s ease}.ie-dropzone:hover,.ie-dropzone:focus-within{border-color:#3b82f6;background:#f0f7ff}.ie-dropzone:focus-within{outline:2px solid #3b82f6;outline-offset:2px}.ie-dropzone.has-error{border-color:#ef4444}.ie-dropzone-text{font-size:.9375rem;font-weight:600;color:#1e293b}.ie-dropzone-sub{font-size:.8125rem;color:#64748b}.ie-mapping{display:flex;flex-direction:column;gap:12px}.ie-mapping-hint{font-size:.875rem;color:#64748b;margin:0}.ie-mapping-success{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:.875rem;color:#15803d}.ie-mapping-success svg{flex-shrink:0;margin-top:1px;color:#16a34a}.ie-mapping-unmatched{display:flex;align-items:flex-start;gap:6px;font-size:.8125rem;color:#64748b;margin:0;padding-top:4px}.ie-mapping-unmatched svg{flex-shrink:0;margin-top:1px}.ie-mapping-unmatched em{font-style:normal;color:#475569}.ie-mapping-table{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.ie-mapping-header{display:grid;grid-template-columns:1fr 1fr 1fr;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase}.ie-mapping-row{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:start;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:8px}.ie-mapping-row:last-child{border-bottom:none}.ie-mapping-row.ie-mapping-row--required-missing{background:#fff7ed}.ie-mapping-row.ie-mapping-row--required-missing .ie-field-label{color:#c2410c}.ie-match-icon{color:#16a34a;margin-right:4px;vertical-align:-1px}.ie-field-label{display:flex;align-items:center;font-size:.875rem;color:#1e293b;font-weight:500}.ie-required{color:#dc2626;margin-left:2px}.ie-sample{font-size:.8125rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview{display:flex;flex-direction:column;gap:12px}.ie-preview-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.ie-preview-scroll:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ie-result:focus,.ie-source-step:focus,.ie-upload-area:focus,.ie-mapping:focus,.ie-preview:focus{outline:none}.ie-result-list{list-style:none;margin:0;padding:0}.ie-preview-table{width:100%;border-collapse:collapse;font-size:.8125rem}.ie-preview-table th{background:#f8fafc;padding:8px 12px;text-align:left;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;border-bottom:1px solid #e2e8f0;white-space:nowrap}.ie-preview-table td{padding:7px 12px;color:#1e293b;border-bottom:1px solid #f1f5f9;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview-table tr:last-child td{border-bottom:none}.ie-result{display:flex;flex-direction:column;gap:16px}.ie-result-summary{display:flex;flex-direction:column;gap:8px}.ie-result-stat{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:8px;font-size:.9375rem}.ie-result-stat.success{background:#f0fdf4;color:#15803d}.ie-result-stat.success svg{stroke:#22c55e}.ie-result-stat.error{background:#fef2f2;color:#b91c1c}.ie-result-stat.error svg{stroke:#ef4444}.ie-result-stat.warning{background:#fffbeb;color:#b45309}.ie-result-stat.warning svg{stroke:#f59e0b}.ie-progress{margin-top:14px}.ie-progress-track{height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden;position:relative}.ie-progress-bar{position:absolute;inset:0 auto 0 0;width:35%;border-radius:999px;background:#2563eb;animation:ie-progress-slide 1.2s ease-in-out infinite}.ie-progress-text{margin:8px 0 0;font-size:.8125rem;color:#475569}@keyframes ie-progress-slide{0%{left:-35%}to{left:100%}}@media(prefers-reduced-motion:reduce){.ie-progress-bar{animation:none;width:100%;opacity:.5}}.ie-errors-list{border:1px solid #fecaca;border-radius:8px;overflow:hidden}.ie-errors-title{font-size:.8125rem;font-weight:600;color:#b91c1c;padding:8px 12px;background:#fef2f2;margin:0;border-bottom:1px solid #fecaca}.ie-error-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fff1f2;font-size:.8125rem;color:#374151}.ie-error-row:last-child{border-bottom:none}.ie-error-row-num{font-weight:600;color:#b91c1c;flex-shrink:0}.ie-warnings-list{border:1px solid #fde68a;border-radius:8px;overflow:hidden}.ie-warnings-title{font-size:.8125rem;font-weight:600;color:#b45309;padding:8px 12px;background:#fffbeb;margin:0;border-bottom:1px solid #fde68a}.ie-warning-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fef3c7;font-size:.8125rem;color:#374151}.ie-warning-row:last-child{border-bottom:none}.ie-warning-row-num{font-weight:600;color:#b45309;flex-shrink:0}.ie-error{font-size:.875rem;color:#dc2626;margin:0}.ie-footer-right{display:flex;gap:8px;align-items:center}@media(max-width:600px){.ie-step-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-dropzone{padding:24px 16px}.ie-mapping-header{grid-template-columns:1fr 1fr}.ie-mapping-header span:last-child{display:none}.ie-mapping-row{grid-template-columns:1fr 1fr}.ie-mapping-row .ie-sample{display:none}}\n"]
|
|
11148
|
+
styles: [".ie-actions{display:flex;gap:8px}.ie-steps{display:flex;align-items:center;margin-bottom:24px;gap:0;list-style:none;padding:0}.ie-step{display:flex;align-items:center;gap:6px;flex-shrink:0}.ie-step-num{width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.ie-step-label{font-size:.8125rem;color:#64748b;font-weight:500}.ie-step.active .ie-step-num{background:#3b82f6;color:#fff}.ie-step.active .ie-step-label{color:#1e293b;font-weight:600}.ie-step.done .ie-step-num{background:#22c55e;color:#fff}.ie-step.done .ie-step-label{color:#64748b}.ie-step:not(:last-child){flex:1 1 auto}.ie-step:not(:last-child):after{content:\"\";flex:1;height:1px;background:#e2e8f0;margin:0 8px;min-width:16px}.ie-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-source-step{display:flex;flex-direction:column;gap:16px}.ie-upload-area{display:flex;flex-direction:column;gap:12px}.ie-template-hint{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.875rem;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 14px}.ie-file-hidden{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;overflow:hidden;cursor:pointer}.ie-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 24px;border:2px dashed #7c8ba1;border-radius:10px;cursor:pointer;transition:border-color .18s ease,background .18s ease}.ie-dropzone:hover,.ie-dropzone:focus-within{border-color:#3b82f6;background:#f0f7ff}.ie-dropzone:focus-within{outline:2px solid #3b82f6;outline-offset:2px}.ie-dropzone.has-error{border-color:#ef4444}.ie-dropzone-text{font-size:.9375rem;font-weight:600;color:#1e293b}.ie-dropzone-sub{font-size:.8125rem;color:#64748b}.ie-mapping{display:flex;flex-direction:column;gap:12px}.ie-mapping-hint{font-size:.875rem;color:#64748b;margin:0}.ie-mapping-success{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:.875rem;color:#15803d}.ie-mapping-success svg{flex-shrink:0;margin-top:1px;color:#16a34a}.ie-mapping-unmatched{display:flex;align-items:flex-start;gap:6px;font-size:.8125rem;color:#64748b;margin:0;padding-top:4px}.ie-mapping-unmatched svg{flex-shrink:0;margin-top:1px}.ie-mapping-unmatched em{font-style:normal;color:#475569}.ie-mapping-table{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.ie-mapping-header{display:grid;grid-template-columns:1fr 1fr 1fr;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase}.ie-mapping-row{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:start;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:8px}.ie-mapping-row:last-child{border-bottom:none}.ie-mapping-row.ie-mapping-row--required-missing{background:#fff7ed}.ie-mapping-row.ie-mapping-row--required-missing .ie-field-label{color:#c2410c}.ie-match-icon{color:#16a34a;margin-right:4px;vertical-align:-1px}.ie-field-label{display:flex;flex-wrap:wrap;align-items:center;font-size:.875rem;color:#1e293b;font-weight:500}.ie-field-example{flex-basis:100%;font-weight:400}.ie-required{color:#dc2626;margin-left:2px}.ie-sample{font-size:.8125rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview{display:flex;flex-direction:column;gap:12px}.ie-preview-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.ie-preview-scroll:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ie-result:focus,.ie-source-step:focus,.ie-upload-area:focus,.ie-mapping:focus,.ie-preview:focus{outline:none}.ie-result-list{list-style:none;margin:0;padding:0}.ie-preview-table{width:100%;border-collapse:collapse;font-size:.8125rem}.ie-preview-table th{background:#f8fafc;padding:8px 12px;text-align:left;font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;border-bottom:1px solid #e2e8f0;white-space:nowrap}.ie-preview-table td{padding:7px 12px;color:#1e293b;border-bottom:1px solid #f1f5f9;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ie-preview-table tr:last-child td{border-bottom:none}.ie-result{display:flex;flex-direction:column;gap:16px}.ie-result-summary{display:flex;flex-direction:column;gap:8px}.ie-result-stat{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:8px;font-size:.9375rem}.ie-result-stat.success{background:#f0fdf4;color:#15803d}.ie-result-stat.success svg{stroke:#22c55e}.ie-result-stat.error{background:#fef2f2;color:#b91c1c}.ie-result-stat.error svg{stroke:#ef4444}.ie-result-stat.warning{background:#fffbeb;color:#b45309}.ie-result-stat.warning svg{stroke:#f59e0b}.ie-progress{margin-top:14px}.ie-progress-track{height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden;position:relative}.ie-progress-bar{position:absolute;inset:0 auto 0 0;width:35%;border-radius:999px;background:#2563eb;animation:ie-progress-slide 1.2s ease-in-out infinite}.ie-progress-text{margin:8px 0 0;font-size:.8125rem;color:#475569}@keyframes ie-progress-slide{0%{left:-35%}to{left:100%}}@media(prefers-reduced-motion:reduce){.ie-progress-bar{animation:none;width:100%;opacity:.5}}.ie-errors-list{border:1px solid #fecaca;border-radius:8px;overflow:hidden}.ie-errors-title{font-size:.8125rem;font-weight:600;color:#b91c1c;padding:8px 12px;background:#fef2f2;margin:0;border-bottom:1px solid #fecaca}.ie-error-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fff1f2;font-size:.8125rem;color:#374151}.ie-error-row:last-child{border-bottom:none}.ie-error-row-num{font-weight:600;color:#b91c1c;flex-shrink:0}.ie-warnings-list{border:1px solid #fde68a;border-radius:8px;overflow:hidden}.ie-warnings-title{font-size:.8125rem;font-weight:600;color:#b45309;padding:8px 12px;background:#fffbeb;margin:0;border-bottom:1px solid #fde68a}.ie-warning-row{display:flex;gap:12px;padding:7px 12px;border-bottom:1px solid #fef3c7;font-size:.8125rem;color:#374151}.ie-warning-row:last-child{border-bottom:none}.ie-warning-row-num{font-weight:600;color:#b45309;flex-shrink:0}.ie-error{font-size:.875rem;color:#dc2626;margin:0}.ie-footer-right{display:flex;gap:8px;align-items:center}@media(max-width:600px){.ie-step-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.ie-dropzone{padding:24px 16px}.ie-mapping-header{grid-template-columns:1fr 1fr}.ie-mapping-header span:last-child{display:none}.ie-mapping-row{grid-template-columns:1fr 1fr}.ie-mapping-row .ie-sample{display:none}}\n"]
|
|
11032
11149
|
}]
|
|
11033
11150
|
}],
|
|
11034
11151
|
ctorParameters: () => [],
|
|
@@ -13991,7 +14108,9 @@ var DataTableComponent = class DataTableComponent {
|
|
|
13991
14108
|
<span class="dt-tags">
|
|
13992
14109
|
<ui-badge
|
|
13993
14110
|
[label]="tags[0].name"
|
|
13994
|
-
[variant]="tags[0].variant ?? null"
|
|
14111
|
+
[variant]="tags[0].variant ?? null"
|
|
14112
|
+
[color]="tags[0].color ?? null" />
|
|
14113
|
+
@if (tags[0].colorName) {<span class="dt-sr-only">, {{ tags[0].colorName }}</span>}
|
|
13995
14114
|
@if (tags.length > 1) {
|
|
13996
14115
|
<span
|
|
13997
14116
|
class="dt-tags-more"
|
|
@@ -14000,7 +14119,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14000
14119
|
(focus)="showTagTooltip($event, tags.slice(1))"
|
|
14001
14120
|
(blur)="hideTagTooltip()"
|
|
14002
14121
|
tabindex="0"
|
|
14003
|
-
[attr.aria-label]="tags.slice(1).map(t => t.name).join(', ')">
|
|
14122
|
+
[attr.aria-label]="tags.slice(1).map(t => t.colorName ? t.name + ' (' + t.colorName + ')' : t.name).join(', ')">
|
|
14004
14123
|
+{{ tags.length - 1 }}
|
|
14005
14124
|
</span>
|
|
14006
14125
|
}
|
|
@@ -14212,6 +14331,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14212
14331
|
<div class="dt-card-tags">
|
|
14213
14332
|
@for (tag of tagItems; track tag.name) {
|
|
14214
14333
|
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" size="sm" />
|
|
14334
|
+
@if (tag.colorName) {<span class="dt-sr-only">, {{ tag.colorName }}</span>}
|
|
14215
14335
|
}
|
|
14216
14336
|
</div>
|
|
14217
14337
|
}
|
|
@@ -14304,7 +14424,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14304
14424
|
[style.left.px]="_tagTooltip()!.x"
|
|
14305
14425
|
[style.top.px]="_tagTooltip()!.y">
|
|
14306
14426
|
@for (tag of _tagTooltip()!.tags; track tag.name) {
|
|
14307
|
-
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" />
|
|
14427
|
+
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" [color]="tag.color ?? null" />
|
|
14308
14428
|
}
|
|
14309
14429
|
</div>
|
|
14310
14430
|
}
|
|
@@ -14440,7 +14560,11 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14440
14560
|
kind: "component",
|
|
14441
14561
|
type: BadgeComponent,
|
|
14442
14562
|
selector: "ui-badge",
|
|
14443
|
-
inputs: [
|
|
14563
|
+
inputs: [
|
|
14564
|
+
"label",
|
|
14565
|
+
"variant",
|
|
14566
|
+
"color"
|
|
14567
|
+
]
|
|
14444
14568
|
},
|
|
14445
14569
|
{
|
|
14446
14570
|
kind: "component",
|
|
@@ -15081,7 +15205,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15081
15205
|
<span class="dt-tags">
|
|
15082
15206
|
<ui-badge
|
|
15083
15207
|
[label]="tags[0].name"
|
|
15084
|
-
[variant]="tags[0].variant ?? null"
|
|
15208
|
+
[variant]="tags[0].variant ?? null"
|
|
15209
|
+
[color]="tags[0].color ?? null" />
|
|
15210
|
+
@if (tags[0].colorName) {<span class="dt-sr-only">, {{ tags[0].colorName }}</span>}
|
|
15085
15211
|
@if (tags.length > 1) {
|
|
15086
15212
|
<span
|
|
15087
15213
|
class="dt-tags-more"
|
|
@@ -15090,7 +15216,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15090
15216
|
(focus)="showTagTooltip($event, tags.slice(1))"
|
|
15091
15217
|
(blur)="hideTagTooltip()"
|
|
15092
15218
|
tabindex="0"
|
|
15093
|
-
[attr.aria-label]="tags.slice(1).map(t => t.name).join(', ')">
|
|
15219
|
+
[attr.aria-label]="tags.slice(1).map(t => t.colorName ? t.name + ' (' + t.colorName + ')' : t.name).join(', ')">
|
|
15094
15220
|
+{{ tags.length - 1 }}
|
|
15095
15221
|
</span>
|
|
15096
15222
|
}
|
|
@@ -15302,6 +15428,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15302
15428
|
<div class="dt-card-tags">
|
|
15303
15429
|
@for (tag of tagItems; track tag.name) {
|
|
15304
15430
|
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" size="sm" />
|
|
15431
|
+
@if (tag.colorName) {<span class="dt-sr-only">, {{ tag.colorName }}</span>}
|
|
15305
15432
|
}
|
|
15306
15433
|
</div>
|
|
15307
15434
|
}
|
|
@@ -15394,7 +15521,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15394
15521
|
[style.left.px]="_tagTooltip()!.x"
|
|
15395
15522
|
[style.top.px]="_tagTooltip()!.y">
|
|
15396
15523
|
@for (tag of _tagTooltip()!.tags; track tag.name) {
|
|
15397
|
-
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" />
|
|
15524
|
+
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" [color]="tag.color ?? null" />
|
|
15398
15525
|
}
|
|
15399
15526
|
</div>
|
|
15400
15527
|
}
|
|
@@ -16002,8 +16129,8 @@ var SidePanelComponent = class SidePanelComponent {
|
|
|
16002
16129
|
<!-- Header -->
|
|
16003
16130
|
<div class="sp-header">
|
|
16004
16131
|
<div class="sp-header-text">
|
|
16005
|
-
<h2 class="sp-title" [id]="titleId">{{ title() }}</h2>
|
|
16006
|
-
@if (subtitle()) { <p class="sp-subtitle">{{ subtitle() }}</p> }
|
|
16132
|
+
<h2 class="sp-title" data-testid="side-panel-title" [id]="titleId">{{ title() }}</h2>
|
|
16133
|
+
@if (subtitle()) { <p class="sp-subtitle" data-testid="side-panel-subtitle">{{ subtitle() }}</p> }
|
|
16007
16134
|
</div>
|
|
16008
16135
|
<button class="sp-close" type="button" (click)="closed.emit()" aria-label="Dismiss panel">
|
|
16009
16136
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
@@ -16094,8 +16221,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16094
16221
|
<!-- Header -->
|
|
16095
16222
|
<div class="sp-header">
|
|
16096
16223
|
<div class="sp-header-text">
|
|
16097
|
-
<h2 class="sp-title" [id]="titleId">{{ title() }}</h2>
|
|
16098
|
-
@if (subtitle()) { <p class="sp-subtitle">{{ subtitle() }}</p> }
|
|
16224
|
+
<h2 class="sp-title" data-testid="side-panel-title" [id]="titleId">{{ title() }}</h2>
|
|
16225
|
+
@if (subtitle()) { <p class="sp-subtitle" data-testid="side-panel-subtitle">{{ subtitle() }}</p> }
|
|
16099
16226
|
</div>
|
|
16100
16227
|
<button class="sp-close" type="button" (click)="closed.emit()" aria-label="Dismiss panel">
|
|
16101
16228
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
@@ -20098,7 +20225,11 @@ var PhoneNumberPickerComponent = class PhoneNumberPickerComponent {
|
|
|
20098
20225
|
kind: "component",
|
|
20099
20226
|
type: BadgeComponent,
|
|
20100
20227
|
selector: "ui-badge",
|
|
20101
|
-
inputs: [
|
|
20228
|
+
inputs: [
|
|
20229
|
+
"label",
|
|
20230
|
+
"variant",
|
|
20231
|
+
"color"
|
|
20232
|
+
]
|
|
20102
20233
|
},
|
|
20103
20234
|
{
|
|
20104
20235
|
kind: "component",
|
|
@@ -20503,6 +20634,12 @@ function pillTabId(name, key) {
|
|
|
20503
20634
|
function pillTabPanelId(name, key) {
|
|
20504
20635
|
return `${name}-panel-${key}`;
|
|
20505
20636
|
}
|
|
20637
|
+
function pillTabTitleId(name) {
|
|
20638
|
+
return `${name}--title`;
|
|
20639
|
+
}
|
|
20640
|
+
function pillTabDescriptionId(name) {
|
|
20641
|
+
return `${name}--description`;
|
|
20642
|
+
}
|
|
20506
20643
|
var PillTabPanelDirective = class PillTabPanelDirective {
|
|
20507
20644
|
constructor() {
|
|
20508
20645
|
this.key = input.required({
|
|
@@ -20512,6 +20649,10 @@ var PillTabPanelDirective = class PillTabPanelDirective {
|
|
|
20512
20649
|
this.tabsName = input.required(...ngDevMode ? [{ debugName: "tabsName" }] : /* istanbul ignore next */ []);
|
|
20513
20650
|
this.activeKey = input(null, ...ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []);
|
|
20514
20651
|
this.tabbable = input(false, ...ngDevMode ? [{ debugName: "tabbable" }] : /* istanbul ignore next */ []);
|
|
20652
|
+
this.describedByHeader = input(false, ...ngDevMode ? [{ debugName: "describedByHeader" }] : /* istanbul ignore next */ []);
|
|
20653
|
+
}
|
|
20654
|
+
describedId() {
|
|
20655
|
+
return this.describedByHeader() && !this.isHidden() ? pillTabDescriptionId(this.tabsName()) : null;
|
|
20515
20656
|
}
|
|
20516
20657
|
panelId() {
|
|
20517
20658
|
return pillTabPanelId(this.tabsName(), this.key());
|
|
@@ -20568,6 +20709,13 @@ var PillTabPanelDirective = class PillTabPanelDirective {
|
|
|
20568
20709
|
isSignal: true,
|
|
20569
20710
|
isRequired: false,
|
|
20570
20711
|
transformFunction: null
|
|
20712
|
+
},
|
|
20713
|
+
describedByHeader: {
|
|
20714
|
+
classPropertyName: "describedByHeader",
|
|
20715
|
+
publicName: "describedByHeader",
|
|
20716
|
+
isSignal: true,
|
|
20717
|
+
isRequired: false,
|
|
20718
|
+
transformFunction: null
|
|
20571
20719
|
}
|
|
20572
20720
|
},
|
|
20573
20721
|
host: {
|
|
@@ -20576,6 +20724,7 @@ var PillTabPanelDirective = class PillTabPanelDirective {
|
|
|
20576
20724
|
"id": "panelId()",
|
|
20577
20725
|
"attr.aria-labelledby": "tabId()",
|
|
20578
20726
|
"attr.hidden": "isHidden() ? '' : null",
|
|
20727
|
+
"attr.aria-describedby": "describedId()",
|
|
20579
20728
|
"attr.tabindex": "tabbable() ? 0 : null"
|
|
20580
20729
|
}
|
|
20581
20730
|
},
|
|
@@ -20598,6 +20747,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
20598
20747
|
"[id]": "panelId()",
|
|
20599
20748
|
"[attr.aria-labelledby]": "tabId()",
|
|
20600
20749
|
"[attr.hidden]": "isHidden() ? '' : null",
|
|
20750
|
+
"[attr.aria-describedby]": "describedId()",
|
|
20601
20751
|
"[attr.tabindex]": "tabbable() ? 0 : null"
|
|
20602
20752
|
}
|
|
20603
20753
|
}]
|
|
@@ -20634,10 +20784,24 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
20634
20784
|
alias: "tabbable",
|
|
20635
20785
|
required: false
|
|
20636
20786
|
}]
|
|
20787
|
+
}],
|
|
20788
|
+
describedByHeader: [{
|
|
20789
|
+
type: i0.Input,
|
|
20790
|
+
args: [{
|
|
20791
|
+
isSignal: true,
|
|
20792
|
+
alias: "describedByHeader",
|
|
20793
|
+
required: false
|
|
20794
|
+
}]
|
|
20637
20795
|
}]
|
|
20638
20796
|
}
|
|
20639
20797
|
});
|
|
20640
20798
|
var PillTabsComponent = class PillTabsComponent {
|
|
20799
|
+
titleId() {
|
|
20800
|
+
return pillTabTitleId(this.name());
|
|
20801
|
+
}
|
|
20802
|
+
descriptionId() {
|
|
20803
|
+
return pillTabDescriptionId(this.name());
|
|
20804
|
+
}
|
|
20641
20805
|
constructor() {
|
|
20642
20806
|
this.host = inject(ElementRef);
|
|
20643
20807
|
this.tabs = input([], ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
|
|
@@ -20648,7 +20812,10 @@ var PillTabsComponent = class PillTabsComponent {
|
|
|
20648
20812
|
this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
20649
20813
|
this.vertical = () => this.orientation() === "vertical";
|
|
20650
20814
|
this.controlsPanels = input(false, ...ngDevMode ? [{ debugName: "controlsPanels" }] : /* istanbul ignore next */ []);
|
|
20815
|
+
this.showDescription = input(false, ...ngDevMode ? [{ debugName: "showDescription" }] : /* istanbul ignore next */ []);
|
|
20816
|
+
this.headingLevel = input(2, ...ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []);
|
|
20651
20817
|
this.tabChange = output();
|
|
20818
|
+
this.activeTab = computed(() => this.tabs().find((t) => t.key === this.activeKey()) ?? null, ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
|
|
20652
20819
|
this.canScrollStart = signal(false, ...ngDevMode ? [{ debugName: "canScrollStart" }] : /* istanbul ignore next */ []);
|
|
20653
20820
|
this.canScrollEnd = signal(false, ...ngDevMode ? [{ debugName: "canScrollEnd" }] : /* istanbul ignore next */ []);
|
|
20654
20821
|
const destroyRef = inject(DestroyRef);
|
|
@@ -20782,6 +20949,20 @@ var PillTabsComponent = class PillTabsComponent {
|
|
|
20782
20949
|
isSignal: true,
|
|
20783
20950
|
isRequired: false,
|
|
20784
20951
|
transformFunction: null
|
|
20952
|
+
},
|
|
20953
|
+
showDescription: {
|
|
20954
|
+
classPropertyName: "showDescription",
|
|
20955
|
+
publicName: "showDescription",
|
|
20956
|
+
isSignal: true,
|
|
20957
|
+
isRequired: false,
|
|
20958
|
+
transformFunction: null
|
|
20959
|
+
},
|
|
20960
|
+
headingLevel: {
|
|
20961
|
+
classPropertyName: "headingLevel",
|
|
20962
|
+
publicName: "headingLevel",
|
|
20963
|
+
isSignal: true,
|
|
20964
|
+
isRequired: false,
|
|
20965
|
+
transformFunction: null
|
|
20785
20966
|
}
|
|
20786
20967
|
},
|
|
20787
20968
|
outputs: { tabChange: "tabChange" },
|
|
@@ -20816,9 +20997,23 @@ var PillTabsComponent = class PillTabsComponent {
|
|
|
20816
20997
|
<span class="pill-fade pill-fade--start" [class.visible]="canScrollStart()" aria-hidden="true" data-testid="pill-fade-start"></span>
|
|
20817
20998
|
<span class="pill-fade pill-fade--end" [class.visible]="canScrollEnd()" aria-hidden="true" data-testid="pill-fade-end"></span>
|
|
20818
20999
|
</div>
|
|
21000
|
+
@if (showDescription() && (activeTab()?.title || activeTab()?.description)) {
|
|
21001
|
+
<div class="pill-header" data-testid="pill-header">
|
|
21002
|
+
@if (activeTab()?.title) {
|
|
21003
|
+
@if (headingLevel() === 3) {
|
|
21004
|
+
<h3 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h3>
|
|
21005
|
+
} @else {
|
|
21006
|
+
<h2 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h2>
|
|
21007
|
+
}
|
|
21008
|
+
}
|
|
21009
|
+
@if (activeTab()?.description) {
|
|
21010
|
+
<p class="pill-header-description" [id]="descriptionId()" data-testid="pill-header-description">{{ activeTab()!.description }}</p>
|
|
21011
|
+
}
|
|
21012
|
+
</div>
|
|
21013
|
+
}
|
|
20819
21014
|
`,
|
|
20820
21015
|
isInline: true,
|
|
20821
|
-
styles: [".pill-wrap{position:relative}.pill-fade{position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .15s}.pill-fade.visible{opacity:1}.pill-fade--start{left:0;background:linear-gradient(to right,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-fade--end{right:0;background:linear-gradient(to left,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-tabs{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:768px){.pill-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;scrollbar-width:none}.pill-tabs::-webkit-scrollbar{display:none}}.pill-tabs--nowrap .pill-tab{flex:0 0 auto;white-space:nowrap}.pill-tab{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#64748b;cursor:pointer;transition:all .15s;font-family:inherit}.pill-tab:hover:not(.disabled):not(.active){background:#f8fafc;border-color:#94a3b8}.pill-tab:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.pill-tab .pill-count{background:#e2e8f0;color:#475569;font-size:.7rem;font-weight:600;padding:1px 6px;border-radius:999px;line-height:1.4}.pill-tab.active{background:#1e293b;color:#fff;border-color:#1e293b}.pill-tab.active .pill-count{background:#fff3;color:#fff}.pill-tab.active:hover{background:#1e293b;color:#fff}.pill-tab.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.pill-tab .pill-info-icon{flex-shrink:0;opacity:.7}.pill-tab:hover .pill-info-icon,.pill-tab:focus-visible .pill-info-icon{opacity:1}.pill-tab .pill-info-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:20;width:max-content;max-width:280px;padding:8px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;white-space:normal;box-shadow:0 4px 12px #0f172a40;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.pill-tab:hover .pill-info-tip,.pill-tab:focus-visible .pill-info-tip{opacity:1;visibility:visible}.pill-tab:last-child .pill-info-tip{left:auto;right:0}.pill-wrap--vertical .pill-fade{display:none}.pill-tabs.pill-tabs--vertical{flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;padding-bottom:0}.pill-tabs--vertical .pill-tab{width:100%;justify-content:flex-start;border-radius:10px;text-align:left}.pill-tabs--vertical .pill-tab .pill-count{margin-left:auto}.pill-tabs--vertical .pill-tab .pill-info-tip{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}.pill-tabs--vertical .pill-tab:last-child .pill-info-tip{left:calc(100% + 8px);right:auto}@media(pointer:coarse),(max-width:480px){.pill-tab{min-height:44px}}\n"],
|
|
21016
|
+
styles: [".pill-header{margin-top:16px;min-width:0}.pill-header-title{margin:0;font-size:1.125rem;font-weight:600;line-height:1.3;color:var(--ui-text, #1e293b);overflow-wrap:anywhere}.pill-header-description{margin:4px 0 0;font-size:.875rem;line-height:1.5;color:var(--ui-text-muted, #475569);overflow-wrap:anywhere}.pill-wrap{position:relative}.pill-fade{position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .15s}.pill-fade.visible{opacity:1}.pill-fade--start{left:0;background:linear-gradient(to right,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-fade--end{right:0;background:linear-gradient(to left,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-tabs{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:768px){.pill-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;scrollbar-width:none}.pill-tabs::-webkit-scrollbar{display:none}}.pill-tabs--nowrap .pill-tab{flex:0 0 auto;white-space:nowrap}.pill-tab{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#64748b;cursor:pointer;transition:all .15s;font-family:inherit}.pill-tab:hover:not(.disabled):not(.active){background:#f8fafc;border-color:#94a3b8}.pill-tab:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.pill-tab .pill-count{background:#e2e8f0;color:#475569;font-size:.7rem;font-weight:600;padding:1px 6px;border-radius:999px;line-height:1.4}.pill-tab.active{background:#1e293b;color:#fff;border-color:#1e293b}.pill-tab.active .pill-count{background:#fff3;color:#fff}.pill-tab.active:hover{background:#1e293b;color:#fff}.pill-tab.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.pill-tab .pill-info-icon{flex-shrink:0;opacity:.7}.pill-tab:hover .pill-info-icon,.pill-tab:focus-visible .pill-info-icon{opacity:1}.pill-tab .pill-info-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:20;width:max-content;max-width:280px;padding:8px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;white-space:normal;box-shadow:0 4px 12px #0f172a40;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.pill-tab:hover .pill-info-tip,.pill-tab:focus-visible .pill-info-tip{opacity:1;visibility:visible}.pill-tab:last-child .pill-info-tip{left:auto;right:0}.pill-wrap--vertical .pill-fade{display:none}.pill-tabs.pill-tabs--vertical{flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;padding-bottom:0}.pill-tabs--vertical .pill-tab{width:100%;justify-content:flex-start;border-radius:10px;text-align:left}.pill-tabs--vertical .pill-tab .pill-count{margin-left:auto}.pill-tabs--vertical .pill-tab .pill-info-tip{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}.pill-tabs--vertical .pill-tab:last-child .pill-info-tip{left:calc(100% + 8px);right:auto}@media(pointer:coarse),(max-width:480px){.pill-tab{min-height:44px}}\n"],
|
|
20822
21017
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
20823
21018
|
});
|
|
20824
21019
|
}
|
|
@@ -20864,8 +21059,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
20864
21059
|
<span class="pill-fade pill-fade--start" [class.visible]="canScrollStart()" aria-hidden="true" data-testid="pill-fade-start"></span>
|
|
20865
21060
|
<span class="pill-fade pill-fade--end" [class.visible]="canScrollEnd()" aria-hidden="true" data-testid="pill-fade-end"></span>
|
|
20866
21061
|
</div>
|
|
21062
|
+
@if (showDescription() && (activeTab()?.title || activeTab()?.description)) {
|
|
21063
|
+
<div class="pill-header" data-testid="pill-header">
|
|
21064
|
+
@if (activeTab()?.title) {
|
|
21065
|
+
@if (headingLevel() === 3) {
|
|
21066
|
+
<h3 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h3>
|
|
21067
|
+
} @else {
|
|
21068
|
+
<h2 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h2>
|
|
21069
|
+
}
|
|
21070
|
+
}
|
|
21071
|
+
@if (activeTab()?.description) {
|
|
21072
|
+
<p class="pill-header-description" [id]="descriptionId()" data-testid="pill-header-description">{{ activeTab()!.description }}</p>
|
|
21073
|
+
}
|
|
21074
|
+
</div>
|
|
21075
|
+
}
|
|
20867
21076
|
`,
|
|
20868
|
-
styles: [".pill-wrap{position:relative}.pill-fade{position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .15s}.pill-fade.visible{opacity:1}.pill-fade--start{left:0;background:linear-gradient(to right,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-fade--end{right:0;background:linear-gradient(to left,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-tabs{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:768px){.pill-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;scrollbar-width:none}.pill-tabs::-webkit-scrollbar{display:none}}.pill-tabs--nowrap .pill-tab{flex:0 0 auto;white-space:nowrap}.pill-tab{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#64748b;cursor:pointer;transition:all .15s;font-family:inherit}.pill-tab:hover:not(.disabled):not(.active){background:#f8fafc;border-color:#94a3b8}.pill-tab:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.pill-tab .pill-count{background:#e2e8f0;color:#475569;font-size:.7rem;font-weight:600;padding:1px 6px;border-radius:999px;line-height:1.4}.pill-tab.active{background:#1e293b;color:#fff;border-color:#1e293b}.pill-tab.active .pill-count{background:#fff3;color:#fff}.pill-tab.active:hover{background:#1e293b;color:#fff}.pill-tab.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.pill-tab .pill-info-icon{flex-shrink:0;opacity:.7}.pill-tab:hover .pill-info-icon,.pill-tab:focus-visible .pill-info-icon{opacity:1}.pill-tab .pill-info-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:20;width:max-content;max-width:280px;padding:8px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;white-space:normal;box-shadow:0 4px 12px #0f172a40;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.pill-tab:hover .pill-info-tip,.pill-tab:focus-visible .pill-info-tip{opacity:1;visibility:visible}.pill-tab:last-child .pill-info-tip{left:auto;right:0}.pill-wrap--vertical .pill-fade{display:none}.pill-tabs.pill-tabs--vertical{flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;padding-bottom:0}.pill-tabs--vertical .pill-tab{width:100%;justify-content:flex-start;border-radius:10px;text-align:left}.pill-tabs--vertical .pill-tab .pill-count{margin-left:auto}.pill-tabs--vertical .pill-tab .pill-info-tip{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}.pill-tabs--vertical .pill-tab:last-child .pill-info-tip{left:calc(100% + 8px);right:auto}@media(pointer:coarse),(max-width:480px){.pill-tab{min-height:44px}}\n"]
|
|
21077
|
+
styles: [".pill-header{margin-top:16px;min-width:0}.pill-header-title{margin:0;font-size:1.125rem;font-weight:600;line-height:1.3;color:var(--ui-text, #1e293b);overflow-wrap:anywhere}.pill-header-description{margin:4px 0 0;font-size:.875rem;line-height:1.5;color:var(--ui-text-muted, #475569);overflow-wrap:anywhere}.pill-wrap{position:relative}.pill-fade{position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .15s}.pill-fade.visible{opacity:1}.pill-fade--start{left:0;background:linear-gradient(to right,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-fade--end{right:0;background:linear-gradient(to left,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-tabs{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:768px){.pill-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;scrollbar-width:none}.pill-tabs::-webkit-scrollbar{display:none}}.pill-tabs--nowrap .pill-tab{flex:0 0 auto;white-space:nowrap}.pill-tab{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#64748b;cursor:pointer;transition:all .15s;font-family:inherit}.pill-tab:hover:not(.disabled):not(.active){background:#f8fafc;border-color:#94a3b8}.pill-tab:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.pill-tab .pill-count{background:#e2e8f0;color:#475569;font-size:.7rem;font-weight:600;padding:1px 6px;border-radius:999px;line-height:1.4}.pill-tab.active{background:#1e293b;color:#fff;border-color:#1e293b}.pill-tab.active .pill-count{background:#fff3;color:#fff}.pill-tab.active:hover{background:#1e293b;color:#fff}.pill-tab.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.pill-tab .pill-info-icon{flex-shrink:0;opacity:.7}.pill-tab:hover .pill-info-icon,.pill-tab:focus-visible .pill-info-icon{opacity:1}.pill-tab .pill-info-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:20;width:max-content;max-width:280px;padding:8px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;white-space:normal;box-shadow:0 4px 12px #0f172a40;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.pill-tab:hover .pill-info-tip,.pill-tab:focus-visible .pill-info-tip{opacity:1;visibility:visible}.pill-tab:last-child .pill-info-tip{left:auto;right:0}.pill-wrap--vertical .pill-fade{display:none}.pill-tabs.pill-tabs--vertical{flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;padding-bottom:0}.pill-tabs--vertical .pill-tab{width:100%;justify-content:flex-start;border-radius:10px;text-align:left}.pill-tabs--vertical .pill-tab .pill-count{margin-left:auto}.pill-tabs--vertical .pill-tab .pill-info-tip{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}.pill-tabs--vertical .pill-tab:last-child .pill-info-tip{left:calc(100% + 8px);right:auto}@media(pointer:coarse),(max-width:480px){.pill-tab{min-height:44px}}\n"]
|
|
20869
21078
|
}]
|
|
20870
21079
|
}],
|
|
20871
21080
|
ctorParameters: () => [],
|
|
@@ -20926,6 +21135,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
20926
21135
|
required: false
|
|
20927
21136
|
}]
|
|
20928
21137
|
}],
|
|
21138
|
+
showDescription: [{
|
|
21139
|
+
type: i0.Input,
|
|
21140
|
+
args: [{
|
|
21141
|
+
isSignal: true,
|
|
21142
|
+
alias: "showDescription",
|
|
21143
|
+
required: false
|
|
21144
|
+
}]
|
|
21145
|
+
}],
|
|
21146
|
+
headingLevel: [{
|
|
21147
|
+
type: i0.Input,
|
|
21148
|
+
args: [{
|
|
21149
|
+
isSignal: true,
|
|
21150
|
+
alias: "headingLevel",
|
|
21151
|
+
required: false
|
|
21152
|
+
}]
|
|
21153
|
+
}],
|
|
20929
21154
|
tabChange: [{
|
|
20930
21155
|
type: i0.Output,
|
|
20931
21156
|
args: ["tabChange"]
|
|
@@ -24078,6 +24303,8 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24078
24303
|
this.showField = input(true, ...ngDevMode ? [{ debugName: "showField" }] : /* istanbul ignore next */ []);
|
|
24079
24304
|
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
24080
24305
|
this.toastOnReject = input(false, ...ngDevMode ? [{ debugName: "toastOnReject" }] : /* istanbul ignore next */ []);
|
|
24306
|
+
this.listRejections = input(false, ...ngDevMode ? [{ debugName: "listRejections" }] : /* istanbul ignore next */ []);
|
|
24307
|
+
this.ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
24081
24308
|
this.clearable = input(false, ...ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []);
|
|
24082
24309
|
this.removeLabel = input("Remove", ...ngDevMode ? [{ debugName: "removeLabel" }] : /* istanbul ignore next */ []);
|
|
24083
24310
|
this.maxSize = input(null, ...ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []);
|
|
@@ -24095,6 +24322,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24095
24322
|
this.loadingText = input("", ...ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []);
|
|
24096
24323
|
this.filesSelected = output();
|
|
24097
24324
|
this.fileRejected = output();
|
|
24325
|
+
this.filesRejected = output();
|
|
24098
24326
|
this.fileRemoved = output();
|
|
24099
24327
|
this.invalidChange = output();
|
|
24100
24328
|
this._disabledInput = input(false, {
|
|
@@ -24109,10 +24337,15 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24109
24337
|
this._dragging = signal(false, ...ngDevMode ? [{ debugName: "_dragging" }] : /* istanbul ignore next */ []);
|
|
24110
24338
|
this._toast = inject(ToastService);
|
|
24111
24339
|
this._rejection = signal("", ...ngDevMode ? [{ debugName: "_rejection" }] : /* istanbul ignore next */ []);
|
|
24340
|
+
this._describedBy = computed(() => mergeDescribedBy(this._shownError() ? this._inputId + "-desc" : "", this.ariaDescribedBy()), ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
|
|
24341
|
+
this._rejected = signal([], ...ngDevMode ? [{ debugName: "_rejected" }] : /* istanbul ignore next */ []);
|
|
24342
|
+
this.rejections = this._rejected.asReadonly();
|
|
24343
|
+
this.rejectionLines = computed(() => this._rejected().map((r) => `"${r.file.name}" was not added. ${r.message}`), ...ngDevMode ? [{ debugName: "rejectionLines" }] : /* istanbul ignore next */ []);
|
|
24344
|
+
this._showRejectList = computed(() => this.listRejections() && this._rejected().length > 0 && !(this.showField() && this.error()), ...ngDevMode ? [{ debugName: "_showRejectList" }] : /* istanbul ignore next */ []);
|
|
24112
24345
|
this._reveal = createFieldReveal(this.showErrors);
|
|
24113
24346
|
this._issue = computed(() => this.disabled() || !this.required() || this._files().length > 0 ? null : requiredIssue(this.label() || "File"), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
|
|
24114
24347
|
this.invalid = computed(() => !!this.error() || !!this._rejection() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
24115
|
-
this.errorMessage = computed(() => this._rejection() || this._issue()?.message || "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
24348
|
+
this.errorMessage = computed(() => (this.listRejections() && this._rejected().length > 0 ? this.rejectionLines().join(" ") : this._rejection()) || this._issue()?.message || "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
24116
24349
|
this._shownError = computed(() => (this.showField() ? this.error() : "") || this._rejection() || (this._reveal.revealed() ? this._issue()?.message ?? "" : ""), ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
|
|
24117
24350
|
this.summary = computed(() => {
|
|
24118
24351
|
const f = this._files();
|
|
@@ -24161,7 +24394,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24161
24394
|
const el = this.fileEl()?.nativeElement;
|
|
24162
24395
|
if (el) el.value = "";
|
|
24163
24396
|
this._files.set([]);
|
|
24164
|
-
this.
|
|
24397
|
+
this.setRejections([]);
|
|
24165
24398
|
this._onChange(this.multiple() ? [] : null);
|
|
24166
24399
|
}
|
|
24167
24400
|
remove() {
|
|
@@ -24172,7 +24405,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24172
24405
|
writeValue(val) {
|
|
24173
24406
|
const files = Array.isArray(val) ? val : val ? [val] : [];
|
|
24174
24407
|
this._files.set(files);
|
|
24175
|
-
if (files.length > 0) this.
|
|
24408
|
+
if (files.length > 0) this.setRejections([]);
|
|
24176
24409
|
const el = this.fileEl()?.nativeElement;
|
|
24177
24410
|
if (files.length === 0 && el) el.value = "";
|
|
24178
24411
|
}
|
|
@@ -24215,6 +24448,10 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24215
24448
|
if (dropped.length === 0) return;
|
|
24216
24449
|
this.accept$(this.multiple() ? dropped : dropped.slice(0, 1), this.fileEl()?.nativeElement ?? null);
|
|
24217
24450
|
}
|
|
24451
|
+
setRejections(list) {
|
|
24452
|
+
this._rejected.set(list);
|
|
24453
|
+
this._rejection.set(list[0]?.message ?? "");
|
|
24454
|
+
}
|
|
24218
24455
|
rejectionFor(file) {
|
|
24219
24456
|
const accept = this.accept();
|
|
24220
24457
|
if (this.enforceAccept() && accept && !fileMatchesAccept(file, accept)) return {
|
|
@@ -24244,7 +24481,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24244
24481
|
accept$(files, native) {
|
|
24245
24482
|
if (files.length === 0) {
|
|
24246
24483
|
this._files.set([]);
|
|
24247
|
-
this.
|
|
24484
|
+
this.setRejections([]);
|
|
24248
24485
|
this._onChange(this.multiple() ? [] : null);
|
|
24249
24486
|
this._onTouched();
|
|
24250
24487
|
return;
|
|
@@ -24256,8 +24493,9 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24256
24493
|
if (r) rejected.push(r);
|
|
24257
24494
|
else ok.push(f);
|
|
24258
24495
|
}
|
|
24259
|
-
this.
|
|
24496
|
+
this.setRejections(rejected);
|
|
24260
24497
|
rejected.forEach((r) => this.fileRejected.emit(r));
|
|
24498
|
+
if (rejected.length > 0) this.filesRejected.emit(rejected);
|
|
24261
24499
|
if (this.toastOnReject() && rejected.length > 0) this._toast.error(rejected.map((r) => `"${r.file.name}" was not added. ${r.message}`).join(" "));
|
|
24262
24500
|
if (ok.length === 0) {
|
|
24263
24501
|
if (native) native.value = "";
|
|
@@ -24373,6 +24611,20 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24373
24611
|
isRequired: false,
|
|
24374
24612
|
transformFunction: null
|
|
24375
24613
|
},
|
|
24614
|
+
listRejections: {
|
|
24615
|
+
classPropertyName: "listRejections",
|
|
24616
|
+
publicName: "listRejections",
|
|
24617
|
+
isSignal: true,
|
|
24618
|
+
isRequired: false,
|
|
24619
|
+
transformFunction: null
|
|
24620
|
+
},
|
|
24621
|
+
ariaDescribedBy: {
|
|
24622
|
+
classPropertyName: "ariaDescribedBy",
|
|
24623
|
+
publicName: "ariaDescribedBy",
|
|
24624
|
+
isSignal: true,
|
|
24625
|
+
isRequired: false,
|
|
24626
|
+
transformFunction: null
|
|
24627
|
+
},
|
|
24376
24628
|
clearable: {
|
|
24377
24629
|
classPropertyName: "clearable",
|
|
24378
24630
|
publicName: "clearable",
|
|
@@ -24489,6 +24741,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24489
24741
|
outputs: {
|
|
24490
24742
|
filesSelected: "filesSelected",
|
|
24491
24743
|
fileRejected: "fileRejected",
|
|
24744
|
+
filesRejected: "filesRejected",
|
|
24492
24745
|
fileRemoved: "fileRemoved",
|
|
24493
24746
|
invalidChange: "invalidChange"
|
|
24494
24747
|
},
|
|
@@ -24537,14 +24790,14 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24537
24790
|
[attr.required]="required() || null"
|
|
24538
24791
|
[attr.aria-label]="ariaLabel() || null"
|
|
24539
24792
|
[attr.aria-invalid]="_shownError() ? 'true' : null"
|
|
24540
|
-
[attr.aria-describedby]="
|
|
24793
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24541
24794
|
[attr.tabindex]="showField() ? -1 : null"
|
|
24542
24795
|
(change)="onChange($event)"
|
|
24543
24796
|
(blur)="_onTouched()" />
|
|
24544
24797
|
@if (showField()) {
|
|
24545
24798
|
<div class="fi-row">
|
|
24546
24799
|
<button type="button" class="fi-control" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
|
|
24547
|
-
[attr.aria-describedby]="
|
|
24800
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24548
24801
|
(click)="open()" (blur)="_touch()"
|
|
24549
24802
|
(dragenter)="onDragOver($event)" (dragover)="onDragOver($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)">
|
|
24550
24803
|
@if (_previewUrl(); as src) {
|
|
@@ -24564,12 +24817,18 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24564
24817
|
</div>
|
|
24565
24818
|
}
|
|
24566
24819
|
@if (_shownError()) {
|
|
24567
|
-
|
|
24820
|
+
@if (_showRejectList()) {
|
|
24821
|
+
<ul class="fi-desc fi-desc-error fi-reject-list" [id]="_inputId + '-desc'" role="alert">
|
|
24822
|
+
@for (line of rejectionLines(); track $index) { <li>{{ line }}</li> }
|
|
24823
|
+
</ul>
|
|
24824
|
+
} @else {
|
|
24825
|
+
<p class="fi-desc fi-desc-error" [id]="_inputId + '-desc'" role="alert">{{ _shownError() }}</p>
|
|
24826
|
+
}
|
|
24568
24827
|
}
|
|
24569
24828
|
</div>
|
|
24570
24829
|
`,
|
|
24571
24830
|
isInline: true,
|
|
24572
|
-
styles: [":host{display:block}:host(:has(.fi-hidden)){display:contents}.fi-field{display:flex;flex-direction:column;gap:6px}.fi-hidden{display:contents}.fi-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.fi-required{color:#dc2626;margin-left:2px}.fi-hint-inline{font-size:.75rem;color:#94a3b8;font-weight:400;margin-left:4px}.fi-native{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.fi-row{display:flex;align-items:stretch;gap:8px}.fi-control{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1 1 auto;min-width:0;box-sizing:border-box;text-align:left;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.fi-control:focus-visible{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.fi-control:has(ui-image-preview){padding-top:6px;padding-bottom:6px}.fi-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fi-loading{overflow:visible}.fi-placeholder{color:#64748b}.fi-browse{flex-shrink:0;font-size:.75rem;font-weight:600;color:#374151;padding:3px 10px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc}.fi-remove{flex-shrink:0;align-self:center;font-family:inherit;font-size:.75rem;font-weight:600;color:#b91c1c;padding:6px 10px;border:1px solid #fecaca;border-radius:6px;background:#fff;cursor:pointer;-webkit-appearance:none;appearance:none}.fi-remove:hover{background:#fef2f2}.fi-remove:focus-visible{outline:2px solid #ef4444;outline-offset:2px}.fi-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.fi-error .fi-control{border-color:#ef4444}.fi-error .fi-control:focus-visible{box-shadow:0 0 0 3px #ef44441f}.fi-drag .fi-control{border-color:#3b82f6;border-style:dashed;background:#eff6ff}.fi-disabled .fi-control{opacity:.5;cursor:not-allowed}.fi-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.fi-desc-error{color:#dc2626}@media(max-width:480px){.fi-control{font-size:1rem}.fi-remove{padding:10px 12px}}@media(pointer:coarse){.fi-control,.fi-remove{min-height:44px}}\n"],
|
|
24831
|
+
styles: [":host{display:block}:host(:has(.fi-hidden)){display:contents}.fi-field{display:flex;flex-direction:column;gap:6px}.fi-hidden{display:contents}.fi-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.fi-required{color:#dc2626;margin-left:2px}.fi-hint-inline{font-size:.75rem;color:#94a3b8;font-weight:400;margin-left:4px}.fi-native{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.fi-row{display:flex;align-items:stretch;gap:8px}.fi-control{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1 1 auto;min-width:0;box-sizing:border-box;text-align:left;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.fi-control:focus-visible{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.fi-control:has(ui-image-preview){padding-top:6px;padding-bottom:6px}.fi-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fi-loading{overflow:visible}.fi-placeholder{color:#64748b}.fi-browse{flex-shrink:0;font-size:.75rem;font-weight:600;color:#374151;padding:3px 10px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc}.fi-remove{flex-shrink:0;align-self:center;font-family:inherit;font-size:.75rem;font-weight:600;color:#b91c1c;padding:6px 10px;border:1px solid #fecaca;border-radius:6px;background:#fff;cursor:pointer;-webkit-appearance:none;appearance:none}.fi-remove:hover{background:#fef2f2}.fi-remove:focus-visible{outline:2px solid #ef4444;outline-offset:2px}.fi-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.fi-error .fi-control{border-color:#ef4444}.fi-error .fi-control:focus-visible{box-shadow:0 0 0 3px #ef44441f}.fi-drag .fi-control{border-color:#3b82f6;border-style:dashed;background:#eff6ff}.fi-disabled .fi-control{opacity:.5;cursor:not-allowed}.fi-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.fi-desc-error{color:#dc2626}.fi-reject-list{margin:4px 0 0;padding-left:18px}.fi-reject-list li{margin:0 0 2px}@media(max-width:480px){.fi-control{font-size:1rem}.fi-remove{padding:10px 12px}}@media(pointer:coarse){.fi-control,.fi-remove{min-height:44px}}\n"],
|
|
24573
24832
|
dependencies: [{
|
|
24574
24833
|
kind: "component",
|
|
24575
24834
|
type: ImagePreviewComponent,
|
|
@@ -24649,14 +24908,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24649
24908
|
[attr.required]="required() || null"
|
|
24650
24909
|
[attr.aria-label]="ariaLabel() || null"
|
|
24651
24910
|
[attr.aria-invalid]="_shownError() ? 'true' : null"
|
|
24652
|
-
[attr.aria-describedby]="
|
|
24911
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24653
24912
|
[attr.tabindex]="showField() ? -1 : null"
|
|
24654
24913
|
(change)="onChange($event)"
|
|
24655
24914
|
(blur)="_onTouched()" />
|
|
24656
24915
|
@if (showField()) {
|
|
24657
24916
|
<div class="fi-row">
|
|
24658
24917
|
<button type="button" class="fi-control" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
|
|
24659
|
-
[attr.aria-describedby]="
|
|
24918
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24660
24919
|
(click)="open()" (blur)="_touch()"
|
|
24661
24920
|
(dragenter)="onDragOver($event)" (dragover)="onDragOver($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)">
|
|
24662
24921
|
@if (_previewUrl(); as src) {
|
|
@@ -24676,11 +24935,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24676
24935
|
</div>
|
|
24677
24936
|
}
|
|
24678
24937
|
@if (_shownError()) {
|
|
24679
|
-
|
|
24938
|
+
@if (_showRejectList()) {
|
|
24939
|
+
<ul class="fi-desc fi-desc-error fi-reject-list" [id]="_inputId + '-desc'" role="alert">
|
|
24940
|
+
@for (line of rejectionLines(); track $index) { <li>{{ line }}</li> }
|
|
24941
|
+
</ul>
|
|
24942
|
+
} @else {
|
|
24943
|
+
<p class="fi-desc fi-desc-error" [id]="_inputId + '-desc'" role="alert">{{ _shownError() }}</p>
|
|
24944
|
+
}
|
|
24680
24945
|
}
|
|
24681
24946
|
</div>
|
|
24682
24947
|
`,
|
|
24683
|
-
styles: [":host{display:block}:host(:has(.fi-hidden)){display:contents}.fi-field{display:flex;flex-direction:column;gap:6px}.fi-hidden{display:contents}.fi-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.fi-required{color:#dc2626;margin-left:2px}.fi-hint-inline{font-size:.75rem;color:#94a3b8;font-weight:400;margin-left:4px}.fi-native{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.fi-row{display:flex;align-items:stretch;gap:8px}.fi-control{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1 1 auto;min-width:0;box-sizing:border-box;text-align:left;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.fi-control:focus-visible{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.fi-control:has(ui-image-preview){padding-top:6px;padding-bottom:6px}.fi-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fi-loading{overflow:visible}.fi-placeholder{color:#64748b}.fi-browse{flex-shrink:0;font-size:.75rem;font-weight:600;color:#374151;padding:3px 10px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc}.fi-remove{flex-shrink:0;align-self:center;font-family:inherit;font-size:.75rem;font-weight:600;color:#b91c1c;padding:6px 10px;border:1px solid #fecaca;border-radius:6px;background:#fff;cursor:pointer;-webkit-appearance:none;appearance:none}.fi-remove:hover{background:#fef2f2}.fi-remove:focus-visible{outline:2px solid #ef4444;outline-offset:2px}.fi-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.fi-error .fi-control{border-color:#ef4444}.fi-error .fi-control:focus-visible{box-shadow:0 0 0 3px #ef44441f}.fi-drag .fi-control{border-color:#3b82f6;border-style:dashed;background:#eff6ff}.fi-disabled .fi-control{opacity:.5;cursor:not-allowed}.fi-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.fi-desc-error{color:#dc2626}@media(max-width:480px){.fi-control{font-size:1rem}.fi-remove{padding:10px 12px}}@media(pointer:coarse){.fi-control,.fi-remove{min-height:44px}}\n"]
|
|
24948
|
+
styles: [":host{display:block}:host(:has(.fi-hidden)){display:contents}.fi-field{display:flex;flex-direction:column;gap:6px}.fi-hidden{display:contents}.fi-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.fi-required{color:#dc2626;margin-left:2px}.fi-hint-inline{font-size:.75rem;color:#94a3b8;font-weight:400;margin-left:4px}.fi-native{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.fi-row{display:flex;align-items:stretch;gap:8px}.fi-control{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1 1 auto;min-width:0;box-sizing:border-box;text-align:left;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.fi-control:focus-visible{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.fi-control:has(ui-image-preview){padding-top:6px;padding-bottom:6px}.fi-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fi-loading{overflow:visible}.fi-placeholder{color:#64748b}.fi-browse{flex-shrink:0;font-size:.75rem;font-weight:600;color:#374151;padding:3px 10px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc}.fi-remove{flex-shrink:0;align-self:center;font-family:inherit;font-size:.75rem;font-weight:600;color:#b91c1c;padding:6px 10px;border:1px solid #fecaca;border-radius:6px;background:#fff;cursor:pointer;-webkit-appearance:none;appearance:none}.fi-remove:hover{background:#fef2f2}.fi-remove:focus-visible{outline:2px solid #ef4444;outline-offset:2px}.fi-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.fi-error .fi-control{border-color:#ef4444}.fi-error .fi-control:focus-visible{box-shadow:0 0 0 3px #ef44441f}.fi-drag .fi-control{border-color:#3b82f6;border-style:dashed;background:#eff6ff}.fi-disabled .fi-control{opacity:.5;cursor:not-allowed}.fi-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.fi-desc-error{color:#dc2626}.fi-reject-list{margin:4px 0 0;padding-left:18px}.fi-reject-list li{margin:0 0 2px}@media(max-width:480px){.fi-control{font-size:1rem}.fi-remove{padding:10px 12px}}@media(pointer:coarse){.fi-control,.fi-remove{min-height:44px}}\n"]
|
|
24684
24949
|
}]
|
|
24685
24950
|
}],
|
|
24686
24951
|
ctorParameters: () => [],
|
|
@@ -24781,6 +25046,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24781
25046
|
required: false
|
|
24782
25047
|
}]
|
|
24783
25048
|
}],
|
|
25049
|
+
listRejections: [{
|
|
25050
|
+
type: i0.Input,
|
|
25051
|
+
args: [{
|
|
25052
|
+
isSignal: true,
|
|
25053
|
+
alias: "listRejections",
|
|
25054
|
+
required: false
|
|
25055
|
+
}]
|
|
25056
|
+
}],
|
|
25057
|
+
ariaDescribedBy: [{
|
|
25058
|
+
type: i0.Input,
|
|
25059
|
+
args: [{
|
|
25060
|
+
isSignal: true,
|
|
25061
|
+
alias: "ariaDescribedBy",
|
|
25062
|
+
required: false
|
|
25063
|
+
}]
|
|
25064
|
+
}],
|
|
24784
25065
|
clearable: [{
|
|
24785
25066
|
type: i0.Input,
|
|
24786
25067
|
args: [{
|
|
@@ -24909,6 +25190,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24909
25190
|
type: i0.Output,
|
|
24910
25191
|
args: ["fileRejected"]
|
|
24911
25192
|
}],
|
|
25193
|
+
filesRejected: [{
|
|
25194
|
+
type: i0.Output,
|
|
25195
|
+
args: ["filesRejected"]
|
|
25196
|
+
}],
|
|
24912
25197
|
fileRemoved: [{
|
|
24913
25198
|
type: i0.Output,
|
|
24914
25199
|
args: ["fileRemoved"]
|
|
@@ -24931,6 +25216,361 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24931
25216
|
}]
|
|
24932
25217
|
}
|
|
24933
25218
|
});
|
|
25219
|
+
var CopyFieldComponent = class CopyFieldComponent {
|
|
25220
|
+
constructor() {
|
|
25221
|
+
this.value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
25222
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
25223
|
+
this.copyLabel = input("Copy", ...ngDevMode ? [{ debugName: "copyLabel" }] : /* istanbul ignore next */ []);
|
|
25224
|
+
this.copiedLabel = input("Copied", ...ngDevMode ? [{ debugName: "copiedLabel" }] : /* istanbul ignore next */ []);
|
|
25225
|
+
this.buttonAriaLabel = input("", ...ngDevMode ? [{ debugName: "buttonAriaLabel" }] : /* istanbul ignore next */ []);
|
|
25226
|
+
this.copiedMessage = input("Copied to clipboard", ...ngDevMode ? [{ debugName: "copiedMessage" }] : /* istanbul ignore next */ []);
|
|
25227
|
+
this.failedMessage = input("Could not copy automatically. The text is selected: press Ctrl+C (Cmd+C on a Mac) to copy it.", ...ngDevMode ? [{ debugName: "failedMessage" }] : /* istanbul ignore next */ []);
|
|
25228
|
+
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
25229
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
25230
|
+
this.ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
25231
|
+
this.inputTestId = input("", ...ngDevMode ? [{ debugName: "inputTestId" }] : /* istanbul ignore next */ []);
|
|
25232
|
+
this.buttonTestId = input("", ...ngDevMode ? [{ debugName: "buttonTestId" }] : /* istanbul ignore next */ []);
|
|
25233
|
+
this.copied = output();
|
|
25234
|
+
this.copyFailed = output();
|
|
25235
|
+
this._id = `cf-${Math.random().toString(36).slice(2, 8)}`;
|
|
25236
|
+
this._state = signal("idle", ...ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []);
|
|
25237
|
+
this._announcement = computed(() => this._state() === "copied" ? this.copiedMessage() : this._state() === "failed" ? this.failedMessage() : "", ...ngDevMode ? [{ debugName: "_announcement" }] : /* istanbul ignore next */ []);
|
|
25238
|
+
this._buttonName = computed(() => this.buttonAriaLabel() || [this.copyLabel(), this.label()].filter(Boolean).join(" "), ...ngDevMode ? [{ debugName: "_buttonName" }] : /* istanbul ignore next */ []);
|
|
25239
|
+
this._describedBy = computed(() => {
|
|
25240
|
+
const ids = `${this.hint() ? this._id + "-hint" : ""} ${this._state() === "failed" ? this._id + "-fail" : ""} ${this.ariaDescribedBy()}`.split(/\s+/).filter(Boolean);
|
|
25241
|
+
const unique = ids.filter((id, i) => ids.indexOf(id) === i);
|
|
25242
|
+
return unique.length ? unique.join(" ") : null;
|
|
25243
|
+
}, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
|
|
25244
|
+
this.fieldEl = viewChild("field", ...ngDevMode ? [{ debugName: "fieldEl" }] : /* istanbul ignore next */ []);
|
|
25245
|
+
this._timer = null;
|
|
25246
|
+
}
|
|
25247
|
+
ngOnDestroy() {
|
|
25248
|
+
if (this._timer) clearTimeout(this._timer);
|
|
25249
|
+
}
|
|
25250
|
+
selectAll() {
|
|
25251
|
+
this.fieldEl()?.nativeElement.select();
|
|
25252
|
+
}
|
|
25253
|
+
async copy() {
|
|
25254
|
+
const text = this.value();
|
|
25255
|
+
if (!text || this.disabled()) return false;
|
|
25256
|
+
let ok = false;
|
|
25257
|
+
try {
|
|
25258
|
+
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
25259
|
+
await navigator.clipboard.writeText(text);
|
|
25260
|
+
ok = true;
|
|
25261
|
+
}
|
|
25262
|
+
} catch {
|
|
25263
|
+
ok = false;
|
|
25264
|
+
}
|
|
25265
|
+
if (!ok) ok = this.legacyCopy();
|
|
25266
|
+
if (this._timer) {
|
|
25267
|
+
clearTimeout(this._timer);
|
|
25268
|
+
this._timer = null;
|
|
25269
|
+
}
|
|
25270
|
+
if (ok) {
|
|
25271
|
+
this._state.set("copied");
|
|
25272
|
+
this.copied.emit(text);
|
|
25273
|
+
this._timer = setTimeout(() => {
|
|
25274
|
+
this._state.set("idle");
|
|
25275
|
+
this._timer = null;
|
|
25276
|
+
}, 2e3);
|
|
25277
|
+
} else {
|
|
25278
|
+
this.selectAll();
|
|
25279
|
+
this._state.set("failed");
|
|
25280
|
+
this.copyFailed.emit();
|
|
25281
|
+
}
|
|
25282
|
+
return ok;
|
|
25283
|
+
}
|
|
25284
|
+
legacyCopy() {
|
|
25285
|
+
const el = this.fieldEl()?.nativeElement;
|
|
25286
|
+
if (!el || typeof document === "undefined" || typeof document.execCommand !== "function") return false;
|
|
25287
|
+
try {
|
|
25288
|
+
el.focus();
|
|
25289
|
+
el.select();
|
|
25290
|
+
el.setSelectionRange(0, el.value.length);
|
|
25291
|
+
return document.execCommand("copy");
|
|
25292
|
+
} catch {
|
|
25293
|
+
return false;
|
|
25294
|
+
}
|
|
25295
|
+
}
|
|
25296
|
+
static {
|
|
25297
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
25298
|
+
minVersion: "12.0.0",
|
|
25299
|
+
version: "22.2.2",
|
|
25300
|
+
ngImport: i0,
|
|
25301
|
+
type: CopyFieldComponent,
|
|
25302
|
+
deps: [],
|
|
25303
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
25304
|
+
});
|
|
25305
|
+
}
|
|
25306
|
+
static {
|
|
25307
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
25308
|
+
minVersion: "17.0.0",
|
|
25309
|
+
version: "22.2.2",
|
|
25310
|
+
type: CopyFieldComponent,
|
|
25311
|
+
isStandalone: true,
|
|
25312
|
+
selector: "ui-copy-field",
|
|
25313
|
+
inputs: {
|
|
25314
|
+
value: {
|
|
25315
|
+
classPropertyName: "value",
|
|
25316
|
+
publicName: "value",
|
|
25317
|
+
isSignal: true,
|
|
25318
|
+
isRequired: false,
|
|
25319
|
+
transformFunction: null
|
|
25320
|
+
},
|
|
25321
|
+
label: {
|
|
25322
|
+
classPropertyName: "label",
|
|
25323
|
+
publicName: "label",
|
|
25324
|
+
isSignal: true,
|
|
25325
|
+
isRequired: false,
|
|
25326
|
+
transformFunction: null
|
|
25327
|
+
},
|
|
25328
|
+
copyLabel: {
|
|
25329
|
+
classPropertyName: "copyLabel",
|
|
25330
|
+
publicName: "copyLabel",
|
|
25331
|
+
isSignal: true,
|
|
25332
|
+
isRequired: false,
|
|
25333
|
+
transformFunction: null
|
|
25334
|
+
},
|
|
25335
|
+
copiedLabel: {
|
|
25336
|
+
classPropertyName: "copiedLabel",
|
|
25337
|
+
publicName: "copiedLabel",
|
|
25338
|
+
isSignal: true,
|
|
25339
|
+
isRequired: false,
|
|
25340
|
+
transformFunction: null
|
|
25341
|
+
},
|
|
25342
|
+
buttonAriaLabel: {
|
|
25343
|
+
classPropertyName: "buttonAriaLabel",
|
|
25344
|
+
publicName: "buttonAriaLabel",
|
|
25345
|
+
isSignal: true,
|
|
25346
|
+
isRequired: false,
|
|
25347
|
+
transformFunction: null
|
|
25348
|
+
},
|
|
25349
|
+
copiedMessage: {
|
|
25350
|
+
classPropertyName: "copiedMessage",
|
|
25351
|
+
publicName: "copiedMessage",
|
|
25352
|
+
isSignal: true,
|
|
25353
|
+
isRequired: false,
|
|
25354
|
+
transformFunction: null
|
|
25355
|
+
},
|
|
25356
|
+
failedMessage: {
|
|
25357
|
+
classPropertyName: "failedMessage",
|
|
25358
|
+
publicName: "failedMessage",
|
|
25359
|
+
isSignal: true,
|
|
25360
|
+
isRequired: false,
|
|
25361
|
+
transformFunction: null
|
|
25362
|
+
},
|
|
25363
|
+
hint: {
|
|
25364
|
+
classPropertyName: "hint",
|
|
25365
|
+
publicName: "hint",
|
|
25366
|
+
isSignal: true,
|
|
25367
|
+
isRequired: false,
|
|
25368
|
+
transformFunction: null
|
|
25369
|
+
},
|
|
25370
|
+
disabled: {
|
|
25371
|
+
classPropertyName: "disabled",
|
|
25372
|
+
publicName: "disabled",
|
|
25373
|
+
isSignal: true,
|
|
25374
|
+
isRequired: false,
|
|
25375
|
+
transformFunction: null
|
|
25376
|
+
},
|
|
25377
|
+
ariaDescribedBy: {
|
|
25378
|
+
classPropertyName: "ariaDescribedBy",
|
|
25379
|
+
publicName: "ariaDescribedBy",
|
|
25380
|
+
isSignal: true,
|
|
25381
|
+
isRequired: false,
|
|
25382
|
+
transformFunction: null
|
|
25383
|
+
},
|
|
25384
|
+
inputTestId: {
|
|
25385
|
+
classPropertyName: "inputTestId",
|
|
25386
|
+
publicName: "inputTestId",
|
|
25387
|
+
isSignal: true,
|
|
25388
|
+
isRequired: false,
|
|
25389
|
+
transformFunction: null
|
|
25390
|
+
},
|
|
25391
|
+
buttonTestId: {
|
|
25392
|
+
classPropertyName: "buttonTestId",
|
|
25393
|
+
publicName: "buttonTestId",
|
|
25394
|
+
isSignal: true,
|
|
25395
|
+
isRequired: false,
|
|
25396
|
+
transformFunction: null
|
|
25397
|
+
}
|
|
25398
|
+
},
|
|
25399
|
+
outputs: {
|
|
25400
|
+
copied: "copied",
|
|
25401
|
+
copyFailed: "copyFailed"
|
|
25402
|
+
},
|
|
25403
|
+
viewQueries: [{
|
|
25404
|
+
propertyName: "fieldEl",
|
|
25405
|
+
first: true,
|
|
25406
|
+
predicate: ["field"],
|
|
25407
|
+
descendants: true,
|
|
25408
|
+
isSignal: true
|
|
25409
|
+
}],
|
|
25410
|
+
ngImport: i0,
|
|
25411
|
+
template: `
|
|
25412
|
+
<div class="cf-field">
|
|
25413
|
+
@if (label()) { <label class="cf-label" [for]="_id">{{ label() }}</label> }
|
|
25414
|
+
<div class="cf-row">
|
|
25415
|
+
<input #field class="cf-input" type="text" readonly [id]="_id" [value]="value()" [attr.aria-describedby]="_describedBy()"
|
|
25416
|
+
[attr.data-testid]="inputTestId() || null" (focus)="selectAll()" />
|
|
25417
|
+
<button type="button" class="cf-btn" [disabled]="disabled() || !value()" [attr.aria-label]="_buttonName()"
|
|
25418
|
+
[attr.data-testid]="buttonTestId() || null" (click)="copy()">
|
|
25419
|
+
{{ _state() === 'copied' ? copiedLabel() : copyLabel() }}
|
|
25420
|
+
</button>
|
|
25421
|
+
</div>
|
|
25422
|
+
@if (hint()) { <p class="cf-hint" [id]="_id + '-hint'">{{ hint() }}</p> }
|
|
25423
|
+
<span class="cf-sr" role="status" aria-live="polite" aria-atomic="true">{{ _announcement() }}</span>
|
|
25424
|
+
@if (_state() === 'failed') { <p class="cf-fail" [id]="_id + '-fail'">{{ failedMessage() }}</p> }
|
|
25425
|
+
</div>
|
|
25426
|
+
`,
|
|
25427
|
+
isInline: true,
|
|
25428
|
+
styles: [":host{display:block}.cf-field{display:flex;flex-direction:column;gap:4px}.cf-label{font-size:.8125rem;font-weight:500;color:#334155}.cf-row{display:flex;gap:8px;align-items:stretch}.cf-input{flex:1 1 auto;min-width:0;box-sizing:border-box;min-height:40px;padding:8px 12px;font:inherit;font-size:.875rem;color:#0f172a;background:#f8fafc;border:1px solid #94a3b8;border-radius:8px;text-overflow:ellipsis}.cf-input:focus-visible{outline:2px solid #1d4ed8;outline-offset:1px}.cf-btn{flex:0 0 auto;min-height:40px;padding:0 16px;font:inherit;font-size:.875rem;font-weight:600;color:#0f172a;background:#fff;border:1px solid #94a3b8;border-radius:8px;cursor:pointer}.cf-btn:hover:not(:disabled){background:#f1f5f9}.cf-btn:focus-visible{outline:2px solid #1d4ed8;outline-offset:1px}.cf-btn:disabled{opacity:.55;cursor:not-allowed}.cf-hint{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.cf-fail{margin:0;font-size:.75rem;line-height:1.4;color:#b91c1c}.cf-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(pointer:coarse),(max-width:480px){.cf-input,.cf-btn{min-height:44px}}\n"],
|
|
25429
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
25430
|
+
});
|
|
25431
|
+
}
|
|
25432
|
+
};
|
|
25433
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
25434
|
+
minVersion: "12.0.0",
|
|
25435
|
+
version: "22.2.2",
|
|
25436
|
+
ngImport: i0,
|
|
25437
|
+
type: CopyFieldComponent,
|
|
25438
|
+
decorators: [{
|
|
25439
|
+
type: Component,
|
|
25440
|
+
args: [{
|
|
25441
|
+
selector: "ui-copy-field",
|
|
25442
|
+
standalone: true,
|
|
25443
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25444
|
+
template: `
|
|
25445
|
+
<div class="cf-field">
|
|
25446
|
+
@if (label()) { <label class="cf-label" [for]="_id">{{ label() }}</label> }
|
|
25447
|
+
<div class="cf-row">
|
|
25448
|
+
<input #field class="cf-input" type="text" readonly [id]="_id" [value]="value()" [attr.aria-describedby]="_describedBy()"
|
|
25449
|
+
[attr.data-testid]="inputTestId() || null" (focus)="selectAll()" />
|
|
25450
|
+
<button type="button" class="cf-btn" [disabled]="disabled() || !value()" [attr.aria-label]="_buttonName()"
|
|
25451
|
+
[attr.data-testid]="buttonTestId() || null" (click)="copy()">
|
|
25452
|
+
{{ _state() === 'copied' ? copiedLabel() : copyLabel() }}
|
|
25453
|
+
</button>
|
|
25454
|
+
</div>
|
|
25455
|
+
@if (hint()) { <p class="cf-hint" [id]="_id + '-hint'">{{ hint() }}</p> }
|
|
25456
|
+
<span class="cf-sr" role="status" aria-live="polite" aria-atomic="true">{{ _announcement() }}</span>
|
|
25457
|
+
@if (_state() === 'failed') { <p class="cf-fail" [id]="_id + '-fail'">{{ failedMessage() }}</p> }
|
|
25458
|
+
</div>
|
|
25459
|
+
`,
|
|
25460
|
+
styles: [":host{display:block}.cf-field{display:flex;flex-direction:column;gap:4px}.cf-label{font-size:.8125rem;font-weight:500;color:#334155}.cf-row{display:flex;gap:8px;align-items:stretch}.cf-input{flex:1 1 auto;min-width:0;box-sizing:border-box;min-height:40px;padding:8px 12px;font:inherit;font-size:.875rem;color:#0f172a;background:#f8fafc;border:1px solid #94a3b8;border-radius:8px;text-overflow:ellipsis}.cf-input:focus-visible{outline:2px solid #1d4ed8;outline-offset:1px}.cf-btn{flex:0 0 auto;min-height:40px;padding:0 16px;font:inherit;font-size:.875rem;font-weight:600;color:#0f172a;background:#fff;border:1px solid #94a3b8;border-radius:8px;cursor:pointer}.cf-btn:hover:not(:disabled){background:#f1f5f9}.cf-btn:focus-visible{outline:2px solid #1d4ed8;outline-offset:1px}.cf-btn:disabled{opacity:.55;cursor:not-allowed}.cf-hint{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.cf-fail{margin:0;font-size:.75rem;line-height:1.4;color:#b91c1c}.cf-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(pointer:coarse),(max-width:480px){.cf-input,.cf-btn{min-height:44px}}\n"]
|
|
25461
|
+
}]
|
|
25462
|
+
}],
|
|
25463
|
+
propDecorators: {
|
|
25464
|
+
value: [{
|
|
25465
|
+
type: i0.Input,
|
|
25466
|
+
args: [{
|
|
25467
|
+
isSignal: true,
|
|
25468
|
+
alias: "value",
|
|
25469
|
+
required: false
|
|
25470
|
+
}]
|
|
25471
|
+
}],
|
|
25472
|
+
label: [{
|
|
25473
|
+
type: i0.Input,
|
|
25474
|
+
args: [{
|
|
25475
|
+
isSignal: true,
|
|
25476
|
+
alias: "label",
|
|
25477
|
+
required: false
|
|
25478
|
+
}]
|
|
25479
|
+
}],
|
|
25480
|
+
copyLabel: [{
|
|
25481
|
+
type: i0.Input,
|
|
25482
|
+
args: [{
|
|
25483
|
+
isSignal: true,
|
|
25484
|
+
alias: "copyLabel",
|
|
25485
|
+
required: false
|
|
25486
|
+
}]
|
|
25487
|
+
}],
|
|
25488
|
+
copiedLabel: [{
|
|
25489
|
+
type: i0.Input,
|
|
25490
|
+
args: [{
|
|
25491
|
+
isSignal: true,
|
|
25492
|
+
alias: "copiedLabel",
|
|
25493
|
+
required: false
|
|
25494
|
+
}]
|
|
25495
|
+
}],
|
|
25496
|
+
buttonAriaLabel: [{
|
|
25497
|
+
type: i0.Input,
|
|
25498
|
+
args: [{
|
|
25499
|
+
isSignal: true,
|
|
25500
|
+
alias: "buttonAriaLabel",
|
|
25501
|
+
required: false
|
|
25502
|
+
}]
|
|
25503
|
+
}],
|
|
25504
|
+
copiedMessage: [{
|
|
25505
|
+
type: i0.Input,
|
|
25506
|
+
args: [{
|
|
25507
|
+
isSignal: true,
|
|
25508
|
+
alias: "copiedMessage",
|
|
25509
|
+
required: false
|
|
25510
|
+
}]
|
|
25511
|
+
}],
|
|
25512
|
+
failedMessage: [{
|
|
25513
|
+
type: i0.Input,
|
|
25514
|
+
args: [{
|
|
25515
|
+
isSignal: true,
|
|
25516
|
+
alias: "failedMessage",
|
|
25517
|
+
required: false
|
|
25518
|
+
}]
|
|
25519
|
+
}],
|
|
25520
|
+
hint: [{
|
|
25521
|
+
type: i0.Input,
|
|
25522
|
+
args: [{
|
|
25523
|
+
isSignal: true,
|
|
25524
|
+
alias: "hint",
|
|
25525
|
+
required: false
|
|
25526
|
+
}]
|
|
25527
|
+
}],
|
|
25528
|
+
disabled: [{
|
|
25529
|
+
type: i0.Input,
|
|
25530
|
+
args: [{
|
|
25531
|
+
isSignal: true,
|
|
25532
|
+
alias: "disabled",
|
|
25533
|
+
required: false
|
|
25534
|
+
}]
|
|
25535
|
+
}],
|
|
25536
|
+
ariaDescribedBy: [{
|
|
25537
|
+
type: i0.Input,
|
|
25538
|
+
args: [{
|
|
25539
|
+
isSignal: true,
|
|
25540
|
+
alias: "ariaDescribedBy",
|
|
25541
|
+
required: false
|
|
25542
|
+
}]
|
|
25543
|
+
}],
|
|
25544
|
+
inputTestId: [{
|
|
25545
|
+
type: i0.Input,
|
|
25546
|
+
args: [{
|
|
25547
|
+
isSignal: true,
|
|
25548
|
+
alias: "inputTestId",
|
|
25549
|
+
required: false
|
|
25550
|
+
}]
|
|
25551
|
+
}],
|
|
25552
|
+
buttonTestId: [{
|
|
25553
|
+
type: i0.Input,
|
|
25554
|
+
args: [{
|
|
25555
|
+
isSignal: true,
|
|
25556
|
+
alias: "buttonTestId",
|
|
25557
|
+
required: false
|
|
25558
|
+
}]
|
|
25559
|
+
}],
|
|
25560
|
+
copied: [{
|
|
25561
|
+
type: i0.Output,
|
|
25562
|
+
args: ["copied"]
|
|
25563
|
+
}],
|
|
25564
|
+
copyFailed: [{
|
|
25565
|
+
type: i0.Output,
|
|
25566
|
+
args: ["copyFailed"]
|
|
25567
|
+
}],
|
|
25568
|
+
fieldEl: [{
|
|
25569
|
+
type: i0.ViewChild,
|
|
25570
|
+
args: ["field", { isSignal: true }]
|
|
25571
|
+
}]
|
|
25572
|
+
}
|
|
25573
|
+
});
|
|
24934
25574
|
var DateInputComponent = class DateInputComponent {
|
|
24935
25575
|
constructor() {
|
|
24936
25576
|
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -25893,6 +26533,7 @@ var TimeInputComponent = class TimeInputComponent {
|
|
|
25893
26533
|
[id]="_inputId"
|
|
25894
26534
|
[value]="_value()"
|
|
25895
26535
|
[disabled]="disabled()"
|
|
26536
|
+
[attr.aria-disabled]="disabled() ? 'true' : null"
|
|
25896
26537
|
[attr.min]="min() || null"
|
|
25897
26538
|
[attr.max]="max() || null"
|
|
25898
26539
|
[attr.required]="required() || null"
|
|
@@ -25957,6 +26598,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
25957
26598
|
[id]="_inputId"
|
|
25958
26599
|
[value]="_value()"
|
|
25959
26600
|
[disabled]="disabled()"
|
|
26601
|
+
[attr.aria-disabled]="disabled() ? 'true' : null"
|
|
25960
26602
|
[attr.min]="min() || null"
|
|
25961
26603
|
[attr.max]="max() || null"
|
|
25962
26604
|
[attr.required]="required() || null"
|
|
@@ -26142,6 +26784,14 @@ var ComboboxComponent = class ComboboxComponent {
|
|
|
26142
26784
|
effect(() => {
|
|
26143
26785
|
this.invalidChange.emit(this.invalid());
|
|
26144
26786
|
});
|
|
26787
|
+
effect(() => {
|
|
26788
|
+
if (this.disabled()) untracked(() => {
|
|
26789
|
+
this._cancelTimer();
|
|
26790
|
+
this._open.set(false);
|
|
26791
|
+
this._editing.set(false);
|
|
26792
|
+
this._text.set("");
|
|
26793
|
+
});
|
|
26794
|
+
});
|
|
26145
26795
|
this._destroyRef.onDestroy(() => this._cancelTimer());
|
|
26146
26796
|
}
|
|
26147
26797
|
ngOnChanges() {
|
|
@@ -26218,6 +26868,7 @@ var ComboboxComponent = class ComboboxComponent {
|
|
|
26218
26868
|
}, { injector: this._injector });
|
|
26219
26869
|
}
|
|
26220
26870
|
onInput(event) {
|
|
26871
|
+
if (this.disabled()) return;
|
|
26221
26872
|
this._text.set(event.target.value);
|
|
26222
26873
|
this._editing.set(true);
|
|
26223
26874
|
this._open.set(true);
|
|
@@ -26297,6 +26948,7 @@ var ComboboxComponent = class ComboboxComponent {
|
|
|
26297
26948
|
if (!o.disabled && i !== this._activeIndex()) this._activeIndex.set(i);
|
|
26298
26949
|
}
|
|
26299
26950
|
choose(o) {
|
|
26951
|
+
if (this.disabled()) return;
|
|
26300
26952
|
const sel = {
|
|
26301
26953
|
value: o.value,
|
|
26302
26954
|
label: o.label
|
|
@@ -26308,6 +26960,7 @@ var ComboboxComponent = class ComboboxComponent {
|
|
|
26308
26960
|
this.valueChange.emit(o);
|
|
26309
26961
|
}
|
|
26310
26962
|
clear() {
|
|
26963
|
+
if (this.disabled()) return;
|
|
26311
26964
|
this._selected.set(null);
|
|
26312
26965
|
this._revert();
|
|
26313
26966
|
this._open.set(false);
|
|
@@ -26499,6 +27152,7 @@ var ComboboxComponent = class ComboboxComponent {
|
|
|
26499
27152
|
[placeholder]="placeholder()"
|
|
26500
27153
|
[value]="_inputText()"
|
|
26501
27154
|
[disabled]="disabled()"
|
|
27155
|
+
[attr.aria-disabled]="disabled() ? 'true' : null"
|
|
26502
27156
|
[attr.aria-label]="ariaLabel() || null"
|
|
26503
27157
|
[attr.aria-expanded]="_open() ? 'true' : 'false'"
|
|
26504
27158
|
[attr.aria-controls]="_open() ? _listId : null"
|
|
@@ -26603,6 +27257,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
26603
27257
|
[placeholder]="placeholder()"
|
|
26604
27258
|
[value]="_inputText()"
|
|
26605
27259
|
[disabled]="disabled()"
|
|
27260
|
+
[attr.aria-disabled]="disabled() ? 'true' : null"
|
|
26606
27261
|
[attr.aria-label]="ariaLabel() || null"
|
|
26607
27262
|
[attr.aria-expanded]="_open() ? 'true' : 'false'"
|
|
26608
27263
|
[attr.aria-controls]="_open() ? _listId : null"
|
|
@@ -29063,7 +29718,7 @@ var ListItemComponent = class ListItemComponent {
|
|
|
29063
29718
|
</ng-template>
|
|
29064
29719
|
<ng-template #content>
|
|
29065
29720
|
<div class="li-title-row">
|
|
29066
|
-
<span class="li-title">{{ title() }}</span>
|
|
29721
|
+
<span class="li-title" data-testid="list-item-title">{{ title() }}</span>
|
|
29067
29722
|
@if (badge() && (checked() || alwaysShowBadge())) {
|
|
29068
29723
|
<ui-badge [label]="badge()!" [variant]="badgeVariant()" />
|
|
29069
29724
|
}
|
|
@@ -29075,7 +29730,7 @@ var ListItemComponent = class ListItemComponent {
|
|
|
29075
29730
|
@if (detail.d) {
|
|
29076
29731
|
<svg class="li-detail-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="detail.d" /></svg>
|
|
29077
29732
|
}
|
|
29078
|
-
<span class="li-detail-text">{{ detail.text }}</span>
|
|
29733
|
+
<span class="li-detail-text" data-testid="list-item-detail">{{ detail.text }}</span>
|
|
29079
29734
|
</span>
|
|
29080
29735
|
}
|
|
29081
29736
|
</div>
|
|
@@ -29139,7 +29794,11 @@ var ListItemComponent = class ListItemComponent {
|
|
|
29139
29794
|
kind: "component",
|
|
29140
29795
|
type: BadgeComponent,
|
|
29141
29796
|
selector: "ui-badge",
|
|
29142
|
-
inputs: [
|
|
29797
|
+
inputs: [
|
|
29798
|
+
"label",
|
|
29799
|
+
"variant",
|
|
29800
|
+
"color"
|
|
29801
|
+
]
|
|
29143
29802
|
}, {
|
|
29144
29803
|
kind: "directive",
|
|
29145
29804
|
type: NgTemplateOutlet,
|
|
@@ -29178,7 +29837,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
29178
29837
|
</ng-template>
|
|
29179
29838
|
<ng-template #content>
|
|
29180
29839
|
<div class="li-title-row">
|
|
29181
|
-
<span class="li-title">{{ title() }}</span>
|
|
29840
|
+
<span class="li-title" data-testid="list-item-title">{{ title() }}</span>
|
|
29182
29841
|
@if (badge() && (checked() || alwaysShowBadge())) {
|
|
29183
29842
|
<ui-badge [label]="badge()!" [variant]="badgeVariant()" />
|
|
29184
29843
|
}
|
|
@@ -29190,7 +29849,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
29190
29849
|
@if (detail.d) {
|
|
29191
29850
|
<svg class="li-detail-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="detail.d" /></svg>
|
|
29192
29851
|
}
|
|
29193
|
-
<span class="li-detail-text">{{ detail.text }}</span>
|
|
29852
|
+
<span class="li-detail-text" data-testid="list-item-detail">{{ detail.text }}</span>
|
|
29194
29853
|
</span>
|
|
29195
29854
|
}
|
|
29196
29855
|
</div>
|
|
@@ -29685,7 +30344,11 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
29685
30344
|
kind: "component",
|
|
29686
30345
|
type: BadgeComponent,
|
|
29687
30346
|
selector: "ui-badge",
|
|
29688
|
-
inputs: [
|
|
30347
|
+
inputs: [
|
|
30348
|
+
"label",
|
|
30349
|
+
"variant",
|
|
30350
|
+
"color"
|
|
30351
|
+
]
|
|
29689
30352
|
}, {
|
|
29690
30353
|
kind: "directive",
|
|
29691
30354
|
type: TooltipDirective,
|
|
@@ -31580,12 +32243,12 @@ var BarRowComponent = class BarRowComponent {
|
|
|
31580
32243
|
ngImport: i0,
|
|
31581
32244
|
template: `
|
|
31582
32245
|
<div class="br">
|
|
31583
|
-
<span class="br-label" [attr.id]="labelId">{{ label() }}</span>
|
|
32246
|
+
<span class="br-label" data-testid="bar-row-label" [attr.id]="labelId">{{ label() }}</span>
|
|
31584
32247
|
<ui-progress-bar class="br-bar" [value]="barValue()" [max]="barMax()" [variant]="variant()"
|
|
31585
32248
|
[ariaLabelledby]="label() ? labelId : ''" [valueText]="effectiveValueText()" />
|
|
31586
32249
|
<span class="br-value">
|
|
31587
|
-
<span class="br-count">{{ countText() }}</span>
|
|
31588
|
-
@if (share()) { <span class="br-share">{{ share() }}</span> }
|
|
32250
|
+
<span class="br-count" data-testid="bar-row-count">{{ countText() }}</span>
|
|
32251
|
+
@if (share()) { <span class="br-share" data-testid="bar-row-share">{{ share() }}</span> }
|
|
31589
32252
|
</span>
|
|
31590
32253
|
</div>
|
|
31591
32254
|
`,
|
|
@@ -31625,12 +32288,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
31625
32288
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31626
32289
|
template: `
|
|
31627
32290
|
<div class="br">
|
|
31628
|
-
<span class="br-label" [attr.id]="labelId">{{ label() }}</span>
|
|
32291
|
+
<span class="br-label" data-testid="bar-row-label" [attr.id]="labelId">{{ label() }}</span>
|
|
31629
32292
|
<ui-progress-bar class="br-bar" [value]="barValue()" [max]="barMax()" [variant]="variant()"
|
|
31630
32293
|
[ariaLabelledby]="label() ? labelId : ''" [valueText]="effectiveValueText()" />
|
|
31631
32294
|
<span class="br-value">
|
|
31632
|
-
<span class="br-count">{{ countText() }}</span>
|
|
31633
|
-
@if (share()) { <span class="br-share">{{ share() }}</span> }
|
|
32295
|
+
<span class="br-count" data-testid="bar-row-count">{{ countText() }}</span>
|
|
32296
|
+
@if (share()) { <span class="br-share" data-testid="bar-row-share">{{ share() }}</span> }
|
|
31634
32297
|
</span>
|
|
31635
32298
|
</div>
|
|
31636
32299
|
`,
|
|
@@ -32812,7 +33475,11 @@ var PanelInfoListComponent = class PanelInfoListComponent {
|
|
|
32812
33475
|
kind: "component",
|
|
32813
33476
|
type: BadgeComponent,
|
|
32814
33477
|
selector: "ui-badge",
|
|
32815
|
-
inputs: [
|
|
33478
|
+
inputs: [
|
|
33479
|
+
"label",
|
|
33480
|
+
"variant",
|
|
33481
|
+
"color"
|
|
33482
|
+
]
|
|
32816
33483
|
},
|
|
32817
33484
|
{
|
|
32818
33485
|
kind: "component",
|
|
@@ -34977,48 +35644,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
34977
35644
|
}]
|
|
34978
35645
|
}
|
|
34979
35646
|
});
|
|
34980
|
-
var HintComponent = class HintComponent {
|
|
34981
|
-
static {
|
|
34982
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
34983
|
-
minVersion: "12.0.0",
|
|
34984
|
-
version: "22.2.2",
|
|
34985
|
-
ngImport: i0,
|
|
34986
|
-
type: HintComponent,
|
|
34987
|
-
deps: [],
|
|
34988
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
34989
|
-
});
|
|
34990
|
-
}
|
|
34991
|
-
static {
|
|
34992
|
-
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
34993
|
-
minVersion: "14.0.0",
|
|
34994
|
-
version: "22.2.2",
|
|
34995
|
-
type: HintComponent,
|
|
34996
|
-
isStandalone: true,
|
|
34997
|
-
selector: "ui-hint",
|
|
34998
|
-
ngImport: i0,
|
|
34999
|
-
template: `<p class="hint"><ng-content /></p>`,
|
|
35000
|
-
isInline: true,
|
|
35001
|
-
styles: [":host{display:block}.hint{font-size:.75rem;line-height:1.4;color:#64748b;margin:0}\n"],
|
|
35002
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
35003
|
-
});
|
|
35004
|
-
}
|
|
35005
|
-
};
|
|
35006
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
35007
|
-
minVersion: "12.0.0",
|
|
35008
|
-
version: "22.2.2",
|
|
35009
|
-
ngImport: i0,
|
|
35010
|
-
type: HintComponent,
|
|
35011
|
-
decorators: [{
|
|
35012
|
-
type: Component,
|
|
35013
|
-
args: [{
|
|
35014
|
-
selector: "ui-hint",
|
|
35015
|
-
standalone: true,
|
|
35016
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35017
|
-
template: `<p class="hint"><ng-content /></p>`,
|
|
35018
|
-
styles: [":host{display:block}.hint{font-size:.75rem;line-height:1.4;color:#64748b;margin:0}\n"]
|
|
35019
|
-
}]
|
|
35020
|
-
}]
|
|
35021
|
-
});
|
|
35022
35647
|
var TimelineComponent = class TimelineComponent {
|
|
35023
35648
|
constructor() {
|
|
35024
35649
|
this.items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
@@ -35275,7 +35900,11 @@ var TimelineComponent = class TimelineComponent {
|
|
|
35275
35900
|
kind: "component",
|
|
35276
35901
|
type: BadgeComponent,
|
|
35277
35902
|
selector: "ui-badge",
|
|
35278
|
-
inputs: [
|
|
35903
|
+
inputs: [
|
|
35904
|
+
"label",
|
|
35905
|
+
"variant",
|
|
35906
|
+
"color"
|
|
35907
|
+
]
|
|
35279
35908
|
},
|
|
35280
35909
|
{
|
|
35281
35910
|
kind: "component",
|
|
@@ -37777,12 +38406,12 @@ var KpiCardComponent = class KpiCardComponent {
|
|
|
37777
38406
|
}
|
|
37778
38407
|
@if (hasProgress()) {
|
|
37779
38408
|
<div class="kpi-top">
|
|
37780
|
-
<span class="kpi-label">{{ label() }}</span>
|
|
38409
|
+
<span class="kpi-label" data-testid="kpi-label">{{ label() }}</span>
|
|
37781
38410
|
<ui-progress-ring class="kpi-ring" [attr.aria-hidden]="loading() ? 'true' : null" [value]="progress()!" [max]="progressMax()" [size]="progressSize()" [strokeWidth]="progressStrokeWidth()"
|
|
37782
38411
|
[variant]="progressVariant()" [ariaLabel]="progressAriaLabel() || (label() + ' progress')" [valueText]="progressValueText()" />
|
|
37783
38412
|
</div>
|
|
37784
38413
|
} @else {
|
|
37785
|
-
<span class="kpi-label">{{ label() }}</span>
|
|
38414
|
+
<span class="kpi-label" data-testid="kpi-label">{{ label() }}</span>
|
|
37786
38415
|
}
|
|
37787
38416
|
@if (loading()) {
|
|
37788
38417
|
<span class="kpi-value kpi-value--loading" aria-hidden="true" data-testid="kpi-value-placeholder"><span class="kpi-bar"></span></span>
|
|
@@ -37791,7 +38420,7 @@ var KpiCardComponent = class KpiCardComponent {
|
|
|
37791
38420
|
<span class="kpi-subtitle kpi-subtitle--loading" aria-hidden="true" data-testid="kpi-subtitle-placeholder">{{ subtitle() }}</span>
|
|
37792
38421
|
}
|
|
37793
38422
|
} @else {
|
|
37794
|
-
<span class="kpi-value"
|
|
38423
|
+
<span class="kpi-value" data-testid="kpi-value"
|
|
37795
38424
|
[class.green-value]="highlight() || valueColor() === 'green'"
|
|
37796
38425
|
[class.blue-value]="valueColor() === 'blue'"
|
|
37797
38426
|
[class.red-value]="valueColor() === 'red'">{{ value() }}</span>
|
|
@@ -37854,12 +38483,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
37854
38483
|
}
|
|
37855
38484
|
@if (hasProgress()) {
|
|
37856
38485
|
<div class="kpi-top">
|
|
37857
|
-
<span class="kpi-label">{{ label() }}</span>
|
|
38486
|
+
<span class="kpi-label" data-testid="kpi-label">{{ label() }}</span>
|
|
37858
38487
|
<ui-progress-ring class="kpi-ring" [attr.aria-hidden]="loading() ? 'true' : null" [value]="progress()!" [max]="progressMax()" [size]="progressSize()" [strokeWidth]="progressStrokeWidth()"
|
|
37859
38488
|
[variant]="progressVariant()" [ariaLabel]="progressAriaLabel() || (label() + ' progress')" [valueText]="progressValueText()" />
|
|
37860
38489
|
</div>
|
|
37861
38490
|
} @else {
|
|
37862
|
-
<span class="kpi-label">{{ label() }}</span>
|
|
38491
|
+
<span class="kpi-label" data-testid="kpi-label">{{ label() }}</span>
|
|
37863
38492
|
}
|
|
37864
38493
|
@if (loading()) {
|
|
37865
38494
|
<span class="kpi-value kpi-value--loading" aria-hidden="true" data-testid="kpi-value-placeholder"><span class="kpi-bar"></span></span>
|
|
@@ -37868,7 +38497,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
37868
38497
|
<span class="kpi-subtitle kpi-subtitle--loading" aria-hidden="true" data-testid="kpi-subtitle-placeholder">{{ subtitle() }}</span>
|
|
37869
38498
|
}
|
|
37870
38499
|
} @else {
|
|
37871
|
-
<span class="kpi-value"
|
|
38500
|
+
<span class="kpi-value" data-testid="kpi-value"
|
|
37872
38501
|
[class.green-value]="highlight() || valueColor() === 'green'"
|
|
37873
38502
|
[class.blue-value]="valueColor() === 'blue'"
|
|
37874
38503
|
[class.red-value]="valueColor() === 'red'">{{ value() }}</span>
|
|
@@ -38278,7 +38907,9 @@ var DateRangePickerComponent = class DateRangePickerComponent {
|
|
|
38278
38907
|
"name",
|
|
38279
38908
|
"noWrap",
|
|
38280
38909
|
"orientation",
|
|
38281
|
-
"controlsPanels"
|
|
38910
|
+
"controlsPanels",
|
|
38911
|
+
"showDescription",
|
|
38912
|
+
"headingLevel"
|
|
38282
38913
|
],
|
|
38283
38914
|
outputs: ["tabChange"]
|
|
38284
38915
|
},
|
|
@@ -39982,19 +40613,19 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
39982
40613
|
}]
|
|
39983
40614
|
}
|
|
39984
40615
|
});
|
|
39985
|
-
var
|
|
40616
|
+
var SwatchPickerComponent = class SwatchPickerComponent {
|
|
39986
40617
|
get _name() {
|
|
39987
40618
|
return this.name() || this._generatedName;
|
|
39988
40619
|
}
|
|
39989
40620
|
constructor() {
|
|
40621
|
+
this._el = inject(ElementRef);
|
|
39990
40622
|
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
39991
|
-
this.
|
|
39992
|
-
this.rows = input([], ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
39993
|
-
this.columns = input([], ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
40623
|
+
this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
39994
40624
|
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
39995
40625
|
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
39996
40626
|
this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
39997
40627
|
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
40628
|
+
this.columns = input(0, ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
39998
40629
|
this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
39999
40630
|
this._disabledInput = input(false, {
|
|
40000
40631
|
...ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {},
|
|
@@ -40002,14 +40633,15 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40002
40633
|
});
|
|
40003
40634
|
this._cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
40004
40635
|
this.disabled = computed(() => this._disabledInput() || this._cvaDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
40005
|
-
this._generatedName = `
|
|
40636
|
+
this._generatedName = `sp-${Math.random().toString(36).slice(2, 8)}`;
|
|
40006
40637
|
this._descId = `${this._generatedName}-desc`;
|
|
40007
|
-
this._value = signal(
|
|
40638
|
+
this._value = signal("", ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
|
|
40008
40639
|
this._reveal = createFieldReveal(this.showErrors);
|
|
40009
40640
|
this._issue = computed(() => this._check(this._value()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
|
|
40010
40641
|
this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
40011
40642
|
this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
40012
40643
|
this.invalidChange = output();
|
|
40644
|
+
this.valueChange = output();
|
|
40013
40645
|
this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
|
|
40014
40646
|
this._onValidatorChange = () => {};
|
|
40015
40647
|
this._onChange = (_) => {};
|
|
@@ -40022,13 +40654,14 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40022
40654
|
this._onValidatorChange();
|
|
40023
40655
|
}
|
|
40024
40656
|
validate(control) {
|
|
40025
|
-
|
|
40657
|
+
const v = control.value;
|
|
40658
|
+
return issueToErrors(this._check(v == null ? "" : String(v)));
|
|
40026
40659
|
}
|
|
40027
40660
|
registerOnValidatorChange(fn) {
|
|
40028
40661
|
this._onValidatorChange = fn;
|
|
40029
40662
|
}
|
|
40030
40663
|
writeValue(val) {
|
|
40031
|
-
this._value.set(
|
|
40664
|
+
this._value.set(val ?? "");
|
|
40032
40665
|
}
|
|
40033
40666
|
registerOnChange(fn) {
|
|
40034
40667
|
this._onChange = fn;
|
|
@@ -40039,18 +40672,21 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40039
40672
|
setDisabledState(d) {
|
|
40040
40673
|
this._cvaDisabled.set(d);
|
|
40041
40674
|
}
|
|
40042
|
-
onSelect(
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
this._value.set(next);
|
|
40048
|
-
this._onChange(next);
|
|
40675
|
+
onSelect(value) {
|
|
40676
|
+
if (this.disabled()) return;
|
|
40677
|
+
this._value.set(value);
|
|
40678
|
+
this._onChange(value);
|
|
40679
|
+
this.valueChange.emit(value);
|
|
40049
40680
|
}
|
|
40050
|
-
|
|
40051
|
-
if (
|
|
40052
|
-
const
|
|
40053
|
-
|
|
40681
|
+
onKeydown(e) {
|
|
40682
|
+
if (e.key !== "Home" && e.key !== "End" || this.disabled()) return;
|
|
40683
|
+
const opts = this.options();
|
|
40684
|
+
const enabled = opts.filter((o) => !o.disabled);
|
|
40685
|
+
if (!enabled.length) return;
|
|
40686
|
+
e.preventDefault();
|
|
40687
|
+
const target = e.key === "Home" ? enabled[0] : enabled[enabled.length - 1];
|
|
40688
|
+
this.onSelect(target.value);
|
|
40689
|
+
this._el.nativeElement.querySelectorAll("input[type=radio]")[opts.indexOf(target)]?.focus();
|
|
40054
40690
|
}
|
|
40055
40691
|
onFocusOut(event) {
|
|
40056
40692
|
const next = event.relatedTarget;
|
|
@@ -40058,24 +40694,14 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40058
40694
|
this._onTouched();
|
|
40059
40695
|
this._reveal.touched.set(true);
|
|
40060
40696
|
}
|
|
40061
|
-
_toRecord(val) {
|
|
40062
|
-
return val && typeof val === "object" ? { ...val } : {};
|
|
40063
|
-
}
|
|
40064
40697
|
_check(value) {
|
|
40065
40698
|
if (this.disabled()) return null;
|
|
40066
|
-
|
|
40067
|
-
const
|
|
40068
|
-
if (
|
|
40699
|
+
if (!value) return this.required() ? requiredIssue(this.label()) : null;
|
|
40700
|
+
const opts = this.options();
|
|
40701
|
+
if (opts.length > 0 && !opts.some((o) => o.value === value)) return {
|
|
40069
40702
|
key: "option",
|
|
40070
40703
|
message: "Select a valid option."
|
|
40071
40704
|
};
|
|
40072
|
-
if (this.required() && rows.some((r) => !value[r.value])) {
|
|
40073
|
-
const label = this.label().trim();
|
|
40074
|
-
return {
|
|
40075
|
-
key: "required",
|
|
40076
|
-
message: label ? `${label}: choose an option in every row.` : "Choose an option in every row."
|
|
40077
|
-
};
|
|
40078
|
-
}
|
|
40079
40705
|
return null;
|
|
40080
40706
|
}
|
|
40081
40707
|
static {
|
|
@@ -40083,7 +40709,7 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40083
40709
|
minVersion: "12.0.0",
|
|
40084
40710
|
version: "22.2.2",
|
|
40085
40711
|
ngImport: i0,
|
|
40086
|
-
type:
|
|
40712
|
+
type: SwatchPickerComponent,
|
|
40087
40713
|
deps: [],
|
|
40088
40714
|
target: i0.ɵɵFactoryTarget.Component
|
|
40089
40715
|
});
|
|
@@ -40092,9 +40718,9 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40092
40718
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
40093
40719
|
minVersion: "17.0.0",
|
|
40094
40720
|
version: "22.2.2",
|
|
40095
|
-
type:
|
|
40721
|
+
type: SwatchPickerComponent,
|
|
40096
40722
|
isStandalone: true,
|
|
40097
|
-
selector: "ui-
|
|
40723
|
+
selector: "ui-swatch-picker",
|
|
40098
40724
|
inputs: {
|
|
40099
40725
|
label: {
|
|
40100
40726
|
classPropertyName: "label",
|
|
@@ -40103,23 +40729,9 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40103
40729
|
isRequired: false,
|
|
40104
40730
|
transformFunction: null
|
|
40105
40731
|
},
|
|
40106
|
-
|
|
40107
|
-
classPropertyName: "
|
|
40108
|
-
publicName: "
|
|
40109
|
-
isSignal: true,
|
|
40110
|
-
isRequired: false,
|
|
40111
|
-
transformFunction: null
|
|
40112
|
-
},
|
|
40113
|
-
rows: {
|
|
40114
|
-
classPropertyName: "rows",
|
|
40115
|
-
publicName: "rows",
|
|
40116
|
-
isSignal: true,
|
|
40117
|
-
isRequired: false,
|
|
40118
|
-
transformFunction: null
|
|
40119
|
-
},
|
|
40120
|
-
columns: {
|
|
40121
|
-
classPropertyName: "columns",
|
|
40122
|
-
publicName: "columns",
|
|
40732
|
+
options: {
|
|
40733
|
+
classPropertyName: "options",
|
|
40734
|
+
publicName: "options",
|
|
40123
40735
|
isSignal: true,
|
|
40124
40736
|
isRequired: false,
|
|
40125
40737
|
transformFunction: null
|
|
@@ -40152,6 +40764,13 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40152
40764
|
isRequired: false,
|
|
40153
40765
|
transformFunction: null
|
|
40154
40766
|
},
|
|
40767
|
+
columns: {
|
|
40768
|
+
classPropertyName: "columns",
|
|
40769
|
+
publicName: "columns",
|
|
40770
|
+
isSignal: true,
|
|
40771
|
+
isRequired: false,
|
|
40772
|
+
transformFunction: null
|
|
40773
|
+
},
|
|
40155
40774
|
name: {
|
|
40156
40775
|
classPropertyName: "name",
|
|
40157
40776
|
publicName: "name",
|
|
@@ -40167,103 +40786,77 @@ var RadioMatrixComponent = class RadioMatrixComponent {
|
|
|
40167
40786
|
transformFunction: null
|
|
40168
40787
|
}
|
|
40169
40788
|
},
|
|
40170
|
-
outputs: {
|
|
40789
|
+
outputs: {
|
|
40790
|
+
invalidChange: "invalidChange",
|
|
40791
|
+
valueChange: "valueChange"
|
|
40792
|
+
},
|
|
40171
40793
|
providers: [
|
|
40172
40794
|
{
|
|
40173
40795
|
provide: NG_VALUE_ACCESSOR,
|
|
40174
|
-
useExisting: forwardRef(() =>
|
|
40796
|
+
useExisting: forwardRef(() => SwatchPickerComponent),
|
|
40175
40797
|
multi: true
|
|
40176
40798
|
},
|
|
40177
40799
|
{
|
|
40178
40800
|
provide: NG_VALIDATORS,
|
|
40179
|
-
useExisting: forwardRef(() =>
|
|
40801
|
+
useExisting: forwardRef(() => SwatchPickerComponent),
|
|
40180
40802
|
multi: true
|
|
40181
40803
|
},
|
|
40182
40804
|
{
|
|
40183
40805
|
provide: UiFieldValidity,
|
|
40184
|
-
useExisting: forwardRef(() =>
|
|
40806
|
+
useExisting: forwardRef(() => SwatchPickerComponent)
|
|
40185
40807
|
}
|
|
40186
40808
|
],
|
|
40187
40809
|
usesOnChanges: true,
|
|
40188
40810
|
ngImport: i0,
|
|
40189
40811
|
template: `
|
|
40190
40812
|
<fieldset
|
|
40191
|
-
class="
|
|
40192
|
-
|
|
40193
|
-
[class.
|
|
40813
|
+
class="sp-field"
|
|
40814
|
+
role="radiogroup"
|
|
40815
|
+
[class.sp-error]="_activeError()"
|
|
40816
|
+
[class.sp-disabled]="disabled()"
|
|
40194
40817
|
[disabled]="disabled()"
|
|
40195
40818
|
[attr.aria-required]="required() ? 'true' : null"
|
|
40196
40819
|
[attr.aria-invalid]="_activeError() ? 'true' : null"
|
|
40197
40820
|
[attr.aria-describedby]="(_activeError() || hint()) ? _descId : null"
|
|
40198
|
-
(focusout)="onFocusOut($event)"
|
|
40821
|
+
(focusout)="onFocusOut($event)"
|
|
40822
|
+
(keydown)="onKeydown($event)">
|
|
40199
40823
|
@if (label()) {
|
|
40200
|
-
<legend class="
|
|
40824
|
+
<legend class="sp-label">
|
|
40201
40825
|
{{ label() }}
|
|
40202
|
-
@if (required()) { <span class="
|
|
40826
|
+
@if (required()) { <span class="sp-required" aria-hidden="true">*</span> }
|
|
40203
40827
|
</legend>
|
|
40204
40828
|
}
|
|
40205
|
-
<div class="
|
|
40206
|
-
|
|
40207
|
-
<
|
|
40208
|
-
<
|
|
40209
|
-
|
|
40210
|
-
|
|
40211
|
-
|
|
40829
|
+
<div class="sp-options" [class.sp-grid]="columns() > 0" [style.--sp-cols]="columns() > 0 ? columns() : null">
|
|
40830
|
+
@for (opt of options(); track opt.value) {
|
|
40831
|
+
<label class="sp-option" [class.sp-selected]="_value() === opt.value" [class.sp-option-disabled]="disabled() || !!opt.disabled" [attr.title]="opt.label">
|
|
40832
|
+
<input class="sp-input" type="radio"
|
|
40833
|
+
[name]="_name"
|
|
40834
|
+
[value]="opt.value"
|
|
40835
|
+
[checked]="_value() === opt.value"
|
|
40836
|
+
[disabled]="disabled() || !!opt.disabled"
|
|
40837
|
+
[attr.aria-label]="opt.label"
|
|
40838
|
+
[attr.data-testid]="opt.testId || null"
|
|
40839
|
+
(change)="onSelect(opt.value)" />
|
|
40840
|
+
<span class="sp-swatch" [style.background-color]="opt.color" aria-hidden="true">
|
|
40841
|
+
@if (_value() === opt.value) {
|
|
40842
|
+
<svg class="sp-check" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
40843
|
+
<path d="M5 12.5l4.5 4.5L19 7.5" class="sp-check-outline" stroke-width="5"/>
|
|
40844
|
+
<path d="M5 12.5l4.5 4.5L19 7.5" class="sp-check-mark" stroke-width="3"/>
|
|
40845
|
+
</svg>
|
|
40212
40846
|
}
|
|
40213
|
-
</
|
|
40214
|
-
</
|
|
40215
|
-
|
|
40216
|
-
@for (row of rows(); track row.value) {
|
|
40217
|
-
<tr class="rm-row" [class.rm-row-missing]="_rowInvalid(row)">
|
|
40218
|
-
<th scope="row" class="rm-row-label">{{ row.label }}</th>
|
|
40219
|
-
@for (col of columns(); track col.value) {
|
|
40220
|
-
<td class="rm-cell">
|
|
40221
|
-
<ui-radio
|
|
40222
|
-
[name]="_name + '-' + row.value"
|
|
40223
|
-
[value]="col.value"
|
|
40224
|
-
[ariaLabel]="row.label + ': ' + col.label"
|
|
40225
|
-
[checked]="_value()[row.value] === col.value"
|
|
40226
|
-
[disabled]="disabled() || !!row.disabled || !!col.disabled"
|
|
40227
|
-
[invalid]="_rowInvalid(row)"
|
|
40228
|
-
[describedBy]="(_activeError() || hint()) ? _descId : ''"
|
|
40229
|
-
(selected)="onSelect(row.value, $event)" />
|
|
40230
|
-
</td>
|
|
40231
|
-
}
|
|
40232
|
-
</tr>
|
|
40233
|
-
}
|
|
40234
|
-
</tbody>
|
|
40235
|
-
</table>
|
|
40847
|
+
</span>
|
|
40848
|
+
</label>
|
|
40849
|
+
}
|
|
40236
40850
|
</div>
|
|
40237
40851
|
@if (_activeError()) {
|
|
40238
|
-
<p class="
|
|
40852
|
+
<p class="sp-desc sp-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
|
|
40239
40853
|
} @else if (hint()) {
|
|
40240
|
-
<p class="
|
|
40854
|
+
<p class="sp-desc" [id]="_descId">{{ hint() }}</p>
|
|
40241
40855
|
}
|
|
40242
40856
|
</fieldset>
|
|
40243
40857
|
`,
|
|
40244
40858
|
isInline: true,
|
|
40245
|
-
styles: [":host{display:block}.
|
|
40246
|
-
dependencies: [{
|
|
40247
|
-
kind: "component",
|
|
40248
|
-
type: RadioComponent,
|
|
40249
|
-
selector: "ui-radio",
|
|
40250
|
-
inputs: [
|
|
40251
|
-
"label",
|
|
40252
|
-
"description",
|
|
40253
|
-
"icon",
|
|
40254
|
-
"ariaLabel",
|
|
40255
|
-
"testId",
|
|
40256
|
-
"value",
|
|
40257
|
-
"name",
|
|
40258
|
-
"checked",
|
|
40259
|
-
"invalid",
|
|
40260
|
-
"describedBy",
|
|
40261
|
-
"controls",
|
|
40262
|
-
"disabled",
|
|
40263
|
-
"labelId"
|
|
40264
|
-
],
|
|
40265
|
-
outputs: ["selected"]
|
|
40266
|
-
}],
|
|
40859
|
+
styles: [":host{display:block}.sp-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.sp-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sp-required{color:#dc2626;margin-left:2px}.sp-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.sp-options.sp-grid{display:grid;grid-template-columns:repeat(var(--sp-cols),max-content)}.sp-option{position:relative;display:inline-flex;cursor:pointer}.sp-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.sp-swatch{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;transition:box-shadow .12s}.sp-option:hover .sp-swatch{box-shadow:0 0 0 2px #64748b}.sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #1e293b}.sp-input:focus-visible+.sp-swatch{outline:2px solid #3b82f6;outline-offset:3px}.sp-check-outline{stroke:#0f172abf}.sp-check-mark{stroke:#fff}.sp-option-disabled{cursor:not-allowed;opacity:.45}.sp-error .sp-option .sp-swatch{box-shadow:0 0 0 1px #dc2626}.sp-error .sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #dc2626}.sp-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b;overflow-wrap:anywhere}.sp-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sp-options{gap:4px}.sp-option{min-width:44px;min-height:44px;align-items:center;justify-content:center}.sp-options.sp-grid{grid-template-columns:repeat(auto-fill,44px)}}\n"],
|
|
40267
40860
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
40268
40861
|
});
|
|
40269
40862
|
}
|
|
@@ -40272,86 +40865,77 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
40272
40865
|
minVersion: "12.0.0",
|
|
40273
40866
|
version: "22.2.2",
|
|
40274
40867
|
ngImport: i0,
|
|
40275
|
-
type:
|
|
40868
|
+
type: SwatchPickerComponent,
|
|
40276
40869
|
decorators: [{
|
|
40277
40870
|
type: Component,
|
|
40278
40871
|
args: [{
|
|
40279
|
-
selector: "ui-
|
|
40872
|
+
selector: "ui-swatch-picker",
|
|
40280
40873
|
standalone: true,
|
|
40281
|
-
imports: [RadioComponent],
|
|
40282
40874
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40283
40875
|
providers: [
|
|
40284
40876
|
{
|
|
40285
40877
|
provide: NG_VALUE_ACCESSOR,
|
|
40286
|
-
useExisting: forwardRef(() =>
|
|
40878
|
+
useExisting: forwardRef(() => SwatchPickerComponent),
|
|
40287
40879
|
multi: true
|
|
40288
40880
|
},
|
|
40289
40881
|
{
|
|
40290
40882
|
provide: NG_VALIDATORS,
|
|
40291
|
-
useExisting: forwardRef(() =>
|
|
40883
|
+
useExisting: forwardRef(() => SwatchPickerComponent),
|
|
40292
40884
|
multi: true
|
|
40293
40885
|
},
|
|
40294
40886
|
{
|
|
40295
40887
|
provide: UiFieldValidity,
|
|
40296
|
-
useExisting: forwardRef(() =>
|
|
40888
|
+
useExisting: forwardRef(() => SwatchPickerComponent)
|
|
40297
40889
|
}
|
|
40298
40890
|
],
|
|
40299
40891
|
template: `
|
|
40300
40892
|
<fieldset
|
|
40301
|
-
class="
|
|
40302
|
-
|
|
40303
|
-
[class.
|
|
40893
|
+
class="sp-field"
|
|
40894
|
+
role="radiogroup"
|
|
40895
|
+
[class.sp-error]="_activeError()"
|
|
40896
|
+
[class.sp-disabled]="disabled()"
|
|
40304
40897
|
[disabled]="disabled()"
|
|
40305
40898
|
[attr.aria-required]="required() ? 'true' : null"
|
|
40306
40899
|
[attr.aria-invalid]="_activeError() ? 'true' : null"
|
|
40307
40900
|
[attr.aria-describedby]="(_activeError() || hint()) ? _descId : null"
|
|
40308
|
-
(focusout)="onFocusOut($event)"
|
|
40901
|
+
(focusout)="onFocusOut($event)"
|
|
40902
|
+
(keydown)="onKeydown($event)">
|
|
40309
40903
|
@if (label()) {
|
|
40310
|
-
<legend class="
|
|
40904
|
+
<legend class="sp-label">
|
|
40311
40905
|
{{ label() }}
|
|
40312
|
-
@if (required()) { <span class="
|
|
40906
|
+
@if (required()) { <span class="sp-required" aria-hidden="true">*</span> }
|
|
40313
40907
|
</legend>
|
|
40314
40908
|
}
|
|
40315
|
-
<div class="
|
|
40316
|
-
|
|
40317
|
-
<
|
|
40318
|
-
<
|
|
40319
|
-
|
|
40320
|
-
|
|
40321
|
-
|
|
40909
|
+
<div class="sp-options" [class.sp-grid]="columns() > 0" [style.--sp-cols]="columns() > 0 ? columns() : null">
|
|
40910
|
+
@for (opt of options(); track opt.value) {
|
|
40911
|
+
<label class="sp-option" [class.sp-selected]="_value() === opt.value" [class.sp-option-disabled]="disabled() || !!opt.disabled" [attr.title]="opt.label">
|
|
40912
|
+
<input class="sp-input" type="radio"
|
|
40913
|
+
[name]="_name"
|
|
40914
|
+
[value]="opt.value"
|
|
40915
|
+
[checked]="_value() === opt.value"
|
|
40916
|
+
[disabled]="disabled() || !!opt.disabled"
|
|
40917
|
+
[attr.aria-label]="opt.label"
|
|
40918
|
+
[attr.data-testid]="opt.testId || null"
|
|
40919
|
+
(change)="onSelect(opt.value)" />
|
|
40920
|
+
<span class="sp-swatch" [style.background-color]="opt.color" aria-hidden="true">
|
|
40921
|
+
@if (_value() === opt.value) {
|
|
40922
|
+
<svg class="sp-check" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
40923
|
+
<path d="M5 12.5l4.5 4.5L19 7.5" class="sp-check-outline" stroke-width="5"/>
|
|
40924
|
+
<path d="M5 12.5l4.5 4.5L19 7.5" class="sp-check-mark" stroke-width="3"/>
|
|
40925
|
+
</svg>
|
|
40322
40926
|
}
|
|
40323
|
-
</
|
|
40324
|
-
</
|
|
40325
|
-
|
|
40326
|
-
@for (row of rows(); track row.value) {
|
|
40327
|
-
<tr class="rm-row" [class.rm-row-missing]="_rowInvalid(row)">
|
|
40328
|
-
<th scope="row" class="rm-row-label">{{ row.label }}</th>
|
|
40329
|
-
@for (col of columns(); track col.value) {
|
|
40330
|
-
<td class="rm-cell">
|
|
40331
|
-
<ui-radio
|
|
40332
|
-
[name]="_name + '-' + row.value"
|
|
40333
|
-
[value]="col.value"
|
|
40334
|
-
[ariaLabel]="row.label + ': ' + col.label"
|
|
40335
|
-
[checked]="_value()[row.value] === col.value"
|
|
40336
|
-
[disabled]="disabled() || !!row.disabled || !!col.disabled"
|
|
40337
|
-
[invalid]="_rowInvalid(row)"
|
|
40338
|
-
[describedBy]="(_activeError() || hint()) ? _descId : ''"
|
|
40339
|
-
(selected)="onSelect(row.value, $event)" />
|
|
40340
|
-
</td>
|
|
40341
|
-
}
|
|
40342
|
-
</tr>
|
|
40343
|
-
}
|
|
40344
|
-
</tbody>
|
|
40345
|
-
</table>
|
|
40927
|
+
</span>
|
|
40928
|
+
</label>
|
|
40929
|
+
}
|
|
40346
40930
|
</div>
|
|
40347
40931
|
@if (_activeError()) {
|
|
40348
|
-
<p class="
|
|
40932
|
+
<p class="sp-desc sp-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
|
|
40349
40933
|
} @else if (hint()) {
|
|
40350
|
-
<p class="
|
|
40934
|
+
<p class="sp-desc" [id]="_descId">{{ hint() }}</p>
|
|
40351
40935
|
}
|
|
40352
40936
|
</fieldset>
|
|
40353
40937
|
`,
|
|
40354
|
-
styles: [":host{display:block}.
|
|
40938
|
+
styles: [":host{display:block}.sp-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.sp-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sp-required{color:#dc2626;margin-left:2px}.sp-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.sp-options.sp-grid{display:grid;grid-template-columns:repeat(var(--sp-cols),max-content)}.sp-option{position:relative;display:inline-flex;cursor:pointer}.sp-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.sp-swatch{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;transition:box-shadow .12s}.sp-option:hover .sp-swatch{box-shadow:0 0 0 2px #64748b}.sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #1e293b}.sp-input:focus-visible+.sp-swatch{outline:2px solid #3b82f6;outline-offset:3px}.sp-check-outline{stroke:#0f172abf}.sp-check-mark{stroke:#fff}.sp-option-disabled{cursor:not-allowed;opacity:.45}.sp-error .sp-option .sp-swatch{box-shadow:0 0 0 1px #dc2626}.sp-error .sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #dc2626}.sp-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b;overflow-wrap:anywhere}.sp-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sp-options{gap:4px}.sp-option{min-width:44px;min-height:44px;align-items:center;justify-content:center}.sp-options.sp-grid{grid-template-columns:repeat(auto-fill,44px)}}\n"]
|
|
40355
40939
|
}]
|
|
40356
40940
|
}],
|
|
40357
40941
|
ctorParameters: () => [],
|
|
@@ -40364,27 +40948,899 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
40364
40948
|
required: false
|
|
40365
40949
|
}]
|
|
40366
40950
|
}],
|
|
40367
|
-
|
|
40368
|
-
type: i0.Input,
|
|
40369
|
-
args: [{
|
|
40370
|
-
isSignal: true,
|
|
40371
|
-
alias: "rowHeader",
|
|
40372
|
-
required: false
|
|
40373
|
-
}]
|
|
40374
|
-
}],
|
|
40375
|
-
rows: [{
|
|
40376
|
-
type: i0.Input,
|
|
40377
|
-
args: [{
|
|
40378
|
-
isSignal: true,
|
|
40379
|
-
alias: "rows",
|
|
40380
|
-
required: false
|
|
40381
|
-
}]
|
|
40382
|
-
}],
|
|
40383
|
-
columns: [{
|
|
40951
|
+
options: [{
|
|
40384
40952
|
type: i0.Input,
|
|
40385
40953
|
args: [{
|
|
40386
40954
|
isSignal: true,
|
|
40387
|
-
alias: "
|
|
40955
|
+
alias: "options",
|
|
40956
|
+
required: false
|
|
40957
|
+
}]
|
|
40958
|
+
}],
|
|
40959
|
+
required: [{
|
|
40960
|
+
type: i0.Input,
|
|
40961
|
+
args: [{
|
|
40962
|
+
isSignal: true,
|
|
40963
|
+
alias: "required",
|
|
40964
|
+
required: false
|
|
40965
|
+
}]
|
|
40966
|
+
}],
|
|
40967
|
+
hint: [{
|
|
40968
|
+
type: i0.Input,
|
|
40969
|
+
args: [{
|
|
40970
|
+
isSignal: true,
|
|
40971
|
+
alias: "hint",
|
|
40972
|
+
required: false
|
|
40973
|
+
}]
|
|
40974
|
+
}],
|
|
40975
|
+
error: [{
|
|
40976
|
+
type: i0.Input,
|
|
40977
|
+
args: [{
|
|
40978
|
+
isSignal: true,
|
|
40979
|
+
alias: "error",
|
|
40980
|
+
required: false
|
|
40981
|
+
}]
|
|
40982
|
+
}],
|
|
40983
|
+
showErrors: [{
|
|
40984
|
+
type: i0.Input,
|
|
40985
|
+
args: [{
|
|
40986
|
+
isSignal: true,
|
|
40987
|
+
alias: "showErrors",
|
|
40988
|
+
required: false
|
|
40989
|
+
}]
|
|
40990
|
+
}],
|
|
40991
|
+
columns: [{
|
|
40992
|
+
type: i0.Input,
|
|
40993
|
+
args: [{
|
|
40994
|
+
isSignal: true,
|
|
40995
|
+
alias: "columns",
|
|
40996
|
+
required: false
|
|
40997
|
+
}]
|
|
40998
|
+
}],
|
|
40999
|
+
name: [{
|
|
41000
|
+
type: i0.Input,
|
|
41001
|
+
args: [{
|
|
41002
|
+
isSignal: true,
|
|
41003
|
+
alias: "name",
|
|
41004
|
+
required: false
|
|
41005
|
+
}]
|
|
41006
|
+
}],
|
|
41007
|
+
_disabledInput: [{
|
|
41008
|
+
type: i0.Input,
|
|
41009
|
+
args: [{
|
|
41010
|
+
isSignal: true,
|
|
41011
|
+
alias: "disabled",
|
|
41012
|
+
required: false
|
|
41013
|
+
}]
|
|
41014
|
+
}],
|
|
41015
|
+
invalidChange: [{
|
|
41016
|
+
type: i0.Output,
|
|
41017
|
+
args: ["invalidChange"]
|
|
41018
|
+
}],
|
|
41019
|
+
valueChange: [{
|
|
41020
|
+
type: i0.Output,
|
|
41021
|
+
args: ["valueChange"]
|
|
41022
|
+
}]
|
|
41023
|
+
}
|
|
41024
|
+
});
|
|
41025
|
+
var IconPickerComponent = class IconPickerComponent {
|
|
41026
|
+
_path(o) {
|
|
41027
|
+
return o.path || iconPath(o.iconKey || o.value) || "";
|
|
41028
|
+
}
|
|
41029
|
+
get _name() {
|
|
41030
|
+
return this.name() || this._generatedName;
|
|
41031
|
+
}
|
|
41032
|
+
constructor() {
|
|
41033
|
+
this._el = inject(ElementRef);
|
|
41034
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
41035
|
+
this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
41036
|
+
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
41037
|
+
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
41038
|
+
this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
41039
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
41040
|
+
this.columns = input(0, ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
41041
|
+
this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
41042
|
+
this._disabledInput = input(false, {
|
|
41043
|
+
...ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {},
|
|
41044
|
+
alias: "disabled"
|
|
41045
|
+
});
|
|
41046
|
+
this._cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
41047
|
+
this.disabled = computed(() => this._disabledInput() || this._cvaDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
41048
|
+
this._generatedName = `ip-${Math.random().toString(36).slice(2, 8)}`;
|
|
41049
|
+
this._descId = `${this._generatedName}-desc`;
|
|
41050
|
+
this._value = signal("", ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
|
|
41051
|
+
this._reveal = createFieldReveal(this.showErrors);
|
|
41052
|
+
this._issue = computed(() => this._check(this._value()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
|
|
41053
|
+
this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
41054
|
+
this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
41055
|
+
this.invalidChange = output();
|
|
41056
|
+
this.valueChange = output();
|
|
41057
|
+
this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
|
|
41058
|
+
this._onValidatorChange = () => {};
|
|
41059
|
+
this._onChange = (_) => {};
|
|
41060
|
+
this._onTouched = () => {};
|
|
41061
|
+
effect(() => {
|
|
41062
|
+
this.invalidChange.emit(this.invalid());
|
|
41063
|
+
});
|
|
41064
|
+
}
|
|
41065
|
+
ngOnChanges() {
|
|
41066
|
+
this._onValidatorChange();
|
|
41067
|
+
}
|
|
41068
|
+
validate(control) {
|
|
41069
|
+
const v = control.value;
|
|
41070
|
+
return issueToErrors(this._check(v == null ? "" : String(v)));
|
|
41071
|
+
}
|
|
41072
|
+
registerOnValidatorChange(fn) {
|
|
41073
|
+
this._onValidatorChange = fn;
|
|
41074
|
+
}
|
|
41075
|
+
writeValue(val) {
|
|
41076
|
+
this._value.set(val ?? "");
|
|
41077
|
+
}
|
|
41078
|
+
registerOnChange(fn) {
|
|
41079
|
+
this._onChange = fn;
|
|
41080
|
+
}
|
|
41081
|
+
registerOnTouched(fn) {
|
|
41082
|
+
this._onTouched = fn;
|
|
41083
|
+
}
|
|
41084
|
+
setDisabledState(d) {
|
|
41085
|
+
this._cvaDisabled.set(d);
|
|
41086
|
+
}
|
|
41087
|
+
onSelect(value) {
|
|
41088
|
+
if (this.disabled()) return;
|
|
41089
|
+
this._value.set(value);
|
|
41090
|
+
this._onChange(value);
|
|
41091
|
+
this.valueChange.emit(value);
|
|
41092
|
+
}
|
|
41093
|
+
onKeydown(e) {
|
|
41094
|
+
if (e.key !== "Home" && e.key !== "End" || this.disabled()) return;
|
|
41095
|
+
const opts = this.options();
|
|
41096
|
+
const enabled = opts.filter((o) => !o.disabled);
|
|
41097
|
+
if (!enabled.length) return;
|
|
41098
|
+
e.preventDefault();
|
|
41099
|
+
const target = e.key === "Home" ? enabled[0] : enabled[enabled.length - 1];
|
|
41100
|
+
this.onSelect(target.value);
|
|
41101
|
+
this._el.nativeElement.querySelectorAll("input[type=radio]")[opts.indexOf(target)]?.focus();
|
|
41102
|
+
}
|
|
41103
|
+
onFocusOut(event) {
|
|
41104
|
+
const next = event.relatedTarget;
|
|
41105
|
+
if (next && event.currentTarget.contains(next)) return;
|
|
41106
|
+
this._onTouched();
|
|
41107
|
+
this._reveal.touched.set(true);
|
|
41108
|
+
}
|
|
41109
|
+
_check(value) {
|
|
41110
|
+
if (this.disabled()) return null;
|
|
41111
|
+
if (!value) return this.required() ? requiredIssue(this.label()) : null;
|
|
41112
|
+
const opts = this.options();
|
|
41113
|
+
if (opts.length > 0 && !opts.some((o) => o.value === value)) return {
|
|
41114
|
+
key: "option",
|
|
41115
|
+
message: "Select a valid option."
|
|
41116
|
+
};
|
|
41117
|
+
return null;
|
|
41118
|
+
}
|
|
41119
|
+
static {
|
|
41120
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
41121
|
+
minVersion: "12.0.0",
|
|
41122
|
+
version: "22.2.2",
|
|
41123
|
+
ngImport: i0,
|
|
41124
|
+
type: IconPickerComponent,
|
|
41125
|
+
deps: [],
|
|
41126
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
41127
|
+
});
|
|
41128
|
+
}
|
|
41129
|
+
static {
|
|
41130
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
41131
|
+
minVersion: "17.0.0",
|
|
41132
|
+
version: "22.2.2",
|
|
41133
|
+
type: IconPickerComponent,
|
|
41134
|
+
isStandalone: true,
|
|
41135
|
+
selector: "ui-icon-picker",
|
|
41136
|
+
inputs: {
|
|
41137
|
+
label: {
|
|
41138
|
+
classPropertyName: "label",
|
|
41139
|
+
publicName: "label",
|
|
41140
|
+
isSignal: true,
|
|
41141
|
+
isRequired: false,
|
|
41142
|
+
transformFunction: null
|
|
41143
|
+
},
|
|
41144
|
+
options: {
|
|
41145
|
+
classPropertyName: "options",
|
|
41146
|
+
publicName: "options",
|
|
41147
|
+
isSignal: true,
|
|
41148
|
+
isRequired: false,
|
|
41149
|
+
transformFunction: null
|
|
41150
|
+
},
|
|
41151
|
+
required: {
|
|
41152
|
+
classPropertyName: "required",
|
|
41153
|
+
publicName: "required",
|
|
41154
|
+
isSignal: true,
|
|
41155
|
+
isRequired: false,
|
|
41156
|
+
transformFunction: null
|
|
41157
|
+
},
|
|
41158
|
+
hint: {
|
|
41159
|
+
classPropertyName: "hint",
|
|
41160
|
+
publicName: "hint",
|
|
41161
|
+
isSignal: true,
|
|
41162
|
+
isRequired: false,
|
|
41163
|
+
transformFunction: null
|
|
41164
|
+
},
|
|
41165
|
+
error: {
|
|
41166
|
+
classPropertyName: "error",
|
|
41167
|
+
publicName: "error",
|
|
41168
|
+
isSignal: true,
|
|
41169
|
+
isRequired: false,
|
|
41170
|
+
transformFunction: null
|
|
41171
|
+
},
|
|
41172
|
+
showErrors: {
|
|
41173
|
+
classPropertyName: "showErrors",
|
|
41174
|
+
publicName: "showErrors",
|
|
41175
|
+
isSignal: true,
|
|
41176
|
+
isRequired: false,
|
|
41177
|
+
transformFunction: null
|
|
41178
|
+
},
|
|
41179
|
+
columns: {
|
|
41180
|
+
classPropertyName: "columns",
|
|
41181
|
+
publicName: "columns",
|
|
41182
|
+
isSignal: true,
|
|
41183
|
+
isRequired: false,
|
|
41184
|
+
transformFunction: null
|
|
41185
|
+
},
|
|
41186
|
+
name: {
|
|
41187
|
+
classPropertyName: "name",
|
|
41188
|
+
publicName: "name",
|
|
41189
|
+
isSignal: true,
|
|
41190
|
+
isRequired: false,
|
|
41191
|
+
transformFunction: null
|
|
41192
|
+
},
|
|
41193
|
+
_disabledInput: {
|
|
41194
|
+
classPropertyName: "_disabledInput",
|
|
41195
|
+
publicName: "disabled",
|
|
41196
|
+
isSignal: true,
|
|
41197
|
+
isRequired: false,
|
|
41198
|
+
transformFunction: null
|
|
41199
|
+
}
|
|
41200
|
+
},
|
|
41201
|
+
outputs: {
|
|
41202
|
+
invalidChange: "invalidChange",
|
|
41203
|
+
valueChange: "valueChange"
|
|
41204
|
+
},
|
|
41205
|
+
providers: [
|
|
41206
|
+
{
|
|
41207
|
+
provide: NG_VALUE_ACCESSOR,
|
|
41208
|
+
useExisting: forwardRef(() => IconPickerComponent),
|
|
41209
|
+
multi: true
|
|
41210
|
+
},
|
|
41211
|
+
{
|
|
41212
|
+
provide: NG_VALIDATORS,
|
|
41213
|
+
useExisting: forwardRef(() => IconPickerComponent),
|
|
41214
|
+
multi: true
|
|
41215
|
+
},
|
|
41216
|
+
{
|
|
41217
|
+
provide: UiFieldValidity,
|
|
41218
|
+
useExisting: forwardRef(() => IconPickerComponent)
|
|
41219
|
+
}
|
|
41220
|
+
],
|
|
41221
|
+
usesOnChanges: true,
|
|
41222
|
+
ngImport: i0,
|
|
41223
|
+
template: `
|
|
41224
|
+
<fieldset
|
|
41225
|
+
class="ip-field"
|
|
41226
|
+
role="radiogroup"
|
|
41227
|
+
[class.ip-error]="_activeError()"
|
|
41228
|
+
[class.ip-disabled]="disabled()"
|
|
41229
|
+
[disabled]="disabled()"
|
|
41230
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
41231
|
+
[attr.aria-invalid]="_activeError() ? 'true' : null"
|
|
41232
|
+
[attr.aria-describedby]="(_activeError() || hint()) ? _descId : null"
|
|
41233
|
+
(focusout)="onFocusOut($event)"
|
|
41234
|
+
(keydown)="onKeydown($event)">
|
|
41235
|
+
@if (label()) {
|
|
41236
|
+
<legend class="ip-label">
|
|
41237
|
+
{{ label() }}
|
|
41238
|
+
@if (required()) { <span class="ip-required" aria-hidden="true">*</span> }
|
|
41239
|
+
</legend>
|
|
41240
|
+
}
|
|
41241
|
+
<div class="ip-options" [class.ip-grid]="columns() > 0" [style.--ip-cols]="columns() > 0 ? columns() : null">
|
|
41242
|
+
@for (opt of options(); track opt.value) {
|
|
41243
|
+
<label class="ip-option" [class.ip-selected]="_value() === opt.value" [class.ip-option-disabled]="disabled() || !!opt.disabled" [attr.title]="opt.label">
|
|
41244
|
+
<input class="ip-input" type="radio"
|
|
41245
|
+
[name]="_name"
|
|
41246
|
+
[value]="opt.value"
|
|
41247
|
+
[checked]="_value() === opt.value"
|
|
41248
|
+
[disabled]="disabled() || !!opt.disabled"
|
|
41249
|
+
[attr.aria-label]="opt.label"
|
|
41250
|
+
[attr.data-testid]="opt.testId || null"
|
|
41251
|
+
(change)="onSelect(opt.value)" />
|
|
41252
|
+
<span class="ip-swatch" aria-hidden="true">
|
|
41253
|
+
<svg class="ip-glyph" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
41254
|
+
<path [attr.d]="_path(opt)"/>
|
|
41255
|
+
</svg>
|
|
41256
|
+
@if (_value() === opt.value) {
|
|
41257
|
+
<svg class="ip-check" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
41258
|
+
<path d="M5 12.5l4.5 4.5L19 7.5"/>
|
|
41259
|
+
</svg>
|
|
41260
|
+
}
|
|
41261
|
+
</span>
|
|
41262
|
+
</label>
|
|
41263
|
+
}
|
|
41264
|
+
</div>
|
|
41265
|
+
@if (_activeError()) {
|
|
41266
|
+
<p class="ip-desc ip-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
|
|
41267
|
+
} @else if (hint()) {
|
|
41268
|
+
<p class="ip-desc" [id]="_descId">{{ hint() }}</p>
|
|
41269
|
+
}
|
|
41270
|
+
</fieldset>
|
|
41271
|
+
`,
|
|
41272
|
+
isInline: true,
|
|
41273
|
+
styles: [":host{display:block}.ip-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.ip-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ip-required{color:#dc2626;margin-left:2px}.ip-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.ip-options.ip-grid{display:grid;grid-template-columns:repeat(var(--ip-cols),max-content)}.ip-option{position:relative;display:inline-flex;cursor:pointer}.ip-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.ip-swatch{display:inline-flex;align-items:center;justify-content:center;position:relative;width:36px;height:36px;border-radius:8px;box-sizing:border-box;background:#fff;color:#334155;border:1px solid #cbd5e1;box-shadow:0 0 0 0 transparent;transition:box-shadow .12s}.ip-option:hover .ip-swatch{border-color:#64748b}.ip-input:focus-visible+.ip-swatch{outline:2px solid #3b82f6;outline-offset:3px}.ip-option.ip-selected .ip-swatch{background:#1e293b;color:#fff;border-color:#1e293b}.ip-check{position:absolute;right:2px;bottom:2px;padding:1px;border-radius:50%;background:#fff;color:#1e293b;border:1px solid #1e293b;box-sizing:content-box}.ip-option-disabled{cursor:not-allowed;opacity:.45}.ip-error .ip-option .ip-swatch{border-color:#dc2626}.ip-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b;overflow-wrap:anywhere}.ip-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.ip-options{gap:4px}.ip-option{min-width:44px;min-height:44px;align-items:center;justify-content:center}.ip-options.ip-grid{grid-template-columns:repeat(auto-fill,44px)}}\n"],
|
|
41274
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
41275
|
+
});
|
|
41276
|
+
}
|
|
41277
|
+
};
|
|
41278
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
41279
|
+
minVersion: "12.0.0",
|
|
41280
|
+
version: "22.2.2",
|
|
41281
|
+
ngImport: i0,
|
|
41282
|
+
type: IconPickerComponent,
|
|
41283
|
+
decorators: [{
|
|
41284
|
+
type: Component,
|
|
41285
|
+
args: [{
|
|
41286
|
+
selector: "ui-icon-picker",
|
|
41287
|
+
standalone: true,
|
|
41288
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41289
|
+
providers: [
|
|
41290
|
+
{
|
|
41291
|
+
provide: NG_VALUE_ACCESSOR,
|
|
41292
|
+
useExisting: forwardRef(() => IconPickerComponent),
|
|
41293
|
+
multi: true
|
|
41294
|
+
},
|
|
41295
|
+
{
|
|
41296
|
+
provide: NG_VALIDATORS,
|
|
41297
|
+
useExisting: forwardRef(() => IconPickerComponent),
|
|
41298
|
+
multi: true
|
|
41299
|
+
},
|
|
41300
|
+
{
|
|
41301
|
+
provide: UiFieldValidity,
|
|
41302
|
+
useExisting: forwardRef(() => IconPickerComponent)
|
|
41303
|
+
}
|
|
41304
|
+
],
|
|
41305
|
+
template: `
|
|
41306
|
+
<fieldset
|
|
41307
|
+
class="ip-field"
|
|
41308
|
+
role="radiogroup"
|
|
41309
|
+
[class.ip-error]="_activeError()"
|
|
41310
|
+
[class.ip-disabled]="disabled()"
|
|
41311
|
+
[disabled]="disabled()"
|
|
41312
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
41313
|
+
[attr.aria-invalid]="_activeError() ? 'true' : null"
|
|
41314
|
+
[attr.aria-describedby]="(_activeError() || hint()) ? _descId : null"
|
|
41315
|
+
(focusout)="onFocusOut($event)"
|
|
41316
|
+
(keydown)="onKeydown($event)">
|
|
41317
|
+
@if (label()) {
|
|
41318
|
+
<legend class="ip-label">
|
|
41319
|
+
{{ label() }}
|
|
41320
|
+
@if (required()) { <span class="ip-required" aria-hidden="true">*</span> }
|
|
41321
|
+
</legend>
|
|
41322
|
+
}
|
|
41323
|
+
<div class="ip-options" [class.ip-grid]="columns() > 0" [style.--ip-cols]="columns() > 0 ? columns() : null">
|
|
41324
|
+
@for (opt of options(); track opt.value) {
|
|
41325
|
+
<label class="ip-option" [class.ip-selected]="_value() === opt.value" [class.ip-option-disabled]="disabled() || !!opt.disabled" [attr.title]="opt.label">
|
|
41326
|
+
<input class="ip-input" type="radio"
|
|
41327
|
+
[name]="_name"
|
|
41328
|
+
[value]="opt.value"
|
|
41329
|
+
[checked]="_value() === opt.value"
|
|
41330
|
+
[disabled]="disabled() || !!opt.disabled"
|
|
41331
|
+
[attr.aria-label]="opt.label"
|
|
41332
|
+
[attr.data-testid]="opt.testId || null"
|
|
41333
|
+
(change)="onSelect(opt.value)" />
|
|
41334
|
+
<span class="ip-swatch" aria-hidden="true">
|
|
41335
|
+
<svg class="ip-glyph" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
41336
|
+
<path [attr.d]="_path(opt)"/>
|
|
41337
|
+
</svg>
|
|
41338
|
+
@if (_value() === opt.value) {
|
|
41339
|
+
<svg class="ip-check" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
41340
|
+
<path d="M5 12.5l4.5 4.5L19 7.5"/>
|
|
41341
|
+
</svg>
|
|
41342
|
+
}
|
|
41343
|
+
</span>
|
|
41344
|
+
</label>
|
|
41345
|
+
}
|
|
41346
|
+
</div>
|
|
41347
|
+
@if (_activeError()) {
|
|
41348
|
+
<p class="ip-desc ip-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
|
|
41349
|
+
} @else if (hint()) {
|
|
41350
|
+
<p class="ip-desc" [id]="_descId">{{ hint() }}</p>
|
|
41351
|
+
}
|
|
41352
|
+
</fieldset>
|
|
41353
|
+
`,
|
|
41354
|
+
styles: [":host{display:block}.ip-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.ip-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ip-required{color:#dc2626;margin-left:2px}.ip-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.ip-options.ip-grid{display:grid;grid-template-columns:repeat(var(--ip-cols),max-content)}.ip-option{position:relative;display:inline-flex;cursor:pointer}.ip-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.ip-swatch{display:inline-flex;align-items:center;justify-content:center;position:relative;width:36px;height:36px;border-radius:8px;box-sizing:border-box;background:#fff;color:#334155;border:1px solid #cbd5e1;box-shadow:0 0 0 0 transparent;transition:box-shadow .12s}.ip-option:hover .ip-swatch{border-color:#64748b}.ip-input:focus-visible+.ip-swatch{outline:2px solid #3b82f6;outline-offset:3px}.ip-option.ip-selected .ip-swatch{background:#1e293b;color:#fff;border-color:#1e293b}.ip-check{position:absolute;right:2px;bottom:2px;padding:1px;border-radius:50%;background:#fff;color:#1e293b;border:1px solid #1e293b;box-sizing:content-box}.ip-option-disabled{cursor:not-allowed;opacity:.45}.ip-error .ip-option .ip-swatch{border-color:#dc2626}.ip-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b;overflow-wrap:anywhere}.ip-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.ip-options{gap:4px}.ip-option{min-width:44px;min-height:44px;align-items:center;justify-content:center}.ip-options.ip-grid{grid-template-columns:repeat(auto-fill,44px)}}\n"]
|
|
41355
|
+
}]
|
|
41356
|
+
}],
|
|
41357
|
+
ctorParameters: () => [],
|
|
41358
|
+
propDecorators: {
|
|
41359
|
+
label: [{
|
|
41360
|
+
type: i0.Input,
|
|
41361
|
+
args: [{
|
|
41362
|
+
isSignal: true,
|
|
41363
|
+
alias: "label",
|
|
41364
|
+
required: false
|
|
41365
|
+
}]
|
|
41366
|
+
}],
|
|
41367
|
+
options: [{
|
|
41368
|
+
type: i0.Input,
|
|
41369
|
+
args: [{
|
|
41370
|
+
isSignal: true,
|
|
41371
|
+
alias: "options",
|
|
41372
|
+
required: false
|
|
41373
|
+
}]
|
|
41374
|
+
}],
|
|
41375
|
+
required: [{
|
|
41376
|
+
type: i0.Input,
|
|
41377
|
+
args: [{
|
|
41378
|
+
isSignal: true,
|
|
41379
|
+
alias: "required",
|
|
41380
|
+
required: false
|
|
41381
|
+
}]
|
|
41382
|
+
}],
|
|
41383
|
+
hint: [{
|
|
41384
|
+
type: i0.Input,
|
|
41385
|
+
args: [{
|
|
41386
|
+
isSignal: true,
|
|
41387
|
+
alias: "hint",
|
|
41388
|
+
required: false
|
|
41389
|
+
}]
|
|
41390
|
+
}],
|
|
41391
|
+
error: [{
|
|
41392
|
+
type: i0.Input,
|
|
41393
|
+
args: [{
|
|
41394
|
+
isSignal: true,
|
|
41395
|
+
alias: "error",
|
|
41396
|
+
required: false
|
|
41397
|
+
}]
|
|
41398
|
+
}],
|
|
41399
|
+
showErrors: [{
|
|
41400
|
+
type: i0.Input,
|
|
41401
|
+
args: [{
|
|
41402
|
+
isSignal: true,
|
|
41403
|
+
alias: "showErrors",
|
|
41404
|
+
required: false
|
|
41405
|
+
}]
|
|
41406
|
+
}],
|
|
41407
|
+
columns: [{
|
|
41408
|
+
type: i0.Input,
|
|
41409
|
+
args: [{
|
|
41410
|
+
isSignal: true,
|
|
41411
|
+
alias: "columns",
|
|
41412
|
+
required: false
|
|
41413
|
+
}]
|
|
41414
|
+
}],
|
|
41415
|
+
name: [{
|
|
41416
|
+
type: i0.Input,
|
|
41417
|
+
args: [{
|
|
41418
|
+
isSignal: true,
|
|
41419
|
+
alias: "name",
|
|
41420
|
+
required: false
|
|
41421
|
+
}]
|
|
41422
|
+
}],
|
|
41423
|
+
_disabledInput: [{
|
|
41424
|
+
type: i0.Input,
|
|
41425
|
+
args: [{
|
|
41426
|
+
isSignal: true,
|
|
41427
|
+
alias: "disabled",
|
|
41428
|
+
required: false
|
|
41429
|
+
}]
|
|
41430
|
+
}],
|
|
41431
|
+
invalidChange: [{
|
|
41432
|
+
type: i0.Output,
|
|
41433
|
+
args: ["invalidChange"]
|
|
41434
|
+
}],
|
|
41435
|
+
valueChange: [{
|
|
41436
|
+
type: i0.Output,
|
|
41437
|
+
args: ["valueChange"]
|
|
41438
|
+
}]
|
|
41439
|
+
}
|
|
41440
|
+
});
|
|
41441
|
+
var RadioMatrixComponent = class RadioMatrixComponent {
|
|
41442
|
+
get _name() {
|
|
41443
|
+
return this.name() || this._generatedName;
|
|
41444
|
+
}
|
|
41445
|
+
constructor() {
|
|
41446
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
41447
|
+
this.rowHeader = input("", ...ngDevMode ? [{ debugName: "rowHeader" }] : /* istanbul ignore next */ []);
|
|
41448
|
+
this.rows = input([], ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
41449
|
+
this.columns = input([], ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
41450
|
+
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
41451
|
+
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
41452
|
+
this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
41453
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
41454
|
+
this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
41455
|
+
this._disabledInput = input(false, {
|
|
41456
|
+
...ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {},
|
|
41457
|
+
alias: "disabled"
|
|
41458
|
+
});
|
|
41459
|
+
this._cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
41460
|
+
this.disabled = computed(() => this._disabledInput() || this._cvaDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
41461
|
+
this._generatedName = `rm-${Math.random().toString(36).slice(2, 8)}`;
|
|
41462
|
+
this._descId = `${this._generatedName}-desc`;
|
|
41463
|
+
this._value = signal({}, ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
|
|
41464
|
+
this._reveal = createFieldReveal(this.showErrors);
|
|
41465
|
+
this._issue = computed(() => this._check(this._value()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
|
|
41466
|
+
this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
41467
|
+
this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
41468
|
+
this.invalidChange = output();
|
|
41469
|
+
this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
|
|
41470
|
+
this._onValidatorChange = () => {};
|
|
41471
|
+
this._onChange = (_) => {};
|
|
41472
|
+
this._onTouched = () => {};
|
|
41473
|
+
effect(() => {
|
|
41474
|
+
this.invalidChange.emit(this.invalid());
|
|
41475
|
+
});
|
|
41476
|
+
}
|
|
41477
|
+
ngOnChanges() {
|
|
41478
|
+
this._onValidatorChange();
|
|
41479
|
+
}
|
|
41480
|
+
validate(control) {
|
|
41481
|
+
return issueToErrors(this._check(this._toRecord(control.value)));
|
|
41482
|
+
}
|
|
41483
|
+
registerOnValidatorChange(fn) {
|
|
41484
|
+
this._onValidatorChange = fn;
|
|
41485
|
+
}
|
|
41486
|
+
writeValue(val) {
|
|
41487
|
+
this._value.set(this._toRecord(val));
|
|
41488
|
+
}
|
|
41489
|
+
registerOnChange(fn) {
|
|
41490
|
+
this._onChange = fn;
|
|
41491
|
+
}
|
|
41492
|
+
registerOnTouched(fn) {
|
|
41493
|
+
this._onTouched = fn;
|
|
41494
|
+
}
|
|
41495
|
+
setDisabledState(d) {
|
|
41496
|
+
this._cvaDisabled.set(d);
|
|
41497
|
+
}
|
|
41498
|
+
onSelect(row, column) {
|
|
41499
|
+
const next = {
|
|
41500
|
+
...this._value(),
|
|
41501
|
+
[row]: column
|
|
41502
|
+
};
|
|
41503
|
+
this._value.set(next);
|
|
41504
|
+
this._onChange(next);
|
|
41505
|
+
}
|
|
41506
|
+
_rowInvalid(row) {
|
|
41507
|
+
if (this.disabled() || row.disabled || !this._reveal.revealed()) return false;
|
|
41508
|
+
const v = this._value()[row.value] ?? "";
|
|
41509
|
+
return v ? !this.columns().some((c) => c.value === v) : this.required();
|
|
41510
|
+
}
|
|
41511
|
+
onFocusOut(event) {
|
|
41512
|
+
const next = event.relatedTarget;
|
|
41513
|
+
if (next && event.currentTarget.contains(next)) return;
|
|
41514
|
+
this._onTouched();
|
|
41515
|
+
this._reveal.touched.set(true);
|
|
41516
|
+
}
|
|
41517
|
+
_toRecord(val) {
|
|
41518
|
+
return val && typeof val === "object" ? { ...val } : {};
|
|
41519
|
+
}
|
|
41520
|
+
_check(value) {
|
|
41521
|
+
if (this.disabled()) return null;
|
|
41522
|
+
const cols = this.columns();
|
|
41523
|
+
const rows = this.rows().filter((r) => !r.disabled);
|
|
41524
|
+
if (cols.length > 0 && rows.some((r) => value[r.value] && !cols.some((c) => c.value === value[r.value]))) return {
|
|
41525
|
+
key: "option",
|
|
41526
|
+
message: "Select a valid option."
|
|
41527
|
+
};
|
|
41528
|
+
if (this.required() && rows.some((r) => !value[r.value])) {
|
|
41529
|
+
const label = this.label().trim();
|
|
41530
|
+
return {
|
|
41531
|
+
key: "required",
|
|
41532
|
+
message: label ? `${label}: choose an option in every row.` : "Choose an option in every row."
|
|
41533
|
+
};
|
|
41534
|
+
}
|
|
41535
|
+
return null;
|
|
41536
|
+
}
|
|
41537
|
+
static {
|
|
41538
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
41539
|
+
minVersion: "12.0.0",
|
|
41540
|
+
version: "22.2.2",
|
|
41541
|
+
ngImport: i0,
|
|
41542
|
+
type: RadioMatrixComponent,
|
|
41543
|
+
deps: [],
|
|
41544
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
41545
|
+
});
|
|
41546
|
+
}
|
|
41547
|
+
static {
|
|
41548
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
41549
|
+
minVersion: "17.0.0",
|
|
41550
|
+
version: "22.2.2",
|
|
41551
|
+
type: RadioMatrixComponent,
|
|
41552
|
+
isStandalone: true,
|
|
41553
|
+
selector: "ui-radio-matrix",
|
|
41554
|
+
inputs: {
|
|
41555
|
+
label: {
|
|
41556
|
+
classPropertyName: "label",
|
|
41557
|
+
publicName: "label",
|
|
41558
|
+
isSignal: true,
|
|
41559
|
+
isRequired: false,
|
|
41560
|
+
transformFunction: null
|
|
41561
|
+
},
|
|
41562
|
+
rowHeader: {
|
|
41563
|
+
classPropertyName: "rowHeader",
|
|
41564
|
+
publicName: "rowHeader",
|
|
41565
|
+
isSignal: true,
|
|
41566
|
+
isRequired: false,
|
|
41567
|
+
transformFunction: null
|
|
41568
|
+
},
|
|
41569
|
+
rows: {
|
|
41570
|
+
classPropertyName: "rows",
|
|
41571
|
+
publicName: "rows",
|
|
41572
|
+
isSignal: true,
|
|
41573
|
+
isRequired: false,
|
|
41574
|
+
transformFunction: null
|
|
41575
|
+
},
|
|
41576
|
+
columns: {
|
|
41577
|
+
classPropertyName: "columns",
|
|
41578
|
+
publicName: "columns",
|
|
41579
|
+
isSignal: true,
|
|
41580
|
+
isRequired: false,
|
|
41581
|
+
transformFunction: null
|
|
41582
|
+
},
|
|
41583
|
+
required: {
|
|
41584
|
+
classPropertyName: "required",
|
|
41585
|
+
publicName: "required",
|
|
41586
|
+
isSignal: true,
|
|
41587
|
+
isRequired: false,
|
|
41588
|
+
transformFunction: null
|
|
41589
|
+
},
|
|
41590
|
+
hint: {
|
|
41591
|
+
classPropertyName: "hint",
|
|
41592
|
+
publicName: "hint",
|
|
41593
|
+
isSignal: true,
|
|
41594
|
+
isRequired: false,
|
|
41595
|
+
transformFunction: null
|
|
41596
|
+
},
|
|
41597
|
+
error: {
|
|
41598
|
+
classPropertyName: "error",
|
|
41599
|
+
publicName: "error",
|
|
41600
|
+
isSignal: true,
|
|
41601
|
+
isRequired: false,
|
|
41602
|
+
transformFunction: null
|
|
41603
|
+
},
|
|
41604
|
+
showErrors: {
|
|
41605
|
+
classPropertyName: "showErrors",
|
|
41606
|
+
publicName: "showErrors",
|
|
41607
|
+
isSignal: true,
|
|
41608
|
+
isRequired: false,
|
|
41609
|
+
transformFunction: null
|
|
41610
|
+
},
|
|
41611
|
+
name: {
|
|
41612
|
+
classPropertyName: "name",
|
|
41613
|
+
publicName: "name",
|
|
41614
|
+
isSignal: true,
|
|
41615
|
+
isRequired: false,
|
|
41616
|
+
transformFunction: null
|
|
41617
|
+
},
|
|
41618
|
+
_disabledInput: {
|
|
41619
|
+
classPropertyName: "_disabledInput",
|
|
41620
|
+
publicName: "disabled",
|
|
41621
|
+
isSignal: true,
|
|
41622
|
+
isRequired: false,
|
|
41623
|
+
transformFunction: null
|
|
41624
|
+
}
|
|
41625
|
+
},
|
|
41626
|
+
outputs: { invalidChange: "invalidChange" },
|
|
41627
|
+
providers: [
|
|
41628
|
+
{
|
|
41629
|
+
provide: NG_VALUE_ACCESSOR,
|
|
41630
|
+
useExisting: forwardRef(() => RadioMatrixComponent),
|
|
41631
|
+
multi: true
|
|
41632
|
+
},
|
|
41633
|
+
{
|
|
41634
|
+
provide: NG_VALIDATORS,
|
|
41635
|
+
useExisting: forwardRef(() => RadioMatrixComponent),
|
|
41636
|
+
multi: true
|
|
41637
|
+
},
|
|
41638
|
+
{
|
|
41639
|
+
provide: UiFieldValidity,
|
|
41640
|
+
useExisting: forwardRef(() => RadioMatrixComponent)
|
|
41641
|
+
}
|
|
41642
|
+
],
|
|
41643
|
+
usesOnChanges: true,
|
|
41644
|
+
ngImport: i0,
|
|
41645
|
+
template: `
|
|
41646
|
+
<fieldset
|
|
41647
|
+
class="rm-field"
|
|
41648
|
+
[class.rm-error]="_activeError()"
|
|
41649
|
+
[class.rm-disabled]="disabled()"
|
|
41650
|
+
[disabled]="disabled()"
|
|
41651
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
41652
|
+
[attr.aria-invalid]="_activeError() ? 'true' : null"
|
|
41653
|
+
[attr.aria-describedby]="(_activeError() || hint()) ? _descId : null"
|
|
41654
|
+
(focusout)="onFocusOut($event)">
|
|
41655
|
+
@if (label()) {
|
|
41656
|
+
<legend class="rm-label">
|
|
41657
|
+
{{ label() }}
|
|
41658
|
+
@if (required()) { <span class="rm-required" aria-hidden="true">*</span> }
|
|
41659
|
+
</legend>
|
|
41660
|
+
}
|
|
41661
|
+
<div class="rm-scroll">
|
|
41662
|
+
<table class="rm-table">
|
|
41663
|
+
<thead>
|
|
41664
|
+
<tr>
|
|
41665
|
+
<th scope="col" class="rm-corner">{{ rowHeader() }}</th>
|
|
41666
|
+
@for (col of columns(); track col.value) {
|
|
41667
|
+
<th scope="col" class="rm-col">{{ col.label }}</th>
|
|
41668
|
+
}
|
|
41669
|
+
</tr>
|
|
41670
|
+
</thead>
|
|
41671
|
+
<tbody>
|
|
41672
|
+
@for (row of rows(); track row.value) {
|
|
41673
|
+
<tr class="rm-row" [class.rm-row-missing]="_rowInvalid(row)">
|
|
41674
|
+
<th scope="row" class="rm-row-label">{{ row.label }}</th>
|
|
41675
|
+
@for (col of columns(); track col.value) {
|
|
41676
|
+
<td class="rm-cell">
|
|
41677
|
+
<ui-radio
|
|
41678
|
+
[name]="_name + '-' + row.value"
|
|
41679
|
+
[value]="col.value"
|
|
41680
|
+
[ariaLabel]="row.label + ': ' + col.label"
|
|
41681
|
+
[checked]="_value()[row.value] === col.value"
|
|
41682
|
+
[disabled]="disabled() || !!row.disabled || !!col.disabled"
|
|
41683
|
+
[invalid]="_rowInvalid(row)"
|
|
41684
|
+
[describedBy]="(_activeError() || hint()) ? _descId : ''"
|
|
41685
|
+
(selected)="onSelect(row.value, $event)" />
|
|
41686
|
+
</td>
|
|
41687
|
+
}
|
|
41688
|
+
</tr>
|
|
41689
|
+
}
|
|
41690
|
+
</tbody>
|
|
41691
|
+
</table>
|
|
41692
|
+
</div>
|
|
41693
|
+
@if (_activeError()) {
|
|
41694
|
+
<p class="rm-desc rm-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
|
|
41695
|
+
} @else if (hint()) {
|
|
41696
|
+
<p class="rm-desc" [id]="_descId">{{ hint() }}</p>
|
|
41697
|
+
}
|
|
41698
|
+
</fieldset>
|
|
41699
|
+
`,
|
|
41700
|
+
isInline: true,
|
|
41701
|
+
styles: [":host{display:block}.rm-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rm-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rm-required{color:#dc2626;margin-left:2px}.rm-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.rm-table{width:100%;border-collapse:collapse;font-size:.875rem}.rm-table th,.rm-table td{padding:8px 12px;border-bottom:1px solid #f1f5f9;text-align:left}.rm-table tbody tr:last-child th,.rm-table tbody tr:last-child td{border-bottom:0}.rm-table thead th{position:sticky;top:0;background:#f8fafc;font-size:.75rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.rm-col,.rm-cell{text-align:center!important;width:1%;white-space:nowrap}.rm-cell ui-radio{display:inline-block}.rm-row-label{font-weight:500;color:#1e293b}.rm-row:hover{background:#f8fafc}.rm-row-missing .rm-row-label{color:#b91c1c}.rm-disabled .rm-scroll{opacity:.6}.rm-error .rm-scroll{border-color:#ef4444}.rm-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.rm-desc-error{color:#dc2626}@media(max-width:480px){.rm-table th,.rm-table td{padding:6px 8px}.rm-table thead th{font-size:.6875rem}}\n"],
|
|
41702
|
+
dependencies: [{
|
|
41703
|
+
kind: "component",
|
|
41704
|
+
type: RadioComponent,
|
|
41705
|
+
selector: "ui-radio",
|
|
41706
|
+
inputs: [
|
|
41707
|
+
"label",
|
|
41708
|
+
"description",
|
|
41709
|
+
"icon",
|
|
41710
|
+
"ariaLabel",
|
|
41711
|
+
"testId",
|
|
41712
|
+
"value",
|
|
41713
|
+
"name",
|
|
41714
|
+
"checked",
|
|
41715
|
+
"invalid",
|
|
41716
|
+
"describedBy",
|
|
41717
|
+
"controls",
|
|
41718
|
+
"disabled",
|
|
41719
|
+
"labelId"
|
|
41720
|
+
],
|
|
41721
|
+
outputs: ["selected"]
|
|
41722
|
+
}],
|
|
41723
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
41724
|
+
});
|
|
41725
|
+
}
|
|
41726
|
+
};
|
|
41727
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
41728
|
+
minVersion: "12.0.0",
|
|
41729
|
+
version: "22.2.2",
|
|
41730
|
+
ngImport: i0,
|
|
41731
|
+
type: RadioMatrixComponent,
|
|
41732
|
+
decorators: [{
|
|
41733
|
+
type: Component,
|
|
41734
|
+
args: [{
|
|
41735
|
+
selector: "ui-radio-matrix",
|
|
41736
|
+
standalone: true,
|
|
41737
|
+
imports: [RadioComponent],
|
|
41738
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41739
|
+
providers: [
|
|
41740
|
+
{
|
|
41741
|
+
provide: NG_VALUE_ACCESSOR,
|
|
41742
|
+
useExisting: forwardRef(() => RadioMatrixComponent),
|
|
41743
|
+
multi: true
|
|
41744
|
+
},
|
|
41745
|
+
{
|
|
41746
|
+
provide: NG_VALIDATORS,
|
|
41747
|
+
useExisting: forwardRef(() => RadioMatrixComponent),
|
|
41748
|
+
multi: true
|
|
41749
|
+
},
|
|
41750
|
+
{
|
|
41751
|
+
provide: UiFieldValidity,
|
|
41752
|
+
useExisting: forwardRef(() => RadioMatrixComponent)
|
|
41753
|
+
}
|
|
41754
|
+
],
|
|
41755
|
+
template: `
|
|
41756
|
+
<fieldset
|
|
41757
|
+
class="rm-field"
|
|
41758
|
+
[class.rm-error]="_activeError()"
|
|
41759
|
+
[class.rm-disabled]="disabled()"
|
|
41760
|
+
[disabled]="disabled()"
|
|
41761
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
41762
|
+
[attr.aria-invalid]="_activeError() ? 'true' : null"
|
|
41763
|
+
[attr.aria-describedby]="(_activeError() || hint()) ? _descId : null"
|
|
41764
|
+
(focusout)="onFocusOut($event)">
|
|
41765
|
+
@if (label()) {
|
|
41766
|
+
<legend class="rm-label">
|
|
41767
|
+
{{ label() }}
|
|
41768
|
+
@if (required()) { <span class="rm-required" aria-hidden="true">*</span> }
|
|
41769
|
+
</legend>
|
|
41770
|
+
}
|
|
41771
|
+
<div class="rm-scroll">
|
|
41772
|
+
<table class="rm-table">
|
|
41773
|
+
<thead>
|
|
41774
|
+
<tr>
|
|
41775
|
+
<th scope="col" class="rm-corner">{{ rowHeader() }}</th>
|
|
41776
|
+
@for (col of columns(); track col.value) {
|
|
41777
|
+
<th scope="col" class="rm-col">{{ col.label }}</th>
|
|
41778
|
+
}
|
|
41779
|
+
</tr>
|
|
41780
|
+
</thead>
|
|
41781
|
+
<tbody>
|
|
41782
|
+
@for (row of rows(); track row.value) {
|
|
41783
|
+
<tr class="rm-row" [class.rm-row-missing]="_rowInvalid(row)">
|
|
41784
|
+
<th scope="row" class="rm-row-label">{{ row.label }}</th>
|
|
41785
|
+
@for (col of columns(); track col.value) {
|
|
41786
|
+
<td class="rm-cell">
|
|
41787
|
+
<ui-radio
|
|
41788
|
+
[name]="_name + '-' + row.value"
|
|
41789
|
+
[value]="col.value"
|
|
41790
|
+
[ariaLabel]="row.label + ': ' + col.label"
|
|
41791
|
+
[checked]="_value()[row.value] === col.value"
|
|
41792
|
+
[disabled]="disabled() || !!row.disabled || !!col.disabled"
|
|
41793
|
+
[invalid]="_rowInvalid(row)"
|
|
41794
|
+
[describedBy]="(_activeError() || hint()) ? _descId : ''"
|
|
41795
|
+
(selected)="onSelect(row.value, $event)" />
|
|
41796
|
+
</td>
|
|
41797
|
+
}
|
|
41798
|
+
</tr>
|
|
41799
|
+
}
|
|
41800
|
+
</tbody>
|
|
41801
|
+
</table>
|
|
41802
|
+
</div>
|
|
41803
|
+
@if (_activeError()) {
|
|
41804
|
+
<p class="rm-desc rm-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
|
|
41805
|
+
} @else if (hint()) {
|
|
41806
|
+
<p class="rm-desc" [id]="_descId">{{ hint() }}</p>
|
|
41807
|
+
}
|
|
41808
|
+
</fieldset>
|
|
41809
|
+
`,
|
|
41810
|
+
styles: [":host{display:block}.rm-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rm-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rm-required{color:#dc2626;margin-left:2px}.rm-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.rm-table{width:100%;border-collapse:collapse;font-size:.875rem}.rm-table th,.rm-table td{padding:8px 12px;border-bottom:1px solid #f1f5f9;text-align:left}.rm-table tbody tr:last-child th,.rm-table tbody tr:last-child td{border-bottom:0}.rm-table thead th{position:sticky;top:0;background:#f8fafc;font-size:.75rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.rm-col,.rm-cell{text-align:center!important;width:1%;white-space:nowrap}.rm-cell ui-radio{display:inline-block}.rm-row-label{font-weight:500;color:#1e293b}.rm-row:hover{background:#f8fafc}.rm-row-missing .rm-row-label{color:#b91c1c}.rm-disabled .rm-scroll{opacity:.6}.rm-error .rm-scroll{border-color:#ef4444}.rm-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.rm-desc-error{color:#dc2626}@media(max-width:480px){.rm-table th,.rm-table td{padding:6px 8px}.rm-table thead th{font-size:.6875rem}}\n"]
|
|
41811
|
+
}]
|
|
41812
|
+
}],
|
|
41813
|
+
ctorParameters: () => [],
|
|
41814
|
+
propDecorators: {
|
|
41815
|
+
label: [{
|
|
41816
|
+
type: i0.Input,
|
|
41817
|
+
args: [{
|
|
41818
|
+
isSignal: true,
|
|
41819
|
+
alias: "label",
|
|
41820
|
+
required: false
|
|
41821
|
+
}]
|
|
41822
|
+
}],
|
|
41823
|
+
rowHeader: [{
|
|
41824
|
+
type: i0.Input,
|
|
41825
|
+
args: [{
|
|
41826
|
+
isSignal: true,
|
|
41827
|
+
alias: "rowHeader",
|
|
41828
|
+
required: false
|
|
41829
|
+
}]
|
|
41830
|
+
}],
|
|
41831
|
+
rows: [{
|
|
41832
|
+
type: i0.Input,
|
|
41833
|
+
args: [{
|
|
41834
|
+
isSignal: true,
|
|
41835
|
+
alias: "rows",
|
|
41836
|
+
required: false
|
|
41837
|
+
}]
|
|
41838
|
+
}],
|
|
41839
|
+
columns: [{
|
|
41840
|
+
type: i0.Input,
|
|
41841
|
+
args: [{
|
|
41842
|
+
isSignal: true,
|
|
41843
|
+
alias: "columns",
|
|
40388
41844
|
required: false
|
|
40389
41845
|
}]
|
|
40390
41846
|
}],
|
|
@@ -45769,7 +47225,11 @@ var CalendarComponent = class CalendarComponent {
|
|
|
45769
47225
|
kind: "component",
|
|
45770
47226
|
type: BadgeComponent,
|
|
45771
47227
|
selector: "ui-badge",
|
|
45772
|
-
inputs: [
|
|
47228
|
+
inputs: [
|
|
47229
|
+
"label",
|
|
47230
|
+
"variant",
|
|
47231
|
+
"color"
|
|
47232
|
+
]
|
|
45773
47233
|
},
|
|
45774
47234
|
{
|
|
45775
47235
|
kind: "component",
|
|
@@ -45802,7 +47262,9 @@ var CalendarComponent = class CalendarComponent {
|
|
|
45802
47262
|
"name",
|
|
45803
47263
|
"noWrap",
|
|
45804
47264
|
"orientation",
|
|
45805
|
-
"controlsPanels"
|
|
47265
|
+
"controlsPanels",
|
|
47266
|
+
"showDescription",
|
|
47267
|
+
"headingLevel"
|
|
45806
47268
|
],
|
|
45807
47269
|
outputs: ["tabChange"]
|
|
45808
47270
|
},
|
|
@@ -49983,7 +51445,11 @@ var SetupWizardComponent = class SetupWizardComponent {
|
|
|
49983
51445
|
kind: "component",
|
|
49984
51446
|
type: BadgeComponent,
|
|
49985
51447
|
selector: "ui-badge",
|
|
49986
|
-
inputs: [
|
|
51448
|
+
inputs: [
|
|
51449
|
+
"label",
|
|
51450
|
+
"variant",
|
|
51451
|
+
"color"
|
|
51452
|
+
]
|
|
49987
51453
|
},
|
|
49988
51454
|
{
|
|
49989
51455
|
kind: "component",
|
|
@@ -50110,7 +51576,9 @@ var SetupWizardComponent = class SetupWizardComponent {
|
|
|
50110
51576
|
"name",
|
|
50111
51577
|
"noWrap",
|
|
50112
51578
|
"orientation",
|
|
50113
|
-
"controlsPanels"
|
|
51579
|
+
"controlsPanels",
|
|
51580
|
+
"showDescription",
|
|
51581
|
+
"headingLevel"
|
|
50114
51582
|
],
|
|
50115
51583
|
outputs: ["tabChange"]
|
|
50116
51584
|
},
|
|
@@ -52312,7 +53780,9 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
52312
53780
|
"name",
|
|
52313
53781
|
"noWrap",
|
|
52314
53782
|
"orientation",
|
|
52315
|
-
"controlsPanels"
|
|
53783
|
+
"controlsPanels",
|
|
53784
|
+
"showDescription",
|
|
53785
|
+
"headingLevel"
|
|
52316
53786
|
],
|
|
52317
53787
|
outputs: ["tabChange"]
|
|
52318
53788
|
},
|
|
@@ -54092,7 +55562,11 @@ var ReminderAlertsComponent = class ReminderAlertsComponent {
|
|
|
54092
55562
|
kind: "component",
|
|
54093
55563
|
type: BadgeComponent,
|
|
54094
55564
|
selector: "ui-badge",
|
|
54095
|
-
inputs: [
|
|
55565
|
+
inputs: [
|
|
55566
|
+
"label",
|
|
55567
|
+
"variant",
|
|
55568
|
+
"color"
|
|
55569
|
+
]
|
|
54096
55570
|
},
|
|
54097
55571
|
{
|
|
54098
55572
|
kind: "component",
|
|
@@ -55783,7 +57257,11 @@ var ConversationsComponent = class ConversationsComponent {
|
|
|
55783
57257
|
kind: "component",
|
|
55784
57258
|
type: BadgeComponent,
|
|
55785
57259
|
selector: "ui-badge",
|
|
55786
|
-
inputs: [
|
|
57260
|
+
inputs: [
|
|
57261
|
+
"label",
|
|
57262
|
+
"variant",
|
|
57263
|
+
"color"
|
|
57264
|
+
]
|
|
55787
57265
|
},
|
|
55788
57266
|
{
|
|
55789
57267
|
kind: "component",
|
|
@@ -55842,6 +57320,8 @@ var ConversationsComponent = class ConversationsComponent {
|
|
|
55842
57320
|
"showField",
|
|
55843
57321
|
"showErrors",
|
|
55844
57322
|
"toastOnReject",
|
|
57323
|
+
"listRejections",
|
|
57324
|
+
"ariaDescribedBy",
|
|
55845
57325
|
"clearable",
|
|
55846
57326
|
"removeLabel",
|
|
55847
57327
|
"maxSize",
|
|
@@ -55862,6 +57342,7 @@ var ConversationsComponent = class ConversationsComponent {
|
|
|
55862
57342
|
outputs: [
|
|
55863
57343
|
"filesSelected",
|
|
55864
57344
|
"fileRejected",
|
|
57345
|
+
"filesRejected",
|
|
55865
57346
|
"fileRemoved",
|
|
55866
57347
|
"invalidChange"
|
|
55867
57348
|
]
|
|
@@ -59417,6 +60898,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
59417
60898
|
}]
|
|
59418
60899
|
}
|
|
59419
60900
|
});
|
|
59420
|
-
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, CheckboxComponent, CheckboxTrailingDirective, ChipComponent, ChipGroupComponent, ColorInputComponent, ColumnFilterComponent, ColumnsComponent, ComboboxComponent, ConfirmOutletComponent, ConfirmService, ContactPickerComponent, ConversationRichBodyComponent, ConversationsComponent, 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, 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, EmailTemplateEditorComponent, EmptyStateComponent, ErrorComponent, ErrorStateComponent, FORGEROUTE_CONFIG, FadeComponent, FileInputComponent, FillViewportDirective, FixedFooterComponent, FormColSpanDirective, FormComponent, FormRowComponent, FormSectionComponent, HintComponent, ICON_NAMES, IDX_BEHAVIOR_SIGNALS, INTEGRATION_CATALOG, INTEGRATION_FIELD_DEFS, INTEGRATION_GROUP_ORDER, INTEGRATION_OPTION_DEFS, IconComponent, ImageComponent, ImageGalleryComponent, ImageGalleryDialogComponent, ImagePreviewComponent, ImageRepositionComponent, ImportExportComponent, ImportSourceGridComponent, KeypadComponent, KpiCardComponent, LAYOUT_GAP_PX, LISTED_SPECIAL_PASSWORD_RULES, ListComponent, ListItemComponent, LiveRegionComponent, MAX_EMAIL_ADDRESS_LENGTH, MAX_PAYMENT_AMOUNT, MIN_PAYMENT_AMOUNT, ModalComponent, MoreMenuComponent, MultiSelectComponent, NOTES_MAX_LENGTH, NotesComponent, OfflineBannerComponent, OptionCardComponent, 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, ProgressBarComponent, ProgressRingComponent, QrCodeComponent, QuickFilterTabsComponent, RICH_TEXT_OPTIONS, RadioComponent, RadioGroupComponent, RadioMatrixComponent, RadioOptionContentDirective, ReadonlyFieldsetComponent, ReminderAlertsComponent, RichTextEditorComponent, SEMANTIC_BADGE_MAP, SETUP_DONE_KEY, SETUP_INTEGRATIONS, SearchInputComponent, SectionHeaderComponent, SelectComponent, SetupWizardComponent, SetupWizardStepDirective, SetupWizardStepHeaderDirective, ShareMenuComponent, ShowComponent, SidePanelComponent, SidebarLayoutComponent, SignaturePadComponent, SkeletonComponent, SnackbarComponent, SnackbarService, StackComponent, StarComponent, StepperComponent, TableToolbarComponent, TextComponent, TextInputComponent, TextTemplatePickerComponent, TextareaInputComponent, TimeInputComponent, TimelineComponent, ToastComponent, ToastService, ToggleBadgeComponent, ToggleComponent, TooltipDirective, US_LOCATIONS, US_STATES, US_STATE_OPTIONS, US_ZIP_PATTERN, UiFieldValidity, acceptLabel, appShellGroupsStorageKey, autoVariant, blockHasContent, buildDefaultSchedule, buildPreviewDocument, buildVideoBlockHtml, builtInActionIcon, businessTimeOptions, callHost, conversationDateLabel, conversationHtmlToText, conversationInitial, conversationMessageStatusLabel, conversationMessageStatusMark, createFieldReveal, createPasswordPolicyValidator, decodeFilterValues, digitsOnly, downloadBlob, emailShareUrl, emptyAddress, encodeFilterValue, encodeFilterValues, errorContextInterceptor, escapeHtml, facebookShareUrl, fileMatchesAccept, fileNameFromContentDisposition, formatAddress, formatAddressValue, formatAddressValueOneLine, formatCategoryLabel, formatConversationPhone, formatConversationTime, formatCurrency, formatDuration, formatFileSize, formatIsoDate, formatIsoDateTime, formatMessageTime, formatPhone, formatPhoneDisplay, formatShortDate, formatTime, formatVideoDuration, getEligibleIds, getEligibleOptions, getErrorMessage, getInitials, gmailShareUrl, groupMessagesByDay, hostErrorMessage, humanReadableMessage, iconPath, insideEditorBlock, integrationPlainText, integrationsForApp, integrationsOnlyFor, isBlockDrag, isEmptyAddress, isValidAmount, isValidEmailAddress, isValidZip, isWebUrl, isoKey, issueToErrors, last4Error, linkedInShareUrl, maxLengthIssue, mergeDescribedBy, normalizeAddress, normalizeHexColor, outlookShareUrl, parseAddressOneLine, parseAddressValue, parseBizHours, parseIso, parseTime, passwordMeetsRules, periodGroup, pillTabId, pillTabPanelId, pluralize, provideForgerouteToast, reorderItems, requiredIssue, resolveLayoutGap, resolvePreset, serializeBizHours, serializedTextLength, setupIntegrations, splitIntro, terminalTimeoutText, terminalVerdict, todayInTimezone, truncateConversationText, xShareUrl };
|
|
60901
|
+
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, CheckboxComponent, CheckboxTrailingDirective, ChipComponent, ChipGroupComponent, ColorInputComponent, ColumnFilterComponent, ColumnsComponent, ComboboxComponent, 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, 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, EmailTemplateEditorComponent, EmptyStateComponent, ErrorComponent, ErrorStateComponent, FORGEROUTE_CONFIG, FadeComponent, FileInputComponent, FillViewportDirective, FixedFooterComponent, FormColSpanDirective, FormComponent, FormRowComponent, FormSectionComponent, HintComponent, ICON_NAMES, IDX_BEHAVIOR_SIGNALS, INTEGRATION_CATALOG, INTEGRATION_FIELD_DEFS, INTEGRATION_GROUP_ORDER, INTEGRATION_OPTION_DEFS, IconComponent, IconPickerComponent, ImageComponent, ImageGalleryComponent, ImageGalleryDialogComponent, ImagePreviewComponent, ImageRepositionComponent, ImportExportComponent, ImportSourceGridComponent, KeypadComponent, KpiCardComponent, LAYOUT_GAP_PX, LISTED_SPECIAL_PASSWORD_RULES, ListComponent, ListItemComponent, LiveRegionComponent, MAX_EMAIL_ADDRESS_LENGTH, MAX_PAYMENT_AMOUNT, MIN_PAYMENT_AMOUNT, ModalComponent, MoreMenuComponent, MultiSelectComponent, NOTES_MAX_LENGTH, NotesComponent, OfflineBannerComponent, OptionCardComponent, 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, ProgressBarComponent, ProgressRingComponent, QrCodeComponent, QuickFilterTabsComponent, RICH_TEXT_OPTIONS, RadioComponent, RadioGroupComponent, RadioMatrixComponent, RadioOptionContentDirective, ReadonlyFieldsetComponent, ReminderAlertsComponent, RichTextEditorComponent, SEMANTIC_BADGE_MAP, SETUP_DONE_KEY, SETUP_INTEGRATIONS, SearchInputComponent, SectionHeaderComponent, SelectComponent, SetupWizardComponent, SetupWizardStepDirective, SetupWizardStepHeaderDirective, ShareMenuComponent, ShowComponent, SidePanelComponent, SidebarLayoutComponent, SignaturePadComponent, SkeletonComponent, SnackbarComponent, SnackbarService, StackComponent, StarComponent, StepperComponent, SwatchPickerComponent, TableToolbarComponent, TextComponent, TextInputComponent, TextTemplatePickerComponent, TextareaInputComponent, TimeInputComponent, TimelineComponent, ToastComponent, ToastService, ToggleBadgeComponent, ToggleComponent, TooltipDirective, US_LOCATIONS, US_STATES, US_STATE_OPTIONS, US_ZIP_PATTERN, UiFieldValidity, acceptLabel, appShellGroupsStorageKey, autoVariant, blockHasContent, buildDefaultSchedule, buildPreviewDocument, buildVideoBlockHtml, builtInActionIcon, businessTimeOptions, callHost, conversationDateLabel, conversationHtmlToText, conversationInitial, conversationMessageStatusLabel, conversationMessageStatusMark, createFieldReveal, createPasswordPolicyValidator, decodeFilterValues, digitsOnly, downloadBlob, emailShareUrl, emptyAddress, encodeFilterValue, encodeFilterValues, errorContextInterceptor, escapeHtml, facebookShareUrl, fileMatchesAccept, fileNameFromContentDisposition, formatAddress, formatAddressValue, formatAddressValueOneLine, formatCategoryLabel, formatConversationPhone, formatConversationTime, formatCurrency, formatDuration, formatFileSize, formatIsoDate, formatIsoDateTime, formatMessageTime, formatPhone, formatPhoneDisplay, formatShortDate, formatTime, formatVideoDuration, getEligibleIds, getEligibleOptions, getErrorMessage, getInitials, gmailShareUrl, groupMessagesByDay, hostErrorMessage, humanReadableMessage, iconPath, insideEditorBlock, integrationPlainText, integrationsForApp, integrationsOnlyFor, isBlockDrag, isEmptyAddress, isValidAmount, isValidEmailAddress, isValidZip, isWebUrl, isoKey, issueToErrors, last4Error, linkedInShareUrl, maxLengthIssue, mergeDescribedBy, normalizeAddress, normalizeHexColor, outlookShareUrl, parseAddressOneLine, parseAddressValue, parseBizHours, parseIso, parseTime, passwordMeetsRules, periodGroup, pillTabDescriptionId, pillTabId, pillTabPanelId, pillTabTitleId, pluralize, provideForgerouteToast, reorderItems, requiredIssue, resolveLayoutGap, resolvePreset, serializeBizHours, serializedTextLength, setupIntegrations, splitIntro, terminalTimeoutText, terminalVerdict, todayInTimezone, truncateConversationText, xShareUrl };
|
|
59421
60902
|
|
|
59422
60903
|
//# sourceMappingURL=forgeroute-ui.mjs.map
|