ngx-smz-ui 3.4.23 → 3.5.3
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 +220 -96
- 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 +35 -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 +49 -0
- 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-dialogs/features/document-content/document-content.component.js +1 -1
- package/esm2015/lib/modules/smz-documents/features/document-viewer/document-viewer.component.js +10 -28
- package/esm2015/lib/modules/smz-documents/models/smz-document-config.js +1 -1
- package/esm2015/lib/modules/smz-documents/models/smz-document-viewer.js +2 -0
- package/esm2015/lib/modules/smz-documents/models/smz-document.js +1 -1
- package/esm2015/lib/modules/smz-documents/services/smz-documents.service.js +41 -6
- package/fesm2015/ngx-smz-ui.js +184 -75
- 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 +5 -2
- package/lib/builders/smz-documents/document-content.d.ts +3 -2
- package/lib/builders/smz-documents/document-viewer.d.ts +18 -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/features/document-viewer/document-viewer.component.d.ts +3 -8
- package/lib/modules/smz-documents/models/smz-document-config.d.ts +4 -0
- package/lib/modules/smz-documents/models/smz-document-viewer.d.ts +25 -0
- package/lib/modules/smz-documents/models/smz-document.d.ts +2 -0
- package/lib/modules/smz-documents/services/smz-documents.service.d.ts +15 -2
- 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.
|
|
@@ -9263,15 +9263,50 @@
|
|
|
9263
9263
|
ApplicationActions.SetLogApplicationAreaAndExtraData = SetLogApplicationAreaAndExtraData;
|
|
9264
9264
|
})(exports.ApplicationActions || (exports.ApplicationActions = {}));
|
|
9265
9265
|
|
|
9266
|
-
var INITIAL_ZOOM
|
|
9266
|
+
var INITIAL_ZOOM = 1;
|
|
9267
9267
|
var SmzDocumentsService = /** @class */ (function () {
|
|
9268
|
-
function SmzDocumentsService() {
|
|
9269
|
-
this.
|
|
9270
|
-
this.zoom = INITIAL_ZOOM
|
|
9268
|
+
function SmzDocumentsService(store) {
|
|
9269
|
+
this.store = store;
|
|
9270
|
+
this.zoom = INITIAL_ZOOM;
|
|
9271
|
+
this.filename = 'sample';
|
|
9272
|
+
this.zoom = INITIAL_ZOOM;
|
|
9271
9273
|
this.showDownloadControl = true;
|
|
9272
9274
|
this.showExportControl = true;
|
|
9273
9275
|
}
|
|
9276
|
+
SmzDocumentsService.prototype.setZoom = function (zoom) {
|
|
9277
|
+
this.zoom = zoom;
|
|
9278
|
+
};
|
|
9279
|
+
SmzDocumentsService.prototype.setFilename = function (filename) {
|
|
9280
|
+
this.filename = filename;
|
|
9281
|
+
};
|
|
9282
|
+
SmzDocumentsService.prototype.setState = function (state) {
|
|
9283
|
+
this.state = state;
|
|
9284
|
+
};
|
|
9285
|
+
SmzDocumentsService.prototype.setPaperElement = function (paperElement) {
|
|
9286
|
+
this.paperElement = paperElement;
|
|
9287
|
+
};
|
|
9288
|
+
SmzDocumentsService.prototype.generate = function (action) {
|
|
9289
|
+
var _this = this;
|
|
9290
|
+
this.store.dispatch(new exports.ApplicationActions.StartGlobalLoading());
|
|
9291
|
+
setTimeout(function () {
|
|
9292
|
+
_this.generatePdf(action, _this.paperElement, _this.state).then(function () {
|
|
9293
|
+
_this.store.dispatch(new exports.ApplicationActions.StopGlobalLoading());
|
|
9294
|
+
});
|
|
9295
|
+
}, 0);
|
|
9296
|
+
};
|
|
9297
|
+
SmzDocumentsService.prototype.moreZoom = function () {
|
|
9298
|
+
var next = this.zoom + this.state.viewer.zoom.variation;
|
|
9299
|
+
this.setZoom(next <= this.state.viewer.zoom.max ? next : this.state.viewer.zoom.max);
|
|
9300
|
+
};
|
|
9301
|
+
SmzDocumentsService.prototype.lessZoom = function () {
|
|
9302
|
+
var next = this.zoom - this.state.viewer.zoom.variation;
|
|
9303
|
+
this.setZoom(next >= this.state.viewer.zoom.min ? next : this.state.viewer.zoom.min);
|
|
9304
|
+
};
|
|
9305
|
+
SmzDocumentsService.prototype.restoreZoom = function () {
|
|
9306
|
+
this.setZoom(this.state.viewer.zoom.initial);
|
|
9307
|
+
};
|
|
9274
9308
|
SmzDocumentsService.prototype.generatePdf = function (action, element, state) {
|
|
9309
|
+
var _this = this;
|
|
9275
9310
|
return new Promise(function (resolve) {
|
|
9276
9311
|
var docOptions = {
|
|
9277
9312
|
orientation: 'portrait',
|
|
@@ -9303,13 +9338,13 @@
|
|
|
9303
9338
|
doc.html(element.nativeElement, options).then(function () {
|
|
9304
9339
|
switch (action) {
|
|
9305
9340
|
case 'open': {
|
|
9306
|
-
doc.output('dataurlnewwindow', { filename:
|
|
9341
|
+
doc.output('dataurlnewwindow', { filename: _this.filename + ".pdf" });
|
|
9307
9342
|
resolve('Resolved');
|
|
9308
9343
|
break;
|
|
9309
9344
|
}
|
|
9310
9345
|
// case 'print': this.pdfMakeService.pdfMake.createPdf(document).print(); break;
|
|
9311
9346
|
case 'download': {
|
|
9312
|
-
var saving = doc.save(
|
|
9347
|
+
var saving = doc.save(_this.filename + ".pdf", { returnPromise: true });
|
|
9313
9348
|
saving.then(function () {
|
|
9314
9349
|
resolve('Resolved');
|
|
9315
9350
|
});
|
|
@@ -9321,18 +9356,14 @@
|
|
|
9321
9356
|
};
|
|
9322
9357
|
return SmzDocumentsService;
|
|
9323
9358
|
}());
|
|
9324
|
-
SmzDocumentsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
9359
|
+
SmzDocumentsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentsService, deps: [{ token: i1__namespace$4.Store }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
9325
9360
|
SmzDocumentsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentsService, providedIn: 'root' });
|
|
9326
9361
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentsService, decorators: [{
|
|
9327
9362
|
type: i0.Injectable,
|
|
9328
9363
|
args: [{ providedIn: 'root' }]
|
|
9329
|
-
}], ctorParameters: function () { return []; } });
|
|
9364
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$4.Store }]; } });
|
|
9330
9365
|
|
|
9331
9366
|
var moment$1 = moment___namespace;
|
|
9332
|
-
var MAX_ZOOM = 2.5;
|
|
9333
|
-
var MIN_ZOOM = 1;
|
|
9334
|
-
var ZOOM_VARIATION = MAX_ZOOM / 5;
|
|
9335
|
-
var INITIAL_ZOOM = MIN_ZOOM;
|
|
9336
9367
|
var SmzDocumentViewerComponent = /** @class */ (function () {
|
|
9337
9368
|
function SmzDocumentViewerComponent(el, documentService, location, cdf, store, renderer) {
|
|
9338
9369
|
this.el = el;
|
|
@@ -9341,41 +9372,27 @@
|
|
|
9341
9372
|
this.cdf = cdf;
|
|
9342
9373
|
this.store = store;
|
|
9343
9374
|
this.renderer = renderer;
|
|
9344
|
-
this.maxZoom = MAX_ZOOM;
|
|
9345
|
-
this.minZoom = MIN_ZOOM;
|
|
9346
9375
|
this.now = moment$1().format('MMMM Do YYYY, h:mm:ss a');
|
|
9347
9376
|
}
|
|
9348
9377
|
SmzDocumentViewerComponent.prototype.ngOnInit = function () {
|
|
9378
|
+
this.documentService.setZoom(this.state.viewer.zoom.initial);
|
|
9379
|
+
this.documentService.setFilename(this.state.viewer.filename);
|
|
9380
|
+
this.documentService.setState(this.state);
|
|
9349
9381
|
};
|
|
9350
9382
|
SmzDocumentViewerComponent.prototype.ngAfterViewInit = function () {
|
|
9351
|
-
|
|
9352
|
-
SmzDocumentViewerComponent.prototype.generate = function (action, element) {
|
|
9353
|
-
var _this = this;
|
|
9354
|
-
this.store.dispatch(new exports.ApplicationActions.StartGlobalLoading());
|
|
9355
|
-
setTimeout(function () {
|
|
9356
|
-
_this.documentService.generatePdf(action, element, _this.state).then(function () {
|
|
9357
|
-
_this.store.dispatch(new exports.ApplicationActions.StopGlobalLoading());
|
|
9358
|
-
});
|
|
9359
|
-
}, 0);
|
|
9360
|
-
};
|
|
9361
|
-
SmzDocumentViewerComponent.prototype.moreZoom = function () {
|
|
9362
|
-
var next = this.documentService.zoom + ZOOM_VARIATION;
|
|
9363
|
-
this.documentService.zoom = next <= MAX_ZOOM ? next : MAX_ZOOM;
|
|
9364
|
-
};
|
|
9365
|
-
SmzDocumentViewerComponent.prototype.lessZoom = function () {
|
|
9366
|
-
var next = this.documentService.zoom - ZOOM_VARIATION;
|
|
9367
|
-
this.documentService.zoom = next >= MIN_ZOOM ? next : MIN_ZOOM;
|
|
9368
|
-
};
|
|
9369
|
-
SmzDocumentViewerComponent.prototype.restoreZoom = function () {
|
|
9370
|
-
this.documentService.zoom = INITIAL_ZOOM;
|
|
9383
|
+
this.documentService.setPaperElement(this.paperElement);
|
|
9371
9384
|
};
|
|
9372
9385
|
SmzDocumentViewerComponent.prototype.goBack = function () {
|
|
9373
9386
|
this.location.back();
|
|
9374
9387
|
};
|
|
9388
|
+
SmzDocumentViewerComponent.prototype.ngOnDestroy = function () {
|
|
9389
|
+
this.documentService.setState(null);
|
|
9390
|
+
this.documentService.setPaperElement(null);
|
|
9391
|
+
};
|
|
9375
9392
|
return SmzDocumentViewerComponent;
|
|
9376
9393
|
}());
|
|
9377
9394
|
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 });
|
|
9378
|
-
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\">\n\n <div class=\"p-grid p-nogutter p-align-start p-justify-start gap-2\">\n <button pButton type=\"button\" class=\"p-button p-button-outlined\" label=\"ZOOM -\" (click)=\"lessZoom()\"></button>\n
|
|
9395
|
+
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 });
|
|
9379
9396
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: SmzDocumentViewerComponent, decorators: [{
|
|
9380
9397
|
type: i0.Component,
|
|
9381
9398
|
args: [{
|
|
@@ -12573,11 +12590,61 @@
|
|
|
12573
12590
|
return SmzDialogUiDefinitionBuilder;
|
|
12574
12591
|
}(SmzBaseUiDefinitionBuilder));
|
|
12575
12592
|
|
|
12576
|
-
var
|
|
12593
|
+
var SmzBuilderUtilities = /** @class */ (function () {
|
|
12594
|
+
function SmzBuilderUtilities() {
|
|
12595
|
+
this.cache = {
|
|
12596
|
+
if: { isActive: false, data: null }
|
|
12597
|
+
};
|
|
12598
|
+
}
|
|
12599
|
+
SmzBuilderUtilities.prototype.if = function (condition) {
|
|
12600
|
+
if (this.cache.if.isActive)
|
|
12601
|
+
throw new Error("You cannot call more than one condition method at the same time.");
|
|
12602
|
+
// Registrando flag de method condicional em execução
|
|
12603
|
+
this.cache.if.isActive = true;
|
|
12604
|
+
// Se a condição for nula
|
|
12605
|
+
if (!condition) {
|
|
12606
|
+
// Preparar modelo de backup para o endif retornar dados originais descartando todos os dados feitos pelos builders entre o IF e o ENDIF
|
|
12607
|
+
this.cache.if.data = cloneDeep__default["default"](this.that);
|
|
12608
|
+
}
|
|
12609
|
+
return this.that;
|
|
12610
|
+
};
|
|
12611
|
+
Object.defineProperty(SmzBuilderUtilities.prototype, "endIf", {
|
|
12612
|
+
get: function () {
|
|
12613
|
+
var data = conclude('endif', this.cache.if, this.that);
|
|
12614
|
+
// Limpando cache do modelo que seguirá
|
|
12615
|
+
data['cache'].data = null;
|
|
12616
|
+
data['cache'].if.isActive = false;
|
|
12617
|
+
return data;
|
|
12618
|
+
},
|
|
12619
|
+
enumerable: false,
|
|
12620
|
+
configurable: true
|
|
12621
|
+
});
|
|
12622
|
+
return SmzBuilderUtilities;
|
|
12623
|
+
}());
|
|
12624
|
+
function conclude(methodName, cache, that) {
|
|
12625
|
+
if (!cache.isActive)
|
|
12626
|
+
throw new Error("You cannot call " + methodName + " without calling the opening method first.");
|
|
12627
|
+
if (cache.data != null) {
|
|
12628
|
+
// Pegando modelo original sem as alterações feitas
|
|
12629
|
+
var newData = cache.data;
|
|
12630
|
+
// Retornando backup sem as alterações
|
|
12631
|
+
return newData;
|
|
12632
|
+
}
|
|
12633
|
+
else {
|
|
12634
|
+
// Retornando modelo com as alterações
|
|
12635
|
+
return that;
|
|
12636
|
+
}
|
|
12637
|
+
}
|
|
12638
|
+
|
|
12639
|
+
var SmzDialogBuilder = /** @class */ (function (_super) {
|
|
12640
|
+
__extends(SmzDialogBuilder, _super);
|
|
12577
12641
|
function SmzDialogBuilder() {
|
|
12642
|
+
var _this = this;
|
|
12578
12643
|
var _a, _b, _c, _d, _e, _f;
|
|
12579
|
-
|
|
12580
|
-
|
|
12644
|
+
_this = _super.call(this) || this;
|
|
12645
|
+
_this.that = _this;
|
|
12646
|
+
_this.defaultConfig = GlobalInjector$2.instance.get(SmzDialogsConfig);
|
|
12647
|
+
_this._state = {
|
|
12581
12648
|
title: null,
|
|
12582
12649
|
callbacks: {
|
|
12583
12650
|
onCancel: null,
|
|
@@ -12589,12 +12656,13 @@
|
|
|
12589
12656
|
},
|
|
12590
12657
|
customButtons: [],
|
|
12591
12658
|
customButtonsOrder: 'last',
|
|
12592
|
-
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 =
|
|
12593
|
-
builtInButtons: Object.assign({ confirmName: 'CONFIRMAR', confirmDependsOnValidation: true, cancelName: 'CANCELAR', cancelClass: 'p-button-outlined', okName: 'OK', okDependsOnValidation: false }, (_d = (_c =
|
|
12594
|
-
dialogTemplate: Object.assign({ extraSmall: { row: 'col-12' }, large: { row: 'col-8' }, extraLarge: { row: 'col-6' } }, (_f = (_e =
|
|
12659
|
+
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),
|
|
12660
|
+
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),
|
|
12661
|
+
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),
|
|
12595
12662
|
features: []
|
|
12596
12663
|
};
|
|
12597
|
-
|
|
12664
|
+
_this.createdByUiDefinitions = false;
|
|
12665
|
+
return _this;
|
|
12598
12666
|
}
|
|
12599
12667
|
SmzDialogBuilder.prototype.setTitle = function (title) {
|
|
12600
12668
|
if (title === void 0) { title = null; }
|
|
@@ -12729,7 +12797,7 @@
|
|
|
12729
12797
|
return this._state;
|
|
12730
12798
|
};
|
|
12731
12799
|
return SmzDialogBuilder;
|
|
12732
|
-
}());
|
|
12800
|
+
}(SmzBuilderUtilities));
|
|
12733
12801
|
var SmzDialogComponentBuilder = /** @class */ (function () {
|
|
12734
12802
|
function SmzDialogComponentBuilder(_dialogBuilder, feature) {
|
|
12735
12803
|
this._dialogBuilder = _dialogBuilder;
|
|
@@ -18192,9 +18260,13 @@
|
|
|
18192
18260
|
};
|
|
18193
18261
|
return SmzDataTransformColumnBuilder;
|
|
18194
18262
|
}(SmzBaseColumnBuilder));
|
|
18195
|
-
var SmzColumnCollectionBuilder = /** @class */ (function () {
|
|
18263
|
+
var SmzColumnCollectionBuilder = /** @class */ (function (_super) {
|
|
18264
|
+
__extends(SmzColumnCollectionBuilder, _super);
|
|
18196
18265
|
function SmzColumnCollectionBuilder(_tableBuilder) {
|
|
18197
|
-
|
|
18266
|
+
var _this = _super.call(this) || this;
|
|
18267
|
+
_this._tableBuilder = _tableBuilder;
|
|
18268
|
+
_this.that = _this;
|
|
18269
|
+
return _this;
|
|
18198
18270
|
}
|
|
18199
18271
|
SmzColumnCollectionBuilder.prototype.text = function (field, header, width) {
|
|
18200
18272
|
if (width === void 0) { width = 'auto'; }
|
|
@@ -18228,7 +18300,7 @@
|
|
|
18228
18300
|
configurable: true
|
|
18229
18301
|
});
|
|
18230
18302
|
return SmzColumnCollectionBuilder;
|
|
18231
|
-
}());
|
|
18303
|
+
}(SmzBuilderUtilities));
|
|
18232
18304
|
|
|
18233
18305
|
var SmzMenuTableBuilder = /** @class */ (function () {
|
|
18234
18306
|
function SmzMenuTableBuilder(_tableBuilder) {
|
|
@@ -23705,45 +23777,6 @@
|
|
|
23705
23777
|
* Public API Surface of ngx-rbk-utils
|
|
23706
23778
|
*/
|
|
23707
23779
|
|
|
23708
|
-
var SmzConditionalBuilder = /** @class */ (function () {
|
|
23709
|
-
function SmzConditionalBuilder() {
|
|
23710
|
-
}
|
|
23711
|
-
SmzConditionalBuilder.prototype.if = function (condition) {
|
|
23712
|
-
if (this._currentConditionMethod != null)
|
|
23713
|
-
throw new Error("You cannot call more than one condition method at the same time.");
|
|
23714
|
-
// Registrando flag de method condicional em execução
|
|
23715
|
-
this._currentConditionMethod = 'if';
|
|
23716
|
-
// Se a condição for nula
|
|
23717
|
-
if (!condition) {
|
|
23718
|
-
// Preparar modelo de backup para o endif retornar dados originais descartando todos os dados feitos pelos builders entre o IF e o ENDIF
|
|
23719
|
-
this.backup = cloneDeep__default["default"](this.that);
|
|
23720
|
-
}
|
|
23721
|
-
return this.that;
|
|
23722
|
-
};
|
|
23723
|
-
Object.defineProperty(SmzConditionalBuilder.prototype, "endIf", {
|
|
23724
|
-
get: function () {
|
|
23725
|
-
if (this._currentConditionMethod == null)
|
|
23726
|
-
throw new Error("You cannot call endIf without calling a condition method first.");
|
|
23727
|
-
if (this.backup != null) {
|
|
23728
|
-
// Pegando modelo original sem as alterações feitas
|
|
23729
|
-
var newThat = this.backup;
|
|
23730
|
-
// Limpando cache
|
|
23731
|
-
this.backup = null;
|
|
23732
|
-
this._currentConditionMethod = null;
|
|
23733
|
-
// Retornando backup sem as alterações
|
|
23734
|
-
return newThat;
|
|
23735
|
-
}
|
|
23736
|
-
else {
|
|
23737
|
-
// Retornando modelo com as alterações
|
|
23738
|
-
return this.that;
|
|
23739
|
-
}
|
|
23740
|
-
},
|
|
23741
|
-
enumerable: false,
|
|
23742
|
-
configurable: true
|
|
23743
|
-
});
|
|
23744
|
-
return SmzConditionalBuilder;
|
|
23745
|
-
}());
|
|
23746
|
-
|
|
23747
23780
|
var SmzDocumentBaseCellBuilder = /** @class */ (function (_super) {
|
|
23748
23781
|
__extends(SmzDocumentBaseCellBuilder, _super);
|
|
23749
23782
|
function SmzDocumentBaseCellBuilder(_rowBuilder, _cell, _data, _documentBuilder) {
|
|
@@ -23778,7 +23811,7 @@
|
|
|
23778
23811
|
configurable: true
|
|
23779
23812
|
});
|
|
23780
23813
|
return SmzDocumentBaseCellBuilder;
|
|
23781
|
-
}(
|
|
23814
|
+
}(SmzBuilderUtilities));
|
|
23782
23815
|
|
|
23783
23816
|
var SmzCellTitleBuilder = /** @class */ (function (_super) {
|
|
23784
23817
|
__extends(SmzCellTitleBuilder, _super);
|
|
@@ -24210,6 +24243,7 @@
|
|
|
24210
24243
|
var _this = _super.call(this) || this;
|
|
24211
24244
|
_this._documentBuilder = _documentBuilder;
|
|
24212
24245
|
_this._content = _content;
|
|
24246
|
+
_this.that = _this;
|
|
24213
24247
|
return _this;
|
|
24214
24248
|
}
|
|
24215
24249
|
SmzDocumentContentBuilder.prototype.row = function () {
|
|
@@ -24225,7 +24259,7 @@
|
|
|
24225
24259
|
configurable: true
|
|
24226
24260
|
});
|
|
24227
24261
|
return SmzDocumentContentBuilder;
|
|
24228
|
-
}(
|
|
24262
|
+
}(SmzBuilderUtilities));
|
|
24229
24263
|
var SmzDocumentRowBuilder = /** @class */ (function () {
|
|
24230
24264
|
function SmzDocumentRowBuilder(_contentBuilder, _row, _documentBuilder, _content) {
|
|
24231
24265
|
this._contentBuilder = _contentBuilder;
|
|
@@ -24313,12 +24347,68 @@
|
|
|
24313
24347
|
return SmzDocumentRowBuilder;
|
|
24314
24348
|
}());
|
|
24315
24349
|
|
|
24350
|
+
var SmzDocumentViewerBuilder = /** @class */ (function (_super) {
|
|
24351
|
+
__extends(SmzDocumentViewerBuilder, _super);
|
|
24352
|
+
function SmzDocumentViewerBuilder(_documentBuilder, _viewer) {
|
|
24353
|
+
var _this = _super.call(this) || this;
|
|
24354
|
+
_this._documentBuilder = _documentBuilder;
|
|
24355
|
+
_this._viewer = _viewer;
|
|
24356
|
+
_this.that = _this;
|
|
24357
|
+
return _this;
|
|
24358
|
+
}
|
|
24359
|
+
SmzDocumentViewerBuilder.prototype.setFilename = function (filename) {
|
|
24360
|
+
this._viewer.filename = filename;
|
|
24361
|
+
return this;
|
|
24362
|
+
};
|
|
24363
|
+
SmzDocumentViewerBuilder.prototype.overrideContainerStyles = function (styleClass) {
|
|
24364
|
+
this._viewer.container.styleClass = styleClass;
|
|
24365
|
+
return this;
|
|
24366
|
+
};
|
|
24367
|
+
SmzDocumentViewerBuilder.prototype.overridePaperStyles = function (styleClass) {
|
|
24368
|
+
this._viewer.paper.styleClass = styleClass;
|
|
24369
|
+
return this;
|
|
24370
|
+
};
|
|
24371
|
+
SmzDocumentViewerBuilder.prototype.setZoom = function (initial, min, max, variation) {
|
|
24372
|
+
this._viewer.zoom.isEnabled = true;
|
|
24373
|
+
this._viewer.zoom.min = min !== null && min !== void 0 ? min : initial;
|
|
24374
|
+
this._viewer.zoom.max = max !== null && max !== void 0 ? max : initial;
|
|
24375
|
+
this._viewer.zoom.initial = initial;
|
|
24376
|
+
this._viewer.zoom.variation = variation !== null && variation !== void 0 ? variation : initial;
|
|
24377
|
+
return this;
|
|
24378
|
+
};
|
|
24379
|
+
SmzDocumentViewerBuilder.prototype.disableZoomControls = function () {
|
|
24380
|
+
this._viewer.zoom.isEnabled = false;
|
|
24381
|
+
return this;
|
|
24382
|
+
};
|
|
24383
|
+
SmzDocumentViewerBuilder.prototype.allowOpen = function () {
|
|
24384
|
+
this._viewer.open.isEnabled = true;
|
|
24385
|
+
return this;
|
|
24386
|
+
};
|
|
24387
|
+
SmzDocumentViewerBuilder.prototype.allowPrint = function () {
|
|
24388
|
+
this._viewer.print.isEnabled = true;
|
|
24389
|
+
return this;
|
|
24390
|
+
};
|
|
24391
|
+
SmzDocumentViewerBuilder.prototype.allowDownload = function () {
|
|
24392
|
+
this._viewer.download.isEnabled = true;
|
|
24393
|
+
return this;
|
|
24394
|
+
};
|
|
24395
|
+
Object.defineProperty(SmzDocumentViewerBuilder.prototype, "document", {
|
|
24396
|
+
get: function () {
|
|
24397
|
+
return this._documentBuilder;
|
|
24398
|
+
},
|
|
24399
|
+
enumerable: false,
|
|
24400
|
+
configurable: true
|
|
24401
|
+
});
|
|
24402
|
+
return SmzDocumentViewerBuilder;
|
|
24403
|
+
}(SmzBuilderUtilities));
|
|
24404
|
+
|
|
24316
24405
|
var pixelCmFactor = 28.346;
|
|
24317
24406
|
var SmzDocumentBuilder = /** @class */ (function (_super) {
|
|
24318
24407
|
__extends(SmzDocumentBuilder, _super);
|
|
24319
24408
|
function SmzDocumentBuilder(state) {
|
|
24320
24409
|
if (state === void 0) { state = null; }
|
|
24321
24410
|
var _this = _super.call(this) || this;
|
|
24411
|
+
_this.that = _this;
|
|
24322
24412
|
_this.defaultConfig = GlobalInjector$2.instance.get(NgxRbkUtilsConfig);
|
|
24323
24413
|
_this._colsCount = 0;
|
|
24324
24414
|
_this._isHeaderHeightUpdated = false;
|
|
@@ -24345,6 +24435,31 @@
|
|
|
24345
24435
|
text: null,
|
|
24346
24436
|
showPrintHour: true,
|
|
24347
24437
|
showPageNumbers: true
|
|
24438
|
+
},
|
|
24439
|
+
viewer: {
|
|
24440
|
+
filename: 'sample',
|
|
24441
|
+
zoom: {
|
|
24442
|
+
isEnabled: true,
|
|
24443
|
+
min: 1,
|
|
24444
|
+
max: 2.5,
|
|
24445
|
+
initial: 1,
|
|
24446
|
+
variation: 2.5 / 5
|
|
24447
|
+
},
|
|
24448
|
+
open: {
|
|
24449
|
+
isEnabled: false
|
|
24450
|
+
},
|
|
24451
|
+
print: {
|
|
24452
|
+
isEnabled: false
|
|
24453
|
+
},
|
|
24454
|
+
download: {
|
|
24455
|
+
isEnabled: false
|
|
24456
|
+
},
|
|
24457
|
+
container: {
|
|
24458
|
+
styleClass: null
|
|
24459
|
+
},
|
|
24460
|
+
paper: {
|
|
24461
|
+
styleClass: null
|
|
24462
|
+
}
|
|
24348
24463
|
}
|
|
24349
24464
|
};
|
|
24350
24465
|
if (state != null) {
|
|
@@ -24360,6 +24475,8 @@
|
|
|
24360
24475
|
var config = cloneDeep__default["default"](this.defaultConfig.documents.defaultStyles);
|
|
24361
24476
|
this._state.config = config;
|
|
24362
24477
|
this._state.globals = config.globals;
|
|
24478
|
+
this._state.viewer.container.styleClass = config.viewer.container;
|
|
24479
|
+
this._state.viewer.paper.styleClass = config.viewer.paper;
|
|
24363
24480
|
var marginCm = config.paper.marginCm;
|
|
24364
24481
|
var globalHeaderHeightCm = config.paper.headerHeightCm ? config.paper.headerHeightCm + "cm" : null;
|
|
24365
24482
|
this.applyMargin('cm', globalHeaderHeightCm, null, marginCm.left, marginCm.right, marginCm.top, marginCm.bottom);
|
|
@@ -24391,6 +24508,9 @@
|
|
|
24391
24508
|
this._state.config = newConfig;
|
|
24392
24509
|
return this;
|
|
24393
24510
|
};
|
|
24511
|
+
SmzDocumentBuilder.prototype.viewer = function () {
|
|
24512
|
+
return new SmzDocumentViewerBuilder(this, this._state.viewer);
|
|
24513
|
+
};
|
|
24394
24514
|
SmzDocumentBuilder.prototype.content = function () {
|
|
24395
24515
|
if (this._state.content == null)
|
|
24396
24516
|
this._state.content = { type: 'content', rows: [], cellStyles: '' };
|
|
@@ -24458,7 +24578,7 @@
|
|
|
24458
24578
|
return this._state;
|
|
24459
24579
|
};
|
|
24460
24580
|
return SmzDocumentBuilder;
|
|
24461
|
-
}(
|
|
24581
|
+
}(SmzBuilderUtilities));
|
|
24462
24582
|
function normalizeColspan(rows, row, totalColsCount) {
|
|
24463
24583
|
var debug = false; // row.cells.findIndex(x => (x.data as any)?.text?.value === 'COMPRADOR') !== -1;
|
|
24464
24584
|
var currentIndex = rows.findIndex(function (x) { return x.id === row.id; });
|
|
@@ -24504,9 +24624,13 @@
|
|
|
24504
24624
|
}
|
|
24505
24625
|
}
|
|
24506
24626
|
|
|
24507
|
-
var SmzMenuBuilder = /** @class */ (function () {
|
|
24627
|
+
var SmzMenuBuilder = /** @class */ (function (_super) {
|
|
24628
|
+
__extends(SmzMenuBuilder, _super);
|
|
24508
24629
|
function SmzMenuBuilder() {
|
|
24509
|
-
|
|
24630
|
+
var _this = _super.call(this) || this;
|
|
24631
|
+
_this.that = _this;
|
|
24632
|
+
_this._items = [];
|
|
24633
|
+
return _this;
|
|
24510
24634
|
}
|
|
24511
24635
|
SmzMenuBuilder.prototype.item = function (label, icon, tooltip) {
|
|
24512
24636
|
if (icon === void 0) { icon = null; }
|
|
@@ -24523,7 +24647,7 @@
|
|
|
24523
24647
|
return this._items;
|
|
24524
24648
|
};
|
|
24525
24649
|
return SmzMenuBuilder;
|
|
24526
|
-
}());
|
|
24650
|
+
}(SmzBuilderUtilities));
|
|
24527
24651
|
var SmzMenuItemBuilder = /** @class */ (function () {
|
|
24528
24652
|
function SmzMenuItemBuilder(_menuBuilder, _parent, _item) {
|
|
24529
24653
|
this._menuBuilder = _menuBuilder;
|