@forgeroute/ui 0.4.92 → 0.4.93
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-map.mjs +11 -4
- package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +37 -13
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +164 -79
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-map.d.ts +4 -0
- package/types/forgeroute-ui-messaging.d.ts +17 -7
- package/types/forgeroute-ui.d.ts +105 -56
|
@@ -1252,6 +1252,7 @@ var DocumentSendOptionsComponent = class DocumentSendOptionsComponent {
|
|
|
1252
1252
|
this.label = computed(() => this.labelInput() ?? this.labels.t("messagingDocumentSendOptions.label"), ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
1253
1253
|
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
1254
1254
|
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
1255
|
+
this._reveal = createFieldReveal(this.showErrors);
|
|
1255
1256
|
this.valueChange = output();
|
|
1256
1257
|
this.invalidChange = output();
|
|
1257
1258
|
this.purposes = input([
|
|
@@ -1649,20 +1650,26 @@ var DocumentSendOptionsComponent = class DocumentSendOptionsComponent {
|
|
|
1649
1650
|
const doc = opt?.data;
|
|
1650
1651
|
if (!doc || !this.available()) return;
|
|
1651
1652
|
if (!this.selected().some((d) => d.id === doc.id)) this.selected.update((list) => [...list, doc]);
|
|
1653
|
+
this._reveal.touched.set(true);
|
|
1652
1654
|
this.options.set([]);
|
|
1653
1655
|
this.combo()?.clear();
|
|
1654
1656
|
}
|
|
1655
1657
|
remove(id) {
|
|
1656
1658
|
this.selected.update((list) => list.filter((d) => d.id !== id));
|
|
1659
|
+
this._reveal.touched.set(true);
|
|
1657
1660
|
}
|
|
1658
1661
|
setPurpose(p) {
|
|
1659
|
-
if ((p === "ESIGN" || p === "ATTACH" || p === "BOTH") && this.purposeOptions().some((o) => o.value === p))
|
|
1662
|
+
if ((p === "ESIGN" || p === "ATTACH" || p === "BOTH") && this.purposeOptions().some((o) => o.value === p)) {
|
|
1663
|
+
this.purposeChoice.set(p);
|
|
1664
|
+
this._reveal.touched.set(true);
|
|
1665
|
+
}
|
|
1660
1666
|
}
|
|
1661
1667
|
reset() {
|
|
1662
1668
|
this.selected.set([]);
|
|
1663
1669
|
this.purposeChoice.set("ESIGN");
|
|
1664
1670
|
this.options.set([]);
|
|
1665
1671
|
this.searchFailed.set(false);
|
|
1672
|
+
this._reveal.touched.set(false);
|
|
1666
1673
|
this.providerChoice.set("NATIVE");
|
|
1667
1674
|
this.countersignChoice.set(false);
|
|
1668
1675
|
this.signingOpen.set(false);
|
|
@@ -1820,7 +1827,8 @@ var DocumentSendOptionsComponent = class DocumentSendOptionsComponent {
|
|
|
1820
1827
|
[error]="searchFailed() ? searchFailedMessage : ''"
|
|
1821
1828
|
[showErrors]="searchFailed()"
|
|
1822
1829
|
(searchChange)="search$.next($event)"
|
|
1823
|
-
(valueChange)="onPick($event)"
|
|
1830
|
+
(valueChange)="onPick($event)"
|
|
1831
|
+
(blurred)="_reveal.touched.set(true)" />
|
|
1824
1832
|
}
|
|
1825
1833
|
|
|
1826
1834
|
@if (selected().length > 0) {
|
|
@@ -1882,7 +1890,7 @@ var DocumentSendOptionsComponent = class DocumentSendOptionsComponent {
|
|
|
1882
1890
|
(ngModelChange)="setPurpose($event)" />
|
|
1883
1891
|
}
|
|
1884
1892
|
|
|
1885
|
-
<ui-error errorId="dso-error" [message]="showErrors() ? documentError() : ''" />
|
|
1893
|
+
<ui-error errorId="dso-error" [message]="_reveal.revealed() || (locked() && showErrors()) ? documentError() : ''" />
|
|
1886
1894
|
|
|
1887
1895
|
@if (signingVisible()) {
|
|
1888
1896
|
<!-- Collapsed to one summary line: the defaults are valid, so most senders never open it. A broken value opens it by itself. -->
|
|
@@ -2219,7 +2227,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2219
2227
|
[error]="searchFailed() ? searchFailedMessage : ''"
|
|
2220
2228
|
[showErrors]="searchFailed()"
|
|
2221
2229
|
(searchChange)="search$.next($event)"
|
|
2222
|
-
(valueChange)="onPick($event)"
|
|
2230
|
+
(valueChange)="onPick($event)"
|
|
2231
|
+
(blurred)="_reveal.touched.set(true)" />
|
|
2223
2232
|
}
|
|
2224
2233
|
|
|
2225
2234
|
@if (selected().length > 0) {
|
|
@@ -2281,7 +2290,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2281
2290
|
(ngModelChange)="setPurpose($event)" />
|
|
2282
2291
|
}
|
|
2283
2292
|
|
|
2284
|
-
<ui-error errorId="dso-error" [message]="showErrors() ? documentError() : ''" />
|
|
2293
|
+
<ui-error errorId="dso-error" [message]="_reveal.revealed() || (locked() && showErrors()) ? documentError() : ''" />
|
|
2285
2294
|
|
|
2286
2295
|
@if (signingVisible()) {
|
|
2287
2296
|
<!-- Collapsed to one summary line: the defaults are valid, so most senders never open it. A broken value opens it by itself. -->
|
|
@@ -2581,7 +2590,7 @@ var DocumentSignersComponent = class DocumentSignersComponent {
|
|
|
2581
2590
|
[errorId]="'ds-error-' + role"
|
|
2582
2591
|
[placeholder]="labels.t('messagingDocumentSendOptions.searchForAContact')"
|
|
2583
2592
|
(contactSelected)="pick(role, $event)" />
|
|
2584
|
-
<!-- The picker's own "<Role> is required." (shown after
|
|
2593
|
+
<!-- The picker's own "<Role> is required." (shown only after the picker was left; showErrors alone reveals nothing), else the contact problem (no email / twice). -->
|
|
2585
2594
|
<div class="ds-error" [attr.id]="'ds-error-' + role">
|
|
2586
2595
|
<ui-error [message]="visibleProblem(role) || picker.visibleErrorMessage()" />
|
|
2587
2596
|
</div>
|
|
@@ -2730,7 +2739,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2730
2739
|
[errorId]="'ds-error-' + role"
|
|
2731
2740
|
[placeholder]="labels.t('messagingDocumentSendOptions.searchForAContact')"
|
|
2732
2741
|
(contactSelected)="pick(role, $event)" />
|
|
2733
|
-
<!-- The picker's own "<Role> is required." (shown after
|
|
2742
|
+
<!-- The picker's own "<Role> is required." (shown only after the picker was left; showErrors alone reveals nothing), else the contact problem (no email / twice). -->
|
|
2734
2743
|
<div class="ds-error" [attr.id]="'ds-error-' + role">
|
|
2735
2744
|
<ui-error [message]="visibleProblem(role) || picker.visibleErrorMessage()" />
|
|
2736
2745
|
</div>
|
|
@@ -3771,6 +3780,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
3771
3780
|
this.mode = "compose";
|
|
3772
3781
|
this.subject = "";
|
|
3773
3782
|
this.body = "";
|
|
3783
|
+
this.subjectTouched = false;
|
|
3784
|
+
this.bodyTouched = false;
|
|
3774
3785
|
this.templateId = null;
|
|
3775
3786
|
this.previewFormat = "preview";
|
|
3776
3787
|
this.showSendPreview = false;
|
|
@@ -3961,6 +3972,9 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
3961
3972
|
get sendLengthError() {
|
|
3962
3973
|
return this.subjectLengthError || (this.mode === "compose" ? "" : this.bodyLengthError);
|
|
3963
3974
|
}
|
|
3975
|
+
get sendLengthErrorShown() {
|
|
3976
|
+
return (this.subjectTouched ? this.subjectLengthError : "") || (this.mode === "compose" || !this.bodyTouched ? "" : this.bodyLengthError);
|
|
3977
|
+
}
|
|
3964
3978
|
get canSend() {
|
|
3965
3979
|
if (!this.emailEnabled()) return false;
|
|
3966
3980
|
if (this.bodyLengthError || this.subjectLengthError) return false;
|
|
@@ -4076,6 +4090,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4076
4090
|
this.subject = "";
|
|
4077
4091
|
this.body = "";
|
|
4078
4092
|
}
|
|
4093
|
+
this.subjectTouched = false;
|
|
4094
|
+
this.bodyTouched = false;
|
|
4079
4095
|
this._suggestedSubject = "";
|
|
4080
4096
|
this.showSchedule = false;
|
|
4081
4097
|
this.scheduledAt = "";
|
|
@@ -4096,6 +4112,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4096
4112
|
this.templateId = null;
|
|
4097
4113
|
this.subject = "";
|
|
4098
4114
|
this.body = "";
|
|
4115
|
+
this.subjectTouched = false;
|
|
4116
|
+
this.bodyTouched = false;
|
|
4099
4117
|
this.previewFormat = "preview";
|
|
4100
4118
|
this.customVars = {};
|
|
4101
4119
|
this.pendingInputs = {};
|
|
@@ -4105,6 +4123,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4105
4123
|
this.templateId = tpl.id;
|
|
4106
4124
|
this.subject = tpl.subject ?? "";
|
|
4107
4125
|
this.body = this.stripBlockWrappers(tpl.body);
|
|
4126
|
+
this.subjectTouched = true;
|
|
4127
|
+
this.bodyTouched = true;
|
|
4108
4128
|
this.previewFormat = "preview";
|
|
4109
4129
|
this.customVars = {};
|
|
4110
4130
|
this.pendingInputs = {};
|
|
@@ -4619,7 +4639,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4619
4639
|
[placeholder]="labels.t('messagingSendMessagePanel.emailSubject')"
|
|
4620
4640
|
[maxlength]="MAX_SUBJECT"
|
|
4621
4641
|
[(ngModel)]="subject"
|
|
4622
|
-
(
|
|
4642
|
+
(blurred)="subjectTouched = true; cdr.markForCheck()"
|
|
4643
|
+
(ngModelChange)="subjectTouched = true; notifyValid()" />
|
|
4623
4644
|
}
|
|
4624
4645
|
<ui-textarea-input
|
|
4625
4646
|
[label]="labels.t('common.message')"
|
|
@@ -4628,7 +4649,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4628
4649
|
[rows]="8"
|
|
4629
4650
|
[(ngModel)]="body"
|
|
4630
4651
|
[error]="composeTagError || bodyLengthError"
|
|
4631
|
-
(
|
|
4652
|
+
(blurred)="bodyTouched = true; cdr.markForCheck()"
|
|
4653
|
+
(ngModelChange)="bodyTouched = true; notifyValid()" />
|
|
4632
4654
|
|
|
4633
4655
|
@if (!hasDocuments && showAttachments()) {
|
|
4634
4656
|
<div class="sm-field">
|
|
@@ -4753,7 +4775,7 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4753
4775
|
}
|
|
4754
4776
|
|
|
4755
4777
|
<!-- Why Send is disabled for length, in every mode (compose shows the message error inline on the editor itself). -->
|
|
4756
|
-
<ui-error errorId="sm-length-error" [message]="
|
|
4778
|
+
<ui-error errorId="sm-length-error" [message]="sendLengthErrorShown" />
|
|
4757
4779
|
|
|
4758
4780
|
@if (showReceiptOption() === true) {
|
|
4759
4781
|
<ui-checkbox
|
|
@@ -5228,7 +5250,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5228
5250
|
[placeholder]="labels.t('messagingSendMessagePanel.emailSubject')"
|
|
5229
5251
|
[maxlength]="MAX_SUBJECT"
|
|
5230
5252
|
[(ngModel)]="subject"
|
|
5231
|
-
(
|
|
5253
|
+
(blurred)="subjectTouched = true; cdr.markForCheck()"
|
|
5254
|
+
(ngModelChange)="subjectTouched = true; notifyValid()" />
|
|
5232
5255
|
}
|
|
5233
5256
|
<ui-textarea-input
|
|
5234
5257
|
[label]="labels.t('common.message')"
|
|
@@ -5237,7 +5260,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5237
5260
|
[rows]="8"
|
|
5238
5261
|
[(ngModel)]="body"
|
|
5239
5262
|
[error]="composeTagError || bodyLengthError"
|
|
5240
|
-
(
|
|
5263
|
+
(blurred)="bodyTouched = true; cdr.markForCheck()"
|
|
5264
|
+
(ngModelChange)="bodyTouched = true; notifyValid()" />
|
|
5241
5265
|
|
|
5242
5266
|
@if (!hasDocuments && showAttachments()) {
|
|
5243
5267
|
<div class="sm-field">
|
|
@@ -5362,7 +5386,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5362
5386
|
}
|
|
5363
5387
|
|
|
5364
5388
|
<!-- Why Send is disabled for length, in every mode (compose shows the message error inline on the editor itself). -->
|
|
5365
|
-
<ui-error errorId="sm-length-error" [message]="
|
|
5389
|
+
<ui-error errorId="sm-length-error" [message]="sendLengthErrorShown" />
|
|
5366
5390
|
|
|
5367
5391
|
@if (showReceiptOption() === true) {
|
|
5368
5392
|
<ui-checkbox
|