kwikid-forms 0.1.13 → 0.1.15
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/kwikid-forms.umd.js +181 -172
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +49 -44
- package/esm2015/lib/renderer/renderer.component.js +11 -19
- package/fesm2015/kwikid-forms.js +59 -62
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/form-view.component.d.ts +1 -1
- package/lib/renderer/renderer.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1519,8 +1519,8 @@
|
|
|
1519
1519
|
};
|
|
1520
1520
|
KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
|
|
1521
1521
|
return __awaiter(this, void 0, void 0, function () {
|
|
1522
|
-
var _a, _loop_1, this_1, _b, _c, field,
|
|
1523
|
-
var
|
|
1522
|
+
var _a, _loop_1, this_1, _b, _c, field, _d, _e, field, validations, e_1_1;
|
|
1523
|
+
var e_2, _f, e_1, _g;
|
|
1524
1524
|
var _this = this;
|
|
1525
1525
|
return __generator(this, function (_h) {
|
|
1526
1526
|
switch (_h.label) {
|
|
@@ -1553,57 +1553,57 @@
|
|
|
1553
1553
|
_loop_1(field);
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
catch (
|
|
1556
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1557
1557
|
finally {
|
|
1558
1558
|
try {
|
|
1559
1559
|
if (_c && !_c.done && (_f = _b.return)) _f.call(_b);
|
|
1560
1560
|
}
|
|
1561
|
-
finally { if (
|
|
1561
|
+
finally { if (e_2) throw e_2.error; }
|
|
1562
1562
|
}
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
}
|
|
1591
|
-
};
|
|
1592
|
-
this_2 = this;
|
|
1593
|
-
try {
|
|
1594
|
-
for (_d = __values(this.formFields), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
1595
|
-
field = _e.value;
|
|
1596
|
-
_loop_2(field);
|
|
1597
|
-
}
|
|
1563
|
+
_h.label = 2;
|
|
1564
|
+
case 2:
|
|
1565
|
+
_h.trys.push([2, 8, 9, 10]);
|
|
1566
|
+
_d = __values(this.formFields), _e = _d.next();
|
|
1567
|
+
_h.label = 3;
|
|
1568
|
+
case 3:
|
|
1569
|
+
if (!!_e.done) return [3 /*break*/, 7];
|
|
1570
|
+
field = _e.value;
|
|
1571
|
+
if (!field.isFormElement) return [3 /*break*/, 6];
|
|
1572
|
+
if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 5];
|
|
1573
|
+
validations = new kwikidToolkit.Validation({
|
|
1574
|
+
FIELD_CONFIG: field,
|
|
1575
|
+
FORM_FIELDS: this.formFields,
|
|
1576
|
+
FORM_DATA: this.formData,
|
|
1577
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
1578
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
1579
|
+
}, this.takeAction.bind(this));
|
|
1580
|
+
return [4 /*yield*/, validations.validate(field.validation)];
|
|
1581
|
+
case 4:
|
|
1582
|
+
_h.sent();
|
|
1583
|
+
_h.label = 5;
|
|
1584
|
+
case 5:
|
|
1585
|
+
if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
|
|
1586
|
+
this.handleConnectedElements({
|
|
1587
|
+
key: field.key,
|
|
1588
|
+
value: this.formGroup.controls[field.key].value
|
|
1589
|
+
}, "ON_INIT");
|
|
1598
1590
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1591
|
+
_h.label = 6;
|
|
1592
|
+
case 6:
|
|
1593
|
+
_e = _d.next();
|
|
1594
|
+
return [3 /*break*/, 3];
|
|
1595
|
+
case 7: return [3 /*break*/, 10];
|
|
1596
|
+
case 8:
|
|
1597
|
+
e_1_1 = _h.sent();
|
|
1598
|
+
e_1 = { error: e_1_1 };
|
|
1599
|
+
return [3 /*break*/, 10];
|
|
1600
|
+
case 9:
|
|
1601
|
+
try {
|
|
1602
|
+
if (_e && !_e.done && (_g = _d.return)) _g.call(_d);
|
|
1605
1603
|
}
|
|
1606
|
-
|
|
1604
|
+
finally { if (e_1) throw e_1.error; }
|
|
1605
|
+
return [7 /*endfinally*/];
|
|
1606
|
+
case 10: return [2 /*return*/];
|
|
1607
1607
|
}
|
|
1608
1608
|
});
|
|
1609
1609
|
});
|
|
@@ -1861,7 +1861,7 @@
|
|
|
1861
1861
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
1862
1862
|
if (field.isFormElement &&
|
|
1863
1863
|
field.validation.triggers.includes("ON_CHANGE")) {
|
|
1864
|
-
var
|
|
1864
|
+
var validations_1 = new kwikidToolkit.Validation({
|
|
1865
1865
|
FIELD_CONFIG: field,
|
|
1866
1866
|
FORM_FIELDS: this.formFields,
|
|
1867
1867
|
FORM_DATA: this.formData,
|
|
@@ -1871,7 +1871,7 @@
|
|
|
1871
1871
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1872
1872
|
return __generator(this, function (_a) {
|
|
1873
1873
|
switch (_a.label) {
|
|
1874
|
-
case 0: return [4 /*yield*/,
|
|
1874
|
+
case 0: return [4 /*yield*/, validations_1.validate(field.validation)];
|
|
1875
1875
|
case 1:
|
|
1876
1876
|
_a.sent();
|
|
1877
1877
|
return [2 /*return*/];
|
|
@@ -2018,96 +2018,112 @@
|
|
|
2018
2018
|
});
|
|
2019
2019
|
};
|
|
2020
2020
|
KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
}
|
|
2042
|
-
finally { if (e_9) throw e_9.error; }
|
|
2043
|
-
}
|
|
2044
|
-
var _loop_3 = function (field) {
|
|
2045
|
-
if (field.isFormElement &&
|
|
2046
|
-
field.validation.triggers.includes("ON_SAVE")) {
|
|
2047
|
-
var validations_3 = new kwikidToolkit.Validation({
|
|
2048
|
-
FIELD_CONFIG: field,
|
|
2049
|
-
FORM_FIELDS: this_3.formFields,
|
|
2050
|
-
FORM_DATA: this_3.formData,
|
|
2051
|
-
PREVIOUS_FORM_DATA: this_3.previousFormData,
|
|
2052
|
-
ALL_FORMS_DATA: this_3.allFormsData
|
|
2053
|
-
}, this_3.takeAction.bind(this_3));
|
|
2054
|
-
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2055
|
-
return __generator(this, function (_a) {
|
|
2056
|
-
switch (_a.label) {
|
|
2057
|
-
case 0: return [4 /*yield*/, validations_3.validate(field.validation)];
|
|
2058
|
-
case 1:
|
|
2059
|
-
_a.sent();
|
|
2060
|
-
return [2 /*return*/];
|
|
2021
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2022
|
+
var formData, _a, _b, field, controls, firstFieldWithError, controls_1, controls_1_1, control, _c, _d, field, validations, e_9_1;
|
|
2023
|
+
var e_10, _e, e_11, _f, e_9, _g;
|
|
2024
|
+
var _this = this;
|
|
2025
|
+
return __generator(this, function (_h) {
|
|
2026
|
+
switch (_h.label) {
|
|
2027
|
+
case 0:
|
|
2028
|
+
formData = this.formGroup.getRawValue();
|
|
2029
|
+
try {
|
|
2030
|
+
for (_a = __values(this.formFields), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
2031
|
+
field = _b.value;
|
|
2032
|
+
if (field.isFormElement) {
|
|
2033
|
+
if (field.hidden) {
|
|
2034
|
+
delete formData[field.key];
|
|
2035
|
+
}
|
|
2036
|
+
else {
|
|
2037
|
+
formData[field.key] = convertFormFieldValueToStandardFormat(field, formData[field.key]);
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2061
2041
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2042
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
2043
|
+
finally {
|
|
2044
|
+
try {
|
|
2045
|
+
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
2046
|
+
}
|
|
2047
|
+
finally { if (e_10) throw e_10.error; }
|
|
2048
|
+
}
|
|
2049
|
+
if (this.formGroup.invalid) {
|
|
2050
|
+
controls = new FormValidation().getFormFieldsInvalidControls(this.formGroup);
|
|
2051
|
+
firstFieldWithError = "";
|
|
2052
|
+
try {
|
|
2053
|
+
for (controls_1 = __values(controls), controls_1_1 = controls_1.next(); !controls_1_1.done; controls_1_1 = controls_1.next()) {
|
|
2054
|
+
control = controls_1_1.value;
|
|
2055
|
+
if (control.invalid && kwikidToolkit.isEmptyValue(firstFieldWithError)) {
|
|
2056
|
+
firstFieldWithError = control.key;
|
|
2057
|
+
}
|
|
2058
|
+
this.formFields = showFormFieldError(this.formFields, this.formGroup.controls[control.key].errors, control.key, control.invalid);
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
2062
|
+
finally {
|
|
2063
|
+
try {
|
|
2064
|
+
if (controls_1_1 && !controls_1_1.done && (_f = controls_1.return)) _f.call(controls_1);
|
|
2065
|
+
}
|
|
2066
|
+
finally { if (e_11) throw e_11.error; }
|
|
2067
|
+
}
|
|
2068
|
+
this.toggleErrorNotification(true);
|
|
2069
|
+
setTimeout(function () {
|
|
2070
|
+
_this.toggleErrorNotification(false);
|
|
2071
|
+
}, 3000);
|
|
2072
|
+
return [2 /*return*/];
|
|
2073
|
+
}
|
|
2074
|
+
_h.label = 1;
|
|
2075
|
+
case 1:
|
|
2076
|
+
_h.trys.push([1, 6, 7, 8]);
|
|
2077
|
+
_c = __values(this.formFields), _d = _c.next();
|
|
2078
|
+
_h.label = 2;
|
|
2079
|
+
case 2:
|
|
2080
|
+
if (!!_d.done) return [3 /*break*/, 5];
|
|
2081
|
+
field = _d.value;
|
|
2082
|
+
if (!(field.isFormElement &&
|
|
2083
|
+
field.validation.triggers.includes("ON_SAVE"))) return [3 /*break*/, 4];
|
|
2084
|
+
validations = new kwikidToolkit.Validation({
|
|
2085
|
+
FIELD_CONFIG: field,
|
|
2086
|
+
FORM_FIELDS: this.formFields,
|
|
2087
|
+
FORM_DATA: this.formData,
|
|
2088
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
2089
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
2090
|
+
}, this.takeAction.bind(this));
|
|
2091
|
+
return [4 /*yield*/, validations.validate(field.validation)];
|
|
2092
|
+
case 3:
|
|
2093
|
+
_h.sent();
|
|
2094
|
+
if (!field.validation.is_valid) {
|
|
2095
|
+
this.toggleErrorNotification(true);
|
|
2096
|
+
setTimeout(function () {
|
|
2097
|
+
_this.toggleErrorNotification(false);
|
|
2098
|
+
}, 3000);
|
|
2099
|
+
return [2 /*return*/];
|
|
2100
|
+
}
|
|
2101
|
+
_h.label = 4;
|
|
2102
|
+
case 4:
|
|
2103
|
+
_d = _c.next();
|
|
2104
|
+
return [3 /*break*/, 2];
|
|
2105
|
+
case 5: return [3 /*break*/, 8];
|
|
2106
|
+
case 6:
|
|
2107
|
+
e_9_1 = _h.sent();
|
|
2108
|
+
e_9 = { error: e_9_1 };
|
|
2109
|
+
return [3 /*break*/, 8];
|
|
2110
|
+
case 7:
|
|
2111
|
+
try {
|
|
2112
|
+
if (_d && !_d.done && (_g = _c.return)) _g.call(_c);
|
|
2113
|
+
}
|
|
2114
|
+
finally { if (e_9) throw e_9.error; }
|
|
2115
|
+
return [7 /*endfinally*/];
|
|
2116
|
+
case 8:
|
|
2117
|
+
Object.keys(formData).map(function (key) {
|
|
2118
|
+
if (kwikidToolkit.isEmptyValue(formData[key])) {
|
|
2119
|
+
formData[key] = "";
|
|
2120
|
+
}
|
|
2121
|
+
});
|
|
2122
|
+
this.onClickSaveForm.emit({ formConfig: this.formConfig, data: formData });
|
|
2123
|
+
return [2 /*return*/];
|
|
2096
2124
|
}
|
|
2097
|
-
|
|
2098
|
-
}
|
|
2099
|
-
this.toggleErrorNotification(true);
|
|
2100
|
-
setTimeout(function () {
|
|
2101
|
-
_this.toggleErrorNotification(false);
|
|
2102
|
-
}, 3000);
|
|
2103
|
-
return;
|
|
2104
|
-
}
|
|
2105
|
-
Object.keys(formData).map(function (key) {
|
|
2106
|
-
if (kwikidToolkit.isEmptyValue(formData[key])) {
|
|
2107
|
-
formData[key] = "";
|
|
2108
|
-
}
|
|
2125
|
+
});
|
|
2109
2126
|
});
|
|
2110
|
-
this.onClickSaveForm.emit({ formConfig: this.formConfig, data: formData });
|
|
2111
2127
|
};
|
|
2112
2128
|
KwikIDFormViewComponent.prototype.toggleErrorNotification = function (show) {
|
|
2113
2129
|
this.showErrorNotification = show;
|
|
@@ -3489,15 +3505,10 @@
|
|
|
3489
3505
|
case 0:
|
|
3490
3506
|
this.loader = true;
|
|
3491
3507
|
this.allFormsData = this.formsData;
|
|
3492
|
-
console.log("START");
|
|
3493
|
-
console.log(JSON.parse(JSON.stringify(this.formsList)));
|
|
3494
3508
|
return [4 /*yield*/, this.updateFormsList()];
|
|
3495
3509
|
case 1:
|
|
3496
3510
|
_d.sent();
|
|
3497
|
-
console.log("END");
|
|
3498
|
-
console.log(JSON.parse(JSON.stringify(this.formsList)));
|
|
3499
3511
|
this.handleResize(this.formsList);
|
|
3500
|
-
console.log(JSON.stringify(this.activeFormConfig), this.formsListCompleted);
|
|
3501
3512
|
if (!kwikidToolkit.isNotEmptyValue(this.activeFormConfig)) return [3 /*break*/, 3];
|
|
3502
3513
|
return [4 /*yield*/, this.handleOnClickSetActiveForm(this.activeFormConfig.key)];
|
|
3503
3514
|
case 2:
|
|
@@ -3767,9 +3778,7 @@
|
|
|
3767
3778
|
this.formsList = this.markFormInFormsListAsCompleted(this.formsList, this.formsListCompleted);
|
|
3768
3779
|
this.formsList = this.markFormInFormsListAsDisabled(this.formsList, this.formsListCompleted);
|
|
3769
3780
|
this.formsList = cloneDeep__namespace(this.formsList);
|
|
3770
|
-
|
|
3771
|
-
this.activeFormConfig = this.findActiveFormConfig(this.formsList);
|
|
3772
|
-
}
|
|
3781
|
+
this.activeFormConfig = this.findActiveFormConfig(this.formsList);
|
|
3773
3782
|
return [2 /*return*/];
|
|
3774
3783
|
}
|
|
3775
3784
|
});
|
|
@@ -3896,34 +3905,34 @@
|
|
|
3896
3905
|
* @param e any
|
|
3897
3906
|
*/
|
|
3898
3907
|
KwikIDFormsRendererComponent.prototype.handleOnClickSubmitForms = function (e) {
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
}
|
|
3925
|
-
});
|
|
3926
|
-
}
|
|
3908
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3909
|
+
var validations;
|
|
3910
|
+
var _this = this;
|
|
3911
|
+
return __generator(this, function (_d) {
|
|
3912
|
+
switch (_d.label) {
|
|
3913
|
+
case 0:
|
|
3914
|
+
if (!this.userConfig.userFormFieldsConfig.validation) return [3 /*break*/, 2];
|
|
3915
|
+
validations = new kwikidToolkit.Validation({
|
|
3916
|
+
FORMS_LIST: this.formsList,
|
|
3917
|
+
ALL_FORMS_DATA: this.formsData
|
|
3918
|
+
}, this.takeAction.bind(this));
|
|
3919
|
+
return [4 /*yield*/, validations.validate(this.userConfig.userFormFieldsConfig.validation)];
|
|
3920
|
+
case 1:
|
|
3921
|
+
_d.sent();
|
|
3922
|
+
if (this.userConfig.userFormFieldsConfig.status === "completed") {
|
|
3923
|
+
this.onClickSubmit.emit(e);
|
|
3924
|
+
}
|
|
3925
|
+
else {
|
|
3926
|
+
this.toggleErrorNotification(true);
|
|
3927
|
+
setTimeout(function () {
|
|
3928
|
+
_this.toggleErrorNotification(false);
|
|
3929
|
+
}, 3000);
|
|
3930
|
+
}
|
|
3931
|
+
_d.label = 2;
|
|
3932
|
+
case 2: return [2 /*return*/];
|
|
3933
|
+
}
|
|
3934
|
+
});
|
|
3935
|
+
});
|
|
3927
3936
|
};
|
|
3928
3937
|
/**
|
|
3929
3938
|
* Miscellaneous Methods
|
|
@@ -3952,7 +3961,7 @@
|
|
|
3952
3961
|
return KwikIDFormsRendererComponent;
|
|
3953
3962
|
}());
|
|
3954
3963
|
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3955
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"this.showForm
|
|
3964
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [formData]=\"this.activeFormData\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [formsList]=\"this.formsList\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickApiCall)=\"this.handleOnClickApiCall($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n<div\n ngClass=\"kwikid-forms-renderer-loader\"\n *ngIf=\"loader\"\n>\n <span class=\"loader\"></span>\n</div>\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconCancel\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: [":host{position:relative}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:50%;margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}.kwikid-forms-renderer-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-forms-renderer-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-forms-renderer-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-forms-renderer-loader .t-loader{display:none!important}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "apiCallResponse", "isMobileView", "allFormsData", "formsList"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }, { type: i4__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace.TuiPushDirective, selector: "tui-push" }], animations: [
|
|
3956
3965
|
animations.trigger("panelInOut", [
|
|
3957
3966
|
animations.transition(":enter", [
|
|
3958
3967
|
animations.style({ transform: "translateY(100%)" }),
|