@forgeroute/ui 0.4.40 → 0.4.42
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 +686 -35
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +566 -190
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +313 -35
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +166 -1
- package/types/forgeroute-ui-stripe.d.ts +212 -64
- package/types/forgeroute-ui.d.ts +134 -18
|
@@ -3618,6 +3618,9 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
3618
3618
|
}, ...ngDevMode ? [{ debugName: "previewContact" }] : /* istanbul ignore next */ []);
|
|
3619
3619
|
this.videoDefaults = input(null, ...ngDevMode ? [{ debugName: "videoDefaults" }] : /* istanbul ignore next */ []);
|
|
3620
3620
|
this.attachmentsAndScheduling = input(true, ...ngDevMode ? [{ debugName: "attachmentsAndScheduling" }] : /* istanbul ignore next */ []);
|
|
3621
|
+
this.showSubject = input(true, ...ngDevMode ? [{ debugName: "showSubject" }] : /* istanbul ignore next */ []);
|
|
3622
|
+
this.showTemplates = input(true, ...ngDevMode ? [{ debugName: "showTemplates" }] : /* istanbul ignore next */ []);
|
|
3623
|
+
this.showVideo = input(true, ...ngDevMode ? [{ debugName: "showVideo" }] : /* istanbul ignore next */ []);
|
|
3621
3624
|
this.sent = output();
|
|
3622
3625
|
this.emailAdded = output();
|
|
3623
3626
|
this.validChange = output();
|
|
@@ -3816,7 +3819,7 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
3816
3819
|
if (this.ccError || this.documents() && this.documentsInvalid) return false;
|
|
3817
3820
|
if (this.signersActive && (this.signersInvalid || !this.signersValue)) return false;
|
|
3818
3821
|
if (this.viaDocuSign && !this.contactId()) return false;
|
|
3819
|
-
const hasContent = (this.viaDocuSign || !!this.subject.trim() && !!this.body.trim()) && this.unresolvedVars.length === 0 && !hasLeftoverTags(this.resolvedSubject) && !hasLeftoverTags(this.resolvedBody);
|
|
3822
|
+
const hasContent = (this.viaDocuSign || (!this.showSubject() || !!this.subject.trim()) && !!this.body.trim()) && this.unresolvedVars.length === 0 && !hasLeftoverTags(this.resolvedSubject) && !hasLeftoverTags(this.resolvedBody);
|
|
3820
3823
|
if (this.showSchedule) return hasContent && !!this.scheduledAt && new Date(this.scheduledAt).getTime() > Date.now();
|
|
3821
3824
|
return hasContent;
|
|
3822
3825
|
}
|
|
@@ -4317,6 +4320,27 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4317
4320
|
isSignal: true,
|
|
4318
4321
|
isRequired: false,
|
|
4319
4322
|
transformFunction: null
|
|
4323
|
+
},
|
|
4324
|
+
showSubject: {
|
|
4325
|
+
classPropertyName: "showSubject",
|
|
4326
|
+
publicName: "showSubject",
|
|
4327
|
+
isSignal: true,
|
|
4328
|
+
isRequired: false,
|
|
4329
|
+
transformFunction: null
|
|
4330
|
+
},
|
|
4331
|
+
showTemplates: {
|
|
4332
|
+
classPropertyName: "showTemplates",
|
|
4333
|
+
publicName: "showTemplates",
|
|
4334
|
+
isSignal: true,
|
|
4335
|
+
isRequired: false,
|
|
4336
|
+
transformFunction: null
|
|
4337
|
+
},
|
|
4338
|
+
showVideo: {
|
|
4339
|
+
classPropertyName: "showVideo",
|
|
4340
|
+
publicName: "showVideo",
|
|
4341
|
+
isSignal: true,
|
|
4342
|
+
isRequired: false,
|
|
4343
|
+
transformFunction: null
|
|
4320
4344
|
}
|
|
4321
4345
|
},
|
|
4322
4346
|
outputs: {
|
|
@@ -4381,12 +4405,15 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4381
4405
|
(ngModelChange)="notifyValid()" />
|
|
4382
4406
|
}
|
|
4383
4407
|
|
|
4384
|
-
<!-- Mode -->
|
|
4408
|
+
<!-- Mode (hidden with [showTemplates]="false": the form is Create Message only) -->
|
|
4409
|
+
@if (showTemplates()) {
|
|
4385
4410
|
<div class="sm-mode-row">
|
|
4386
4411
|
<ui-pill-tabs [tabs]="modeTabs" [activeKey]="mode" (tabChange)="setMode($event)" />
|
|
4387
4412
|
</div>
|
|
4413
|
+
}
|
|
4388
4414
|
|
|
4389
4415
|
@if (mode === 'compose') {
|
|
4416
|
+
@if (showSubject()) {
|
|
4390
4417
|
<ui-text-input
|
|
4391
4418
|
label="Subject"
|
|
4392
4419
|
[required]="!viaDocuSign"
|
|
@@ -4394,6 +4421,7 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4394
4421
|
[maxlength]="MAX_SUBJECT"
|
|
4395
4422
|
[(ngModel)]="subject"
|
|
4396
4423
|
(ngModelChange)="notifyValid()" />
|
|
4424
|
+
}
|
|
4397
4425
|
<ui-textarea-input
|
|
4398
4426
|
label="Message"
|
|
4399
4427
|
[required]="!viaDocuSign"
|
|
@@ -4543,7 +4571,7 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4543
4571
|
}
|
|
4544
4572
|
|
|
4545
4573
|
<!-- Video: the LAST section. The picker, and once a video is attached its settings, Watch Preview and Remove Video. -->
|
|
4546
|
-
@if (mode === 'compose') {
|
|
4574
|
+
@if (mode === 'compose' && showVideo()) {
|
|
4547
4575
|
<ui-form-section label="Video" [divider]="true">
|
|
4548
4576
|
@for (k of [videoPickerKey]; track k) {
|
|
4549
4577
|
<ui-video-picker (videoSelected)="onVideoSelected($event)" />
|
|
@@ -4887,7 +4915,8 @@ var SendEmailComponent = class SendEmailComponent {
|
|
|
4887
4915
|
"dismissAriaLabel",
|
|
4888
4916
|
"quiet",
|
|
4889
4917
|
"compact",
|
|
4890
|
-
"inline"
|
|
4918
|
+
"inline",
|
|
4919
|
+
"fill"
|
|
4891
4920
|
],
|
|
4892
4921
|
outputs: ["dismissed"]
|
|
4893
4922
|
}
|
|
@@ -4979,12 +5008,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4979
5008
|
(ngModelChange)="notifyValid()" />
|
|
4980
5009
|
}
|
|
4981
5010
|
|
|
4982
|
-
<!-- Mode -->
|
|
5011
|
+
<!-- Mode (hidden with [showTemplates]="false": the form is Create Message only) -->
|
|
5012
|
+
@if (showTemplates()) {
|
|
4983
5013
|
<div class="sm-mode-row">
|
|
4984
5014
|
<ui-pill-tabs [tabs]="modeTabs" [activeKey]="mode" (tabChange)="setMode($event)" />
|
|
4985
5015
|
</div>
|
|
5016
|
+
}
|
|
4986
5017
|
|
|
4987
5018
|
@if (mode === 'compose') {
|
|
5019
|
+
@if (showSubject()) {
|
|
4988
5020
|
<ui-text-input
|
|
4989
5021
|
label="Subject"
|
|
4990
5022
|
[required]="!viaDocuSign"
|
|
@@ -4992,6 +5024,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4992
5024
|
[maxlength]="MAX_SUBJECT"
|
|
4993
5025
|
[(ngModel)]="subject"
|
|
4994
5026
|
(ngModelChange)="notifyValid()" />
|
|
5027
|
+
}
|
|
4995
5028
|
<ui-textarea-input
|
|
4996
5029
|
label="Message"
|
|
4997
5030
|
[required]="!viaDocuSign"
|
|
@@ -5141,7 +5174,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5141
5174
|
}
|
|
5142
5175
|
|
|
5143
5176
|
<!-- Video: the LAST section. The picker, and once a video is attached its settings, Watch Preview and Remove Video. -->
|
|
5144
|
-
@if (mode === 'compose') {
|
|
5177
|
+
@if (mode === 'compose' && showVideo()) {
|
|
5145
5178
|
<ui-form-section label="Video" [divider]="true">
|
|
5146
5179
|
@for (k of [videoPickerKey]; track k) {
|
|
5147
5180
|
<ui-video-picker (videoSelected)="onVideoSelected($event)" />
|
|
@@ -5407,6 +5440,30 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5407
5440
|
required: false
|
|
5408
5441
|
}]
|
|
5409
5442
|
}],
|
|
5443
|
+
showSubject: [{
|
|
5444
|
+
type: i0.Input,
|
|
5445
|
+
args: [{
|
|
5446
|
+
isSignal: true,
|
|
5447
|
+
alias: "showSubject",
|
|
5448
|
+
required: false
|
|
5449
|
+
}]
|
|
5450
|
+
}],
|
|
5451
|
+
showTemplates: [{
|
|
5452
|
+
type: i0.Input,
|
|
5453
|
+
args: [{
|
|
5454
|
+
isSignal: true,
|
|
5455
|
+
alias: "showTemplates",
|
|
5456
|
+
required: false
|
|
5457
|
+
}]
|
|
5458
|
+
}],
|
|
5459
|
+
showVideo: [{
|
|
5460
|
+
type: i0.Input,
|
|
5461
|
+
args: [{
|
|
5462
|
+
isSignal: true,
|
|
5463
|
+
alias: "showVideo",
|
|
5464
|
+
required: false
|
|
5465
|
+
}]
|
|
5466
|
+
}],
|
|
5410
5467
|
sent: [{
|
|
5411
5468
|
type: i0.Output,
|
|
5412
5469
|
args: ["sent"]
|
|
@@ -5429,6 +5486,395 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5429
5486
|
}]
|
|
5430
5487
|
}
|
|
5431
5488
|
});
|
|
5489
|
+
const MAX_SUBJECT = 255;
|
|
5490
|
+
var SendInAppComponent = class SendInAppComponent {
|
|
5491
|
+
constructor() {
|
|
5492
|
+
this.destroyRef = inject(DestroyRef);
|
|
5493
|
+
this.toast = inject(ToastService);
|
|
5494
|
+
this.contactName = input("", ...ngDevMode ? [{ debugName: "contactName" }] : /* istanbul ignore next */ []);
|
|
5495
|
+
this.contactId = input("", ...ngDevMode ? [{ debugName: "contactId" }] : /* istanbul ignore next */ []);
|
|
5496
|
+
this.defaultSubject = input("", ...ngDevMode ? [{ debugName: "defaultSubject" }] : /* istanbul ignore next */ []);
|
|
5497
|
+
this.defaultBody = input("", ...ngDevMode ? [{ debugName: "defaultBody" }] : /* istanbul ignore next */ []);
|
|
5498
|
+
this.showSubject = input(true, ...ngDevMode ? [{ debugName: "showSubject" }] : /* istanbul ignore next */ []);
|
|
5499
|
+
this.maxLength = input(null, ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
|
|
5500
|
+
this.limit = computed(() => this.maxLength() ?? 0, ...ngDevMode ? [{ debugName: "limit" }] : /* istanbul ignore next */ []);
|
|
5501
|
+
this.sendFn = input(null, ...ngDevMode ? [{ debugName: "sendFn" }] : /* istanbul ignore next */ []);
|
|
5502
|
+
this.sent = output();
|
|
5503
|
+
this.validChange = output();
|
|
5504
|
+
this.MAX_SUBJECT = MAX_SUBJECT;
|
|
5505
|
+
this.sending = signal(false, ...ngDevMode ? [{ debugName: "sending" }] : /* istanbul ignore next */ []);
|
|
5506
|
+
this.subject = "";
|
|
5507
|
+
this.body = "";
|
|
5508
|
+
}
|
|
5509
|
+
ngOnInit() {
|
|
5510
|
+
this.subject = this.defaultSubject();
|
|
5511
|
+
this.body = this.defaultBody();
|
|
5512
|
+
this.notifyValid();
|
|
5513
|
+
}
|
|
5514
|
+
get canSend() {
|
|
5515
|
+
if (!this.body.trim() || this.showSubject() && !this.subject.trim()) return false;
|
|
5516
|
+
if (this.showSubject() && this.subject.length > MAX_SUBJECT) return false;
|
|
5517
|
+
const max = this.maxLength();
|
|
5518
|
+
return max == null || this.body.length <= max;
|
|
5519
|
+
}
|
|
5520
|
+
notifyValid() {
|
|
5521
|
+
this.validChange.emit(!this.sending() && !!this.sendFn() && this.canSend);
|
|
5522
|
+
}
|
|
5523
|
+
submit() {
|
|
5524
|
+
const send = this.sendFn();
|
|
5525
|
+
if (!send || this.sending() || !this.canSend) return;
|
|
5526
|
+
this.sending.set(true);
|
|
5527
|
+
this.notifyValid();
|
|
5528
|
+
const payload = {
|
|
5529
|
+
contactName: this.contactName(),
|
|
5530
|
+
contactId: this.contactId() || void 0,
|
|
5531
|
+
body: this.body.trim()
|
|
5532
|
+
};
|
|
5533
|
+
if (this.showSubject()) payload.subject = this.subject.trim();
|
|
5534
|
+
send(payload).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({
|
|
5535
|
+
next: () => {
|
|
5536
|
+
this.toast.show("Message sent");
|
|
5537
|
+
this.sending.set(false);
|
|
5538
|
+
this.sent.emit();
|
|
5539
|
+
},
|
|
5540
|
+
error: (err) => {
|
|
5541
|
+
this.toast.error(serverMessage(err) || "Failed to send message");
|
|
5542
|
+
this.sending.set(false);
|
|
5543
|
+
this.notifyValid();
|
|
5544
|
+
}
|
|
5545
|
+
});
|
|
5546
|
+
}
|
|
5547
|
+
static {
|
|
5548
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
5549
|
+
minVersion: "12.0.0",
|
|
5550
|
+
version: "22.2.2",
|
|
5551
|
+
ngImport: i0,
|
|
5552
|
+
type: SendInAppComponent,
|
|
5553
|
+
deps: [],
|
|
5554
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
5555
|
+
});
|
|
5556
|
+
}
|
|
5557
|
+
static {
|
|
5558
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5559
|
+
minVersion: "17.0.0",
|
|
5560
|
+
version: "22.2.2",
|
|
5561
|
+
type: SendInAppComponent,
|
|
5562
|
+
isStandalone: true,
|
|
5563
|
+
selector: "ui-send-in-app",
|
|
5564
|
+
inputs: {
|
|
5565
|
+
contactName: {
|
|
5566
|
+
classPropertyName: "contactName",
|
|
5567
|
+
publicName: "contactName",
|
|
5568
|
+
isSignal: true,
|
|
5569
|
+
isRequired: false,
|
|
5570
|
+
transformFunction: null
|
|
5571
|
+
},
|
|
5572
|
+
contactId: {
|
|
5573
|
+
classPropertyName: "contactId",
|
|
5574
|
+
publicName: "contactId",
|
|
5575
|
+
isSignal: true,
|
|
5576
|
+
isRequired: false,
|
|
5577
|
+
transformFunction: null
|
|
5578
|
+
},
|
|
5579
|
+
defaultSubject: {
|
|
5580
|
+
classPropertyName: "defaultSubject",
|
|
5581
|
+
publicName: "defaultSubject",
|
|
5582
|
+
isSignal: true,
|
|
5583
|
+
isRequired: false,
|
|
5584
|
+
transformFunction: null
|
|
5585
|
+
},
|
|
5586
|
+
defaultBody: {
|
|
5587
|
+
classPropertyName: "defaultBody",
|
|
5588
|
+
publicName: "defaultBody",
|
|
5589
|
+
isSignal: true,
|
|
5590
|
+
isRequired: false,
|
|
5591
|
+
transformFunction: null
|
|
5592
|
+
},
|
|
5593
|
+
showSubject: {
|
|
5594
|
+
classPropertyName: "showSubject",
|
|
5595
|
+
publicName: "showSubject",
|
|
5596
|
+
isSignal: true,
|
|
5597
|
+
isRequired: false,
|
|
5598
|
+
transformFunction: null
|
|
5599
|
+
},
|
|
5600
|
+
maxLength: {
|
|
5601
|
+
classPropertyName: "maxLength",
|
|
5602
|
+
publicName: "maxLength",
|
|
5603
|
+
isSignal: true,
|
|
5604
|
+
isRequired: false,
|
|
5605
|
+
transformFunction: null
|
|
5606
|
+
},
|
|
5607
|
+
sendFn: {
|
|
5608
|
+
classPropertyName: "sendFn",
|
|
5609
|
+
publicName: "sendFn",
|
|
5610
|
+
isSignal: true,
|
|
5611
|
+
isRequired: false,
|
|
5612
|
+
transformFunction: null
|
|
5613
|
+
}
|
|
5614
|
+
},
|
|
5615
|
+
outputs: {
|
|
5616
|
+
sent: "sent",
|
|
5617
|
+
validChange: "validChange"
|
|
5618
|
+
},
|
|
5619
|
+
ngImport: i0,
|
|
5620
|
+
template: `
|
|
5621
|
+
<div class="sm-group">
|
|
5622
|
+
<span class="sm-group-label">To</span>
|
|
5623
|
+
<div class="sm-to-card">
|
|
5624
|
+
<span class="sm-to-name">{{ contactName() }}</span>
|
|
5625
|
+
</div>
|
|
5626
|
+
</div>
|
|
5627
|
+
@if (showSubject()) {
|
|
5628
|
+
<ui-text-input
|
|
5629
|
+
label="Subject"
|
|
5630
|
+
[required]="true"
|
|
5631
|
+
placeholder="Subject..."
|
|
5632
|
+
[maxlength]="MAX_SUBJECT"
|
|
5633
|
+
[(ngModel)]="subject"
|
|
5634
|
+
(ngModelChange)="notifyValid()" />
|
|
5635
|
+
}
|
|
5636
|
+
@if (limit(); as max) {
|
|
5637
|
+
<ui-textarea-input
|
|
5638
|
+
label="Message"
|
|
5639
|
+
[required]="true"
|
|
5640
|
+
placeholder="Write your message..."
|
|
5641
|
+
[rows]="8"
|
|
5642
|
+
[maxlength]="max"
|
|
5643
|
+
[(ngModel)]="body"
|
|
5644
|
+
(ngModelChange)="notifyValid()" />
|
|
5645
|
+
} @else {
|
|
5646
|
+
<ui-textarea-input
|
|
5647
|
+
label="Message"
|
|
5648
|
+
[required]="true"
|
|
5649
|
+
placeholder="Write your message..."
|
|
5650
|
+
[rows]="8"
|
|
5651
|
+
[(ngModel)]="body"
|
|
5652
|
+
(ngModelChange)="notifyValid()" />
|
|
5653
|
+
}
|
|
5654
|
+
`,
|
|
5655
|
+
isInline: true,
|
|
5656
|
+
styles: [":host{display:flex;flex-direction:column;gap:14px}.sm-group-label{display:block;font-size:.8125rem;font-weight:600;color:#334155;margin-bottom:6px}.sm-to-card{border:1px solid #e2e8f0;border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:3px}.sm-to-name{font-size:.9375rem;font-weight:600;color:#1e293b;min-width:0;overflow-wrap:anywhere}\n"],
|
|
5657
|
+
dependencies: [
|
|
5658
|
+
{
|
|
5659
|
+
kind: "ngmodule",
|
|
5660
|
+
type: FormsModule
|
|
5661
|
+
},
|
|
5662
|
+
{
|
|
5663
|
+
kind: "directive",
|
|
5664
|
+
type: i1.NgControlStatus,
|
|
5665
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
5666
|
+
},
|
|
5667
|
+
{
|
|
5668
|
+
kind: "directive",
|
|
5669
|
+
type: i1.RequiredValidator,
|
|
5670
|
+
selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
|
|
5671
|
+
inputs: ["required"]
|
|
5672
|
+
},
|
|
5673
|
+
{
|
|
5674
|
+
kind: "directive",
|
|
5675
|
+
type: i1.MaxLengthValidator,
|
|
5676
|
+
selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
|
|
5677
|
+
inputs: ["maxlength"]
|
|
5678
|
+
},
|
|
5679
|
+
{
|
|
5680
|
+
kind: "directive",
|
|
5681
|
+
type: i1.NgModel,
|
|
5682
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
5683
|
+
inputs: [
|
|
5684
|
+
"name",
|
|
5685
|
+
"disabled",
|
|
5686
|
+
"ngModel",
|
|
5687
|
+
"ngModelOptions"
|
|
5688
|
+
],
|
|
5689
|
+
outputs: ["ngModelChange"],
|
|
5690
|
+
exportAs: ["ngModel"]
|
|
5691
|
+
},
|
|
5692
|
+
{
|
|
5693
|
+
kind: "component",
|
|
5694
|
+
type: TextInputComponent,
|
|
5695
|
+
selector: "ui-text-input",
|
|
5696
|
+
inputs: [
|
|
5697
|
+
"label",
|
|
5698
|
+
"ariaLabel",
|
|
5699
|
+
"inputTestId",
|
|
5700
|
+
"placeholder",
|
|
5701
|
+
"prefix",
|
|
5702
|
+
"revealable",
|
|
5703
|
+
"passwordRequirements",
|
|
5704
|
+
"passwordRules",
|
|
5705
|
+
"type",
|
|
5706
|
+
"maxlength",
|
|
5707
|
+
"required",
|
|
5708
|
+
"autocomplete",
|
|
5709
|
+
"inputmode",
|
|
5710
|
+
"readonly",
|
|
5711
|
+
"hint",
|
|
5712
|
+
"error",
|
|
5713
|
+
"phoneFormat",
|
|
5714
|
+
"min",
|
|
5715
|
+
"max",
|
|
5716
|
+
"maxDecimals",
|
|
5717
|
+
"step",
|
|
5718
|
+
"valueType",
|
|
5719
|
+
"formatter",
|
|
5720
|
+
"integer",
|
|
5721
|
+
"showErrors",
|
|
5722
|
+
"disabled"
|
|
5723
|
+
],
|
|
5724
|
+
outputs: [
|
|
5725
|
+
"valueChange",
|
|
5726
|
+
"focused",
|
|
5727
|
+
"blurred",
|
|
5728
|
+
"invalidChange"
|
|
5729
|
+
]
|
|
5730
|
+
},
|
|
5731
|
+
{
|
|
5732
|
+
kind: "component",
|
|
5733
|
+
type: TextareaInputComponent,
|
|
5734
|
+
selector: "ui-textarea-input",
|
|
5735
|
+
inputs: [
|
|
5736
|
+
"label",
|
|
5737
|
+
"ariaLabel",
|
|
5738
|
+
"placeholder",
|
|
5739
|
+
"rows",
|
|
5740
|
+
"maxlength",
|
|
5741
|
+
"required",
|
|
5742
|
+
"readonly",
|
|
5743
|
+
"hint",
|
|
5744
|
+
"hintAsDescription",
|
|
5745
|
+
"error",
|
|
5746
|
+
"monospace",
|
|
5747
|
+
"showErrors",
|
|
5748
|
+
"disabled"
|
|
5749
|
+
],
|
|
5750
|
+
outputs: ["invalidChange"]
|
|
5751
|
+
}
|
|
5752
|
+
],
|
|
5753
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
5754
|
+
});
|
|
5755
|
+
}
|
|
5756
|
+
};
|
|
5757
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5758
|
+
minVersion: "12.0.0",
|
|
5759
|
+
version: "22.2.2",
|
|
5760
|
+
ngImport: i0,
|
|
5761
|
+
type: SendInAppComponent,
|
|
5762
|
+
decorators: [{
|
|
5763
|
+
type: Component,
|
|
5764
|
+
args: [{
|
|
5765
|
+
selector: "ui-send-in-app",
|
|
5766
|
+
standalone: true,
|
|
5767
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5768
|
+
imports: [
|
|
5769
|
+
FormsModule,
|
|
5770
|
+
TextInputComponent,
|
|
5771
|
+
TextareaInputComponent
|
|
5772
|
+
],
|
|
5773
|
+
template: `
|
|
5774
|
+
<div class="sm-group">
|
|
5775
|
+
<span class="sm-group-label">To</span>
|
|
5776
|
+
<div class="sm-to-card">
|
|
5777
|
+
<span class="sm-to-name">{{ contactName() }}</span>
|
|
5778
|
+
</div>
|
|
5779
|
+
</div>
|
|
5780
|
+
@if (showSubject()) {
|
|
5781
|
+
<ui-text-input
|
|
5782
|
+
label="Subject"
|
|
5783
|
+
[required]="true"
|
|
5784
|
+
placeholder="Subject..."
|
|
5785
|
+
[maxlength]="MAX_SUBJECT"
|
|
5786
|
+
[(ngModel)]="subject"
|
|
5787
|
+
(ngModelChange)="notifyValid()" />
|
|
5788
|
+
}
|
|
5789
|
+
@if (limit(); as max) {
|
|
5790
|
+
<ui-textarea-input
|
|
5791
|
+
label="Message"
|
|
5792
|
+
[required]="true"
|
|
5793
|
+
placeholder="Write your message..."
|
|
5794
|
+
[rows]="8"
|
|
5795
|
+
[maxlength]="max"
|
|
5796
|
+
[(ngModel)]="body"
|
|
5797
|
+
(ngModelChange)="notifyValid()" />
|
|
5798
|
+
} @else {
|
|
5799
|
+
<ui-textarea-input
|
|
5800
|
+
label="Message"
|
|
5801
|
+
[required]="true"
|
|
5802
|
+
placeholder="Write your message..."
|
|
5803
|
+
[rows]="8"
|
|
5804
|
+
[(ngModel)]="body"
|
|
5805
|
+
(ngModelChange)="notifyValid()" />
|
|
5806
|
+
}
|
|
5807
|
+
`,
|
|
5808
|
+
styles: [":host{display:flex;flex-direction:column;gap:14px}.sm-group-label{display:block;font-size:.8125rem;font-weight:600;color:#334155;margin-bottom:6px}.sm-to-card{border:1px solid #e2e8f0;border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:3px}.sm-to-name{font-size:.9375rem;font-weight:600;color:#1e293b;min-width:0;overflow-wrap:anywhere}\n"]
|
|
5809
|
+
}]
|
|
5810
|
+
}],
|
|
5811
|
+
propDecorators: {
|
|
5812
|
+
contactName: [{
|
|
5813
|
+
type: i0.Input,
|
|
5814
|
+
args: [{
|
|
5815
|
+
isSignal: true,
|
|
5816
|
+
alias: "contactName",
|
|
5817
|
+
required: false
|
|
5818
|
+
}]
|
|
5819
|
+
}],
|
|
5820
|
+
contactId: [{
|
|
5821
|
+
type: i0.Input,
|
|
5822
|
+
args: [{
|
|
5823
|
+
isSignal: true,
|
|
5824
|
+
alias: "contactId",
|
|
5825
|
+
required: false
|
|
5826
|
+
}]
|
|
5827
|
+
}],
|
|
5828
|
+
defaultSubject: [{
|
|
5829
|
+
type: i0.Input,
|
|
5830
|
+
args: [{
|
|
5831
|
+
isSignal: true,
|
|
5832
|
+
alias: "defaultSubject",
|
|
5833
|
+
required: false
|
|
5834
|
+
}]
|
|
5835
|
+
}],
|
|
5836
|
+
defaultBody: [{
|
|
5837
|
+
type: i0.Input,
|
|
5838
|
+
args: [{
|
|
5839
|
+
isSignal: true,
|
|
5840
|
+
alias: "defaultBody",
|
|
5841
|
+
required: false
|
|
5842
|
+
}]
|
|
5843
|
+
}],
|
|
5844
|
+
showSubject: [{
|
|
5845
|
+
type: i0.Input,
|
|
5846
|
+
args: [{
|
|
5847
|
+
isSignal: true,
|
|
5848
|
+
alias: "showSubject",
|
|
5849
|
+
required: false
|
|
5850
|
+
}]
|
|
5851
|
+
}],
|
|
5852
|
+
maxLength: [{
|
|
5853
|
+
type: i0.Input,
|
|
5854
|
+
args: [{
|
|
5855
|
+
isSignal: true,
|
|
5856
|
+
alias: "maxLength",
|
|
5857
|
+
required: false
|
|
5858
|
+
}]
|
|
5859
|
+
}],
|
|
5860
|
+
sendFn: [{
|
|
5861
|
+
type: i0.Input,
|
|
5862
|
+
args: [{
|
|
5863
|
+
isSignal: true,
|
|
5864
|
+
alias: "sendFn",
|
|
5865
|
+
required: false
|
|
5866
|
+
}]
|
|
5867
|
+
}],
|
|
5868
|
+
sent: [{
|
|
5869
|
+
type: i0.Output,
|
|
5870
|
+
args: ["sent"]
|
|
5871
|
+
}],
|
|
5872
|
+
validChange: [{
|
|
5873
|
+
type: i0.Output,
|
|
5874
|
+
args: ["validChange"]
|
|
5875
|
+
}]
|
|
5876
|
+
}
|
|
5877
|
+
});
|
|
5432
5878
|
const MAX_SMS_LENGTH = 320;
|
|
5433
5879
|
const PHONE_RE = /^\+?[\d\s\-().]{7,}$/;
|
|
5434
5880
|
function formatPhone(raw) {
|
|
@@ -5466,6 +5912,8 @@ var SendTextComponent = class SendTextComponent {
|
|
|
5466
5912
|
this.documentSentMessage = input(null, ...ngDevMode ? [{ debugName: "documentSentMessage" }] : /* istanbul ignore next */ []);
|
|
5467
5913
|
this.documents = input(false, ...ngDevMode ? [{ debugName: "documents" }] : /* istanbul ignore next */ []);
|
|
5468
5914
|
this.attachmentsAndScheduling = input(true, ...ngDevMode ? [{ debugName: "attachmentsAndScheduling" }] : /* istanbul ignore next */ []);
|
|
5915
|
+
this.showTemplates = input(true, ...ngDevMode ? [{ debugName: "showTemplates" }] : /* istanbul ignore next */ []);
|
|
5916
|
+
this.showVideo = input(true, ...ngDevMode ? [{ debugName: "showVideo" }] : /* istanbul ignore next */ []);
|
|
5469
5917
|
this.documentPurposes = input([
|
|
5470
5918
|
"ESIGN",
|
|
5471
5919
|
"ATTACH",
|
|
@@ -5945,6 +6393,20 @@ var SendTextComponent = class SendTextComponent {
|
|
|
5945
6393
|
isRequired: false,
|
|
5946
6394
|
transformFunction: null
|
|
5947
6395
|
},
|
|
6396
|
+
showTemplates: {
|
|
6397
|
+
classPropertyName: "showTemplates",
|
|
6398
|
+
publicName: "showTemplates",
|
|
6399
|
+
isSignal: true,
|
|
6400
|
+
isRequired: false,
|
|
6401
|
+
transformFunction: null
|
|
6402
|
+
},
|
|
6403
|
+
showVideo: {
|
|
6404
|
+
classPropertyName: "showVideo",
|
|
6405
|
+
publicName: "showVideo",
|
|
6406
|
+
isSignal: true,
|
|
6407
|
+
isRequired: false,
|
|
6408
|
+
transformFunction: null
|
|
6409
|
+
},
|
|
5948
6410
|
documentPurposes: {
|
|
5949
6411
|
classPropertyName: "documentPurposes",
|
|
5950
6412
|
publicName: "documentPurposes",
|
|
@@ -6051,10 +6513,12 @@ var SendTextComponent = class SendTextComponent {
|
|
|
6051
6513
|
</div>
|
|
6052
6514
|
</div>
|
|
6053
6515
|
|
|
6054
|
-
<!-- Mode -->
|
|
6516
|
+
<!-- Mode (hidden with [showTemplates]="false": the form is Create Message only) -->
|
|
6517
|
+
@if (showTemplates()) {
|
|
6055
6518
|
<div class="sm-mode-row">
|
|
6056
6519
|
<ui-pill-tabs [tabs]="modeTabs" [activeKey]="mode" (tabChange)="setMode($event)" />
|
|
6057
6520
|
</div>
|
|
6521
|
+
}
|
|
6058
6522
|
|
|
6059
6523
|
@if (mode === 'compose') {
|
|
6060
6524
|
<div class="sm-field">
|
|
@@ -6198,7 +6662,7 @@ var SendTextComponent = class SendTextComponent {
|
|
|
6198
6662
|
}
|
|
6199
6663
|
|
|
6200
6664
|
<!-- Video: the LAST section. The picker, and once a video is attached its settings, Watch Preview and Remove Video. -->
|
|
6201
|
-
@if (mode === 'compose') {
|
|
6665
|
+
@if (mode === 'compose' && showVideo()) {
|
|
6202
6666
|
<ui-form-section label="Video" [divider]="true">
|
|
6203
6667
|
@for (k of [videoPickerKey]; track k) {
|
|
6204
6668
|
<ui-video-picker (videoSelected)="onVideoSelected($event)" />
|
|
@@ -6533,7 +6997,8 @@ var SendTextComponent = class SendTextComponent {
|
|
|
6533
6997
|
"dismissAriaLabel",
|
|
6534
6998
|
"quiet",
|
|
6535
6999
|
"compact",
|
|
6536
|
-
"inline"
|
|
7000
|
+
"inline",
|
|
7001
|
+
"fill"
|
|
6537
7002
|
],
|
|
6538
7003
|
outputs: ["dismissed"]
|
|
6539
7004
|
}
|
|
@@ -6597,10 +7062,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6597
7062
|
</div>
|
|
6598
7063
|
</div>
|
|
6599
7064
|
|
|
6600
|
-
<!-- Mode -->
|
|
7065
|
+
<!-- Mode (hidden with [showTemplates]="false": the form is Create Message only) -->
|
|
7066
|
+
@if (showTemplates()) {
|
|
6601
7067
|
<div class="sm-mode-row">
|
|
6602
7068
|
<ui-pill-tabs [tabs]="modeTabs" [activeKey]="mode" (tabChange)="setMode($event)" />
|
|
6603
7069
|
</div>
|
|
7070
|
+
}
|
|
6604
7071
|
|
|
6605
7072
|
@if (mode === 'compose') {
|
|
6606
7073
|
<div class="sm-field">
|
|
@@ -6744,7 +7211,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6744
7211
|
}
|
|
6745
7212
|
|
|
6746
7213
|
<!-- Video: the LAST section. The picker, and once a video is attached its settings, Watch Preview and Remove Video. -->
|
|
6747
|
-
@if (mode === 'compose') {
|
|
7214
|
+
@if (mode === 'compose' && showVideo()) {
|
|
6748
7215
|
<ui-form-section label="Video" [divider]="true">
|
|
6749
7216
|
@for (k of [videoPickerKey]; track k) {
|
|
6750
7217
|
<ui-video-picker (videoSelected)="onVideoSelected($event)" />
|
|
@@ -6888,6 +7355,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6888
7355
|
required: false
|
|
6889
7356
|
}]
|
|
6890
7357
|
}],
|
|
7358
|
+
showTemplates: [{
|
|
7359
|
+
type: i0.Input,
|
|
7360
|
+
args: [{
|
|
7361
|
+
isSignal: true,
|
|
7362
|
+
alias: "showTemplates",
|
|
7363
|
+
required: false
|
|
7364
|
+
}]
|
|
7365
|
+
}],
|
|
7366
|
+
showVideo: [{
|
|
7367
|
+
type: i0.Input,
|
|
7368
|
+
args: [{
|
|
7369
|
+
isSignal: true,
|
|
7370
|
+
alias: "showVideo",
|
|
7371
|
+
required: false
|
|
7372
|
+
}]
|
|
7373
|
+
}],
|
|
6891
7374
|
documentPurposes: [{
|
|
6892
7375
|
type: i0.Input,
|
|
6893
7376
|
args: [{
|
|
@@ -7021,6 +7504,13 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7021
7504
|
this.documents = input(false, ...ngDevMode ? [{ debugName: "documents" }] : /* istanbul ignore next */ []);
|
|
7022
7505
|
this.documentsEnabled = input(true, ...ngDevMode ? [{ debugName: "documentsEnabled" }] : /* istanbul ignore next */ []);
|
|
7023
7506
|
this.showCc = input(false, ...ngDevMode ? [{ debugName: "showCc" }] : /* istanbul ignore next */ []);
|
|
7507
|
+
this.recipientMode = input("contact", ...ngDevMode ? [{ debugName: "recipientMode" }] : /* istanbul ignore next */ []);
|
|
7508
|
+
this.sendMessage = input(null, ...ngDevMode ? [{ debugName: "sendMessage" }] : /* istanbul ignore next */ []);
|
|
7509
|
+
this.maxBodyLength = input(null, ...ngDevMode ? [{ debugName: "maxBodyLength" }] : /* istanbul ignore next */ []);
|
|
7510
|
+
this.showSubject = input(true, ...ngDevMode ? [{ debugName: "showSubject" }] : /* istanbul ignore next */ []);
|
|
7511
|
+
this.showTemplates = input(true, ...ngDevMode ? [{ debugName: "showTemplates" }] : /* istanbul ignore next */ []);
|
|
7512
|
+
this.showVideo = input(true, ...ngDevMode ? [{ debugName: "showVideo" }] : /* istanbul ignore next */ []);
|
|
7513
|
+
this.inApp = computed(() => this.recipientMode() === "in-app", ...ngDevMode ? [{ debugName: "inApp" }] : /* istanbul ignore next */ []);
|
|
7024
7514
|
this.attachmentsAndScheduling = input(true, ...ngDevMode ? [{ debugName: "attachmentsAndScheduling" }] : /* istanbul ignore next */ []);
|
|
7025
7515
|
this.documentPurposes = input([
|
|
7026
7516
|
"ESIGN",
|
|
@@ -7055,6 +7545,7 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7055
7545
|
this.phoneAdded = output();
|
|
7056
7546
|
this.sendEmailRef = viewChild("sendEmailRef", ...ngDevMode ? [{ debugName: "sendEmailRef" }] : /* istanbul ignore next */ []);
|
|
7057
7547
|
this.sendTextRef = viewChild("sendTextRef", ...ngDevMode ? [{ debugName: "sendTextRef" }] : /* istanbul ignore next */ []);
|
|
7548
|
+
this.sendInAppRef = viewChild("sendInAppRef", ...ngDevMode ? [{ debugName: "sendInAppRef" }] : /* istanbul ignore next */ []);
|
|
7058
7549
|
this.destroyRef = inject(DestroyRef);
|
|
7059
7550
|
this.jobSearch$ = new Subject();
|
|
7060
7551
|
this.jobOptions = signal([], ...ngDevMode ? [{ debugName: "jobOptions" }] : /* istanbul ignore next */ []);
|
|
@@ -7070,7 +7561,7 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7070
7561
|
this.activeContact = signal(null, ...ngDevMode ? [{ debugName: "activeContact" }] : /* istanbul ignore next */ []);
|
|
7071
7562
|
this.contactNotices = computed(() => {
|
|
7072
7563
|
const c = this.activeContact();
|
|
7073
|
-
if (!c) return [];
|
|
7564
|
+
if (!c || this.inApp()) return [];
|
|
7074
7565
|
const notices = [];
|
|
7075
7566
|
const hasEmail = !!c.email, hasPhone = !!c.phone;
|
|
7076
7567
|
if (!this.textEnabled()) notices.push("Text messaging is not enabled. Connect Twilio in Comm Settings to send texts.");
|
|
@@ -7148,7 +7639,8 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7148
7639
|
this.phoneAdded.emit(phone);
|
|
7149
7640
|
}
|
|
7150
7641
|
submit() {
|
|
7151
|
-
if (this.
|
|
7642
|
+
if (this.inApp()) this.sendInAppRef()?.submit();
|
|
7643
|
+
else if (this.channel() === "email") this.sendEmailRef()?.submit();
|
|
7152
7644
|
else this.sendTextRef()?.submit();
|
|
7153
7645
|
}
|
|
7154
7646
|
onSent() {
|
|
@@ -7295,6 +7787,48 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7295
7787
|
isRequired: false,
|
|
7296
7788
|
transformFunction: null
|
|
7297
7789
|
},
|
|
7790
|
+
recipientMode: {
|
|
7791
|
+
classPropertyName: "recipientMode",
|
|
7792
|
+
publicName: "recipientMode",
|
|
7793
|
+
isSignal: true,
|
|
7794
|
+
isRequired: false,
|
|
7795
|
+
transformFunction: null
|
|
7796
|
+
},
|
|
7797
|
+
sendMessage: {
|
|
7798
|
+
classPropertyName: "sendMessage",
|
|
7799
|
+
publicName: "sendMessage",
|
|
7800
|
+
isSignal: true,
|
|
7801
|
+
isRequired: false,
|
|
7802
|
+
transformFunction: null
|
|
7803
|
+
},
|
|
7804
|
+
maxBodyLength: {
|
|
7805
|
+
classPropertyName: "maxBodyLength",
|
|
7806
|
+
publicName: "maxBodyLength",
|
|
7807
|
+
isSignal: true,
|
|
7808
|
+
isRequired: false,
|
|
7809
|
+
transformFunction: null
|
|
7810
|
+
},
|
|
7811
|
+
showSubject: {
|
|
7812
|
+
classPropertyName: "showSubject",
|
|
7813
|
+
publicName: "showSubject",
|
|
7814
|
+
isSignal: true,
|
|
7815
|
+
isRequired: false,
|
|
7816
|
+
transformFunction: null
|
|
7817
|
+
},
|
|
7818
|
+
showTemplates: {
|
|
7819
|
+
classPropertyName: "showTemplates",
|
|
7820
|
+
publicName: "showTemplates",
|
|
7821
|
+
isSignal: true,
|
|
7822
|
+
isRequired: false,
|
|
7823
|
+
transformFunction: null
|
|
7824
|
+
},
|
|
7825
|
+
showVideo: {
|
|
7826
|
+
classPropertyName: "showVideo",
|
|
7827
|
+
publicName: "showVideo",
|
|
7828
|
+
isSignal: true,
|
|
7829
|
+
isRequired: false,
|
|
7830
|
+
transformFunction: null
|
|
7831
|
+
},
|
|
7298
7832
|
attachmentsAndScheduling: {
|
|
7299
7833
|
classPropertyName: "attachmentsAndScheduling",
|
|
7300
7834
|
publicName: "attachmentsAndScheduling",
|
|
@@ -7445,19 +7979,29 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7445
7979
|
mapFieldsClick: "mapFieldsClick",
|
|
7446
7980
|
phoneAdded: "phoneAdded"
|
|
7447
7981
|
},
|
|
7448
|
-
viewQueries: [
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7982
|
+
viewQueries: [
|
|
7983
|
+
{
|
|
7984
|
+
propertyName: "sendEmailRef",
|
|
7985
|
+
first: true,
|
|
7986
|
+
predicate: ["sendEmailRef"],
|
|
7987
|
+
descendants: true,
|
|
7988
|
+
isSignal: true
|
|
7989
|
+
},
|
|
7990
|
+
{
|
|
7991
|
+
propertyName: "sendTextRef",
|
|
7992
|
+
first: true,
|
|
7993
|
+
predicate: ["sendTextRef"],
|
|
7994
|
+
descendants: true,
|
|
7995
|
+
isSignal: true
|
|
7996
|
+
},
|
|
7997
|
+
{
|
|
7998
|
+
propertyName: "sendInAppRef",
|
|
7999
|
+
first: true,
|
|
8000
|
+
predicate: ["sendInAppRef"],
|
|
8001
|
+
descendants: true,
|
|
8002
|
+
isSignal: true
|
|
8003
|
+
}
|
|
8004
|
+
],
|
|
7461
8005
|
ngImport: i0,
|
|
7462
8006
|
template: `
|
|
7463
8007
|
<ui-side-panel
|
|
@@ -7465,7 +8009,7 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7465
8009
|
[title]="title()"
|
|
7466
8010
|
[wide]="wide()"
|
|
7467
8011
|
cancelLabel="Cancel"
|
|
7468
|
-
[primaryLabel]="!loading() && activeContact() ? (sendLabel() || (channel() === 'email' ? 'Send Email' : 'Send Text')) : ''"
|
|
8012
|
+
[primaryLabel]="!loading() && activeContact() ? (sendLabel() || (inApp() ? 'Send Message' : channel() === 'email' ? 'Send Email' : 'Send Text')) : ''"
|
|
7469
8013
|
primaryVariant="warning"
|
|
7470
8014
|
[primaryDisabled]="!valid()"
|
|
7471
8015
|
(closed)="onClose()"
|
|
@@ -7479,7 +8023,7 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7479
8023
|
</div>
|
|
7480
8024
|
}
|
|
7481
8025
|
|
|
7482
|
-
@if (!loading() && !activeContact()) {
|
|
8026
|
+
@if (!loading() && !activeContact() && !inApp()) {
|
|
7483
8027
|
<div class="msg-step">
|
|
7484
8028
|
<span class="msg-step-badge">1</span>
|
|
7485
8029
|
<span class="msg-step-text">Who would you like to message?</span>
|
|
@@ -7490,7 +8034,7 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7490
8034
|
}
|
|
7491
8035
|
|
|
7492
8036
|
@if (!loading() && activeContact()) {
|
|
7493
|
-
@if (textEnabled() && activeContact()?.smsOptedIn) {
|
|
8037
|
+
@if (!inApp() && textEnabled() && activeContact()?.smsOptedIn) {
|
|
7494
8038
|
<div class="msg-channel-row">
|
|
7495
8039
|
<label class="form-label msg-via-label">Send via</label>
|
|
7496
8040
|
<div class="msg-via-tabs">
|
|
@@ -7528,7 +8072,19 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7528
8072
|
|
|
7529
8073
|
<!-- Keyed on formEpoch: a fresh open or another contact gets brand-new forms (no stale draft / template). -->
|
|
7530
8074
|
@for (epoch of [formEpoch()]; track epoch) {
|
|
7531
|
-
@if (
|
|
8075
|
+
@if (inApp()) {
|
|
8076
|
+
<ui-send-in-app
|
|
8077
|
+
#sendInAppRef
|
|
8078
|
+
[contactName]="activeContact()!.name"
|
|
8079
|
+
[contactId]="activeContact()!.id"
|
|
8080
|
+
[defaultSubject]="defaultSubject()"
|
|
8081
|
+
[defaultBody]="defaultBody()"
|
|
8082
|
+
[showSubject]="showSubject()"
|
|
8083
|
+
[maxLength]="maxBodyLength()"
|
|
8084
|
+
[sendFn]="sendMessage()"
|
|
8085
|
+
(sent)="onSent()"
|
|
8086
|
+
(validChange)="valid.set($event)" />
|
|
8087
|
+
} @else if (channel() === 'email') {
|
|
7532
8088
|
<ui-send-email
|
|
7533
8089
|
#sendEmailRef
|
|
7534
8090
|
[contactName]="activeContact()!.name"
|
|
@@ -7560,6 +8116,9 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7560
8116
|
[videoDefaults]="videoDefaults()"
|
|
7561
8117
|
[showCc]="showCc()"
|
|
7562
8118
|
[attachmentsAndScheduling]="attachmentsAndScheduling()"
|
|
8119
|
+
[showSubject]="showSubject()"
|
|
8120
|
+
[showTemplates]="showTemplates()"
|
|
8121
|
+
[showVideo]="showVideo()"
|
|
7563
8122
|
(sent)="onSent()"
|
|
7564
8123
|
(emailAdded)="onEmailAdded($event)"
|
|
7565
8124
|
(validChange)="valid.set($event)" />
|
|
@@ -7587,6 +8146,8 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7587
8146
|
(rejected)="rejected.emit()"
|
|
7588
8147
|
[documentPreview]="documentPreview()"
|
|
7589
8148
|
[videoDefaults]="videoDefaults()"
|
|
8149
|
+
[showTemplates]="showTemplates()"
|
|
8150
|
+
[showVideo]="showVideo()"
|
|
7590
8151
|
(sent)="onSent()"
|
|
7591
8152
|
(phoneAdded)="onPhoneAdded($event)"
|
|
7592
8153
|
(validChange)="valid.set($event)" />
|
|
@@ -7663,7 +8224,10 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7663
8224
|
"docuSignConnected",
|
|
7664
8225
|
"documentPreview",
|
|
7665
8226
|
"videoDefaults",
|
|
7666
|
-
"attachmentsAndScheduling"
|
|
8227
|
+
"attachmentsAndScheduling",
|
|
8228
|
+
"showSubject",
|
|
8229
|
+
"showTemplates",
|
|
8230
|
+
"showVideo"
|
|
7667
8231
|
],
|
|
7668
8232
|
outputs: [
|
|
7669
8233
|
"sent",
|
|
@@ -7673,6 +8237,21 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7673
8237
|
"mapFieldsClick"
|
|
7674
8238
|
]
|
|
7675
8239
|
},
|
|
8240
|
+
{
|
|
8241
|
+
kind: "component",
|
|
8242
|
+
type: SendInAppComponent,
|
|
8243
|
+
selector: "ui-send-in-app",
|
|
8244
|
+
inputs: [
|
|
8245
|
+
"contactName",
|
|
8246
|
+
"contactId",
|
|
8247
|
+
"defaultSubject",
|
|
8248
|
+
"defaultBody",
|
|
8249
|
+
"showSubject",
|
|
8250
|
+
"maxLength",
|
|
8251
|
+
"sendFn"
|
|
8252
|
+
],
|
|
8253
|
+
outputs: ["sent", "validChange"]
|
|
8254
|
+
},
|
|
7676
8255
|
{
|
|
7677
8256
|
kind: "component",
|
|
7678
8257
|
type: SendTextComponent,
|
|
@@ -7688,6 +8267,8 @@ var SendMessagePanelComponent = class SendMessagePanelComponent {
|
|
|
7688
8267
|
"documentSentMessage",
|
|
7689
8268
|
"documents",
|
|
7690
8269
|
"attachmentsAndScheduling",
|
|
8270
|
+
"showTemplates",
|
|
8271
|
+
"showVideo",
|
|
7691
8272
|
"documentPurposes",
|
|
7692
8273
|
"initialDocuments",
|
|
7693
8274
|
"documentSigners",
|
|
@@ -7779,6 +8360,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7779
8360
|
SidePanelComponent,
|
|
7780
8361
|
ToggleBadgeComponent,
|
|
7781
8362
|
SendEmailComponent,
|
|
8363
|
+
SendInAppComponent,
|
|
7782
8364
|
SendTextComponent,
|
|
7783
8365
|
ContactPickerComponent,
|
|
7784
8366
|
ComboboxComponent
|
|
@@ -7789,7 +8371,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7789
8371
|
[title]="title()"
|
|
7790
8372
|
[wide]="wide()"
|
|
7791
8373
|
cancelLabel="Cancel"
|
|
7792
|
-
[primaryLabel]="!loading() && activeContact() ? (sendLabel() || (channel() === 'email' ? 'Send Email' : 'Send Text')) : ''"
|
|
8374
|
+
[primaryLabel]="!loading() && activeContact() ? (sendLabel() || (inApp() ? 'Send Message' : channel() === 'email' ? 'Send Email' : 'Send Text')) : ''"
|
|
7793
8375
|
primaryVariant="warning"
|
|
7794
8376
|
[primaryDisabled]="!valid()"
|
|
7795
8377
|
(closed)="onClose()"
|
|
@@ -7803,7 +8385,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7803
8385
|
</div>
|
|
7804
8386
|
}
|
|
7805
8387
|
|
|
7806
|
-
@if (!loading() && !activeContact()) {
|
|
8388
|
+
@if (!loading() && !activeContact() && !inApp()) {
|
|
7807
8389
|
<div class="msg-step">
|
|
7808
8390
|
<span class="msg-step-badge">1</span>
|
|
7809
8391
|
<span class="msg-step-text">Who would you like to message?</span>
|
|
@@ -7814,7 +8396,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7814
8396
|
}
|
|
7815
8397
|
|
|
7816
8398
|
@if (!loading() && activeContact()) {
|
|
7817
|
-
@if (textEnabled() && activeContact()?.smsOptedIn) {
|
|
8399
|
+
@if (!inApp() && textEnabled() && activeContact()?.smsOptedIn) {
|
|
7818
8400
|
<div class="msg-channel-row">
|
|
7819
8401
|
<label class="form-label msg-via-label">Send via</label>
|
|
7820
8402
|
<div class="msg-via-tabs">
|
|
@@ -7852,7 +8434,19 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7852
8434
|
|
|
7853
8435
|
<!-- Keyed on formEpoch: a fresh open or another contact gets brand-new forms (no stale draft / template). -->
|
|
7854
8436
|
@for (epoch of [formEpoch()]; track epoch) {
|
|
7855
|
-
@if (
|
|
8437
|
+
@if (inApp()) {
|
|
8438
|
+
<ui-send-in-app
|
|
8439
|
+
#sendInAppRef
|
|
8440
|
+
[contactName]="activeContact()!.name"
|
|
8441
|
+
[contactId]="activeContact()!.id"
|
|
8442
|
+
[defaultSubject]="defaultSubject()"
|
|
8443
|
+
[defaultBody]="defaultBody()"
|
|
8444
|
+
[showSubject]="showSubject()"
|
|
8445
|
+
[maxLength]="maxBodyLength()"
|
|
8446
|
+
[sendFn]="sendMessage()"
|
|
8447
|
+
(sent)="onSent()"
|
|
8448
|
+
(validChange)="valid.set($event)" />
|
|
8449
|
+
} @else if (channel() === 'email') {
|
|
7856
8450
|
<ui-send-email
|
|
7857
8451
|
#sendEmailRef
|
|
7858
8452
|
[contactName]="activeContact()!.name"
|
|
@@ -7884,6 +8478,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7884
8478
|
[videoDefaults]="videoDefaults()"
|
|
7885
8479
|
[showCc]="showCc()"
|
|
7886
8480
|
[attachmentsAndScheduling]="attachmentsAndScheduling()"
|
|
8481
|
+
[showSubject]="showSubject()"
|
|
8482
|
+
[showTemplates]="showTemplates()"
|
|
8483
|
+
[showVideo]="showVideo()"
|
|
7887
8484
|
(sent)="onSent()"
|
|
7888
8485
|
(emailAdded)="onEmailAdded($event)"
|
|
7889
8486
|
(validChange)="valid.set($event)" />
|
|
@@ -7911,6 +8508,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7911
8508
|
(rejected)="rejected.emit()"
|
|
7912
8509
|
[documentPreview]="documentPreview()"
|
|
7913
8510
|
[videoDefaults]="videoDefaults()"
|
|
8511
|
+
[showTemplates]="showTemplates()"
|
|
8512
|
+
[showVideo]="showVideo()"
|
|
7914
8513
|
(sent)="onSent()"
|
|
7915
8514
|
(phoneAdded)="onPhoneAdded($event)"
|
|
7916
8515
|
(validChange)="valid.set($event)" />
|
|
@@ -8061,6 +8660,54 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8061
8660
|
required: false
|
|
8062
8661
|
}]
|
|
8063
8662
|
}],
|
|
8663
|
+
recipientMode: [{
|
|
8664
|
+
type: i0.Input,
|
|
8665
|
+
args: [{
|
|
8666
|
+
isSignal: true,
|
|
8667
|
+
alias: "recipientMode",
|
|
8668
|
+
required: false
|
|
8669
|
+
}]
|
|
8670
|
+
}],
|
|
8671
|
+
sendMessage: [{
|
|
8672
|
+
type: i0.Input,
|
|
8673
|
+
args: [{
|
|
8674
|
+
isSignal: true,
|
|
8675
|
+
alias: "sendMessage",
|
|
8676
|
+
required: false
|
|
8677
|
+
}]
|
|
8678
|
+
}],
|
|
8679
|
+
maxBodyLength: [{
|
|
8680
|
+
type: i0.Input,
|
|
8681
|
+
args: [{
|
|
8682
|
+
isSignal: true,
|
|
8683
|
+
alias: "maxBodyLength",
|
|
8684
|
+
required: false
|
|
8685
|
+
}]
|
|
8686
|
+
}],
|
|
8687
|
+
showSubject: [{
|
|
8688
|
+
type: i0.Input,
|
|
8689
|
+
args: [{
|
|
8690
|
+
isSignal: true,
|
|
8691
|
+
alias: "showSubject",
|
|
8692
|
+
required: false
|
|
8693
|
+
}]
|
|
8694
|
+
}],
|
|
8695
|
+
showTemplates: [{
|
|
8696
|
+
type: i0.Input,
|
|
8697
|
+
args: [{
|
|
8698
|
+
isSignal: true,
|
|
8699
|
+
alias: "showTemplates",
|
|
8700
|
+
required: false
|
|
8701
|
+
}]
|
|
8702
|
+
}],
|
|
8703
|
+
showVideo: [{
|
|
8704
|
+
type: i0.Input,
|
|
8705
|
+
args: [{
|
|
8706
|
+
isSignal: true,
|
|
8707
|
+
alias: "showVideo",
|
|
8708
|
+
required: false
|
|
8709
|
+
}]
|
|
8710
|
+
}],
|
|
8064
8711
|
attachmentsAndScheduling: [{
|
|
8065
8712
|
type: i0.Input,
|
|
8066
8713
|
args: [{
|
|
@@ -8256,6 +8903,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8256
8903
|
sendTextRef: [{
|
|
8257
8904
|
type: i0.ViewChild,
|
|
8258
8905
|
args: ["sendTextRef", { isSignal: true }]
|
|
8906
|
+
}],
|
|
8907
|
+
sendInAppRef: [{
|
|
8908
|
+
type: i0.ViewChild,
|
|
8909
|
+
args: ["sendInAppRef", { isSignal: true }]
|
|
8259
8910
|
}]
|
|
8260
8911
|
}
|
|
8261
8912
|
});
|