@adlfe/campaign-management-library 2.13.2 → 2.14.2
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/bundles/adlfe-campaign-management-library.umd.js +70 -67
- package/bundles/adlfe-campaign-management-library.umd.js.map +1 -1
- package/bundles/adlfe-campaign-management-library.umd.min.js +1 -1
- package/bundles/adlfe-campaign-management-library.umd.min.js.map +1 -1
- package/esm2015/lib/campaign-management/models/general-information-wa-req.model.js +27 -30
- package/esm2015/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.js +40 -32
- package/esm2015/lib/campaign-management/modules/new-campaign/general-information/general-information.component.js +1 -2
- package/esm2015/lib/campaign-management/modules/new-campaign/new-number-bases/new-number-bases.component.js +6 -7
- package/esm5/lib/campaign-management/models/general-information-wa-req.model.js +27 -30
- package/esm5/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.js +40 -32
- package/esm5/lib/campaign-management/modules/new-campaign/general-information/general-information.component.js +1 -2
- package/esm5/lib/campaign-management/modules/new-campaign/new-number-bases/new-number-bases.component.js +6 -7
- package/fesm2015/adlfe-campaign-management-library.js +70 -67
- package/fesm2015/adlfe-campaign-management-library.js.map +1 -1
- package/fesm5/adlfe-campaign-management-library.js +70 -67
- package/fesm5/adlfe-campaign-management-library.js.map +1 -1
- package/lib/campaign-management/models/general-information-wa-req.model.d.ts +0 -5
- package/package.json +1 -1
|
@@ -2507,7 +2507,7 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2507
2507
|
function GeneralInformationWAReqModel() {
|
|
2508
2508
|
}
|
|
2509
2509
|
GeneralInformationWAReqModel.prototype.clone = function (source) {
|
|
2510
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
2510
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
2511
2511
|
if (((_a = source) === null || _a === void 0 ? void 0 : _a.media) === 'IMAGE' ||
|
|
2512
2512
|
((_b = source) === null || _b === void 0 ? void 0 : _b.media) === 'VIDEO' ||
|
|
2513
2513
|
((_c = source) === null || _c === void 0 ? void 0 : _c.media) === 'DOCUMENT') {
|
|
@@ -2544,34 +2544,33 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2544
2544
|
fileName: source.fileName,
|
|
2545
2545
|
};
|
|
2546
2546
|
}
|
|
2547
|
-
if (source.buttonParams && Array.isArray(source.buttonParams)) {
|
|
2548
|
-
this.buttonParams = source.buttonParams.map(function (btn) { return ({
|
|
2549
|
-
label: btn.label,
|
|
2550
|
-
payload: btn.payload ? btn.payload : btn.label,
|
|
2551
|
-
}); });
|
|
2552
|
-
}
|
|
2553
2547
|
if (source.template) {
|
|
2548
|
+
var qrIndex_1 = 0;
|
|
2549
|
+
var finalButtons = (_g = (_f = source.template.buttons) === null || _f === void 0 ? void 0 : _f.map(function (btnDef, idx) {
|
|
2550
|
+
var _a, _b, _c;
|
|
2551
|
+
if (btnDef.type === 'QUICK_REPLY') {
|
|
2552
|
+
var qrParam = source.buttonParams && source.buttonParams[qrIndex_1]
|
|
2553
|
+
? source.buttonParams[qrIndex_1]
|
|
2554
|
+
: null;
|
|
2555
|
+
qrIndex_1++;
|
|
2556
|
+
return qrParam ? [qrParam.payload ? qrParam.payload : qrParam.label] : [];
|
|
2557
|
+
}
|
|
2558
|
+
else {
|
|
2559
|
+
var otherParam = source.paramButton && source.paramButton[idx]
|
|
2560
|
+
? source.paramButton[idx]
|
|
2561
|
+
: null;
|
|
2562
|
+
return _c = (_b = (_a = otherParam) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.map(function (t) { return t.name; }), (_c !== null && _c !== void 0 ? _c : []);
|
|
2563
|
+
}
|
|
2564
|
+
}), (_g !== null && _g !== void 0 ? _g : []));
|
|
2554
2565
|
this.template = {
|
|
2555
2566
|
id: source.template.ID,
|
|
2556
2567
|
name: source.template.name,
|
|
2557
2568
|
lang: source.template.lang,
|
|
2558
2569
|
headerUrl: source.targetURL,
|
|
2559
|
-
header: (
|
|
2560
|
-
data: ((
|
|
2561
|
-
: (
|
|
2562
|
-
button:
|
|
2563
|
-
var _a;
|
|
2564
|
-
result.push((_a = each.name.map(function (t) { return t.name; }), (_a !== null && _a !== void 0 ? _a : [])));
|
|
2565
|
-
return result;
|
|
2566
|
-
}, []),
|
|
2567
|
-
buttonParams: source.buttonParams
|
|
2568
|
-
? source.buttonParams.map(function (btn) {
|
|
2569
|
-
return {
|
|
2570
|
-
label: btn.label,
|
|
2571
|
-
payload: btn.payload ? btn.payload : btn.label,
|
|
2572
|
-
};
|
|
2573
|
-
})
|
|
2574
|
-
: [],
|
|
2570
|
+
header: (_j = (_h = source.paramHeader) === null || _h === void 0 ? void 0 : _h.map(function (t) { return t.name; }), (_j !== null && _j !== void 0 ? _j : [])),
|
|
2571
|
+
data: ((_k = source.variables) === null || _k === void 0 ? void 0 : _k.length) ? source.variables.map(function (v) { return v.paramName; })
|
|
2572
|
+
: (_m = (_l = source.paramBody) === null || _l === void 0 ? void 0 : _l.map(function (t) { return t.name; }), (_m !== null && _m !== void 0 ? _m : [])),
|
|
2573
|
+
button: finalButtons,
|
|
2575
2574
|
};
|
|
2576
2575
|
if (source.template.category === 'AUTHENTICATION')
|
|
2577
2576
|
this.template = {
|
|
@@ -2580,7 +2579,6 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2580
2579
|
header: null,
|
|
2581
2580
|
data: [source.otpValue],
|
|
2582
2581
|
button: [[source.otpValue]],
|
|
2583
|
-
buttonParams: [],
|
|
2584
2582
|
};
|
|
2585
2583
|
if (source.template.ID)
|
|
2586
2584
|
this.template.id = source.template.ID;
|
|
@@ -2588,9 +2586,9 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2588
2586
|
if (this.type === 'utility') {
|
|
2589
2587
|
this.type = 'template';
|
|
2590
2588
|
this.category = 'utility';
|
|
2591
|
-
var mappedVariables = ((
|
|
2589
|
+
var mappedVariables = ((_p = (_o = source) === null || _o === void 0 ? void 0 : _o.variables) === null || _p === void 0 ? void 0 : _p.length) ? source.variables.map(function (v) { return v.paramName; })
|
|
2592
2590
|
: [];
|
|
2593
|
-
if ((
|
|
2591
|
+
if ((_q = source) === null || _q === void 0 ? void 0 : _q.isUseExistingTemplate) {
|
|
2594
2592
|
this.template = __assign(__assign({}, source.template), { data: mappedVariables.length > 0 ? mappedVariables : source.template.data || [] });
|
|
2595
2593
|
}
|
|
2596
2594
|
else {
|
|
@@ -2600,13 +2598,12 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2600
2598
|
header: null,
|
|
2601
2599
|
button: null,
|
|
2602
2600
|
data: mappedVariables,
|
|
2603
|
-
buttonParams: [],
|
|
2604
2601
|
};
|
|
2605
2602
|
}
|
|
2606
2603
|
this.isNeedSave = source.isNeedSave;
|
|
2607
2604
|
this.ttlSeconds = source.ttl;
|
|
2608
|
-
if ((
|
|
2609
|
-
this.text = ((
|
|
2605
|
+
if ((_r = source) === null || _r === void 0 ? void 0 : _r.isUseExistingTemplate) {
|
|
2606
|
+
this.text = ((_s = source) === null || _s === void 0 ? void 0 : _s.text) || ((_v = (_u = (_t = source) === null || _t === void 0 ? void 0 : _t.template) === null || _u === void 0 ? void 0 : _u.body) === null || _v === void 0 ? void 0 : _v.text);
|
|
2610
2607
|
}
|
|
2611
2608
|
}
|
|
2612
2609
|
return this;
|
|
@@ -4397,6 +4394,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4397
4394
|
this.initParam('pageNo', this.pageNoTemplateOption, 'number'),
|
|
4398
4395
|
this.initParam('rowPerPage', 20, 'number'),
|
|
4399
4396
|
this.initParam('platform', 'WA', 'string'),
|
|
4397
|
+
this.initParam('templateType', 'all', 'string'),
|
|
4400
4398
|
this.initParam('filter', filter, 'string'),
|
|
4401
4399
|
this.initParam('status', 'APPROVED', 'string'),
|
|
4402
4400
|
this.initParam('clientId', (_c = (_b = (_a = this.getControl('from')) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.clientId, (_c !== null && _c !== void 0 ? _c : '')), 'string'),
|
|
@@ -4599,7 +4597,8 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4599
4597
|
};
|
|
4600
4598
|
Object.defineProperty(GeneralInformationWAComponent.prototype, "buttonParamsControls", {
|
|
4601
4599
|
get: function () {
|
|
4602
|
-
|
|
4600
|
+
var control = this.form.get('buttonParams');
|
|
4601
|
+
return control ? control.controls : [];
|
|
4603
4602
|
},
|
|
4604
4603
|
enumerable: true,
|
|
4605
4604
|
configurable: true
|
|
@@ -4614,66 +4613,72 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4614
4613
|
});
|
|
4615
4614
|
GeneralInformationWAComponent.prototype.updateTemplate = function (template) {
|
|
4616
4615
|
var _this = this;
|
|
4617
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34;
|
|
4616
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35;
|
|
4618
4617
|
this.isShowParameter = false;
|
|
4619
4618
|
if (!template)
|
|
4620
4619
|
return;
|
|
4620
|
+
var formStorage = (_b = (_a = this.getCampaignStorage) === null || _a === void 0 ? void 0 : _a.generalInformation) === null || _b === void 0 ? void 0 : _b.form;
|
|
4621
|
+
var savedButtonParams = ((_c = formStorage) === null || _c === void 0 ? void 0 : _c.buttonParams) || [];
|
|
4621
4622
|
var buttonParamsArray = this.form.get('buttonParams');
|
|
4622
4623
|
buttonParamsArray.clear();
|
|
4623
4624
|
if (template && template.buttons && template.buttons.length > 0) {
|
|
4624
4625
|
var quickReplyButtons = template.buttons.filter(function (btn) { return btn.type === 'QUICK_REPLY'; });
|
|
4625
|
-
quickReplyButtons.forEach(function (btn) {
|
|
4626
|
+
quickReplyButtons.forEach(function (btn, index) {
|
|
4627
|
+
var _a;
|
|
4628
|
+
var existingPayload = ((_a = savedButtonParams[index]) === null || _a === void 0 ? void 0 : _a.payload) || '';
|
|
4626
4629
|
buttonParamsArray.push(new FormGroup({
|
|
4627
4630
|
label: new FormControl(btn.text),
|
|
4628
|
-
payload: new FormControl(
|
|
4631
|
+
payload: new FormControl({
|
|
4632
|
+
value: existingPayload,
|
|
4633
|
+
disabled: _this.isReadOnlyMode,
|
|
4634
|
+
}, [Validators$1.maxLength(256)]),
|
|
4629
4635
|
}));
|
|
4630
4636
|
});
|
|
4631
4637
|
}
|
|
4632
4638
|
this.isHaveTemplateParam =
|
|
4633
|
-
(
|
|
4634
|
-
(
|
|
4635
|
-
(
|
|
4636
|
-
if (['image', 'video', 'document'].includes((
|
|
4637
|
-
(
|
|
4638
|
-
(
|
|
4639
|
-
this.fileTypeChange((
|
|
4640
|
-
}
|
|
4641
|
-
(
|
|
4642
|
-
? (
|
|
4643
|
-
(
|
|
4644
|
-
? (
|
|
4645
|
-
(
|
|
4646
|
-
? (
|
|
4639
|
+
(_f = (_e = (_d = template.header) === null || _d === void 0 ? void 0 : _d.examples) === null || _e === void 0 ? void 0 : _e.length, (_f !== null && _f !== void 0 ? _f : 0)) > 0 ||
|
|
4640
|
+
(_j = (_h = (_g = template.body) === null || _g === void 0 ? void 0 : _g.examples) === null || _h === void 0 ? void 0 : _h.length, (_j !== null && _j !== void 0 ? _j : 0)) > 0 ||
|
|
4641
|
+
(_l = (_k = template.buttons) === null || _k === void 0 ? void 0 : _k.length, (_l !== null && _l !== void 0 ? _l : 0)) > 0;
|
|
4642
|
+
if (['image', 'video', 'document'].includes((_p = (_o = (_m = template) === null || _m === void 0 ? void 0 : _m.header) === null || _o === void 0 ? void 0 : _o.type) === null || _p === void 0 ? void 0 : _p.toLowerCase())) {
|
|
4643
|
+
(_q = this.getControl('fileName')) === null || _q === void 0 ? void 0 : _q.setValue((_w = (_t = (_s = (_r = this.getCampaignStorage) === null || _r === void 0 ? void 0 : _r.generalInformation) === null || _s === void 0 ? void 0 : _s.form.fileName, (_t !== null && _t !== void 0 ? _t : (_v = (_u = this.getCampaignStorage) === null || _u === void 0 ? void 0 : _u.generalInformation) === null || _v === void 0 ? void 0 : _v.form.targetURL)), (_w !== null && _w !== void 0 ? _w : template.header.url)));
|
|
4644
|
+
(_x = this.getControl('targetURL')) === null || _x === void 0 ? void 0 : _x.setValue((_0 = (_z = (_y = this.getCampaignStorage) === null || _y === void 0 ? void 0 : _y.generalInformation) === null || _z === void 0 ? void 0 : _z.form.targetURL, (_0 !== null && _0 !== void 0 ? _0 : template.header.url)));
|
|
4645
|
+
this.fileTypeChange((_3 = (_2 = (_1 = template) === null || _1 === void 0 ? void 0 : _1.header) === null || _2 === void 0 ? void 0 : _2.type) === null || _3 === void 0 ? void 0 : _3.toLowerCase());
|
|
4646
|
+
}
|
|
4647
|
+
(_5 = (_4 = template.header.examples) === null || _4 === void 0 ? void 0 : _4.length, (_5 !== null && _5 !== void 0 ? _5 : 0)) > 0
|
|
4648
|
+
? (_6 = this.getControl('paramHeader')) === null || _6 === void 0 ? void 0 : _6.setValidators(Validators$1.required) : (_7 = this.getControl('paramHeader')) === null || _7 === void 0 ? void 0 : _7.clearValidators();
|
|
4649
|
+
(_9 = (_8 = template.body.examples) === null || _8 === void 0 ? void 0 : _8.length, (_9 !== null && _9 !== void 0 ? _9 : 0)) > 0
|
|
4650
|
+
? (_10 = this.getControl('paramBody')) === null || _10 === void 0 ? void 0 : _10.setValidators(Validators$1.required) : (_11 = this.getControl('paramBody')) === null || _11 === void 0 ? void 0 : _11.clearValidators();
|
|
4651
|
+
(_13 = (_12 = template.buttons) === null || _12 === void 0 ? void 0 : _12.length, (_13 !== null && _13 !== void 0 ? _13 : 0)) > 0
|
|
4652
|
+
? (_14 = this.getControl('paramButton')) === null || _14 === void 0 ? void 0 : _14.setValidators(Validators$1.required) : (_15 = this.getControl('paramButton')) === null || _15 === void 0 ? void 0 : _15.clearValidators();
|
|
4647
4653
|
this.form.get('paramHeader').controls = [];
|
|
4648
4654
|
this.form.get('paramHeader').reset();
|
|
4649
|
-
(
|
|
4655
|
+
(_16 = this.getControl('paramHeader')) === null || _16 === void 0 ? void 0 : _16.updateValueAndValidity();
|
|
4650
4656
|
this.form.get('paramBody').controls = [];
|
|
4651
4657
|
this.form.get('paramBody').reset();
|
|
4652
|
-
(
|
|
4658
|
+
(_17 = this.getControl('paramBody')) === null || _17 === void 0 ? void 0 : _17.updateValueAndValidity();
|
|
4653
4659
|
this.form.get('paramButton').controls = [];
|
|
4654
4660
|
this.form.get('paramButton').reset();
|
|
4655
|
-
(
|
|
4656
|
-
(
|
|
4657
|
-
(
|
|
4658
|
-
(
|
|
4659
|
-
var formStorage = (_20 = (_19 = this.getCampaignStorage) === null || _19 === void 0 ? void 0 : _19.generalInformation) === null || _20 === void 0 ? void 0 : _20.form;
|
|
4661
|
+
(_18 = this.getControl('paramButton')) === null || _18 === void 0 ? void 0 : _18.updateValueAndValidity();
|
|
4662
|
+
(_19 = this.getControl('otpValue')) === null || _19 === void 0 ? void 0 : _19.setValue('');
|
|
4663
|
+
(_20 = this.getControl('otpValue')) === null || _20 === void 0 ? void 0 : _20.clearValidators();
|
|
4664
|
+
(_21 = this.getControl('otpValue')) === null || _21 === void 0 ? void 0 : _21.updateValueAndValidity();
|
|
4660
4665
|
if (template.category === 'AUTHENTICATION') {
|
|
4661
|
-
(
|
|
4662
|
-
(
|
|
4663
|
-
(
|
|
4666
|
+
(_22 = this.getControl('otpValue')) === null || _22 === void 0 ? void 0 : _22.setValue((_30 = (_24 = (_23 = formStorage) === null || _23 === void 0 ? void 0 : _23.otpValue, (_24 !== null && _24 !== void 0 ? _24 : (_29 = __spread((_28 = (_27 = (_26 = (_25 = formStorage) === null || _25 === void 0 ? void 0 : _25.template) === null || _26 === void 0 ? void 0 : _26.body) === null || _27 === void 0 ? void 0 : _27.examples, (_28 !== null && _28 !== void 0 ? _28 : [])))) === null || _29 === void 0 ? void 0 : _29.pop())), (_30 !== null && _30 !== void 0 ? _30 : '')));
|
|
4667
|
+
(_31 = this.getControl('otpValue')) === null || _31 === void 0 ? void 0 : _31.setValidators(Validators$1.required);
|
|
4668
|
+
(_32 = this.getControl('otpValue')) === null || _32 === void 0 ? void 0 : _32.updateValueAndValidity();
|
|
4664
4669
|
}
|
|
4665
|
-
(
|
|
4670
|
+
(_33 = template.header.examples) === null || _33 === void 0 ? void 0 : _33.forEach(function (each, index) {
|
|
4666
4671
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4667
4672
|
_this.addParamHeader((_g = (_d = (_c = (_b = (_a = formStorage) === null || _a === void 0 ? void 0 : _a.paramHeader) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.name, (_d !== null && _d !== void 0 ? _d : (_f = (_e = formStorage) === null || _e === void 0 ? void 0 : _e.paramHeader) === null || _f === void 0 ? void 0 : _f[index])), (_g !== null && _g !== void 0 ? _g : '')));
|
|
4668
4673
|
});
|
|
4669
|
-
(
|
|
4674
|
+
(_34 = template.body.examples) === null || _34 === void 0 ? void 0 : _34.forEach(function (each, index) {
|
|
4670
4675
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4671
4676
|
var paramValue = (_g = (_d = (_c = (_b = (_a = formStorage) === null || _a === void 0 ? void 0 : _a.paramBody) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.name, (_d !== null && _d !== void 0 ? _d : (_f = (_e = formStorage) === null || _e === void 0 ? void 0 : _e.paramBody) === null || _f === void 0 ? void 0 : _f[index])), (_g !== null && _g !== void 0 ? _g : ''));
|
|
4672
4677
|
if (['$UnsubscribeAccount'].includes(each))
|
|
4673
4678
|
paramValue = each;
|
|
4674
4679
|
_this.addParamBody(paramValue);
|
|
4675
4680
|
});
|
|
4676
|
-
(
|
|
4681
|
+
(_35 = template.buttons) === null || _35 === void 0 ? void 0 : _35.forEach(function (each, index) {
|
|
4677
4682
|
var _a, _b, _c, _d;
|
|
4678
4683
|
_this.addParamButton();
|
|
4679
4684
|
var button = _this.getButton;
|
|
@@ -5369,7 +5374,6 @@ var GeneralInformationComponent = /** @class */ (function () {
|
|
|
5369
5374
|
this.form.disable();
|
|
5370
5375
|
};
|
|
5371
5376
|
GeneralInformationComponent.prototype.updateGeneralInformationForm = function (form) {
|
|
5372
|
-
console.log(form, 'form');
|
|
5373
5377
|
this.generalInformationForm = form;
|
|
5374
5378
|
this.isShowMore = false;
|
|
5375
5379
|
this.generalInformation.emit({
|
|
@@ -5736,13 +5740,12 @@ var NewNumberBasesComponent = /** @class */ (function () {
|
|
|
5736
5740
|
var isNeedSave = (_c = genInfoForm) === null || _c === void 0 ? void 0 : _c.isNeedSave;
|
|
5737
5741
|
var parameterList = [
|
|
5738
5742
|
this.initParam('platform', ((_e = (_d = genInfoForm) === null || _d === void 0 ? void 0 : _d.template) === null || _e === void 0 ? void 0 : _e.platform) || 'WA', 'string'),
|
|
5743
|
+
this.initParam('templateName', (_g = (_f = genInfoForm) === null || _f === void 0 ? void 0 : _f.template) === null || _g === void 0 ? void 0 : _g.name, 'string'),
|
|
5744
|
+
this.initParam('templateLang', (_j = (_h = genInfoForm) === null || _h === void 0 ? void 0 : _h.template) === null || _j === void 0 ? void 0 : _j.lang, 'string'),
|
|
5745
|
+
this.initParam('category', (_l = (_k = this.categorySelected) === null || _k === void 0 ? void 0 : _k.map(function (t) { return t.id; }).join(), (_l !== null && _l !== void 0 ? _l : '')), 'string'),
|
|
5739
5746
|
];
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
parameterList.push(this.initParam('templateName', (_g = (_f = genInfoForm) === null || _f === void 0 ? void 0 : _f.template) === null || _g === void 0 ? void 0 : _g.name, 'string'), this.initParam('templateLang', (_j = (_h = genInfoForm) === null || _h === void 0 ? void 0 : _h.template) === null || _j === void 0 ? void 0 : _j.lang, 'string'), this.initParam('category', (_l = (_k = this.categorySelected) === null || _k === void 0 ? void 0 : _k.map(function (t) { return t.id; }).join(), (_l !== null && _l !== void 0 ? _l : '')), 'string'));
|
|
5743
|
-
}
|
|
5744
|
-
else {
|
|
5745
|
-
// SKENARIO 2: CREATE NEW (Belum disave, butuh text & examples)
|
|
5747
|
+
// 2. Parameter Tambahan HANYA JIKA skenario Create New (Belum di-save)
|
|
5748
|
+
if (!isNeedSave) {
|
|
5746
5749
|
var safeBodyText = encodeURIComponent(((_m = genInfoForm) === null || _m === void 0 ? void 0 : _m.text) || '');
|
|
5747
5750
|
parameterList.push(this.initParam('bodyText', safeBodyText, 'string'));
|
|
5748
5751
|
var variables = (_o = genInfoForm) === null || _o === void 0 ? void 0 : _o.variables;
|