@forgeroute/ui 0.4.95 → 0.4.96
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 +5 -8
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +67 -11
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +8 -8
- package/types/forgeroute-ui.d.ts +72 -47
|
@@ -4344,7 +4344,7 @@ function createFieldReveal(showErrors) {
|
|
|
4344
4344
|
});
|
|
4345
4345
|
return {
|
|
4346
4346
|
touched,
|
|
4347
|
-
revealed: computed(() => touched())
|
|
4347
|
+
revealed: computed(() => touched() || showErrors())
|
|
4348
4348
|
};
|
|
4349
4349
|
}
|
|
4350
4350
|
const isEnglishLocale = (locale) => {
|
|
@@ -4543,7 +4543,8 @@ var TextInputComponent = class TextInputComponent {
|
|
|
4543
4543
|
this._defaultRules = DEFAULT_PASSWORD_RULES;
|
|
4544
4544
|
this._warned = false;
|
|
4545
4545
|
this._formatting = computed(() => this.phoneFormat() || this.type() === "tel", ...ngDevMode ? [{ debugName: "_formatting" }] : /* istanbul ignore next */ []);
|
|
4546
|
-
this.
|
|
4546
|
+
this._hostText = signal(null, ...ngDevMode ? [{ debugName: "_hostText" }] : /* istanbul ignore next */ []);
|
|
4547
|
+
this._issue = computed(() => this._check(this._hostText() ?? this._value()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
|
|
4547
4548
|
this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
4548
4549
|
this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
4549
4550
|
this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
|
|
@@ -4566,7 +4567,9 @@ var TextInputComponent = class TextInputComponent {
|
|
|
4566
4567
|
}
|
|
4567
4568
|
writeValue(val) {
|
|
4568
4569
|
const text = val == null || typeof val === "number" && Number.isNaN(val) && this._numeric() ? "" : String(val);
|
|
4569
|
-
this.
|
|
4570
|
+
const shown = this._formatting() ? TextInputComponent._formatPhone(text) : text;
|
|
4571
|
+
this._value.set(shown);
|
|
4572
|
+
this._hostText.set(this._formatting() && shown !== text && this.type() === "tel" ? text : null);
|
|
4570
4573
|
if (text === "") this._typed.set(false);
|
|
4571
4574
|
}
|
|
4572
4575
|
validate(control) {
|
|
@@ -4602,6 +4605,7 @@ var TextInputComponent = class TextInputComponent {
|
|
|
4602
4605
|
if (this.integer()) val = val.replace(/[.eE].*$/, "");
|
|
4603
4606
|
const format = this.formatter();
|
|
4604
4607
|
if (format) val = format(val);
|
|
4608
|
+
this._hostText.set(null);
|
|
4605
4609
|
this._value.set(val);
|
|
4606
4610
|
const emitted = this._numeric() ? TextInputComponent._parse(val) : val;
|
|
4607
4611
|
this._onChange(emitted);
|
|
@@ -34066,8 +34070,10 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
34066
34070
|
return q ? this.options().filter((o) => fold(o.label).includes(q)) : this.options();
|
|
34067
34071
|
}, ...ngDevMode ? [{ debugName: "_filteredOptions" }] : /* istanbul ignore next */ []);
|
|
34068
34072
|
this._onChange = (_) => {};
|
|
34069
|
-
this.
|
|
34070
|
-
this.
|
|
34073
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
34074
|
+
this._reveal = createFieldReveal(this.showErrors);
|
|
34075
|
+
this._touched = this._reveal.touched;
|
|
34076
|
+
this._shownError = computed(() => this._reveal.revealed() ? this.error() : "", ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
|
|
34071
34077
|
this._onTouched = () => {};
|
|
34072
34078
|
}
|
|
34073
34079
|
resetTouched() {
|
|
@@ -34212,6 +34218,13 @@ var MultiSelectComponent = class MultiSelectComponent {
|
|
|
34212
34218
|
isSignal: true,
|
|
34213
34219
|
isRequired: false,
|
|
34214
34220
|
transformFunction: null
|
|
34221
|
+
},
|
|
34222
|
+
showErrors: {
|
|
34223
|
+
classPropertyName: "showErrors",
|
|
34224
|
+
publicName: "showErrors",
|
|
34225
|
+
isSignal: true,
|
|
34226
|
+
isRequired: false,
|
|
34227
|
+
transformFunction: null
|
|
34215
34228
|
}
|
|
34216
34229
|
},
|
|
34217
34230
|
outputs: { selected: "selectedChange" },
|
|
@@ -34524,6 +34537,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
34524
34537
|
required: false
|
|
34525
34538
|
}]
|
|
34526
34539
|
}],
|
|
34540
|
+
showErrors: [{
|
|
34541
|
+
type: i0.Input,
|
|
34542
|
+
args: [{
|
|
34543
|
+
isSignal: true,
|
|
34544
|
+
alias: "showErrors",
|
|
34545
|
+
required: false
|
|
34546
|
+
}]
|
|
34547
|
+
}],
|
|
34527
34548
|
onDocumentClick: [{
|
|
34528
34549
|
type: HostListener,
|
|
34529
34550
|
args: ["document:click", ["$event"]]
|
|
@@ -42955,7 +42976,7 @@ var AddressInputComponent = class AddressInputComponent {
|
|
|
42955
42976
|
this.invalid = computed(() => !!this.error() || this._firstIssue(this._issues()) !== null, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
42956
42977
|
this.errorMessage = computed(() => this._firstIssue(this._issues())?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
42957
42978
|
this._req = computed(() => this.required() || this.requireComplete() && this._hasText(this._v()), ...ngDevMode ? [{ debugName: "_req" }] : /* istanbul ignore next */ []);
|
|
42958
|
-
this._shownError = computed(() => this._touched().size > 0 ? this.error() : "", ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
|
|
42979
|
+
this._shownError = computed(() => this.showErrors() || this._touched().size > 0 ? this.error() : "", ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
|
|
42959
42980
|
this._describedBy = computed(() => this._shownError() ? this._errorId : this.hint() ? this._hintId : null, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
|
|
42960
42981
|
this._onChange = (_) => {};
|
|
42961
42982
|
this._textModel = false;
|
|
@@ -43031,7 +43052,7 @@ var AddressInputComponent = class AddressInputComponent {
|
|
|
43031
43052
|
if (!next || !this.host.nativeElement.contains(next)) this._onTouched();
|
|
43032
43053
|
}
|
|
43033
43054
|
_revealed(field) {
|
|
43034
|
-
return this._touched().has(field);
|
|
43055
|
+
return this.showErrors() || this._touched().has(field);
|
|
43035
43056
|
}
|
|
43036
43057
|
_fieldError(field) {
|
|
43037
43058
|
if (this.disabled() || this.readonly()) return "";
|
|
@@ -46168,8 +46189,10 @@ var RichTextEditorComponent = class RichTextEditorComponent {
|
|
|
46168
46189
|
this.readonly = input(false, ...ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []);
|
|
46169
46190
|
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
46170
46191
|
this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
46171
|
-
this.
|
|
46172
|
-
this.
|
|
46192
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
46193
|
+
this._reveal = createFieldReveal(this.showErrors);
|
|
46194
|
+
this._touched = this._reveal.touched;
|
|
46195
|
+
this._activeError = computed(() => this._reveal.revealed() ? this.error() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
|
|
46173
46196
|
this.minHeight = input(200, ...ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []);
|
|
46174
46197
|
this.maxHeight = input(600, ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
|
|
46175
46198
|
this.hide = input([], ...ngDevMode ? [{ debugName: "hide" }] : /* istanbul ignore next */ []);
|
|
@@ -46516,6 +46539,13 @@ var RichTextEditorComponent = class RichTextEditorComponent {
|
|
|
46516
46539
|
isRequired: false,
|
|
46517
46540
|
transformFunction: null
|
|
46518
46541
|
},
|
|
46542
|
+
showErrors: {
|
|
46543
|
+
classPropertyName: "showErrors",
|
|
46544
|
+
publicName: "showErrors",
|
|
46545
|
+
isSignal: true,
|
|
46546
|
+
isRequired: false,
|
|
46547
|
+
transformFunction: null
|
|
46548
|
+
},
|
|
46519
46549
|
minHeight: {
|
|
46520
46550
|
classPropertyName: "minHeight",
|
|
46521
46551
|
publicName: "minHeight",
|
|
@@ -47119,6 +47149,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
47119
47149
|
required: false
|
|
47120
47150
|
}]
|
|
47121
47151
|
}],
|
|
47152
|
+
showErrors: [{
|
|
47153
|
+
type: i0.Input,
|
|
47154
|
+
args: [{
|
|
47155
|
+
isSignal: true,
|
|
47156
|
+
alias: "showErrors",
|
|
47157
|
+
required: false
|
|
47158
|
+
}]
|
|
47159
|
+
}],
|
|
47122
47160
|
minHeight: [{
|
|
47123
47161
|
type: i0.Input,
|
|
47124
47162
|
args: [{
|
|
@@ -48456,8 +48494,10 @@ var SignaturePadComponent = class SignaturePadComponent {
|
|
|
48456
48494
|
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
48457
48495
|
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
48458
48496
|
this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
48459
|
-
this.
|
|
48460
|
-
this.
|
|
48497
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
48498
|
+
this._reveal = createFieldReveal(this.showErrors);
|
|
48499
|
+
this._touched = this._reveal.touched;
|
|
48500
|
+
this._activeError = computed(() => this._reveal.revealed() ? this.error() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
|
|
48461
48501
|
this.width = input(600, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
48462
48502
|
this.height = input(120, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
48463
48503
|
this.outputWidth = input(600, ...ngDevMode ? [{ debugName: "outputWidth" }] : /* istanbul ignore next */ []);
|
|
@@ -48808,6 +48848,13 @@ var SignaturePadComponent = class SignaturePadComponent {
|
|
|
48808
48848
|
isRequired: false,
|
|
48809
48849
|
transformFunction: null
|
|
48810
48850
|
},
|
|
48851
|
+
showErrors: {
|
|
48852
|
+
classPropertyName: "showErrors",
|
|
48853
|
+
publicName: "showErrors",
|
|
48854
|
+
isSignal: true,
|
|
48855
|
+
isRequired: false,
|
|
48856
|
+
transformFunction: null
|
|
48857
|
+
},
|
|
48811
48858
|
width: {
|
|
48812
48859
|
classPropertyName: "width",
|
|
48813
48860
|
publicName: "width",
|
|
@@ -49062,6 +49109,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
49062
49109
|
required: false
|
|
49063
49110
|
}]
|
|
49064
49111
|
}],
|
|
49112
|
+
showErrors: [{
|
|
49113
|
+
type: i0.Input,
|
|
49114
|
+
args: [{
|
|
49115
|
+
isSignal: true,
|
|
49116
|
+
alias: "showErrors",
|
|
49117
|
+
required: false
|
|
49118
|
+
}]
|
|
49119
|
+
}],
|
|
49065
49120
|
width: [{
|
|
49066
49121
|
type: i0.Input,
|
|
49067
49122
|
args: [{
|
|
@@ -65459,6 +65514,7 @@ var ConversationsComponent = class ConversationsComponent {
|
|
|
65459
65514
|
"readonly",
|
|
65460
65515
|
"hint",
|
|
65461
65516
|
"error",
|
|
65517
|
+
"showErrors",
|
|
65462
65518
|
"minHeight",
|
|
65463
65519
|
"maxHeight",
|
|
65464
65520
|
"hide",
|