ngx-smz-ui 3.5.2 → 3.5.7
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/ngx-smz-ui.umd.js +245 -149
- package/bundles/ngx-smz-ui.umd.js.map +1 -1
- package/esm2015/lib/builders/common/smz-builder-utilities.js +42 -0
- package/esm2015/lib/builders/smz-dialogs/dialog-builder.js +5 -2
- package/esm2015/lib/builders/smz-documents/document-base-cell.js +3 -3
- package/esm2015/lib/builders/smz-documents/document-builder.js +4 -3
- package/esm2015/lib/builders/smz-documents/document-cells.js +1 -1
- package/esm2015/lib/builders/smz-documents/document-content.js +4 -3
- package/esm2015/lib/builders/smz-documents/document-viewer.js +4 -3
- package/esm2015/lib/builders/smz-forms/form-builder.js +20 -2
- package/esm2015/lib/builders/smz-forms/form-group-builder.js +6 -12
- package/esm2015/lib/builders/smz-menu/menu-builder.js +5 -2
- package/esm2015/lib/builders/smz-tables/column-builder.js +5 -2
- package/esm2015/lib/modules/smz-faqs/components/faqs-content/faqs-content.component.js +1 -1
- package/esm2015/lib/modules/smz-forms/components/input-content-mask/input-content-mask.component.js +2 -2
- package/esm2015/lib/modules/smz-forms/components/input-list/input-list-dialog-crud.component.js +1 -1
- package/esm2015/lib/modules/smz-forms/components/input-list/input-list-inline-crud.component.js +1 -1
- package/esm2015/lib/modules/smz-forms/features/form-group/form-group.component.js +34 -20
- package/esm2015/lib/modules/smz-forms/models/behaviors.js +1 -1
- package/esm2015/lib/modules/smz-forms/models/control-type-functions.js +43 -3
- package/esm2015/lib/modules/smz-forms/models/control-types.js +1 -1
- package/esm2015/lib/modules/smz-forms/models/smz-forms.js +1 -1
- package/esm2015/lib/modules/smz-forms/smz-forms.module.js +10 -1
- package/esm2015/lib/modules/smz-layouts/pages/login/login.component.js +1 -1
- package/fesm2015/ngx-smz-ui.js +169 -80
- package/fesm2015/ngx-smz-ui.js.map +1 -1
- package/lib/builders/common/smz-builder-utilities.d.ts +15 -0
- package/lib/builders/smz-dialogs/dialog-builder.d.ts +3 -1
- package/lib/builders/smz-documents/document-base-cell.d.ts +2 -2
- package/lib/builders/smz-documents/document-builder.d.ts +3 -2
- package/lib/builders/smz-documents/document-content.d.ts +3 -2
- package/lib/builders/smz-documents/document-viewer.d.ts +3 -2
- package/lib/builders/smz-forms/form-builder.d.ts +3 -0
- package/lib/builders/smz-forms/form-group-builder.d.ts +1 -0
- package/lib/builders/smz-menu/menu-builder.d.ts +3 -1
- package/lib/builders/smz-tables/column-builder.d.ts +3 -1
- package/lib/modules/smz-forms/features/form-group/form-group.component.d.ts +2 -1
- package/lib/modules/smz-forms/models/behaviors.d.ts +2 -0
- package/lib/modules/smz-forms/models/control-types.d.ts +8 -7
- package/lib/modules/smz-forms/models/smz-forms.d.ts +1 -0
- package/package.json +1 -1
- package/resources/assets/scss/forms/forms.scss +0 -2
- package/esm2015/lib/builders/common/smz-conditional-builder.js +0 -35
- package/lib/builders/common/smz-conditional-builder.d.ts +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/flex-layout'), require('primeng/dialog'), require('primeng/toast'), require('primeng/table'), require('primeng/button'), require('primeng/message'), require('primeng/progressspinner'), require('primeng/toolbar'), require('primeng/listbox'), require('rxjs/operators'), require('lodash-es'), require('rxjs'), require('primeng/password'), require('primeng/tooltip'), require('@angular/flex-layout/flex'), require('primeng/inputmask'), require('primeng/inputtext'), require('@ngxs/store'), require('primeng/api'), require('primeng/inputnumber'), require('primeng/inputtextarea'), require('@angular/flex-layout/extended'), require('primeng/overlaypanel'), require('primeng/dropdown'), require('primeng/radiobutton'), require('primeng/inputswitch'), require('primeng/checkbox'), require('primeng/calendar'), require('primeng/messages'), require('@angular/platform-browser'), require('primeng/multiselect'), require('primeng/colorpicker'), require('primeng/fileupload'), require('@angular/common/http'), require('moment'), require('primeng/utils'), require('primeng/dynamicdialog'), require('@angular/animations'), require('primeng/dom'), require('@ngneat/until-destroy'), require('primeng/progressbar'), require('angular2-uuid'), require('@auth0/angular-jwt'), require('primeng/skeleton'), require('@angular/router'), require('primeng/ripple'), require('jspdf'), require('primeng/badge'), require('primeng/selectbutton'), require('ngx-pipes'), require('primeng/accordion'), require('@ngxs/router-plugin'), require('lodash-es/forIn'), require('lodash-es/startsWith'), require('@angular/platform-browser/animations'), require('@angular/common/locales/pt'), require('primeng/menubar'), require('primeng/sidebar'), require('primeng/contextmenu'), require('primeng/tree'), require('chart.js/auto'), require('chart.js/helpers'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('ngx-smz-ui', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/flex-layout', 'primeng/dialog', 'primeng/toast', 'primeng/table', 'primeng/button', 'primeng/message', 'primeng/progressspinner', 'primeng/toolbar', 'primeng/listbox', 'rxjs/operators', 'lodash-es', 'rxjs', 'primeng/password', 'primeng/tooltip', '@angular/flex-layout/flex', 'primeng/inputmask', 'primeng/inputtext', '@ngxs/store', 'primeng/api', 'primeng/inputnumber', 'primeng/inputtextarea', '@angular/flex-layout/extended', 'primeng/overlaypanel', 'primeng/dropdown', 'primeng/radiobutton', 'primeng/inputswitch', 'primeng/checkbox', 'primeng/calendar', 'primeng/messages', '@angular/platform-browser', 'primeng/multiselect', 'primeng/colorpicker', 'primeng/fileupload', '@angular/common/http', 'moment', 'primeng/utils', 'primeng/dynamicdialog', '@angular/animations', 'primeng/dom', '@ngneat/until-destroy', 'primeng/progressbar', 'angular2-uuid', '@auth0/angular-jwt', 'primeng/skeleton', '@angular/router', 'primeng/ripple', 'jspdf', 'primeng/badge', 'primeng/selectbutton', 'ngx-pipes', 'primeng/accordion', '@ngxs/router-plugin', 'lodash-es/forIn', 'lodash-es/startsWith', '@angular/platform-browser/animations', '@angular/common/locales/pt', 'primeng/menubar', 'primeng/sidebar', 'primeng/contextmenu', 'primeng/tree', 'chart.js/auto', 'chart.js/helpers', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-smz-ui"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ng.flexLayout, global.dialog, global.toast, global.table, global.button, global.message, global.progressspinner, global.toolbar, global.listbox, global.rxjs.operators, global["lodash-es"], global.rxjs, global.password, global.tooltip, global.ng.flexLayout.flex, global.inputmask, global.inputtext, global.store, global.api, global.inputnumber, global.inputtextarea, global.ng.flexLayout.extended, global.overlaypanel, global.dropdown, global.radiobutton, global.inputswitch, global.checkbox, global.calendar, global.messages, global.ng.platformBrowser, global.multiselect, global.colorpicker, global.fileupload, global.ng.common.http, global.moment, global.utils, global.dynamicdialog, global.ng.animations, global.dom, global["until-destroy"], global.progressbar, global.angularuuid, global.angularJwt, global.skeleton, global.ng.router, global.ripple, global.jspdf, global.badge, global.selectbutton, global.ngxpipes, global.accordion, global["router-plugin"], global.forin, global.startswith, global.ng.platformBrowser.animations, global.ng.common.locales.pt, global.menubar, global.sidebar, global.contextmenu, global.tree, global.chartjaauto, global.chartjshelpers, global.
|
|
5
|
-
})(this, (function (exports, i0, i1$1, i1, flexLayout, dialog, i7, i5, i6, message, progressspinner, i8, i3$1, operators, lodashEs, rxjs, i1$2, i10, i3, i1$3, i4, i1$4, i1$5, i2, i3$2, i4$1, i2$1, i4$2, i1$6, i1$7, i3$3, i1$8, i1$a, i1$9, i1$b, i1$c, fileupload, i1$d, moment_, utils, i2$2, animations, dom, untilDestroy, progressbar, angular2Uuid, angularJwt, i9, i1$e, i3$4, jspdf, i6$1, i4$3, i3$5, i3$6, routerPlugin, forIn, startsWith, animations$1, localePt, menubar, i3$7, i1$f, i2$3, Chart, helpers,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/flex-layout'), require('primeng/dialog'), require('primeng/toast'), require('primeng/table'), require('primeng/button'), require('primeng/message'), require('primeng/progressspinner'), require('primeng/toolbar'), require('primeng/listbox'), require('rxjs/operators'), require('lodash-es'), require('rxjs'), require('primeng/password'), require('primeng/tooltip'), require('@angular/flex-layout/flex'), require('primeng/inputmask'), require('primeng/inputtext'), require('@ngxs/store'), require('primeng/api'), require('primeng/inputnumber'), require('primeng/inputtextarea'), require('@angular/flex-layout/extended'), require('primeng/overlaypanel'), require('primeng/dropdown'), require('primeng/radiobutton'), require('primeng/inputswitch'), require('primeng/checkbox'), require('primeng/calendar'), require('primeng/messages'), require('@angular/platform-browser'), require('primeng/multiselect'), require('primeng/colorpicker'), require('primeng/fileupload'), require('@angular/common/http'), require('moment'), require('primeng/utils'), require('primeng/dynamicdialog'), require('@angular/animations'), require('primeng/dom'), require('@ngneat/until-destroy'), require('primeng/progressbar'), require('angular2-uuid'), require('@auth0/angular-jwt'), require('primeng/skeleton'), require('@angular/router'), require('primeng/ripple'), require('jspdf'), require('primeng/badge'), require('primeng/selectbutton'), require('ngx-pipes'), require('lodash-es/cloneDeep'), require('primeng/accordion'), require('@ngxs/router-plugin'), require('lodash-es/forIn'), require('lodash-es/startsWith'), require('@angular/platform-browser/animations'), require('@angular/common/locales/pt'), require('primeng/menubar'), require('primeng/sidebar'), require('primeng/contextmenu'), require('primeng/tree'), require('chart.js/auto'), require('chart.js/helpers'), require('ngx-device-detector')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('ngx-smz-ui', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/flex-layout', 'primeng/dialog', 'primeng/toast', 'primeng/table', 'primeng/button', 'primeng/message', 'primeng/progressspinner', 'primeng/toolbar', 'primeng/listbox', 'rxjs/operators', 'lodash-es', 'rxjs', 'primeng/password', 'primeng/tooltip', '@angular/flex-layout/flex', 'primeng/inputmask', 'primeng/inputtext', '@ngxs/store', 'primeng/api', 'primeng/inputnumber', 'primeng/inputtextarea', '@angular/flex-layout/extended', 'primeng/overlaypanel', 'primeng/dropdown', 'primeng/radiobutton', 'primeng/inputswitch', 'primeng/checkbox', 'primeng/calendar', 'primeng/messages', '@angular/platform-browser', 'primeng/multiselect', 'primeng/colorpicker', 'primeng/fileupload', '@angular/common/http', 'moment', 'primeng/utils', 'primeng/dynamicdialog', '@angular/animations', 'primeng/dom', '@ngneat/until-destroy', 'primeng/progressbar', 'angular2-uuid', '@auth0/angular-jwt', 'primeng/skeleton', '@angular/router', 'primeng/ripple', 'jspdf', 'primeng/badge', 'primeng/selectbutton', 'ngx-pipes', 'lodash-es/cloneDeep', 'primeng/accordion', '@ngxs/router-plugin', 'lodash-es/forIn', 'lodash-es/startsWith', '@angular/platform-browser/animations', '@angular/common/locales/pt', 'primeng/menubar', 'primeng/sidebar', 'primeng/contextmenu', 'primeng/tree', 'chart.js/auto', 'chart.js/helpers', 'ngx-device-detector'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-smz-ui"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ng.flexLayout, global.dialog, global.toast, global.table, global.button, global.message, global.progressspinner, global.toolbar, global.listbox, global.rxjs.operators, global["lodash-es"], global.rxjs, global.password, global.tooltip, global.ng.flexLayout.flex, global.inputmask, global.inputtext, global.store, global.api, global.inputnumber, global.inputtextarea, global.ng.flexLayout.extended, global.overlaypanel, global.dropdown, global.radiobutton, global.inputswitch, global.checkbox, global.calendar, global.messages, global.ng.platformBrowser, global.multiselect, global.colorpicker, global.fileupload, global.ng.common.http, global.moment, global.utils, global.dynamicdialog, global.ng.animations, global.dom, global["until-destroy"], global.progressbar, global.angularuuid, global.angularJwt, global.skeleton, global.ng.router, global.ripple, global.jspdf, global.badge, global.selectbutton, global.ngxpipes, global.cloneDeep, global.accordion, global["router-plugin"], global.forin, global.startswith, global.ng.platformBrowser.animations, global.ng.common.locales.pt, global.menubar, global.sidebar, global.contextmenu, global.tree, global.chartjaauto, global.chartjshelpers, global.ngxDeviceDetector));
|
|
5
|
+
})(this, (function (exports, i0, i1$1, i1, flexLayout, dialog, i7, i5, i6, message, progressspinner, i8, i3$1, operators, lodashEs, rxjs, i1$2, i10, i3, i1$3, i4, i1$4, i1$5, i2, i3$2, i4$1, i2$1, i4$2, i1$6, i1$7, i3$3, i1$8, i1$a, i1$9, i1$b, i1$c, fileupload, i1$d, moment_, utils, i2$2, animations, dom, untilDestroy, progressbar, angular2Uuid, angularJwt, i9, i1$e, i3$4, jspdf, i6$1, i4$3, i3$5, cloneDeep, i3$6, routerPlugin, forIn, startsWith, animations$1, localePt, menubar, i3$7, i1$f, i2$3, Chart, helpers, ngxDeviceDetector) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
62
62
|
var i4__namespace$3 = /*#__PURE__*/_interopNamespace(i4$3);
|
|
63
63
|
var i3__namespace$7 = /*#__PURE__*/_interopNamespace(i3$5);
|
|
64
|
+
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
64
65
|
var i3__namespace$5 = /*#__PURE__*/_interopNamespace(i3$6);
|
|
65
66
|
var forIn__default = /*#__PURE__*/_interopDefaultLegacy(forIn);
|
|
66
67
|
var startsWith__default = /*#__PURE__*/_interopDefaultLegacy(startsWith);
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
var i1__namespace$f = /*#__PURE__*/_interopNamespace(i1$f);
|
|
70
71
|
var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
|
|
71
72
|
var Chart__default = /*#__PURE__*/_interopDefaultLegacy(Chart);
|
|
72
|
-
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
73
73
|
|
|
74
74
|
/*! *****************************************************************************
|
|
75
75
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1062,7 +1062,31 @@
|
|
|
1062
1062
|
},
|
|
1063
1063
|
},
|
|
1064
1064
|
_j[exports.SmzControlType.CONTENT_MASK] = {
|
|
1065
|
-
initialize: function (input, config) {
|
|
1065
|
+
initialize: function (input, config) {
|
|
1066
|
+
// Expressão para localizar as tags originais
|
|
1067
|
+
var expression = new RegExp(/(<[^\/].*?>)(.*?)(<[\/].*?>)/gm);
|
|
1068
|
+
var variables = [];
|
|
1069
|
+
// Loop para encontrar todas as variáveis
|
|
1070
|
+
var value = expression.exec(input.defaultValue);
|
|
1071
|
+
while (value != null) {
|
|
1072
|
+
// Inserir variável encontrada
|
|
1073
|
+
// Cada variável será armazenada em um array de 4 elementos, sendo total [0], tag de abertura [1], valor [2] e tag de fechamento [3].
|
|
1074
|
+
variables.push(value);
|
|
1075
|
+
// Localizar próximo match
|
|
1076
|
+
value = expression.exec(input.defaultValue);
|
|
1077
|
+
}
|
|
1078
|
+
// Substituir as tags originais pelo padrão do content mask: {{value}}
|
|
1079
|
+
input.defaultValue = input.defaultValue.replace(expression, function (a) {
|
|
1080
|
+
// Resultado da busca será um array de 2 elementos, sendo total [0] e valor [1]
|
|
1081
|
+
var variable = new RegExp(/<[^\/].*?>(.*)<[\/].*?>/gm).exec(a);
|
|
1082
|
+
if (variable.length != 2)
|
|
1083
|
+
throw new Error("Some wrong when trying to extract variable value of " + variable);
|
|
1084
|
+
// Retornando formato {{value}}
|
|
1085
|
+
return "" + input.variableBegin + variable[1] + input.variableEnd;
|
|
1086
|
+
});
|
|
1087
|
+
// Armazenar variaveis originais para usar do mapping de getValue (response)
|
|
1088
|
+
input._originalVariables = variables;
|
|
1089
|
+
},
|
|
1066
1090
|
clear: function (control) { control.patchValue(''); },
|
|
1067
1091
|
updateValue: function (control, input) {
|
|
1068
1092
|
var mapped = mapInputContentMaskText(input);
|
|
@@ -1070,8 +1094,24 @@
|
|
|
1070
1094
|
},
|
|
1071
1095
|
getValue: function (form, input, flattenResponse) {
|
|
1072
1096
|
var value = form.get(input.propertyName).value;
|
|
1097
|
+
// Capturar valores do texto sem as tags de estilos do content mask
|
|
1073
1098
|
var unmapped = unmapInputContentMaskText(value, input.variableId, input.tagClass, input.variableBegin, input.variableEnd, input.exportHtmlNewLine);
|
|
1074
|
-
|
|
1099
|
+
// Expressão para localizar as tags {{value}}
|
|
1100
|
+
var expression = new RegExp(input.variableBegin + ".*?" + input.variableEnd, 'gm');
|
|
1101
|
+
// Loop para substituir as tags {{value}} pela sua respectiva variável original
|
|
1102
|
+
var originalFormat = unmapped;
|
|
1103
|
+
var originalValue = expression.exec(unmapped);
|
|
1104
|
+
var index = 0;
|
|
1105
|
+
while (originalValue != null) {
|
|
1106
|
+
// Substituir bloco por variavel original
|
|
1107
|
+
// Esse regex não pode ser global para que substitua apenas um bloco por vez,
|
|
1108
|
+
// assim a ordem do original baterá perfeitamente com a sequencia da busca
|
|
1109
|
+
originalFormat = originalFormat.replace(new RegExp(input.variableBegin + ".*?" + input.variableEnd, ''), input._originalVariables[index][0]);
|
|
1110
|
+
// Localizar próximo match
|
|
1111
|
+
originalValue = expression.exec(unmapped);
|
|
1112
|
+
index++;
|
|
1113
|
+
}
|
|
1114
|
+
return mapResponseValue(input, originalFormat, false);
|
|
1075
1115
|
},
|
|
1076
1116
|
},
|
|
1077
1117
|
_j[exports.SmzControlType.TAG_AREA] = {
|
|
@@ -2326,7 +2366,7 @@
|
|
|
2326
2366
|
return InputContentMaskComponent;
|
|
2327
2367
|
}());
|
|
2328
2368
|
InputContentMaskComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: InputContentMaskComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2329
|
-
InputContentMaskComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputContentMaskComponent, selector: "smz-input-content-mask", inputs: { input: "input", control: "control", behaviors: "behaviors" }, ngImport: i0__namespace, template: "<label class=\"smz__input_name\" [innerHTML]=\"input.name\"></label>\n<div class=\"input_inner__wrapper\">\n <div\n [ngClass]=\"input.inputClass\"\n [formControl]=\"control\"\n [variableId]=\"input.variableId\"\n [isDisabled]=\"input.isDisabled\"\n [quickActions]=\"input.quickActions\"\n transfervalue\n ></div>\n <!-- <textarea\n pInputTextarea\n [rows]=\"input.textAreaRows != null ? input.textAreaRows : 5\"\n fxFlex=\"grow\"\n class=\"p-col-12 smz__input_value\"\n [id]=\"input.propertyName\"\n [formControl]=\"control\">\n </textarea> -->\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\n</div>", components: [{ type: ValidationMessagesComponent$1, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors"] }], directives: [{ type: TransferValueAccessor, selector: "[transfervalue][formControlName], [transfervalue][formControl], [transfervalue][ngModel]", inputs: ["ngModel", "variableId", "isDisabled", "quickActions"], outputs: ["ngModelChange"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2369
|
+
InputContentMaskComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputContentMaskComponent, selector: "smz-input-content-mask", inputs: { input: "input", control: "control", behaviors: "behaviors" }, ngImport: i0__namespace, template: "<label class=\"smz__input_name\" [innerHTML]=\"input.name\"></label>\n<div class=\"input_inner__wrapper\">\n <div\n [ngClass]=\"'smz-input-content-mask ' + input.inputClass\"\n [formControl]=\"control\"\n [variableId]=\"input.variableId\"\n [isDisabled]=\"input.isDisabled\"\n [quickActions]=\"input.quickActions\"\n transfervalue\n ></div>\n <!-- <textarea\n pInputTextarea\n [rows]=\"input.textAreaRows != null ? input.textAreaRows : 5\"\n fxFlex=\"grow\"\n class=\"p-col-12 smz__input_value\"\n [id]=\"input.propertyName\"\n [formControl]=\"control\">\n </textarea> -->\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\n</div>", components: [{ type: ValidationMessagesComponent$1, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors"] }], directives: [{ type: TransferValueAccessor, selector: "[transfervalue][formControlName], [transfervalue][formControl], [transfervalue][ngModel]", inputs: ["ngModel", "variableId", "isDisabled", "quickActions"], outputs: ["ngModelChange"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2330
2370
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: InputContentMaskComponent, decorators: [{
|
|
2331
2371
|
type: i0.Component,
|
|
2332
2372
|
args: [{
|
|
@@ -3553,6 +3593,7 @@
|
|
|
3553
3593
|
/** hasChanges ocorre quando os valores do formulário são diferentes do último state salvo. */
|
|
3554
3594
|
this.hasChanges = false;
|
|
3555
3595
|
this.statusChanges = new i0.EventEmitter();
|
|
3596
|
+
this.changed = new i0.EventEmitter();
|
|
3556
3597
|
this.submit = new i0.EventEmitter();
|
|
3557
3598
|
this.isFirstUpdate = true;
|
|
3558
3599
|
this.emitChanges = true;
|
|
@@ -3577,8 +3618,8 @@
|
|
|
3577
3618
|
var _this = this;
|
|
3578
3619
|
this.isInitialized = true;
|
|
3579
3620
|
setTimeout(function () {
|
|
3580
|
-
var e_1,
|
|
3581
|
-
var _a, _b, _c, _d, _e;
|
|
3621
|
+
var e_1, _j, e_2, _k;
|
|
3622
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3582
3623
|
if (_this.config.formId == null)
|
|
3583
3624
|
_this.config.formId = uuidv4();
|
|
3584
3625
|
// console.log(this.config);
|
|
@@ -3590,8 +3631,8 @@
|
|
|
3590
3631
|
_this.config.template = _this.manager.setupTemplate(_this.config.template, _this.configService.forms.formTemplates);
|
|
3591
3632
|
_this.config.behaviors = Object.assign(Object.assign({}, _this.configService.forms.behaviors), _this.config.behaviors);
|
|
3592
3633
|
try {
|
|
3593
|
-
for (var
|
|
3594
|
-
var group =
|
|
3634
|
+
for (var _l = __values(_this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
3635
|
+
var group = _m.value;
|
|
3595
3636
|
// SETUP GROUP TEMPLATES
|
|
3596
3637
|
group.template = _this.manager.setupTemplate(group.template, _this.configService.forms.groupTemplates);
|
|
3597
3638
|
// SETUP INPUT PRESETS
|
|
@@ -3639,15 +3680,15 @@
|
|
|
3639
3680
|
_this.manager.setupVisibilityServices(input, _this.config);
|
|
3640
3681
|
};
|
|
3641
3682
|
try {
|
|
3642
|
-
for (var
|
|
3643
|
-
var input =
|
|
3683
|
+
for (var _o = (e_2 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
3684
|
+
var input = _p.value;
|
|
3644
3685
|
_loop_1(input);
|
|
3645
3686
|
}
|
|
3646
3687
|
}
|
|
3647
3688
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
3648
3689
|
finally {
|
|
3649
3690
|
try {
|
|
3650
|
-
if (
|
|
3691
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
3651
3692
|
}
|
|
3652
3693
|
finally { if (e_2) throw e_2.error; }
|
|
3653
3694
|
}
|
|
@@ -3657,12 +3698,13 @@
|
|
|
3657
3698
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3658
3699
|
finally {
|
|
3659
3700
|
try {
|
|
3660
|
-
if (
|
|
3701
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
3661
3702
|
}
|
|
3662
3703
|
finally { if (e_1) throw e_1.error; }
|
|
3663
3704
|
}
|
|
3664
3705
|
;
|
|
3665
|
-
|
|
3706
|
+
var options = { updateOn: (_h = (_g = (_f = _this.config) === null || _f === void 0 ? void 0 : _f.behaviors) === null || _g === void 0 ? void 0 : _g.updateOn) !== null && _h !== void 0 ? _h : 'change' };
|
|
3707
|
+
_this.form = _this.fb.group(controlsConfig, options);
|
|
3666
3708
|
if (_this.config._context == null) {
|
|
3667
3709
|
_this.config._context = {
|
|
3668
3710
|
applyGlobalStyles: null,
|
|
@@ -3674,7 +3716,7 @@
|
|
|
3674
3716
|
}
|
|
3675
3717
|
_this.linkInputControls();
|
|
3676
3718
|
setTimeout(function () {
|
|
3677
|
-
var _a, _b;
|
|
3719
|
+
var _a, _b, _c;
|
|
3678
3720
|
_this.updateFormValues();
|
|
3679
3721
|
// this.isValid = this.form.valid;
|
|
3680
3722
|
var runCustomFunctionsOnLoad = (_b = (_a = _this.config.behaviors) === null || _a === void 0 ? void 0 : _a.runCustomFunctionsOnLoad) !== null && _b !== void 0 ? _b : false;
|
|
@@ -3684,7 +3726,9 @@
|
|
|
3684
3726
|
_this.checkCustomFunctions();
|
|
3685
3727
|
}
|
|
3686
3728
|
else {
|
|
3687
|
-
_this.
|
|
3729
|
+
if (!((_c = _this.config.behaviors) === null || _c === void 0 ? void 0 : _c.skipEmitChangesOnLoad)) {
|
|
3730
|
+
_this.statusChanges.emit(_this.getData());
|
|
3731
|
+
}
|
|
3688
3732
|
}
|
|
3689
3733
|
// Esse timeout garante um adiamento no subscribe de status change do form para não ser executado na primeira inicialização
|
|
3690
3734
|
setTimeout(function () {
|
|
@@ -3696,6 +3740,7 @@
|
|
|
3696
3740
|
_this.checkCustomFunctions();
|
|
3697
3741
|
});
|
|
3698
3742
|
_this.fixRadioBug();
|
|
3743
|
+
_this.resetState();
|
|
3699
3744
|
}, 0);
|
|
3700
3745
|
}, 0);
|
|
3701
3746
|
}, 0);
|
|
@@ -3728,7 +3773,7 @@
|
|
|
3728
3773
|
}
|
|
3729
3774
|
setTimeout(function () {
|
|
3730
3775
|
_this.init();
|
|
3731
|
-
setTimeout(
|
|
3776
|
+
// setTimeout(() => { this.resetState(); }, 0);
|
|
3732
3777
|
}, 0);
|
|
3733
3778
|
}
|
|
3734
3779
|
else if (changes.config != null && changes.config.currentValue == null && changes.config.previousValue != null) {
|
|
@@ -3739,20 +3784,20 @@
|
|
|
3739
3784
|
}, 0);
|
|
3740
3785
|
};
|
|
3741
3786
|
FormGroupComponent.prototype.linkInputControls = function () {
|
|
3742
|
-
var e_3,
|
|
3787
|
+
var e_3, _j, e_4, _k;
|
|
3743
3788
|
try {
|
|
3744
|
-
for (var
|
|
3745
|
-
var group =
|
|
3789
|
+
for (var _l = __values(this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
3790
|
+
var group = _m.value;
|
|
3746
3791
|
try {
|
|
3747
|
-
for (var
|
|
3748
|
-
var input =
|
|
3792
|
+
for (var _o = (e_4 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
3793
|
+
var input = _p.value;
|
|
3749
3794
|
input._inputFormControl = this.form.controls[input.propertyName];
|
|
3750
3795
|
}
|
|
3751
3796
|
}
|
|
3752
3797
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
3753
3798
|
finally {
|
|
3754
3799
|
try {
|
|
3755
|
-
if (
|
|
3800
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
3756
3801
|
}
|
|
3757
3802
|
finally { if (e_4) throw e_4.error; }
|
|
3758
3803
|
}
|
|
@@ -3762,7 +3807,7 @@
|
|
|
3762
3807
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
3763
3808
|
finally {
|
|
3764
3809
|
try {
|
|
3765
|
-
if (
|
|
3810
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
3766
3811
|
}
|
|
3767
3812
|
finally { if (e_3) throw e_3.error; }
|
|
3768
3813
|
}
|
|
@@ -3787,22 +3832,22 @@
|
|
|
3787
3832
|
}
|
|
3788
3833
|
};
|
|
3789
3834
|
FormGroupComponent.prototype.hasDuplicateNames = function () {
|
|
3790
|
-
var e_5,
|
|
3835
|
+
var e_5, _j, e_6, _k;
|
|
3791
3836
|
try {
|
|
3792
3837
|
var inputs = [];
|
|
3793
3838
|
try {
|
|
3794
|
-
for (var
|
|
3795
|
-
var group =
|
|
3839
|
+
for (var _l = __values(this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
3840
|
+
var group = _m.value;
|
|
3796
3841
|
try {
|
|
3797
|
-
for (var
|
|
3798
|
-
var input =
|
|
3842
|
+
for (var _o = (e_6 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
3843
|
+
var input = _p.value;
|
|
3799
3844
|
inputs.push(input);
|
|
3800
3845
|
}
|
|
3801
3846
|
}
|
|
3802
3847
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
3803
3848
|
finally {
|
|
3804
3849
|
try {
|
|
3805
|
-
if (
|
|
3850
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
3806
3851
|
}
|
|
3807
3852
|
finally { if (e_6) throw e_6.error; }
|
|
3808
3853
|
}
|
|
@@ -3812,7 +3857,7 @@
|
|
|
3812
3857
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
3813
3858
|
finally {
|
|
3814
3859
|
try {
|
|
3815
|
-
if (
|
|
3860
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
3816
3861
|
}
|
|
3817
3862
|
finally { if (e_5) throw e_5.error; }
|
|
3818
3863
|
}
|
|
@@ -3829,13 +3874,13 @@
|
|
|
3829
3874
|
};
|
|
3830
3875
|
/** Limpa todos os valores default */
|
|
3831
3876
|
FormGroupComponent.prototype.clearFormValues = function () {
|
|
3832
|
-
var e_7,
|
|
3877
|
+
var e_7, _j, e_8, _k;
|
|
3833
3878
|
try {
|
|
3834
|
-
for (var
|
|
3835
|
-
var group =
|
|
3879
|
+
for (var _l = __values(this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
3880
|
+
var group = _m.value;
|
|
3836
3881
|
try {
|
|
3837
|
-
for (var
|
|
3838
|
-
var input =
|
|
3882
|
+
for (var _o = (e_8 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
3883
|
+
var input = _p.value;
|
|
3839
3884
|
if (input.type === exports.SmzControlType.FILE) {
|
|
3840
3885
|
var fileInput = input;
|
|
3841
3886
|
CONTROL_FUNCTIONS[input.type].clear(this.form.controls[input.propertyName], fileInput._clearMethod);
|
|
@@ -3848,7 +3893,7 @@
|
|
|
3848
3893
|
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
3849
3894
|
finally {
|
|
3850
3895
|
try {
|
|
3851
|
-
if (
|
|
3896
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
3852
3897
|
}
|
|
3853
3898
|
finally { if (e_8) throw e_8.error; }
|
|
3854
3899
|
}
|
|
@@ -3858,7 +3903,7 @@
|
|
|
3858
3903
|
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
3859
3904
|
finally {
|
|
3860
3905
|
try {
|
|
3861
|
-
if (
|
|
3906
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
3862
3907
|
}
|
|
3863
3908
|
finally { if (e_7) throw e_7.error; }
|
|
3864
3909
|
}
|
|
@@ -3872,27 +3917,30 @@
|
|
|
3872
3917
|
};
|
|
3873
3918
|
/** Atualiza o state do formulário com seus valores atuais */
|
|
3874
3919
|
FormGroupComponent.prototype.resetState = function () {
|
|
3875
|
-
var data = this.
|
|
3920
|
+
var data = this.getData().data;
|
|
3876
3921
|
this.originalState = JSON.stringify(data).replace(/['"]+/g, '');
|
|
3877
3922
|
this.updateHasChanges();
|
|
3878
3923
|
};
|
|
3879
3924
|
/** Atualiza o hasChanges */
|
|
3880
3925
|
FormGroupComponent.prototype.updateHasChanges = function () {
|
|
3881
|
-
var
|
|
3926
|
+
var response = this.getData();
|
|
3882
3927
|
var original = this.originalState;
|
|
3883
|
-
var current = JSON.stringify(data).replace(/['"]+/g, '');
|
|
3928
|
+
var current = JSON.stringify(response.data).replace(/['"]+/g, '');
|
|
3929
|
+
if (this.hasChanges === false && original !== current) {
|
|
3930
|
+
this.changed.emit(response);
|
|
3931
|
+
}
|
|
3884
3932
|
this.hasChanges = original !== current;
|
|
3885
3933
|
this.cdf.markForCheck();
|
|
3886
3934
|
};
|
|
3887
3935
|
/** Atualiza os valores dos inputs com seus dados default */
|
|
3888
3936
|
FormGroupComponent.prototype.updateFormValues = function () {
|
|
3889
|
-
var e_9,
|
|
3937
|
+
var e_9, _j, e_10, _k;
|
|
3890
3938
|
try {
|
|
3891
|
-
for (var
|
|
3892
|
-
var group =
|
|
3939
|
+
for (var _l = __values(this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
3940
|
+
var group = _m.value;
|
|
3893
3941
|
try {
|
|
3894
|
-
for (var
|
|
3895
|
-
var input =
|
|
3942
|
+
for (var _o = (e_10 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
3943
|
+
var input = _p.value;
|
|
3896
3944
|
var control = this.form.controls[input.propertyName];
|
|
3897
3945
|
if (input.isDisabled) {
|
|
3898
3946
|
control.disable();
|
|
@@ -3906,7 +3954,7 @@
|
|
|
3906
3954
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
3907
3955
|
finally {
|
|
3908
3956
|
try {
|
|
3909
|
-
if (
|
|
3957
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
3910
3958
|
}
|
|
3911
3959
|
finally { if (e_10) throw e_10.error; }
|
|
3912
3960
|
}
|
|
@@ -3916,7 +3964,7 @@
|
|
|
3916
3964
|
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
3917
3965
|
finally {
|
|
3918
3966
|
try {
|
|
3919
|
-
if (
|
|
3967
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
3920
3968
|
}
|
|
3921
3969
|
finally { if (e_9) throw e_9.error; }
|
|
3922
3970
|
}
|
|
@@ -3944,26 +3992,29 @@
|
|
|
3944
3992
|
if (((_d = this.config.functions) === null || _d === void 0 ? void 0 : _d.customBehavior) != null) {
|
|
3945
3993
|
(_e = this.config.functions) === null || _e === void 0 ? void 0 : _e.customBehavior(data, this.config, this.form, {});
|
|
3946
3994
|
}
|
|
3947
|
-
if (this.emitChanges) {
|
|
3948
|
-
this.statusChanges.emit(data);
|
|
3949
|
-
}
|
|
3950
|
-
else {
|
|
3951
|
-
this.emitChanges = true;
|
|
3952
|
-
}
|
|
3953
3995
|
}
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3996
|
+
if (this.emitChanges) {
|
|
3997
|
+
setTimeout(function () {
|
|
3998
|
+
_this.updateHasChanges();
|
|
3999
|
+
_this.statusChanges.emit(_this.getData());
|
|
4000
|
+
}, 0);
|
|
4001
|
+
}
|
|
4002
|
+
else {
|
|
4003
|
+
setTimeout(function () {
|
|
4004
|
+
_this.updateHasChanges();
|
|
4005
|
+
}, 0);
|
|
4006
|
+
this.emitChanges = true;
|
|
4007
|
+
}
|
|
3957
4008
|
};
|
|
3958
4009
|
FormGroupComponent.prototype.fixRadioBug = function () {
|
|
3959
|
-
var e_11,
|
|
4010
|
+
var e_11, _j, e_12, _k;
|
|
3960
4011
|
var _this = this;
|
|
3961
4012
|
try {
|
|
3962
4013
|
// https://github.com/primefaces/primeng/pull/9265
|
|
3963
4014
|
// https://stackblitz.com/edit/primengdemo-rh51xa?file=src%2Fapp%2Fapp.component.ts
|
|
3964
4015
|
// https://stackoverflow.com/questions/64827771/primeng-radio-button-selecting-multiple-items
|
|
3965
|
-
for (var
|
|
3966
|
-
var group =
|
|
4016
|
+
for (var _l = __values(this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
4017
|
+
var group = _m.value;
|
|
3967
4018
|
var _loop_2 = function (input) {
|
|
3968
4019
|
if (input.type === exports.SmzControlType.RADIO) {
|
|
3969
4020
|
this_1.form.get(input.propertyName).valueChanges.subscribe(function (val) {
|
|
@@ -3974,15 +4025,15 @@
|
|
|
3974
4025
|
};
|
|
3975
4026
|
var this_1 = this;
|
|
3976
4027
|
try {
|
|
3977
|
-
for (var
|
|
3978
|
-
var input =
|
|
4028
|
+
for (var _o = (e_12 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
4029
|
+
var input = _p.value;
|
|
3979
4030
|
_loop_2(input);
|
|
3980
4031
|
}
|
|
3981
4032
|
}
|
|
3982
4033
|
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
3983
4034
|
finally {
|
|
3984
4035
|
try {
|
|
3985
|
-
if (
|
|
4036
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
3986
4037
|
}
|
|
3987
4038
|
finally { if (e_12) throw e_12.error; }
|
|
3988
4039
|
}
|
|
@@ -3992,7 +4043,7 @@
|
|
|
3992
4043
|
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
3993
4044
|
finally {
|
|
3994
4045
|
try {
|
|
3995
|
-
if (
|
|
4046
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
3996
4047
|
}
|
|
3997
4048
|
finally { if (e_11) throw e_11.error; }
|
|
3998
4049
|
}
|
|
@@ -4000,20 +4051,20 @@
|
|
|
4000
4051
|
};
|
|
4001
4052
|
/** Retorna o objeto com os valores dos inputs; Esse objeto seguirá a nomemclatura do campo name de cada inputConfig */
|
|
4002
4053
|
FormGroupComponent.prototype.getData = function () {
|
|
4003
|
-
var e_13,
|
|
4054
|
+
var e_13, _j, e_14, _k;
|
|
4004
4055
|
var _a, _b;
|
|
4005
4056
|
// console.log('--------------------------');
|
|
4006
4057
|
// console.log('--------------------------');
|
|
4007
4058
|
// console.log('--------------------------');
|
|
4008
4059
|
var data = {};
|
|
4009
|
-
var response = { data: data, isValid: true };
|
|
4060
|
+
var response = { data: data, isValid: true, hasUnsavedChanges: false };
|
|
4010
4061
|
var formFlattenResponse = (_b = (_a = this.config.behaviors) === null || _a === void 0 ? void 0 : _a.flattenResponse) !== null && _b !== void 0 ? _b : false;
|
|
4011
4062
|
try {
|
|
4012
|
-
for (var
|
|
4013
|
-
var group =
|
|
4063
|
+
for (var _l = __values(this.config.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
4064
|
+
var group = _m.value;
|
|
4014
4065
|
try {
|
|
4015
|
-
for (var
|
|
4016
|
-
var input =
|
|
4066
|
+
for (var _o = (e_14 = void 0, __values(group.children)), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
4067
|
+
var input = _p.value;
|
|
4017
4068
|
if (input.advancedSettings == null || !input.advancedSettings.excludeFromResponse) {
|
|
4018
4069
|
var value = CONTROL_FUNCTIONS[input.type].getValue(this.form, input, formFlattenResponse);
|
|
4019
4070
|
if (input.visibilityDependsOn == null || input.isVisible) {
|
|
@@ -4034,7 +4085,7 @@
|
|
|
4034
4085
|
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
4035
4086
|
finally {
|
|
4036
4087
|
try {
|
|
4037
|
-
if (
|
|
4088
|
+
if (_p && !_p.done && (_k = _o.return)) _k.call(_o);
|
|
4038
4089
|
}
|
|
4039
4090
|
finally { if (e_14) throw e_14.error; }
|
|
4040
4091
|
}
|
|
@@ -4044,12 +4095,13 @@
|
|
|
4044
4095
|
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
4045
4096
|
finally {
|
|
4046
4097
|
try {
|
|
4047
|
-
if (
|
|
4098
|
+
if (_m && !_m.done && (_j = _l.return)) _j.call(_l);
|
|
4048
4099
|
}
|
|
4049
4100
|
finally { if (e_13) throw e_13.error; }
|
|
4050
4101
|
}
|
|
4051
4102
|
;
|
|
4052
4103
|
this.isValid = response.isValid;
|
|
4104
|
+
response.hasUnsavedChanges = this.hasChanges;
|
|
4053
4105
|
// console.log('isValid', this.isValid);
|
|
4054
4106
|
return response;
|
|
4055
4107
|
};
|
|
@@ -4064,7 +4116,7 @@
|
|
|
4064
4116
|
return FormGroupComponent;
|
|
4065
4117
|
}());
|
|
4066
4118
|
FormGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: FormGroupComponent, deps: [{ token: i1__namespace$2.FormBuilder }, { token: i0__namespace.ChangeDetectorRef }, { token: SmzFormsManagerService }, { token: SmzDialogsConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4067
|
-
FormGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: FormGroupComponent, selector: "smz-form-group", inputs: { config: "config" }, outputs: { statusChanges: "statusChanges", submit: "submit" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"config != null\">\n\n<div class=\"smz_form_grid_container\">\n\n <ng-container *ngIf=\"form != null && !configHasErrors\">\n <form focusFirstInput [focus]=\"!config.behaviors.avoidFocusOnLoad\" [formGroup]=\"form\" class=\"smz_form__wrapper\" (keyup.enter)=\"onEnter()\">\n <ng-container *ngTemplateOutlet=\"groupTemplate\"></ng-container>\n </form>\n </ng-container>\n\n <ng-container *ngIf=\"configHasErrors\">\n <div>Error</div>\n </ng-container>\n\n</div>\n\n</ng-container>\n\n<ng-template #groupTemplate>\n\n <div class=\"w-full p-px-0 p-mx-auto\">\n <div class=\"p-grid p-nogutter p-flex-wrap p-align-start p-justify-start flex-gap-2\" [ngClass]=\"config.template | setTemplateClasses : ['horizontalAlignment', 'verticalAlignment']\">\n <ng-container *ngFor=\"let group of config.groups\">\n <div class=\"p-col\" [ngClass]=\"group.template | setTemplateClasses : ['row']\">\n <div class=\"smz__group_name\" *ngIf=\"group.showName\">{{ group.name }}</div>\n\n <div class=\"p-grid p-nogutter p-flex-wrap p-align-start p-justify-start flex-gap-2\">\n <ng-container *ngFor=\"let input of group.children\">\n <div *ngIf=\"input.isVisible\" class=\"input__control__wrapper p-col\" [ngClass]=\"input.template | setTemplateClasses : ['row']\">\n <ng-container *ngTemplateOutlet=\"inputTemplate; context: { $implicit: input }\"></ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n\n</ng-template>\n\n<ng-template #inputTemplate let-input>\n\n <ng-container *ngIf=\"input.type == controlTypes.PASSWORD\">\n <smz-input-password [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-password>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TEXT_MASK\">\n <smz-input-mask [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-mask>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TEXT\">\n <smz-input-text [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-text>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.LIST\">\n <smz-input-list [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-list>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.NUMBER\">\n <smz-input-number [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-number>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TEXT_AREA\">\n <smz-input-text-area [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-text-area>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CONTENT_MASK\">\n <smz-input-content-mask [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-content-mask>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TAG_AREA\">\n <input-tag-area [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></input-tag-area>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.RADIO\">\n <smz-radio-button [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-radio-button>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.SWITCH\">\n <smz-input-switch [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-switch>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CHECKBOX\">\n <smz-checkbox [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-checkbox>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CHECKBOX_GROUP\">\n <smz-checkbox-group [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-checkbox-group>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CALENDAR\">\n <smz-calendar [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-calendar>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.DROPDOWN\">\n <smz-dropdown [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-dropdown>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.LINKED_DROPDOWN\">\n <smz-linked-dropdown [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-linked-dropdown>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.FILE\">\n <smz-file-upload [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [form]=\"form\" [behaviors]=\"config.behaviors\"></smz-file-upload>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CURRENCY\">\n <smz-input-currency [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-currency>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.MULTI_SELECT\">\n <smz-multi-select [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-multi-select>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.LINKED_MULTISELECT\">\n <smz-linked-multi-select [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-linked-multi-select>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.COLOR_PICKER\">\n <smz-color-picker [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-color-picker>\n </ng-container>\n\n</ng-template>\n", components: [{ type: InputPasswordComponent, selector: "smz-input-password", inputs: ["input", "control", "behaviors"] }, { type: InputMaskComponent, selector: "smz-input-mask", inputs: ["input", "control", "behaviors"] }, { type: InputTextComponent, selector: "smz-input-text", inputs: ["input", "control", "behaviors"] }, { type: InputListComponent, selector: "smz-input-list", inputs: ["input", "control", "behaviors"] }, { type: InputNumberComponent, selector: "smz-input-number", inputs: ["input", "control", "behaviors"] }, { type: InputTextAreaComponent, selector: "smz-input-text-area", inputs: ["input", "control", "behaviors"] }, { type: InputContentMaskComponent, selector: "smz-input-content-mask", inputs: ["input", "control", "behaviors"] }, { type: InputTagAreaComponent, selector: "input-tag-area", inputs: ["input", "control", "behaviors"] }, { type: RadioButtonComponent, selector: "smz-radio-button", inputs: ["input", "control", "behaviors"] }, { type: InputSwitchComponent, selector: "smz-input-switch", inputs: ["input", "control", "behaviors"] }, { type: CheckBoxComponent, selector: "smz-checkbox", inputs: ["input", "formId", "control", "behaviors"] }, { type: CheckBoxGroupComponent, selector: "smz-checkbox-group", inputs: ["input", "control", "behaviors"] }, { type: CalendarComponent, selector: "smz-calendar", inputs: ["input", "control", "behaviors"] }, { type: DropdownComponent, selector: "smz-dropdown", inputs: ["input", "formId", "control", "behaviors"] }, { type: LinkedDropdownComponent, selector: "smz-linked-dropdown", inputs: ["input", "formId", "control", "behaviors"] }, { type: FileUploadComponent, selector: "smz-file-upload", inputs: ["input", "form", "control", "behaviors"], outputs: ["selectChange"] }, { type: InputCurrencyComponent, selector: "smz-input-currency", inputs: ["input", "control", "behaviors"] }, { type: MultiSelectComponent, selector: "smz-multi-select", inputs: ["input", "control", "behaviors"] }, { type: LinkedMultiSelectComponent, selector: "smz-linked-multi-select", inputs: ["input", "formId", "control", "behaviors"] }, { type: ColorPickerComponent, selector: "smz-color-picker", inputs: ["input", "control", "behaviors"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: FormFocusFirstInputDirective, selector: "[focusFirstInput]", inputs: ["focus"] }, { type: i1__namespace$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "setTemplateClasses": SetTemplateClassesPipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
4119
|
+
FormGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: FormGroupComponent, selector: "smz-form-group", inputs: { config: "config" }, outputs: { statusChanges: "statusChanges", changed: "changed", submit: "submit" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"config != null\">\n\n<div class=\"smz_form_grid_container\">\n\n <ng-container *ngIf=\"form != null && !configHasErrors\">\n <form focusFirstInput [focus]=\"!config.behaviors.avoidFocusOnLoad\" [formGroup]=\"form\" class=\"smz_form__wrapper\" (keyup.enter)=\"onEnter()\">\n <ng-container *ngTemplateOutlet=\"groupTemplate\"></ng-container>\n </form>\n </ng-container>\n\n <ng-container *ngIf=\"configHasErrors\">\n <div>Error</div>\n </ng-container>\n\n</div>\n\n</ng-container>\n\n<ng-template #groupTemplate>\n\n <div class=\"w-full p-px-0 p-mx-auto\">\n <div class=\"p-grid p-nogutter p-flex-wrap p-align-start p-justify-start flex-gap-2\" [ngClass]=\"config.template | setTemplateClasses : ['horizontalAlignment', 'verticalAlignment']\">\n <ng-container *ngFor=\"let group of config.groups\">\n <div class=\"p-col\" [ngClass]=\"group.template | setTemplateClasses : ['row']\">\n <div class=\"smz__group_name\" *ngIf=\"group.showName\">{{ group.name }}</div>\n\n <div class=\"p-grid p-nogutter p-flex-wrap p-align-start p-justify-start flex-gap-2\">\n <ng-container *ngFor=\"let input of group.children\">\n <div *ngIf=\"input.isVisible\" class=\"input__control__wrapper p-col\" [ngClass]=\"input.template | setTemplateClasses : ['row']\">\n <ng-container *ngTemplateOutlet=\"inputTemplate; context: { $implicit: input }\"></ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n\n</ng-template>\n\n<ng-template #inputTemplate let-input>\n\n <ng-container *ngIf=\"input.type == controlTypes.PASSWORD\">\n <smz-input-password [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-password>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TEXT_MASK\">\n <smz-input-mask [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-mask>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TEXT\">\n <smz-input-text [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-text>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.LIST\">\n <smz-input-list [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-list>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.NUMBER\">\n <smz-input-number [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-number>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TEXT_AREA\">\n <smz-input-text-area [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-text-area>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CONTENT_MASK\">\n <smz-input-content-mask [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-content-mask>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.TAG_AREA\">\n <input-tag-area [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></input-tag-area>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.RADIO\">\n <smz-radio-button [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-radio-button>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.SWITCH\">\n <smz-input-switch [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-switch>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CHECKBOX\">\n <smz-checkbox [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-checkbox>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CHECKBOX_GROUP\">\n <smz-checkbox-group [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-checkbox-group>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CALENDAR\">\n <smz-calendar [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-calendar>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.DROPDOWN\">\n <smz-dropdown [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-dropdown>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.LINKED_DROPDOWN\">\n <smz-linked-dropdown [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-linked-dropdown>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.FILE\">\n <smz-file-upload [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [form]=\"form\" [behaviors]=\"config.behaviors\"></smz-file-upload>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.CURRENCY\">\n <smz-input-currency [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-input-currency>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.MULTI_SELECT\">\n <smz-multi-select [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-multi-select>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.LINKED_MULTISELECT\">\n <smz-linked-multi-select [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [formId]=\"config.formId\" [behaviors]=\"config.behaviors\"></smz-linked-multi-select>\n </ng-container>\n\n <ng-container *ngIf=\"input.type == controlTypes.COLOR_PICKER\">\n <smz-color-picker [input]=\"input\" [control]=\"form.controls[input.propertyName]\" [behaviors]=\"config.behaviors\"></smz-color-picker>\n </ng-container>\n\n</ng-template>\n", components: [{ type: InputPasswordComponent, selector: "smz-input-password", inputs: ["input", "control", "behaviors"] }, { type: InputMaskComponent, selector: "smz-input-mask", inputs: ["input", "control", "behaviors"] }, { type: InputTextComponent, selector: "smz-input-text", inputs: ["input", "control", "behaviors"] }, { type: InputListComponent, selector: "smz-input-list", inputs: ["input", "control", "behaviors"] }, { type: InputNumberComponent, selector: "smz-input-number", inputs: ["input", "control", "behaviors"] }, { type: InputTextAreaComponent, selector: "smz-input-text-area", inputs: ["input", "control", "behaviors"] }, { type: InputContentMaskComponent, selector: "smz-input-content-mask", inputs: ["input", "control", "behaviors"] }, { type: InputTagAreaComponent, selector: "input-tag-area", inputs: ["input", "control", "behaviors"] }, { type: RadioButtonComponent, selector: "smz-radio-button", inputs: ["input", "control", "behaviors"] }, { type: InputSwitchComponent, selector: "smz-input-switch", inputs: ["input", "control", "behaviors"] }, { type: CheckBoxComponent, selector: "smz-checkbox", inputs: ["input", "formId", "control", "behaviors"] }, { type: CheckBoxGroupComponent, selector: "smz-checkbox-group", inputs: ["input", "control", "behaviors"] }, { type: CalendarComponent, selector: "smz-calendar", inputs: ["input", "control", "behaviors"] }, { type: DropdownComponent, selector: "smz-dropdown", inputs: ["input", "formId", "control", "behaviors"] }, { type: LinkedDropdownComponent, selector: "smz-linked-dropdown", inputs: ["input", "formId", "control", "behaviors"] }, { type: FileUploadComponent, selector: "smz-file-upload", inputs: ["input", "form", "control", "behaviors"], outputs: ["selectChange"] }, { type: InputCurrencyComponent, selector: "smz-input-currency", inputs: ["input", "control", "behaviors"] }, { type: MultiSelectComponent, selector: "smz-multi-select", inputs: ["input", "control", "behaviors"] }, { type: LinkedMultiSelectComponent, selector: "smz-linked-multi-select", inputs: ["input", "formId", "control", "behaviors"] }, { type: ColorPickerComponent, selector: "smz-color-picker", inputs: ["input", "control", "behaviors"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: FormFocusFirstInputDirective, selector: "[focusFirstInput]", inputs: ["focus"] }, { type: i1__namespace$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "setTemplateClasses": SetTemplateClassesPipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
4068
4120
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: FormGroupComponent, decorators: [{
|
|
4069
4121
|
type: i0.Component,
|
|
4070
4122
|
args: [{
|
|
@@ -4076,6 +4128,8 @@
|
|
|
4076
4128
|
type: i0.Input
|
|
4077
4129
|
}], statusChanges: [{
|
|
4078
4130
|
type: i0.Output
|
|
4131
|
+
}], changed: [{
|
|
4132
|
+
type: i0.Output
|
|
4079
4133
|
}], submit: [{
|
|
4080
4134
|
type: i0.Output
|
|
4081
4135
|
}] } });
|
|
@@ -4757,7 +4811,7 @@
|
|
|
4757
4811
|
return InputListDialogCrudComponent;
|
|
4758
4812
|
}());
|
|
4759
4813
|
InputListDialogCrudComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: InputListDialogCrudComponent, deps: [{ token: DialogCrudStateService }, { token: i2__namespace$2.DynamicDialogConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4760
|
-
InputListDialogCrudComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputListDialogCrudComponent, selector: "smz-input-list-dialog-crud", viewQueries: [{ propertyName: "formComponent", first: true, predicate: ["formComponent"], descendants: true }], ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"form != null\">\n <div class=\"p-grid p-nogutter p-align-start p-justify-start\">\n <smz-form-group class=\"p-col\" #formComponent [config]=\"form\" furyClickStopPropagation></smz-form-group>\n <div class=\"w-full p-grid p-nogutter p-align-start p-justify-end\">\n <button pButton (click)=\"confirm()\" type=\"button\" [disabled]=\"!formComponent.isValid\" icon=\"pi pi-check\" label=\"Confirmar\" styleClass=\"p-mr-2\"></button>\n </div>\n </div>\n </ng-container>\n ", isInline: true, components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "submit"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickStopPropagationDirective, selector: "[furyClickStopPropagation]" }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
|
|
4814
|
+
InputListDialogCrudComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputListDialogCrudComponent, selector: "smz-input-list-dialog-crud", viewQueries: [{ propertyName: "formComponent", first: true, predicate: ["formComponent"], descendants: true }], ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"form != null\">\n <div class=\"p-grid p-nogutter p-align-start p-justify-start\">\n <smz-form-group class=\"p-col\" #formComponent [config]=\"form\" furyClickStopPropagation></smz-form-group>\n <div class=\"w-full p-grid p-nogutter p-align-start p-justify-end\">\n <button pButton (click)=\"confirm()\" type=\"button\" [disabled]=\"!formComponent.isValid\" icon=\"pi pi-check\" label=\"Confirmar\" styleClass=\"p-mr-2\"></button>\n </div>\n </div>\n </ng-container>\n ", isInline: true, components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickStopPropagationDirective, selector: "[furyClickStopPropagation]" }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
|
|
4761
4815
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: InputListDialogCrudComponent, decorators: [{
|
|
4762
4816
|
type: i0.Component,
|
|
4763
4817
|
args: [{
|
|
@@ -4816,7 +4870,7 @@
|
|
|
4816
4870
|
return InputListInlineCrudComponent;
|
|
4817
4871
|
}());
|
|
4818
4872
|
InputListInlineCrudComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: InputListInlineCrudComponent, deps: [{ token: DialogCrudStateService }, { token: i2__namespace$2.DynamicDialogConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4819
|
-
InputListInlineCrudComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputListInlineCrudComponent, selector: "smz-input-list-inline-crud", viewQueries: [{ propertyName: "formComponent", first: true, predicate: ["formComponent"], descendants: true }], ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"form != null\">\n <smz-form-group #formComponent [config]=\"form\" furyClickStopPropagation></smz-form-group>\n <button pButton (click)=\"confirm()\" type=\"button\" [disabled]=\"!formComponent.isValid\" icon=\"pi pi-check\" label=\"Confirmar\" styleClass=\"p-mr-2\"></button>\n </ng-container>\n ", isInline: true, components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "submit"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickStopPropagationDirective, selector: "[furyClickStopPropagation]" }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
|
|
4873
|
+
InputListInlineCrudComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputListInlineCrudComponent, selector: "smz-input-list-inline-crud", viewQueries: [{ propertyName: "formComponent", first: true, predicate: ["formComponent"], descendants: true }], ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"form != null\">\n <smz-form-group #formComponent [config]=\"form\" furyClickStopPropagation></smz-form-group>\n <button pButton (click)=\"confirm()\" type=\"button\" [disabled]=\"!formComponent.isValid\" icon=\"pi pi-check\" label=\"Confirmar\" styleClass=\"p-mr-2\"></button>\n </ng-container>\n ", isInline: true, components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickStopPropagationDirective, selector: "[furyClickStopPropagation]" }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
|
|
4820
4874
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: InputListInlineCrudComponent, decorators: [{
|
|
4821
4875
|
type: i0.Component,
|
|
4822
4876
|
args: [{
|
|
@@ -4910,6 +4964,15 @@
|
|
|
4910
4964
|
mediumRegex: '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})',
|
|
4911
4965
|
strongRegex: '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,}).'
|
|
4912
4966
|
},
|
|
4967
|
+
_a$1[exports.SmzControlType.CONTENT_MASK] = {
|
|
4968
|
+
tagClass: 'text-green-500 font-bold',
|
|
4969
|
+
variableBegin: '{{',
|
|
4970
|
+
variableEnd: '}}',
|
|
4971
|
+
exportHtmlNewLine: false,
|
|
4972
|
+
quickActions: [],
|
|
4973
|
+
variableId: 'input__variable',
|
|
4974
|
+
inputClass: '',
|
|
4975
|
+
},
|
|
4913
4976
|
_a$1)
|
|
4914
4977
|
};
|
|
4915
4978
|
var NgxSmzFormsModule = /** @class */ (function () {
|
|
@@ -10535,6 +10598,7 @@
|
|
|
10535
10598
|
function SmzFormGroupBuilder(_formBuilder, group) {
|
|
10536
10599
|
this._formBuilder = _formBuilder;
|
|
10537
10600
|
this.group = group;
|
|
10601
|
+
this.defaultConfig = GlobalInjector.instance.get(SmzDialogsConfig);
|
|
10538
10602
|
}
|
|
10539
10603
|
SmzFormGroupBuilder.prototype.setLayout = function (breakpoint, colType) {
|
|
10540
10604
|
var template = getSmzTemplate(breakpoint, colType);
|
|
@@ -10765,17 +10829,8 @@
|
|
|
10765
10829
|
if (label == null) {
|
|
10766
10830
|
throw Error('Label is required for contentMask');
|
|
10767
10831
|
}
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
defaultValue: defaultValue,
|
|
10771
|
-
quickActions: [],
|
|
10772
|
-
variableId: 'input__variable',
|
|
10773
|
-
inputClass: 'smz-input-content-mask',
|
|
10774
|
-
tagClass: '',
|
|
10775
|
-
variableBegin: '{{',
|
|
10776
|
-
variableEnd: '}}',
|
|
10777
|
-
exportHtmlNewLine: false
|
|
10778
|
-
};
|
|
10832
|
+
var defaults = this.defaultConfig.forms.controlTypes[exports.SmzControlType.CONTENT_MASK];
|
|
10833
|
+
input = Object.assign(Object.assign({}, defaults), { propertyName: property, type: exports.SmzControlType.CONTENT_MASK, name: label, defaultValue: defaultValue });
|
|
10779
10834
|
this.group.children.push(input);
|
|
10780
10835
|
}
|
|
10781
10836
|
else {
|
|
@@ -12122,7 +12177,7 @@
|
|
|
12122
12177
|
formId: angular2Uuid.UUID.UUID(),
|
|
12123
12178
|
groups: [],
|
|
12124
12179
|
template: Object.assign({ extraSmall: { horizontalAlignment: 'justify-content-between', verticalAlignment: 'align-items-start' }, small: { horizontalAlignment: 'justify-content-between', verticalAlignment: 'align-items-start' } }, (_b = (_a = this.defaultConfig) === null || _a === void 0 ? void 0 : _a.forms) === null || _b === void 0 ? void 0 : _b.formTemplates),
|
|
12125
|
-
behaviors: Object.assign({ avoidFocusOnLoad: false, debounceTime: 400, flattenResponse: true, runCustomFunctionsOnLoad: false, skipFunctionAfterNextEmit: false, showErrorsMethod: 'touched' }, (_d = (_c = this.defaultConfig) === null || _c === void 0 ? void 0 : _c.forms) === null || _d === void 0 ? void 0 : _d.behaviors),
|
|
12180
|
+
behaviors: Object.assign({ avoidFocusOnLoad: false, debounceTime: 400, flattenResponse: true, runCustomFunctionsOnLoad: false, skipFunctionAfterNextEmit: false, skipEmitChangesOnLoad: false, showErrorsMethod: 'touched' }, (_d = (_c = this.defaultConfig) === null || _c === void 0 ? void 0 : _c.forms) === null || _d === void 0 ? void 0 : _d.behaviors),
|
|
12126
12181
|
};
|
|
12127
12182
|
this.createdByUiDefinitions = false;
|
|
12128
12183
|
if (state != null) {
|
|
@@ -12149,6 +12204,24 @@
|
|
|
12149
12204
|
this._state.behaviors.debounceTime = debouceTime;
|
|
12150
12205
|
return this;
|
|
12151
12206
|
};
|
|
12207
|
+
SmzFormBuilder.prototype.emitChangesOnFocusExit = function () {
|
|
12208
|
+
this._state.behaviors.updateOn = 'blur';
|
|
12209
|
+
this._state.behaviors.skipEmitChangesOnLoad = true;
|
|
12210
|
+
return this;
|
|
12211
|
+
};
|
|
12212
|
+
// public EmitChangesOnSubmit(): SmzFormBuilder<TResponse> {
|
|
12213
|
+
// this._state.behaviors.updateOn = 'submit';
|
|
12214
|
+
// this._state.behaviors.skipEmitChangesOnLoad = true;
|
|
12215
|
+
// return this;
|
|
12216
|
+
// }
|
|
12217
|
+
SmzFormBuilder.prototype.emitChangesOnAllChanges = function () {
|
|
12218
|
+
this._state.behaviors.updateOn = 'change';
|
|
12219
|
+
return this;
|
|
12220
|
+
};
|
|
12221
|
+
SmzFormBuilder.prototype.avoidEmitChangesOnLoad = function () {
|
|
12222
|
+
this._state.behaviors.skipEmitChangesOnLoad = true;
|
|
12223
|
+
return this;
|
|
12224
|
+
};
|
|
12152
12225
|
Object.defineProperty(SmzFormBuilder.prototype, "dialog", {
|
|
12153
12226
|
get: function () {
|
|
12154
12227
|
return this._dialogBuilder;
|
|
@@ -12590,11 +12663,61 @@
|
|
|
12590
12663
|
return SmzDialogUiDefinitionBuilder;
|
|
12591
12664
|
}(SmzBaseUiDefinitionBuilder));
|
|
12592
12665
|
|
|
12593
|
-
var
|
|
12666
|
+
var SmzBuilderUtilities = /** @class */ (function () {
|
|
12667
|
+
function SmzBuilderUtilities() {
|
|
12668
|
+
this.cache = {
|
|
12669
|
+
if: { isActive: false, data: null }
|
|
12670
|
+
};
|
|
12671
|
+
}
|
|
12672
|
+
SmzBuilderUtilities.prototype.if = function (condition) {
|
|
12673
|
+
if (this.cache.if.isActive)
|
|
12674
|
+
throw new Error("You cannot call more than one condition method at the same time.");
|
|
12675
|
+
// Registrando flag de method condicional em execução
|
|
12676
|
+
this.cache.if.isActive = true;
|
|
12677
|
+
// Se a condição for nula
|
|
12678
|
+
if (!condition) {
|
|
12679
|
+
// Preparar modelo de backup para o endif retornar dados originais descartando todos os dados feitos pelos builders entre o IF e o ENDIF
|
|
12680
|
+
this.cache.if.data = cloneDeep__default["default"](this.that);
|
|
12681
|
+
}
|
|
12682
|
+
return this.that;
|
|
12683
|
+
};
|
|
12684
|
+
Object.defineProperty(SmzBuilderUtilities.prototype, "endIf", {
|
|
12685
|
+
get: function () {
|
|
12686
|
+
var data = conclude('endif', this.cache.if, this.that);
|
|
12687
|
+
// Limpando cache do modelo que seguirá
|
|
12688
|
+
data['cache'].data = null;
|
|
12689
|
+
data['cache'].if.isActive = false;
|
|
12690
|
+
return data;
|
|
12691
|
+
},
|
|
12692
|
+
enumerable: false,
|
|
12693
|
+
configurable: true
|
|
12694
|
+
});
|
|
12695
|
+
return SmzBuilderUtilities;
|
|
12696
|
+
}());
|
|
12697
|
+
function conclude(methodName, cache, that) {
|
|
12698
|
+
if (!cache.isActive)
|
|
12699
|
+
throw new Error("You cannot call " + methodName + " without calling the opening method first.");
|
|
12700
|
+
if (cache.data != null) {
|
|
12701
|
+
// Pegando modelo original sem as alterações feitas
|
|
12702
|
+
var newData = cache.data;
|
|
12703
|
+
// Retornando backup sem as alterações
|
|
12704
|
+
return newData;
|
|
12705
|
+
}
|
|
12706
|
+
else {
|
|
12707
|
+
// Retornando modelo com as alterações
|
|
12708
|
+
return that;
|
|
12709
|
+
}
|
|
12710
|
+
}
|
|
12711
|
+
|
|
12712
|
+
var SmzDialogBuilder = /** @class */ (function (_super) {
|
|
12713
|
+
__extends(SmzDialogBuilder, _super);
|
|
12594
12714
|
function SmzDialogBuilder() {
|
|
12715
|
+
var _this = this;
|
|
12595
12716
|
var _a, _b, _c, _d, _e, _f;
|
|
12596
|
-
|
|
12597
|
-
|
|
12717
|
+
_this = _super.call(this) || this;
|
|
12718
|
+
_this.that = _this;
|
|
12719
|
+
_this.defaultConfig = GlobalInjector$2.instance.get(SmzDialogsConfig);
|
|
12720
|
+
_this._state = {
|
|
12598
12721
|
title: null,
|
|
12599
12722
|
callbacks: {
|
|
12600
12723
|
onCancel: null,
|
|
@@ -12606,12 +12729,13 @@
|
|
|
12606
12729
|
},
|
|
12607
12730
|
customButtons: [],
|
|
12608
12731
|
customButtonsOrder: 'last',
|
|
12609
|
-
behaviors: Object.assign({ showCancelButton: true, showConfirmButton: true, showCloseButton: true, showOkButton: false, showSaveButton: false, confirmOnEnter: false, showMaximizeButton: false, useAdvancedResponse: false, closeOnEscape: false, showHeader: true, showFooter: true, dismissableMask: false, contentPadding: '1.5em', baseZIndex: 0, includeComponentResponses: false }, (_b = (_a =
|
|
12610
|
-
builtInButtons: Object.assign({ confirmName: 'CONFIRMAR', confirmDependsOnValidation: true, cancelName: 'CANCELAR', cancelClass: 'p-button-outlined', okName: 'OK', okDependsOnValidation: false }, (_d = (_c =
|
|
12611
|
-
dialogTemplate: Object.assign({ extraSmall: { row: 'col-12' }, large: { row: 'col-8' }, extraLarge: { row: 'col-6' } }, (_f = (_e =
|
|
12732
|
+
behaviors: Object.assign({ showCancelButton: true, showConfirmButton: true, showCloseButton: true, showOkButton: false, showSaveButton: false, confirmOnEnter: false, showMaximizeButton: false, useAdvancedResponse: false, closeOnEscape: false, showHeader: true, showFooter: true, dismissableMask: false, contentPadding: '1.5em', baseZIndex: 0, includeComponentResponses: false }, (_b = (_a = _this.defaultConfig) === null || _a === void 0 ? void 0 : _a.dialogs) === null || _b === void 0 ? void 0 : _b.behaviors),
|
|
12733
|
+
builtInButtons: Object.assign({ confirmName: 'CONFIRMAR', confirmDependsOnValidation: true, cancelName: 'CANCELAR', cancelClass: 'p-button-outlined', okName: 'OK', okDependsOnValidation: false }, (_d = (_c = _this.defaultConfig) === null || _c === void 0 ? void 0 : _c.dialogs) === null || _d === void 0 ? void 0 : _d.builtInButtons),
|
|
12734
|
+
dialogTemplate: Object.assign({ extraSmall: { row: 'col-12' }, large: { row: 'col-8' }, extraLarge: { row: 'col-6' } }, (_f = (_e = _this.defaultConfig) === null || _e === void 0 ? void 0 : _e.dialogs) === null || _f === void 0 ? void 0 : _f.dialogTemplate),
|
|
12612
12735
|
features: []
|
|
12613
12736
|
};
|
|
12614
|
-
|
|
12737
|
+
_this.createdByUiDefinitions = false;
|
|
12738
|
+
return _this;
|
|
12615
12739
|
}
|
|
12616
12740
|
SmzDialogBuilder.prototype.setTitle = function (title) {
|
|
12617
12741
|
if (title === void 0) { title = null; }
|
|
@@ -12746,7 +12870,7 @@
|
|
|
12746
12870
|
return this._state;
|
|
12747
12871
|
};
|
|
12748
12872
|
return SmzDialogBuilder;
|
|
12749
|
-
}());
|
|
12873
|
+
}(SmzBuilderUtilities));
|
|
12750
12874
|
var SmzDialogComponentBuilder = /** @class */ (function () {
|
|
12751
12875
|
function SmzDialogComponentBuilder(_dialogBuilder, feature) {
|
|
12752
12876
|
this._dialogBuilder = _dialogBuilder;
|
|
@@ -13423,7 +13547,7 @@
|
|
|
13423
13547
|
return FaqsContentComponent;
|
|
13424
13548
|
}());
|
|
13425
13549
|
FaqsContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: FaqsContentComponent, deps: [{ token: FaqsManagerService }, { token: i0__namespace.ChangeDetectorRef }, { token: SmzDialogsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13426
|
-
FaqsContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: FaqsContentComponent, selector: "smz-faqs-content", inputs: { items: "items" }, ngImport: i0__namespace, template: "<div class=\"p-grid\">\n\n <div class=\"p-col-12\">\n <h3>{{ manager.config.placeholders.searchTitle }}</h3>\n <div class=\"p-inputgroup\">\n <span class=\"p-inputgroup-addon\"><i class=\"fas fa-search\"></i></span>\n <input type=\"text\" [(ngModel)]=\"keywords\" pInputText [placeholder]=\"manager.config.placeholders.searchPlaceholder\">\n <button pButton [disabled]=\"keywords === ''\" (click)=\"keywords = ''\" type=\"button\" icon=\"fas fa-times\" class=\"p-button-warn\"></button>\n </div>\n </div>\n\n <div class=\"p-col-12\">\n <ng-container *ngIf=\"(items | searchFaqs : keywords) as filtered\">\n <ng-container *ngIf=\"filtered.length > 0; else emptyTemplate\">\n <h3>{{ manager.config.placeholders.contentTitle }}</h3>\n <p-accordion>\n <ng-container *ngFor=\"let item of filtered\">\n <p-accordionTab [header]=\"item.question\" [selected]=\"item.metadata?.selected\">\n <div *ngIf=\"manager.config.creationClaim | rbkCanAccess\" class=\"faqs__actions\">\n <a class=\"clickable hvr-icon-push mr-2\" (click)=\"update(item)\"><i class=\"far fa-edit hvr-icon\"></i></a>\n <a class=\"clickable hvr-icon-push\" (click)=\"delete(item)\"><i class=\"far fa-trash-alt hvr-icon\"></i></a>\n </div>\n <div class=\"faqs__answer\" [innerHTML]=\"(item.answer | highlight : keywords) | safeHtml\"></div>\n </p-accordionTab>\n </ng-container>\n </p-accordion>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"p-col-12\">\n <ng-container *ngIf=\"(manager.config.creationClaim | rbkCanAccess) && formConfig != null\">\n <h3>{{ manager.config.placeholders.creationTitle }}</h3>\n <smz-form-group #creationComponent [config]=\"formConfig\"></smz-form-group>\n <button pButton type=\"button\" class=\"p-button p-button-ghost\" label=\"ENVIAR\" [disabled]=\"!creationComponent.isValid\" (click)=\"create(creationComponent)\"></button>\n </ng-container>\n </div>\n</div>\n\n\n<ng-template #emptyTemplate>\n <smz-icon-message\n [message]=\"manager.config.placeholders.emptyMessage\"\n [comment]=\"(manager.config.creationClaim | rbkCanAccess) ?\n manager.config.placeholders.creationMessage :\n (keywords === '') ?\n manager.config.placeholders.supportMessage :\n manager.config.placeholders.noSearchResultsMessage\"\n >\n </smz-icon-message>\n</ng-template>\n\n", styles: [".faqs__answer{white-space:pre-wrap}.faqs__actions{width:100%;text-align:right;padding:0 0 10px}.p-input-icon-left,.p-input-icon-right{position:relative}.ui-float-icon{position:absolute;top:50%;margin-top:-.5rem;left:.5rem;color:#6c757d}.p-input-icon-left>.ui-inputtext{padding-left:2rem;border-left-width:1px}\n"], components: [{ type: i3__namespace$5.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { type: i3__namespace$5.AccordionTab, selector: "p-accordionTab", inputs: ["header", "disabled", "cache", "transitionOptions", "selected"], outputs: ["selectedChange"] }, { type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "submit"] }, { type: SmzIconMessageComponent, selector: "smz-icon-message", inputs: ["icon", "message", "comment"] }], directives: [{ type: i1__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace.InputText, selector: "[pInputText]" }, { type: i1__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "searchFaqs": SearchFaqsPipe, "rbkCanAccess": RbkCanAccessPipe, "safeHtml": SafeHtmlPipe, "highlight": HighlightSearch } });
|
|
13550
|
+
FaqsContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: FaqsContentComponent, selector: "smz-faqs-content", inputs: { items: "items" }, ngImport: i0__namespace, template: "<div class=\"p-grid\">\n\n <div class=\"p-col-12\">\n <h3>{{ manager.config.placeholders.searchTitle }}</h3>\n <div class=\"p-inputgroup\">\n <span class=\"p-inputgroup-addon\"><i class=\"fas fa-search\"></i></span>\n <input type=\"text\" [(ngModel)]=\"keywords\" pInputText [placeholder]=\"manager.config.placeholders.searchPlaceholder\">\n <button pButton [disabled]=\"keywords === ''\" (click)=\"keywords = ''\" type=\"button\" icon=\"fas fa-times\" class=\"p-button-warn\"></button>\n </div>\n </div>\n\n <div class=\"p-col-12\">\n <ng-container *ngIf=\"(items | searchFaqs : keywords) as filtered\">\n <ng-container *ngIf=\"filtered.length > 0; else emptyTemplate\">\n <h3>{{ manager.config.placeholders.contentTitle }}</h3>\n <p-accordion>\n <ng-container *ngFor=\"let item of filtered\">\n <p-accordionTab [header]=\"item.question\" [selected]=\"item.metadata?.selected\">\n <div *ngIf=\"manager.config.creationClaim | rbkCanAccess\" class=\"faqs__actions\">\n <a class=\"clickable hvr-icon-push mr-2\" (click)=\"update(item)\"><i class=\"far fa-edit hvr-icon\"></i></a>\n <a class=\"clickable hvr-icon-push\" (click)=\"delete(item)\"><i class=\"far fa-trash-alt hvr-icon\"></i></a>\n </div>\n <div class=\"faqs__answer\" [innerHTML]=\"(item.answer | highlight : keywords) | safeHtml\"></div>\n </p-accordionTab>\n </ng-container>\n </p-accordion>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"p-col-12\">\n <ng-container *ngIf=\"(manager.config.creationClaim | rbkCanAccess) && formConfig != null\">\n <h3>{{ manager.config.placeholders.creationTitle }}</h3>\n <smz-form-group #creationComponent [config]=\"formConfig\"></smz-form-group>\n <button pButton type=\"button\" class=\"p-button p-button-ghost\" label=\"ENVIAR\" [disabled]=\"!creationComponent.isValid\" (click)=\"create(creationComponent)\"></button>\n </ng-container>\n </div>\n</div>\n\n\n<ng-template #emptyTemplate>\n <smz-icon-message\n [message]=\"manager.config.placeholders.emptyMessage\"\n [comment]=\"(manager.config.creationClaim | rbkCanAccess) ?\n manager.config.placeholders.creationMessage :\n (keywords === '') ?\n manager.config.placeholders.supportMessage :\n manager.config.placeholders.noSearchResultsMessage\"\n >\n </smz-icon-message>\n</ng-template>\n\n", styles: [".faqs__answer{white-space:pre-wrap}.faqs__actions{width:100%;text-align:right;padding:0 0 10px}.p-input-icon-left,.p-input-icon-right{position:relative}.ui-float-icon{position:absolute;top:50%;margin-top:-.5rem;left:.5rem;color:#6c757d}.p-input-icon-left>.ui-inputtext{padding-left:2rem;border-left-width:1px}\n"], components: [{ type: i3__namespace$5.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { type: i3__namespace$5.AccordionTab, selector: "p-accordionTab", inputs: ["header", "disabled", "cache", "transitionOptions", "selected"], outputs: ["selectedChange"] }, { type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }, { type: SmzIconMessageComponent, selector: "smz-icon-message", inputs: ["icon", "message", "comment"] }], directives: [{ type: i1__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace.InputText, selector: "[pInputText]" }, { type: i1__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "searchFaqs": SearchFaqsPipe, "rbkCanAccess": RbkCanAccessPipe, "safeHtml": SafeHtmlPipe, "highlight": HighlightSearch } });
|
|
13427
13551
|
__decorate([
|
|
13428
13552
|
Confirmable('Confirma a criação desta pergunta/resposta ?', 'Aviso')
|
|
13429
13553
|
], FaqsContentComponent.prototype, "create", null);
|
|
@@ -14477,7 +14601,7 @@
|
|
|
14477
14601
|
return LoginComponent;
|
|
14478
14602
|
}());
|
|
14479
14603
|
LoginComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: LoginComponent, deps: [{ token: SmzLayoutsConfig }, { token: i1__namespace$4.Store }, { token: NgxRbkUtilsConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
14480
|
-
LoginComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: LoginComponent, selector: "smz-ui-login", ngImport: i0__namespace, template: "<div class=\"login-page p-d-flex p-ai-center p-jc-center\">\n <div>\n <div class=\"p-d-flex p-flex-column\">\n <div class=\"login-card-container p-p-5\">\n <div class=\"p-d-flex p-flex-column login-container p-align-center\">\n <img class=\"login-logo\" alt=\"\" [src]=\"(appLogo$ | async).vertical\" />\n <p class=\"g-mb-2\">Entre com as suas credenciais:</p>\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"form\"></smz-form-group>\n <!-- <a class=\"link g-mb-2 g-mt-1\">Esqueceu a senha?</a> -->\n <button pButton class=\"p-col-12\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [".login-page{background:var(--primary-color);overflow-y:auto;position:fixed;top:0;bottom:0;left:0;right:0}.login-card-container{background:var(--surface-b);color:var(--text-color);border-radius:6px;box-shadow:0 2.8px 2.2px #00000005,0 6.7px 5.3px #00000007,0 12.5px 10px #00000009,0 22.3px 17.9px #0000000b,0 41.8px 33.4px #0000000d,0 100px 80px #00000012}.login-logo{width:50%}\n"], components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "submit"] }], directives: [{ type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i1__namespace.AsyncPipe } });
|
|
14604
|
+
LoginComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: LoginComponent, selector: "smz-ui-login", ngImport: i0__namespace, template: "<div class=\"login-page p-d-flex p-ai-center p-jc-center\">\n <div>\n <div class=\"p-d-flex p-flex-column\">\n <div class=\"login-card-container p-p-5\">\n <div class=\"p-d-flex p-flex-column login-container p-align-center\">\n <img class=\"login-logo\" alt=\"\" [src]=\"(appLogo$ | async).vertical\" />\n <p class=\"g-mb-2\">Entre com as suas credenciais:</p>\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"form\"></smz-form-group>\n <!-- <a class=\"link g-mb-2 g-mt-1\">Esqueceu a senha?</a> -->\n <button pButton class=\"p-col-12\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [".login-page{background:var(--primary-color);overflow-y:auto;position:fixed;top:0;bottom:0;left:0;right:0}.login-card-container{background:var(--surface-b);color:var(--text-color);border-radius:6px;box-shadow:0 2.8px 2.2px #00000005,0 6.7px 5.3px #00000007,0 12.5px 10px #00000009,0 22.3px 17.9px #0000000b,0 41.8px 33.4px #0000000d,0 100px 80px #00000012}.login-logo{width:50%}\n"], components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i1__namespace.AsyncPipe } });
|
|
14481
14605
|
__decorate([
|
|
14482
14606
|
i1$4.Select(LayoutUiSelectors.appContentLogo)
|
|
14483
14607
|
], LoginComponent.prototype, "appLogo$", void 0);
|
|
@@ -18209,9 +18333,13 @@
|
|
|
18209
18333
|
};
|
|
18210
18334
|
return SmzDataTransformColumnBuilder;
|
|
18211
18335
|
}(SmzBaseColumnBuilder));
|
|
18212
|
-
var SmzColumnCollectionBuilder = /** @class */ (function () {
|
|
18336
|
+
var SmzColumnCollectionBuilder = /** @class */ (function (_super) {
|
|
18337
|
+
__extends(SmzColumnCollectionBuilder, _super);
|
|
18213
18338
|
function SmzColumnCollectionBuilder(_tableBuilder) {
|
|
18214
|
-
|
|
18339
|
+
var _this = _super.call(this) || this;
|
|
18340
|
+
_this._tableBuilder = _tableBuilder;
|
|
18341
|
+
_this.that = _this;
|
|
18342
|
+
return _this;
|
|
18215
18343
|
}
|
|
18216
18344
|
SmzColumnCollectionBuilder.prototype.text = function (field, header, width) {
|
|
18217
18345
|
if (width === void 0) { width = 'auto'; }
|
|
@@ -18245,7 +18373,7 @@
|
|
|
18245
18373
|
configurable: true
|
|
18246
18374
|
});
|
|
18247
18375
|
return SmzColumnCollectionBuilder;
|
|
18248
|
-
}());
|
|
18376
|
+
}(SmzBuilderUtilities));
|
|
18249
18377
|
|
|
18250
18378
|
var SmzMenuTableBuilder = /** @class */ (function () {
|
|
18251
18379
|
function SmzMenuTableBuilder(_tableBuilder) {
|
|
@@ -23722,45 +23850,6 @@
|
|
|
23722
23850
|
* Public API Surface of ngx-rbk-utils
|
|
23723
23851
|
*/
|
|
23724
23852
|
|
|
23725
|
-
var SmzConditionalBuilder = /** @class */ (function () {
|
|
23726
|
-
function SmzConditionalBuilder() {
|
|
23727
|
-
}
|
|
23728
|
-
SmzConditionalBuilder.prototype.if = function (condition) {
|
|
23729
|
-
if (this._currentConditionMethod != null)
|
|
23730
|
-
throw new Error("You cannot call more than one condition method at the same time.");
|
|
23731
|
-
// Registrando flag de method condicional em execução
|
|
23732
|
-
this._currentConditionMethod = 'if';
|
|
23733
|
-
// Se a condição for nula
|
|
23734
|
-
if (!condition) {
|
|
23735
|
-
// Preparar modelo de backup para o endif retornar dados originais descartando todos os dados feitos pelos builders entre o IF e o ENDIF
|
|
23736
|
-
this.backup = cloneDeep__default["default"](this.that);
|
|
23737
|
-
}
|
|
23738
|
-
return this.that;
|
|
23739
|
-
};
|
|
23740
|
-
Object.defineProperty(SmzConditionalBuilder.prototype, "endIf", {
|
|
23741
|
-
get: function () {
|
|
23742
|
-
if (this._currentConditionMethod == null)
|
|
23743
|
-
throw new Error("You cannot call endIf without calling a condition method first.");
|
|
23744
|
-
if (this.backup != null) {
|
|
23745
|
-
// Pegando modelo original sem as alterações feitas
|
|
23746
|
-
var newThat = this.backup;
|
|
23747
|
-
// Limpando cache
|
|
23748
|
-
this.backup = null;
|
|
23749
|
-
this._currentConditionMethod = null;
|
|
23750
|
-
// Retornando backup sem as alterações
|
|
23751
|
-
return newThat;
|
|
23752
|
-
}
|
|
23753
|
-
else {
|
|
23754
|
-
// Retornando modelo com as alterações
|
|
23755
|
-
return this.that;
|
|
23756
|
-
}
|
|
23757
|
-
},
|
|
23758
|
-
enumerable: false,
|
|
23759
|
-
configurable: true
|
|
23760
|
-
});
|
|
23761
|
-
return SmzConditionalBuilder;
|
|
23762
|
-
}());
|
|
23763
|
-
|
|
23764
23853
|
var SmzDocumentBaseCellBuilder = /** @class */ (function (_super) {
|
|
23765
23854
|
__extends(SmzDocumentBaseCellBuilder, _super);
|
|
23766
23855
|
function SmzDocumentBaseCellBuilder(_rowBuilder, _cell, _data, _documentBuilder) {
|
|
@@ -23795,7 +23884,7 @@
|
|
|
23795
23884
|
configurable: true
|
|
23796
23885
|
});
|
|
23797
23886
|
return SmzDocumentBaseCellBuilder;
|
|
23798
|
-
}(
|
|
23887
|
+
}(SmzBuilderUtilities));
|
|
23799
23888
|
|
|
23800
23889
|
var SmzCellTitleBuilder = /** @class */ (function (_super) {
|
|
23801
23890
|
__extends(SmzCellTitleBuilder, _super);
|
|
@@ -24227,6 +24316,7 @@
|
|
|
24227
24316
|
var _this = _super.call(this) || this;
|
|
24228
24317
|
_this._documentBuilder = _documentBuilder;
|
|
24229
24318
|
_this._content = _content;
|
|
24319
|
+
_this.that = _this;
|
|
24230
24320
|
return _this;
|
|
24231
24321
|
}
|
|
24232
24322
|
SmzDocumentContentBuilder.prototype.row = function () {
|
|
@@ -24242,7 +24332,7 @@
|
|
|
24242
24332
|
configurable: true
|
|
24243
24333
|
});
|
|
24244
24334
|
return SmzDocumentContentBuilder;
|
|
24245
|
-
}(
|
|
24335
|
+
}(SmzBuilderUtilities));
|
|
24246
24336
|
var SmzDocumentRowBuilder = /** @class */ (function () {
|
|
24247
24337
|
function SmzDocumentRowBuilder(_contentBuilder, _row, _documentBuilder, _content) {
|
|
24248
24338
|
this._contentBuilder = _contentBuilder;
|
|
@@ -24336,6 +24426,7 @@
|
|
|
24336
24426
|
var _this = _super.call(this) || this;
|
|
24337
24427
|
_this._documentBuilder = _documentBuilder;
|
|
24338
24428
|
_this._viewer = _viewer;
|
|
24429
|
+
_this.that = _this;
|
|
24339
24430
|
return _this;
|
|
24340
24431
|
}
|
|
24341
24432
|
SmzDocumentViewerBuilder.prototype.setFilename = function (filename) {
|
|
@@ -24382,7 +24473,7 @@
|
|
|
24382
24473
|
configurable: true
|
|
24383
24474
|
});
|
|
24384
24475
|
return SmzDocumentViewerBuilder;
|
|
24385
|
-
}(
|
|
24476
|
+
}(SmzBuilderUtilities));
|
|
24386
24477
|
|
|
24387
24478
|
var pixelCmFactor = 28.346;
|
|
24388
24479
|
var SmzDocumentBuilder = /** @class */ (function (_super) {
|
|
@@ -24390,6 +24481,7 @@
|
|
|
24390
24481
|
function SmzDocumentBuilder(state) {
|
|
24391
24482
|
if (state === void 0) { state = null; }
|
|
24392
24483
|
var _this = _super.call(this) || this;
|
|
24484
|
+
_this.that = _this;
|
|
24393
24485
|
_this.defaultConfig = GlobalInjector$2.instance.get(NgxRbkUtilsConfig);
|
|
24394
24486
|
_this._colsCount = 0;
|
|
24395
24487
|
_this._isHeaderHeightUpdated = false;
|
|
@@ -24559,7 +24651,7 @@
|
|
|
24559
24651
|
return this._state;
|
|
24560
24652
|
};
|
|
24561
24653
|
return SmzDocumentBuilder;
|
|
24562
|
-
}(
|
|
24654
|
+
}(SmzBuilderUtilities));
|
|
24563
24655
|
function normalizeColspan(rows, row, totalColsCount) {
|
|
24564
24656
|
var debug = false; // row.cells.findIndex(x => (x.data as any)?.text?.value === 'COMPRADOR') !== -1;
|
|
24565
24657
|
var currentIndex = rows.findIndex(function (x) { return x.id === row.id; });
|
|
@@ -24605,9 +24697,13 @@
|
|
|
24605
24697
|
}
|
|
24606
24698
|
}
|
|
24607
24699
|
|
|
24608
|
-
var SmzMenuBuilder = /** @class */ (function () {
|
|
24700
|
+
var SmzMenuBuilder = /** @class */ (function (_super) {
|
|
24701
|
+
__extends(SmzMenuBuilder, _super);
|
|
24609
24702
|
function SmzMenuBuilder() {
|
|
24610
|
-
|
|
24703
|
+
var _this = _super.call(this) || this;
|
|
24704
|
+
_this.that = _this;
|
|
24705
|
+
_this._items = [];
|
|
24706
|
+
return _this;
|
|
24611
24707
|
}
|
|
24612
24708
|
SmzMenuBuilder.prototype.item = function (label, icon, tooltip) {
|
|
24613
24709
|
if (icon === void 0) { icon = null; }
|
|
@@ -24624,7 +24720,7 @@
|
|
|
24624
24720
|
return this._items;
|
|
24625
24721
|
};
|
|
24626
24722
|
return SmzMenuBuilder;
|
|
24627
|
-
}());
|
|
24723
|
+
}(SmzBuilderUtilities));
|
|
24628
24724
|
var SmzMenuItemBuilder = /** @class */ (function () {
|
|
24629
24725
|
function SmzMenuItemBuilder(_menuBuilder, _parent, _item) {
|
|
24630
24726
|
this._menuBuilder = _menuBuilder;
|