@colijnit/sharedcomponents 1.0.30 → 1.0.32
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/colijnit-sharedcomponents.umd.js +766 -1882
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.d.ts +40 -29
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/colijnit-sharedcomponents.js +41 -30
- package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +18 -15
- package/esm2015/lib/components/date-planning/date-planning.component.js +6 -4
- package/esm2015/lib/components/docsign/component/signature/signature.component.js +3 -3
- package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +7 -7
- package/esm2015/lib/components/docsign/docsign.component.js +5 -5
- package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +3 -3
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +14 -10
- package/esm2015/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.js +57 -0
- package/esm2015/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.js +19 -0
- package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.js +76 -0
- package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.js +21 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.js +59 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.js +23 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.js +50 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.js +26 -0
- package/esm2015/lib/components/send-method-dialog/model/email-address-viewmodel.js +7 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +162 -251
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +12 -13
- package/esm2015/lib/components/send-method-dialog/service/send-method.service.js +59 -0
- package/esm2015/lib/components/statusbar/statusbar.component.js +14 -16
- package/esm2015/lib/components/statusbar/statusbar.module.js +4 -2
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +7 -8
- package/esm2015/lib/enum/gauge-color.enum.js +10 -0
- package/esm2015/lib/enum/icon.enum.js +6 -1
- package/esm2015/lib/model/icon-svg.js +7 -2
- package/esm2015/lib/model/send-method.js +8 -0
- package/esm2015/lib/model/time-window.bo.js +4 -4
- package/esm2015/lib/pipe/array-number.pipe.js +1 -1
- package/esm2015/lib/service/icon-cache.service.js +1 -1
- package/esm2015/lib/service/shared-connector.service.js +91 -121
- package/esm2015/lib/service/shared.service.js +11 -1
- package/esm2015/lib/service/stock.service.js +19 -36
- package/fesm2015/colijnit-sharedcomponents.js +802 -1888
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/components/circular-gauge/style/_layout.scss +6 -5
- package/lib/components/circular-gauge/style/_theme.scss +0 -2
- package/lib/components/circular-gauge/style/material.scss +1 -0
- package/lib/components/date-planning/date-planning.component.d.ts +3 -2
- package/lib/components/date-planning/style/_layout.scss +2 -4
- package/lib/components/date-planning/style/_theme.scss +2 -4
- package/lib/components/docsign/component/signature/style/_layout.scss +2 -4
- package/lib/components/docsign/component/signature/style/_theme.scss +2 -4
- package/lib/components/docsign/component/signature/style/material.scss +1 -3
- package/lib/components/docsign/component/signatures/style/_layout.scss +3 -5
- package/lib/components/docsign/component/signatures/style/_theme.scss +2 -4
- package/lib/components/docsign/component/signatures/style/material.scss +1 -2
- package/lib/components/docsign/style/_layout.scss +3 -5
- package/lib/components/docsign/style/_theme.scss +2 -4
- package/lib/components/docsign/style/material.scss +1 -0
- package/lib/components/layout-switcher/style/_layout.scss +2 -4
- package/lib/components/layout-switcher/style/_theme.scss +2 -4
- package/lib/components/layout-switcher/style/material.scss +1 -0
- package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +1 -6
- package/lib/components/linear-gauge/style/_layout.scss +0 -2
- package/lib/components/linear-gauge/style/_theme.scss +0 -2
- package/lib/components/linear-gauge/style/material.scss +1 -0
- package/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.d.ts +13 -0
- package/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/_layout.scss +34 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/_material-definition.scss +19 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/_theme.scss +17 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/material.scss +4 -0
- package/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.d.ts +18 -0
- package/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/_layout.scss +59 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/_material-definition.scss +39 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/_theme.scss +23 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/material.scss +4 -0
- package/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.d.ts +14 -0
- package/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/_layout.scss +21 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/_material-definition.scss +8 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/_theme.scss +5 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/material.scss +4 -0
- package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.d.ts +10 -0
- package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/_layout.scss +17 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/_material-definition.scss +5 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/_theme.scss +5 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/material.scss +4 -0
- package/lib/components/send-method-dialog/model/email-address-viewmodel.d.ts +5 -0
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +53 -61
- package/lib/components/send-method-dialog/service/send-method.service.d.ts +23 -0
- package/lib/components/send-method-dialog/style/_layout.scss +44 -184
- package/lib/components/send-method-dialog/style/_material-definition.scss +30 -1
- package/lib/components/send-method-dialog/style/_theme.scss +31 -5
- package/lib/components/send-method-dialog/style/material.scss +5 -0
- package/lib/components/statusbar/statusbar.component.d.ts +2 -3
- package/lib/components/statusbar/style/_layout.scss +0 -2
- package/lib/components/statusbar/style/_theme.scss +0 -2
- package/lib/components/statusbar/style/material.scss +1 -0
- package/lib/components/stock/style/_layout.scss +0 -2
- package/lib/components/stock/style/_theme.scss +0 -3
- package/lib/components/stock/style/material.scss +1 -0
- package/lib/enum/gauge-color.enum.d.ts +8 -0
- package/lib/enum/icon.enum.d.ts +5 -0
- package/lib/model/send-method.d.ts +7 -0
- package/lib/model/time-window.bo.d.ts +1 -1
- package/lib/service/icon-cache.service.d.ts +1 -1
- package/lib/service/shared-connector.service.d.ts +21 -29
- package/lib/service/shared.service.d.ts +4 -0
- package/lib/service/stock.service.d.ts +1 -12
- package/lib/style/_variables.scss +5 -1
- package/package.json +6 -6
- package/esm2015/lib/components/send-method-dialog/enums/send-option.js +0 -8
- package/esm2015/lib/factory/business-object-factory.js +0 -120
- package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
- package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
- package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
- package/esm2015/lib/model/business-object.js +0 -81
- package/esm2015/lib/utils/array-utils.js +0 -202
- package/esm2015/lib/utils/check-precision-and-scale-result.js +0 -2
- package/esm2015/lib/utils/check-within-stepped-bounds-result.js +0 -2
- package/esm2015/lib/utils/is-nill.function.js +0 -5
- package/esm2015/lib/utils/number-utils.js +0 -390
- package/esm2015/lib/utils/object-utils.js +0 -278
- package/lib/components/send-method-dialog/enums/send-option.d.ts +0 -6
- package/lib/factory/business-object-factory.d.ts +0 -23
- package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
- package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
- package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
- package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
- package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
- package/lib/model/business-object.d.ts +0 -7
- package/lib/utils/array-utils.d.ts +0 -63
- package/lib/utils/check-precision-and-scale-result.d.ts +0 -4
- package/lib/utils/check-within-stepped-bounds-result.d.ts +0 -8
- package/lib/utils/is-nill.function.d.ts +0 -1
- package/lib/utils/number-utils.d.ts +0 -125
- package/lib/utils/object-utils.d.ts +0 -40
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('pdf-lib'), require('pdfjs-dist/legacy/build/pdf'), require('pdfjs-dist/build/pdf.worker.entry'), require('@angular/common'), require('signature_pad'), require('@colijnit/articleapi/build/articles'), require('@colijnit/sharedapi/build/sharedapi'), require('@colijnit/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@colijnit/sharedcomponents', ['exports', '@angular/core', '@angular/animations', 'pdf-lib', 'pdfjs-dist/legacy/build/pdf', 'pdfjs-dist/build/pdf.worker.entry', '@angular/common', 'signature_pad', '@colijnit/articleapi/build/articles', '@colijnit/sharedapi/build/sharedapi', '@colijnit/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.sharedcomponents = {}), global.ng.core, global.ng.animations, global.pdfLib, global.PDFJS, global.pdfjsWorker, global.ng.common, global.SignaturePad, global.articles, global.sharedapi, global.
|
|
5
|
-
})(this, (function (exports, i0, animations, pdfLib, PDFJS, pdfjsWorker, common, SignaturePad, articles, sharedapi,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('pdf-lib'), require('pdfjs-dist/legacy/build/pdf'), require('pdfjs-dist/build/pdf.worker.entry'), require('@angular/common'), require('signature_pad'), require('@colijnit/articleapi/build/articles'), require('@colijnit/sharedapi/build/sharedapi'), require('@colijnit/articleapi/build/model/article-stock.bo'), require('@colijnit/articleapi/build/model/stock-history.bo'), require('@colijnit/articleapi/build/model/article-details.bo'), require('@colijnit/articleapi/build/model/stock-status.bo'), require('@colijnit/articleapi/build/model/stock-management-warehouses.bo'), require('@colijnit/articleapi/build/model/stock-location.bo'), require('@colijnit/articleapi/build/model/article-transaction.bo'), require('rxjs'), require('@colijnit/mainapi'), require('@colijnit/mainapi/build/model/printer.bo'), require('@colijnit/ioneconnector/build/factory/business-object-factory'), require('@colijnit/mainapi/build/model/send-method.bo'), require('@colijnit/sharedapi/build/model/print-stock-stickers'), require('@colijnit/articleapi/build/model/get-stock-history-request'), require('@colijnit/articleapi/build/model/article-stock'), require('@colijnit/corecomponents_v12'), require('@angular/platform-browser'), require('@colijnit/articleapi/build/model/article-stock-management'), require('@colijnit/articleapi/build/model/article-transaction'), require('@colijnit/sharedapi/build/model/print-price-stickers.bo'), require('@colijnit/mainapi/build/model/reporting-document-print-base-request'), require('@colijnit/mainapi/build/model/reporting-document-email-base-request'), require('@colijnit/mainapi/build/model/reporting-document-pdf-base-request'), require('@colijnit/mainapi/build/enum/send-method-type.enum'), require('@syncfusion/ej2-angular-circulargauge'), require('moment')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@colijnit/sharedcomponents', ['exports', '@angular/core', '@angular/animations', 'pdf-lib', 'pdfjs-dist/legacy/build/pdf', 'pdfjs-dist/build/pdf.worker.entry', '@angular/common', 'signature_pad', '@colijnit/articleapi/build/articles', '@colijnit/sharedapi/build/sharedapi', '@colijnit/articleapi/build/model/article-stock.bo', '@colijnit/articleapi/build/model/stock-history.bo', '@colijnit/articleapi/build/model/article-details.bo', '@colijnit/articleapi/build/model/stock-status.bo', '@colijnit/articleapi/build/model/stock-management-warehouses.bo', '@colijnit/articleapi/build/model/stock-location.bo', '@colijnit/articleapi/build/model/article-transaction.bo', 'rxjs', '@colijnit/mainapi', '@colijnit/mainapi/build/model/printer.bo', '@colijnit/ioneconnector/build/factory/business-object-factory', '@colijnit/mainapi/build/model/send-method.bo', '@colijnit/sharedapi/build/model/print-stock-stickers', '@colijnit/articleapi/build/model/get-stock-history-request', '@colijnit/articleapi/build/model/article-stock', '@colijnit/corecomponents_v12', '@angular/platform-browser', '@colijnit/articleapi/build/model/article-stock-management', '@colijnit/articleapi/build/model/article-transaction', '@colijnit/sharedapi/build/model/print-price-stickers.bo', '@colijnit/mainapi/build/model/reporting-document-print-base-request', '@colijnit/mainapi/build/model/reporting-document-email-base-request', '@colijnit/mainapi/build/model/reporting-document-pdf-base-request', '@colijnit/mainapi/build/enum/send-method-type.enum', '@syncfusion/ej2-angular-circulargauge', 'moment'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.sharedcomponents = {}), global.ng.core, global.ng.animations, global.pdfLib, global.PDFJS, global.pdfjsWorker, global.ng.common, global.SignaturePad, global.articles, global.sharedapi, global.articleStock_bo, global.stockHistory_bo, global.articleDetails_bo, global.stockStatus_bo, global.stockManagementWarehouses_bo, global.stockLocation_bo, global.articleTransaction_bo, global.rxjs, global.mainapi, global.printer_bo, global.businessObjectFactory, global.sendMethod_bo, global.printStockStickers, global.getStockHistoryRequest, global.articleStock, global.corecomponents_v12, global.ng.platformBrowser, global.articleStockManagement, global.articleTransaction, global.printPriceStickers_bo, global.reportingDocumentPrintBaseRequest, global.reportingDocumentEmailBaseRequest, global.reportingDocumentPdfBaseRequest, global.sendMethodType_enum, global.ej2AngularCirculargauge, global.moment));
|
|
5
|
+
})(this, (function (exports, i0, animations, pdfLib, PDFJS, pdfjsWorker, common, SignaturePad, articles, sharedapi, articleStock_bo, stockHistory_bo, articleDetails_bo, stockStatus_bo, stockManagementWarehouses_bo, stockLocation_bo, articleTransaction_bo, rxjs, mainapi, printer_bo, businessObjectFactory, sendMethod_bo, printStockStickers, getStockHistoryRequest, articleStock, corecomponents_v12, i1, articleStockManagement, articleTransaction, printPriceStickers_bo, reportingDocumentPrintBaseRequest, reportingDocumentEmailBaseRequest, reportingDocumentPdfBaseRequest, sendMethodType_enum, ej2AngularCirculargauge, moment) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -582,8 +582,8 @@
|
|
|
582
582
|
}());
|
|
583
583
|
DocsignComponent.decorators = [
|
|
584
584
|
{ type: i0.Component, args: [{
|
|
585
|
-
selector: "
|
|
586
|
-
template: "\n <iframe #iframe></iframe>\n <
|
|
585
|
+
selector: "co-docsign",
|
|
586
|
+
template: "\n <iframe #iframe></iframe>\n <co-signatures *ngIf=\"showSignatures\" @showHideSignature\n [showFirstSignature]=\"showSigBuyer\"\n [firstSignatureTitle]=\"firstSignatureLabel\"\n [showSecondSignature]=\"showSigSeller\"\n [secondSignatureTitle]=\"secondSignatureLabel\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (saveFirstSignature)=\"saveFirstSignature($event)\"\n (saveSecondSignature)=\"saveSecondSignature($event)\"\n ></co-signatures>\n <input type=\"button\" *ngIf=\"(showSigBuyer || showSigSeller) && !showSignatures\" class=\"button button-sign-document\"\n [value]=\"signDocumentButtonLabel\"\n (click)=\"showSignatures = true\"\n />\n <input type=\"button\" class=\"button button-cancel\"\n [value]=\"cancelButtonLabel\"\n (click)=\"cancelClick.emit($event)\"\n />\n ",
|
|
587
587
|
animations: [
|
|
588
588
|
animations.trigger("showHideSignature", [
|
|
589
589
|
animations.state("void", animations.style({ transform: "translate(-50%, -50%) scale(0)" })),
|
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
cancelButtonLabel: [{ type: i0.Input }],
|
|
608
608
|
pdfSaved: [{ type: i0.Output }],
|
|
609
609
|
cancelClick: [{ type: i0.Output }],
|
|
610
|
-
showClass: [{ type: i0.HostBinding, args: ['class.
|
|
610
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-docsign',] }]
|
|
611
611
|
};
|
|
612
612
|
|
|
613
613
|
var SignatureComponent = /** @class */ (function () {
|
|
@@ -662,7 +662,7 @@
|
|
|
662
662
|
}());
|
|
663
663
|
SignatureComponent.decorators = [
|
|
664
664
|
{ type: i0.Component, args: [{
|
|
665
|
-
selector: "
|
|
665
|
+
selector: "co-signature",
|
|
666
666
|
template: "\n <div class=\"signature-wrapper\">\n <div class=\"signature-header\">\n <span *ngIf=\"title\" class=\"title\" [textContent]=\"title\"></span>\n <div class=\"button-wrapper\">\n <input type=\"button\" (click)=\"handleSave($event)\" [value]=\"saveButtonLabel\"/>\n <input type=\"button\" (click)=\"handleClear($event)\" [value]=\"clearButtonLabel\">\n </div>\n </div>\n <div class=\"canvas\">\n <canvas #signature></canvas>\n </div>\n </div>\n ",
|
|
667
667
|
encapsulation: i0.ViewEncapsulation.None
|
|
668
668
|
},] }
|
|
@@ -673,7 +673,7 @@
|
|
|
673
673
|
saveButtonLabel: [{ type: i0.Input }],
|
|
674
674
|
clearButtonLabel: [{ type: i0.Input }],
|
|
675
675
|
save: [{ type: i0.Output }],
|
|
676
|
-
showClass: [{ type: i0.HostBinding, args: ["class.
|
|
676
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-signature",] }]
|
|
677
677
|
};
|
|
678
678
|
|
|
679
679
|
var SignaturesComponent = /** @class */ (function () {
|
|
@@ -692,8 +692,8 @@
|
|
|
692
692
|
}());
|
|
693
693
|
SignaturesComponent.decorators = [
|
|
694
694
|
{ type: i0.Component, args: [{
|
|
695
|
-
selector: "
|
|
696
|
-
template: "\n <
|
|
695
|
+
selector: "co-signatures",
|
|
696
|
+
template: "\n <co-signature *ngIf=\"showFirstSignature\"\n [title]=\"firstSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveFirstSignature.emit($event)\"></co-signature>\n <co-signature *ngIf=\"showSecondSignature\"\n [title]=\"secondSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveSecondSignature.emit($event)\"></co-signature>\n ",
|
|
697
697
|
encapsulation: i0.ViewEncapsulation.None
|
|
698
698
|
},] }
|
|
699
699
|
];
|
|
@@ -706,7 +706,7 @@
|
|
|
706
706
|
clearButtonLabel: [{ type: i0.Input }],
|
|
707
707
|
saveFirstSignature: [{ type: i0.Output }],
|
|
708
708
|
saveSecondSignature: [{ type: i0.Output }],
|
|
709
|
-
showClass: [{ type: i0.HostBinding, args: ["class.
|
|
709
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-signatures",] }]
|
|
710
710
|
};
|
|
711
711
|
|
|
712
712
|
var DocsignModule = /** @class */ (function () {
|
|
@@ -730,1408 +730,13 @@
|
|
|
730
730
|
},] }
|
|
731
731
|
];
|
|
732
732
|
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
736
|
-
*/
|
|
737
|
-
/**
|
|
738
|
-
* Property decorator for properties of businessobject classes that are other strongly typed businessobjects.
|
|
739
|
-
* Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
|
|
740
|
-
* to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
|
|
741
|
-
*
|
|
742
|
-
* Usage:
|
|
743
|
-
*
|
|
744
|
-
* @ComplexField(Transaction)
|
|
745
|
-
* public transaction: Transaction
|
|
746
|
-
*
|
|
747
|
-
* Also keeps track of a "complexFieldProps" metadata on the class-level, as a reflect-metadata workaround to be able to
|
|
748
|
-
* retrieve all properties that have the @ComplexField(..) decorator (impossible with current Reflect API).
|
|
749
|
-
*/
|
|
750
|
-
function ComplexField(type) {
|
|
751
|
-
return function (target, propertyKey) {
|
|
752
|
-
if (!target || !propertyKey) {
|
|
753
|
-
return;
|
|
754
|
-
}
|
|
755
|
-
// warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
|
|
756
|
-
// to be immediately processed when a class is first imported
|
|
757
|
-
if (!type) {
|
|
758
|
-
// eslint-disable-next-line no-console
|
|
759
|
-
console.warn("@ComplexField(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
|
|
760
|
-
"Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
|
|
761
|
-
"where both classes and their dependencies are used, e.g. factory, repository or models..");
|
|
762
|
-
return;
|
|
763
|
-
}
|
|
764
|
-
Reflect.defineMetadata(PROP_META_KEY$3, type, target, propertyKey);
|
|
765
|
-
};
|
|
766
|
-
}
|
|
767
|
-
// Utility function holder of the ComplexFieldDecorator decorator.
|
|
768
|
-
var ComplexFieldDecorator = /** @class */ (function () {
|
|
769
|
-
function ComplexFieldDecorator() {
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* Returns whether given property (as a string) on given object is a complex field. A complex field is a field that is decorated
|
|
773
|
-
* with the @ComplexField decorator.
|
|
774
|
-
*/
|
|
775
|
-
ComplexFieldDecorator.IsComplexField = function (target, propertyKey) {
|
|
776
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
777
|
-
return false;
|
|
778
|
-
}
|
|
779
|
-
return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey)));
|
|
780
|
-
};
|
|
781
|
-
// Returns the VALUE of the @ComplexField(VALUE) property decorator on the given propertyKey on the given modelObject.
|
|
782
|
-
ComplexFieldDecorator.GetComplexFieldType = function (target, propertyKey) {
|
|
783
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
784
|
-
return undefined;
|
|
785
|
-
}
|
|
786
|
-
return Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey);
|
|
787
|
-
};
|
|
788
|
-
return ComplexFieldDecorator;
|
|
789
|
-
}());
|
|
790
|
-
|
|
791
|
-
var PROP_META_KEY$2 = "complexArray";
|
|
792
|
-
/**
|
|
793
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
794
|
-
*/
|
|
795
|
-
/**
|
|
796
|
-
* Property decorator for properties of businessobject classes that are an array of other strongly typed businessobjects.
|
|
797
|
-
* Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
|
|
798
|
-
* to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
|
|
799
|
-
*
|
|
800
|
-
* Usage:
|
|
801
|
-
*
|
|
802
|
-
* @ComplexArray(TransactionLine)
|
|
803
|
-
* public transactionLines: TransactionLine[]
|
|
804
|
-
*/
|
|
805
|
-
function ComplexArray(type) {
|
|
806
|
-
return function (target, propertyKey) {
|
|
807
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
// warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
|
|
811
|
-
// to be immediately processed when a class is first imported
|
|
812
|
-
if (!type) {
|
|
813
|
-
console.warn("@ComplexArray(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
|
|
814
|
-
"Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
|
|
815
|
-
"where both classes and their dependencies are used, e.g. factory, repository or models..");
|
|
816
|
-
return;
|
|
817
|
-
}
|
|
818
|
-
Reflect.defineMetadata(PROP_META_KEY$2, type, target, propertyKey);
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
// Utility function holder of the ComplexArrayDecorator decorator.
|
|
822
|
-
var ComplexArrayDecorator = /** @class */ (function () {
|
|
823
|
-
function ComplexArrayDecorator() {
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Returns whether given property (as a string) on given object is a complex array. A complex array is an array field that is decorated
|
|
827
|
-
* with the @ComplexArray decorator.
|
|
828
|
-
*/
|
|
829
|
-
ComplexArrayDecorator.IsComplexArray = function (target, propertyKey) {
|
|
830
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
831
|
-
return false;
|
|
832
|
-
}
|
|
833
|
-
return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey)));
|
|
834
|
-
};
|
|
835
|
-
/**
|
|
836
|
-
* Returns the VALUE of the @ComplexArray(VALUE) property decorator on the given propertyKey on the given modelobject.
|
|
837
|
-
*/
|
|
838
|
-
ComplexArrayDecorator.GetComplexArrayType = function (target, propertyKey) {
|
|
839
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
840
|
-
return undefined;
|
|
841
|
-
}
|
|
842
|
-
return Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey);
|
|
843
|
-
};
|
|
844
|
-
return ComplexArrayDecorator;
|
|
845
|
-
}());
|
|
846
|
-
|
|
847
|
-
var PROP_META_KEY_JN = "booleanTextJN";
|
|
848
|
-
var PROP_META_KEY_TF = "booleanTextTF";
|
|
849
|
-
var PROP_META_KEY_10 = "booleanText10";
|
|
850
|
-
/**
|
|
851
|
-
* There are 'J', 'T', 'N', 'F', 0 and 1 'boolean values' in the database. These should be translated to true and false boolean values in
|
|
852
|
-
* our client application.
|
|
853
|
-
*
|
|
854
|
-
* The values 'J' and 'N' seem to be most commonly used. This is the default setting when using this decorator.
|
|
855
|
-
* You can pass 'T' or 1 for the other variants as follows:
|
|
856
|
-
*
|
|
857
|
-
* Usage:
|
|
858
|
-
*
|
|
859
|
-
* @BooleanText() or @BooleanText("J") (the default, uses YesNoDbType char values)
|
|
860
|
-
* public foo: boolean // 'J' and 'N' become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
861
|
-
*
|
|
862
|
-
* @BooleanText('T') (uses TrueFalseDbType char values)
|
|
863
|
-
* public bar: boolean // 'T' and 'F' become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
864
|
-
*
|
|
865
|
-
* @BooleanText(1)
|
|
866
|
-
* public baz: boolean // 1 and 0 become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
867
|
-
*/
|
|
868
|
-
function BooleanText(type) {
|
|
869
|
-
return function (target, propertyKey) {
|
|
870
|
-
if (!target || !propertyKey) {
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
// by default, it's a J N boolean text
|
|
874
|
-
if (!type || type === "J") {
|
|
875
|
-
Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
|
|
876
|
-
}
|
|
877
|
-
else if (type === "T") {
|
|
878
|
-
Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
|
|
879
|
-
}
|
|
880
|
-
else if (type === 1) {
|
|
881
|
-
Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
|
|
882
|
-
}
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
// Utility function holder of the BooleanTextDecorator decorator.
|
|
886
|
-
var BooleanTextDecorator = /** @class */ (function () {
|
|
887
|
-
function BooleanTextDecorator() {
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* Returns whether given property (as a string) on given object is a boolean text field. That is, it's a field that is decorated
|
|
891
|
-
* with the @BooleanText decorator.
|
|
892
|
-
*/
|
|
893
|
-
BooleanTextDecorator.IsBooleanTextField = function (target, propertyKey) {
|
|
894
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
895
|
-
return false;
|
|
896
|
-
}
|
|
897
|
-
return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
|
|
898
|
-
||
|
|
899
|
-
Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
|
|
900
|
-
||
|
|
901
|
-
Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
|
|
902
|
-
};
|
|
903
|
-
/**
|
|
904
|
-
* Returns the logical true or false value of given character ('J', 'N', 'T' or 'F') or number (0 or 1).
|
|
905
|
-
* Returns UNDEFINED if given boolChar was not recognised as a boolean text.
|
|
906
|
-
*/
|
|
907
|
-
BooleanTextDecorator.GetLogicalBooleanValue = function (dbBoolChar) {
|
|
908
|
-
return dbBooleanValueType_enum.GetLogicalBooleanValue(dbBoolChar);
|
|
909
|
-
};
|
|
910
|
-
/**
|
|
911
|
-
* Returns the boolean character / number of given logical bool property on target object. Uses its @BooleanText() annotation to decide
|
|
912
|
-
* what character / number to return.
|
|
913
|
-
* Used in BusinessObjectSerializerServiceService to convert logical bools to their original boolean character.
|
|
914
|
-
* @returns {string|number} The original, reverse-engineered boolean character (or number) of given object property, or undefined.
|
|
915
|
-
*/
|
|
916
|
-
BooleanTextDecorator.GetDbBooleanValue = function (target, propertyKey) {
|
|
917
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
918
|
-
return undefined;
|
|
919
|
-
}
|
|
920
|
-
var dbBoolVal = undefined;
|
|
921
|
-
var curBoolVal = target[propertyKey];
|
|
922
|
-
if (BooleanTextDecorator._IsJaNeeProp(target, propertyKey)) {
|
|
923
|
-
dbBoolVal = yesNoDbType_enum.GetYesNoDbBooleanValue(curBoolVal);
|
|
924
|
-
}
|
|
925
|
-
else if (BooleanTextDecorator._IsTrueFalseProp(target, propertyKey)) {
|
|
926
|
-
dbBoolVal = trueFalseDbType_enum.GetTrueFalseDbBooleanValue(curBoolVal);
|
|
927
|
-
}
|
|
928
|
-
else if (BooleanTextDecorator._IsZeroOneProp(target, propertyKey)) {
|
|
929
|
-
dbBoolVal = oneZeroBoolDbType_enum.GetOneZeroDbBooleanValue(curBoolVal);
|
|
930
|
-
}
|
|
931
|
-
return dbBoolVal;
|
|
932
|
-
};
|
|
933
|
-
BooleanTextDecorator._IsJaNeeProp = function (target, propertyKey) {
|
|
934
|
-
return BooleanTextDecorator._IsProp(PROP_META_KEY_JN, target, propertyKey);
|
|
935
|
-
};
|
|
936
|
-
BooleanTextDecorator._IsTrueFalseProp = function (target, propertyKey) {
|
|
937
|
-
return BooleanTextDecorator._IsProp(PROP_META_KEY_TF, target, propertyKey);
|
|
938
|
-
};
|
|
939
|
-
BooleanTextDecorator._IsZeroOneProp = function (target, propertyKey) {
|
|
940
|
-
return BooleanTextDecorator._IsProp(PROP_META_KEY_10, target, propertyKey);
|
|
941
|
-
};
|
|
942
|
-
BooleanTextDecorator._IsProp = function (prop, target, propertyKey) {
|
|
943
|
-
return !!target && !!propertyKey && typeof target === "object" && Reflect.hasMetadata(prop, target, propertyKey);
|
|
944
|
-
};
|
|
945
|
-
return BooleanTextDecorator;
|
|
946
|
-
}());
|
|
947
|
-
|
|
948
|
-
var PROP_META_KEY$1 = "dateField";
|
|
949
|
-
/**
|
|
950
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
951
|
-
*/
|
|
952
|
-
/**
|
|
953
|
-
* Property decorator for properties of businessobject classes that are of type Date, but are sent to us as strings.
|
|
954
|
-
* Ensures that the BusinessObjectFactory makes proper JavaScript Date objects from incoming strings for @DateField() decorated properties.
|
|
955
|
-
*
|
|
956
|
-
* Usage:
|
|
957
|
-
*
|
|
958
|
-
* @DateField()
|
|
959
|
-
* public expectedDeliveryDate: Date
|
|
960
|
-
*/
|
|
961
|
-
function DateField() {
|
|
962
|
-
return function (target, propertyKey) {
|
|
963
|
-
if (!target || !propertyKey) {
|
|
964
|
-
return;
|
|
965
|
-
}
|
|
966
|
-
Reflect.defineMetadata(PROP_META_KEY$1, undefined, target, propertyKey);
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
|
-
// Utility function holder of the @DateField() decorator.
|
|
970
|
-
var DateFieldFieldDecorator = /** @class */ (function () {
|
|
971
|
-
function DateFieldFieldDecorator() {
|
|
972
|
-
}
|
|
973
|
-
// Returns whether given property (as a string) on given object is decorated with @DateField().
|
|
974
|
-
DateFieldFieldDecorator.IsDateField = function (target, propertyKey) {
|
|
975
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
976
|
-
return false;
|
|
977
|
-
}
|
|
978
|
-
return Reflect.hasMetadata(PROP_META_KEY$1, target, propertyKey);
|
|
979
|
-
};
|
|
980
|
-
DateFieldFieldDecorator.StringAsDate = function (str) {
|
|
981
|
-
return dateUtils.DateUtils.StringAsDate(str);
|
|
982
|
-
};
|
|
983
|
-
return DateFieldFieldDecorator;
|
|
984
|
-
}());
|
|
985
|
-
|
|
986
|
-
var PROP_META_KEY = "stringNumber";
|
|
987
|
-
/**
|
|
988
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
989
|
-
*/
|
|
990
|
-
/**
|
|
991
|
-
* Decorator for properties of businessobjects that are sent to us as strings from the database, but which we want to use as a number in the client.
|
|
992
|
-
*
|
|
993
|
-
* Can be handy for incongruent backend api cases, where id data types are communicated wrongly via strings instead of numbers
|
|
994
|
-
* (e.g. on EmployeeFullObject.district, points to a District which has a number id, but in employee it's a string representation of that number...)
|
|
995
|
-
*
|
|
996
|
-
* Used by business object factory and -serializer.
|
|
997
|
-
*
|
|
998
|
-
* Usage:
|
|
999
|
-
*
|
|
1000
|
-
* @StringNumber()
|
|
1001
|
-
* public rights: UserRightType
|
|
1002
|
-
*/
|
|
1003
|
-
function StringNumber() {
|
|
1004
|
-
return function (target, propertyKey) {
|
|
1005
|
-
if (!target || !propertyKey) {
|
|
1006
|
-
return;
|
|
1007
|
-
}
|
|
1008
|
-
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
// Utility function holder of the @StringNumber() decorator.
|
|
1012
|
-
var StringNumberDecorator = /** @class */ (function () {
|
|
1013
|
-
function StringNumberDecorator() {
|
|
1014
|
-
}
|
|
1015
|
-
// Returns whether given property (as a string) on given object is decorated with @StringNumber().
|
|
1016
|
-
StringNumberDecorator.IsStringNumber = function (target, propertyKey) {
|
|
1017
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
1018
|
-
return false;
|
|
1019
|
-
}
|
|
1020
|
-
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
1021
|
-
};
|
|
1022
|
-
StringNumberDecorator.StringAsNumber = function (str) {
|
|
1023
|
-
return numberUtils.NumberUtils.ParseFloatKeepPrecision(str);
|
|
1024
|
-
};
|
|
1025
|
-
StringNumberDecorator.NumberAsString = function (nr) {
|
|
1026
|
-
return "" + nr;
|
|
1027
|
-
};
|
|
1028
|
-
return StringNumberDecorator;
|
|
1029
|
-
}());
|
|
1030
|
-
|
|
1031
|
-
// @returns true iff given value equals null or equals undefined
|
|
1032
|
-
function isNill(value) {
|
|
1033
|
-
return value === null || value === undefined;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// @returns true iff given value does not equals null and does not equal undefined
|
|
1037
|
-
function notNill(value) {
|
|
1038
|
-
return value !== null && value !== undefined;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
// Static utility function holder related to objects.
|
|
1042
|
-
var ObjectUtils = /** @class */ (function () {
|
|
1043
|
-
function ObjectUtils() {
|
|
1044
|
-
}
|
|
1045
|
-
/**
|
|
1046
|
-
* Returns whether all given values exist: for all values it holds that they are not null nor undefined. Short-circuit check.
|
|
1047
|
-
* @param {any} values Rest parameters with all objects to check existence for.
|
|
1048
|
-
* @returns {boolean} True if ALL given values are not null nor undefined, otherwise false (if at least one value was null or undefined)
|
|
1049
|
-
*/
|
|
1050
|
-
ObjectUtils.AllExist = function () {
|
|
1051
|
-
var values = [];
|
|
1052
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1053
|
-
values[_i] = arguments[_i];
|
|
1054
|
-
}
|
|
1055
|
-
var allExist = true;
|
|
1056
|
-
for (var i = 0, len = values.length; i < len; i++) {
|
|
1057
|
-
if (isNill(values[i])) {
|
|
1058
|
-
allExist = false;
|
|
1059
|
-
break;
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
return allExist;
|
|
1063
|
-
};
|
|
1064
|
-
/**
|
|
1065
|
-
* Copies all properties from object 'from' to object 'to'. Overwrites properties on object 'to' if property already exists.
|
|
1066
|
-
* Does not copy functions, only properties.
|
|
1067
|
-
* @param {Object} from The source object from which to copy all properties of to the 'to' object.
|
|
1068
|
-
* @param {Object} to The object to which the properties of the 'from' object will be copied.
|
|
1069
|
-
* @param {boolean} [allowUndefined = true] wether the 'to' object may be assigned null or undefined values to any of its properties.
|
|
1070
|
-
*/
|
|
1071
|
-
ObjectUtils.CopyPropertiesFrom = function (from, to, allowUndefined) {
|
|
1072
|
-
if (allowUndefined === void 0) { allowUndefined = true; }
|
|
1073
|
-
if (!to) {
|
|
1074
|
-
to = {};
|
|
1075
|
-
}
|
|
1076
|
-
if (!from) {
|
|
1077
|
-
return to;
|
|
1078
|
-
}
|
|
1079
|
-
ObjectUtils.ForOwnProperty(from, function (value, key) {
|
|
1080
|
-
if (allowUndefined || notNill(value)) {
|
|
1081
|
-
to[key] = value;
|
|
1082
|
-
}
|
|
1083
|
-
});
|
|
1084
|
-
return to;
|
|
1085
|
-
};
|
|
1086
|
-
ObjectUtils.DeepEquals = function (actual, expected) {
|
|
1087
|
-
if (actual === expected) {
|
|
1088
|
-
return true;
|
|
1089
|
-
}
|
|
1090
|
-
else if (actual instanceof Date && expected instanceof Date) {
|
|
1091
|
-
return actual.getTime() === expected.getTime();
|
|
1092
|
-
}
|
|
1093
|
-
else if (!actual || !expected || typeof actual !== "object" && typeof expected !== "object") {
|
|
1094
|
-
return actual === expected;
|
|
1095
|
-
}
|
|
1096
|
-
else {
|
|
1097
|
-
return this._objEquiv(actual, expected);
|
|
1098
|
-
}
|
|
1099
|
-
};
|
|
1100
|
-
// Performs given callback function for each own property of given plain object. Also works on string enums.
|
|
1101
|
-
ObjectUtils.ForOwnProperty = function (plainObject, callback) {
|
|
1102
|
-
if (ObjectUtils.IsPlainObject(plainObject)) {
|
|
1103
|
-
for (var key in plainObject) {
|
|
1104
|
-
if (plainObject.hasOwnProperty(key) && typeof plainObject[key] !== "function") {
|
|
1105
|
-
var response = callback(plainObject[key], key);
|
|
1106
|
-
if (response === false) {
|
|
1107
|
-
break;
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
};
|
|
1113
|
-
// Returns the class name of given argument. The argument can be an object or a class.
|
|
1114
|
-
ObjectUtils.GetClassName = function (objectOrClass) {
|
|
1115
|
-
if (!objectOrClass) {
|
|
1116
|
-
return undefined;
|
|
1117
|
-
// arg was a class (or a function..)
|
|
1118
|
-
}
|
|
1119
|
-
else if (objectOrClass.constructor === Function) {
|
|
1120
|
-
return objectOrClass.name; // .. which has its readable name stores like this
|
|
1121
|
-
// else arg was an object
|
|
1122
|
-
}
|
|
1123
|
-
else {
|
|
1124
|
-
var constructorString = objectOrClass.constructor.toString();
|
|
1125
|
-
return constructorString.match(/\w+/g)[1];
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
// Returns a shallow clone of the given original object. The clone is a SIMPLE OBJECT with the same properties as the original.
|
|
1129
|
-
ObjectUtils.GetShallowClone = function (originalObject, objectClass) {
|
|
1130
|
-
var clonedObject = undefined;
|
|
1131
|
-
if (objectClass) {
|
|
1132
|
-
clonedObject = new objectClass();
|
|
1133
|
-
}
|
|
1134
|
-
else {
|
|
1135
|
-
clonedObject = {};
|
|
1136
|
-
}
|
|
1137
|
-
ObjectUtils.ForOwnProperty(originalObject, function (value, key) {
|
|
1138
|
-
clonedObject[key] = value;
|
|
1139
|
-
});
|
|
1140
|
-
return clonedObject;
|
|
1141
|
-
};
|
|
1142
|
-
ObjectUtils.GetDeepClone = function (originalObject, circular) {
|
|
1143
|
-
if (circular === void 0) { circular = true; }
|
|
1144
|
-
// First create an empty object with
|
|
1145
|
-
// same prototype of our original source
|
|
1146
|
-
var propertyIndex;
|
|
1147
|
-
var descriptor;
|
|
1148
|
-
var keys;
|
|
1149
|
-
var current;
|
|
1150
|
-
var nextSource;
|
|
1151
|
-
var indexOf;
|
|
1152
|
-
var copies = [{
|
|
1153
|
-
source: originalObject,
|
|
1154
|
-
target: Object.create(Object.getPrototypeOf(originalObject))
|
|
1155
|
-
}];
|
|
1156
|
-
var cloneObject = copies[0].target;
|
|
1157
|
-
var sourceReferences = [originalObject];
|
|
1158
|
-
var targetReferences = [cloneObject];
|
|
1159
|
-
// First in, first out
|
|
1160
|
-
while (current = copies.shift()) { //NOSONAR
|
|
1161
|
-
keys = Object.getOwnPropertyNames(current.source);
|
|
1162
|
-
for (propertyIndex = 0; propertyIndex < keys.length; propertyIndex++) {
|
|
1163
|
-
// Save the source's descriptor
|
|
1164
|
-
descriptor = Object.getOwnPropertyDescriptor(current.source, keys[propertyIndex]);
|
|
1165
|
-
if (!descriptor.value || typeof descriptor.value !== "object") {
|
|
1166
|
-
Object.defineProperty(current.target, keys[propertyIndex], descriptor);
|
|
1167
|
-
continue;
|
|
1168
|
-
}
|
|
1169
|
-
nextSource = descriptor.value;
|
|
1170
|
-
descriptor.value = Array.isArray(nextSource) ?
|
|
1171
|
-
[] :
|
|
1172
|
-
Object.create(Object.getPrototypeOf(nextSource));
|
|
1173
|
-
if (circular) {
|
|
1174
|
-
indexOf = sourceReferences.indexOf(nextSource);
|
|
1175
|
-
if (indexOf !== -1) {
|
|
1176
|
-
// The source is already referenced, just assign reference
|
|
1177
|
-
descriptor.value = targetReferences[indexOf];
|
|
1178
|
-
Object.defineProperty(current.target, keys[propertyIndex], descriptor);
|
|
1179
|
-
continue;
|
|
1180
|
-
}
|
|
1181
|
-
sourceReferences.push(nextSource);
|
|
1182
|
-
targetReferences.push(descriptor.value);
|
|
1183
|
-
}
|
|
1184
|
-
Object.defineProperty(current.target, keys[propertyIndex], descriptor);
|
|
1185
|
-
copies.push({ source: nextSource, target: descriptor.value });
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
return cloneObject;
|
|
1189
|
-
};
|
|
1190
|
-
ObjectUtils.IsEmpty = function (obj) {
|
|
1191
|
-
return isNill(obj) || Object.getOwnPropertyNames(obj).length === 0;
|
|
1192
|
-
};
|
|
1193
|
-
// Returns whether given object is an existing, plain object. That is, it defined, its type if 'object' and it is NOT an array or func.
|
|
1194
|
-
ObjectUtils.IsPlainObject = function (object) {
|
|
1195
|
-
return object !== null && !Array.isArray(object) && typeof object !== "function" && typeof object === "object";
|
|
1196
|
-
};
|
|
1197
|
-
/**
|
|
1198
|
-
* Returns an instance of given class with data of given dataObject. Only works if that class has a default constructor without args.
|
|
1199
|
-
* Does not actually create a new object if it alread is an instance of that class.
|
|
1200
|
-
* @param {any} clazz A class that has a default constructor
|
|
1201
|
-
* @param {any} [dataObject] The object with data to copy to the new instance of the class
|
|
1202
|
-
* @returns {any} An object that is an instance of given class, with given data applied to it.
|
|
1203
|
-
*/
|
|
1204
|
-
ObjectUtils.MakeInstanceOf = function (clazz, dataObject) {
|
|
1205
|
-
// dont make a clone if given dataObject already instance of clazz
|
|
1206
|
-
if (dataObject instanceof clazz) {
|
|
1207
|
-
return dataObject;
|
|
1208
|
-
}
|
|
1209
|
-
else {
|
|
1210
|
-
var asClazz = new clazz();
|
|
1211
|
-
ObjectUtils.CopyPropertiesFrom(dataObject, asClazz);
|
|
1212
|
-
return asClazz;
|
|
1213
|
-
}
|
|
1214
|
-
};
|
|
1215
|
-
// Returns the value of a random own property of given object.
|
|
1216
|
-
ObjectUtils.PickRandomPropertyValue = function (object) {
|
|
1217
|
-
if (!object) {
|
|
1218
|
-
return;
|
|
1219
|
-
}
|
|
1220
|
-
var result;
|
|
1221
|
-
var count = 0;
|
|
1222
|
-
for (var prop in object) {
|
|
1223
|
-
if (object.hasOwnProperty(prop)) {
|
|
1224
|
-
count++;
|
|
1225
|
-
if (Math.random() < 1 / count) {
|
|
1226
|
-
result = object[prop];
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
return result;
|
|
1231
|
-
};
|
|
1232
|
-
// Returns a default if given value doesn't exist, otherwise just value.
|
|
1233
|
-
ObjectUtils.ValueOrDefault = function (value, defaultReturnVal) {
|
|
1234
|
-
if (defaultReturnVal === void 0) { defaultReturnVal = ""; }
|
|
1235
|
-
return notNill(value) ? value : defaultReturnVal;
|
|
1236
|
-
};
|
|
1237
|
-
ObjectUtils._isArguments = function (x) {
|
|
1238
|
-
var supportsArgsClass = this._supportsArgumentsClass();
|
|
1239
|
-
return supportsArgsClass ? this._isArgumentsWhenArgsClassSupported(x) : this._isArgumentsWhenArgsClassNotSupported(x);
|
|
1240
|
-
};
|
|
1241
|
-
ObjectUtils._isArgumentsWhenArgsClassNotSupported = function (object) {
|
|
1242
|
-
return object &&
|
|
1243
|
-
typeof object === "object" &&
|
|
1244
|
-
typeof object.length === "number" &&
|
|
1245
|
-
Object.prototype.hasOwnProperty.call(object, "callee") &&
|
|
1246
|
-
!Object.prototype.propertyIsEnumerable.call(object, "callee") ||
|
|
1247
|
-
false;
|
|
1248
|
-
};
|
|
1249
|
-
ObjectUtils._isArgumentsWhenArgsClassSupported = function (object) {
|
|
1250
|
-
return Object.prototype.toString.call(object) === "[object Arguments]";
|
|
1251
|
-
};
|
|
1252
|
-
ObjectUtils._isBuffer = function (x) {
|
|
1253
|
-
if (!x || typeof x !== "object" || typeof x.length !== "number") {
|
|
1254
|
-
return false;
|
|
1255
|
-
}
|
|
1256
|
-
if (typeof x.copy !== "function" || typeof x.slice !== "function") {
|
|
1257
|
-
return false;
|
|
1258
|
-
}
|
|
1259
|
-
return !(x.length > 0 && typeof x[0] !== "number");
|
|
1260
|
-
};
|
|
1261
|
-
ObjectUtils._isUndefinedOrNull = function (value) {
|
|
1262
|
-
return value === null || value === undefined;
|
|
1263
|
-
};
|
|
1264
|
-
ObjectUtils._objEquiv = function (a, b) {
|
|
1265
|
-
var i, key;
|
|
1266
|
-
if (this._isUndefinedOrNull(a) || this._isUndefinedOrNull(b)) {
|
|
1267
|
-
return false;
|
|
1268
|
-
}
|
|
1269
|
-
if (a.prototype !== b.prototype) {
|
|
1270
|
-
return false;
|
|
1271
|
-
}
|
|
1272
|
-
if (this._isArguments(a)) {
|
|
1273
|
-
if (!this._isArguments(b)) {
|
|
1274
|
-
return false;
|
|
1275
|
-
}
|
|
1276
|
-
a = Array.prototype.slice.call(a);
|
|
1277
|
-
b = Array.prototype.slice.call(b);
|
|
1278
|
-
return this.DeepEquals(a, b);
|
|
1279
|
-
}
|
|
1280
|
-
if (this._isBuffer(a)) {
|
|
1281
|
-
if (!this._isBuffer(b)) {
|
|
1282
|
-
return false;
|
|
1283
|
-
}
|
|
1284
|
-
if (a.length !== b.length) {
|
|
1285
|
-
return false;
|
|
1286
|
-
}
|
|
1287
|
-
for (i = 0; i < a.length; i++) {
|
|
1288
|
-
if (a[i] !== b[i]) {
|
|
1289
|
-
return false;
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
return true;
|
|
1293
|
-
}
|
|
1294
|
-
var ka;
|
|
1295
|
-
var kb;
|
|
1296
|
-
try {
|
|
1297
|
-
ka = Object.keys(a);
|
|
1298
|
-
kb = Object.keys(b);
|
|
1299
|
-
}
|
|
1300
|
-
catch (e) {
|
|
1301
|
-
return false;
|
|
1302
|
-
}
|
|
1303
|
-
if (ka.length !== kb.length) {
|
|
1304
|
-
return false;
|
|
1305
|
-
}
|
|
1306
|
-
ka.sort();
|
|
1307
|
-
kb.sort();
|
|
1308
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
1309
|
-
if (ka[i] !== kb[i]) {
|
|
1310
|
-
return false;
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
1314
|
-
key = ka[i];
|
|
1315
|
-
if (!this.DeepEquals(a[key], b[key])) {
|
|
1316
|
-
return false;
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
return typeof a === typeof b;
|
|
1320
|
-
};
|
|
1321
|
-
ObjectUtils._supportsArgumentsClass = function () {
|
|
1322
|
-
return Object.prototype.toString.call(arguments) === "[object Arguments]";
|
|
1323
|
-
};
|
|
1324
|
-
return ObjectUtils;
|
|
1325
|
-
}());
|
|
1326
|
-
|
|
1327
|
-
// Static utility function holder related to numeric variable evaluations and operations.
|
|
1328
|
-
var NumberUtils = /** @class */ (function () {
|
|
1329
|
-
function NumberUtils() {
|
|
1330
|
-
}
|
|
1331
|
-
// For user-typed number input; supports comma's as decimal delimiter.
|
|
1332
|
-
NumberUtils.ParseIntNumberInput = function (arg) {
|
|
1333
|
-
return NumberUtils.ParseInt(NumberUtils._NumberInputToNumberStr(arg));
|
|
1334
|
-
};
|
|
1335
|
-
// Parses given argument to an integer, using a native parseInt() function with a radix of 10. Returns NaN if parsing was not possible.
|
|
1336
|
-
NumberUtils.ParseInt = function (arg) {
|
|
1337
|
-
if (isNill(arg) || Array.isArray(arg)) {
|
|
1338
|
-
return undefined;
|
|
1339
|
-
}
|
|
1340
|
-
return parseInt(arg, 10);
|
|
1341
|
-
};
|
|
1342
|
-
// For user-typed number input; supports comma's as decimal delimiter.
|
|
1343
|
-
NumberUtils.ParseFloatNumberInput = function (arg, decimalPrecision) {
|
|
1344
|
-
if (decimalPrecision === void 0) { decimalPrecision = 2; }
|
|
1345
|
-
return NumberUtils.ParseFloat(NumberUtils._NumberInputToNumberStr(arg), decimalPrecision);
|
|
1346
|
-
};
|
|
1347
|
-
NumberUtils.ParseFloatNumberInputKeepPrecision = function (arg) {
|
|
1348
|
-
var correctedInputStr = NumberUtils._NumberInputToNumberStr(arg);
|
|
1349
|
-
var decimalPrecision = this.GetDecimalPlaces(correctedInputStr);
|
|
1350
|
-
return NumberUtils.ParseFloat(correctedInputStr, decimalPrecision);
|
|
1351
|
-
};
|
|
1352
|
-
/**
|
|
1353
|
-
* Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
|
|
1354
|
-
*
|
|
1355
|
-
* @param {any} arg The argument to parse to a float
|
|
1356
|
-
* @param {number} decimalPrecision The number of decimals, or the precision, the parsed return float should have
|
|
1357
|
-
* @returns {number} NaN if not possible, else the parsed float value
|
|
1358
|
-
*/
|
|
1359
|
-
NumberUtils.ParseFloat = function (arg, decimalPrecision) {
|
|
1360
|
-
if (decimalPrecision === void 0) { decimalPrecision = 2; }
|
|
1361
|
-
if (!ObjectUtils.AllExist(arg, decimalPrecision) || Array.isArray(arg)) {
|
|
1362
|
-
return NaN;
|
|
1363
|
-
}
|
|
1364
|
-
if (!NumberUtils.IsInteger(decimalPrecision) || decimalPrecision < 0) {
|
|
1365
|
-
decimalPrecision = 2;
|
|
1366
|
-
// toFixed() can only handle up until 20
|
|
1367
|
-
}
|
|
1368
|
-
else if (decimalPrecision > 20) {
|
|
1369
|
-
decimalPrecision = 20;
|
|
1370
|
-
}
|
|
1371
|
-
return parseFloat(parseFloat(arg).toFixed(decimalPrecision));
|
|
1372
|
-
};
|
|
1373
|
-
/**
|
|
1374
|
-
* Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
|
|
1375
|
-
*
|
|
1376
|
-
* @param arg The argument to parse to a float
|
|
1377
|
-
* @returns {number} The argument as a float with its original decimal precision intact
|
|
1378
|
-
*/
|
|
1379
|
-
NumberUtils.ParseFloatKeepPrecision = function (arg) {
|
|
1380
|
-
var decimalPrecision = this.GetDecimalPlaces(arg);
|
|
1381
|
-
return this.ParseFloat(arg, decimalPrecision);
|
|
1382
|
-
};
|
|
1383
|
-
/**
|
|
1384
|
-
* Returns the given argument as a number. Returns given defaultValue if conversion of argument was impossible.
|
|
1385
|
-
* @param arg
|
|
1386
|
-
* @param {number} [defaultValue = 0]
|
|
1387
|
-
* @returns {number}
|
|
1388
|
-
*/
|
|
1389
|
-
NumberUtils.ParseNumberOrDefault = function (arg, defaultValue) {
|
|
1390
|
-
if (defaultValue === void 0) { defaultValue = 0; }
|
|
1391
|
-
if (Array.isArray(arg)) {
|
|
1392
|
-
return defaultValue;
|
|
1393
|
-
}
|
|
1394
|
-
if (!NumberUtils.IsNumber(arg)) {
|
|
1395
|
-
arg = parseFloat(arg);
|
|
1396
|
-
arg = isNaN(arg) ? defaultValue : arg;
|
|
1397
|
-
}
|
|
1398
|
-
return arg;
|
|
1399
|
-
};
|
|
1400
|
-
// Returns true iff given argument is an integer number. Returns false on non-numbers or numbers with significant decimals.
|
|
1401
|
-
NumberUtils.IsInteger = function (arg) {
|
|
1402
|
-
if (isNaN(arg) || Array.isArray(arg)) {
|
|
1403
|
-
return false;
|
|
1404
|
-
}
|
|
1405
|
-
var argAsFloat = parseFloat(arg);
|
|
1406
|
-
return ((argAsFloat | 0) === argAsFloat); // returns whether 'arg converted to an integer equals arg'
|
|
1407
|
-
};
|
|
1408
|
-
// Returns the number of decimal places of the given number. Returns 0 if no decimals whatsoever could be found on given arg.
|
|
1409
|
-
NumberUtils.GetDecimalPlaces = function (arg, maxAnswer) {
|
|
1410
|
-
if (maxAnswer === void 0) { maxAnswer = 1000; }
|
|
1411
|
-
var match = ("" + arg).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
|
1412
|
-
if (!match) {
|
|
1413
|
-
return 0;
|
|
1414
|
-
}
|
|
1415
|
-
var answer = Math.max(0,
|
|
1416
|
-
// number of digits right of decimal point.
|
|
1417
|
-
(match[1] ? match[1].length : 0)
|
|
1418
|
-
// adjust for scientific notation
|
|
1419
|
-
- (match[2] ? +match[2] : 0));
|
|
1420
|
-
if (answer > maxAnswer) {
|
|
1421
|
-
answer = maxAnswer;
|
|
1422
|
-
}
|
|
1423
|
-
return answer;
|
|
1424
|
-
};
|
|
1425
|
-
// Parses given numberInput to a number, or returns given defaultValue if parse not possible. Allows ',' char as decimal delimiter.
|
|
1426
|
-
NumberUtils.ParseNumberInputOrDefault = function (numberInput, defaultValue) {
|
|
1427
|
-
if (defaultValue === void 0) { defaultValue = 0; }
|
|
1428
|
-
return NumberUtils.ParseNumberOrDefault(NumberUtils._NumberInputToNumberStr(numberInput), defaultValue);
|
|
1429
|
-
};
|
|
1430
|
-
// Returns whether the type of given argument is 'number'.
|
|
1431
|
-
NumberUtils.IsNumber = function (arg) {
|
|
1432
|
-
return typeof arg === "number" && !isNaN(arg);
|
|
1433
|
-
};
|
|
1434
|
-
/**
|
|
1435
|
-
* Returns whether given arg is indeed not a number (it's NaN or it has another type than 'number')
|
|
1436
|
-
* Our exact copy of AS Flex'es isNaN(arg) function. Always use this method for copying Flex isNaN(..) occurences into TypeScript.
|
|
1437
|
-
* @param arg
|
|
1438
|
-
* @returns {boolean}
|
|
1439
|
-
* @constructor
|
|
1440
|
-
*/
|
|
1441
|
-
NumberUtils.IsNaN = function (arg) {
|
|
1442
|
-
return isNaN(arg) || !NumberUtils.IsNumber(arg);
|
|
1443
|
-
};
|
|
1444
|
-
// Our copy of CoMath.NaN. Returns number, or substitute if NumberUtils.IsNaN(number) holds true.
|
|
1445
|
-
NumberUtils.NaN = function (number, substitute) {
|
|
1446
|
-
if (substitute === void 0) { substitute = 0; }
|
|
1447
|
-
return NumberUtils.IsNaN(number) ? substitute : number;
|
|
1448
|
-
};
|
|
1449
|
-
// Returns whether the value is parasable as a number.
|
|
1450
|
-
NumberUtils.IsParsableNumber = function (arg) {
|
|
1451
|
-
if (Array.isArray(arg)) {
|
|
1452
|
-
return false;
|
|
1453
|
-
}
|
|
1454
|
-
return !isNaN(parseFloat(arg));
|
|
1455
|
-
};
|
|
1456
|
-
NumberUtils.IsParsableNumberInput = function (numberInput) {
|
|
1457
|
-
return NumberUtils.IsParsableNumber(NumberUtils._NumberInputToNumberStr(numberInput));
|
|
1458
|
-
};
|
|
1459
|
-
/**
|
|
1460
|
-
* Returns whether given arg is parseable as a number, and whether the lengts of its number parse result is equal to its original length.
|
|
1461
|
-
* I.e. this function returns FALSE with given number-parsable strings, but that have non-numeric appendices, eg '2233ff'. That arg
|
|
1462
|
-
* IS number-parseable, but not a strict 'string number', the latter being what this method actually checks for.
|
|
1463
|
-
*/
|
|
1464
|
-
NumberUtils.IsStringNumber = function (arg) {
|
|
1465
|
-
if (!NumberUtils.IsParsableNumber(arg)) {
|
|
1466
|
-
return false;
|
|
1467
|
-
}
|
|
1468
|
-
else {
|
|
1469
|
-
return arg.toString().length === parseFloat(arg).toString().length;
|
|
1470
|
-
}
|
|
1471
|
-
};
|
|
1472
|
-
NumberUtils.IsListOfNumbers = function (arg, separator) {
|
|
1473
|
-
if (separator === void 0) { separator = ","; }
|
|
1474
|
-
var nrs = arg.split(separator);
|
|
1475
|
-
if (nrs.length === 0) {
|
|
1476
|
-
return false;
|
|
1477
|
-
}
|
|
1478
|
-
return nrs.filter(function (s) { return NumberUtils.IsStringNumber(s); }).length === nrs.length;
|
|
1479
|
-
};
|
|
1480
|
-
// Returns given argument as a string representation of a number parse, e.g. "1" for a number parse result of arg to 1.
|
|
1481
|
-
NumberUtils.ParseStringNumber = function (arg) {
|
|
1482
|
-
if (!this.IsStringNumber(arg)) {
|
|
1483
|
-
return NaN;
|
|
1484
|
-
}
|
|
1485
|
-
return NumberUtils.ParseFloatKeepPrecision(arg);
|
|
1486
|
-
};
|
|
1487
|
-
NumberUtils.ParseStringNumberDefault = function (arg, defaultValue) {
|
|
1488
|
-
if (defaultValue === void 0) { defaultValue = 0; }
|
|
1489
|
-
return NumberUtils.NaN(NumberUtils.ParseStringNumber(arg), defaultValue);
|
|
1490
|
-
};
|
|
1491
|
-
/**
|
|
1492
|
-
* Returns a random integer in range [lowerBound .. upperBound], an inclusive range. Returns NaN if not possible.
|
|
1493
|
-
* Given bounds are truncated first, before serving as the true lower- and upper bounds for the random int.
|
|
1494
|
-
*/
|
|
1495
|
-
NumberUtils.RandomInt = function (lowerBoundInt, upperBoundInt) {
|
|
1496
|
-
if (!NumberUtils.IsNumber(lowerBoundInt) || !NumberUtils.IsNumber(upperBoundInt) || lowerBoundInt > upperBoundInt) {
|
|
1497
|
-
return NaN;
|
|
1498
|
-
}
|
|
1499
|
-
lowerBoundInt = Math.trunc(lowerBoundInt);
|
|
1500
|
-
upperBoundInt = Math.trunc(upperBoundInt);
|
|
1501
|
-
if (lowerBoundInt === upperBoundInt) {
|
|
1502
|
-
return lowerBoundInt;
|
|
1503
|
-
}
|
|
1504
|
-
var delta = upperBoundInt - lowerBoundInt;
|
|
1505
|
-
return (Math.round(Math.random() * delta) + lowerBoundInt);
|
|
1506
|
-
};
|
|
1507
|
-
// Adds thousands comma's to given value, E.g. '1000' to '1,000'. Returns empty string if value was undefined.
|
|
1508
|
-
NumberUtils.AddThousandsCommasTo = function (value) {
|
|
1509
|
-
if (isNill(value)) {
|
|
1510
|
-
return "";
|
|
1511
|
-
}
|
|
1512
|
-
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1513
|
-
};
|
|
1514
|
-
/**
|
|
1515
|
-
* Function used to check wether a given number is composed of another number, power-of-two wise.
|
|
1516
|
-
* Example usage: NumberUtils.NumIsComposedOf(articleListObject.publication, ArticlePublication.Selector).
|
|
1517
|
-
* This would return whether or not that articleListObject was publicated for selector or not, where articleListObject.publication
|
|
1518
|
-
* was possibly a 'COMPOSITE that was made out of (including)' ArticlePublication.Selector.
|
|
1519
|
-
*/
|
|
1520
|
-
NumberUtils.NumIsComposedOfOtherPowTwoNum = function (bigNrToCheck, powTwoNumItShouldBeComposedOf) {
|
|
1521
|
-
if (!bigNrToCheck) {
|
|
1522
|
-
return false;
|
|
1523
|
-
}
|
|
1524
|
-
else if (!powTwoNumItShouldBeComposedOf) {
|
|
1525
|
-
return true;
|
|
1526
|
-
}
|
|
1527
|
-
else {
|
|
1528
|
-
return ((bigNrToCheck & powTwoNumItShouldBeComposedOf) === powTwoNumItShouldBeComposedOf);
|
|
1529
|
-
}
|
|
1530
|
-
};
|
|
1531
|
-
/**
|
|
1532
|
-
* Returns given nr, or the given default number (default 0) if the nr number was undefined or otherwise not a number.
|
|
1533
|
-
* Same as CoMath.NaN from AS code (used as its substitute in transaction logic)
|
|
1534
|
-
* @param nr
|
|
1535
|
-
* @param defaultNr
|
|
1536
|
-
* @returns {number}
|
|
1537
|
-
*/
|
|
1538
|
-
NumberUtils.NrOrDefault = function (nr, defaultNr) {
|
|
1539
|
-
if (defaultNr === void 0) { defaultNr = 0; }
|
|
1540
|
-
if (notNill(nr) && NumberUtils.IsNumber(nr)) {
|
|
1541
|
-
return nr;
|
|
1542
|
-
}
|
|
1543
|
-
else {
|
|
1544
|
-
return defaultNr;
|
|
1545
|
-
}
|
|
1546
|
-
};
|
|
1547
|
-
/**
|
|
1548
|
-
* Returns whether given nrToCheck is within the given precision and scale limits. Precision and scale, here, are Oracle DB terms.
|
|
1549
|
-
* This function can thus be used to check whether the given number is safe to send to the 'database' beforehand, if we know the
|
|
1550
|
-
* precision and scale of the number in the db declaration.
|
|
1551
|
-
*
|
|
1552
|
-
* I.e. A number declared in the Oracle DB as number(5, 2) has a precision of 5 and a scale of 2.
|
|
1553
|
-
*
|
|
1554
|
-
* @param {number} nrToCheck
|
|
1555
|
-
* @param {number} precision The number of significant digits, including possibly negative scale. E.g. 3 in '123' and 5 in '51.123'
|
|
1556
|
-
* @param {number} [scale = 0] The number of significant digits AFTER the decimal point. E.g. 1 in 5432.1 and 3 in 54000.003
|
|
1557
|
-
* @returns {CheckPrecisionAndScaleResult} Whether given nrToCheck is ok for given precision and scale, and if not, the
|
|
1558
|
-
* nearest number that IS ok for those constraints.
|
|
1559
|
-
*/
|
|
1560
|
-
NumberUtils.CheckPrecisionAndScale = function (nrToCheck, precision, scale) {
|
|
1561
|
-
if (scale === void 0) { scale = 0; }
|
|
1562
|
-
// let's say any undefined number is checked OK, and all numbers are checked OK for an undefined precision
|
|
1563
|
-
if (!ObjectUtils.AllExist(nrToCheck, precision, scale)) {
|
|
1564
|
-
return { isOk: true, nearestOkNr: NaN };
|
|
1565
|
-
}
|
|
1566
|
-
// no number can have 0 or less than 0 significant digits, in our universe
|
|
1567
|
-
if (precision < 1 || precision - scale < 1) {
|
|
1568
|
-
return { isOk: false, nearestOkNr: NaN };
|
|
1569
|
-
}
|
|
1570
|
-
// begin check
|
|
1571
|
-
var isNegative = (nrToCheck < 0);
|
|
1572
|
-
var nrParts = nrToCheck.toString().split(".");
|
|
1573
|
-
// remove minus sign if negative
|
|
1574
|
-
if (isNegative) {
|
|
1575
|
-
nrParts[0] = nrParts[0].slice(1);
|
|
1576
|
-
}
|
|
1577
|
-
var numCountBeforeDot = nrParts[0].length;
|
|
1578
|
-
var allowedNumCountBeforeDot = precision - scale;
|
|
1579
|
-
if (numCountBeforeDot <= allowedNumCountBeforeDot) {
|
|
1580
|
-
return { isOk: true, nearestOkNr: nrToCheck };
|
|
1581
|
-
}
|
|
1582
|
-
else {
|
|
1583
|
-
// cut a part from the "before decimal number" so that the number is not too big anymore
|
|
1584
|
-
var numCountToRemove = numCountBeforeDot - allowedNumCountBeforeDot;
|
|
1585
|
-
// remove the right-most numbers before the decimal dot
|
|
1586
|
-
nrParts[0] = nrParts[0].slice(0, -1 * numCountToRemove);
|
|
1587
|
-
// add minus sign again if it was negative
|
|
1588
|
-
if (isNegative) {
|
|
1589
|
-
nrParts[0] = "-" + nrParts[0];
|
|
1590
|
-
}
|
|
1591
|
-
// build and return composite number again
|
|
1592
|
-
var nearestOkNr = void 0;
|
|
1593
|
-
if (nrParts[1]) {
|
|
1594
|
-
nearestOkNr = Number(nrParts[0] + "." + nrParts[1]);
|
|
1595
|
-
}
|
|
1596
|
-
else {
|
|
1597
|
-
nearestOkNr = Number(nrParts[0]);
|
|
1598
|
-
}
|
|
1599
|
-
return { isOk: false, nearestOkNr: nearestOkNr };
|
|
1600
|
-
}
|
|
1601
|
-
};
|
|
1602
|
-
/**
|
|
1603
|
-
* Returns whether given x is OK within the given min, max and step boundaries, where it should hold that nrToCheck = min + N * step,
|
|
1604
|
-
* with N integer or 0.
|
|
1605
|
-
* @param {number} nrToCheck Number to check whether it's within the given bounds
|
|
1606
|
-
* @param min Inclusive
|
|
1607
|
-
* @param max Inclusive
|
|
1608
|
-
* @param stepSize
|
|
1609
|
-
* @returns {CheckWithinSteppedBounds} Returns remainder of undefined when nrToCheck was OUTSIDE [min, max], else full result object.
|
|
1610
|
-
*/
|
|
1611
|
-
NumberUtils.CheckWithinSteppedBounds = function (nrToCheck, min, max, stepSize) {
|
|
1612
|
-
if (stepSize === void 0) { stepSize = 1; }
|
|
1613
|
-
if (nrToCheck < min || nrToCheck > max) {
|
|
1614
|
-
return { isOk: false, remainder: undefined };
|
|
1615
|
-
}
|
|
1616
|
-
// we're in [min, max], but still check if nrToCheck = min + N * step holds (for N integer or 0)
|
|
1617
|
-
var remainder = (nrToCheck - min) % stepSize;
|
|
1618
|
-
// correct float for largest precision amongst input numbers
|
|
1619
|
-
remainder = NumberUtils.ParseFloat(remainder, NumberUtils._GetLargestDecimalPrecisionOf(nrToCheck, min, stepSize));
|
|
1620
|
-
return { isOk: (remainder === 0), remainder: remainder };
|
|
1621
|
-
};
|
|
1622
|
-
/**
|
|
1623
|
-
* Finds the number closest to the originalNumber, that adheres to the given bounds. That is, for which it holds that
|
|
1624
|
-
* nr = min + N * step with N integer or 0.
|
|
1625
|
-
* @param {number} originalNr Find closest answer to this number
|
|
1626
|
-
* @param min Inclusive
|
|
1627
|
-
* @param max Inclusive
|
|
1628
|
-
* @param stepSize
|
|
1629
|
-
* @returns {boolean} The closest OK number for bounds.
|
|
1630
|
-
*/
|
|
1631
|
-
NumberUtils.GetNearestNumberWithinSteppedBounds = function (originalNr, min, max, stepSize) {
|
|
1632
|
-
if (stepSize === void 0) { stepSize = 1; }
|
|
1633
|
-
if (originalNr < min) {
|
|
1634
|
-
return min;
|
|
1635
|
-
}
|
|
1636
|
-
else if (originalNr > max) {
|
|
1637
|
-
return NumberUtils.GetTrueSteppedBoundsMax(min, max, stepSize);
|
|
1638
|
-
}
|
|
1639
|
-
var boundsCheck = NumberUtils.CheckWithinSteppedBounds(originalNr, min, max, stepSize);
|
|
1640
|
-
if (boundsCheck.isOk) {
|
|
1641
|
-
return originalNr;
|
|
1642
|
-
}
|
|
1643
|
-
var answer;
|
|
1644
|
-
var remainder = boundsCheck.remainder;
|
|
1645
|
-
if (remainder) {
|
|
1646
|
-
// round up or down?
|
|
1647
|
-
if ((remainder / stepSize) < 0.5) {
|
|
1648
|
-
// round down, but not below min
|
|
1649
|
-
answer = (originalNr - remainder >= min ? originalNr - remainder : min);
|
|
1650
|
-
}
|
|
1651
|
-
else {
|
|
1652
|
-
// round up, but not above max
|
|
1653
|
-
answer = (originalNr + stepSize - remainder <= max ? originalNr + stepSize - remainder :
|
|
1654
|
-
NumberUtils.GetTrueSteppedBoundsMax(min, max, stepSize));
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
else {
|
|
1658
|
-
// is this real life, why wasn't our stepped bounds check OK?
|
|
1659
|
-
answer = originalNr;
|
|
1660
|
-
}
|
|
1661
|
-
// 'correct' float errors
|
|
1662
|
-
answer = NumberUtils.ParseFloat(answer, NumberUtils._GetLargestDecimalPrecisionOf(originalNr, min, max, stepSize));
|
|
1663
|
-
return answer;
|
|
1664
|
-
};
|
|
1665
|
-
/**
|
|
1666
|
-
* Returns the true maximum allowed value for the given "stepped bounds": min, stepSize and max, for which it holds that each allowed
|
|
1667
|
-
* value Y = min + stepSize * N, for any INTEGER or 0 N where it also holds, of course, that Y <= max.
|
|
1668
|
-
* @param min
|
|
1669
|
-
* @param max
|
|
1670
|
-
* @param stepSize
|
|
1671
|
-
*/
|
|
1672
|
-
NumberUtils.GetTrueSteppedBoundsMax = function (min, max, stepSize) {
|
|
1673
|
-
if (stepSize === void 0) { stepSize = 1; }
|
|
1674
|
-
// solve max integer X in formula min + X * step <= max, and return min + X * stepSize for that X
|
|
1675
|
-
var maxSteps = Math.floor((max - min) / stepSize);
|
|
1676
|
-
// 'correct' float errors
|
|
1677
|
-
return NumberUtils.ParseFloat(min + maxSteps * stepSize, NumberUtils._GetLargestDecimalPrecisionOf(min, min, max));
|
|
1678
|
-
};
|
|
1679
|
-
// Returns the nearest number, relative to the given originalNr, that is within the given [min, max] inclusive bounds.
|
|
1680
|
-
NumberUtils.GetNearestNumberWithinBounds = function (originalNr, min, max) {
|
|
1681
|
-
var answer = originalNr;
|
|
1682
|
-
if (originalNr < min) {
|
|
1683
|
-
answer = min;
|
|
1684
|
-
}
|
|
1685
|
-
else if (originalNr > max) {
|
|
1686
|
-
answer = max;
|
|
1687
|
-
}
|
|
1688
|
-
return answer;
|
|
1689
|
-
};
|
|
1690
|
-
// Returns the string representation of given number. If it's not a number, returns the empty string.
|
|
1691
|
-
NumberUtils.ToString = function (nr) {
|
|
1692
|
-
if (!NumberUtils.IsNaN(nr)) {
|
|
1693
|
-
return "" + nr;
|
|
1694
|
-
}
|
|
1695
|
-
else {
|
|
1696
|
-
return "";
|
|
1697
|
-
}
|
|
1698
|
-
};
|
|
1699
|
-
NumberUtils.DecimalsToStepIncrement = function (numberOfDecimals) {
|
|
1700
|
-
return Math.pow(10, -1 * numberOfDecimals);
|
|
1701
|
-
};
|
|
1702
|
-
NumberUtils.Round = function (value, decimals) {
|
|
1703
|
-
var factor = Math.pow(10, decimals);
|
|
1704
|
-
return Math.round(value * factor) / factor;
|
|
1705
|
-
};
|
|
1706
|
-
// @returns The inclusive max value
|
|
1707
|
-
NumberUtils.PrecisionScaleToMaxValue = function (precision, scale) {
|
|
1708
|
-
var oneStep = this.DecimalsToStepIncrement(scale);
|
|
1709
|
-
var maxExclusive = Math.pow(10, precision - scale);
|
|
1710
|
-
return maxExclusive - oneStep;
|
|
1711
|
-
};
|
|
1712
|
-
// @returns the difference between given 2 numbers
|
|
1713
|
-
NumberUtils.DifferenceBetweenNumbers = function (numberA, numberB) {
|
|
1714
|
-
return Math.abs(numberA - numberB);
|
|
1715
|
-
};
|
|
1716
|
-
NumberUtils._GetLargestDecimalPrecisionOf = function () {
|
|
1717
|
-
var args = [];
|
|
1718
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1719
|
-
args[_i] = arguments[_i];
|
|
1720
|
-
}
|
|
1721
|
-
var result = ArrayUtils.GetMaxCalculatedValue(args, function (arg) {
|
|
1722
|
-
return NumberUtils.GetDecimalPlaces(arg);
|
|
1723
|
-
});
|
|
1724
|
-
return result;
|
|
1725
|
-
};
|
|
1726
|
-
// Returns given number input as a number that's useable by Javascript. Allows for incoming ',' decimal delimiter.
|
|
1727
|
-
NumberUtils._NumberInputToNumberStr = function (numberInput) {
|
|
1728
|
-
return (numberInput + "").replace(",", ".");
|
|
1729
|
-
};
|
|
1730
|
-
return NumberUtils;
|
|
1731
|
-
}());
|
|
1732
|
-
|
|
1733
|
-
var ArrayUtils = /** @class */ (function () {
|
|
1734
|
-
function ArrayUtils() {
|
|
1735
|
-
}
|
|
1736
|
-
/**
|
|
1737
|
-
* Returns whether at least one element in given array could be found by given finder function.
|
|
1738
|
-
*
|
|
1739
|
-
* @param {T[]} array
|
|
1740
|
-
* @param {(element: T) => boolean} finder A finder function that takes an element of the array and returns a boolean that represents
|
|
1741
|
-
* the 'found status' for that element; whether it should have been found or not.
|
|
1742
|
-
*/
|
|
1743
|
-
ArrayUtils.ContainsAnElementFoundBy = function (array, finder) {
|
|
1744
|
-
if (!array || !finder) {
|
|
1745
|
-
return false;
|
|
1746
|
-
}
|
|
1747
|
-
return notNill(this.Find(array, finder));
|
|
1748
|
-
};
|
|
1749
|
-
/**
|
|
1750
|
-
* Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
|
|
1751
|
-
* undefined when none was found.
|
|
1752
|
-
*
|
|
1753
|
-
* Example usage:
|
|
1754
|
-
* const foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
|
|
1755
|
-
* (return modelItem.getId() === '1')
|
|
1756
|
-
* * });
|
|
1757
|
-
*
|
|
1758
|
-
* @param array The array with items to search in.
|
|
1759
|
-
* @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
|
|
1760
|
-
*/
|
|
1761
|
-
ArrayUtils.Find = function (array, foundBy) {
|
|
1762
|
-
if (!array || !foundBy) {
|
|
1763
|
-
return undefined;
|
|
1764
|
-
}
|
|
1765
|
-
for (var i = 0, len = array.length; i < len; i++) {
|
|
1766
|
-
var itemCur = array[i];
|
|
1767
|
-
if (foundBy(itemCur)) {
|
|
1768
|
-
return itemCur;
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
return undefined;
|
|
1772
|
-
};
|
|
1773
|
-
// @returns empty array when nothing found, otherwise array with found items
|
|
1774
|
-
ArrayUtils.FindAll = function (array, foundBy) {
|
|
1775
|
-
var answer = [];
|
|
1776
|
-
if (!array || !foundBy) {
|
|
1777
|
-
return answer;
|
|
1778
|
-
}
|
|
1779
|
-
for (var i = 0, len = array.length; i < len; i++) {
|
|
1780
|
-
var itemCur = array[i];
|
|
1781
|
-
if (foundBy(itemCur)) {
|
|
1782
|
-
answer.push(itemCur);
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
return answer;
|
|
1786
|
-
};
|
|
1787
|
-
// returns a simple clone of given array, using array.slice(0)
|
|
1788
|
-
ArrayUtils.CloneArray = function (array) {
|
|
1789
|
-
var answer = [];
|
|
1790
|
-
if (array) {
|
|
1791
|
-
answer = array.slice(0);
|
|
1792
|
-
}
|
|
1793
|
-
return answer;
|
|
1794
|
-
};
|
|
1795
|
-
/**
|
|
1796
|
-
* Returns a 'semi deep clone' of given array. Its first-level members are object-shallow-cloned (optionally with a strongly typed constructor),
|
|
1797
|
-
* or just as plain object (see param arrayItemsClass).
|
|
1798
|
-
* @param array
|
|
1799
|
-
* @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
|
|
1800
|
-
* it'll be a plain object.
|
|
1801
|
-
* @param deepClone Set to true if array items contain FUNCTIONS that need to be cloned..
|
|
1802
|
-
* @returns {Array} semi-deep clone of given array
|
|
1803
|
-
*/
|
|
1804
|
-
ArrayUtils.CloneArrayAndItsItems = function (array, arrayItemsClass, deepClone) {
|
|
1805
|
-
if (deepClone === void 0) { deepClone = false; }
|
|
1806
|
-
var cloneArray = [];
|
|
1807
|
-
if (array) {
|
|
1808
|
-
for (var i = 0, len = array.length; i < len; i++) {
|
|
1809
|
-
if (deepClone) {
|
|
1810
|
-
cloneArray.push(ObjectUtils.GetDeepClone(array[i]));
|
|
1811
|
-
}
|
|
1812
|
-
else {
|
|
1813
|
-
cloneArray.push(ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
else {
|
|
1818
|
-
return [];
|
|
1819
|
-
}
|
|
1820
|
-
return cloneArray;
|
|
1821
|
-
};
|
|
1822
|
-
/**
|
|
1823
|
-
* Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
|
|
1824
|
-
* removes the element using splice().
|
|
1825
|
-
*
|
|
1826
|
-
* @param {number} index
|
|
1827
|
-
* @param {any[]} array in-out
|
|
1828
|
-
* @returns {boolean} True if and only if the element on given index is succesfully removed from given array.
|
|
1829
|
-
*/
|
|
1830
|
-
ArrayUtils.RemoveElementAtIndex = function (index, array) {
|
|
1831
|
-
if (NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
|
|
1832
|
-
return false;
|
|
1833
|
-
}
|
|
1834
|
-
if (index in array) {
|
|
1835
|
-
array.splice(index, 1);
|
|
1836
|
-
return true;
|
|
1837
|
-
}
|
|
1838
|
-
else {
|
|
1839
|
-
return false;
|
|
1840
|
-
}
|
|
1841
|
-
};
|
|
1842
|
-
/**
|
|
1843
|
-
* Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really removes the
|
|
1844
|
-
* element using splice(). Also works on associative arrays.
|
|
1845
|
-
*
|
|
1846
|
-
* @param {T} element The element to remove.
|
|
1847
|
-
* @param {T[]} array The array to remove the element from.
|
|
1848
|
-
* @returns {boolean} True iff given element was truly successfully removed from given array.
|
|
1849
|
-
*/
|
|
1850
|
-
ArrayUtils.RemoveElement = function (element, array) {
|
|
1851
|
-
if (!Array.isArray(array)) {
|
|
1852
|
-
return false;
|
|
1853
|
-
}
|
|
1854
|
-
var index = array.indexOf(element);
|
|
1855
|
-
return ArrayUtils.RemoveElementAtIndex(index, array);
|
|
1856
|
-
};
|
|
1857
|
-
// Checks if given array is defined, and is an array, and has length > 0, and, optionally checks that the first element is of type given clazz.
|
|
1858
|
-
ArrayUtils.IsArrayWithElements = function (arrayToCheck, classItemsMustBeInstanceOf) {
|
|
1859
|
-
if (isNill(arrayToCheck)) {
|
|
1860
|
-
return false;
|
|
1861
|
-
}
|
|
1862
|
-
if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
|
|
1863
|
-
if (classItemsMustBeInstanceOf) {
|
|
1864
|
-
return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
|
|
1865
|
-
}
|
|
1866
|
-
else {
|
|
1867
|
-
return true;
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
else {
|
|
1871
|
-
return false;
|
|
1872
|
-
}
|
|
1873
|
-
};
|
|
1874
|
-
// Removes all elements from given array for which given filter function holds true. Returns true if at least one removed, else false.
|
|
1875
|
-
ArrayUtils.RemoveElementsByFilter = function (array, filterFunction) {
|
|
1876
|
-
if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
|
|
1877
|
-
return false;
|
|
1878
|
-
}
|
|
1879
|
-
var atLeastOneRemoved = false;
|
|
1880
|
-
var len = array.length;
|
|
1881
|
-
for (var i = len - 1; i >= 0; i--) {
|
|
1882
|
-
var item = array[i];
|
|
1883
|
-
if (filterFunction.call(this, item) === true) {
|
|
1884
|
-
array.splice(i, 1);
|
|
1885
|
-
atLeastOneRemoved = true;
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
return atLeastOneRemoved;
|
|
1889
|
-
};
|
|
1890
|
-
ArrayUtils.MoveElement = function (element, toIndex, array) {
|
|
1891
|
-
if (!Array.isArray(array) || isNill(toIndex)) {
|
|
1892
|
-
return false;
|
|
1893
|
-
}
|
|
1894
|
-
var fromIndex = array.indexOf(element);
|
|
1895
|
-
var toIndexCorrected = NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
|
|
1896
|
-
if (fromIndex === -1 || array[toIndexCorrected] === element) {
|
|
1897
|
-
// element did not exist in given array, or already existed on given toIndex
|
|
1898
|
-
return false;
|
|
1899
|
-
}
|
|
1900
|
-
array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
|
|
1901
|
-
return true;
|
|
1902
|
-
};
|
|
1903
|
-
// PRE: elements exists in given array. POST: given elementToPlace has a lower index than given afterThisElement. Array is in-out manipulated.
|
|
1904
|
-
ArrayUtils.PlaceElementAfterOther = function (array, elementToPlace, afterThisElement) {
|
|
1905
|
-
if (array) {
|
|
1906
|
-
var afterThisElIdx = array.indexOf(afterThisElement);
|
|
1907
|
-
var elToPlaceIdx = array.indexOf(elementToPlace);
|
|
1908
|
-
if (afterThisElIdx >= elToPlaceIdx) {
|
|
1909
|
-
ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
};
|
|
1913
|
-
/**
|
|
1914
|
-
* Returns max value from all resulting values from applying given itemValueFunction to all items of given array.
|
|
1915
|
-
* @param array
|
|
1916
|
-
* @param itemValueFunction The function applied to each array item that gives it a numerical value. The max num val found is returned.
|
|
1917
|
-
*/
|
|
1918
|
-
ArrayUtils.GetMaxCalculatedValue = function (array, itemValueFunction) {
|
|
1919
|
-
if (!array || !itemValueFunction) {
|
|
1920
|
-
return NaN;
|
|
1921
|
-
}
|
|
1922
|
-
var max = undefined;
|
|
1923
|
-
var len = array.length;
|
|
1924
|
-
for (var i = 0; i < len; i++) {
|
|
1925
|
-
var valueCur = itemValueFunction.call(this);
|
|
1926
|
-
if (valueCur > max) {
|
|
1927
|
-
max = valueCur;
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
return max;
|
|
1931
|
-
};
|
|
1932
|
-
return ArrayUtils;
|
|
1933
|
-
}());
|
|
1934
|
-
|
|
1935
|
-
/**
|
|
1936
|
-
* This type represents the concept of a business object ID type. ID's of business objects can be a primary number, a simple string or a
|
|
1937
|
-
* object for a composite key.
|
|
1938
|
-
*
|
|
1939
|
-
* Simply to prevent type declarations of 'number | string | Object' for BO ID data all over the application.
|
|
1940
|
-
*/
|
|
1941
|
-
var BusinessObject = /** @class */ (function () {
|
|
1942
|
-
function BusinessObject() {
|
|
1943
|
-
}
|
|
1944
|
-
// Overridable. Returns the ID of the model. Concrete model classes often override this method to provide their specific ID getter.
|
|
1945
|
-
BusinessObject.prototype.getId = function () {
|
|
1946
|
-
return this.id;
|
|
1947
|
-
};
|
|
1948
|
-
BusinessObject.prototype.setOwnMappedPropsFromRawData = function (rawData) {
|
|
1949
|
-
var _this = this;
|
|
1950
|
-
if (rawData === void 0) { rawData = {}; }
|
|
1951
|
-
if (!rawData) {
|
|
1952
|
-
return;
|
|
1953
|
-
}
|
|
1954
|
-
Object.keys(this).forEach(function (key) {
|
|
1955
|
-
// check if property needs to be mapped
|
|
1956
|
-
if (mapProperty_decorator.MapPropertyDecorator.IsMapProperty(_this, key)) {
|
|
1957
|
-
var mapKeys = mapProperty_decorator.MapPropertyDecorator.GetMapProperty(_this, key).split(",");
|
|
1958
|
-
var len = mapKeys.length;
|
|
1959
|
-
for (var i = 0; i < len; i++) {
|
|
1960
|
-
// eslint-disable-next-line
|
|
1961
|
-
var mapKey = mapKeys[i].trim();
|
|
1962
|
-
var objProp = rawData[mapKey];
|
|
1963
|
-
var decorated = false;
|
|
1964
|
-
if (rawData.hasOwnProperty(mapKey)) {
|
|
1965
|
-
if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
|
|
1966
|
-
_this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
|
|
1967
|
-
decorated = true;
|
|
1968
|
-
}
|
|
1969
|
-
if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
|
|
1970
|
-
_this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
|
|
1971
|
-
decorated = true;
|
|
1972
|
-
}
|
|
1973
|
-
if (complexArray_decorator.ComplexArrayDecorator.IsComplexArray(_this, key)) {
|
|
1974
|
-
var arrayClass = complexArray_decorator.ComplexArrayDecorator.GetComplexArrayType(_this, key);
|
|
1975
|
-
// eslint-disable-next-line
|
|
1976
|
-
var origArray = _this[key];
|
|
1977
|
-
// eslint-disable-next-line
|
|
1978
|
-
var newArray = [];
|
|
1979
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
1980
|
-
for (var j = 0; j < origArray.length; j++) {
|
|
1981
|
-
// eslint-disable-next-line
|
|
1982
|
-
var item = new arrayClass(origArray[j]);
|
|
1983
|
-
newArray.push(item);
|
|
1984
|
-
}
|
|
1985
|
-
_this[key] = newArray;
|
|
1986
|
-
}
|
|
1987
|
-
else {
|
|
1988
|
-
if (!decorated) {
|
|
1989
|
-
_this[key] = objProp;
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
break;
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
else {
|
|
1997
|
-
if (rawData.hasOwnProperty(key)) {
|
|
1998
|
-
var objProp = rawData[key];
|
|
1999
|
-
if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
|
|
2000
|
-
_this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
|
|
2001
|
-
}
|
|
2002
|
-
else if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
|
|
2003
|
-
_this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
|
|
2004
|
-
}
|
|
2005
|
-
else {
|
|
2006
|
-
_this[key] = objProp;
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
});
|
|
2011
|
-
};
|
|
2012
|
-
return BusinessObject;
|
|
2013
|
-
}());
|
|
2014
|
-
|
|
2015
|
-
// Factory service creates businessobjects, using their decorators in the process.
|
|
2016
|
-
var BusinessObjectFactory = /** @class */ (function () {
|
|
2017
|
-
function BusinessObjectFactory() {
|
|
2018
|
-
}
|
|
2019
|
-
/**
|
|
2020
|
-
* Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
|
|
2021
|
-
* complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
|
|
2022
|
-
* become strongly typed business objects, with methods that are usable and such.
|
|
2023
|
-
*
|
|
2024
|
-
* @param modelClass
|
|
2025
|
-
* @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
|
|
2026
|
-
*/
|
|
2027
|
-
BusinessObjectFactory.prototype.makeWithRawBackendData = function (modelClass, rawData) {
|
|
2028
|
-
if (!modelClass) {
|
|
2029
|
-
return undefined;
|
|
2030
|
-
}
|
|
2031
|
-
if (typeof modelClass !== typeof BusinessObject) {
|
|
2032
|
-
return undefined;
|
|
2033
|
-
}
|
|
2034
|
-
var model = new modelClass();
|
|
2035
|
-
this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
|
|
2036
|
-
return model;
|
|
2037
|
-
};
|
|
2038
|
-
// see makeWithRawBackendData, this is a loop-wrapper around that method
|
|
2039
|
-
BusinessObjectFactory.prototype.makeBOArrayFromRawBackendDataArray = function (modelClass, arrayOfRawDatas) {
|
|
2040
|
-
if (!modelClass) {
|
|
2041
|
-
return undefined;
|
|
2042
|
-
}
|
|
2043
|
-
var trueClientBos = [];
|
|
2044
|
-
if (arrayOfRawDatas) {
|
|
2045
|
-
for (var i = 0, len = arrayOfRawDatas.length; i < len; i++) {
|
|
2046
|
-
trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
return trueClientBos;
|
|
2050
|
-
};
|
|
2051
|
-
BusinessObjectFactory.prototype.instantiateNewBo = function (modelClass) {
|
|
2052
|
-
return this.makeWithRawBackendData(modelClass, {});
|
|
2053
|
-
};
|
|
2054
|
-
/**
|
|
2055
|
-
* Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
|
|
2056
|
-
* Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
|
|
2057
|
-
*
|
|
2058
|
-
* @param sourceData Raw data to copy to destination model
|
|
2059
|
-
* @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
|
|
2060
|
-
*/
|
|
2061
|
-
BusinessObjectFactory.prototype._copyAllPropertiesDecoratorProcessedFrom = function (sourceData, destinationModel) {
|
|
2062
|
-
if (!sourceData || !destinationModel) {
|
|
2063
|
-
return;
|
|
2064
|
-
}
|
|
2065
|
-
// process all source data into destinationModel
|
|
2066
|
-
for (var srcPropKey in sourceData) {
|
|
2067
|
-
if (!sourceData.hasOwnProperty(srcPropKey)) {
|
|
2068
|
-
continue;
|
|
2069
|
-
}
|
|
2070
|
-
var srcPropVal = sourceData[srcPropKey];
|
|
2071
|
-
if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
|
|
2072
|
-
var classOfField = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
|
|
2073
|
-
destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
|
|
2074
|
-
}
|
|
2075
|
-
else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
|
|
2076
|
-
var sourceArray = srcPropVal;
|
|
2077
|
-
if (!sourceArray) {
|
|
2078
|
-
continue;
|
|
2079
|
-
}
|
|
2080
|
-
var classOfArrayItems = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
|
|
2081
|
-
var tempArray = [];
|
|
2082
|
-
for (var i = 0, len = sourceArray.length; i < len; i++) {
|
|
2083
|
-
tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
|
|
2084
|
-
}
|
|
2085
|
-
destinationModel[srcPropKey] = tempArray;
|
|
2086
|
-
}
|
|
2087
|
-
else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
|
|
2088
|
-
// logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
|
|
2089
|
-
if (typeof srcPropVal === "boolean") {
|
|
2090
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
2091
|
-
// here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
|
|
2092
|
-
}
|
|
2093
|
-
else {
|
|
2094
|
-
destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
|
|
2095
|
-
}
|
|
2096
|
-
}
|
|
2097
|
-
else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
|
|
2098
|
-
destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
|
|
2099
|
-
}
|
|
2100
|
-
else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
|
|
2101
|
-
destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
|
|
2102
|
-
}
|
|
2103
|
-
// non-decorated prop
|
|
2104
|
-
else {
|
|
2105
|
-
if (isNill(srcPropVal)) {
|
|
2106
|
-
destinationModel[srcPropKey] = undefined;
|
|
2107
|
-
}
|
|
2108
|
-
else if (Array.isArray(srcPropVal)) {
|
|
2109
|
-
destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
|
|
2110
|
-
}
|
|
2111
|
-
else if (typeof srcPropVal === "object") {
|
|
2112
|
-
if (srcPropVal instanceof Map) { //just copy the value in case of maps
|
|
2113
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
2114
|
-
}
|
|
2115
|
-
else {
|
|
2116
|
-
destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
else {
|
|
2120
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
};
|
|
2125
|
-
return BusinessObjectFactory;
|
|
2126
|
-
}());
|
|
2127
|
-
|
|
2128
|
-
exports["ɵr"] = void 0;
|
|
733
|
+
exports["ɵbc"] = void 0;
|
|
2129
734
|
(function (LanguageCode) {
|
|
2130
735
|
LanguageCode["Dutch"] = "nl-NL";
|
|
2131
736
|
LanguageCode["English"] = "en-GB";
|
|
2132
737
|
LanguageCode["German"] = "de-DE";
|
|
2133
738
|
LanguageCode["French"] = "fr-FR";
|
|
2134
|
-
})(exports["
|
|
739
|
+
})(exports["ɵbc"] || (exports["ɵbc"] = {}));
|
|
2135
740
|
|
|
2136
741
|
// Static utility functions holder related to strings.
|
|
2137
742
|
var StringUtils = /** @class */ (function () {
|
|
@@ -2245,7 +850,7 @@
|
|
|
2245
850
|
DictionaryService.prototype.setDictionary = function (language) {
|
|
2246
851
|
return __awaiter(this, void 0, void 0, function () {
|
|
2247
852
|
return __generator(this, function (_a) {
|
|
2248
|
-
this._language = language || exports["
|
|
853
|
+
this._language = language || exports["ɵbc"].Dutch;
|
|
2249
854
|
this._loadDictionary();
|
|
2250
855
|
return [2 /*return*/];
|
|
2251
856
|
});
|
|
@@ -2278,7 +883,7 @@
|
|
|
2278
883
|
return key || "";
|
|
2279
884
|
}
|
|
2280
885
|
if (this.language === undefined) {
|
|
2281
|
-
this._language = exports["
|
|
886
|
+
this._language = exports["ɵbc"].Dutch;
|
|
2282
887
|
this._loadDictionary();
|
|
2283
888
|
}
|
|
2284
889
|
var text = this._dictionaries.get(this.language)[key];
|
|
@@ -2390,46 +995,27 @@
|
|
|
2390
995
|
var SharedConnectorService = /** @class */ (function () {
|
|
2391
996
|
function SharedConnectorService(_optionsService) {
|
|
2392
997
|
this._optionsService = _optionsService;
|
|
2393
|
-
this._boFactory = new BusinessObjectFactory();
|
|
2394
|
-
}
|
|
2395
|
-
SharedConnectorService.prototype.connect = function () {
|
|
2396
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2397
|
-
return __generator(this, function (_a) {
|
|
2398
|
-
this.articleConnector = new articles.Articles(this._optionsService.options);
|
|
2399
|
-
this.sharedConnector = new sharedapi.Sharedapi(this._optionsService.options);
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
});
|
|
2403
|
-
};
|
|
2404
|
-
SharedConnectorService.prototype.getAllPrinters = function (showAll) {
|
|
2405
|
-
if (showAll === void 0) { showAll = true; }
|
|
2406
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2407
|
-
var _this = this;
|
|
2408
|
-
return __generator(this, function (_a) {
|
|
2409
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2410
|
-
return _this.sharedConnector.listAllPrinters(showAll).then(function (result) {
|
|
2411
|
-
if (result.validationResult && result.validationResult.success) {
|
|
2412
|
-
if (result.resultObject) {
|
|
2413
|
-
resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(printer_bo.Printer, result.resultObject));
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
else {
|
|
2417
|
-
reject(result.validationMessagesAsString);
|
|
2418
|
-
}
|
|
2419
|
-
});
|
|
2420
|
-
})];
|
|
998
|
+
this._boFactory = new businessObjectFactory.BusinessObjectFactory();
|
|
999
|
+
}
|
|
1000
|
+
SharedConnectorService.prototype.connect = function () {
|
|
1001
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1002
|
+
return __generator(this, function (_a) {
|
|
1003
|
+
this.articleConnector = new articles.Articles(this._optionsService.options);
|
|
1004
|
+
this.sharedConnector = new sharedapi.Sharedapi(this._optionsService.options);
|
|
1005
|
+
this.mainConnector = new mainapi.MainApi(this._optionsService.options);
|
|
1006
|
+
return [2 /*return*/];
|
|
2421
1007
|
});
|
|
2422
1008
|
});
|
|
2423
1009
|
};
|
|
2424
|
-
SharedConnectorService.prototype.
|
|
1010
|
+
SharedConnectorService.prototype.getAllPrinters = function () {
|
|
2425
1011
|
return __awaiter(this, void 0, void 0, function () {
|
|
2426
1012
|
var _this = this;
|
|
2427
1013
|
return __generator(this, function (_a) {
|
|
2428
1014
|
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2429
|
-
return _this.
|
|
1015
|
+
return _this.mainConnector.listAllPrinters().then(function (result) {
|
|
2430
1016
|
if (result.validationResult && result.validationResult.success) {
|
|
2431
1017
|
if (result.resultObject) {
|
|
2432
|
-
resolve(_this._boFactory.
|
|
1018
|
+
resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(printer_bo.Printer, result.resultObject));
|
|
2433
1019
|
}
|
|
2434
1020
|
}
|
|
2435
1021
|
else {
|
|
@@ -2440,15 +1026,15 @@
|
|
|
2440
1026
|
});
|
|
2441
1027
|
});
|
|
2442
1028
|
};
|
|
2443
|
-
SharedConnectorService.prototype.
|
|
1029
|
+
SharedConnectorService.prototype.getSendMethods = function () {
|
|
2444
1030
|
return __awaiter(this, void 0, void 0, function () {
|
|
2445
1031
|
var _this = this;
|
|
2446
1032
|
return __generator(this, function (_a) {
|
|
2447
1033
|
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2448
|
-
return _this.
|
|
1034
|
+
return _this.mainConnector.getSendMethods().then(function (result) {
|
|
2449
1035
|
if (result.validationResult && result.validationResult.success) {
|
|
2450
|
-
if (result.resultObject) {
|
|
2451
|
-
resolve(_this._boFactory.
|
|
1036
|
+
if (result.resultObject && result.resultObject.result) {
|
|
1037
|
+
resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(sendMethod_bo.SendMethod, result.resultObject.result));
|
|
2452
1038
|
}
|
|
2453
1039
|
}
|
|
2454
1040
|
else {
|
|
@@ -2459,12 +1045,25 @@
|
|
|
2459
1045
|
});
|
|
2460
1046
|
});
|
|
2461
1047
|
};
|
|
2462
|
-
// public async
|
|
1048
|
+
// public async getPrintStockStickers(request: PrintStockStickers): Promise<PrintStockStickers> {
|
|
2463
1049
|
// return new Promise((resolve: Function, reject: Function) => {
|
|
2464
|
-
// return this.sharedConnector.
|
|
1050
|
+
// return this.sharedConnector.getPrintStockStickers(request).then((result: DataServiceResponseData) => {
|
|
2465
1051
|
// if (result.validationResult && result.validationResult.success) {
|
|
2466
1052
|
// if (result.resultObject) {
|
|
2467
|
-
// resolve(this._boFactory.makeWithRawBackendData(
|
|
1053
|
+
// resolve(this._boFactory.makeWithRawBackendData(PrintStockStickers, result.resultObject));
|
|
1054
|
+
// }
|
|
1055
|
+
// } else {
|
|
1056
|
+
// reject(result.validationMessagesAsString);
|
|
1057
|
+
// }
|
|
1058
|
+
// })
|
|
1059
|
+
// })
|
|
1060
|
+
// }
|
|
1061
|
+
// public async getPrintPriceStickers(request: PrintPriceStickers): Promise<PrintPriceStickers> {
|
|
1062
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1063
|
+
// return this.sharedConnector.printPriceStickers(request).then((result: DataServiceResponseData) => {
|
|
1064
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1065
|
+
// if (result.resultObject) {
|
|
1066
|
+
// resolve(this._boFactory.makeWithRawBackendData(PrintPriceStickers, result.resultObject));
|
|
2468
1067
|
// }
|
|
2469
1068
|
// } else {
|
|
2470
1069
|
// reject(result.validationMessagesAsString);
|
|
@@ -2472,24 +1071,6 @@
|
|
|
2472
1071
|
// })
|
|
2473
1072
|
// })
|
|
2474
1073
|
// }
|
|
2475
|
-
SharedConnectorService.prototype.getArticleFullObject = function (goodId) {
|
|
2476
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2477
|
-
var _this = this;
|
|
2478
|
-
return __generator(this, function (_a) {
|
|
2479
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2480
|
-
return _this.articleConnector.getArticleFullObject(goodId).then(function (result) {
|
|
2481
|
-
// if (result.validationResult && result.validationResult.success) {
|
|
2482
|
-
// if (result.resultObject) {
|
|
2483
|
-
// resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
|
|
2484
|
-
// }
|
|
2485
|
-
// } else {
|
|
2486
|
-
// reject(result.validationMessagesAsString);
|
|
2487
|
-
// }
|
|
2488
|
-
});
|
|
2489
|
-
})];
|
|
2490
|
-
});
|
|
2491
|
-
});
|
|
2492
|
-
};
|
|
2493
1074
|
SharedConnectorService.prototype.getStockHistory = function (request) {
|
|
2494
1075
|
return __awaiter(this, void 0, void 0, function () {
|
|
2495
1076
|
var _this = this;
|
|
@@ -2566,63 +1147,45 @@
|
|
|
2566
1147
|
});
|
|
2567
1148
|
});
|
|
2568
1149
|
};
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
};
|
|
2607
|
-
|
|
2608
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2609
|
-
var _this = this;
|
|
2610
|
-
return __generator(this, function (_a) {
|
|
2611
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2612
|
-
return _this.sharedConnector.getPurchaseOrderEmailLayouts(transactionUUID).then(function (result) {
|
|
2613
|
-
if (result.validationResult && result.validationResult.success) {
|
|
2614
|
-
if (result.resultObject) {
|
|
2615
|
-
resolve(result.resultObject);
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
else {
|
|
2619
|
-
reject(result.validationMessagesAsString);
|
|
2620
|
-
}
|
|
2621
|
-
});
|
|
2622
|
-
})];
|
|
2623
|
-
});
|
|
2624
|
-
});
|
|
2625
|
-
};
|
|
1150
|
+
// public async getOrderConfirmationDefaultSendMethod(relationId: number): Promise<number> {
|
|
1151
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1152
|
+
// return this.sharedConnector.getOrderConfirmationDefaultSendMethod(relationId).then((result: DataServiceResponseData) => {
|
|
1153
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1154
|
+
// if (result.resultObject) {
|
|
1155
|
+
// resolve (result.resultObject);
|
|
1156
|
+
// }
|
|
1157
|
+
// } else {
|
|
1158
|
+
// reject(result.validationMessagesAsString);
|
|
1159
|
+
// }
|
|
1160
|
+
// });
|
|
1161
|
+
// });
|
|
1162
|
+
// }
|
|
1163
|
+
// public async getDefaultEmailAddressListForOrderConfirmation(transactionUUID: string): Promise<string[]> {
|
|
1164
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1165
|
+
// return this.sharedConnector.getDefaultEmailAddressListForOrderConfirmation(transactionUUID).then((result: DataServiceResponseData) => {
|
|
1166
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1167
|
+
// if (result.resultObject) {
|
|
1168
|
+
// resolve (result.resultObject);
|
|
1169
|
+
// }
|
|
1170
|
+
// } else {
|
|
1171
|
+
// reject(result.validationMessagesAsString);
|
|
1172
|
+
// }
|
|
1173
|
+
// });
|
|
1174
|
+
// });
|
|
1175
|
+
// }
|
|
1176
|
+
// public async getPurchaseOrderEmailLayouts(transactionUUID: string): Promise<StockStickersEmailLayouts[]> {
|
|
1177
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1178
|
+
// return this.sharedConnector.getPurchaseOrderEmailLayouts(transactionUUID).then((result: DataServiceResponseData) => {
|
|
1179
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1180
|
+
// if (result.resultObject) {
|
|
1181
|
+
// resolve (result.resultObject);
|
|
1182
|
+
// }
|
|
1183
|
+
// } else {
|
|
1184
|
+
// reject(result.validationMessagesAsString);
|
|
1185
|
+
// }
|
|
1186
|
+
// });
|
|
1187
|
+
// });
|
|
1188
|
+
// }
|
|
2626
1189
|
SharedConnectorService.prototype.getArticleDetails = function (data) {
|
|
2627
1190
|
return __awaiter(this, void 0, void 0, function () {
|
|
2628
1191
|
var _this = this;
|
|
@@ -2713,25 +1276,19 @@
|
|
|
2713
1276
|
});
|
|
2714
1277
|
});
|
|
2715
1278
|
};
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
}
|
|
2730
|
-
});
|
|
2731
|
-
})];
|
|
2732
|
-
});
|
|
2733
|
-
});
|
|
2734
|
-
};
|
|
1279
|
+
// public async getStockStickerTemplates(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
|
|
1280
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1281
|
+
// return this.mainConnector.getStockStickerPrintLayouts(data).then((result: DataServiceResponseData) => {
|
|
1282
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1283
|
+
// if (result.resultObject) {
|
|
1284
|
+
// resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStickersPrintLayouts, result.resultObject));
|
|
1285
|
+
// }
|
|
1286
|
+
// } else {
|
|
1287
|
+
// reject(result.validationMessagesAsString);
|
|
1288
|
+
// }
|
|
1289
|
+
// });
|
|
1290
|
+
// });
|
|
1291
|
+
// }
|
|
2735
1292
|
SharedConnectorService.prototype.getArticleTransaction = function (data) {
|
|
2736
1293
|
return __awaiter(this, void 0, void 0, function () {
|
|
2737
1294
|
var _this = this;
|
|
@@ -2770,41 +1327,12 @@
|
|
|
2770
1327
|
function StockService(_sharedService) {
|
|
2771
1328
|
this._sharedService = _sharedService;
|
|
2772
1329
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
_a.sent();
|
|
2780
|
-
return [2 /*return*/];
|
|
2781
|
-
}
|
|
2782
|
-
});
|
|
2783
|
-
});
|
|
2784
|
-
};
|
|
2785
|
-
StockService.prototype.getPrintPriceStickers = function (data) {
|
|
2786
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2787
|
-
return __generator(this, function (_a) {
|
|
2788
|
-
switch (_a.label) {
|
|
2789
|
-
case 0: return [4 /*yield*/, this._sharedService.getPrintPriceStickers(data)];
|
|
2790
|
-
case 1:
|
|
2791
|
-
_a.sent();
|
|
2792
|
-
return [2 /*return*/];
|
|
2793
|
-
}
|
|
2794
|
-
});
|
|
2795
|
-
});
|
|
2796
|
-
};
|
|
2797
|
-
StockService.prototype.getAllPrinters = function (showAll) {
|
|
2798
|
-
if (showAll === void 0) { showAll = true; }
|
|
2799
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2800
|
-
return __generator(this, function (_a) {
|
|
2801
|
-
switch (_a.label) {
|
|
2802
|
-
case 0: return [4 /*yield*/, this._sharedService.getAllPrinters(showAll)];
|
|
2803
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2804
|
-
}
|
|
2805
|
-
});
|
|
2806
|
-
});
|
|
2807
|
-
};
|
|
1330
|
+
// public async getPrintStockStickers(data: PrintStockStickers): Promise<void> {
|
|
1331
|
+
// await this._sharedService.getPrintStockStickers(data);
|
|
1332
|
+
// }
|
|
1333
|
+
// public async getPrintPriceStickers(data: PrintPriceStickers): Promise<void> {
|
|
1334
|
+
// await this._sharedService.getPrintPriceStickers(data);
|
|
1335
|
+
// }
|
|
2808
1336
|
StockService.prototype.getStockHistory = function (data) {
|
|
2809
1337
|
return __awaiter(this, void 0, void 0, function () {
|
|
2810
1338
|
return __generator(this, function (_a) {
|
|
@@ -2858,16 +1386,9 @@
|
|
|
2858
1386
|
});
|
|
2859
1387
|
});
|
|
2860
1388
|
};
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
switch (_a.label) {
|
|
2865
|
-
case 0: return [4 /*yield*/, this._sharedService.getStockStickerTemplates(data)];
|
|
2866
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2867
|
-
}
|
|
2868
|
-
});
|
|
2869
|
-
});
|
|
2870
|
-
};
|
|
1389
|
+
// public async getStockStickerTemplates(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
|
|
1390
|
+
// return await this._sharedService.getStockStickerTemplates(data);
|
|
1391
|
+
// }
|
|
2871
1392
|
StockService.prototype.getStockManagementWarehouses = function () {
|
|
2872
1393
|
return __awaiter(this, void 0, void 0, function () {
|
|
2873
1394
|
return __generator(this, function (_a) {
|
|
@@ -2888,36 +1409,15 @@
|
|
|
2888
1409
|
});
|
|
2889
1410
|
});
|
|
2890
1411
|
};
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
};
|
|
2901
|
-
StockService.prototype.getDefaultEmailAddressListForOrderConfirmation = function (transactionUUID) {
|
|
2902
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2903
|
-
return __generator(this, function (_a) {
|
|
2904
|
-
switch (_a.label) {
|
|
2905
|
-
case 0: return [4 /*yield*/, this._sharedService.getDefaultEmailAddressListForOrderConfirmation(transactionUUID)];
|
|
2906
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2907
|
-
}
|
|
2908
|
-
});
|
|
2909
|
-
});
|
|
2910
|
-
};
|
|
2911
|
-
StockService.prototype.getPurchaseOrderEmailLayouts = function (transactionUUID) {
|
|
2912
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2913
|
-
return __generator(this, function (_a) {
|
|
2914
|
-
switch (_a.label) {
|
|
2915
|
-
case 0: return [4 /*yield*/, this._sharedService.getPurchaseOrderEmailLayouts(transactionUUID)];
|
|
2916
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2917
|
-
}
|
|
2918
|
-
});
|
|
2919
|
-
});
|
|
2920
|
-
};
|
|
1412
|
+
// public async getOrderConfirmationDefaultSendMethod(relationId: number): Promise<number> {
|
|
1413
|
+
// return await this._sharedService.getOrderConfirmationDefaultSendMethod(relationId);
|
|
1414
|
+
// }
|
|
1415
|
+
// public async getDefaultEmailAddressListForOrderConfirmation(transactionUUID: string): Promise<string[]> {
|
|
1416
|
+
// return await this._sharedService.getDefaultEmailAddressListForOrderConfirmation(transactionUUID);
|
|
1417
|
+
// }
|
|
1418
|
+
// public async getPurchaseOrderEmailLayouts(transactionUUID: string): Promise<StockStickersEmailLayouts[]> {
|
|
1419
|
+
// return await this._sharedService.getPurchaseOrderEmailLayouts(transactionUUID);
|
|
1420
|
+
// }
|
|
2921
1421
|
StockService.prototype.getArticleTransaction = function (data) {
|
|
2922
1422
|
return __awaiter(this, void 0, void 0, function () {
|
|
2923
1423
|
return __generator(this, function (_a) {
|
|
@@ -3128,20 +1628,25 @@
|
|
|
3128
1628
|
"arrow_fat_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"37.5 25 25.2 12.7 25.2 20.35 12.5 20.35 12.5 29.66 25.2 29.66 25.2 37.3 37.5 25\" fill=\"#484f60\"/></svg>",
|
|
3129
1629
|
"arrow_point_left": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M31.9,36.7l-14.7-9.6C17.1,27,17,26.9,17,26.7v-2.4c0-0.2,0.1-0.3,0.2-0.4l14.7-9.6c0.2-0.2,0.5-0.1,0.7,0.1l1.4,2.1c0.2,0.2,0.1,0.5-0.1,0.7l-12,7.8c-0.3,0.2-0.3,0.6,0,0.8l12,7.8c0.2,0.2,0.3,0.5,0.1,0.7l-1.4,2.1C32.4,36.8,32.1,36.8,31.9,36.7z\"/></svg>",
|
|
3130
1630
|
"arrow_point_right": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\"><path fill=\"#484F5F\" d=\"M19.1,14.3l14.7,9.6c0.1,0.1,0.2,0.2,0.2,0.4v2.4c0,0.2-0.1,0.3-0.2,0.4l-14.7,9.6c-0.2,0.2-0.5,0.1-0.7-0.1l-1.4-2.1c-0.2-0.2-0.1-0.5,0.1-0.7l12-7.8c0.3-0.2,0.3-0.6,0-0.8l-12-7.8c-0.2-0.2-0.3-0.5-0.1-0.7l1.4-2.1C18.6,14.2,18.9,14.2,19.1,14.3z\"/></svg>",
|
|
1631
|
+
"at_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M207.8 20.73c-93.45 18.32-168.7 93.66-187 187.1c-27.64 140.9 68.65 266.2 199.1 285.1c19.01 2.888 36.17-12.26 36.17-31.49l.0001-.6631c0-15.74-11.44-28.88-26.84-31.24c-84.35-12.98-149.2-86.13-149.2-174.2c0-102.9 88.61-185.5 193.4-175.4c91.54 8.869 158.6 91.25 158.6 183.2l0 16.16c0 22.09-17.94 40.05-40 40.05s-40.01-17.96-40.01-40.05v-120.1c0-8.847-7.161-16.02-16.01-16.02l-31.98 .0036c-7.299 0-13.2 4.992-15.12 11.68c-24.85-12.15-54.24-16.38-86.06-5.106c-38.75 13.73-68.12 48.91-73.72 89.64c-9.483 69.01 43.81 128 110.9 128c26.44 0 50.43-9.544 69.59-24.88c24 31.3 65.23 48.69 109.4 37.49C465.2 369.3 496 324.1 495.1 277.2V256.3C495.1 107.1 361.2-9.332 207.8 20.73zM239.1 304.3c-26.47 0-48-21.56-48-48.05s21.53-48.05 48-48.05s48 21.56 48 48.05S266.5 304.3 239.1 304.3z\"/></svg>",
|
|
3131
1632
|
"bring_forward_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"#183153\" d=\"M224 464H448C456.8 464 464 456.8 464 448V224C464 215.2 456.8 208 448 208H384V160H448C483.3 160 512 188.7 512 224V448C512 483.3 483.3 512 448 512H224C188.7 512 160 483.3 160 448V384H208V448C208 456.8 215.2 464 224 464zM64 352C28.65 352 0 323.3 0 288V64C0 28.65 28.65 0 64 0H288C323.3 0 352 28.65 352 64V288C352 323.3 323.3 352 288 352H64z\"/></svg>",
|
|
3132
1633
|
"check_round": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,10A15,15,0,1,0,40,25,15,15,0,0,0,25,10ZM23,34l-6.24-9.09,2.81-3.59L23,26.45,27.66,16h5.58Z\" fill=\"#484f60\"/></svg>",
|
|
3133
1634
|
"delete_left_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z\"/></svg>",
|
|
3134
1635
|
"delivery_truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"15.35\" y=\"16.56\" width=\"15.14\" height=\"10.94\" transform=\"translate(-1.83 2.08) rotate(-5)\" fill=\"#484f60\"/><path d=\"M38.5,18.1l-6.9.61L32.41,28l-7.63.67a3.76,3.76,0,0,1,1.43,2.25l7.25-.63A3.83,3.83,0,0,1,41,29.6l1-.1-.52-6Zm.29,5.84-3.91.34a.51.51,0,0,1-.55-.46L34,20.1a.49.49,0,0,1,.45-.54l2.27-.2a.5.5,0,0,1,.48.25l2,3.59A.5.5,0,0,1,38.79,23.94Z\" fill=\"#484f60\"/><path d=\"M19.66,29.09a3.8,3.8,0,0,0-1,2.46l-.74.07-1.82-.94L16,29.41Z\" fill=\"#484f60\"/><path d=\"M34.56,30.62a2.74,2.74,0,1,0,2.49-3A2.73,2.73,0,0,0,34.56,30.62Z\" fill=\"#484f60\"/><path d=\"M19.74,31.91a2.74,2.74,0,1,0,2.49-3A2.74,2.74,0,0,0,19.74,31.91Z\" fill=\"#484f60\"/><rect x=\"7.96\" y=\"17.63\" width=\"5\" height=\"1\" transform=\"translate(-1.54 0.98) rotate(-5)\" fill=\"#484f60\"/><rect x=\"11.02\" y=\"29.71\" width=\"3\" height=\"1\" transform=\"translate(-2.59 1.21) rotate(-5)\" fill=\"#484f60\"/><rect x=\"9.48\" y=\"23.53\" width=\"4\" height=\"1\" transform=\"matrix(1, -0.09, 0.09, 1, -2.05, 1.09)\" fill=\"#484f60\"/></svg>",
|
|
3135
1636
|
"email": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.79,38.45A17.82,17.82,0,0,1,23.86,40,13.09,13.09,0,0,1,10.41,26.42C10.41,17.63,16.83,10,26.53,10c7.63,0,13.06,5.21,13.06,12.46,0,6.33-3.53,10.3-8.19,10.3a3.42,3.42,0,0,1-3.71-3.32h-.08A6.5,6.5,0,0,1,22,32.76c-2.75,0-4.82-2.11-4.82-5.65a9.85,9.85,0,0,1,10.13-10,12.89,12.89,0,0,1,5.13,1l-1.3,8c-.43,2.54-.13,3.71,1.08,3.75,1.85.09,4.18-2.28,4.18-7.28,0-5.65-3.62-10-10.3-10S13.73,17.76,13.73,26c0,7.25,4.57,11.3,11,11.3A14.81,14.81,0,0,0,31,36ZM28,20.65a5.34,5.34,0,0,0-1.33-.18c-2.85,0-5.09,2.81-5.09,6.12,0,1.64.73,2.68,2.16,2.68,1.59,0,3.27-2,3.66-4.53Z\" fill=\"#484f60\"/></svg>",
|
|
3136
1637
|
"envelope_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z\"/></svg>",
|
|
1638
|
+
"file_export_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M568.1 303l-80-80c-9.375-9.375-24.56-9.375-33.94 0s-9.375 24.56 0 33.94L494.1 296H216C202.8 296 192 306.8 192 320s10.75 24 24 24h278.1l-39.03 39.03C450.3 387.7 448 393.8 448 400s2.344 12.28 7.031 16.97c9.375 9.375 24.56 9.375 33.94 0l80-80C578.3 327.6 578.3 312.4 568.1 303zM360 384c-13.25 0-24 10.74-24 24V448c0 8.836-7.164 16-16 16H64.02c-8.836 0-16-7.164-16-16L48 64.13c0-8.836 7.164-16 16-16h160L224 128c0 17.67 14.33 32 32 32h79.1v72c0 13.25 10.74 24 23.1 24S384 245.3 384 232V138.6c0-16.98-6.742-33.26-18.75-45.26l-74.63-74.64C278.6 6.742 262.3 0 245.4 0H63.1C28.65 0-.002 28.66 0 64l.0065 384c.002 35.34 28.65 64 64 64H320c35.2 0 64-28.8 64-64v-40C384 394.7 373.3 384 360 384z\"/></svg>",
|
|
1639
|
+
"file_export_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M32 64C32 28.7 60.7 0 96 0H256V128c0 17.7 14.3 32 32 32H416V288H248c-13.3 0-24 10.7-24 24s10.7 24 24 24H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V64zM416 336V288H526.1l-39-39c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l80 80c9.4 9.4 9.4 24.6 0 33.9l-80 80c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l39-39H416zm0-208H288V0L416 128z\"/></svg>",
|
|
3137
1640
|
"file_pdf_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path d=\"M320 464C328.8 464 336 456.8 336 448V416H384V448C384 483.3 355.3 512 320 512H64C28.65 512 0 483.3 0 448V416H48V448C48 456.8 55.16 464 64 464H320zM256 160C238.3 160 224 145.7 224 128V48H64C55.16 48 48 55.16 48 64V192H0V64C0 28.65 28.65 0 64 0H229.5C246.5 0 262.7 6.743 274.7 18.75L365.3 109.3C377.3 121.3 384 137.5 384 154.5V192H336V160H256zM88 224C118.9 224 144 249.1 144 280C144 310.9 118.9 336 88 336H80V368C80 376.8 72.84 384 64 384C55.16 384 48 376.8 48 368V240C48 231.2 55.16 224 64 224H88zM112 280C112 266.7 101.3 256 88 256H80V304H88C101.3 304 112 293.3 112 280zM160 240C160 231.2 167.2 224 176 224H200C226.5 224 248 245.5 248 272V336C248 362.5 226.5 384 200 384H176C167.2 384 160 376.8 160 368V240zM192 352H200C208.8 352 216 344.8 216 336V272C216 263.2 208.8 256 200 256H192V352zM336 224C344.8 224 352 231.2 352 240C352 248.8 344.8 256 336 256H304V288H336C344.8 288 352 295.2 352 304C352 312.8 344.8 320 336 320H304V368C304 376.8 296.8 384 288 384C279.2 384 272 376.8 272 368V240C272 231.2 279.2 224 288 224H336z\"/></svg>",
|
|
3138
1641
|
"file_pdf_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path d=\"M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM64 224H88c30.9 0 56 25.1 56 56s-25.1 56-56 56H80v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V320 240c0-8.8 7.2-16 16-16zm24 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H80v48h8zm72-64c0-8.8 7.2-16 16-16h24c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H176c-8.8 0-16-7.2-16-16V240zm32 112h8c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16h-8v96zm96-128h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H304v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H304v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V304 240c0-8.8 7.2-16 16-16z\"/></svg>",
|
|
1642
|
+
"message_sms_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M448-.0004H64c-35.25 0-64 28.75-64 63.1v287.1c0 35.25 28.75 63.1 64 63.1h96v83.98c0 9.836 11.02 15.55 19.12 9.7L304 415.1H448c35.25 0 64-28.75 64-63.1V63.1C512 28.75 483.3-.0004 448-.0004zM464 352c0 8.75-7.25 16-16 16h-160l-80 60v-60H64c-8.75 0-16-7.25-16-16V64c0-8.75 7.25-16 16-16h384c8.75 0 16 7.25 16 16V352zM124.4 192.6C113.6 189.5 103.2 187.2 104.2 181.5c.7813-4.5 10.28-6.562 21.5-4.906c4.156 .6562 8.75 2.094 13.09 3.594c8.375 2.906 17.47-1.562 20.34-9.906c2.875-8.344-1.562-17.47-9.906-20.34C143.1 147.8 136.5 145.9 130.6 145c-30.69-4.812-53.94 7.719-58 31.09c-5.656 33.03 26.5 42.47 38.63 46c13.72 3.947 25.62 6.432 24.56 12.34C135 239 125.7 241.1 114.3 239.4C107.9 238.4 100.4 235.4 93.38 232.9c-8.375-2.969-16 1.875-18.97 10.19S77.19 261.1 85.5 264.1C92.81 266.8 101.1 269.8 109.4 271C113.7 271.7 117.9 272 121.1 272c24.28 0 41.94-12.03 45.38-32.13C173.1 206.5 141.4 197.5 124.4 192.6zM396.4 192.6C385.6 189.5 375.2 187.2 376.2 181.5c.7813-4.5 10.31-6.562 21.5-4.906c4.156 .6562 8.75 2.094 13.09 3.594c8.406 2.906 17.47-1.562 20.34-9.906c2.875-8.344-1.562-17.47-9.906-20.34c-6.156-2.125-12.69-4.062-18.59-4.969c-30.75-4.812-53.97 7.719-58 31.09c-5.656 33.03 26.5 42.47 38.63 46c13.72 3.947 25.62 6.432 24.56 12.34c-.7813 4.562-10.12 6.656-21.56 4.938c-6.342-.9883-13.9-3.939-20.88-6.438c-8.375-2.969-16 1.875-18.97 10.19s2.781 17.97 11.09 20.97c7.312 2.656 15.62 5.656 23.88 6.906C385.7 271.7 389.9 272 393.1 272c24.28 0 41.94-12.03 45.38-32.13C445.1 206.5 413.4 197.5 396.4 192.6zM309.1 144.8c-6.469-2.062-13.72 .0625-17.88 5.594L256 197.3L220.8 150.4C216.7 144.9 209.4 142.7 202.9 144.8C196.4 147 192 153.1 192 160v96c0 8.844 7.156 16 16 16S224 264.8 224 256V208l19.19 25.59c6.062 8.062 19.56 8.062 25.62 0L288 208V256c0 8.844 7.156 16 16 16S320 264.8 320 256V160C320 153.1 315.6 147 309.1 144.8z\"/></svg>",
|
|
1643
|
+
"message_sms_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M0 64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L185.6 508.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V416H64c-35.3 0-64-28.7-64-64V64zm202.9 80.8C196.4 147 192 153.1 192 160v96c0 8.8 7.2 16 16 16s16-7.2 16-16V208l19.2 25.6c3 4 7.8 6.4 12.8 6.4s9.8-2.4 12.8-6.4L288 208v48c0 8.8 7.2 16 16 16s16-7.2 16-16V160c0-6.9-4.4-13-10.9-15.2s-13.7 .1-17.9 5.6L256 197.3l-35.2-46.9c-4.1-5.5-11.3-7.8-17.9-5.6zm173.1 38c0-1.1 .2-1.6 .4-1.9c.3-.4 .9-1.2 2.4-2c3.1-1.8 8-3 12.9-2.9c6.1 .1 12.9 1.4 20.1 3.4c8.5 2.3 17.3-2.8 19.6-11.3s-2.8-17.3-11.3-19.6c-8.2-2.2-17.9-4.3-27.9-4.4c-9.3-.1-20.4 1.9-29.7 7.4c-9.9 5.9-18.6 16.4-18.5 31.6c.1 14.7 8.8 24 17.7 29.4c7.6 4.6 17.1 7.4 24.3 9.6l1.2 .4c8.5 2.6 14.2 4.5 18 6.9c2.7 1.7 2.7 2.4 2.7 3.1l0 .2c0 1.6-.3 2.3-.6 2.7c-.3 .5-.9 1.2-2.1 2c-2.8 1.7-7.5 2.9-12.8 2.8c-7-.2-13.5-2.4-22.6-5.5l0 0 0 0c-1.5-.5-3.2-1.1-4.9-1.6c-8.4-2.8-17.4 1.7-20.2 10.1s1.7 17.4 10.1 20.2c1.2 .4 2.6 .9 4 1.4l0 0 0 0c8.8 3 20.4 7 32.6 7.4c9.8 .3 21.2-1.6 30.7-7.6c10.2-6.4 18-17.3 17.8-32.3c-.2-14.7-8.5-24.2-17.6-29.9c-8-5-17.9-8-25.2-10.2l-.6-.2c-8.6-2.6-14.4-4.4-18.2-6.8c-1.6-1-2.1-1.6-2.2-1.7c0-.1 0-.2 0-.4zm-272 0c0-1.1 .2-1.6 .4-1.9c.3-.4 .9-1.2 2.4-2c3.1-1.8 8-3 12.9-2.9c6.6 .1 16.7 1.6 23.3 3.4c8.5 2.3 17.3-2.8 19.6-11.3s-2.8-17.3-11.3-19.6c-8.8-2.4-21.6-4.3-31.1-4.4c-9.3-.1-20.4 1.9-29.7 7.4C80.6 157.3 72 167.8 72 183c.1 14.7 8.8 24 17.7 29.4c7.6 4.6 17.1 7.4 24.3 9.6l0 0 1.2 .4c8.5 2.6 14.2 4.5 18 6.9c2.7 1.7 2.7 2.4 2.7 3.1l0 .2c0 1.6-.3 2.3-.6 2.7c-.3 .5-.9 1.2-2.1 2c-2.8 1.7-7.5 2.9-12.8 2.8c-7.2-.2-14.2-2.6-23.7-5.8l0 0 0 0c-1.3-.4-2.7-.9-4.1-1.4c-8.4-2.8-17.4 1.7-20.2 10.1s1.7 17.4 10.1 20.2c1.1 .4 2.4 .8 3.6 1.2l0 0 0 0c9 3.1 20.9 7.2 33.2 7.6c9.8 .3 21.2-1.6 30.7-7.6c10.2-6.4 18-17.3 17.8-32.3c-.2-14.7-8.5-24.2-17.6-29.9c-8-5-17.9-8-25.2-10.2l-.6-.2c-8.6-2.6-14.4-4.4-18.3-6.8c-1.6-1-2.1-1.6-2.2-1.7c0-.1 0-.2 0-.4z\"/></svg>",
|
|
3139
1644
|
"pdf": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.88c-2.16,0-2.72-.56-2.72-2.72V12.88c0-2.15.56-2.71,2.72-2.71h11.6l8.66,8.88v3.43H32.8V19.6l-7.88-8.09h-11c-1.38,0-1.38,0-1.38,1.37V37.45c0,1.37,0,1.37,1.38,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M27.83,26.63v4.24h1a3.57,3.57,0,0,0,.78-.06,1.22,1.22,0,0,0,.52-.26,1.44,1.44,0,0,0,.34-.62,4.13,4.13,0,0,0,.13-1.18,3.79,3.79,0,0,0-.13-1.14,1.51,1.51,0,0,0-.37-.62,1.14,1.14,0,0,0-.6-.3,5.93,5.93,0,0,0-1.06-.06Z\" fill=\"#484f60\"/><path d=\"M21.86,26.63v1.82h.71a3.57,3.57,0,0,0,1-.1A.88.88,0,0,0,24,28a.84.84,0,0,0,.14-.5.8.8,0,0,0-.2-.57.88.88,0,0,0-.52-.29,6.36,6.36,0,0,0-.93,0Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.12,4.24a1.68,1.68,0,0,1-.54.63,1.9,1.9,0,0,1-.67.3,6.57,6.57,0,0,1-1.34.1h-.85V32H20.57V25.54h2.07a7.75,7.75,0,0,1,1.54.1,1.73,1.73,0,0,1,.93.63,2,2,0,0,1,.37,1.25A2,2,0,0,1,25.26,28.51Zm6.45,1.66A2.91,2.91,0,0,1,31,31.31a2.28,2.28,0,0,1-.91.51A4,4,0,0,1,29,32H26.54V25.54H28.9a4.21,4.21,0,0,1,1.22.13,2.08,2.08,0,0,1,1,.59,2.79,2.79,0,0,1,.61,1,4.76,4.76,0,0,1,.21,1.52A4.19,4.19,0,0,1,31.71,30.17Zm5.7-3.54h-3.1v1.52H37v1.08H34.31V32H33V25.54h4.39Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/></svg>",
|
|
3140
1645
|
"print": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M38,16.5H12a2,2,0,0,0-2,2v9a2,2,0,0,0,2,2h2v-5H36v5h2a2,2,0,0,0,2-2v-9A2,2,0,0,0,38,16.5ZM37,21a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,37,21Z\" fill=\"#484f60\"/><path d=\"M35,11.5v5H15v-5H35m1-1H14v7H36v-7Z\" fill=\"#484f60\"/><path d=\"M35,25.5v13H15v-13H35m1-1H14v15H36v-15Z\" fill=\"#484f60\"/><rect x=\"17\" y=\"28.3\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"31.5\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"34.7\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/></svg>",
|
|
3141
1646
|
"print_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M111.1 48h254.1L400 81.94V160H448V81.94c0-12.73-5.057-24.94-14.06-33.94l-33.94-33.94C391 5.057 378.8 0 366.1 0H111.1C85.49 0 64.01 21.48 64 47.98l.002 82.28c-.002 0 .002 0 0 0L64 160h48.01L111.1 48zM440 192H72C32.3 192 0 224.3 0 264v112c0 13.25 10.75 24 24 24H80V480c0 17.67 14.33 32 32 32h288c17.67 0 32-14.33 32-32v-80h56c13.25 0 24-10.75 24-24v-112C512 224.3 479.7 192 440 192zM384 464H128v-96h256V464zM464 352h-32c0-17.67-14.33-32-32-32h-288c-17.67 0-32 14.33-32 32h-32V264c0-13.23 10.77-24 24-24h368c13.23 0 24 10.77 24 24V352z\"/></svg>",
|
|
3142
1647
|
"print_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M448 192H64C28.65 192 0 220.7 0 256v96c0 17.67 14.33 32 32 32h32v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h32c17.67 0 32-14.33 32-32V256C512 220.7 483.3 192 448 192zM384 448H128v-96h256V448zM432 296c-13.25 0-24-10.75-24-24c0-13.27 10.75-24 24-24s24 10.73 24 24C456 285.3 445.3 296 432 296zM128 64h229.5L384 90.51V160h64V77.25c0-8.484-3.375-16.62-9.375-22.62l-45.25-45.25C387.4 3.375 379.2 0 370.8 0H96C78.34 0 64 14.33 64 32v128h64V64z\"/></svg>",
|
|
3143
1648
|
"signature_field": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M20.1,25.42a1.1,1.1,0,1,1,1.27,1.45l-3.3,9.07A63.13,63.13,0,0,1,28,28.3l1.26-12-8.26-3-6.77,10A62.4,62.4,0,0,1,17,35.54l3.3-9.07A1.12,1.12,0,0,1,20.1,25.42Z\" fill=\"#484f60\"/><rect x=\"21.62\" y=\"11.43\" width=\"8.79\" height=\"2.34\" transform=\"translate(5.88 -8.14) rotate(20)\" fill=\"#484f60\"/><path d=\"M18.11,37.48c1.44,2.65,4.58,2.94,7.23,2.1,1.41-.44,2.2-1.49,3.44-2.06,2.42-1.1,3.13,1.2,5.36,1.37.42,0,2-.65,1.54-.68-2.55-.19-2.93-3.13-5.51-2.65a4.9,4.9,0,0,0-1.64.71c-.77.49-1.31,1.62-2.07,2l-4.61.56A3.38,3.38,0,0,1,20,37c-.22-.41-2,.28-1.85.5Z\" fill=\"#484f60\"/></svg>",
|
|
3144
|
-
"xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0
|
|
1649
|
+
"xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><g><path d=\"M21.42,30.17H3.87c-2.16,0-2.72-.56-2.72-2.72V2.88C1.16,.73,1.72,.17,3.87,.17H15.48l8.66,8.88v3.43h-1.34v-2.88L14.92,1.51H3.87q-1.37,0-1.37,1.37V27.45q0,1.37,1.37,1.37H21.42q1.37,0,1.37-1.37v-2.43h1.34v2.43c0,2.16-.56,2.72-2.72,2.72Z\" fill=\"#484f60\"/><path d=\"M15.2,.84V7.28c0,1.78,.27,2.05,2.04,2.05h6.22L15.2,.84Z\" fill=\"#484f60\"/><path d=\"M9.14,14.27v8.96H28.84V14.27H9.14Zm5.36,7.4l-1.3-2.02-1.3,2.02h-1.42l2-3.05-1.81-2.8h1.38l1.17,1.88,1.15-1.88h1.37l-1.82,2.84,2,3.01h-1.43Zm7.67,0h-1.1v-4.61l-1.16,4.61h-1.14l-1.16-4.61v4.61h-1.1v-5.85h1.77l1.06,3.99,1.05-3.99h1.77v5.85Zm5.33,0h-4.12v-5.81h1.18v4.82h2.94v.99Z\" fill=\"#484f60\"/></g></g></svg>"
|
|
3145
1650
|
};
|
|
3146
1651
|
|
|
3147
1652
|
var IconCacheService = /** @class */ (function () {
|
|
@@ -3196,34 +1701,39 @@
|
|
|
3196
1701
|
]; };
|
|
3197
1702
|
|
|
3198
1703
|
/** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
|
|
3199
|
-
|
|
1704
|
+
exports["ɵw"] = void 0;
|
|
3200
1705
|
(function (Icon) {
|
|
3201
1706
|
Icon["AngleLeftSolid"] = "angle_left_solid";
|
|
3202
1707
|
Icon["AngleRightSolid"] = "angle_right_solid";
|
|
3203
1708
|
Icon["ArrowFatRight"] = "arrow_fat_right";
|
|
3204
1709
|
Icon["ArrowPointLeft"] = "arrow_point_left";
|
|
3205
1710
|
Icon["ArrowPointRight"] = "arrow_point_right";
|
|
1711
|
+
Icon["AtSolid"] = "at_solid";
|
|
3206
1712
|
Icon["BringForwardRegular"] = "bring_forward_regular";
|
|
3207
1713
|
Icon["CheckRound"] = "check_round";
|
|
3208
1714
|
Icon["DeleteLeftRegular"] = "delete_left_regular";
|
|
3209
1715
|
Icon["DeliveryTruck"] = "delivery_truck";
|
|
3210
1716
|
Icon["Email"] = "email";
|
|
3211
1717
|
Icon["EnvelopeRegular"] = "envelope_regular";
|
|
1718
|
+
Icon["FileExportRegular"] = "file_export_regular";
|
|
1719
|
+
Icon["FileExportSolid"] = "file_export_solid";
|
|
3212
1720
|
Icon["FilePdfRegular"] = "file_pdf_regular";
|
|
3213
1721
|
Icon["FilePdfSolid"] = "file_pdf_solid";
|
|
1722
|
+
Icon["MessageSmsRegular"] = "message_sms_regular";
|
|
1723
|
+
Icon["MessageSmsSolid"] = "message_sms_solid";
|
|
3214
1724
|
Icon["Pdf"] = "pdf";
|
|
3215
1725
|
Icon["Print"] = "print";
|
|
3216
1726
|
Icon["PrintRegular"] = "print_regular";
|
|
3217
1727
|
Icon["PrintSolid"] = "print_solid";
|
|
3218
1728
|
Icon["SignatureField"] = "signature_field";
|
|
3219
1729
|
Icon["Xml"] = "xml";
|
|
3220
|
-
})(
|
|
1730
|
+
})(exports["ɵw"] || (exports["ɵw"] = {}));
|
|
3221
1731
|
|
|
3222
1732
|
var StockInformationGridComponent = /** @class */ (function () {
|
|
3223
1733
|
function StockInformationGridComponent(iconCacheService, _stockService) {
|
|
3224
1734
|
this.iconCacheService = iconCacheService;
|
|
3225
1735
|
this._stockService = _stockService;
|
|
3226
|
-
this.icons =
|
|
1736
|
+
this.icons = exports["ɵw"];
|
|
3227
1737
|
this.transferIconClicked = new i0.EventEmitter();
|
|
3228
1738
|
this.historyClicked = new i0.EventEmitter();
|
|
3229
1739
|
this.cancelButtonClicked = new i0.EventEmitter();
|
|
@@ -3314,10 +1824,10 @@
|
|
|
3314
1824
|
this._stockService.printLayoutParams.goodId = data.goodId;
|
|
3315
1825
|
this._stockService.printLayoutParams.warehouse = data.warehouseNo;
|
|
3316
1826
|
}
|
|
3317
|
-
this.showSendMethodDialog =
|
|
1827
|
+
this.showSendMethodDialog = true;
|
|
3318
1828
|
};
|
|
3319
1829
|
StockInformationGridComponent.prototype.printStockStickers = function () {
|
|
3320
|
-
this._stockService.getPrintStockStickers(this._stockService.printLayoutParams);
|
|
1830
|
+
// this._stockService.getPrintStockStickers(this._stockService.printLayoutParams);
|
|
3321
1831
|
};
|
|
3322
1832
|
StockInformationGridComponent.prototype.onOkClick = function () {
|
|
3323
1833
|
this.okButtonClicked.emit();
|
|
@@ -3416,7 +1926,7 @@
|
|
|
3416
1926
|
StockInformationGridComponent.decorators = [
|
|
3417
1927
|
{ type: i0.Component, args: [{
|
|
3418
1928
|
selector: "co-stock-information-grid",
|
|
3419
|
-
template: "\n <div class=\"tab-link show\" *ngIf=\"hideOrShowTabs\">\n <span class=\"tab-link-buttons\"\n *ngFor=\"let tab of tabs\"\n (click)=\"handleTabClick(tab)\"\n [textContent]=\"tab\"\n [class.active]=\"tab === activeTab\"\n ></span>\n </div>\n\n <div class=\"stock-line\">\n <div [textContent]=\"activeTabText\"></div>\n\n </div>\n\n <div class=\"stock-grid\">\n <co-simple-grid *ngIf=\"activeTab === tabs[0] && hideOrShowTabs\"\n [data]=\"articleStockInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNo'\" [order]=\"10\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseName'\" [order]=\"11\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'technicalStock'\" [order]=\"12\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'availableStock'\" [order]=\"13\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK'\" [field]=\"'economicalStock'\" [order]=\"14\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNo'\" [order]=\"15\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"'Bekijken'\" (click)=\"onLocationClick(row)\"></span>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[1]\"\n [data]=\"inOrderInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'IN_ORDER2'\" [field]=\"'transactionNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'CUSTOMER'\" [field]=\"'user'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.transactionDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amountInOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'wareHouseNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'locationNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick($event)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[2]\"\n [data]=\"orderInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_NR'\" [field]=\"'transactionNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.transactionDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amountInOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVED'\" [field]=\"'reserved'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK'\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE1'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.deliveryDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVE'\" [field]=\"'reservation'\"></co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></span>\n </div>\n <div class=\"stock-location-right-group\">\n <co-drop-down-list [(model)]=\"selectedWarehouse\"\n [collection]=\"dataWareHouseCode\"\n [fields]=\"dataWareHouseFields\"\n [placeholder]=\"'WAREHOUSE'\"\n (modelChange)=\"onSelectWarehouse($event)\"\n [required]=\"true\"\n ></co-drop-down-list>\n </div>\n </div>\n\n<!-- TODO move to own component stock-location-->\n <co-simple-grid [data]=\"articleDetails\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n [showAdd]=\"true\"\n [showToolbar]=\"true\"\n [showDelete]=\"true\"\n [inlineEdit]=\"true\"\n >\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <co-button class=\"stock-lines-button\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></co-button>\n </div>\n </div>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-drop-down-list [(model)]=\"row.locationNo\"\n [collection]=\"stockLocations\"\n [fields]=\"dataLocationFields\"\n [placeholder]=\"'LOCATION'\"\n (click)=\"onSelectLocation()\"\n [required]=\"true\"\n ></co-drop-down-list>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batchNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.batchNo\"\n [placeholder]=\"'BATCH'\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.serialNo\"\n [placeholder]=\"'SERIAL_NO'\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.amountInStock\"\n [label]=\"'STOCK'\"\n (modelChange)=\"amountInStockChanged($event, row)\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'stockAssigned'\" ></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'perceptibleStorage'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PHYSICAL_STOCK'\" [field]=\"'amountInStockOriginal'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA'\" [field]=\"'currency'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_PRICE'\" [field]=\"'purchasePrice'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SUPPLIER_NUMBER'\" [field]=\"'supplierNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <co-stock-change-amount *ngIf=\"showChangeStockDetails\"\n (closeStockChangeAmount)=\"showChangeStockDetails = false\"\n [selectedArticleDetailsData]=\"selectedArticleDetailsData\"\n >\n </co-stock-change-amount>\n\n <div class=\"stock-grid\" *ngIf=\"showStockHistory\">\n <div class=\"stock-button-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"backToStockInformation()\"></span>\n </div>\n <co-simple-grid [data]=\"stockHistoryInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'MUTATION_DATE'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.mutationDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'MUTATION_TIME'\" [field]=\"'mutationTime'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'wareHouseNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSACTION_TYPE'\" [field]=\"'transType'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DOCUMENT_NUMBER'\" [field]=\"'docNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LINE'\" [field]=\"'posLineNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK_STATE'\" [field]=\"'stockStateId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK_REMARK'\" [field]=\"'stockStateRemarkId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA'\" [field]=\"'currencyCode'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RELATION_ID'\" [field]=\"'relationId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'USER'\" [field]=\"'user'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'MUTATION_TYPE'\" [field]=\"'mutationType'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-button-toolbar\">\n <div class=\"stock-button-left-group\">\n <co-button *ngIf=\"activeTab === tabs[0]\" [label]=\"'HISTORY'\" (click)=\"handleHistoryClick()\"></co-button>\n </div>\n <div class=\"stock-button-middle-group\" *ngIf=\"activeTab !== tabs[0]\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n\n <div class=\"stock-button-middle-group\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClickSendLocations()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClickSendLocations()\"></co-button>\n </div>\n </div>\n </div>\n <ione-send-method-dialog\n *ngIf=\"showSendMethodDialog\"\n [showDialog]=\"showSendMethodDialog\"\n (printButtonClicked)=\"printStockStickers()\"\n ></ione-send-method-dialog>\n ",
|
|
1929
|
+
template: "\n <div class=\"tab-link show\" *ngIf=\"hideOrShowTabs\">\n <span class=\"tab-link-buttons\"\n *ngFor=\"let tab of tabs\"\n (click)=\"handleTabClick(tab)\"\n [textContent]=\"tab\"\n [class.active]=\"tab === activeTab\"\n ></span>\n </div>\n\n <div class=\"stock-line\">\n <div [textContent]=\"activeTabText\"></div>\n\n </div>\n\n <div class=\"stock-grid\">\n <co-simple-grid *ngIf=\"activeTab === tabs[0] && hideOrShowTabs\"\n [data]=\"articleStockInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNo'\" [order]=\"10\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseName'\" [order]=\"11\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'technicalStock'\" [order]=\"12\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'availableStock'\" [order]=\"13\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK'\" [field]=\"'economicalStock'\" [order]=\"14\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNo'\" [order]=\"15\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"'Bekijken'\" (click)=\"onLocationClick(row)\"></span>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[1]\"\n [data]=\"inOrderInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'IN_ORDER2'\" [field]=\"'transactionNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'CUSTOMER'\" [field]=\"'user'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.transactionDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amountInOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'wareHouseNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'locationNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick($event)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[2]\"\n [data]=\"orderInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_NR'\" [field]=\"'transactionNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.transactionDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amountInOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVED'\" [field]=\"'reserved'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK'\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE1'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.deliveryDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVE'\" [field]=\"'reservation'\"></co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></span>\n </div>\n <div class=\"stock-location-right-group\">\n <co-drop-down-list [(model)]=\"selectedWarehouse\"\n [collection]=\"dataWareHouseCode\"\n [fields]=\"dataWareHouseFields\"\n [placeholder]=\"'WAREHOUSE'\"\n (modelChange)=\"onSelectWarehouse($event)\"\n [required]=\"true\"\n ></co-drop-down-list>\n </div>\n </div>\n\n<!-- TODO move to own component stock-location-->\n <co-simple-grid [data]=\"articleDetails\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n [showAdd]=\"true\"\n [showToolbar]=\"true\"\n [showDelete]=\"true\"\n [inlineEdit]=\"true\"\n >\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <co-button class=\"stock-lines-button\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></co-button>\n </div>\n </div>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-drop-down-list [(model)]=\"row.locationNo\"\n [collection]=\"stockLocations\"\n [fields]=\"dataLocationFields\"\n [placeholder]=\"'LOCATION'\"\n (click)=\"onSelectLocation()\"\n [required]=\"true\"\n ></co-drop-down-list>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batchNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.batchNo\"\n [placeholder]=\"'BATCH'\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.serialNo\"\n [placeholder]=\"'SERIAL_NO'\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.amountInStock\"\n [label]=\"'STOCK'\"\n (modelChange)=\"amountInStockChanged($event, row)\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'stockAssigned'\" ></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'perceptibleStorage'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PHYSICAL_STOCK'\" [field]=\"'amountInStockOriginal'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA'\" [field]=\"'currency'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_PRICE'\" [field]=\"'purchasePrice'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SUPPLIER_NUMBER'\" [field]=\"'supplierNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <co-stock-change-amount *ngIf=\"showChangeStockDetails\"\n (closeStockChangeAmount)=\"showChangeStockDetails = false\"\n [selectedArticleDetailsData]=\"selectedArticleDetailsData\"\n >\n </co-stock-change-amount>\n\n <div class=\"stock-grid\" *ngIf=\"showStockHistory\">\n <div class=\"stock-button-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"backToStockInformation()\"></span>\n </div>\n <co-simple-grid [data]=\"stockHistoryInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'MUTATION_DATE'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row.mutationDate | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'MUTATION_TIME'\" [field]=\"'mutationTime'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'wareHouseNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSACTION_TYPE'\" [field]=\"'transType'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DOCUMENT_NUMBER'\" [field]=\"'docNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LINE'\" [field]=\"'posLineNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK_STATE'\" [field]=\"'stockStateId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK_REMARK'\" [field]=\"'stockStateRemarkId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA'\" [field]=\"'currencyCode'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RELATION_ID'\" [field]=\"'relationId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'USER'\" [field]=\"'user'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'MUTATION_TYPE'\" [field]=\"'mutationType'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-button-toolbar\">\n <div class=\"stock-button-left-group\">\n <co-button *ngIf=\"activeTab === tabs[0]\" [label]=\"'HISTORY'\" (click)=\"handleHistoryClick()\"></co-button>\n </div>\n <div class=\"stock-button-middle-group\" *ngIf=\"activeTab !== tabs[0]\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n\n <div class=\"stock-button-middle-group\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClickSendLocations()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClickSendLocations()\"></co-button>\n </div>\n </div>\n </div>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n (closeClick)=\"showSendMethodDialog = false\"\n (printButtonClicked)=\"printStockStickers()\"\n ></co-send-method-dialog>\n ",
|
|
3420
1930
|
encapsulation: i0.ViewEncapsulation.None
|
|
3421
1931
|
},] }
|
|
3422
1932
|
];
|
|
@@ -3555,149 +2065,251 @@
|
|
|
3555
2065
|
handleStickerClicked: [{ type: i0.Output }]
|
|
3556
2066
|
};
|
|
3557
2067
|
|
|
3558
|
-
var
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
2068
|
+
var SharedService = /** @class */ (function () {
|
|
2069
|
+
function SharedService(options, connector) {
|
|
2070
|
+
this.options = options;
|
|
2071
|
+
this.connector = connector;
|
|
2072
|
+
}
|
|
2073
|
+
SharedService.prototype.init = function (options) {
|
|
2074
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2075
|
+
return __generator(this, function (_a) {
|
|
2076
|
+
switch (_a.label) {
|
|
2077
|
+
case 0: return [4 /*yield*/, this.options.initialize(options)];
|
|
2078
|
+
case 1:
|
|
2079
|
+
_a.sent();
|
|
2080
|
+
this.connector.connect();
|
|
2081
|
+
return [2 /*return*/];
|
|
2082
|
+
}
|
|
2083
|
+
});
|
|
2084
|
+
});
|
|
2085
|
+
};
|
|
2086
|
+
SharedService.prototype.getAllPrinters = function () {
|
|
2087
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2088
|
+
return __generator(this, function (_a) {
|
|
2089
|
+
switch (_a.label) {
|
|
2090
|
+
case 0: return [4 /*yield*/, this.connector.getAllPrinters()];
|
|
2091
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
});
|
|
2095
|
+
};
|
|
2096
|
+
SharedService.prototype.getSendMethods = function () {
|
|
2097
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2098
|
+
return __generator(this, function (_a) {
|
|
2099
|
+
switch (_a.label) {
|
|
2100
|
+
case 0: return [4 /*yield*/, this.connector.getSendMethods()];
|
|
2101
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
});
|
|
2105
|
+
};
|
|
2106
|
+
return SharedService;
|
|
2107
|
+
}());
|
|
2108
|
+
SharedService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0__namespace.ɵɵinject(OptionsService), i0__namespace.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
|
|
2109
|
+
SharedService.decorators = [
|
|
2110
|
+
{ type: i0.Injectable, args: [{
|
|
2111
|
+
providedIn: "root"
|
|
2112
|
+
},] }
|
|
2113
|
+
];
|
|
2114
|
+
SharedService.ctorParameters = function () { return [
|
|
2115
|
+
{ type: OptionsService },
|
|
2116
|
+
{ type: SharedConnectorService }
|
|
2117
|
+
]; };
|
|
2118
|
+
|
|
2119
|
+
var SendMethodService = /** @class */ (function () {
|
|
2120
|
+
function SendMethodService() {
|
|
2121
|
+
this.reportingDocumentPrintBaseRequestChanged = new rxjs.Subject();
|
|
2122
|
+
this.reportingDocumentEmailBaseRequestChanged = new rxjs.Subject();
|
|
2123
|
+
this.reportingDocumentPdfBaseRequestChanged = new rxjs.Subject();
|
|
2124
|
+
this.selectedEmailAddresses = [];
|
|
2125
|
+
this._reportingDocumentPrintBaseRequest = new reportingDocumentPrintBaseRequest.ReportingDocumentPrintBaseRequest();
|
|
2126
|
+
this._reportingDocumentEmailBaseRequest = new reportingDocumentEmailBaseRequest.ReportingDocumentEmailBaseRequest();
|
|
2127
|
+
this._reportingDocumentPdfBaseRequest = new reportingDocumentPdfBaseRequest.ReportingDocumentPdfBaseRequest();
|
|
2128
|
+
}
|
|
2129
|
+
Object.defineProperty(SendMethodService.prototype, "reportingDocumentPrintBaseRequest", {
|
|
2130
|
+
get: function () {
|
|
2131
|
+
return this._reportingDocumentPrintBaseRequest;
|
|
2132
|
+
},
|
|
2133
|
+
set: function (value) {
|
|
2134
|
+
this._reportingDocumentPrintBaseRequest = value;
|
|
2135
|
+
this.activePrinter = this._reportingDocumentPrintBaseRequest.printerName;
|
|
2136
|
+
this.reportingDocumentPrintBaseRequestChanged.next(this._reportingDocumentPrintBaseRequest);
|
|
2137
|
+
},
|
|
2138
|
+
enumerable: false,
|
|
2139
|
+
configurable: true
|
|
2140
|
+
});
|
|
2141
|
+
Object.defineProperty(SendMethodService.prototype, "reportingDocumentEmailBaseRequest", {
|
|
2142
|
+
get: function () {
|
|
2143
|
+
return this._reportingDocumentEmailBaseRequest;
|
|
2144
|
+
},
|
|
2145
|
+
set: function (value) {
|
|
2146
|
+
this._reportingDocumentEmailBaseRequest = value;
|
|
2147
|
+
this.selectedEmailAddresses = this._reportingDocumentEmailBaseRequest.toAddresses.split(';');
|
|
2148
|
+
this.reportingDocumentEmailBaseRequestChanged.next(this._reportingDocumentEmailBaseRequest);
|
|
2149
|
+
},
|
|
2150
|
+
enumerable: false,
|
|
2151
|
+
configurable: true
|
|
2152
|
+
});
|
|
2153
|
+
Object.defineProperty(SendMethodService.prototype, "reportingDocumentPdfBaseRequest", {
|
|
2154
|
+
get: function () {
|
|
2155
|
+
return this._reportingDocumentPdfBaseRequest;
|
|
2156
|
+
},
|
|
2157
|
+
set: function (value) {
|
|
2158
|
+
this._reportingDocumentPdfBaseRequest = value;
|
|
2159
|
+
this.reportingDocumentPdfBaseRequestChanged.next(this._reportingDocumentPdfBaseRequest);
|
|
2160
|
+
},
|
|
2161
|
+
enumerable: false,
|
|
2162
|
+
configurable: true
|
|
2163
|
+
});
|
|
2164
|
+
SendMethodService.prototype.removeEmailAddress = function (address) {
|
|
2165
|
+
if (this.selectedEmailAddresses.indexOf(address) > -1) {
|
|
2166
|
+
this.selectedEmailAddresses.splice(this.selectedEmailAddresses.indexOf(address), 1);
|
|
2167
|
+
this._updateEmailAddresses();
|
|
2168
|
+
}
|
|
2169
|
+
};
|
|
2170
|
+
SendMethodService.prototype.addEmailAddress = function (address) {
|
|
2171
|
+
if (this.selectedEmailAddresses.indexOf(address) < 0) {
|
|
2172
|
+
this.selectedEmailAddresses.push(address);
|
|
2173
|
+
this._updateEmailAddresses();
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
SendMethodService.prototype._updateEmailAddresses = function () {
|
|
2177
|
+
this._reportingDocumentEmailBaseRequest.toAddresses = this.selectedEmailAddresses.join(';');
|
|
2178
|
+
this.reportingDocumentEmailBaseRequestChanged.next(this._reportingDocumentEmailBaseRequest);
|
|
2179
|
+
};
|
|
2180
|
+
return SendMethodService;
|
|
2181
|
+
}());
|
|
2182
|
+
SendMethodService.decorators = [
|
|
2183
|
+
{ type: i0.Injectable }
|
|
2184
|
+
];
|
|
2185
|
+
|
|
2186
|
+
var SendMethod = /** @class */ (function () {
|
|
2187
|
+
function SendMethod(code, description, icon) {
|
|
2188
|
+
this.code = code;
|
|
2189
|
+
this.description = description;
|
|
2190
|
+
this.icon = icon;
|
|
2191
|
+
}
|
|
2192
|
+
return SendMethod;
|
|
2193
|
+
}());
|
|
3565
2194
|
|
|
2195
|
+
var sendMethodsWithIcon = [
|
|
2196
|
+
new SendMethod(sendMethodType_enum.SendMethodType.Fax, "Fax", exports["ɵw"].PrintRegular),
|
|
2197
|
+
new SendMethod(sendMethodType_enum.SendMethodType.Print, "Print", exports["ɵw"].PrintSolid),
|
|
2198
|
+
new SendMethod(sendMethodType_enum.SendMethodType.Email, "Email", exports["ɵw"].AtSolid),
|
|
2199
|
+
new SendMethod(sendMethodType_enum.SendMethodType.Edi, "Edi", exports["ɵw"].FileExportSolid),
|
|
2200
|
+
new SendMethod(sendMethodType_enum.SendMethodType.EmailTemplate, "Email template", exports["ɵw"].EnvelopeRegular),
|
|
2201
|
+
new SendMethod(sendMethodType_enum.SendMethodType.Sms, "Sms", exports["ɵw"].MessageSmsSolid),
|
|
2202
|
+
new SendMethod(sendMethodType_enum.SendMethodType.WebService, "Webservice", exports["ɵw"].PrintRegular)
|
|
2203
|
+
];
|
|
3566
2204
|
var SendMethodDialogComponent = /** @class */ (function () {
|
|
3567
|
-
function SendMethodDialogComponent(iconCacheService,
|
|
2205
|
+
function SendMethodDialogComponent(iconCacheService, _optionsService, _dictionary, _changeDetector, _sharedService, _sendMethodService) {
|
|
3568
2206
|
var _this = this;
|
|
3569
2207
|
this.iconCacheService = iconCacheService;
|
|
3570
|
-
this.stockService = stockService;
|
|
3571
2208
|
this._optionsService = _optionsService;
|
|
3572
2209
|
this._dictionary = _dictionary;
|
|
3573
2210
|
this._changeDetector = _changeDetector;
|
|
3574
|
-
this.
|
|
3575
|
-
this.
|
|
3576
|
-
this.
|
|
3577
|
-
this.
|
|
3578
|
-
this.showPdfOption = true;
|
|
3579
|
-
this.showXmlOption = true;
|
|
3580
|
-
this.showPrintPriceStickers = true;
|
|
3581
|
-
this.sendOptions = [
|
|
3582
|
-
{ option: SendOption.Email,
|
|
3583
|
-
iconName: this.icons.EnvelopeRegular,
|
|
3584
|
-
},
|
|
3585
|
-
{ option: SendOption.Print,
|
|
3586
|
-
iconName: this.icons.PrintRegular,
|
|
3587
|
-
},
|
|
3588
|
-
{ option: SendOption.Pdf,
|
|
3589
|
-
iconName: this.icons.FilePdfRegular,
|
|
3590
|
-
},
|
|
3591
|
-
{ option: SendOption.Xml,
|
|
3592
|
-
iconName: this.icons.FilePdfRegular,
|
|
3593
|
-
}
|
|
3594
|
-
];
|
|
3595
|
-
this.activeSendOption = SendOption.Email;
|
|
3596
|
-
this.showStandardPrinterOptions = false;
|
|
3597
|
-
this.showPrinterSelections = false;
|
|
3598
|
-
this.showExitButton = true;
|
|
3599
|
-
this.printTemplates = [];
|
|
3600
|
-
this.printTemplatesField = { text: "name", value: "reportId" };
|
|
3601
|
-
this.emailLayoutField = { text: "name", value: "reportId" };
|
|
3602
|
-
this.priceListDataField = { text: "name", value: "priceListCode" };
|
|
3603
|
-
this.upAndLoaded = false;
|
|
3604
|
-
this.models = [false, false, true];
|
|
3605
|
-
this.showDialog = false;
|
|
3606
|
-
this.emailAdresses = [];
|
|
2211
|
+
this._sharedService = _sharedService;
|
|
2212
|
+
this._sendMethodService = _sendMethodService;
|
|
2213
|
+
this.icons = exports["ɵw"];
|
|
2214
|
+
this.emailLayouts = [];
|
|
3607
2215
|
this.printLayouts = [];
|
|
2216
|
+
this.emailAddresses = [];
|
|
2217
|
+
this.visibleMethods = [];
|
|
3608
2218
|
this.isDocSignEnabled = false;
|
|
3609
2219
|
this.docSign = false;
|
|
2220
|
+
this.reportingDocumentPrintRequestChange = new i0.EventEmitter();
|
|
2221
|
+
this.reportingDocumentEmailRequestChange = new i0.EventEmitter();
|
|
2222
|
+
this.reportingDocumentPdfRequestChange = new i0.EventEmitter();
|
|
3610
2223
|
this.startSignatureClicked = new i0.EventEmitter();
|
|
3611
|
-
this.
|
|
3612
|
-
this.
|
|
3613
|
-
this.
|
|
3614
|
-
this.
|
|
3615
|
-
this.
|
|
3616
|
-
this.
|
|
3617
|
-
this.
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
2224
|
+
this.closeClick = new i0.EventEmitter();
|
|
2225
|
+
this.okClick = new i0.EventEmitter();
|
|
2226
|
+
this.sendMethods = sendMethodsWithIcon;
|
|
2227
|
+
this.upAndLoaded = false;
|
|
2228
|
+
this.startUp = true;
|
|
2229
|
+
this.showFax = true;
|
|
2230
|
+
this.showPrint = true;
|
|
2231
|
+
this.showEmail = true;
|
|
2232
|
+
this.showEdi = true;
|
|
2233
|
+
this.showSms = true;
|
|
2234
|
+
this.showEmailTemplate = true;
|
|
2235
|
+
this.showWebservice = true;
|
|
3622
2236
|
this._subscriptions = [];
|
|
3623
|
-
this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }));
|
|
2237
|
+
this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._sendMethodService.reportingDocumentPrintBaseRequestChanged.subscribe(function (value) { return _this.reportingDocumentPrintRequestChange.next(value); }), this._sendMethodService.reportingDocumentEmailBaseRequestChanged.subscribe(function (value) { return _this.reportingDocumentEmailRequestChange.next(value); }), this._sendMethodService.reportingDocumentPdfBaseRequestChanged.subscribe(function (value) { return _this.reportingDocumentPdfRequestChange.next(value); }));
|
|
3624
2238
|
}
|
|
3625
|
-
Object.defineProperty(SendMethodDialogComponent.prototype, "articleData", {
|
|
3626
|
-
set: function (data) {
|
|
3627
|
-
if (!(this.printLayoutParams instanceof printPriceStickers_bo.PrintPriceStickers)) {
|
|
3628
|
-
this.sendMethodParams.goodId = data.goodId;
|
|
3629
|
-
this.sendMethodParams.warehouse = data.warehouseNo;
|
|
3630
|
-
}
|
|
3631
|
-
},
|
|
3632
|
-
enumerable: false,
|
|
3633
|
-
configurable: true
|
|
3634
|
-
});
|
|
3635
|
-
;
|
|
3636
2239
|
SendMethodDialogComponent.prototype.showClass = function () {
|
|
3637
2240
|
return true;
|
|
3638
2241
|
};
|
|
3639
2242
|
SendMethodDialogComponent.prototype.ngOnInit = function () {
|
|
3640
|
-
this.
|
|
3641
|
-
|
|
2243
|
+
if (this.reportingDocumentEmailRequest) {
|
|
2244
|
+
this._sendMethodService.reportingDocumentEmailBaseRequest = this.reportingDocumentEmailRequest;
|
|
2245
|
+
}
|
|
2246
|
+
if (this.reportingDocumentPrintRequest) {
|
|
2247
|
+
this._sendMethodService.reportingDocumentPrintBaseRequest = this.reportingDocumentPrintRequest;
|
|
2248
|
+
}
|
|
2249
|
+
if (this.reportingDocumentPdfRequest) {
|
|
2250
|
+
this._sendMethodService.reportingDocumentPdfBaseRequest = this.reportingDocumentPdfRequest;
|
|
2251
|
+
}
|
|
2252
|
+
this._selectDefaultSendMethod();
|
|
2253
|
+
this._prepareVisibleMethods();
|
|
3642
2254
|
};
|
|
3643
2255
|
SendMethodDialogComponent.prototype.ngOnDestroy = function () {
|
|
3644
2256
|
this._subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
|
|
3645
2257
|
};
|
|
3646
|
-
SendMethodDialogComponent.prototype.getPrinters = function () {
|
|
3647
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3648
|
-
var _this = this;
|
|
3649
|
-
return __generator(this, function (_a) {
|
|
3650
|
-
return [2 /*return*/, this.stockService.getAllPrinters(true).then(function (list) {
|
|
3651
|
-
_this.printerList = list;
|
|
3652
|
-
})];
|
|
3653
|
-
});
|
|
3654
|
-
});
|
|
3655
|
-
};
|
|
3656
|
-
SendMethodDialogComponent.prototype.closeDialogClick = function () {
|
|
3657
|
-
this.showDialog = false;
|
|
3658
|
-
};
|
|
3659
2258
|
SendMethodDialogComponent.prototype.handleSignatureStart = function () {
|
|
3660
2259
|
this.docSign = !this.docSign;
|
|
3661
2260
|
this.startSignatureClicked.emit();
|
|
3662
2261
|
};
|
|
3663
|
-
SendMethodDialogComponent.prototype.
|
|
3664
|
-
this.
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
if (this.
|
|
3669
|
-
this.
|
|
2262
|
+
SendMethodDialogComponent.prototype.handleSendMethodClick = function (sendMethod) {
|
|
2263
|
+
this.activeSendMethod = sendMethod;
|
|
2264
|
+
if (sendMethod.code === sendMethodType_enum.SendMethodType.Fax && this.showFax) {
|
|
2265
|
+
this.navigationItems.nativeElement.scrollLeft = this.faxItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
2266
|
+
}
|
|
2267
|
+
else if (sendMethod.code === sendMethodType_enum.SendMethodType.Print && this.showPrint) {
|
|
2268
|
+
this.navigationItems.nativeElement.scrollLeft = this.printItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
2269
|
+
}
|
|
2270
|
+
else if (sendMethod.code === sendMethodType_enum.SendMethodType.Email && this.showEmail) {
|
|
2271
|
+
this.navigationItems.nativeElement.scrollLeft = this.emailItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
2272
|
+
}
|
|
2273
|
+
else if (sendMethod.code === sendMethodType_enum.SendMethodType.Edi && this.showEdi) {
|
|
2274
|
+
this.navigationItems.nativeElement.scrollLeft = this.ediItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
2275
|
+
}
|
|
2276
|
+
else if (sendMethod.code === sendMethodType_enum.SendMethodType.EmailTemplate && this.showEmailTemplate) {
|
|
2277
|
+
this.navigationItems.nativeElement.scrollLeft = this.emailTemplateItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
2278
|
+
}
|
|
2279
|
+
else if (sendMethod.code === sendMethodType_enum.SendMethodType.Sms && this.showSms) {
|
|
2280
|
+
this.navigationItems.nativeElement.scrollLeft = this.smsItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
2281
|
+
}
|
|
2282
|
+
else if (sendMethod.code === sendMethodType_enum.SendMethodType.WebService && this.showWebservice) {
|
|
2283
|
+
this.navigationItems.nativeElement.scrollLeft = this.webServiceItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
|
|
3670
2284
|
}
|
|
3671
2285
|
};
|
|
3672
|
-
SendMethodDialogComponent.prototype.
|
|
3673
|
-
this
|
|
3674
|
-
if (
|
|
3675
|
-
this.
|
|
3676
|
-
|
|
2286
|
+
SendMethodDialogComponent.prototype._selectDefaultSendMethod = function () {
|
|
2287
|
+
var _this = this;
|
|
2288
|
+
if (this.defaultSendMethod) {
|
|
2289
|
+
var sendMethod_1 = this.sendMethods.find(function (sm) { return sm.code === _this.defaultSendMethod; });
|
|
2290
|
+
if (sendMethod_1) {
|
|
2291
|
+
setTimeout(function () {
|
|
2292
|
+
_this.handleSendMethodClick(sendMethod_1);
|
|
2293
|
+
_this.startUp = false;
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
3677
2296
|
}
|
|
3678
2297
|
else {
|
|
3679
|
-
this.
|
|
3680
|
-
this.headerTitle = 'Verzendopties';
|
|
2298
|
+
this.startUp = false;
|
|
3681
2299
|
}
|
|
3682
2300
|
};
|
|
3683
|
-
SendMethodDialogComponent.prototype.
|
|
3684
|
-
|
|
3685
|
-
this.
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
this.
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
this.
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3696
|
-
return __generator(this, function (_a) {
|
|
3697
|
-
this.emailLayoutClicked.emit();
|
|
3698
|
-
return [2 /*return*/];
|
|
3699
|
-
});
|
|
3700
|
-
});
|
|
2301
|
+
SendMethodDialogComponent.prototype._prepareVisibleMethods = function () {
|
|
2302
|
+
var _this = this;
|
|
2303
|
+
if (this.visibleMethods && this.visibleMethods.length > 0) {
|
|
2304
|
+
this.sendMethods = this.sendMethods.filter(function (sm) { return _this.visibleMethods.find(function (vm) { return vm === sm.code; }); });
|
|
2305
|
+
}
|
|
2306
|
+
this.showFax = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.Fax; }) !== undefined;
|
|
2307
|
+
this.showPrint = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.Print; }) !== undefined;
|
|
2308
|
+
this.showEmail = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.Email; }) !== undefined;
|
|
2309
|
+
this.showEdi = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.Edi; }) !== undefined;
|
|
2310
|
+
this.showEmailTemplate = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.EmailTemplate; }) !== undefined;
|
|
2311
|
+
this.showSms = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.Sms; }) !== undefined;
|
|
2312
|
+
this.showWebservice = this.sendMethods.find(function (sm) { return sm.code === sendMethodType_enum.SendMethodType.WebService; }) !== undefined;
|
|
3701
2313
|
};
|
|
3702
2314
|
SendMethodDialogComponent.prototype._handleSettingsLoaded = function (loaded) {
|
|
3703
2315
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -3723,7 +2335,7 @@
|
|
|
3723
2335
|
case 0:
|
|
3724
2336
|
// await this._connector.connect(this._optionsService.options);
|
|
3725
2337
|
if (this._optionsService.options.url) {
|
|
3726
|
-
this._dictionary.rootUrl = this._optionsService.options.url.replace(
|
|
2338
|
+
this._dictionary.rootUrl = this._optionsService.options.url.replace('/ajaxservice', '');
|
|
3727
2339
|
}
|
|
3728
2340
|
return [4 /*yield*/, this._dictionary.setDictionary(this._optionsService.options.languageCode)];
|
|
3729
2341
|
case 1:
|
|
@@ -3740,8 +2352,8 @@
|
|
|
3740
2352
|
}());
|
|
3741
2353
|
SendMethodDialogComponent.decorators = [
|
|
3742
2354
|
{ type: i0.Component, args: [{
|
|
3743
|
-
selector:
|
|
3744
|
-
template: "\n <
|
|
2355
|
+
selector: 'co-send-method-dialog',
|
|
2356
|
+
template: "\n <co-dialog id=\"sendOptionsDialog\" [headerTemplate]=\"headerTemplate\" [footerTemplate]=\"footerTemplate\"\n (closeClick)=\"closeClick.emit($event)\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-header-title\" [textContent]=\"headerTitle\"></div>\n </ng-template>\n <div class=\"dialog-content-wrapper\">\n <div class=\"send-methods-wrapper\">\n <div class=\"send-button-wrapper\" *ngFor=\"let sendMethod of sendMethods; let index = index\"\n [class.selected]=\"activeSendMethod ? sendMethod.code === activeSendMethod.code : index === 0\"\n (click)=\"handleSendMethodClick(sendMethod)\">\n <co-icon class=\"custom-button-icon\" [iconData]=\"iconCacheService.getIcon(sendMethod.icon)\"></co-icon>\n <div class=\"custom-button-title\" [textContent]=\"sendMethod.description\"></div>\n </div>\n </div>\n <div #navigationItems class=\"send-method-navigation-wrapper\" [class.smooth-scrolling]=\"!startUp\">\n <div #faxItems class=\"send-method-navigation-content co-small-scrollbar\">\n\n </div>\n <div #printItems class=\"send-method-navigation-content co-small-scrollbar\" *ngIf=\"showPrint\">\n <co-send-method-printer\n [layouts]=\"printLayouts\"\n ></co-send-method-printer>\n </div>\n <div #emailItems class=\"send-method-navigation-content co-small-scrollbar\" *ngIf=\"showEmail\">\n <co-send-method-email\n [emailAddresses]=\"emailAddresses\"\n [layouts]=\"emailLayouts\"\n ></co-send-method-email>\n </div>\n <div #ediItems class=\"send-method-navigation-content co-small-scrollbar\" *ngIf=\"showEdi\">\n\n </div>\n <div #emailTemplateItems class=\"send-method-navigation-content co-small-scrollbar\" *ngIf=\"showEmailTemplate\">\n\n </div>\n <div #smsItems class=\"send-method-navigation-content co-small-scrollbar\" *ngIf=\"showSms\">\n\n </div>\n <div #webServiceItems class=\"send-method-navigation-content co-small-scrollbar\" *ngIf=\"showWebservice\">\n\n </div>\n </div>\n </div>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button [label]=\"'Ok'\" (click)=\"okClick.emit(activeSendMethod ? activeSendMethod.code : '0')\"></co-button>\n </div>\n </ng-template>\n </co-dialog>\n ",
|
|
3745
2357
|
encapsulation: i0.ViewEncapsulation.None,
|
|
3746
2358
|
animations: [
|
|
3747
2359
|
animations.trigger('slideInOut', [
|
|
@@ -3754,41 +2366,313 @@
|
|
|
3754
2366
|
];
|
|
3755
2367
|
SendMethodDialogComponent.ctorParameters = function () { return [
|
|
3756
2368
|
{ type: IconCacheService },
|
|
3757
|
-
{ type: StockService },
|
|
3758
2369
|
{ type: OptionsService },
|
|
3759
2370
|
{ type: DictionaryService },
|
|
3760
|
-
{ type: i0.ChangeDetectorRef }
|
|
2371
|
+
{ type: i0.ChangeDetectorRef },
|
|
2372
|
+
{ type: SharedService },
|
|
2373
|
+
{ type: SendMethodService }
|
|
3761
2374
|
]; };
|
|
3762
2375
|
SendMethodDialogComponent.propDecorators = {
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
emailAdresses: [{ type: i0.Input }],
|
|
2376
|
+
navigationItems: [{ type: i0.ViewChild, args: ['navigationItems', { read: i0.ElementRef },] }],
|
|
2377
|
+
faxItems: [{ type: i0.ViewChild, args: ['faxItems', { read: i0.ElementRef },] }],
|
|
2378
|
+
printItems: [{ type: i0.ViewChild, args: ['printItems', { read: i0.ElementRef },] }],
|
|
2379
|
+
emailItems: [{ type: i0.ViewChild, args: ['emailItems', { read: i0.ElementRef },] }],
|
|
2380
|
+
ediItems: [{ type: i0.ViewChild, args: ['ediItems', { read: i0.ElementRef },] }],
|
|
2381
|
+
emailTemplateItems: [{ type: i0.ViewChild, args: ['emailTemplateItems', { read: i0.ElementRef },] }],
|
|
2382
|
+
smsItems: [{ type: i0.ViewChild, args: ['smsItems', { read: i0.ElementRef },] }],
|
|
2383
|
+
webServiceItems: [{ type: i0.ViewChild, args: ['webServiceItems', { read: i0.ElementRef },] }],
|
|
2384
|
+
reportingDocumentPrintRequest: [{ type: i0.Input }],
|
|
2385
|
+
reportingDocumentEmailRequest: [{ type: i0.Input }],
|
|
2386
|
+
reportingDocumentPdfRequest: [{ type: i0.Input }],
|
|
3775
2387
|
emailLayouts: [{ type: i0.Input }],
|
|
3776
2388
|
printLayouts: [{ type: i0.Input }],
|
|
2389
|
+
headerTitle: [{ type: i0.Input }],
|
|
2390
|
+
emailAddresses: [{ type: i0.Input }],
|
|
3777
2391
|
defaultSendMethod: [{ type: i0.Input }],
|
|
3778
|
-
|
|
2392
|
+
visibleMethods: [{ type: i0.Input }],
|
|
3779
2393
|
isDocSignEnabled: [{ type: i0.Input }],
|
|
3780
2394
|
docSign: [{ type: i0.Input }],
|
|
3781
|
-
|
|
2395
|
+
reportingDocumentPrintRequestChange: [{ type: i0.Output }],
|
|
2396
|
+
reportingDocumentEmailRequestChange: [{ type: i0.Output }],
|
|
2397
|
+
reportingDocumentPdfRequestChange: [{ type: i0.Output }],
|
|
3782
2398
|
startSignatureClicked: [{ type: i0.Output }],
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
2399
|
+
closeClick: [{ type: i0.Output }],
|
|
2400
|
+
okClick: [{ type: i0.Output }],
|
|
2401
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-send-method-dialog',] }]
|
|
2402
|
+
};
|
|
2403
|
+
|
|
2404
|
+
var EmailAddressViewmodel = /** @class */ (function () {
|
|
2405
|
+
function EmailAddressViewmodel(checked, emailAddress) {
|
|
2406
|
+
this.checked = checked;
|
|
2407
|
+
this.emailAddress = emailAddress;
|
|
2408
|
+
}
|
|
2409
|
+
return EmailAddressViewmodel;
|
|
2410
|
+
}());
|
|
2411
|
+
|
|
2412
|
+
var SendMethodEmailComponent = /** @class */ (function () {
|
|
2413
|
+
function SendMethodEmailComponent(sendMethodService) {
|
|
2414
|
+
this.sendMethodService = sendMethodService;
|
|
2415
|
+
this.emailAddresses = [];
|
|
2416
|
+
this.layouts = [];
|
|
2417
|
+
this.emailAddressViewmodels = [];
|
|
2418
|
+
}
|
|
2419
|
+
SendMethodEmailComponent.prototype.showClass = function () {
|
|
2420
|
+
return true;
|
|
2421
|
+
};
|
|
2422
|
+
SendMethodEmailComponent.prototype.ngOnInit = function () {
|
|
2423
|
+
var _this = this;
|
|
2424
|
+
if (this.emailAddresses) {
|
|
2425
|
+
this.emailAddresses.forEach(function (ea) {
|
|
2426
|
+
var emailAddressViewmodel = new EmailAddressViewmodel(_this.sendMethodService.selectedEmailAddresses.indexOf(ea) > -1, ea);
|
|
2427
|
+
_this.emailAddressViewmodels.push(emailAddressViewmodel);
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2431
|
+
SendMethodEmailComponent.prototype.handleCheckedEmail = function (emailAddressViewmodel) {
|
|
2432
|
+
var wantedValue = !emailAddressViewmodel.checked;
|
|
2433
|
+
if (!wantedValue) {
|
|
2434
|
+
this.sendMethodService.removeEmailAddress(emailAddressViewmodel.emailAddress);
|
|
2435
|
+
}
|
|
2436
|
+
else {
|
|
2437
|
+
this.sendMethodService.addEmailAddress(emailAddressViewmodel.emailAddress);
|
|
2438
|
+
}
|
|
2439
|
+
emailAddressViewmodel.checked = wantedValue;
|
|
2440
|
+
};
|
|
2441
|
+
return SendMethodEmailComponent;
|
|
2442
|
+
}());
|
|
2443
|
+
SendMethodEmailComponent.decorators = [
|
|
2444
|
+
{ type: i0.Component, args: [{
|
|
2445
|
+
selector: 'co-send-method-email',
|
|
2446
|
+
template: "\n <div class=\"email-addresses-wrapper co-small-scrollbar\">\n <div class=\"email-address-wrapper\" *ngFor=\"let emailAddressViewmodel of emailAddressViewmodels\" (click)=\"handleCheckedEmail(emailAddressViewmodel)\">\n <co-input-checkbox [model]=\"emailAddressViewmodel.checked\" (modelChange)=\"handleCheckedEmail(emailAddressViewmodel)\"></co-input-checkbox>\n <div class=\"email-address\" [textContent]=\"emailAddressViewmodel.emailAddress\"></div>\n </div>\n </div>\n <co-layout-selection\n [(request)]=\"sendMethodService.reportingDocumentEmailBaseRequest\"\n [layouts]=\"layouts\"\n ></co-layout-selection>\n ",
|
|
2447
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2448
|
+
},] }
|
|
2449
|
+
];
|
|
2450
|
+
SendMethodEmailComponent.ctorParameters = function () { return [
|
|
2451
|
+
{ type: SendMethodService }
|
|
2452
|
+
]; };
|
|
2453
|
+
SendMethodEmailComponent.propDecorators = {
|
|
2454
|
+
emailAddresses: [{ type: i0.Input }],
|
|
2455
|
+
layouts: [{ type: i0.Input }],
|
|
2456
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-send-method-email',] }]
|
|
2457
|
+
};
|
|
2458
|
+
|
|
2459
|
+
var LayoutSelectionComponent = /** @class */ (function () {
|
|
2460
|
+
function LayoutSelectionComponent() {
|
|
2461
|
+
this.layouts = [];
|
|
2462
|
+
this.requestChange = new i0.EventEmitter();
|
|
2463
|
+
this.showLayoutList = false;
|
|
2464
|
+
}
|
|
2465
|
+
LayoutSelectionComponent.prototype.showClass = function () {
|
|
2466
|
+
return true;
|
|
2467
|
+
};
|
|
2468
|
+
LayoutSelectionComponent.prototype.ngOnInit = function () {
|
|
2469
|
+
var _this = this;
|
|
2470
|
+
if (this.layouts && this.layouts.length > 0) {
|
|
2471
|
+
this.currentLayout = this.layouts.find(function (l) { return l.reportId === _this.request.reportId; });
|
|
2472
|
+
}
|
|
2473
|
+
};
|
|
2474
|
+
LayoutSelectionComponent.prototype.handleSelectLayout = function (reportLayout) {
|
|
2475
|
+
this.currentLayout = reportLayout;
|
|
2476
|
+
this.request.reportId = this.currentLayout.reportId;
|
|
2477
|
+
this.requestChange.emit(this.request);
|
|
2478
|
+
this.showLayoutList = false;
|
|
2479
|
+
};
|
|
2480
|
+
return LayoutSelectionComponent;
|
|
2481
|
+
}());
|
|
2482
|
+
LayoutSelectionComponent.decorators = [
|
|
2483
|
+
{ type: i0.Component, args: [{
|
|
2484
|
+
selector: 'co-layout-selection',
|
|
2485
|
+
template: "\n <div class=\"layout-selection-wrapper\" (click)=\"showLayoutList = !showLayoutList\">\n <div class=\"title\" [textContent]=\"'Lay-out'\"></div>\n <div class=\"layout-description\" [textContent]=\"currentLayout?.description || 'Layout kiezen'\"></div>\n </div>\n <div class=\"layouts-wrapper co-small-scrollbar\" *ngIf=\"showLayoutList\" @showHideLayouts>\n <div class=\"layout-selection-wrapper\" *ngFor=\"let reportLayout of layouts\"\n [class.selected]=\"reportLayout.reportId === currentLayout?.reportId\"\n (click)=\"handleSelectLayout(reportLayout)\">\n <div class=\"layout-description\" [textContent]=\"reportLayout.description\"></div>\n </div>\n </div>\n ",
|
|
2486
|
+
animations: [
|
|
2487
|
+
animations.trigger("showHideLayouts", [
|
|
2488
|
+
animations.state("void", animations.style({ height: 0 })),
|
|
2489
|
+
animations.state("*", animations.style({ height: "50%" })),
|
|
2490
|
+
animations.transition("void => *", animations.animate("200ms ease-in-out")),
|
|
2491
|
+
animations.transition("* => void", animations.animate("200ms ease-out"))
|
|
2492
|
+
])
|
|
2493
|
+
],
|
|
2494
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2495
|
+
},] }
|
|
2496
|
+
];
|
|
2497
|
+
LayoutSelectionComponent.propDecorators = {
|
|
2498
|
+
request: [{ type: i0.Input }],
|
|
2499
|
+
layouts: [{ type: i0.Input }],
|
|
2500
|
+
requestChange: [{ type: i0.Output }],
|
|
2501
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-layout-selection',] }]
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2504
|
+
var LayoutSelectionModule = /** @class */ (function () {
|
|
2505
|
+
function LayoutSelectionModule() {
|
|
2506
|
+
}
|
|
2507
|
+
return LayoutSelectionModule;
|
|
2508
|
+
}());
|
|
2509
|
+
LayoutSelectionModule.decorators = [
|
|
2510
|
+
{ type: i0.NgModule, args: [{
|
|
2511
|
+
imports: [
|
|
2512
|
+
common.CommonModule
|
|
2513
|
+
],
|
|
2514
|
+
declarations: [
|
|
2515
|
+
LayoutSelectionComponent
|
|
2516
|
+
],
|
|
2517
|
+
exports: [
|
|
2518
|
+
LayoutSelectionComponent
|
|
2519
|
+
]
|
|
2520
|
+
},] }
|
|
2521
|
+
];
|
|
2522
|
+
|
|
2523
|
+
var SendMethodEmailModule = /** @class */ (function () {
|
|
2524
|
+
function SendMethodEmailModule() {
|
|
2525
|
+
}
|
|
2526
|
+
return SendMethodEmailModule;
|
|
2527
|
+
}());
|
|
2528
|
+
SendMethodEmailModule.decorators = [
|
|
2529
|
+
{ type: i0.NgModule, args: [{
|
|
2530
|
+
imports: [
|
|
2531
|
+
common.CommonModule,
|
|
2532
|
+
corecomponents_v12.InputCheckboxModule,
|
|
2533
|
+
LayoutSelectionModule
|
|
2534
|
+
],
|
|
2535
|
+
declarations: [
|
|
2536
|
+
SendMethodEmailComponent
|
|
2537
|
+
],
|
|
2538
|
+
exports: [
|
|
2539
|
+
SendMethodEmailComponent
|
|
2540
|
+
]
|
|
2541
|
+
},] }
|
|
2542
|
+
];
|
|
2543
|
+
|
|
2544
|
+
var SendMethodPrinterComponent = /** @class */ (function () {
|
|
2545
|
+
function SendMethodPrinterComponent(sendMethodService) {
|
|
2546
|
+
this.sendMethodService = sendMethodService;
|
|
2547
|
+
this.layouts = [];
|
|
2548
|
+
}
|
|
2549
|
+
SendMethodPrinterComponent.prototype.showClass = function () {
|
|
2550
|
+
return true;
|
|
2551
|
+
};
|
|
2552
|
+
SendMethodPrinterComponent.prototype.handleDefaultPrinterUserChange = function (checked) {
|
|
2553
|
+
this.sendMethodService.reportingDocumentPrintBaseRequest.saveDefaultPrinterForUser = checked;
|
|
2554
|
+
this.sendMethodService.reportingDocumentPrintBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintBaseRequest);
|
|
2555
|
+
};
|
|
2556
|
+
SendMethodPrinterComponent.prototype.handleDefaultPrinterAllUsersChange = function (checked) {
|
|
2557
|
+
this.sendMethodService.reportingDocumentPrintBaseRequest.saveDefaultPrinterForAllUsers = checked;
|
|
2558
|
+
this.sendMethodService.reportingDocumentPrintBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintBaseRequest);
|
|
2559
|
+
};
|
|
2560
|
+
return SendMethodPrinterComponent;
|
|
2561
|
+
}());
|
|
2562
|
+
SendMethodPrinterComponent.decorators = [
|
|
2563
|
+
{ type: i0.Component, args: [{
|
|
2564
|
+
selector: 'co-send-method-printer',
|
|
2565
|
+
template: "\n <co-printer-selection></co-printer-selection>\n <co-layout-selection\n [(request)]=\"sendMethodService.reportingDocumentPrintBaseRequest\"\n [layouts]=\"layouts\"\n ></co-layout-selection>\n <co-input-checkbox\n [model]=\"sendMethodService.reportingDocumentPrintBaseRequest.saveDefaultPrinterForUser\"\n [label]=\"'Koppeling onthouden'\"\n (modelChange)=\"handleDefaultPrinterUserChange($event)\"\n ></co-input-checkbox>\n <co-input-checkbox\n [model]=\"sendMethodService.reportingDocumentPrintBaseRequest.saveDefaultPrinterForAllUsers\"\n [label]=\"'Alle gebruikers'\"\n (modelChange)=\"handleDefaultPrinterAllUsersChange($event)\"\n ></co-input-checkbox>\n ",
|
|
2566
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2567
|
+
},] }
|
|
2568
|
+
];
|
|
2569
|
+
SendMethodPrinterComponent.ctorParameters = function () { return [
|
|
2570
|
+
{ type: SendMethodService }
|
|
2571
|
+
]; };
|
|
2572
|
+
SendMethodPrinterComponent.propDecorators = {
|
|
2573
|
+
layouts: [{ type: i0.Input }],
|
|
2574
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-send-method-printer',] }]
|
|
2575
|
+
};
|
|
2576
|
+
|
|
2577
|
+
var PrinterSelectionComponent = /** @class */ (function () {
|
|
2578
|
+
function PrinterSelectionComponent(sendMethodService, iconService, _service) {
|
|
2579
|
+
this.sendMethodService = sendMethodService;
|
|
2580
|
+
this.iconService = iconService;
|
|
2581
|
+
this._service = _service;
|
|
2582
|
+
this.icons = exports["ɵw"];
|
|
2583
|
+
this.printers = [];
|
|
2584
|
+
this.showPrinterList = false;
|
|
2585
|
+
}
|
|
2586
|
+
PrinterSelectionComponent.prototype.showClass = function () {
|
|
2587
|
+
return true;
|
|
2588
|
+
};
|
|
2589
|
+
PrinterSelectionComponent.prototype.ngOnInit = function () {
|
|
2590
|
+
var _this = this;
|
|
2591
|
+
this._service.getAllPrinters().then(function (printers) {
|
|
2592
|
+
_this.printers = printers;
|
|
2593
|
+
if (!_this.sendMethodService.reportingDocumentPrintBaseRequest.printerName) {
|
|
2594
|
+
var defaultPrinter = _this.printers.find(function (p) { return p.isDefault; });
|
|
2595
|
+
if (defaultPrinter) {
|
|
2596
|
+
_this.sendMethodService.reportingDocumentPrintBaseRequest.printerName = defaultPrinter.name;
|
|
2597
|
+
_this.sendMethodService.reportingDocumentPrintBaseRequestChanged.next(_this.sendMethodService.reportingDocumentPrintBaseRequest);
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
});
|
|
2601
|
+
};
|
|
2602
|
+
PrinterSelectionComponent.prototype.handlePrinterClicked = function (printer) {
|
|
2603
|
+
this.sendMethodService.reportingDocumentPrintBaseRequest.printerName = printer.name;
|
|
2604
|
+
this.sendMethodService.reportingDocumentPrintBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintBaseRequest);
|
|
2605
|
+
this.showPrinterList = false;
|
|
2606
|
+
};
|
|
2607
|
+
return PrinterSelectionComponent;
|
|
2608
|
+
}());
|
|
2609
|
+
PrinterSelectionComponent.decorators = [
|
|
2610
|
+
{ type: i0.Component, args: [{
|
|
2611
|
+
selector: 'co-printer-selection',
|
|
2612
|
+
template: "\n <div class=\"printer-selection-wrapper\" (click)=\"showPrinterList = !showPrinterList\">\n <div class=\"title\" [textContent]=\"'Printer'\"></div>\n <div class=\"printer-name\" [textContent]=\"sendMethodService.reportingDocumentPrintBaseRequest.printerName || 'Printer kiezen'\"></div>\n </div>\n <div class=\"layouts-wrapper co-small-scrollbar\" *ngIf=\"showPrinterList\" @showHideLayouts>\n <div class=\"printer-list-item\" *ngFor=\"let printer of printers\"\n [class.selected]=\"sendMethodService.reportingDocumentPrintBaseRequest.printerName === printer.name\"\n (click)=\"handlePrinterClicked(printer)\">\n <co-icon class=\"printer-icon\" [iconData]=\"iconService.getIcon(icons.PrintRegular)\"></co-icon>\n <div class=\"printer-details\">\n <span class=\"printer-name\" [textContent]=\"printer.name\"></span>\n <span class=\"printer-status\" [textContent]=\"printer.acceptingJobs\"></span>\n </div>\n </div>\n </div>\n ",
|
|
2613
|
+
animations: [
|
|
2614
|
+
animations.trigger('showHideLayouts', [
|
|
2615
|
+
animations.state('void', animations.style({ height: 0 })),
|
|
2616
|
+
animations.state('*', animations.style({ height: '50%' })),
|
|
2617
|
+
animations.transition('void => *', animations.animate('200ms ease-in-out')),
|
|
2618
|
+
animations.transition('* => void', animations.animate('200ms ease-out'))
|
|
2619
|
+
])
|
|
2620
|
+
],
|
|
2621
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2622
|
+
},] }
|
|
2623
|
+
];
|
|
2624
|
+
PrinterSelectionComponent.ctorParameters = function () { return [
|
|
2625
|
+
{ type: SendMethodService },
|
|
2626
|
+
{ type: IconCacheService },
|
|
2627
|
+
{ type: SharedService }
|
|
2628
|
+
]; };
|
|
2629
|
+
PrinterSelectionComponent.propDecorators = {
|
|
2630
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-printer-selection',] }]
|
|
3790
2631
|
};
|
|
3791
2632
|
|
|
2633
|
+
var PrinterSelectionModule = /** @class */ (function () {
|
|
2634
|
+
function PrinterSelectionModule() {
|
|
2635
|
+
}
|
|
2636
|
+
return PrinterSelectionModule;
|
|
2637
|
+
}());
|
|
2638
|
+
PrinterSelectionModule.decorators = [
|
|
2639
|
+
{ type: i0.NgModule, args: [{
|
|
2640
|
+
imports: [
|
|
2641
|
+
common.CommonModule,
|
|
2642
|
+
corecomponents_v12.IconModule
|
|
2643
|
+
],
|
|
2644
|
+
declarations: [
|
|
2645
|
+
PrinterSelectionComponent
|
|
2646
|
+
],
|
|
2647
|
+
exports: [
|
|
2648
|
+
PrinterSelectionComponent
|
|
2649
|
+
]
|
|
2650
|
+
},] }
|
|
2651
|
+
];
|
|
2652
|
+
|
|
2653
|
+
var SendMethodPrinterModule = /** @class */ (function () {
|
|
2654
|
+
function SendMethodPrinterModule() {
|
|
2655
|
+
}
|
|
2656
|
+
return SendMethodPrinterModule;
|
|
2657
|
+
}());
|
|
2658
|
+
SendMethodPrinterModule.decorators = [
|
|
2659
|
+
{ type: i0.NgModule, args: [{
|
|
2660
|
+
imports: [
|
|
2661
|
+
common.CommonModule,
|
|
2662
|
+
corecomponents_v12.IconModule,
|
|
2663
|
+
LayoutSelectionModule,
|
|
2664
|
+
PrinterSelectionModule,
|
|
2665
|
+
corecomponents_v12.InputCheckboxModule
|
|
2666
|
+
],
|
|
2667
|
+
declarations: [
|
|
2668
|
+
SendMethodPrinterComponent
|
|
2669
|
+
],
|
|
2670
|
+
exports: [
|
|
2671
|
+
SendMethodPrinterComponent
|
|
2672
|
+
]
|
|
2673
|
+
},] }
|
|
2674
|
+
];
|
|
2675
|
+
|
|
3792
2676
|
var SendMethodDialogModule = /** @class */ (function () {
|
|
3793
2677
|
function SendMethodDialogModule() {
|
|
3794
2678
|
}
|
|
@@ -3801,20 +2685,17 @@
|
|
|
3801
2685
|
],
|
|
3802
2686
|
imports: [
|
|
3803
2687
|
common.CommonModule,
|
|
3804
|
-
corecomponents_v12.
|
|
3805
|
-
corecomponents_v12.InputCheckboxModule,
|
|
3806
|
-
corecomponents_v12.InputComboBoxModule,
|
|
2688
|
+
corecomponents_v12.CoDialogModule,
|
|
3807
2689
|
corecomponents_v12.IconModule,
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
corecomponents_v12.ButtonModule
|
|
3811
|
-
DocsignModule,
|
|
3812
|
-
corecomponents_v12.CoDialogModule
|
|
2690
|
+
SendMethodEmailModule,
|
|
2691
|
+
SendMethodPrinterModule,
|
|
2692
|
+
corecomponents_v12.ButtonModule
|
|
3813
2693
|
],
|
|
3814
2694
|
exports: [
|
|
3815
2695
|
SendMethodDialogComponent
|
|
3816
2696
|
],
|
|
3817
2697
|
providers: [
|
|
2698
|
+
SendMethodService,
|
|
3818
2699
|
StockService
|
|
3819
2700
|
]
|
|
3820
2701
|
},] }
|
|
@@ -3949,7 +2830,7 @@
|
|
|
3949
2830
|
var KeyPadComponent = /** @class */ (function () {
|
|
3950
2831
|
function KeyPadComponent(iconCacheService) {
|
|
3951
2832
|
this.iconCacheService = iconCacheService;
|
|
3952
|
-
this.icons =
|
|
2833
|
+
this.icons = exports["ɵw"];
|
|
3953
2834
|
this.showValue = true;
|
|
3954
2835
|
this.emitModelChangeOnEnter = true;
|
|
3955
2836
|
this.modelChange = new i0.EventEmitter();
|
|
@@ -4140,7 +3021,7 @@
|
|
|
4140
3021
|
var LayoutSwitcherComponent = /** @class */ (function () {
|
|
4141
3022
|
function LayoutSwitcherComponent(iconCacheService) {
|
|
4142
3023
|
this.iconCacheService = iconCacheService;
|
|
4143
|
-
this.icon =
|
|
3024
|
+
this.icon = exports["ɵw"];
|
|
4144
3025
|
this.layoutItems = [];
|
|
4145
3026
|
this.layoutSwitchEmit = new i0.EventEmitter();
|
|
4146
3027
|
this.showMaskSidebar = false;
|
|
@@ -4168,7 +3049,7 @@
|
|
|
4168
3049
|
}());
|
|
4169
3050
|
LayoutSwitcherComponent.decorators = [
|
|
4170
3051
|
{ type: i0.Component, args: [{
|
|
4171
|
-
selector: "layout-switcher",
|
|
3052
|
+
selector: "co-layout-switcher",
|
|
4172
3053
|
template: "\n <div class=\"mask-wrapper\" [class.mask-wrapper-active]='showMaskSidebar' @showHideSidebar>\n <div class=\"icon-wrapper\" (click)=\"toggleMaskSidebar()\">\n <co-icon class=\"icon-mask\" [iconData]=\"iconCacheService.getIcon(icon.BringForwardRegular)\" [@positionIcon]=\"showMaskSidebar\"></co-icon>\n\n <co-icon class='icon-mask-sidebar-handle' [@positionHandle]='showMaskSidebar' [iconData]=\"showMaskSidebar ? iconCacheService.getIcon(this.icon.AngleLeftSolid) : iconCacheService.getIcon(this.icon.AngleRightSolid)\"></co-icon>\n </div>\n\n <div class=\"mask-content\" *ngIf=\"showMaskSidebar\" @showHideSidebar>\n <span *ngFor='let item of this.layoutItems' [class.active]=\"this.activeIndex === this.layoutItems.indexOf(item)\" [textContent]=\"item\" (click)='activeIndex = this.layoutItems.indexOf(item)' ></span>\n </div>\n </div>\n\n ",
|
|
4173
3054
|
animations: [
|
|
4174
3055
|
animations.trigger("showHideSidebar", [
|
|
@@ -4194,7 +3075,7 @@
|
|
|
4194
3075
|
{ type: IconCacheService }
|
|
4195
3076
|
]; };
|
|
4196
3077
|
LayoutSwitcherComponent.propDecorators = {
|
|
4197
|
-
showClass: [{ type: i0.HostBinding, args: ['class.layout-switcher',] }],
|
|
3078
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-layout-switcher',] }],
|
|
4198
3079
|
layoutItems: [{ type: i0.Input }],
|
|
4199
3080
|
layoutSwitchEmit: [{ type: i0.Output }]
|
|
4200
3081
|
};
|
|
@@ -4219,15 +3100,19 @@
|
|
|
4219
3100
|
},] }
|
|
4220
3101
|
];
|
|
4221
3102
|
|
|
4222
|
-
var GaugeColor
|
|
3103
|
+
var GaugeColor;
|
|
4223
3104
|
(function (GaugeColor) {
|
|
4224
|
-
GaugeColor["
|
|
4225
|
-
GaugeColor["
|
|
4226
|
-
GaugeColor["
|
|
4227
|
-
|
|
3105
|
+
GaugeColor["Lowest"] = "#E0E0E0";
|
|
3106
|
+
GaugeColor["Low"] = "#fff7b8";
|
|
3107
|
+
GaugeColor["MediumLow"] = "#ffe367";
|
|
3108
|
+
GaugeColor["MediumHigh"] = "#ffc15b";
|
|
3109
|
+
GaugeColor["High"] = "#F88952";
|
|
3110
|
+
GaugeColor["Highest"] = "#5FDCB3";
|
|
3111
|
+
})(GaugeColor || (GaugeColor = {}));
|
|
3112
|
+
|
|
4228
3113
|
var CoCircularGaugeComponent = /** @class */ (function () {
|
|
4229
3114
|
function CoCircularGaugeComponent() {
|
|
4230
|
-
this._color = GaugeColor
|
|
3115
|
+
this._color = GaugeColor.Low;
|
|
4231
3116
|
this.majorTicks = {
|
|
4232
3117
|
height: 0,
|
|
4233
3118
|
};
|
|
@@ -4308,25 +3193,33 @@
|
|
|
4308
3193
|
};
|
|
4309
3194
|
;
|
|
4310
3195
|
CoCircularGaugeComponent.prototype.getAnnotations = function () {
|
|
4311
|
-
if (this.value) {
|
|
3196
|
+
if (this.value !== undefined) {
|
|
3197
|
+
var label = this.value ? this.value + "%" : "0%";
|
|
4312
3198
|
return [{
|
|
4313
|
-
content: '<div class="annotation">' +
|
|
4314
|
-
|
|
4315
|
-
angle: 90,
|
|
4316
|
-
radius: '50%',
|
|
3199
|
+
content: '<div class="annotation" style="width:20px;height:20px;">' +
|
|
3200
|
+
'<div class="annotation-label">' + label + '</div></div>',
|
|
4317
3201
|
zIndex: '10',
|
|
4318
3202
|
}];
|
|
4319
3203
|
}
|
|
4320
3204
|
};
|
|
4321
3205
|
CoCircularGaugeComponent.prototype._setColor = function () {
|
|
4322
3206
|
if (this.value == 0) {
|
|
4323
|
-
this._color = GaugeColor
|
|
3207
|
+
this._color = GaugeColor.Lowest;
|
|
3208
|
+
}
|
|
3209
|
+
else if (this.value >= 1 && this.value < 25) {
|
|
3210
|
+
this._color = GaugeColor.Low;
|
|
3211
|
+
}
|
|
3212
|
+
else if (this.value >= 25 && this.value < 50) {
|
|
3213
|
+
this._color = GaugeColor.MediumLow;
|
|
3214
|
+
}
|
|
3215
|
+
else if (this.value >= 50 && this.value < 75) {
|
|
3216
|
+
this._color = GaugeColor.MediumHigh;
|
|
4324
3217
|
}
|
|
4325
|
-
else if (this.value >=
|
|
4326
|
-
this._color = GaugeColor
|
|
3218
|
+
else if (this.value >= 75 && this.value < 100) {
|
|
3219
|
+
this._color = GaugeColor.High;
|
|
4327
3220
|
}
|
|
4328
3221
|
else if (this.value == 100) {
|
|
4329
|
-
this._color = GaugeColor
|
|
3222
|
+
this._color = GaugeColor.Highest;
|
|
4330
3223
|
}
|
|
4331
3224
|
};
|
|
4332
3225
|
return CoCircularGaugeComponent;
|
|
@@ -4364,12 +3257,6 @@
|
|
|
4364
3257
|
},] }
|
|
4365
3258
|
];
|
|
4366
3259
|
|
|
4367
|
-
var GaugeColor;
|
|
4368
|
-
(function (GaugeColor) {
|
|
4369
|
-
GaugeColor["Low"] = "#E0E0E0";
|
|
4370
|
-
GaugeColor["Medium"] = "#F88952";
|
|
4371
|
-
GaugeColor["High"] = "#5FDCB3";
|
|
4372
|
-
})(GaugeColor || (GaugeColor = {}));
|
|
4373
3260
|
var CoLinearGaugeComponent = /** @class */ (function () {
|
|
4374
3261
|
function CoLinearGaugeComponent() {
|
|
4375
3262
|
this.color = GaugeColor.Low;
|
|
@@ -4393,14 +3280,23 @@
|
|
|
4393
3280
|
};
|
|
4394
3281
|
CoLinearGaugeComponent.prototype._setColor = function () {
|
|
4395
3282
|
if (this.value == 0) {
|
|
3283
|
+
this.color = GaugeColor.Lowest;
|
|
3284
|
+
}
|
|
3285
|
+
else if (this.value >= 1 && this.value < 25) {
|
|
4396
3286
|
this.color = GaugeColor.Low;
|
|
4397
3287
|
}
|
|
4398
|
-
else if (this.value >=
|
|
4399
|
-
this.color = GaugeColor.
|
|
3288
|
+
else if (this.value >= 25 && this.value < 50) {
|
|
3289
|
+
this.color = GaugeColor.MediumLow;
|
|
4400
3290
|
}
|
|
4401
|
-
else if (this.value
|
|
3291
|
+
else if (this.value >= 50 && this.value < 75) {
|
|
3292
|
+
this.color = GaugeColor.MediumHigh;
|
|
3293
|
+
}
|
|
3294
|
+
else if (this.value >= 75 && this.value < 100) {
|
|
4402
3295
|
this.color = GaugeColor.High;
|
|
4403
3296
|
}
|
|
3297
|
+
else if (this.value == 100) {
|
|
3298
|
+
this.color = GaugeColor.Highest;
|
|
3299
|
+
}
|
|
4404
3300
|
};
|
|
4405
3301
|
return CoLinearGaugeComponent;
|
|
4406
3302
|
}());
|
|
@@ -4448,6 +3344,7 @@
|
|
|
4448
3344
|
},
|
|
4449
3345
|
set: function (value) {
|
|
4450
3346
|
this._statusbarData = value;
|
|
3347
|
+
this.adjustTooHighPercentages();
|
|
4451
3348
|
},
|
|
4452
3349
|
enumerable: false,
|
|
4453
3350
|
configurable: true
|
|
@@ -4455,17 +3352,13 @@
|
|
|
4455
3352
|
StatusbarComponent.prototype.showClass = function () {
|
|
4456
3353
|
return true;
|
|
4457
3354
|
};
|
|
4458
|
-
StatusbarComponent.prototype.
|
|
4459
|
-
this.showPopup =
|
|
4460
|
-
this.
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
this.showPopup = false;
|
|
4466
|
-
};
|
|
4467
|
-
StatusbarComponent.prototype.onStatusbarClick = function () {
|
|
4468
|
-
this.statusbarClick.emit();
|
|
3355
|
+
StatusbarComponent.prototype.onStatusbarClick = function (event) {
|
|
3356
|
+
this.showPopup = !this.showPopup;
|
|
3357
|
+
if (this.showPopup) {
|
|
3358
|
+
this._mouseY = event.screenY;
|
|
3359
|
+
this._windowHeight = window.innerHeight;
|
|
3360
|
+
this.setPopupClass();
|
|
3361
|
+
}
|
|
4469
3362
|
};
|
|
4470
3363
|
StatusbarComponent.prototype.setPopupClass = function () {
|
|
4471
3364
|
var popupHeight = this.statusbarData.length * 30;
|
|
@@ -4477,12 +3370,15 @@
|
|
|
4477
3370
|
this.popupClass = 'dropup';
|
|
4478
3371
|
}
|
|
4479
3372
|
};
|
|
3373
|
+
StatusbarComponent.prototype.adjustTooHighPercentages = function () {
|
|
3374
|
+
this._statusbarData.forEach(function (data) { return data.percentage > 100 ? data.percentage = 100 : false; });
|
|
3375
|
+
};
|
|
4480
3376
|
return StatusbarComponent;
|
|
4481
3377
|
}());
|
|
4482
3378
|
StatusbarComponent.decorators = [
|
|
4483
3379
|
{ type: i0.Component, args: [{
|
|
4484
3380
|
selector: "co-statusbar",
|
|
4485
|
-
template: "\n <div class=\"co-statusbar-wrapper\"\n *ngIf=\"statusbarData\"\n (
|
|
3381
|
+
template: "\n <div class=\"co-statusbar-wrapper\"\n *ngIf=\"statusbarData\"\n (click)=\"onStatusbarClick($event)\">\n <div class=\"statuses\">\n <div *ngFor=\"let data of statusbarData; let index = index\" class=\"status\">\n <co-linear-gauge [class.focused-status]=\"focusedStatusIndex !== undefined && focusedStatusIndex === index\"\n [value]=\"data.percentage\" [count]=\"data.count ? data.count : undefined\"></co-linear-gauge>\n </div>\n </div>\n <div class=status-description-popup *ngIf=\"showPopup\" @showHidePopup [ngClass]=\"popupClass\" clickOutside (clickOutside)=\"showPopup=false\">\n <div class=\"status-descriptions\">\n <div *ngFor=\"let data of statusbarData; let index = index\" class=\"status-description\">\n <co-circular-gauge [value]=\"data.percentage\"></co-circular-gauge>\n <span [textContent]=\"data.label\"></span>\n </div>\n </div>\n </div>\n </div>\n ",
|
|
4486
3382
|
animations: [
|
|
4487
3383
|
animations.trigger("showHidePopup", [
|
|
4488
3384
|
animations.state("void", animations.style({ opacity: 0 })),
|
|
@@ -4511,7 +3407,8 @@
|
|
|
4511
3407
|
imports: [
|
|
4512
3408
|
common.CommonModule,
|
|
4513
3409
|
CoCircularGaugeModule,
|
|
4514
|
-
CoLinearGaugeModule
|
|
3410
|
+
CoLinearGaugeModule,
|
|
3411
|
+
corecomponents_v12.ClickoutsideModule
|
|
4515
3412
|
],
|
|
4516
3413
|
declarations: [
|
|
4517
3414
|
StatusbarComponent
|
|
@@ -4535,6 +3432,7 @@
|
|
|
4535
3432
|
this.rangeChange = new i0.EventEmitter();
|
|
4536
3433
|
this.viewChange = new i0.EventEmitter();
|
|
4537
3434
|
this.buttonClick = new i0.EventEmitter();
|
|
3435
|
+
this.showClass = true;
|
|
4538
3436
|
this.days = [];
|
|
4539
3437
|
this._selectedDate = new Date();
|
|
4540
3438
|
}
|
|
@@ -4567,7 +3465,7 @@
|
|
|
4567
3465
|
}());
|
|
4568
3466
|
DatePlanningComponent.decorators = [
|
|
4569
3467
|
{ type: i0.Component, args: [{
|
|
4570
|
-
selector: "
|
|
3468
|
+
selector: "co-date-planning",
|
|
4571
3469
|
template: "\n <div class=\"sc-agenda\">\n <div class=\"content-wrapper\">\n <calendar *ngIf=\"calendarNavigation\"\n [view]=\"view\"\n [(days)]=\"days\"\n [selectedDate]=\"selectedDate\" (selectedDateChange)=\"doChangeSelectedDate($event)\"></calendar>\n <div class=\"agenda-content-wrapper mini-scrollbar\">\n <div class=\"agenda-content\">\n <agenda-header [view]=\"view\" (viewChange)=\"doChangeView($event)\"\n [firstAvailableDate]=\"firstAvailableDate\"\n [eventsPerDay]=\"eventsPerDay\"\n [selectedDate]=\"selectedDate\"\n (selectedDateChange)=\"doChangeSelectedDate($event)\"\n (rangeChange)=\"doChangeSelectedDate($event, true)\"></agenda-header>\n <agenda-view [view]=\"view\"\n [selectedDate]=\"selectedDate\"\n [eventsPerDay]=\"eventsPerDay\"\n (eventChecked)=\"eventChecked.emit($event)\"></agenda-view>\n </div>\n </div>\n </div>\n </div>\n <co-button *ngIf=\"showButton && eventsPerDay.length > 0\" class=\"text-only select-agenda-button\"\n [label]=\"buttonLabel\"\n (click)=\"buttonClick.emit($event)\">\n </co-button>\n ",
|
|
4572
3470
|
animations: [
|
|
4573
3471
|
animations.trigger("showHideWindow", [
|
|
@@ -4586,6 +3484,7 @@
|
|
|
4586
3484
|
{ type: i0.Renderer2 }
|
|
4587
3485
|
]; };
|
|
4588
3486
|
DatePlanningComponent.propDecorators = {
|
|
3487
|
+
dayStart: [{ type: i0.ViewChild, args: ["dayStart", { static: true },] }],
|
|
4589
3488
|
calendarNavigation: [{ type: i0.Input }],
|
|
4590
3489
|
showButton: [{ type: i0.Input }],
|
|
4591
3490
|
selectedDate: [{ type: i0.Input }],
|
|
@@ -4598,7 +3497,7 @@
|
|
|
4598
3497
|
rangeChange: [{ type: i0.Output }],
|
|
4599
3498
|
viewChange: [{ type: i0.Output }],
|
|
4600
3499
|
buttonClick: [{ type: i0.Output }],
|
|
4601
|
-
|
|
3500
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-date-planning",] }]
|
|
4602
3501
|
};
|
|
4603
3502
|
|
|
4604
3503
|
var CalendarAllYearsComponent = /** @class */ (function () {
|
|
@@ -4706,7 +3605,7 @@
|
|
|
4706
3605
|
this.iconCacheService = iconCacheService;
|
|
4707
3606
|
this.selectedDate = new Date();
|
|
4708
3607
|
this.selectedDateChange = new i0.EventEmitter();
|
|
4709
|
-
this.icons =
|
|
3608
|
+
this.icons = exports["ɵw"];
|
|
4710
3609
|
this.showMonthYearSelect = false;
|
|
4711
3610
|
this.expanded = false;
|
|
4712
3611
|
}
|
|
@@ -4832,6 +3731,11 @@
|
|
|
4832
3731
|
},] }
|
|
4833
3732
|
];
|
|
4834
3733
|
|
|
3734
|
+
// @returns true iff given value does not equals null and does not equal undefined
|
|
3735
|
+
function notNill(value) {
|
|
3736
|
+
return value !== null && value !== undefined;
|
|
3737
|
+
}
|
|
3738
|
+
|
|
4835
3739
|
var DateRange = /** @class */ (function () {
|
|
4836
3740
|
function DateRange() {
|
|
4837
3741
|
}
|
|
@@ -5262,7 +4166,7 @@
|
|
|
5262
4166
|
},] }
|
|
5263
4167
|
];
|
|
5264
4168
|
CalendarViewComponent.ctorParameters = function () { return [
|
|
5265
|
-
{ type: exports["
|
|
4169
|
+
{ type: exports["ɵbc"], decorators: [{ type: i0.Inject, args: [i0.LOCALE_ID,] }] }
|
|
5266
4170
|
]; };
|
|
5267
4171
|
CalendarViewComponent.propDecorators = {
|
|
5268
4172
|
view: [{ type: i0.Input }],
|
|
@@ -5350,7 +4254,7 @@
|
|
|
5350
4254
|
CalendarUtils.Locale = undefined;
|
|
5351
4255
|
CalendarUtils.Now = new Date();
|
|
5352
4256
|
CalendarUtils.ctorParameters = function () { return [
|
|
5353
|
-
{ type: exports["
|
|
4257
|
+
{ type: exports["ɵbc"], decorators: [{ type: i0.Inject, args: [i0.LOCALE_ID,] }] }
|
|
5354
4258
|
]; };
|
|
5355
4259
|
|
|
5356
4260
|
var AgendaEvent = /** @class */ (function () {
|
|
@@ -5407,7 +4311,7 @@
|
|
|
5407
4311
|
this._renderer = _renderer;
|
|
5408
4312
|
this._ngZone = _ngZone;
|
|
5409
4313
|
this.iconCacheService = iconCacheService;
|
|
5410
|
-
this.icons =
|
|
4314
|
+
this.icons = exports["ɵw"];
|
|
5411
4315
|
this.viewTypes = CalendarView;
|
|
5412
4316
|
this.scrollbarWidth = 15;
|
|
5413
4317
|
this.view = CalendarView.WeekSelectView;
|
|
@@ -5583,7 +4487,7 @@
|
|
|
5583
4487
|
},] }
|
|
5584
4488
|
];
|
|
5585
4489
|
AgendaHeaderComponent.ctorParameters = function () { return [
|
|
5586
|
-
{ type: exports["
|
|
4490
|
+
{ type: exports["ɵbc"], decorators: [{ type: i0.Inject, args: [i0.LOCALE_ID,] }] },
|
|
5587
4491
|
{ type: i0.ElementRef },
|
|
5588
4492
|
{ type: i0.Renderer2 },
|
|
5589
4493
|
{ type: i0.NgZone },
|
|
@@ -5683,7 +4587,7 @@
|
|
|
5683
4587
|
{ type: i0.Directive }
|
|
5684
4588
|
];
|
|
5685
4589
|
AgendaBaseViewComponent.ctorParameters = function () { return [
|
|
5686
|
-
{ type: exports["
|
|
4590
|
+
{ type: exports["ɵbc"], decorators: [{ type: i0.Inject, args: [i0.LOCALE_ID,] }] },
|
|
5687
4591
|
{ type: IconCacheService }
|
|
5688
4592
|
]; };
|
|
5689
4593
|
AgendaBaseViewComponent.propDecorators = {
|
|
@@ -5799,7 +4703,7 @@
|
|
|
5799
4703
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
5800
4704
|
_this.view = CalendarView.WeekSelectView;
|
|
5801
4705
|
_this.week = NULL_WEEK;
|
|
5802
|
-
_this.icons =
|
|
4706
|
+
_this.icons = exports["ɵw"];
|
|
5803
4707
|
return _this;
|
|
5804
4708
|
}
|
|
5805
4709
|
AgendaWeekSelectViewComponent.prototype.prepareViewData = function () {
|
|
@@ -6044,7 +4948,7 @@
|
|
|
6044
4948
|
this._elementRef = _elementRef;
|
|
6045
4949
|
this._renderer = _renderer;
|
|
6046
4950
|
this.iconCacheService = iconCacheService;
|
|
6047
|
-
this.icons =
|
|
4951
|
+
this.icons = exports["ɵw"];
|
|
6048
4952
|
this.event = NULL_AGENDA_EVENT;
|
|
6049
4953
|
this.eventChecked = new i0.EventEmitter();
|
|
6050
4954
|
}
|
|
@@ -6213,7 +5117,7 @@
|
|
|
6213
5117
|
var AgendaSelectEventComponent = /** @class */ (function () {
|
|
6214
5118
|
function AgendaSelectEventComponent(iconCacheService) {
|
|
6215
5119
|
this.iconCacheService = iconCacheService;
|
|
6216
|
-
this.icons =
|
|
5120
|
+
this.icons = exports["ɵw"];
|
|
6217
5121
|
this.event = NULL_AGENDA_EVENT;
|
|
6218
5122
|
this.eventChecked = new i0.EventEmitter();
|
|
6219
5123
|
}
|
|
@@ -6279,37 +5183,6 @@
|
|
|
6279
5183
|
},] }
|
|
6280
5184
|
];
|
|
6281
5185
|
|
|
6282
|
-
var SharedService = /** @class */ (function () {
|
|
6283
|
-
function SharedService(options, connector) {
|
|
6284
|
-
this.options = options;
|
|
6285
|
-
this.connector = connector;
|
|
6286
|
-
}
|
|
6287
|
-
SharedService.prototype.init = function (options) {
|
|
6288
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
6289
|
-
return __generator(this, function (_a) {
|
|
6290
|
-
switch (_a.label) {
|
|
6291
|
-
case 0: return [4 /*yield*/, this.options.initialize(options)];
|
|
6292
|
-
case 1:
|
|
6293
|
-
_a.sent();
|
|
6294
|
-
this.connector.connect();
|
|
6295
|
-
return [2 /*return*/];
|
|
6296
|
-
}
|
|
6297
|
-
});
|
|
6298
|
-
});
|
|
6299
|
-
};
|
|
6300
|
-
return SharedService;
|
|
6301
|
-
}());
|
|
6302
|
-
SharedService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0__namespace.ɵɵinject(OptionsService), i0__namespace.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
|
|
6303
|
-
SharedService.decorators = [
|
|
6304
|
-
{ type: i0.Injectable, args: [{
|
|
6305
|
-
providedIn: "root"
|
|
6306
|
-
},] }
|
|
6307
|
-
];
|
|
6308
|
-
SharedService.ctorParameters = function () { return [
|
|
6309
|
-
{ type: OptionsService },
|
|
6310
|
-
{ type: SharedConnectorService }
|
|
6311
|
-
]; };
|
|
6312
|
-
|
|
6313
5186
|
/*
|
|
6314
5187
|
* Public API Surface of sharedcomponents
|
|
6315
5188
|
*/
|
|
@@ -6337,41 +5210,52 @@
|
|
|
6337
5210
|
exports.StatusbarModule = StatusbarModule;
|
|
6338
5211
|
exports.StockComponent = StockComponent;
|
|
6339
5212
|
exports.StockModule = StockModule;
|
|
5213
|
+
exports.sendMethodsWithIcon = sendMethodsWithIcon;
|
|
6340
5214
|
exports["ɵa"] = SignatureComponent;
|
|
6341
5215
|
exports["ɵb"] = SignaturesComponent;
|
|
6342
|
-
exports["ɵba"] =
|
|
6343
|
-
exports["ɵbb"] =
|
|
6344
|
-
exports["
|
|
6345
|
-
exports["
|
|
6346
|
-
exports["
|
|
6347
|
-
exports["
|
|
6348
|
-
exports["
|
|
6349
|
-
exports["
|
|
6350
|
-
exports["
|
|
6351
|
-
exports["
|
|
5216
|
+
exports["ɵba"] = CalendarComponent;
|
|
5217
|
+
exports["ɵbb"] = CalendarViewComponent;
|
|
5218
|
+
exports["ɵbd"] = AgendaHeaderComponent;
|
|
5219
|
+
exports["ɵbe"] = AgendaViewComponent;
|
|
5220
|
+
exports["ɵbf"] = AgendaMonthViewComponent;
|
|
5221
|
+
exports["ɵbg"] = AgendaBaseViewComponent;
|
|
5222
|
+
exports["ɵbh"] = AgendaDayViewComponent;
|
|
5223
|
+
exports["ɵbi"] = AgendaWeekViewComponent;
|
|
5224
|
+
exports["ɵbj"] = AgendaWeekSelectViewComponent;
|
|
5225
|
+
exports["ɵbk"] = AgendaHourViewComponent;
|
|
5226
|
+
exports["ɵbl"] = AgendaHourCellComponent;
|
|
5227
|
+
exports["ɵbm"] = AgendaHourViewLabelsComponent;
|
|
5228
|
+
exports["ɵbn"] = AgendaHalfHourCellComponent;
|
|
5229
|
+
exports["ɵbo"] = AgendaEventsComponent;
|
|
5230
|
+
exports["ɵbp"] = AgendaEventComponent;
|
|
5231
|
+
exports["ɵbq"] = ViewSelectComponent;
|
|
5232
|
+
exports["ɵbr"] = AgendaSelectEventComponent;
|
|
5233
|
+
exports["ɵbs"] = MASTER_PIPES;
|
|
5234
|
+
exports["ɵbt"] = ArrayNumberPipe;
|
|
5235
|
+
exports["ɵbu"] = UCfirstPipe;
|
|
6352
5236
|
exports["ɵc"] = StockService;
|
|
6353
5237
|
exports["ɵd"] = SharedConnectorService;
|
|
6354
5238
|
exports["ɵe"] = OptionsService;
|
|
6355
5239
|
exports["ɵf"] = DictionaryService;
|
|
6356
5240
|
exports["ɵg"] = IconCacheService;
|
|
6357
|
-
exports["ɵh"] =
|
|
6358
|
-
exports["ɵi"] =
|
|
6359
|
-
exports["ɵj"] =
|
|
6360
|
-
exports["ɵk"] =
|
|
6361
|
-
exports["ɵl"] =
|
|
6362
|
-
exports["ɵm"] =
|
|
6363
|
-
exports["ɵn"] =
|
|
6364
|
-
exports["ɵo"] =
|
|
6365
|
-
exports["ɵp"] =
|
|
6366
|
-
exports["ɵq"] =
|
|
6367
|
-
exports["
|
|
6368
|
-
exports["
|
|
6369
|
-
exports["
|
|
6370
|
-
exports["
|
|
6371
|
-
exports["
|
|
6372
|
-
exports["ɵx"] =
|
|
6373
|
-
exports["ɵy"] =
|
|
6374
|
-
exports["ɵz"] =
|
|
5241
|
+
exports["ɵh"] = SendMethodService;
|
|
5242
|
+
exports["ɵi"] = SendMethodEmailModule;
|
|
5243
|
+
exports["ɵj"] = LayoutSelectionModule;
|
|
5244
|
+
exports["ɵk"] = LayoutSelectionComponent;
|
|
5245
|
+
exports["ɵl"] = SendMethodEmailComponent;
|
|
5246
|
+
exports["ɵm"] = SendMethodPrinterModule;
|
|
5247
|
+
exports["ɵn"] = PrinterSelectionModule;
|
|
5248
|
+
exports["ɵo"] = PrinterSelectionComponent;
|
|
5249
|
+
exports["ɵp"] = SendMethodPrinterComponent;
|
|
5250
|
+
exports["ɵq"] = StockInformationComponent;
|
|
5251
|
+
exports["ɵr"] = StockInformationGridComponent;
|
|
5252
|
+
exports["ɵs"] = StockLocationComponent;
|
|
5253
|
+
exports["ɵt"] = StockTransferComponent;
|
|
5254
|
+
exports["ɵu"] = StockChangeAmountComponent;
|
|
5255
|
+
exports["ɵv"] = SendMethod;
|
|
5256
|
+
exports["ɵx"] = CalendarAllYearsComponent;
|
|
5257
|
+
exports["ɵy"] = CalendarAllMonthsComponent;
|
|
5258
|
+
exports["ɵz"] = CalendarHeaderComponent;
|
|
6375
5259
|
|
|
6376
5260
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6377
5261
|
|