@forgeroute/ui 0.4.74 → 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.mjs +440 -16
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui.d.ts +171 -25
|
@@ -4703,6 +4703,8 @@ const EXTRA_ICONS = {
|
|
|
4703
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",
|
|
4704
4704
|
"search": "M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35",
|
|
4705
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",
|
|
4706
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"
|
|
4707
4709
|
};
|
|
4708
4710
|
const ICON_NAMES = Object.freeze(Object.keys(EXTRA_ICONS));
|
|
@@ -14108,6 +14110,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14108
14110
|
[label]="tags[0].name"
|
|
14109
14111
|
[variant]="tags[0].variant ?? null"
|
|
14110
14112
|
[color]="tags[0].color ?? null" />
|
|
14113
|
+
@if (tags[0].colorName) {<span class="dt-sr-only">, {{ tags[0].colorName }}</span>}
|
|
14111
14114
|
@if (tags.length > 1) {
|
|
14112
14115
|
<span
|
|
14113
14116
|
class="dt-tags-more"
|
|
@@ -14116,7 +14119,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14116
14119
|
(focus)="showTagTooltip($event, tags.slice(1))"
|
|
14117
14120
|
(blur)="hideTagTooltip()"
|
|
14118
14121
|
tabindex="0"
|
|
14119
|
-
[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(', ')">
|
|
14120
14123
|
+{{ tags.length - 1 }}
|
|
14121
14124
|
</span>
|
|
14122
14125
|
}
|
|
@@ -14328,6 +14331,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
14328
14331
|
<div class="dt-card-tags">
|
|
14329
14332
|
@for (tag of tagItems; track tag.name) {
|
|
14330
14333
|
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" size="sm" />
|
|
14334
|
+
@if (tag.colorName) {<span class="dt-sr-only">, {{ tag.colorName }}</span>}
|
|
14331
14335
|
}
|
|
14332
14336
|
</div>
|
|
14333
14337
|
}
|
|
@@ -15203,6 +15207,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15203
15207
|
[label]="tags[0].name"
|
|
15204
15208
|
[variant]="tags[0].variant ?? null"
|
|
15205
15209
|
[color]="tags[0].color ?? null" />
|
|
15210
|
+
@if (tags[0].colorName) {<span class="dt-sr-only">, {{ tags[0].colorName }}</span>}
|
|
15206
15211
|
@if (tags.length > 1) {
|
|
15207
15212
|
<span
|
|
15208
15213
|
class="dt-tags-more"
|
|
@@ -15211,7 +15216,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15211
15216
|
(focus)="showTagTooltip($event, tags.slice(1))"
|
|
15212
15217
|
(blur)="hideTagTooltip()"
|
|
15213
15218
|
tabindex="0"
|
|
15214
|
-
[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(', ')">
|
|
15215
15220
|
+{{ tags.length - 1 }}
|
|
15216
15221
|
</span>
|
|
15217
15222
|
}
|
|
@@ -15423,6 +15428,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15423
15428
|
<div class="dt-card-tags">
|
|
15424
15429
|
@for (tag of tagItems; track tag.name) {
|
|
15425
15430
|
<ui-badge [label]="tag.name" [variant]="tag.variant ?? 'gray'" size="sm" />
|
|
15431
|
+
@if (tag.colorName) {<span class="dt-sr-only">, {{ tag.colorName }}</span>}
|
|
15426
15432
|
}
|
|
15427
15433
|
</div>
|
|
15428
15434
|
}
|
|
@@ -24297,6 +24303,8 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24297
24303
|
this.showField = input(true, ...ngDevMode ? [{ debugName: "showField" }] : /* istanbul ignore next */ []);
|
|
24298
24304
|
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
24299
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 */ []);
|
|
24300
24308
|
this.clearable = input(false, ...ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []);
|
|
24301
24309
|
this.removeLabel = input("Remove", ...ngDevMode ? [{ debugName: "removeLabel" }] : /* istanbul ignore next */ []);
|
|
24302
24310
|
this.maxSize = input(null, ...ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []);
|
|
@@ -24314,6 +24322,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24314
24322
|
this.loadingText = input("", ...ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []);
|
|
24315
24323
|
this.filesSelected = output();
|
|
24316
24324
|
this.fileRejected = output();
|
|
24325
|
+
this.filesRejected = output();
|
|
24317
24326
|
this.fileRemoved = output();
|
|
24318
24327
|
this.invalidChange = output();
|
|
24319
24328
|
this._disabledInput = input(false, {
|
|
@@ -24328,10 +24337,15 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24328
24337
|
this._dragging = signal(false, ...ngDevMode ? [{ debugName: "_dragging" }] : /* istanbul ignore next */ []);
|
|
24329
24338
|
this._toast = inject(ToastService);
|
|
24330
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 */ []);
|
|
24331
24345
|
this._reveal = createFieldReveal(this.showErrors);
|
|
24332
24346
|
this._issue = computed(() => this.disabled() || !this.required() || this._files().length > 0 ? null : requiredIssue(this.label() || "File"), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
|
|
24333
24347
|
this.invalid = computed(() => !!this.error() || !!this._rejection() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
24334
|
-
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 */ []);
|
|
24335
24349
|
this._shownError = computed(() => (this.showField() ? this.error() : "") || this._rejection() || (this._reveal.revealed() ? this._issue()?.message ?? "" : ""), ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
|
|
24336
24350
|
this.summary = computed(() => {
|
|
24337
24351
|
const f = this._files();
|
|
@@ -24380,7 +24394,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24380
24394
|
const el = this.fileEl()?.nativeElement;
|
|
24381
24395
|
if (el) el.value = "";
|
|
24382
24396
|
this._files.set([]);
|
|
24383
|
-
this.
|
|
24397
|
+
this.setRejections([]);
|
|
24384
24398
|
this._onChange(this.multiple() ? [] : null);
|
|
24385
24399
|
}
|
|
24386
24400
|
remove() {
|
|
@@ -24391,7 +24405,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24391
24405
|
writeValue(val) {
|
|
24392
24406
|
const files = Array.isArray(val) ? val : val ? [val] : [];
|
|
24393
24407
|
this._files.set(files);
|
|
24394
|
-
if (files.length > 0) this.
|
|
24408
|
+
if (files.length > 0) this.setRejections([]);
|
|
24395
24409
|
const el = this.fileEl()?.nativeElement;
|
|
24396
24410
|
if (files.length === 0 && el) el.value = "";
|
|
24397
24411
|
}
|
|
@@ -24434,6 +24448,10 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24434
24448
|
if (dropped.length === 0) return;
|
|
24435
24449
|
this.accept$(this.multiple() ? dropped : dropped.slice(0, 1), this.fileEl()?.nativeElement ?? null);
|
|
24436
24450
|
}
|
|
24451
|
+
setRejections(list) {
|
|
24452
|
+
this._rejected.set(list);
|
|
24453
|
+
this._rejection.set(list[0]?.message ?? "");
|
|
24454
|
+
}
|
|
24437
24455
|
rejectionFor(file) {
|
|
24438
24456
|
const accept = this.accept();
|
|
24439
24457
|
if (this.enforceAccept() && accept && !fileMatchesAccept(file, accept)) return {
|
|
@@ -24463,7 +24481,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24463
24481
|
accept$(files, native) {
|
|
24464
24482
|
if (files.length === 0) {
|
|
24465
24483
|
this._files.set([]);
|
|
24466
|
-
this.
|
|
24484
|
+
this.setRejections([]);
|
|
24467
24485
|
this._onChange(this.multiple() ? [] : null);
|
|
24468
24486
|
this._onTouched();
|
|
24469
24487
|
return;
|
|
@@ -24475,8 +24493,9 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24475
24493
|
if (r) rejected.push(r);
|
|
24476
24494
|
else ok.push(f);
|
|
24477
24495
|
}
|
|
24478
|
-
this.
|
|
24496
|
+
this.setRejections(rejected);
|
|
24479
24497
|
rejected.forEach((r) => this.fileRejected.emit(r));
|
|
24498
|
+
if (rejected.length > 0) this.filesRejected.emit(rejected);
|
|
24480
24499
|
if (this.toastOnReject() && rejected.length > 0) this._toast.error(rejected.map((r) => `"${r.file.name}" was not added. ${r.message}`).join(" "));
|
|
24481
24500
|
if (ok.length === 0) {
|
|
24482
24501
|
if (native) native.value = "";
|
|
@@ -24592,6 +24611,20 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24592
24611
|
isRequired: false,
|
|
24593
24612
|
transformFunction: null
|
|
24594
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
|
+
},
|
|
24595
24628
|
clearable: {
|
|
24596
24629
|
classPropertyName: "clearable",
|
|
24597
24630
|
publicName: "clearable",
|
|
@@ -24708,6 +24741,7 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24708
24741
|
outputs: {
|
|
24709
24742
|
filesSelected: "filesSelected",
|
|
24710
24743
|
fileRejected: "fileRejected",
|
|
24744
|
+
filesRejected: "filesRejected",
|
|
24711
24745
|
fileRemoved: "fileRemoved",
|
|
24712
24746
|
invalidChange: "invalidChange"
|
|
24713
24747
|
},
|
|
@@ -24756,14 +24790,14 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24756
24790
|
[attr.required]="required() || null"
|
|
24757
24791
|
[attr.aria-label]="ariaLabel() || null"
|
|
24758
24792
|
[attr.aria-invalid]="_shownError() ? 'true' : null"
|
|
24759
|
-
[attr.aria-describedby]="
|
|
24793
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24760
24794
|
[attr.tabindex]="showField() ? -1 : null"
|
|
24761
24795
|
(change)="onChange($event)"
|
|
24762
24796
|
(blur)="_onTouched()" />
|
|
24763
24797
|
@if (showField()) {
|
|
24764
24798
|
<div class="fi-row">
|
|
24765
24799
|
<button type="button" class="fi-control" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
|
|
24766
|
-
[attr.aria-describedby]="
|
|
24800
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24767
24801
|
(click)="open()" (blur)="_touch()"
|
|
24768
24802
|
(dragenter)="onDragOver($event)" (dragover)="onDragOver($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)">
|
|
24769
24803
|
@if (_previewUrl(); as src) {
|
|
@@ -24783,12 +24817,18 @@ var FileInputComponent = class FileInputComponent {
|
|
|
24783
24817
|
</div>
|
|
24784
24818
|
}
|
|
24785
24819
|
@if (_shownError()) {
|
|
24786
|
-
|
|
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
|
+
}
|
|
24787
24827
|
}
|
|
24788
24828
|
</div>
|
|
24789
24829
|
`,
|
|
24790
24830
|
isInline: true,
|
|
24791
|
-
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"],
|
|
24792
24832
|
dependencies: [{
|
|
24793
24833
|
kind: "component",
|
|
24794
24834
|
type: ImagePreviewComponent,
|
|
@@ -24868,14 +24908,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24868
24908
|
[attr.required]="required() || null"
|
|
24869
24909
|
[attr.aria-label]="ariaLabel() || null"
|
|
24870
24910
|
[attr.aria-invalid]="_shownError() ? 'true' : null"
|
|
24871
|
-
[attr.aria-describedby]="
|
|
24911
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24872
24912
|
[attr.tabindex]="showField() ? -1 : null"
|
|
24873
24913
|
(change)="onChange($event)"
|
|
24874
24914
|
(blur)="_onTouched()" />
|
|
24875
24915
|
@if (showField()) {
|
|
24876
24916
|
<div class="fi-row">
|
|
24877
24917
|
<button type="button" class="fi-control" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
|
|
24878
|
-
[attr.aria-describedby]="
|
|
24918
|
+
[attr.aria-describedby]="_describedBy()"
|
|
24879
24919
|
(click)="open()" (blur)="_touch()"
|
|
24880
24920
|
(dragenter)="onDragOver($event)" (dragover)="onDragOver($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)">
|
|
24881
24921
|
@if (_previewUrl(); as src) {
|
|
@@ -24895,11 +24935,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
24895
24935
|
</div>
|
|
24896
24936
|
}
|
|
24897
24937
|
@if (_shownError()) {
|
|
24898
|
-
|
|
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
|
+
}
|
|
24899
24945
|
}
|
|
24900
24946
|
</div>
|
|
24901
24947
|
`,
|
|
24902
|
-
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"]
|
|
24903
24949
|
}]
|
|
24904
24950
|
}],
|
|
24905
24951
|
ctorParameters: () => [],
|
|
@@ -25000,6 +25046,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
25000
25046
|
required: false
|
|
25001
25047
|
}]
|
|
25002
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
|
+
}],
|
|
25003
25065
|
clearable: [{
|
|
25004
25066
|
type: i0.Input,
|
|
25005
25067
|
args: [{
|
|
@@ -25128,6 +25190,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
25128
25190
|
type: i0.Output,
|
|
25129
25191
|
args: ["fileRejected"]
|
|
25130
25192
|
}],
|
|
25193
|
+
filesRejected: [{
|
|
25194
|
+
type: i0.Output,
|
|
25195
|
+
args: ["filesRejected"]
|
|
25196
|
+
}],
|
|
25131
25197
|
fileRemoved: [{
|
|
25132
25198
|
type: i0.Output,
|
|
25133
25199
|
args: ["fileRemoved"]
|
|
@@ -25150,6 +25216,361 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
25150
25216
|
}]
|
|
25151
25217
|
}
|
|
25152
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
|
+
});
|
|
25153
25574
|
var DateInputComponent = class DateInputComponent {
|
|
25154
25575
|
constructor() {
|
|
25155
25576
|
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -56899,6 +57320,8 @@ var ConversationsComponent = class ConversationsComponent {
|
|
|
56899
57320
|
"showField",
|
|
56900
57321
|
"showErrors",
|
|
56901
57322
|
"toastOnReject",
|
|
57323
|
+
"listRejections",
|
|
57324
|
+
"ariaDescribedBy",
|
|
56902
57325
|
"clearable",
|
|
56903
57326
|
"removeLabel",
|
|
56904
57327
|
"maxSize",
|
|
@@ -56919,6 +57342,7 @@ var ConversationsComponent = class ConversationsComponent {
|
|
|
56919
57342
|
outputs: [
|
|
56920
57343
|
"filesSelected",
|
|
56921
57344
|
"fileRejected",
|
|
57345
|
+
"filesRejected",
|
|
56922
57346
|
"fileRemoved",
|
|
56923
57347
|
"invalidChange"
|
|
56924
57348
|
]
|
|
@@ -60474,6 +60898,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
60474
60898
|
}]
|
|
60475
60899
|
}
|
|
60476
60900
|
});
|
|
60477
|
-
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, 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 };
|
|
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 };
|
|
60478
60902
|
|
|
60479
60903
|
//# sourceMappingURL=forgeroute-ui.mjs.map
|