ngx-smz-ui 3.5.1 → 3.5.6
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 +240 -140
- 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-menu/menu-builder.js +5 -2
- package/esm2015/lib/builders/smz-tables/column-builder.js +5 -2
- package/esm2015/lib/modules/smz-documents/features/document-viewer/document-viewer.component.js +4 -2
- package/esm2015/lib/modules/smz-documents/services/smz-documents.service.js +6 -3
- package/esm2015/lib/modules/smz-faqs/components/faqs-content/faqs-content.component.js +1 -1
- 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-layouts/pages/login/login.component.js +1 -1
- package/fesm2015/ngx-smz-ui.js +164 -71
- 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-menu/menu-builder.d.ts +3 -1
- package/lib/builders/smz-tables/column-builder.d.ts +3 -1
- package/lib/modules/smz-documents/services/smz-documents.service.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 +1 -0
- package/lib/modules/smz-forms/models/smz-forms.d.ts +1 -0
- package/package.json +1 -1
- 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] = {
|
|
@@ -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: [{
|
|
@@ -9282,11 +9336,14 @@
|
|
|
9282
9336
|
SmzDocumentsService.prototype.setState = function (state) {
|
|
9283
9337
|
this.state = state;
|
|
9284
9338
|
};
|
|
9285
|
-
SmzDocumentsService.prototype.
|
|
9339
|
+
SmzDocumentsService.prototype.setPaperElement = function (paperElement) {
|
|
9340
|
+
this.paperElement = paperElement;
|
|
9341
|
+
};
|
|
9342
|
+
SmzDocumentsService.prototype.generate = function (action) {
|
|
9286
9343
|
var _this = this;
|
|
9287
9344
|
this.store.dispatch(new exports.ApplicationActions.StartGlobalLoading());
|
|
9288
9345
|
setTimeout(function () {
|
|
9289
|
-
_this.generatePdf(action,
|
|
9346
|
+
_this.generatePdf(action, _this.paperElement, _this.state).then(function () {
|
|
9290
9347
|
_this.store.dispatch(new exports.ApplicationActions.StopGlobalLoading());
|
|
9291
9348
|
});
|
|
9292
9349
|
}, 0);
|
|
@@ -9377,17 +9434,19 @@
|
|
|
9377
9434
|
this.documentService.setState(this.state);
|
|
9378
9435
|
};
|
|
9379
9436
|
SmzDocumentViewerComponent.prototype.ngAfterViewInit = function () {
|
|
9437
|
+
this.documentService.setPaperElement(this.paperElement);
|
|
9380
9438
|
};
|
|
9381
9439
|
SmzDocumentViewerComponent.prototype.goBack = function () {
|
|
9382
9440
|
this.location.back();
|
|
9383
9441
|
};
|
|
9384
9442
|
SmzDocumentViewerComponent.prototype.ngOnDestroy = function () {
|
|
9385
9443
|
this.documentService.setState(null);
|
|
9444
|
+
this.documentService.setPaperElement(null);
|
|
9386
9445
|
};
|
|
9387
9446
|
return SmzDocumentViewerComponent;
|
|
9388
9447
|
}());
|
|
9389
9448
|
SmzDocumentViewerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentViewerComponent, deps: [{ token: i0__namespace.ElementRef }, { token: SmzDocumentsService }, { token: i1__namespace.Location }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.Store }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9390
|
-
SmzDocumentViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: SmzDocumentViewerComponent, selector: "document-viewer", inputs: { state: "state" }, viewQueries: [{ propertyName: "paperElement", first: true, predicate: ["paper"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"p-grid p-nogutter p-align-center p-justify-start p-flex-column gap-2\" [ngClass]=\"state.viewer.container.styleClass\">\n\n <div class=\"p-grid p-nogutter p-align-start p-justify-start gap-2\">\n\n <ng-container *ngIf=\"state.viewer.zoom.isEnabled\">\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"ZOOM -\" (click)=\"documentService.lessZoom()\"></button>\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"100%\" (click)=\"documentService.restoreZoom()\"></button>\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"ZOOM +\" (click)=\"documentService.moreZoom()\"></button>\n </ng-container>\n\n <button *ngIf=\"state.viewer.open.isEnabled\" pButton type=\"button\" class=\"p-button p-button-success\" label=\"OPEN\" (click)=\"documentService.generate('open'
|
|
9449
|
+
SmzDocumentViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: SmzDocumentViewerComponent, selector: "document-viewer", inputs: { state: "state" }, viewQueries: [{ propertyName: "paperElement", first: true, predicate: ["paper"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"p-grid p-nogutter p-align-center p-justify-start p-flex-column gap-2\" [ngClass]=\"state.viewer.container.styleClass\">\n\n <div class=\"p-grid p-nogutter p-align-start p-justify-start gap-2\">\n\n <ng-container *ngIf=\"state.viewer.zoom.isEnabled\">\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"ZOOM -\" (click)=\"documentService.lessZoom()\"></button>\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"100%\" (click)=\"documentService.restoreZoom()\"></button>\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"ZOOM +\" (click)=\"documentService.moreZoom()\"></button>\n </ng-container>\n\n <button *ngIf=\"state.viewer.open.isEnabled\" pButton type=\"button\" class=\"p-button p-button-success\" label=\"OPEN\" (click)=\"documentService.generate('open')\"></button>\n <button *ngIf=\"state.viewer.print.isEnabled\" pButton type=\"button\" class=\"p-button p-button-success\" label=\"PRINT\" (click)=\"documentService.generate('print')\"></button>\n <button *ngIf=\"state.viewer.download.isEnabled\" pButton type=\"button\" class=\"p-button p-button-success\" label=\"DOWNLOAD\" (click)=\"documentService.generate('download')\"></button>\n </div>\n\n <div class=\"pager\" [ngClass]=\"state.viewer.paper.styleClass\"[ngStyle]=\"{ 'transform': 'scale(' + documentService.zoom + ')' }\">\n <div #paper [ngStyle]=\"{ 'font-family': state.globals.font.family }\">\n <ng-content select=\"header\"></ng-content>\n <ng-content select=\"content\"></ng-content>\n </div>\n </div>\n\n</div>", styles: [".pager{width:595.276pt;transform-origin:top center;transition:transform .1s ease-in-out;margin-top:0;margin-left:auto;margin-right:auto}.footer-container{position:absolute;bottom:calc(.5 * 28.346px);right:calc(.8 * 28.346px);font-size:\"0.8px\"}.sticky-header{position:absolute}\n"], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i1__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
9391
9450
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentViewerComponent, decorators: [{
|
|
9392
9451
|
type: i0.Component,
|
|
9393
9452
|
args: [{
|
|
@@ -12117,7 +12176,7 @@
|
|
|
12117
12176
|
formId: angular2Uuid.UUID.UUID(),
|
|
12118
12177
|
groups: [],
|
|
12119
12178
|
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),
|
|
12120
|
-
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),
|
|
12179
|
+
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),
|
|
12121
12180
|
};
|
|
12122
12181
|
this.createdByUiDefinitions = false;
|
|
12123
12182
|
if (state != null) {
|
|
@@ -12144,6 +12203,24 @@
|
|
|
12144
12203
|
this._state.behaviors.debounceTime = debouceTime;
|
|
12145
12204
|
return this;
|
|
12146
12205
|
};
|
|
12206
|
+
SmzFormBuilder.prototype.emitChangesOnFocusExit = function () {
|
|
12207
|
+
this._state.behaviors.updateOn = 'blur';
|
|
12208
|
+
this._state.behaviors.skipEmitChangesOnLoad = true;
|
|
12209
|
+
return this;
|
|
12210
|
+
};
|
|
12211
|
+
// public EmitChangesOnSubmit(): SmzFormBuilder<TResponse> {
|
|
12212
|
+
// this._state.behaviors.updateOn = 'submit';
|
|
12213
|
+
// this._state.behaviors.skipEmitChangesOnLoad = true;
|
|
12214
|
+
// return this;
|
|
12215
|
+
// }
|
|
12216
|
+
SmzFormBuilder.prototype.emitChangesOnAllChanges = function () {
|
|
12217
|
+
this._state.behaviors.updateOn = 'change';
|
|
12218
|
+
return this;
|
|
12219
|
+
};
|
|
12220
|
+
SmzFormBuilder.prototype.avoidEmitChangesOnLoad = function () {
|
|
12221
|
+
this._state.behaviors.skipEmitChangesOnLoad = true;
|
|
12222
|
+
return this;
|
|
12223
|
+
};
|
|
12147
12224
|
Object.defineProperty(SmzFormBuilder.prototype, "dialog", {
|
|
12148
12225
|
get: function () {
|
|
12149
12226
|
return this._dialogBuilder;
|
|
@@ -12585,11 +12662,61 @@
|
|
|
12585
12662
|
return SmzDialogUiDefinitionBuilder;
|
|
12586
12663
|
}(SmzBaseUiDefinitionBuilder));
|
|
12587
12664
|
|
|
12588
|
-
var
|
|
12665
|
+
var SmzBuilderUtilities = /** @class */ (function () {
|
|
12666
|
+
function SmzBuilderUtilities() {
|
|
12667
|
+
this.cache = {
|
|
12668
|
+
if: { isActive: false, data: null }
|
|
12669
|
+
};
|
|
12670
|
+
}
|
|
12671
|
+
SmzBuilderUtilities.prototype.if = function (condition) {
|
|
12672
|
+
if (this.cache.if.isActive)
|
|
12673
|
+
throw new Error("You cannot call more than one condition method at the same time.");
|
|
12674
|
+
// Registrando flag de method condicional em execução
|
|
12675
|
+
this.cache.if.isActive = true;
|
|
12676
|
+
// Se a condição for nula
|
|
12677
|
+
if (!condition) {
|
|
12678
|
+
// Preparar modelo de backup para o endif retornar dados originais descartando todos os dados feitos pelos builders entre o IF e o ENDIF
|
|
12679
|
+
this.cache.if.data = cloneDeep__default["default"](this.that);
|
|
12680
|
+
}
|
|
12681
|
+
return this.that;
|
|
12682
|
+
};
|
|
12683
|
+
Object.defineProperty(SmzBuilderUtilities.prototype, "endIf", {
|
|
12684
|
+
get: function () {
|
|
12685
|
+
var data = conclude('endif', this.cache.if, this.that);
|
|
12686
|
+
// Limpando cache do modelo que seguirá
|
|
12687
|
+
data['cache'].data = null;
|
|
12688
|
+
data['cache'].if.isActive = false;
|
|
12689
|
+
return data;
|
|
12690
|
+
},
|
|
12691
|
+
enumerable: false,
|
|
12692
|
+
configurable: true
|
|
12693
|
+
});
|
|
12694
|
+
return SmzBuilderUtilities;
|
|
12695
|
+
}());
|
|
12696
|
+
function conclude(methodName, cache, that) {
|
|
12697
|
+
if (!cache.isActive)
|
|
12698
|
+
throw new Error("You cannot call " + methodName + " without calling the opening method first.");
|
|
12699
|
+
if (cache.data != null) {
|
|
12700
|
+
// Pegando modelo original sem as alterações feitas
|
|
12701
|
+
var newData = cache.data;
|
|
12702
|
+
// Retornando backup sem as alterações
|
|
12703
|
+
return newData;
|
|
12704
|
+
}
|
|
12705
|
+
else {
|
|
12706
|
+
// Retornando modelo com as alterações
|
|
12707
|
+
return that;
|
|
12708
|
+
}
|
|
12709
|
+
}
|
|
12710
|
+
|
|
12711
|
+
var SmzDialogBuilder = /** @class */ (function (_super) {
|
|
12712
|
+
__extends(SmzDialogBuilder, _super);
|
|
12589
12713
|
function SmzDialogBuilder() {
|
|
12714
|
+
var _this = this;
|
|
12590
12715
|
var _a, _b, _c, _d, _e, _f;
|
|
12591
|
-
|
|
12592
|
-
|
|
12716
|
+
_this = _super.call(this) || this;
|
|
12717
|
+
_this.that = _this;
|
|
12718
|
+
_this.defaultConfig = GlobalInjector$2.instance.get(SmzDialogsConfig);
|
|
12719
|
+
_this._state = {
|
|
12593
12720
|
title: null,
|
|
12594
12721
|
callbacks: {
|
|
12595
12722
|
onCancel: null,
|
|
@@ -12601,12 +12728,13 @@
|
|
|
12601
12728
|
},
|
|
12602
12729
|
customButtons: [],
|
|
12603
12730
|
customButtonsOrder: 'last',
|
|
12604
|
-
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 =
|
|
12605
|
-
builtInButtons: Object.assign({ confirmName: 'CONFIRMAR', confirmDependsOnValidation: true, cancelName: 'CANCELAR', cancelClass: 'p-button-outlined', okName: 'OK', okDependsOnValidation: false }, (_d = (_c =
|
|
12606
|
-
dialogTemplate: Object.assign({ extraSmall: { row: 'col-12' }, large: { row: 'col-8' }, extraLarge: { row: 'col-6' } }, (_f = (_e =
|
|
12731
|
+
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),
|
|
12732
|
+
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),
|
|
12733
|
+
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),
|
|
12607
12734
|
features: []
|
|
12608
12735
|
};
|
|
12609
|
-
|
|
12736
|
+
_this.createdByUiDefinitions = false;
|
|
12737
|
+
return _this;
|
|
12610
12738
|
}
|
|
12611
12739
|
SmzDialogBuilder.prototype.setTitle = function (title) {
|
|
12612
12740
|
if (title === void 0) { title = null; }
|
|
@@ -12741,7 +12869,7 @@
|
|
|
12741
12869
|
return this._state;
|
|
12742
12870
|
};
|
|
12743
12871
|
return SmzDialogBuilder;
|
|
12744
|
-
}());
|
|
12872
|
+
}(SmzBuilderUtilities));
|
|
12745
12873
|
var SmzDialogComponentBuilder = /** @class */ (function () {
|
|
12746
12874
|
function SmzDialogComponentBuilder(_dialogBuilder, feature) {
|
|
12747
12875
|
this._dialogBuilder = _dialogBuilder;
|
|
@@ -13418,7 +13546,7 @@
|
|
|
13418
13546
|
return FaqsContentComponent;
|
|
13419
13547
|
}());
|
|
13420
13548
|
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 });
|
|
13421
|
-
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 } });
|
|
13549
|
+
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 } });
|
|
13422
13550
|
__decorate([
|
|
13423
13551
|
Confirmable('Confirma a criação desta pergunta/resposta ?', 'Aviso')
|
|
13424
13552
|
], FaqsContentComponent.prototype, "create", null);
|
|
@@ -14472,7 +14600,7 @@
|
|
|
14472
14600
|
return LoginComponent;
|
|
14473
14601
|
}());
|
|
14474
14602
|
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 });
|
|
14475
|
-
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 } });
|
|
14603
|
+
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 } });
|
|
14476
14604
|
__decorate([
|
|
14477
14605
|
i1$4.Select(LayoutUiSelectors.appContentLogo)
|
|
14478
14606
|
], LoginComponent.prototype, "appLogo$", void 0);
|
|
@@ -18204,9 +18332,13 @@
|
|
|
18204
18332
|
};
|
|
18205
18333
|
return SmzDataTransformColumnBuilder;
|
|
18206
18334
|
}(SmzBaseColumnBuilder));
|
|
18207
|
-
var SmzColumnCollectionBuilder = /** @class */ (function () {
|
|
18335
|
+
var SmzColumnCollectionBuilder = /** @class */ (function (_super) {
|
|
18336
|
+
__extends(SmzColumnCollectionBuilder, _super);
|
|
18208
18337
|
function SmzColumnCollectionBuilder(_tableBuilder) {
|
|
18209
|
-
|
|
18338
|
+
var _this = _super.call(this) || this;
|
|
18339
|
+
_this._tableBuilder = _tableBuilder;
|
|
18340
|
+
_this.that = _this;
|
|
18341
|
+
return _this;
|
|
18210
18342
|
}
|
|
18211
18343
|
SmzColumnCollectionBuilder.prototype.text = function (field, header, width) {
|
|
18212
18344
|
if (width === void 0) { width = 'auto'; }
|
|
@@ -18240,7 +18372,7 @@
|
|
|
18240
18372
|
configurable: true
|
|
18241
18373
|
});
|
|
18242
18374
|
return SmzColumnCollectionBuilder;
|
|
18243
|
-
}());
|
|
18375
|
+
}(SmzBuilderUtilities));
|
|
18244
18376
|
|
|
18245
18377
|
var SmzMenuTableBuilder = /** @class */ (function () {
|
|
18246
18378
|
function SmzMenuTableBuilder(_tableBuilder) {
|
|
@@ -23717,45 +23849,6 @@
|
|
|
23717
23849
|
* Public API Surface of ngx-rbk-utils
|
|
23718
23850
|
*/
|
|
23719
23851
|
|
|
23720
|
-
var SmzConditionalBuilder = /** @class */ (function () {
|
|
23721
|
-
function SmzConditionalBuilder() {
|
|
23722
|
-
}
|
|
23723
|
-
SmzConditionalBuilder.prototype.if = function (condition) {
|
|
23724
|
-
if (this._currentConditionMethod != null)
|
|
23725
|
-
throw new Error("You cannot call more than one condition method at the same time.");
|
|
23726
|
-
// Registrando flag de method condicional em execução
|
|
23727
|
-
this._currentConditionMethod = 'if';
|
|
23728
|
-
// Se a condição for nula
|
|
23729
|
-
if (!condition) {
|
|
23730
|
-
// Preparar modelo de backup para o endif retornar dados originais descartando todos os dados feitos pelos builders entre o IF e o ENDIF
|
|
23731
|
-
this.backup = cloneDeep__default["default"](this.that);
|
|
23732
|
-
}
|
|
23733
|
-
return this.that;
|
|
23734
|
-
};
|
|
23735
|
-
Object.defineProperty(SmzConditionalBuilder.prototype, "endIf", {
|
|
23736
|
-
get: function () {
|
|
23737
|
-
if (this._currentConditionMethod == null)
|
|
23738
|
-
throw new Error("You cannot call endIf without calling a condition method first.");
|
|
23739
|
-
if (this.backup != null) {
|
|
23740
|
-
// Pegando modelo original sem as alterações feitas
|
|
23741
|
-
var newThat = this.backup;
|
|
23742
|
-
// Limpando cache
|
|
23743
|
-
this.backup = null;
|
|
23744
|
-
this._currentConditionMethod = null;
|
|
23745
|
-
// Retornando backup sem as alterações
|
|
23746
|
-
return newThat;
|
|
23747
|
-
}
|
|
23748
|
-
else {
|
|
23749
|
-
// Retornando modelo com as alterações
|
|
23750
|
-
return this.that;
|
|
23751
|
-
}
|
|
23752
|
-
},
|
|
23753
|
-
enumerable: false,
|
|
23754
|
-
configurable: true
|
|
23755
|
-
});
|
|
23756
|
-
return SmzConditionalBuilder;
|
|
23757
|
-
}());
|
|
23758
|
-
|
|
23759
23852
|
var SmzDocumentBaseCellBuilder = /** @class */ (function (_super) {
|
|
23760
23853
|
__extends(SmzDocumentBaseCellBuilder, _super);
|
|
23761
23854
|
function SmzDocumentBaseCellBuilder(_rowBuilder, _cell, _data, _documentBuilder) {
|
|
@@ -23790,7 +23883,7 @@
|
|
|
23790
23883
|
configurable: true
|
|
23791
23884
|
});
|
|
23792
23885
|
return SmzDocumentBaseCellBuilder;
|
|
23793
|
-
}(
|
|
23886
|
+
}(SmzBuilderUtilities));
|
|
23794
23887
|
|
|
23795
23888
|
var SmzCellTitleBuilder = /** @class */ (function (_super) {
|
|
23796
23889
|
__extends(SmzCellTitleBuilder, _super);
|
|
@@ -24222,6 +24315,7 @@
|
|
|
24222
24315
|
var _this = _super.call(this) || this;
|
|
24223
24316
|
_this._documentBuilder = _documentBuilder;
|
|
24224
24317
|
_this._content = _content;
|
|
24318
|
+
_this.that = _this;
|
|
24225
24319
|
return _this;
|
|
24226
24320
|
}
|
|
24227
24321
|
SmzDocumentContentBuilder.prototype.row = function () {
|
|
@@ -24237,7 +24331,7 @@
|
|
|
24237
24331
|
configurable: true
|
|
24238
24332
|
});
|
|
24239
24333
|
return SmzDocumentContentBuilder;
|
|
24240
|
-
}(
|
|
24334
|
+
}(SmzBuilderUtilities));
|
|
24241
24335
|
var SmzDocumentRowBuilder = /** @class */ (function () {
|
|
24242
24336
|
function SmzDocumentRowBuilder(_contentBuilder, _row, _documentBuilder, _content) {
|
|
24243
24337
|
this._contentBuilder = _contentBuilder;
|
|
@@ -24331,6 +24425,7 @@
|
|
|
24331
24425
|
var _this = _super.call(this) || this;
|
|
24332
24426
|
_this._documentBuilder = _documentBuilder;
|
|
24333
24427
|
_this._viewer = _viewer;
|
|
24428
|
+
_this.that = _this;
|
|
24334
24429
|
return _this;
|
|
24335
24430
|
}
|
|
24336
24431
|
SmzDocumentViewerBuilder.prototype.setFilename = function (filename) {
|
|
@@ -24377,7 +24472,7 @@
|
|
|
24377
24472
|
configurable: true
|
|
24378
24473
|
});
|
|
24379
24474
|
return SmzDocumentViewerBuilder;
|
|
24380
|
-
}(
|
|
24475
|
+
}(SmzBuilderUtilities));
|
|
24381
24476
|
|
|
24382
24477
|
var pixelCmFactor = 28.346;
|
|
24383
24478
|
var SmzDocumentBuilder = /** @class */ (function (_super) {
|
|
@@ -24385,6 +24480,7 @@
|
|
|
24385
24480
|
function SmzDocumentBuilder(state) {
|
|
24386
24481
|
if (state === void 0) { state = null; }
|
|
24387
24482
|
var _this = _super.call(this) || this;
|
|
24483
|
+
_this.that = _this;
|
|
24388
24484
|
_this.defaultConfig = GlobalInjector$2.instance.get(NgxRbkUtilsConfig);
|
|
24389
24485
|
_this._colsCount = 0;
|
|
24390
24486
|
_this._isHeaderHeightUpdated = false;
|
|
@@ -24554,7 +24650,7 @@
|
|
|
24554
24650
|
return this._state;
|
|
24555
24651
|
};
|
|
24556
24652
|
return SmzDocumentBuilder;
|
|
24557
|
-
}(
|
|
24653
|
+
}(SmzBuilderUtilities));
|
|
24558
24654
|
function normalizeColspan(rows, row, totalColsCount) {
|
|
24559
24655
|
var debug = false; // row.cells.findIndex(x => (x.data as any)?.text?.value === 'COMPRADOR') !== -1;
|
|
24560
24656
|
var currentIndex = rows.findIndex(function (x) { return x.id === row.id; });
|
|
@@ -24600,9 +24696,13 @@
|
|
|
24600
24696
|
}
|
|
24601
24697
|
}
|
|
24602
24698
|
|
|
24603
|
-
var SmzMenuBuilder = /** @class */ (function () {
|
|
24699
|
+
var SmzMenuBuilder = /** @class */ (function (_super) {
|
|
24700
|
+
__extends(SmzMenuBuilder, _super);
|
|
24604
24701
|
function SmzMenuBuilder() {
|
|
24605
|
-
|
|
24702
|
+
var _this = _super.call(this) || this;
|
|
24703
|
+
_this.that = _this;
|
|
24704
|
+
_this._items = [];
|
|
24705
|
+
return _this;
|
|
24606
24706
|
}
|
|
24607
24707
|
SmzMenuBuilder.prototype.item = function (label, icon, tooltip) {
|
|
24608
24708
|
if (icon === void 0) { icon = null; }
|
|
@@ -24619,7 +24719,7 @@
|
|
|
24619
24719
|
return this._items;
|
|
24620
24720
|
};
|
|
24621
24721
|
return SmzMenuBuilder;
|
|
24622
|
-
}());
|
|
24722
|
+
}(SmzBuilderUtilities));
|
|
24623
24723
|
var SmzMenuItemBuilder = /** @class */ (function () {
|
|
24624
24724
|
function SmzMenuItemBuilder(_menuBuilder, _parent, _item) {
|
|
24625
24725
|
this._menuBuilder = _menuBuilder;
|