ngx-smz-ui 3.5.8 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngx-smz-ui.umd.js +262 -190
- package/bundles/ngx-smz-ui.umd.js.map +1 -1
- package/esm2015/lib/builders/common/smz-builder-utilities.js +8 -1
- package/esm2015/lib/builders/smz-documents/document-cells.js +24 -3
- package/esm2015/lib/builders/smz-documents/document-content.js +9 -2
- package/esm2015/lib/modules/smz-documents/components/chart/chart.component.js +22 -0
- package/esm2015/lib/modules/smz-documents/models/smz-document-features.js +2 -1
- package/esm2015/lib/modules/smz-documents/ngx-smz-documents.module.js +12 -5
- package/esm2015/lib/modules/smz-forms/features/form-group/form-group.component.js +38 -29
- package/fesm2015/ngx-smz-ui.js +238 -171
- package/fesm2015/ngx-smz-ui.js.map +1 -1
- package/lib/builders/common/smz-builder-utilities.d.ts +1 -0
- package/lib/builders/smz-documents/document-cells.d.ts +12 -2
- package/lib/builders/smz-documents/document-content.d.ts +3 -1
- package/lib/modules/smz-documents/components/chart/chart.component.d.ts +12 -0
- package/lib/modules/smz-documents/models/smz-document-features.d.ts +14 -2
- package/lib/modules/smz-documents/ngx-smz-documents.module.d.ts +16 -14
- package/lib/modules/smz-forms/features/form-group/form-group.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -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('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('
|
|
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', '
|
|
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.
|
|
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,
|
|
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('chart.js/auto'), require('chart.js/helpers'), 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('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', 'chart.js/auto', 'chart.js/helpers', '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', '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.chartjaauto, global.chartjshelpers, 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.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, Chart, helpers, cloneDeep, i3$6, routerPlugin, forIn, startsWith, animations$1, localePt, menubar, i3$7, i1$f, i2$3, 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 Chart__default = /*#__PURE__*/_interopDefaultLegacy(Chart);
|
|
64
65
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
65
66
|
var i3__namespace$5 = /*#__PURE__*/_interopNamespace(i3$6);
|
|
66
67
|
var forIn__default = /*#__PURE__*/_interopDefaultLegacy(forIn);
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
var i3__namespace$6 = /*#__PURE__*/_interopNamespace(i3$7);
|
|
70
71
|
var i1__namespace$f = /*#__PURE__*/_interopNamespace(i1$f);
|
|
71
72
|
var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
|
|
72
|
-
var Chart__default = /*#__PURE__*/_interopDefaultLegacy(Chart);
|
|
73
73
|
|
|
74
74
|
/*! *****************************************************************************
|
|
75
75
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1630,6 +1630,12 @@
|
|
|
1630
1630
|
}]
|
|
1631
1631
|
}], ctorParameters: function () { return [{ type: SmzDialogsConfig }, { type: SmzFormsDropdownService }, { type: SmzFormsVisibilityService }]; } });
|
|
1632
1632
|
|
|
1633
|
+
var NgxRbkUtilsConfig = /** @class */ (function () {
|
|
1634
|
+
function NgxRbkUtilsConfig() {
|
|
1635
|
+
}
|
|
1636
|
+
return NgxRbkUtilsConfig;
|
|
1637
|
+
}());
|
|
1638
|
+
|
|
1633
1639
|
var ValidationMessagesPipe$1 = /** @class */ (function () {
|
|
1634
1640
|
function ValidationMessagesPipe() {
|
|
1635
1641
|
}
|
|
@@ -3582,11 +3588,12 @@
|
|
|
3582
3588
|
}
|
|
3583
3589
|
|
|
3584
3590
|
var FormGroupComponent = /** @class */ (function () {
|
|
3585
|
-
function FormGroupComponent(fb, cdf, manager, configService) {
|
|
3591
|
+
function FormGroupComponent(fb, cdf, manager, configService, rbkConfig) {
|
|
3586
3592
|
this.fb = fb;
|
|
3587
3593
|
this.cdf = cdf;
|
|
3588
3594
|
this.manager = manager;
|
|
3589
3595
|
this.configService = configService;
|
|
3596
|
+
this.rbkConfig = rbkConfig;
|
|
3590
3597
|
this.isComponentActive = true;
|
|
3591
3598
|
//** isValid corresponde ao valid do formulário ou customValidator caso aja; Atualizada em toda mudança de status do formulário */
|
|
3592
3599
|
this.isValid = false;
|
|
@@ -3929,6 +3936,13 @@
|
|
|
3929
3936
|
if (this.hasChanges === false && original !== current) {
|
|
3930
3937
|
this.changed.emit(response);
|
|
3931
3938
|
}
|
|
3939
|
+
if (this.rbkConfig.debugMode) {
|
|
3940
|
+
console.group('UpdateHasChanges');
|
|
3941
|
+
console.log('original', original);
|
|
3942
|
+
console.log('current', current);
|
|
3943
|
+
console.log('hasChanges', original !== current);
|
|
3944
|
+
console.groupEnd();
|
|
3945
|
+
}
|
|
3932
3946
|
this.hasChanges = original !== current;
|
|
3933
3947
|
this.cdf.markForCheck();
|
|
3934
3948
|
};
|
|
@@ -4115,7 +4129,7 @@
|
|
|
4115
4129
|
};
|
|
4116
4130
|
return FormGroupComponent;
|
|
4117
4131
|
}());
|
|
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 });
|
|
4132
|
+
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 }, { token: NgxRbkUtilsConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4119
4133
|
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 });
|
|
4120
4134
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: FormGroupComponent, decorators: [{
|
|
4121
4135
|
type: i0.Component,
|
|
@@ -4124,7 +4138,7 @@
|
|
|
4124
4138
|
templateUrl: './form-group.component.html',
|
|
4125
4139
|
encapsulation: i0.ViewEncapsulation.None,
|
|
4126
4140
|
}]
|
|
4127
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.FormBuilder }, { type: i0__namespace.ChangeDetectorRef }, { type: SmzFormsManagerService }, { type: SmzDialogsConfig }]; }, propDecorators: { config: [{
|
|
4141
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$2.FormBuilder }, { type: i0__namespace.ChangeDetectorRef }, { type: SmzFormsManagerService }, { type: SmzDialogsConfig }, { type: NgxRbkUtilsConfig }]; }, propDecorators: { config: [{
|
|
4128
4142
|
type: i0.Input
|
|
4129
4143
|
}], statusChanges: [{
|
|
4130
4144
|
type: i0.Output
|
|
@@ -5578,12 +5592,6 @@
|
|
|
5578
5592
|
}]
|
|
5579
5593
|
}] });
|
|
5580
5594
|
|
|
5581
|
-
var NgxRbkUtilsConfig = /** @class */ (function () {
|
|
5582
|
-
function NgxRbkUtilsConfig() {
|
|
5583
|
-
}
|
|
5584
|
-
return NgxRbkUtilsConfig;
|
|
5585
|
-
}());
|
|
5586
|
-
|
|
5587
5595
|
var DialogFooterComponent = /** @class */ (function () {
|
|
5588
5596
|
function DialogFooterComponent(refService, dialogConfig, presets, visibilityService, injectComponent, cdf, actions$, rbkConfig, store) {
|
|
5589
5597
|
this.refService = refService;
|
|
@@ -9234,6 +9242,7 @@
|
|
|
9234
9242
|
SmzDocumentFeatureDefinitions[SmzDocumentFeatureDefinitions["SUB_TITLE"] = 5] = "SUB_TITLE";
|
|
9235
9243
|
SmzDocumentFeatureDefinitions[SmzDocumentFeatureDefinitions["TITLE"] = 6] = "TITLE";
|
|
9236
9244
|
SmzDocumentFeatureDefinitions[SmzDocumentFeatureDefinitions["TABLE"] = 7] = "TABLE";
|
|
9245
|
+
SmzDocumentFeatureDefinitions[SmzDocumentFeatureDefinitions["CHART"] = 8] = "CHART";
|
|
9237
9246
|
})(SmzDocumentFeatureDefinitions || (SmzDocumentFeatureDefinitions = {}));
|
|
9238
9247
|
|
|
9239
9248
|
exports.ApplicationActions = void 0;
|
|
@@ -10342,6 +10351,196 @@
|
|
|
10342
10351
|
}]
|
|
10343
10352
|
}] });
|
|
10344
10353
|
|
|
10354
|
+
var SmzChartComponent = /** @class */ (function () {
|
|
10355
|
+
function SmzChartComponent(el, defaultConfig) {
|
|
10356
|
+
this.el = el;
|
|
10357
|
+
this.defaultConfig = defaultConfig;
|
|
10358
|
+
this.plugins = [];
|
|
10359
|
+
this.responsive = true;
|
|
10360
|
+
this.chartClick = new i0.EventEmitter();
|
|
10361
|
+
this.chartHover = new i0.EventEmitter();
|
|
10362
|
+
this._options = {};
|
|
10363
|
+
}
|
|
10364
|
+
Object.defineProperty(SmzChartComponent.prototype, "data", {
|
|
10365
|
+
get: function () {
|
|
10366
|
+
return this._data;
|
|
10367
|
+
},
|
|
10368
|
+
set: function (val) {
|
|
10369
|
+
this._data = val;
|
|
10370
|
+
this._originalData = JSON.parse(JSON.stringify(val));
|
|
10371
|
+
this.reinit();
|
|
10372
|
+
},
|
|
10373
|
+
enumerable: false,
|
|
10374
|
+
configurable: true
|
|
10375
|
+
});
|
|
10376
|
+
Object.defineProperty(SmzChartComponent.prototype, "options", {
|
|
10377
|
+
get: function () {
|
|
10378
|
+
return this._options;
|
|
10379
|
+
},
|
|
10380
|
+
set: function (val) {
|
|
10381
|
+
var _this = this;
|
|
10382
|
+
var _a, _b;
|
|
10383
|
+
this._options = val;
|
|
10384
|
+
if (this._options != null) {
|
|
10385
|
+
this.title = (_b = (_a = this._options.plugins) === null || _a === void 0 ? void 0 : _a.title) === null || _b === void 0 ? void 0 : _b.text;
|
|
10386
|
+
// 'info' is an array of all elements in the clicked index
|
|
10387
|
+
this._options.onClick = function (e, info) {
|
|
10388
|
+
var _a;
|
|
10389
|
+
var canvasPosition = helpers.getRelativePosition(e, _this.chart);
|
|
10390
|
+
var element = _this.chart.getElementsAtEventForMode(e, 'dataset', { axis: '', intersect: true }, true);
|
|
10391
|
+
var datasetIndex = -1;
|
|
10392
|
+
var pointIndex = -1;
|
|
10393
|
+
var value = null;
|
|
10394
|
+
// TODO: tratar o clique em gráficos de barras horizontais
|
|
10395
|
+
if (_this.chart.scales.x != null) {
|
|
10396
|
+
// linear charts, except horizontal bar charts
|
|
10397
|
+
if (element != null && element.length > 0) {
|
|
10398
|
+
datasetIndex = element[0].datasetIndex;
|
|
10399
|
+
}
|
|
10400
|
+
pointIndex = _this.chart.scales.x.getValueForPixel(canvasPosition.x);
|
|
10401
|
+
if (datasetIndex != -1 && pointIndex != -1) {
|
|
10402
|
+
value = _this._originalData.datasets[datasetIndex].data[pointIndex];
|
|
10403
|
+
}
|
|
10404
|
+
}
|
|
10405
|
+
else {
|
|
10406
|
+
// radial charts
|
|
10407
|
+
var activeElements = _this.chart.getActiveElements();
|
|
10408
|
+
if (activeElements.length > 0) {
|
|
10409
|
+
datasetIndex = activeElements[0].datasetIndex;
|
|
10410
|
+
pointIndex = activeElements[0].index;
|
|
10411
|
+
}
|
|
10412
|
+
if (datasetIndex != -1 && pointIndex != -1 && ((_a = _this._originalData.datasets[datasetIndex].extra) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
10413
|
+
value = _this._originalData.datasets[datasetIndex].extra[pointIndex];
|
|
10414
|
+
}
|
|
10415
|
+
}
|
|
10416
|
+
_this.chartClick.emit({ chart: _this.chart, event: e, value: value });
|
|
10417
|
+
};
|
|
10418
|
+
this._options.onHover = function (e, dataset, chart) {
|
|
10419
|
+
_this.chartHover.emit({ chart: _this.chart, event: e, value: dataset });
|
|
10420
|
+
};
|
|
10421
|
+
// this._options.events = ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'];
|
|
10422
|
+
}
|
|
10423
|
+
this.reinit();
|
|
10424
|
+
},
|
|
10425
|
+
enumerable: false,
|
|
10426
|
+
configurable: true
|
|
10427
|
+
});
|
|
10428
|
+
SmzChartComponent.prototype.ngAfterViewInit = function () {
|
|
10429
|
+
this.initChart();
|
|
10430
|
+
};
|
|
10431
|
+
SmzChartComponent.prototype.initChart = function () {
|
|
10432
|
+
if (this.type === 'empty')
|
|
10433
|
+
return;
|
|
10434
|
+
var opts = this.options || {};
|
|
10435
|
+
opts.responsive = this.responsive;
|
|
10436
|
+
// allows chart to resize in responsive mode
|
|
10437
|
+
if (opts.responsive && (this.height || this.width)) {
|
|
10438
|
+
opts.maintainAspectRatio = false;
|
|
10439
|
+
}
|
|
10440
|
+
this.chart = new Chart__default["default"](this.el.nativeElement.children[0].children[0], {
|
|
10441
|
+
type: this.type,
|
|
10442
|
+
data: this.data,
|
|
10443
|
+
options: this.options,
|
|
10444
|
+
plugins: this.plugins
|
|
10445
|
+
});
|
|
10446
|
+
};
|
|
10447
|
+
SmzChartComponent.prototype.getCanvas = function () {
|
|
10448
|
+
return this.el.nativeElement.children[0].children[0];
|
|
10449
|
+
};
|
|
10450
|
+
SmzChartComponent.prototype.getBase64Image = function () {
|
|
10451
|
+
return this.chart.toBase64Image();
|
|
10452
|
+
};
|
|
10453
|
+
SmzChartComponent.prototype.generateLegend = function () {
|
|
10454
|
+
if (this.chart) {
|
|
10455
|
+
return this.chart.generateLegend();
|
|
10456
|
+
}
|
|
10457
|
+
};
|
|
10458
|
+
SmzChartComponent.prototype.refresh = function () {
|
|
10459
|
+
if (this.chart) {
|
|
10460
|
+
this.chart.update();
|
|
10461
|
+
}
|
|
10462
|
+
};
|
|
10463
|
+
SmzChartComponent.prototype.reinit = function () {
|
|
10464
|
+
if (this.chart) {
|
|
10465
|
+
this.chart.destroy();
|
|
10466
|
+
this.initChart();
|
|
10467
|
+
}
|
|
10468
|
+
};
|
|
10469
|
+
SmzChartComponent.prototype.ngOnDestroy = function () {
|
|
10470
|
+
if (this.chart) {
|
|
10471
|
+
this.chart.destroy();
|
|
10472
|
+
this.chart = null;
|
|
10473
|
+
}
|
|
10474
|
+
};
|
|
10475
|
+
return SmzChartComponent;
|
|
10476
|
+
}());
|
|
10477
|
+
SmzChartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartComponent, deps: [{ token: i0__namespace.ElementRef }, { token: SmzDialogsConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
10478
|
+
SmzChartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: SmzChartComponent, selector: "smz-ui-chart", inputs: { type: "type", plugins: "plugins", width: "width", height: "height", responsive: "responsive", data: "data", options: "options" }, outputs: { chartClick: "chartClick", chartHover: "chartHover" }, ngImport: i0__namespace, template: "<div [ngClass]=\"{ 'invisible fixed': type == null || type === 'empty' }\"\n [style.width]=\"responsive && !width ? null : width\"\n [style.height]=\"responsive && !height ? null : height\">\n <canvas [attr.width]=\"responsive && !width ? null : width\"\n [attr.height]=\"responsive && !height ? null : height\">\n </canvas>\n</div>\n\n<ng-container *ngIf=\"type === 'empty'\" >\n <div class=\"relative h-full\"\n [ngStyle]=\"{ height: responsive && !height ? 'auto' : height + 'px', width: responsive && !width ? 'auto' : width + 'px'}\"\n class=\"h-full\">\n <div class=\"text-center smz-chart-title\">{{title}}</div>\n <div class=\"p-grid p-nogutter p-flex-column gap-3 p-align-center p-justify-center h-full\">\n <i class=\"far fa-chart-bar text-4xl\"></i>\n <p>{{defaultConfig.charts.emptyMessage}}</p>\n </div>\n </div>\n</ng-container>", directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
10479
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartComponent, decorators: [{
|
|
10480
|
+
type: i0.Component,
|
|
10481
|
+
args: [{
|
|
10482
|
+
selector: 'smz-ui-chart',
|
|
10483
|
+
templateUrl: './chart.component.html',
|
|
10484
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
10485
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
10486
|
+
}]
|
|
10487
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: SmzDialogsConfig }]; }, propDecorators: { type: [{
|
|
10488
|
+
type: i0.Input
|
|
10489
|
+
}], plugins: [{
|
|
10490
|
+
type: i0.Input
|
|
10491
|
+
}], width: [{
|
|
10492
|
+
type: i0.Input
|
|
10493
|
+
}], height: [{
|
|
10494
|
+
type: i0.Input
|
|
10495
|
+
}], responsive: [{
|
|
10496
|
+
type: i0.Input
|
|
10497
|
+
}], chartClick: [{
|
|
10498
|
+
type: i0.Output
|
|
10499
|
+
}], chartHover: [{
|
|
10500
|
+
type: i0.Output
|
|
10501
|
+
}], data: [{
|
|
10502
|
+
type: i0.Input
|
|
10503
|
+
}], options: [{
|
|
10504
|
+
type: i0.Input
|
|
10505
|
+
}] } });
|
|
10506
|
+
|
|
10507
|
+
var SmzDocumentChartComponent = /** @class */ (function () {
|
|
10508
|
+
function SmzDocumentChartComponent() {
|
|
10509
|
+
}
|
|
10510
|
+
SmzDocumentChartComponent.prototype.ngOnInit = function () { };
|
|
10511
|
+
return SmzDocumentChartComponent;
|
|
10512
|
+
}());
|
|
10513
|
+
SmzDocumentChartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentChartComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
10514
|
+
SmzDocumentChartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: SmzDocumentChartComponent, selector: "smz-document-chart", inputs: { data: "data", config: "config" }, ngImport: i0__namespace, template: "<div\n [ngStyle]=\"{ background: data.container.background }\"\n class=\"p-grid p-nogutter p-align-stretch p-justify-start h-full w-full relative\"\n [ngClass]=\"data.container.styles\">\n\n <smz-ui-chart\n class=\"w-full h-full\"\n [type]=\"data.content.chartData.type\"\n [data]=\"data.content.chartData.data\"\n [options]=\"data.content.chartData.config\">\n </smz-ui-chart>\n\n</div>", components: [{ type: SmzChartComponent, selector: "smz-ui-chart", inputs: ["type", "plugins", "width", "height", "responsive", "data", "options"], outputs: ["chartClick", "chartHover"] }], directives: [{ type: i1__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
10515
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentChartComponent, decorators: [{
|
|
10516
|
+
type: i0.Component,
|
|
10517
|
+
args: [{
|
|
10518
|
+
selector: 'smz-document-chart',
|
|
10519
|
+
templateUrl: 'chart.component.html'
|
|
10520
|
+
}]
|
|
10521
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
10522
|
+
type: i0.Input
|
|
10523
|
+
}], config: [{
|
|
10524
|
+
type: i0.Input
|
|
10525
|
+
}] } });
|
|
10526
|
+
|
|
10527
|
+
var SmzChartModule = /** @class */ (function () {
|
|
10528
|
+
function SmzChartModule() {
|
|
10529
|
+
}
|
|
10530
|
+
return SmzChartModule;
|
|
10531
|
+
}());
|
|
10532
|
+
SmzChartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
10533
|
+
SmzChartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, declarations: [SmzChartComponent], imports: [i1$1.CommonModule], exports: [SmzChartComponent] });
|
|
10534
|
+
SmzChartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, imports: [[i1$1.CommonModule]] });
|
|
10535
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, decorators: [{
|
|
10536
|
+
type: i0.NgModule,
|
|
10537
|
+
args: [{
|
|
10538
|
+
imports: [i1$1.CommonModule],
|
|
10539
|
+
exports: [SmzChartComponent],
|
|
10540
|
+
declarations: [SmzChartComponent]
|
|
10541
|
+
}]
|
|
10542
|
+
}] });
|
|
10543
|
+
|
|
10345
10544
|
var NgxSmzDocumentsModule = /** @class */ (function () {
|
|
10346
10545
|
function NgxSmzDocumentsModule(injector) {
|
|
10347
10546
|
GlobalInjector.instance = injector;
|
|
@@ -10359,7 +10558,8 @@
|
|
|
10359
10558
|
SmzDocumentSubTitleComponent,
|
|
10360
10559
|
SmzDocumentFieldsGroupComponent,
|
|
10361
10560
|
SmzDocumentViewerComponent,
|
|
10362
|
-
SmzDocumentTableComponent
|
|
10561
|
+
SmzDocumentTableComponent,
|
|
10562
|
+
SmzDocumentChartComponent], imports: [i1$1.CommonModule,
|
|
10363
10563
|
i1.FormsModule,
|
|
10364
10564
|
i6$1.BadgeModule,
|
|
10365
10565
|
i2$1.OverlayPanelModule,
|
|
@@ -10372,7 +10572,8 @@
|
|
|
10372
10572
|
NgVarModule,
|
|
10373
10573
|
ClickStopPropagationModule,
|
|
10374
10574
|
NgxSmzDataPipesModule,
|
|
10375
|
-
i10.TooltipModule
|
|
10575
|
+
i10.TooltipModule,
|
|
10576
|
+
SmzChartModule], exports: [SmzDocumentComponent] });
|
|
10376
10577
|
NgxSmzDocumentsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: NgxSmzDocumentsModule, imports: [[
|
|
10377
10578
|
i1$1.CommonModule,
|
|
10378
10579
|
i1.FormsModule,
|
|
@@ -10387,7 +10588,8 @@
|
|
|
10387
10588
|
NgVarModule,
|
|
10388
10589
|
ClickStopPropagationModule,
|
|
10389
10590
|
NgxSmzDataPipesModule,
|
|
10390
|
-
i10.TooltipModule
|
|
10591
|
+
i10.TooltipModule,
|
|
10592
|
+
SmzChartModule
|
|
10391
10593
|
]] });
|
|
10392
10594
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: NgxSmzDocumentsModule, decorators: [{
|
|
10393
10595
|
type: i0.NgModule,
|
|
@@ -10406,7 +10608,8 @@
|
|
|
10406
10608
|
NgVarModule,
|
|
10407
10609
|
ClickStopPropagationModule,
|
|
10408
10610
|
NgxSmzDataPipesModule,
|
|
10409
|
-
i10.TooltipModule
|
|
10611
|
+
i10.TooltipModule,
|
|
10612
|
+
SmzChartModule
|
|
10410
10613
|
],
|
|
10411
10614
|
exports: [SmzDocumentComponent],
|
|
10412
10615
|
declarations: [
|
|
@@ -10421,6 +10624,7 @@
|
|
|
10421
10624
|
SmzDocumentFieldsGroupComponent,
|
|
10422
10625
|
SmzDocumentViewerComponent,
|
|
10423
10626
|
SmzDocumentTableComponent,
|
|
10627
|
+
SmzDocumentChartComponent
|
|
10424
10628
|
]
|
|
10425
10629
|
}]
|
|
10426
10630
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
@@ -12692,6 +12896,13 @@
|
|
|
12692
12896
|
enumerable: false,
|
|
12693
12897
|
configurable: true
|
|
12694
12898
|
});
|
|
12899
|
+
SmzBuilderUtilities.prototype.for = function (items, callback) {
|
|
12900
|
+
var result = this.that;
|
|
12901
|
+
items.forEach(function (item) {
|
|
12902
|
+
result = callback(result, item);
|
|
12903
|
+
});
|
|
12904
|
+
return result;
|
|
12905
|
+
};
|
|
12695
12906
|
return SmzBuilderUtilities;
|
|
12696
12907
|
}());
|
|
12697
12908
|
function conclude(methodName, cache, that) {
|
|
@@ -21227,176 +21438,6 @@
|
|
|
21227
21438
|
|
|
21228
21439
|
// MODULES
|
|
21229
21440
|
|
|
21230
|
-
var SmzChartComponent = /** @class */ (function () {
|
|
21231
|
-
function SmzChartComponent(el, defaultConfig) {
|
|
21232
|
-
this.el = el;
|
|
21233
|
-
this.defaultConfig = defaultConfig;
|
|
21234
|
-
this.plugins = [];
|
|
21235
|
-
this.responsive = true;
|
|
21236
|
-
this.chartClick = new i0.EventEmitter();
|
|
21237
|
-
this.chartHover = new i0.EventEmitter();
|
|
21238
|
-
this._options = {};
|
|
21239
|
-
}
|
|
21240
|
-
Object.defineProperty(SmzChartComponent.prototype, "data", {
|
|
21241
|
-
get: function () {
|
|
21242
|
-
return this._data;
|
|
21243
|
-
},
|
|
21244
|
-
set: function (val) {
|
|
21245
|
-
this._data = val;
|
|
21246
|
-
this._originalData = JSON.parse(JSON.stringify(val));
|
|
21247
|
-
this.reinit();
|
|
21248
|
-
},
|
|
21249
|
-
enumerable: false,
|
|
21250
|
-
configurable: true
|
|
21251
|
-
});
|
|
21252
|
-
Object.defineProperty(SmzChartComponent.prototype, "options", {
|
|
21253
|
-
get: function () {
|
|
21254
|
-
return this._options;
|
|
21255
|
-
},
|
|
21256
|
-
set: function (val) {
|
|
21257
|
-
var _this = this;
|
|
21258
|
-
var _a, _b;
|
|
21259
|
-
this._options = val;
|
|
21260
|
-
if (this._options != null) {
|
|
21261
|
-
this.title = (_b = (_a = this._options.plugins) === null || _a === void 0 ? void 0 : _a.title) === null || _b === void 0 ? void 0 : _b.text;
|
|
21262
|
-
// 'info' is an array of all elements in the clicked index
|
|
21263
|
-
this._options.onClick = function (e, info) {
|
|
21264
|
-
var _a;
|
|
21265
|
-
var canvasPosition = helpers.getRelativePosition(e, _this.chart);
|
|
21266
|
-
var element = _this.chart.getElementsAtEventForMode(e, 'dataset', { axis: '', intersect: true }, true);
|
|
21267
|
-
var datasetIndex = -1;
|
|
21268
|
-
var pointIndex = -1;
|
|
21269
|
-
var value = null;
|
|
21270
|
-
// TODO: tratar o clique em gráficos de barras horizontais
|
|
21271
|
-
if (_this.chart.scales.x != null) {
|
|
21272
|
-
// linear charts, except horizontal bar charts
|
|
21273
|
-
if (element != null && element.length > 0) {
|
|
21274
|
-
datasetIndex = element[0].datasetIndex;
|
|
21275
|
-
}
|
|
21276
|
-
pointIndex = _this.chart.scales.x.getValueForPixel(canvasPosition.x);
|
|
21277
|
-
if (datasetIndex != -1 && pointIndex != -1) {
|
|
21278
|
-
value = _this._originalData.datasets[datasetIndex].data[pointIndex];
|
|
21279
|
-
}
|
|
21280
|
-
}
|
|
21281
|
-
else {
|
|
21282
|
-
// radial charts
|
|
21283
|
-
var activeElements = _this.chart.getActiveElements();
|
|
21284
|
-
if (activeElements.length > 0) {
|
|
21285
|
-
datasetIndex = activeElements[0].datasetIndex;
|
|
21286
|
-
pointIndex = activeElements[0].index;
|
|
21287
|
-
}
|
|
21288
|
-
if (datasetIndex != -1 && pointIndex != -1 && ((_a = _this._originalData.datasets[datasetIndex].extra) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
21289
|
-
value = _this._originalData.datasets[datasetIndex].extra[pointIndex];
|
|
21290
|
-
}
|
|
21291
|
-
}
|
|
21292
|
-
_this.chartClick.emit({ chart: _this.chart, event: e, value: value });
|
|
21293
|
-
};
|
|
21294
|
-
this._options.onHover = function (e, dataset, chart) {
|
|
21295
|
-
_this.chartHover.emit({ chart: _this.chart, event: e, value: dataset });
|
|
21296
|
-
};
|
|
21297
|
-
// this._options.events = ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'];
|
|
21298
|
-
}
|
|
21299
|
-
this.reinit();
|
|
21300
|
-
},
|
|
21301
|
-
enumerable: false,
|
|
21302
|
-
configurable: true
|
|
21303
|
-
});
|
|
21304
|
-
SmzChartComponent.prototype.ngAfterViewInit = function () {
|
|
21305
|
-
this.initChart();
|
|
21306
|
-
};
|
|
21307
|
-
SmzChartComponent.prototype.initChart = function () {
|
|
21308
|
-
if (this.type === 'empty')
|
|
21309
|
-
return;
|
|
21310
|
-
var opts = this.options || {};
|
|
21311
|
-
opts.responsive = this.responsive;
|
|
21312
|
-
// allows chart to resize in responsive mode
|
|
21313
|
-
if (opts.responsive && (this.height || this.width)) {
|
|
21314
|
-
opts.maintainAspectRatio = false;
|
|
21315
|
-
}
|
|
21316
|
-
this.chart = new Chart__default["default"](this.el.nativeElement.children[0].children[0], {
|
|
21317
|
-
type: this.type,
|
|
21318
|
-
data: this.data,
|
|
21319
|
-
options: this.options,
|
|
21320
|
-
plugins: this.plugins
|
|
21321
|
-
});
|
|
21322
|
-
};
|
|
21323
|
-
SmzChartComponent.prototype.getCanvas = function () {
|
|
21324
|
-
return this.el.nativeElement.children[0].children[0];
|
|
21325
|
-
};
|
|
21326
|
-
SmzChartComponent.prototype.getBase64Image = function () {
|
|
21327
|
-
return this.chart.toBase64Image();
|
|
21328
|
-
};
|
|
21329
|
-
SmzChartComponent.prototype.generateLegend = function () {
|
|
21330
|
-
if (this.chart) {
|
|
21331
|
-
return this.chart.generateLegend();
|
|
21332
|
-
}
|
|
21333
|
-
};
|
|
21334
|
-
SmzChartComponent.prototype.refresh = function () {
|
|
21335
|
-
if (this.chart) {
|
|
21336
|
-
this.chart.update();
|
|
21337
|
-
}
|
|
21338
|
-
};
|
|
21339
|
-
SmzChartComponent.prototype.reinit = function () {
|
|
21340
|
-
if (this.chart) {
|
|
21341
|
-
this.chart.destroy();
|
|
21342
|
-
this.initChart();
|
|
21343
|
-
}
|
|
21344
|
-
};
|
|
21345
|
-
SmzChartComponent.prototype.ngOnDestroy = function () {
|
|
21346
|
-
if (this.chart) {
|
|
21347
|
-
this.chart.destroy();
|
|
21348
|
-
this.chart = null;
|
|
21349
|
-
}
|
|
21350
|
-
};
|
|
21351
|
-
return SmzChartComponent;
|
|
21352
|
-
}());
|
|
21353
|
-
SmzChartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartComponent, deps: [{ token: i0__namespace.ElementRef }, { token: SmzDialogsConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
21354
|
-
SmzChartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: SmzChartComponent, selector: "smz-ui-chart", inputs: { type: "type", plugins: "plugins", width: "width", height: "height", responsive: "responsive", data: "data", options: "options" }, outputs: { chartClick: "chartClick", chartHover: "chartHover" }, ngImport: i0__namespace, template: "<div [ngClass]=\"{ 'invisible fixed': type == null || type === 'empty' }\"\n [style.width]=\"responsive && !width ? null : width\"\n [style.height]=\"responsive && !height ? null : height\">\n <canvas [attr.width]=\"responsive && !width ? null : width\"\n [attr.height]=\"responsive && !height ? null : height\">\n </canvas>\n</div>\n\n<ng-container *ngIf=\"type === 'empty'\" >\n <div class=\"relative h-full\"\n [ngStyle]=\"{ height: responsive && !height ? 'auto' : height + 'px', width: responsive && !width ? 'auto' : width + 'px'}\"\n class=\"h-full\">\n <div class=\"text-center smz-chart-title\">{{title}}</div>\n <div class=\"p-grid p-nogutter p-flex-column gap-3 p-align-center p-justify-center h-full\">\n <i class=\"far fa-chart-bar text-4xl\"></i>\n <p>{{defaultConfig.charts.emptyMessage}}</p>\n </div>\n </div>\n</ng-container>", directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
21355
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartComponent, decorators: [{
|
|
21356
|
-
type: i0.Component,
|
|
21357
|
-
args: [{
|
|
21358
|
-
selector: 'smz-ui-chart',
|
|
21359
|
-
templateUrl: './chart.component.html',
|
|
21360
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
21361
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
21362
|
-
}]
|
|
21363
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: SmzDialogsConfig }]; }, propDecorators: { type: [{
|
|
21364
|
-
type: i0.Input
|
|
21365
|
-
}], plugins: [{
|
|
21366
|
-
type: i0.Input
|
|
21367
|
-
}], width: [{
|
|
21368
|
-
type: i0.Input
|
|
21369
|
-
}], height: [{
|
|
21370
|
-
type: i0.Input
|
|
21371
|
-
}], responsive: [{
|
|
21372
|
-
type: i0.Input
|
|
21373
|
-
}], chartClick: [{
|
|
21374
|
-
type: i0.Output
|
|
21375
|
-
}], chartHover: [{
|
|
21376
|
-
type: i0.Output
|
|
21377
|
-
}], data: [{
|
|
21378
|
-
type: i0.Input
|
|
21379
|
-
}], options: [{
|
|
21380
|
-
type: i0.Input
|
|
21381
|
-
}] } });
|
|
21382
|
-
|
|
21383
|
-
var SmzChartModule = /** @class */ (function () {
|
|
21384
|
-
function SmzChartModule() {
|
|
21385
|
-
}
|
|
21386
|
-
return SmzChartModule;
|
|
21387
|
-
}());
|
|
21388
|
-
SmzChartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
21389
|
-
SmzChartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, declarations: [SmzChartComponent], imports: [i1$1.CommonModule], exports: [SmzChartComponent] });
|
|
21390
|
-
SmzChartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, imports: [[i1$1.CommonModule]] });
|
|
21391
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzChartModule, decorators: [{
|
|
21392
|
-
type: i0.NgModule,
|
|
21393
|
-
args: [{
|
|
21394
|
-
imports: [i1$1.CommonModule],
|
|
21395
|
-
exports: [SmzChartComponent],
|
|
21396
|
-
declarations: [SmzChartComponent]
|
|
21397
|
-
}]
|
|
21398
|
-
}] });
|
|
21399
|
-
|
|
21400
21441
|
// MODULES
|
|
21401
21442
|
// PIPES
|
|
21402
21443
|
// SERVICES
|
|
@@ -24225,7 +24266,7 @@
|
|
|
24225
24266
|
this._data.header.isVisible = true;
|
|
24226
24267
|
return new SmzCellTableColumnBuilder(this, property, label, this._documentBuilder);
|
|
24227
24268
|
};
|
|
24228
|
-
SmzCellTableBuilder.prototype.
|
|
24269
|
+
SmzCellTableBuilder.prototype.setSource = function (selector, items$, items) {
|
|
24229
24270
|
if (selector != null) {
|
|
24230
24271
|
var store = GlobalInjector$2.instance.get(i1$4.Store);
|
|
24231
24272
|
this._data.content.items$ = store.select(selector);
|
|
@@ -24237,7 +24278,7 @@
|
|
|
24237
24278
|
this._data.content.items$ = rxjs.of(items);
|
|
24238
24279
|
}
|
|
24239
24280
|
else {
|
|
24240
|
-
throw new Error("You need to provide at least one type of items to the table (
|
|
24281
|
+
throw new Error("You need to provide at least one type of items to the table (setSource())");
|
|
24241
24282
|
}
|
|
24242
24283
|
return this.that;
|
|
24243
24284
|
};
|
|
@@ -24309,6 +24350,30 @@
|
|
|
24309
24350
|
});
|
|
24310
24351
|
return SmzCellTableColumnBuilder;
|
|
24311
24352
|
}());
|
|
24353
|
+
var SmzCellChartBuilder = /** @class */ (function (_super) {
|
|
24354
|
+
__extends(SmzCellChartBuilder, _super);
|
|
24355
|
+
function SmzCellChartBuilder(_rowBuilder, _cell, _data, _documentBuilder) {
|
|
24356
|
+
var _this = _super.call(this, _rowBuilder, _cell, _data, _documentBuilder) || this;
|
|
24357
|
+
_this._rowBuilder = _rowBuilder;
|
|
24358
|
+
_this._cell = _cell;
|
|
24359
|
+
_this._data = _data;
|
|
24360
|
+
_this._documentBuilder = _documentBuilder;
|
|
24361
|
+
_this.that = _this;
|
|
24362
|
+
var defaultConfig = cloneDeep__default["default"](_this._documentBuilder._state.config);
|
|
24363
|
+
_data.container = { styles: defaultConfig.tables.container };
|
|
24364
|
+
_data.content = {};
|
|
24365
|
+
return _this;
|
|
24366
|
+
}
|
|
24367
|
+
SmzCellChartBuilder.prototype.overrideContainerStyles = function (styleClass) {
|
|
24368
|
+
this._data.container.styles = styleClass;
|
|
24369
|
+
return this.that;
|
|
24370
|
+
};
|
|
24371
|
+
SmzCellChartBuilder.prototype.setContainerBackgroundColor = function (color) {
|
|
24372
|
+
this._data.container.background = color;
|
|
24373
|
+
return this.that;
|
|
24374
|
+
};
|
|
24375
|
+
return SmzCellChartBuilder;
|
|
24376
|
+
}(SmzDocumentBaseCellBuilder));
|
|
24312
24377
|
|
|
24313
24378
|
var SmzDocumentContentBuilder = /** @class */ (function (_super) {
|
|
24314
24379
|
__extends(SmzDocumentContentBuilder, _super);
|
|
@@ -24396,6 +24461,13 @@
|
|
|
24396
24461
|
cell.data = item;
|
|
24397
24462
|
return new SmzCellTableBuilder(this, cell, item, this._documentBuilder);
|
|
24398
24463
|
};
|
|
24464
|
+
SmzDocumentRowBuilder.prototype.chart = function (chartData) {
|
|
24465
|
+
var cell = { colspan: 1, rowspan: 1, height: '100%', width: 'auto', data: null };
|
|
24466
|
+
this._row.cells.push(cell);
|
|
24467
|
+
var item = { type: SmzDocumentFeatureDefinitions.CHART, content: { chartData: chartData } };
|
|
24468
|
+
cell.data = item;
|
|
24469
|
+
return new SmzCellChartBuilder(this, cell, item, this._documentBuilder);
|
|
24470
|
+
};
|
|
24399
24471
|
Object.defineProperty(SmzDocumentRowBuilder.prototype, "content", {
|
|
24400
24472
|
get: function () {
|
|
24401
24473
|
var _this = this;
|