@adlfe/campaign-management-library 2.14.1 → 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 +24 -19
- 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 +22 -13
- package/esm2015/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.js +1 -2
- package/esm2015/lib/campaign-management/modules/new-campaign/new-number-bases/new-number-bases.component.js +4 -7
- package/esm5/lib/campaign-management/models/general-information-wa-req.model.js +22 -13
- package/esm5/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.js +1 -2
- package/esm5/lib/campaign-management/modules/new-campaign/new-number-bases/new-number-bases.component.js +4 -7
- package/fesm2015/adlfe-campaign-management-library.js +24 -19
- package/fesm2015/adlfe-campaign-management-library.js.map +1 -1
- package/fesm5/adlfe-campaign-management-library.js +24 -19
- package/fesm5/adlfe-campaign-management-library.js.map +1 -1
- package/package.json +1 -1
|
@@ -2545,23 +2545,32 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2545
2545
|
};
|
|
2546
2546
|
}
|
|
2547
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 : []));
|
|
2548
2565
|
this.template = {
|
|
2549
2566
|
id: source.template.ID,
|
|
2550
2567
|
name: source.template.name,
|
|
2551
2568
|
lang: source.template.lang,
|
|
2552
2569
|
headerUrl: source.targetURL,
|
|
2553
|
-
header: (
|
|
2554
|
-
data: ((
|
|
2555
|
-
: (
|
|
2556
|
-
button:
|
|
2557
|
-
? source.buttonParams.map(function (btn) { return [
|
|
2558
|
-
btn.payload ? btn.payload : btn.label,
|
|
2559
|
-
]; })
|
|
2560
|
-
: (_m = (_l = source.paramButton) === null || _l === void 0 ? void 0 : _l.reduce(function (result, each) {
|
|
2561
|
-
var _a;
|
|
2562
|
-
result.push((_a = each.name.map(function (t) { return t.name; }), (_a !== null && _a !== void 0 ? _a : [])));
|
|
2563
|
-
return result;
|
|
2564
|
-
}, []), (_m !== null && _m !== void 0 ? _m : [])),
|
|
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,
|
|
2565
2574
|
};
|
|
2566
2575
|
if (source.template.category === 'AUTHENTICATION')
|
|
2567
2576
|
this.template = {
|
|
@@ -4205,7 +4214,6 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4205
4214
|
((_c = formValues) === null || _c === void 0 ? void 0 : _c.medium) !== 'WA') {
|
|
4206
4215
|
return;
|
|
4207
4216
|
}
|
|
4208
|
-
console.log(formValues, 'formValues');
|
|
4209
4217
|
(_d = this.getControl('channel')) === null || _d === void 0 ? void 0 : _d.setValue((_e = formValues) === null || _e === void 0 ? void 0 : _e.channel);
|
|
4210
4218
|
(_f = this.getControl('media')) === null || _f === void 0 ? void 0 : _f.setValue((_g = formValues) === null || _g === void 0 ? void 0 : _g.media);
|
|
4211
4219
|
(_h = this.getControl('from')) === null || _h === void 0 ? void 0 : _h.setValue((_j = formValues) === null || _j === void 0 ? void 0 : _j.from);
|
|
@@ -5734,13 +5742,10 @@ var NewNumberBasesComponent = /** @class */ (function () {
|
|
|
5734
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'),
|
|
5735
5743
|
this.initParam('templateName', (_g = (_f = genInfoForm) === null || _f === void 0 ? void 0 : _f.template) === null || _g === void 0 ? void 0 : _g.name, 'string'),
|
|
5736
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'),
|
|
5737
5746
|
];
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
parameterList.push(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'));
|
|
5741
|
-
}
|
|
5742
|
-
else {
|
|
5743
|
-
// SKENARIO 2: CREATE NEW (Auto-generated dll)
|
|
5747
|
+
// 2. Parameter Tambahan HANYA JIKA skenario Create New (Belum di-save)
|
|
5748
|
+
if (!isNeedSave) {
|
|
5744
5749
|
var safeBodyText = encodeURIComponent(((_m = genInfoForm) === null || _m === void 0 ? void 0 : _m.text) || '');
|
|
5745
5750
|
parameterList.push(this.initParam('bodyText', safeBodyText, 'string'));
|
|
5746
5751
|
var variables = (_o = genInfoForm) === null || _o === void 0 ? void 0 : _o.variables;
|