@colijnit/sharedcomponents 1.0.57 → 1.0.58

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.
Files changed (157) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +3555 -6
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.d.ts +17 -0
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/colijnit-sharedcomponents.js +18 -1
  6. package/esm2015/lib/businessobject/build-images-and-documentation-result.js +2 -0
  7. package/esm2015/lib/businessobject/co-document-right.bo.js +3 -0
  8. package/esm2015/lib/businessobject/drag-drop-container-element.js +2 -0
  9. package/esm2015/lib/businessobject/drag-drop-container.js +7 -0
  10. package/esm2015/lib/components/activity-list/activity-list.component.js +130 -0
  11. package/esm2015/lib/components/activity-list/activity-list.module.js +24 -0
  12. package/esm2015/lib/components/app-file-dropzone/app-file-dropzone.component.js +47 -0
  13. package/esm2015/lib/components/app-file-dropzone/app-file-dropzone.module.js +20 -0
  14. package/esm2015/lib/components/file-upload/file-upload.component.js +189 -0
  15. package/esm2015/lib/components/file-upload/file-upload.module.js +25 -0
  16. package/esm2015/lib/components/file-upload-popup/file-upload-popup.component.js +397 -0
  17. package/esm2015/lib/components/file-upload-popup/file-upload-popup.module.js +30 -0
  18. package/esm2015/lib/components/files-upload/components/base-file-upload.component.js +469 -0
  19. package/esm2015/lib/components/files-upload/components/drag-drop-container.component.js +115 -0
  20. package/esm2015/lib/components/files-upload/files-upload.component.js +131 -0
  21. package/esm2015/lib/components/files-upload/files-upload.module.js +47 -0
  22. package/esm2015/lib/components/image-display/image-display.component.js +36 -0
  23. package/esm2015/lib/components/image-display/image-display.module.js +23 -0
  24. package/esm2015/lib/components/multi-property-toggler/multiple-property-toggler.component.js +89 -0
  25. package/esm2015/lib/components/multi-property-toggler/multiple-property-toggler.module.js +21 -0
  26. package/esm2015/lib/components/tile-renderer/tile-render.component.js +80 -0
  27. package/esm2015/lib/components/tile-renderer/tile-render.module.js +26 -0
  28. package/esm2015/lib/decorator/input-boolean.decorator.js +34 -0
  29. package/esm2015/lib/enum/document-email-report.enum.js +18 -0
  30. package/esm2015/lib/enum/domain-multiple-name.enum.js +13 -0
  31. package/esm2015/lib/enum/file-type.js +14 -0
  32. package/esm2015/lib/enum/files-upload-config-objects.js +3 -0
  33. package/esm2015/lib/enum/icon.enum.js +7 -1
  34. package/esm2015/lib/enum/internal-param.enum.js +38 -0
  35. package/esm2015/lib/enum/read-write-access-config-names.enum.js +2 -0
  36. package/esm2015/lib/enum/table-name.enum.js +86 -0
  37. package/esm2015/lib/enum/tag-category.enum.js +22 -0
  38. package/esm2015/lib/enum/tags-component-config-names.js +2 -0
  39. package/esm2015/lib/enum/tile-size-type.js +7 -0
  40. package/esm2015/lib/event/co-drag-event.js +2 -0
  41. package/esm2015/lib/event/co-drop-event.js +2 -0
  42. package/esm2015/lib/interface/key-value-pair.js +2 -0
  43. package/esm2015/lib/interface/operation-callback-simple-function.js +4 -0
  44. package/esm2015/lib/model/icon-svg.js +7 -1
  45. package/esm2015/lib/model/tag-tree-item.bo.js +16 -0
  46. package/esm2015/lib/model/tree-object.js +15 -0
  47. package/esm2015/lib/pipe/file-type-image.pipe.js +51 -0
  48. package/esm2015/lib/pipe/master-pipes.js +4 -2
  49. package/esm2015/lib/service/drag-drop.service.js +365 -0
  50. package/esm2015/lib/service/shared-connector.service.js +10 -1
  51. package/esm2015/lib/service/shared.service.js +2 -2
  52. package/esm2015/lib/utils/array-utils.js +202 -0
  53. package/esm2015/lib/utils/check-precision-and-scale-result.js +2 -0
  54. package/esm2015/lib/utils/check-within-stepped-bounds-result.js +2 -0
  55. package/esm2015/lib/utils/co-document-shared-field-logic.js +50 -0
  56. package/esm2015/lib/utils/enum-utils.js +128 -0
  57. package/esm2015/lib/utils/is-nill.function.js +5 -0
  58. package/esm2015/lib/utils/number-utils.js +390 -0
  59. package/esm2015/lib/utils/object-utils.js +278 -0
  60. package/esm2015/lib/utils/ref-code-utils.js +49 -0
  61. package/esm2015/lib/utils/string-utils.js +30 -1
  62. package/esm2015/public-api.js +5 -1
  63. package/fesm2015/colijnit-sharedcomponents.js +3528 -6
  64. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  65. package/lib/businessobject/build-images-and-documentation-result.d.ts +5 -0
  66. package/lib/businessobject/co-document-right.bo.d.ts +6 -0
  67. package/lib/businessobject/drag-drop-container-element.d.ts +6 -0
  68. package/lib/businessobject/drag-drop-container.d.ts +6 -0
  69. package/lib/components/access/read-write-access.scss +25 -0
  70. package/lib/components/access/style/_layout.scss +23 -0
  71. package/lib/components/access/style/_material-definition.scss +12 -0
  72. package/lib/components/access/style/_theme.scss +4 -0
  73. package/lib/components/access/style/material.scss +4 -0
  74. package/lib/components/activity-list/activity-list.component.d.ts +33 -0
  75. package/lib/components/activity-list/activity-list.module.d.ts +2 -0
  76. package/lib/components/activity-list/style/_layout.scss +68 -0
  77. package/lib/components/activity-list/style/_material-definition.scss +0 -0
  78. package/lib/components/activity-list/style/_theme.scss +4 -0
  79. package/lib/components/activity-list/style/material.scss +4 -0
  80. package/lib/components/app-file-dropzone/app-file-dropzone.component.d.ts +14 -0
  81. package/lib/components/app-file-dropzone/app-file-dropzone.module.d.ts +2 -0
  82. package/lib/components/app-file-dropzone/style/_layout.scss +61 -0
  83. package/lib/components/app-file-dropzone/style/_material-definition.scss +0 -0
  84. package/lib/components/app-file-dropzone/style/_theme.scss +4 -0
  85. package/lib/components/app-file-dropzone/style/material.scss +4 -0
  86. package/lib/components/file-upload/file-upload.component.d.ts +42 -0
  87. package/lib/components/file-upload/file-upload.module.d.ts +2 -0
  88. package/lib/components/file-upload/style/_layout.scss +59 -0
  89. package/lib/components/file-upload/style/_material-definition.scss +2 -0
  90. package/lib/components/file-upload/style/_theme.scss +4 -0
  91. package/lib/components/file-upload/style/material.scss +4 -0
  92. package/lib/components/file-upload-popup/file-upload-popup.component.d.ts +75 -0
  93. package/lib/components/file-upload-popup/file-upload-popup.module.d.ts +2 -0
  94. package/lib/components/file-upload-popup/style/_layout.scss +48 -0
  95. package/lib/components/file-upload-popup/style/_material-definition.scss +2 -0
  96. package/lib/components/file-upload-popup/style/_theme.scss +5 -0
  97. package/lib/components/file-upload-popup/style/material.scss +4 -0
  98. package/lib/components/files-upload/components/base-file-upload.component.d.ts +98 -0
  99. package/lib/components/files-upload/components/drag-drop-container.component.d.ts +34 -0
  100. package/lib/components/files-upload/files-upload.component.d.ts +32 -0
  101. package/lib/components/files-upload/files-upload.module.d.ts +2 -0
  102. package/lib/components/files-upload/style/_layout.scss +49 -0
  103. package/lib/components/files-upload/style/_material-definition.scss +0 -0
  104. package/lib/components/files-upload/style/_theme.scss +5 -0
  105. package/lib/components/files-upload/style/material.scss +4 -0
  106. package/lib/components/image-display/image-display.component.d.ts +14 -0
  107. package/lib/components/image-display/image-display.module.d.ts +2 -0
  108. package/lib/components/image-display/style/_layout.scss +56 -0
  109. package/lib/components/image-display/style/_material-definition.scss +4 -0
  110. package/lib/components/image-display/style/_theme.scss +6 -0
  111. package/lib/components/image-display/style/material.scss +3 -0
  112. package/lib/components/multi-property-toggler/multiple-property-toggler.component.d.ts +27 -0
  113. package/lib/components/multi-property-toggler/multiple-property-toggler.module.d.ts +2 -0
  114. package/lib/components/multi-property-toggler/style/_layout.scss +24 -0
  115. package/lib/components/multi-property-toggler/style/_material-definition.scss +0 -0
  116. package/lib/components/multi-property-toggler/style/_theme.scss +4 -0
  117. package/lib/components/multi-property-toggler/style/material.scss +4 -0
  118. package/lib/components/tile-renderer/style/_layout.scss +90 -0
  119. package/lib/components/tile-renderer/style/_material-definition.scss +0 -0
  120. package/lib/components/tile-renderer/style/_theme.scss +4 -0
  121. package/lib/components/tile-renderer/style/material.scss +4 -0
  122. package/lib/components/tile-renderer/tile-render.component.d.ts +31 -0
  123. package/lib/components/tile-renderer/tile-render.module.d.ts +2 -0
  124. package/lib/decorator/input-boolean.decorator.d.ts +8 -0
  125. package/lib/enum/document-email-report.enum.d.ts +15 -0
  126. package/lib/enum/domain-multiple-name.enum.d.ts +10 -0
  127. package/lib/enum/file-type.d.ts +7 -0
  128. package/lib/enum/files-upload-config-objects.d.ts +22 -0
  129. package/lib/enum/icon.enum.d.ts +6 -0
  130. package/lib/enum/internal-param.enum.d.ts +34 -0
  131. package/lib/enum/read-write-access-config-names.enum.d.ts +4 -0
  132. package/lib/enum/table-name.enum.d.ts +84 -0
  133. package/lib/enum/tag-category.enum.d.ts +19 -0
  134. package/lib/enum/tags-component-config-names.d.ts +4 -0
  135. package/lib/enum/tile-size-type.d.ts +4 -0
  136. package/lib/event/co-drag-event.d.ts +5 -0
  137. package/lib/event/co-drop-event.d.ts +8 -0
  138. package/lib/interface/key-value-pair.d.ts +4 -0
  139. package/lib/interface/operation-callback-simple-function.d.ts +4 -0
  140. package/lib/model/tag-tree-item.bo.d.ts +18 -0
  141. package/lib/model/tree-object.d.ts +8 -0
  142. package/lib/pipe/file-type-image.pipe.d.ts +12 -0
  143. package/lib/service/drag-drop.service.d.ts +86 -0
  144. package/lib/service/shared-connector.service.d.ts +2 -0
  145. package/lib/style/_variables.scss +1 -1
  146. package/lib/utils/array-utils.d.ts +63 -0
  147. package/lib/utils/check-precision-and-scale-result.d.ts +4 -0
  148. package/lib/utils/check-within-stepped-bounds-result.d.ts +8 -0
  149. package/lib/utils/co-document-shared-field-logic.d.ts +7 -0
  150. package/lib/utils/enum-utils.d.ts +31 -0
  151. package/lib/utils/is-nill.function.d.ts +1 -0
  152. package/lib/utils/number-utils.d.ts +125 -0
  153. package/lib/utils/object-utils.d.ts +40 -0
  154. package/lib/utils/ref-code-utils.d.ts +10 -0
  155. package/lib/utils/string-utils.d.ts +16 -0
  156. package/package.json +1 -1
  157. package/public-api.d.ts +4 -0
@@ -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/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/ioneconnector/build/model/options'), require('@colijnit/mainapi'), require('@colijnit/mainapi/build/model/printer.bo'), require('@colijnit/mainapi/build/model/send-method.bo'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/mainapi/build/model/tag-tree-item.bo'), require('@colijnit/sharedapi/build/model/print-stock-stickers'), require('@colijnit/articleapi/build/model/article-extended.bo'), require('@colijnit/articleapi/build/model/article-stock'), require('@colijnit/articleapi/build/model/article-extended-request'), 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-email-sign-doc-base-request'), require('@colijnit/mainapi/build/model/reporting-document-pdf-base-request'), require('@colijnit/mainapi/build/model/reporting-document-print-sign-doc-base-request'), require('@colijnit/mainapi/build/enum/send-method-type.enum'), require('@colijnit/articleapi/build/model/get-stock-history-request'), require('chart.js'), require('moment'), require('@angular/cdk/drag-drop')) :
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/ioneconnector/build/model/options', '@colijnit/mainapi', '@colijnit/mainapi/build/model/printer.bo', '@colijnit/mainapi/build/model/send-method.bo', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/mainapi/build/model/tag-tree-item.bo', '@colijnit/sharedapi/build/model/print-stock-stickers', '@colijnit/articleapi/build/model/article-extended.bo', '@colijnit/articleapi/build/model/article-stock', '@colijnit/articleapi/build/model/article-extended-request', '@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-email-sign-doc-base-request', '@colijnit/mainapi/build/model/reporting-document-pdf-base-request', '@colijnit/mainapi/build/model/reporting-document-print-sign-doc-base-request', '@colijnit/mainapi/build/enum/send-method-type.enum', '@colijnit/articleapi/build/model/get-stock-history-request', 'chart.js', 'moment', '@angular/cdk/drag-drop'], 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.options, global.mainapi, global.printer_bo, global.sendMethod_bo, global.businessObjectFactory, global.tagTreeItem_bo, global.printStockStickers, global.articleExtended_bo, global.articleStock, global.articleExtendedRequest, global.corecomponents_v12, global.ng.platformBrowser, global.articleStockManagement, global.articleTransaction, global.printPriceStickers_bo, global.reportingDocumentEmailSignDocBaseRequest, global.reportingDocumentPdfBaseRequest, global.reportingDocumentPrintSignDocBaseRequest, global.sendMethodType_enum, global.getStockHistoryRequest, global.chart_js, global.moment, global.ng.cdk.dragDrop));
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, options, mainapi, printer_bo, sendMethod_bo, businessObjectFactory, tagTreeItem_bo, printStockStickers, articleExtended_bo, articleStock, articleExtendedRequest, corecomponents_v12, i1, articleStockManagement, articleTransaction, printPriceStickers_bo, reportingDocumentEmailSignDocBaseRequest, reportingDocumentPdfBaseRequest, reportingDocumentPrintSignDocBaseRequest, sendMethodType_enum, getStockHistoryRequest, chart_js, moment, dragDrop) { 'use strict';
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/ioneconnector/build/model/options'), require('@colijnit/mainapi'), require('@colijnit/mainapi/build/model/printer.bo'), require('@colijnit/mainapi/build/model/send-method.bo'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/mainapi/build/model/tag-tree-item.bo'), require('@colijnit/ioneconnector/build/model/object-configuration'), require('@colijnit/sharedapi/build/model/print-stock-stickers'), require('@colijnit/articleapi/build/model/article-extended.bo'), require('@colijnit/articleapi/build/model/article-stock'), require('@colijnit/articleapi/build/model/article-extended-request'), 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-email-sign-doc-base-request'), require('@colijnit/mainapi/build/model/reporting-document-pdf-base-request'), require('@colijnit/mainapi/build/model/reporting-document-print-sign-doc-base-request'), require('@colijnit/mainapi/build/enum/send-method-type.enum'), require('@colijnit/articleapi/build/model/get-stock-history-request'), require('chart.js'), require('moment'), require('@colijnit/sharedapi/build/enum/refcode/file-type-internal.enum'), require('@angular/cdk/drag-drop'), require('@colijnit/mainapi/build/enum/file-type.enum'), require('@colijnit/sharedapi/build/enum/object-right-type.enum'), require('@colijnit/mainapi/build/utils/file-utils'), require('@colijnit/mainapi/build/model/co-document'), require('@colijnit/mainapi/build/enum/co-document-type.enum'), require('@colijnit/articleapi/build/enum/refcode/document-publication.enum'), require('@colijnit/mainapi/build/model/co-document-right'), require('@colijnit/sharedapi/build/utils/array-utils'), require('@angular/cdk/overlay'), require('@colijnit/mainapi/build/model/co-domain-value.bo'), require('@colijnit/articleapi/build/enum/relation-kind.enum'), require('@colijnit/mainapi/build/enum/activity-type'), require('@colijnit/mainapi/build/utils/time-utils')) :
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/ioneconnector/build/model/options', '@colijnit/mainapi', '@colijnit/mainapi/build/model/printer.bo', '@colijnit/mainapi/build/model/send-method.bo', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/mainapi/build/model/tag-tree-item.bo', '@colijnit/ioneconnector/build/model/object-configuration', '@colijnit/sharedapi/build/model/print-stock-stickers', '@colijnit/articleapi/build/model/article-extended.bo', '@colijnit/articleapi/build/model/article-stock', '@colijnit/articleapi/build/model/article-extended-request', '@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-email-sign-doc-base-request', '@colijnit/mainapi/build/model/reporting-document-pdf-base-request', '@colijnit/mainapi/build/model/reporting-document-print-sign-doc-base-request', '@colijnit/mainapi/build/enum/send-method-type.enum', '@colijnit/articleapi/build/model/get-stock-history-request', 'chart.js', 'moment', '@colijnit/sharedapi/build/enum/refcode/file-type-internal.enum', '@angular/cdk/drag-drop', '@colijnit/mainapi/build/enum/file-type.enum', '@colijnit/sharedapi/build/enum/object-right-type.enum', '@colijnit/mainapi/build/utils/file-utils', '@colijnit/mainapi/build/model/co-document', '@colijnit/mainapi/build/enum/co-document-type.enum', '@colijnit/articleapi/build/enum/refcode/document-publication.enum', '@colijnit/mainapi/build/model/co-document-right', '@colijnit/sharedapi/build/utils/array-utils', '@angular/cdk/overlay', '@colijnit/mainapi/build/model/co-domain-value.bo', '@colijnit/articleapi/build/enum/relation-kind.enum', '@colijnit/mainapi/build/enum/activity-type', '@colijnit/mainapi/build/utils/time-utils'], 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.options, global.mainapi, global.printer_bo, global.sendMethod_bo, global.businessObjectFactory, global.tagTreeItem_bo, global.objectConfiguration, global.printStockStickers, global.articleExtended_bo, global.articleStock, global.articleExtendedRequest, global.corecomponents_v12, global.ng.platformBrowser, global.articleStockManagement, global.articleTransaction, global.printPriceStickers_bo, global.reportingDocumentEmailSignDocBaseRequest, global.reportingDocumentPdfBaseRequest, global.reportingDocumentPrintSignDocBaseRequest, global.sendMethodType_enum, global.getStockHistoryRequest, global.chart_js, global.moment, global.fileTypeInternal_enum, global.ng.cdk.dragDrop, global.fileType_enum, global.objectRightType_enum, global.fileUtils, global.coDocument, global.coDocumentType_enum, global.documentPublication_enum, global.coDocumentRight, global.arrayUtils, global.ng.cdk.overlay, global.coDomainValue_bo, global.relationKind_enum, global.activityType, global.timeUtils));
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, options, mainapi, printer_bo, sendMethod_bo, businessObjectFactory, tagTreeItem_bo, objectConfiguration, printStockStickers, articleExtended_bo, articleStock, articleExtendedRequest, corecomponents_v12, i1, articleStockManagement, articleTransaction, printPriceStickers_bo, reportingDocumentEmailSignDocBaseRequest, reportingDocumentPdfBaseRequest, reportingDocumentPrintSignDocBaseRequest, sendMethodType_enum, getStockHistoryRequest, chart_js, moment, fileTypeInternal_enum, dragDrop, fileType_enum, objectRightType_enum, fileUtils, coDocument, coDocumentType_enum, documentPublication_enum, coDocumentRight, arrayUtils, overlay, coDomainValue_bo, relationKind_enum, activityType, timeUtils) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -957,6 +957,35 @@
957
957
  StringUtils.IsStringWithLength = function (str) {
958
958
  return str && StringUtils.IsString(str) && str.length > 0;
959
959
  };
960
+ /**
961
+ * Example usage:
962
+ * str = 'File is to large to upload. Maximum file size is {0} Mb'
963
+ * format = [FileUtils.MaxUploadSizeInMb]
964
+ * output = File is to large to upload. Maximum file size is 3 Mb
965
+ *
966
+ * str = '{0} is way better than {1}'
967
+ * format = ['Angular2','Angular1']
968
+ * output = Angular2 is way better than Angular1
969
+ *
970
+ * @param str The string that contains {0} and {1} etc, for replacement by given format data
971
+ * @param format The format replacement data
972
+ * @returns {string}
973
+ */
974
+ StringUtils.Format = function (str, format) {
975
+ var args = Array.prototype.slice.call(format);
976
+ return str.replace(/{(\d+)}/g, function (match, number) {
977
+ return typeof args[number] !== "undefined" ? (args[number] !== null ? args[number] : "") : "";
978
+ });
979
+ };
980
+ // Returns a new string string with N amount of characters removed from the end of it.
981
+ StringUtils.RemoveLastChars = function (str, amount) {
982
+ if (str) {
983
+ return str.slice(0, -1 * amount);
984
+ }
985
+ else {
986
+ return str;
987
+ }
988
+ };
960
989
  // Returns given string, escaped for use as string literal in regular expressions.
961
990
  StringUtils._escapeRegExp = function (str) {
962
991
  return str; // .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
@@ -1151,6 +1180,22 @@
1151
1180
  });
1152
1181
  });
1153
1182
  };
1183
+ SharedConnectorService.prototype.getConfiguration = function (module, params) {
1184
+ return __awaiter(this, void 0, void 0, function () {
1185
+ var response;
1186
+ return __generator(this, function (_a) {
1187
+ switch (_a.label) {
1188
+ case 0: return [4 /*yield*/, this.mainConnector.getObjectConfigurations(module, params)];
1189
+ case 1:
1190
+ response = _a.sent();
1191
+ if (response && response.success) {
1192
+ return [2 /*return*/, this._boFactory.makeBOArrayFromRawBackendDataArray(objectConfiguration.ObjectConfiguration, response.resultObjects)];
1193
+ }
1194
+ return [2 /*return*/];
1195
+ }
1196
+ });
1197
+ });
1198
+ };
1154
1199
  SharedConnectorService.prototype.getAllPrinters = function () {
1155
1200
  return __awaiter(this, void 0, void 0, function () {
1156
1201
  var _this = this;
@@ -2045,9 +2090,12 @@
2045
2090
  "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>",
2046
2091
  "check_duotone": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><defs><style>.fa-secondary{opacity:.4}</style></defs><path class=\"fa-primary\" d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"/></svg>",
2047
2092
  "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>",
2093
+ "clock_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z\"/></svg>",
2094
+ "comment_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M123.6 391.3c12.9-9.4 29.6-11.8 44.6-6.4c26.5 9.6 56.2 15.1 87.8 15.1c124.7 0 208-80.5 208-160s-83.3-160-208-160S48 160.5 48 240c0 32 12.4 62.8 35.7 89.2c8.6 9.7 12.8 22.5 11.8 35.5c-1.4 18.1-5.7 34.7-11.3 49.4c17-7.9 31.1-16.7 39.4-22.7zM21.2 431.9c1.8-2.7 3.5-5.4 5.1-8.1c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208s-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6c-15.1 6.6-32.3 12.6-50.1 16.1c-.8 .2-1.6 .3-2.4 .5c-4.4 .8-8.7 1.5-13.2 1.9c-.2 0-.5 .1-.7 .1c-5.1 .5-10.2 .8-15.3 .8c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c4.1-4.2 7.8-8.7 11.3-13.5c1.7-2.3 3.3-4.6 4.8-6.9c.1-.2 .2-.3 .3-.5z\"/></svg>",
2048
2095
  "cross_skinny": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><polygon points=\"25.35 5.52 24.65 4.81 15 14.46 5.35 4.81 4.65 5.52 14.29 15.17 4.65 24.81 5.35 25.52 15 15.87 24.65 25.52 25.35 24.81 15.71 15.17 25.35 5.52\" fill=\"#484f60\"/></g></svg>",
2049
2096
  "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>",
2050
2097
  "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>",
2098
+ "dropzone": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><g><rect x=\"2\" y=\"1.67\" width=\"14\" height=\"6\" rx=\"2\" ry=\"2\" fill=\"#484f60\" opacity=\".5\"/><path d=\"M16.52,13.16l-.94-.47-1.61-2.53-1.23-1.62-.65-.85-1.53-1.59-2.06-1.17h-1.15l-.7,.7,.41,.91,2.47,2.2,.56,1.2,1.7,2.71,.82,2.26,.06,.74,.09,2.38-.23-.85-.97-.94-.79-.97-1.76-1.76-1.06-.35-.88,.24-.7,.62,1.32,1.44,1.56,1.97,2.14,3.73,2.2,2,1.82,1.14,2.44,1.06,1.91,1,2,1.03,.23,1.29,6.02-5.99v-.91s-.91-1-1-1.03c-.09-.03-.82-1.65-.82-1.65l-.47-1.91-.35-.97-1.32-1.67-.85-1.12-.5-.82-.88-1.14-.79-.77-1.33-.86-.22,.42,1.39,2.12-.94-.47-.86-1.48-1.33-1.38-1.06-.16-.03,.6,2.1,3.09-.94-.47-1.8-2.9-1.21-.86-1.29,.12,.18,.56,2.85,4.14Z\" fill=\"#484f60\"/><path d=\"M16,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".5\"/><path d=\"M18,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".25\"/><path d=\"M20,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".1\"/></g></g></svg>",
2051
2099
  "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>",
2052
2100
  "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>",
2053
2101
  "eye_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\"/></svg>",
@@ -2060,12 +2108,15 @@
2060
2108
  "lock": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><g><path d=\"M22.65,11.67H7.35c-2.82,0-3.07,2.29-3.07,5.12v8.09c0,2.83,.25,5.12,3.07,5.12h15.29c2.81,0,3.07-2.29,3.07-5.12v-8.09c0-2.83-.25-5.12-3.07-5.12Zm-12.42,15.82l2.6-6.32c-1-.7-1.65-1.85-1.65-3.15,0-2.12,1.71-3.84,3.82-3.84s3.82,1.73,3.82,3.84c0,1.31-.65,2.46-1.65,3.15l2.6,6.32H10.22Z\" fill=\"#484f60\"/><path d=\"M19.51,6.64c0-3.6-2.02-4.07-4.51-4.07h0c-2.49,0-4.51,.47-4.51,4.07v3h-2.7v-3C7.79,1.62,11.02,0,15,0h0c3.98,0,7.21,1.62,7.21,6.64v3h-2.7v-3Z\" fill=\"#484f60\"/></g></g></svg>",
2061
2109
  "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>",
2062
2110
  "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>",
2111
+ "paperclip_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M375 73c-26-26-68.1-26-94.1 0L89 265C45.3 308.6 45.3 379.4 89 423s114.4 43.6 158.1 0L399 271c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L281 457c-62.4 62.4-163.5 62.4-225.9 0S-7.4 293.4 55 231L247 39C291.7-5.7 364.2-5.7 409 39s44.7 117.2 0 161.9L225.2 384.7c-31.6 31.6-83.6 28.7-111.5-6.2c-23.8-29.8-21.5-72.8 5.5-99.8L271 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L153.2 312.7c-9.7 9.7-10.6 25.1-2 35.8c10 12.5 28.7 13.6 40 2.2L375 167c26-26 26-68.1 0-94.1z\"/></svg>",
2063
2112
  "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>",
2113
+ "person_digging_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M208 64a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM440.8 288c8.2 .3 15.7 4.7 19.8 11.8l104 176c4.4 7.4 4.5 16.6 .2 24.1s-12.2 12.1-20.8 12.1H288c-7.7 0-15-3.7-19.5-10s-5.7-14.3-3.3-21.6l16-48c3.3-9.8 12.4-16.4 22.8-16.4h35.4l20.3-29.5L22.8 246.2c-12.2-5.1-18-19.1-12.9-31.4s19.1-18 31.4-12.9L61 210.1l19.8-36.2C96.2 145.6 125.8 128 158 128h3.8c52.3 0 98.5 33.8 114.4 83.6l32.3 101.6 79 32.9 32.8-47.7c4.6-6.8 12.4-10.7 20.6-10.4zm-190.4 1l-20-62.8c-9.5-29.9-37.3-50.2-68.6-50.2H158c-14.6 0-28.1 8-35.1 20.8l-17.3 31.8L250.4 289zm188.1 67.6l-66.7 97L364.6 464H501.9L438.5 356.6zM81.4 301.1l128 54.4c8.9 3.8 14.6 12.5 14.6 22.1V488c0 13.3-10.7 24-24 24s-24-10.7-24-24V393.5L87.5 355.9 47 494.7c-3.7 12.7-17 20-29.8 16.3S-2.7 494 1 481.3L49 316.5l7.6-25.9 24.9 10.6z\"/></svg>",
2064
2114
  "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>",
2065
2115
  "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>",
2066
2116
  "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>",
2067
2117
  "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>",
2068
2118
  "tag_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M197.5 32c17 0 33.3 6.7 45.3 18.7l176 176c25 25 25 65.5 0 90.5L285.3 450.7c-25 25-65.5 25-90.5 0l-176-176C6.7 262.7 0 246.5 0 229.5V80C0 53.5 21.5 32 48 32H197.5zM48 229.5c0 4.2 1.7 8.3 4.7 11.3l176 176c6.2 6.2 16.4 6.2 22.6 0L384.8 283.3c6.2-6.2 6.2-16.4 0-22.6l-176-176c-3-3-7.1-4.7-11.3-4.7H48V229.5zM112 112a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"/></svg>",
2119
+ "trashbin": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M144 400C144 408.8 136.8 416 128 416C119.2 416 112 408.8 112 400V176C112 167.2 119.2 160 128 160C136.8 160 144 167.2 144 176V400zM240 400C240 408.8 232.8 416 224 416C215.2 416 208 408.8 208 400V176C208 167.2 215.2 160 224 160C232.8 160 240 167.2 240 176V400zM336 400C336 408.8 328.8 416 320 416C311.2 416 304 408.8 304 400V176C304 167.2 311.2 160 320 160C328.8 160 336 167.2 336 176V400zM310.1 22.56L336.9 64H432C440.8 64 448 71.16 448 80C448 88.84 440.8 96 432 96H416V432C416 476.2 380.2 512 336 512H112C67.82 512 32 476.2 32 432V96H16C7.164 96 0 88.84 0 80C0 71.16 7.164 64 16 64H111.1L137 22.56C145.8 8.526 161.2 0 177.7 0H270.3C286.8 0 302.2 8.526 310.1 22.56V22.56zM148.9 64H299.1L283.8 39.52C280.9 34.84 275.8 32 270.3 32H177.7C172.2 32 167.1 34.84 164.2 39.52L148.9 64zM64 432C64 458.5 85.49 480 112 480H336C362.5 480 384 458.5 384 432V96H64V432z\" fill=\"#484f60\"></path></svg>",
2069
2120
  "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>",
2070
2121
  "x_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path d=\"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z\"/></svg>"
2071
2122
  };
@@ -2134,9 +2185,12 @@
2134
2185
  Icon["BringForwardRegular"] = "bring_forward_regular";
2135
2186
  Icon["CheckDuotone"] = "check_duotone";
2136
2187
  Icon["CheckRound"] = "check_round";
2188
+ Icon["ClockRegular"] = "clock_regular";
2189
+ Icon["CommentRegular"] = "comment_regular";
2137
2190
  Icon["CrossSkinny"] = "cross_skinny";
2138
2191
  Icon["DeleteLeftRegular"] = "delete_left_regular";
2139
2192
  Icon["DeliveryTruck"] = "delivery_truck";
2193
+ Icon["Dropzone"] = "dropzone";
2140
2194
  Icon["Email"] = "email";
2141
2195
  Icon["EnvelopeRegular"] = "envelope_regular";
2142
2196
  Icon["EyeRegular"] = "eye_regular";
@@ -2149,12 +2203,15 @@
2149
2203
  Icon["Lock"] = "lock";
2150
2204
  Icon["MessageSmsRegular"] = "message_sms_regular";
2151
2205
  Icon["MessageSmsSolid"] = "message_sms_solid";
2206
+ Icon["PaperclipRegular"] = "paperclip_regular";
2152
2207
  Icon["Pdf"] = "pdf";
2208
+ Icon["PersonDiggingRegular"] = "person_digging_regular";
2153
2209
  Icon["Print"] = "print";
2154
2210
  Icon["PrintRegular"] = "print_regular";
2155
2211
  Icon["PrintSolid"] = "print_solid";
2156
2212
  Icon["SignatureField"] = "signature_field";
2157
2213
  Icon["TagRegular"] = "tag_regular";
2214
+ Icon["Trashbin"] = "trashbin";
2158
2215
  Icon["Xml"] = "xml";
2159
2216
  Icon["XSolid"] = "x_solid";
2160
2217
  })(exports["ɵbt"] || (exports["ɵbt"] = {}));
@@ -2493,7 +2550,9 @@
2493
2550
  case 0: return [4 /*yield*/, this.options.initialize(options)];
2494
2551
  case 1:
2495
2552
  _a.sent();
2496
- this.connector.connect();
2553
+ return [4 /*yield*/, this.connector.connect()];
2554
+ case 2:
2555
+ _a.sent();
2497
2556
  return [2 /*return*/];
2498
2557
  }
2499
2558
  });
@@ -6312,9 +6371,61 @@
6312
6371
  },] }
6313
6372
  ];
6314
6373
 
6374
+ // Transforms a MimeType to the corresponding image data URI of that mime type, for direct use as X in img src=X
6375
+ var FileTypeImagePipe = /** @class */ (function () {
6376
+ function FileTypeImagePipe() {
6377
+ }
6378
+ /**
6379
+ * @param {FileTypeInternal} value
6380
+ * @param {boolean} [smallImage = false] Every mime type image has a smaller and a larger image available.
6381
+ * @returns {string} The data URI of the required mime type image
6382
+ */
6383
+ FileTypeImagePipe.prototype.transform = function (value, smallImage) {
6384
+ if (smallImage === void 0) { smallImage = false; }
6385
+ if (!value) {
6386
+ return "";
6387
+ }
6388
+ var smallSuffix = smallImage ? "_small" : "";
6389
+ var imageFileName;
6390
+ switch (value) {
6391
+ case fileTypeInternal_enum.FileTypeInternal.Image:
6392
+ imageFileName = "image" + smallSuffix + ".png";
6393
+ break;
6394
+ case fileTypeInternal_enum.FileTypeInternal.Pdf:
6395
+ imageFileName = "pdf" + smallSuffix + ".png";
6396
+ break;
6397
+ case fileTypeInternal_enum.FileTypeInternal.ExcelSheet:
6398
+ imageFileName = "excel" + smallSuffix + ".png";
6399
+ break;
6400
+ case fileTypeInternal_enum.FileTypeInternal.WordDocument:
6401
+ imageFileName = "word" + smallSuffix + ".png";
6402
+ break;
6403
+ case fileTypeInternal_enum.FileTypeInternal.Executable:
6404
+ imageFileName = "exe" + smallSuffix + ".png";
6405
+ break;
6406
+ case fileTypeInternal_enum.FileTypeInternal.TextFile:
6407
+ imageFileName = "text" + smallSuffix + ".png";
6408
+ break;
6409
+ default:
6410
+ imageFileName = "undefined" + smallSuffix + ".png";
6411
+ break;
6412
+ }
6413
+ return FileTypeImagePipe._PATH_TO_IMAGE_FOLDER + imageFileName;
6414
+ };
6415
+ return FileTypeImagePipe;
6416
+ }());
6417
+ FileTypeImagePipe._PATH_TO_IMAGE_FOLDER = "./res/images/filetype/";
6418
+ FileTypeImagePipe.decorators = [
6419
+ { type: i0.Pipe, args: [{
6420
+ name: "fileTypeImage"
6421
+ },] }
6422
+ ];
6423
+ FileTypeImagePipe.ctorParameters = function () { return []; };
6424
+
6315
6425
  var MASTER_PIPES = [
6316
6426
  ArrayNumberPipe,
6317
- UCfirstPipe
6427
+ UCfirstPipe,
6428
+ FileTypeImagePipe
6318
6429
  ];
6319
6430
 
6320
6431
  // <b>Enum</b> Represents the different states of the three way thumb.
@@ -6642,6 +6753,3423 @@
6642
6753
  },] }
6643
6754
  ];
6644
6755
 
6756
+ var TableName;
6757
+ (function (TableName) {
6758
+ TableName["Absence"] = "ABSENCE";
6759
+ TableName["AbsenceEvent"] = "ABSENCE_EVENT";
6760
+ TableName["AbsenceFile"] = "ABSENCE_FILE";
6761
+ TableName["AbsenceForm"] = "ABSENCE_FORM";
6762
+ TableName["AccountingPeriod"] = "PERIODES";
6763
+ TableName["Address"] = "ADRESSEN";
6764
+ TableName["Administration"] = "ADMINISTRATIES";
6765
+ TableName["AnamnesisForm"] = "ANAMNESIS_FORM";
6766
+ TableName["ArticleGroup"] = "ARTIKEL_GROEP";
6767
+ TableName["Articles"] = "ARTIKELEN";
6768
+ TableName["Branch"] = "FILIALEN";
6769
+ TableName["BusinessRule"] = "BRE_RULE";
6770
+ TableName["Booking"] = "BOEKINGSREGELS";
6771
+ TableName["Category"] = "CATEGORIE";
6772
+ TableName["Characteristic"] = "KENMERKEN";
6773
+ TableName["CharacteristicTypes"] = "KENMERK_SOORTEN";
6774
+ TableName["CharacteristicLines"] = "KENMERK_REGELS";
6775
+ TableName["Company"] = "BEDRIJVEN";
6776
+ TableName["Concept"] = "CONCEPTEN";
6777
+ TableName["Connections"] = "ASS_VERBINDING";
6778
+ TableName["ContactPerson"] = "CONTACTPERSONEN";
6779
+ TableName["CostCenter"] = "KOSTENPLAATS_DRAGER";
6780
+ TableName["Country"] = "LANDCODE";
6781
+ TableName["CurrencyInfo"] = "VALUTA";
6782
+ TableName["CurrentIndication"] = "CURRENT_INDICATION";
6783
+ TableName["Customer"] = "KLANTEN";
6784
+ TableName["DeclarationMedicalOfficer"] = "DECLARATION_MEDICAL_OFFICER";
6785
+ TableName["DeliveryMethod"] = "LEVERMETHODES";
6786
+ TableName["Department"] = "AFDELING";
6787
+ TableName["DiagnosisForm"] = "DIAGNOSIS_FORM";
6788
+ TableName["Documents"] = "DOCUMENTATIE";
6789
+ TableName["EmployabilityProfile"] = "EMPLOYABILITY_PROFILE";
6790
+ TableName["EmployeeContract"] = "EMPLOYEE_CONTRACT";
6791
+ TableName["EmployeeContractType"] = "EMPLOYEE_CONTRACT_TYPE";
6792
+ TableName["Employee"] = "PERSONEEL";
6793
+ TableName["EndEvaluation"] = "END_EVALUATION";
6794
+ TableName["ExternalSource"] = "EXTERNE_BRONNEN";
6795
+ TableName["FirstYearEvaluation"] = "FIRST_YEAR_EVALUATION";
6796
+ TableName["FmlDocument"] = "FML_DOCUMENT";
6797
+ TableName["Goods"] = "GOEDEREN";
6798
+ TableName["Hardware"] = "ASS_HARDWARE";
6799
+ TableName["Identification"] = "IDENTIFICATION";
6800
+ TableName["JobCategory"] = "JOB_CATEGORY";
6801
+ TableName["JobType"] = "JOB_TYPE";
6802
+ TableName["LedgerAccount"] = "GROOTBOEKEN";
6803
+ TableName["LedgerClassification"] = "VERDICHTINGEN";
6804
+ TableName["LedgerJournal"] = "DAGBOEKEN";
6805
+ TableName["LedgerMainClassification"] = "HOOFDVERDICHTINGEN";
6806
+ TableName["LedgerMutation"] = "GROOTBOEK_MUTATIES";
6807
+ TableName["Location"] = "LOCATIES";
6808
+ TableName["MainArticle"] = "HOOFDARTIKELEN";
6809
+ TableName["MedicalConsultFeedback"] = "MEDICAL_CONSULT_FEEDBACK";
6810
+ TableName["MedicalFile"] = "MEDICAL_FILE";
6811
+ TableName["MedicalForm"] = "MEDICAL_FORM";
6812
+ TableName["MedicalInformationForm"] = "MEDICAL_INFORMATION_FORM";
6813
+ TableName["Note"] = "NOTITIE";
6814
+ TableName["NotificationFullyRecovered"] = "NOTIFICATION_FULLY_RECOVERED";
6815
+ TableName["NotificationLongTermIllness"] = "NOTIFICATION_LONG_TERM_ILLNESS";
6816
+ TableName["PaymentCondition"] = "BETALINGSCONDITIES";
6817
+ TableName["PaymentMethod"] = "BETAALWIJZE";
6818
+ TableName["PlanOfApproach"] = "PLAN_OF_APPROACH";
6819
+ TableName["PriceList"] = "PRIJSLIJSTEN";
6820
+ TableName["ProblemAnalysis"] = "PROBLEM_ANALYSIS";
6821
+ TableName["ProblemAnalysisAdjustment"] = "PROBLEM_ANALYSIS_ADJUSTMENT";
6822
+ TableName["Relations"] = "RELATIES";
6823
+ TableName["RelationAddress"] = "ADRES_RELATIES";
6824
+ TableName["RelationCommunication"] = "COMM_RELATIES";
6825
+ TableName["Remarks"] = "OPMERKINGEN";
6826
+ TableName["Salary"] = "SALARY";
6827
+ TableName["ServiceProvision"] = "ASS_DIENSTVERLENING";
6828
+ TableName["ShortReintegrationReport"] = "SHORT_REINTEGRATION_REPORT";
6829
+ TableName["Software"] = "ASS_SOFTWARE";
6830
+ TableName["Supplier"] = "LEVERANCIERS";
6831
+ TableName["TagValues"] = "TAG_VALUES";
6832
+ TableName["Tasks"] = "TAKEN";
6833
+ TableName["Transactions"] = "TRANSACTIES";
6834
+ TableName["TransactionLines"] = "TRANSACTIE_REGELS";
6835
+ TableName["TurnoverGroup"] = "OMZETGROEPEN";
6836
+ TableName["Unit"] = "EENHEDEN";
6837
+ TableName["User"] = "GEBRUIKERS";
6838
+ TableName["Vat"] = "BTW";
6839
+ TableName["Warehouse"] = "MAGAZIJNEN";
6840
+ })(TableName || (TableName = {}));
6841
+
6842
+ function OperationWithAlwaysSuccessCallback(object) {
6843
+ return Promise.resolve(true);
6844
+ }
6845
+
6846
+ // @returns true iff given value equals null or equals undefined
6847
+ function isNill(value) {
6848
+ return value === null || value === undefined;
6849
+ }
6850
+
6851
+ // Static utility function holder related to objects.
6852
+ var ObjectUtils = /** @class */ (function () {
6853
+ function ObjectUtils() {
6854
+ }
6855
+ /**
6856
+ * Returns whether all given values exist: for all values it holds that they are not null nor undefined. Short-circuit check.
6857
+ * @param {any} values Rest parameters with all objects to check existence for.
6858
+ * @returns {boolean} True if ALL given values are not null nor undefined, otherwise false (if at least one value was null or undefined)
6859
+ */
6860
+ ObjectUtils.AllExist = function () {
6861
+ var values = [];
6862
+ for (var _i = 0; _i < arguments.length; _i++) {
6863
+ values[_i] = arguments[_i];
6864
+ }
6865
+ var allExist = true;
6866
+ for (var i = 0, len = values.length; i < len; i++) {
6867
+ if (isNill(values[i])) {
6868
+ allExist = false;
6869
+ break;
6870
+ }
6871
+ }
6872
+ return allExist;
6873
+ };
6874
+ /**
6875
+ * Copies all properties from object 'from' to object 'to'. Overwrites properties on object 'to' if property already exists.
6876
+ * Does not copy functions, only properties.
6877
+ * @param {Object} from The source object from which to copy all properties of to the 'to' object.
6878
+ * @param {Object} to The object to which the properties of the 'from' object will be copied.
6879
+ * @param {boolean} [allowUndefined = true] wether the 'to' object may be assigned null or undefined values to any of its properties.
6880
+ */
6881
+ ObjectUtils.CopyPropertiesFrom = function (from, to, allowUndefined) {
6882
+ if (allowUndefined === void 0) { allowUndefined = true; }
6883
+ if (!to) {
6884
+ to = {};
6885
+ }
6886
+ if (!from) {
6887
+ return to;
6888
+ }
6889
+ ObjectUtils.ForOwnProperty(from, function (value, key) {
6890
+ if (allowUndefined || notNill(value)) {
6891
+ to[key] = value;
6892
+ }
6893
+ });
6894
+ return to;
6895
+ };
6896
+ ObjectUtils.DeepEquals = function (actual, expected) {
6897
+ if (actual === expected) {
6898
+ return true;
6899
+ }
6900
+ else if (actual instanceof Date && expected instanceof Date) {
6901
+ return actual.getTime() === expected.getTime();
6902
+ }
6903
+ else if (!actual || !expected || typeof actual !== "object" && typeof expected !== "object") {
6904
+ return actual === expected;
6905
+ }
6906
+ else {
6907
+ return this._objEquiv(actual, expected);
6908
+ }
6909
+ };
6910
+ // Performs given callback function for each own property of given plain object. Also works on string enums.
6911
+ ObjectUtils.ForOwnProperty = function (plainObject, callback) {
6912
+ if (ObjectUtils.IsPlainObject(plainObject)) {
6913
+ for (var key in plainObject) {
6914
+ if (plainObject.hasOwnProperty(key) && typeof plainObject[key] !== "function") {
6915
+ var response = callback(plainObject[key], key);
6916
+ if (response === false) {
6917
+ break;
6918
+ }
6919
+ }
6920
+ }
6921
+ }
6922
+ };
6923
+ // Returns the class name of given argument. The argument can be an object or a class.
6924
+ ObjectUtils.GetClassName = function (objectOrClass) {
6925
+ if (!objectOrClass) {
6926
+ return undefined;
6927
+ // arg was a class (or a function..)
6928
+ }
6929
+ else if (objectOrClass.constructor === Function) {
6930
+ return objectOrClass.name; // .. which has its readable name stores like this
6931
+ // else arg was an object
6932
+ }
6933
+ else {
6934
+ var constructorString = objectOrClass.constructor.toString();
6935
+ return constructorString.match(/\w+/g)[1];
6936
+ }
6937
+ };
6938
+ // Returns a shallow clone of the given original object. The clone is a SIMPLE OBJECT with the same properties as the original.
6939
+ ObjectUtils.GetShallowClone = function (originalObject, objectClass) {
6940
+ var clonedObject = undefined;
6941
+ if (objectClass) {
6942
+ clonedObject = new objectClass();
6943
+ }
6944
+ else {
6945
+ clonedObject = {};
6946
+ }
6947
+ ObjectUtils.ForOwnProperty(originalObject, function (value, key) {
6948
+ clonedObject[key] = value;
6949
+ });
6950
+ return clonedObject;
6951
+ };
6952
+ ObjectUtils.GetDeepClone = function (originalObject, circular) {
6953
+ if (circular === void 0) { circular = true; }
6954
+ // First create an empty object with
6955
+ // same prototype of our original source
6956
+ var propertyIndex;
6957
+ var descriptor;
6958
+ var keys;
6959
+ var current;
6960
+ var nextSource;
6961
+ var indexOf;
6962
+ var copies = [{
6963
+ source: originalObject,
6964
+ target: Object.create(Object.getPrototypeOf(originalObject))
6965
+ }];
6966
+ var cloneObject = copies[0].target;
6967
+ var sourceReferences = [originalObject];
6968
+ var targetReferences = [cloneObject];
6969
+ // First in, first out
6970
+ while (current = copies.shift()) { //NOSONAR
6971
+ keys = Object.getOwnPropertyNames(current.source);
6972
+ for (propertyIndex = 0; propertyIndex < keys.length; propertyIndex++) {
6973
+ // Save the source's descriptor
6974
+ descriptor = Object.getOwnPropertyDescriptor(current.source, keys[propertyIndex]);
6975
+ if (!descriptor.value || typeof descriptor.value !== "object") {
6976
+ Object.defineProperty(current.target, keys[propertyIndex], descriptor);
6977
+ continue;
6978
+ }
6979
+ nextSource = descriptor.value;
6980
+ descriptor.value = Array.isArray(nextSource) ?
6981
+ [] :
6982
+ Object.create(Object.getPrototypeOf(nextSource));
6983
+ if (circular) {
6984
+ indexOf = sourceReferences.indexOf(nextSource);
6985
+ if (indexOf !== -1) {
6986
+ // The source is already referenced, just assign reference
6987
+ descriptor.value = targetReferences[indexOf];
6988
+ Object.defineProperty(current.target, keys[propertyIndex], descriptor);
6989
+ continue;
6990
+ }
6991
+ sourceReferences.push(nextSource);
6992
+ targetReferences.push(descriptor.value);
6993
+ }
6994
+ Object.defineProperty(current.target, keys[propertyIndex], descriptor);
6995
+ copies.push({ source: nextSource, target: descriptor.value });
6996
+ }
6997
+ }
6998
+ return cloneObject;
6999
+ };
7000
+ ObjectUtils.IsEmpty = function (obj) {
7001
+ return isNill(obj) || Object.getOwnPropertyNames(obj).length === 0;
7002
+ };
7003
+ // 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.
7004
+ ObjectUtils.IsPlainObject = function (object) {
7005
+ return object !== null && !Array.isArray(object) && typeof object !== "function" && typeof object === "object";
7006
+ };
7007
+ /**
7008
+ * Returns an instance of given class with data of given dataObject. Only works if that class has a default constructor without args.
7009
+ * Does not actually create a new object if it alread is an instance of that class.
7010
+ * @param {any} clazz A class that has a default constructor
7011
+ * @param {any} [dataObject] The object with data to copy to the new instance of the class
7012
+ * @returns {any} An object that is an instance of given class, with given data applied to it.
7013
+ */
7014
+ ObjectUtils.MakeInstanceOf = function (clazz, dataObject) {
7015
+ // dont make a clone if given dataObject already instance of clazz
7016
+ if (dataObject instanceof clazz) {
7017
+ return dataObject;
7018
+ }
7019
+ else {
7020
+ var asClazz = new clazz();
7021
+ ObjectUtils.CopyPropertiesFrom(dataObject, asClazz);
7022
+ return asClazz;
7023
+ }
7024
+ };
7025
+ // Returns the value of a random own property of given object.
7026
+ ObjectUtils.PickRandomPropertyValue = function (object) {
7027
+ if (!object) {
7028
+ return;
7029
+ }
7030
+ var result;
7031
+ var count = 0;
7032
+ for (var prop in object) {
7033
+ if (object.hasOwnProperty(prop)) {
7034
+ count++;
7035
+ if (Math.random() < 1 / count) {
7036
+ result = object[prop];
7037
+ }
7038
+ }
7039
+ }
7040
+ return result;
7041
+ };
7042
+ // Returns a default if given value doesn't exist, otherwise just value.
7043
+ ObjectUtils.ValueOrDefault = function (value, defaultReturnVal) {
7044
+ if (defaultReturnVal === void 0) { defaultReturnVal = ""; }
7045
+ return notNill(value) ? value : defaultReturnVal;
7046
+ };
7047
+ ObjectUtils._isArguments = function (x) {
7048
+ var supportsArgsClass = this._supportsArgumentsClass();
7049
+ return supportsArgsClass ? this._isArgumentsWhenArgsClassSupported(x) : this._isArgumentsWhenArgsClassNotSupported(x);
7050
+ };
7051
+ ObjectUtils._isArgumentsWhenArgsClassNotSupported = function (object) {
7052
+ return object &&
7053
+ typeof object === "object" &&
7054
+ typeof object.length === "number" &&
7055
+ Object.prototype.hasOwnProperty.call(object, "callee") &&
7056
+ !Object.prototype.propertyIsEnumerable.call(object, "callee") ||
7057
+ false;
7058
+ };
7059
+ ObjectUtils._isArgumentsWhenArgsClassSupported = function (object) {
7060
+ return Object.prototype.toString.call(object) === "[object Arguments]";
7061
+ };
7062
+ ObjectUtils._isBuffer = function (x) {
7063
+ if (!x || typeof x !== "object" || typeof x.length !== "number") {
7064
+ return false;
7065
+ }
7066
+ if (typeof x.copy !== "function" || typeof x.slice !== "function") {
7067
+ return false;
7068
+ }
7069
+ return !(x.length > 0 && typeof x[0] !== "number");
7070
+ };
7071
+ ObjectUtils._isUndefinedOrNull = function (value) {
7072
+ return value === null || value === undefined;
7073
+ };
7074
+ ObjectUtils._objEquiv = function (a, b) {
7075
+ var i, key;
7076
+ if (this._isUndefinedOrNull(a) || this._isUndefinedOrNull(b)) {
7077
+ return false;
7078
+ }
7079
+ if (a.prototype !== b.prototype) {
7080
+ return false;
7081
+ }
7082
+ if (this._isArguments(a)) {
7083
+ if (!this._isArguments(b)) {
7084
+ return false;
7085
+ }
7086
+ a = Array.prototype.slice.call(a);
7087
+ b = Array.prototype.slice.call(b);
7088
+ return this.DeepEquals(a, b);
7089
+ }
7090
+ if (this._isBuffer(a)) {
7091
+ if (!this._isBuffer(b)) {
7092
+ return false;
7093
+ }
7094
+ if (a.length !== b.length) {
7095
+ return false;
7096
+ }
7097
+ for (i = 0; i < a.length; i++) {
7098
+ if (a[i] !== b[i]) {
7099
+ return false;
7100
+ }
7101
+ }
7102
+ return true;
7103
+ }
7104
+ var ka;
7105
+ var kb;
7106
+ try {
7107
+ ka = Object.keys(a);
7108
+ kb = Object.keys(b);
7109
+ }
7110
+ catch (e) {
7111
+ return false;
7112
+ }
7113
+ if (ka.length !== kb.length) {
7114
+ return false;
7115
+ }
7116
+ ka.sort();
7117
+ kb.sort();
7118
+ for (i = ka.length - 1; i >= 0; i--) {
7119
+ if (ka[i] !== kb[i]) {
7120
+ return false;
7121
+ }
7122
+ }
7123
+ for (i = ka.length - 1; i >= 0; i--) {
7124
+ key = ka[i];
7125
+ if (!this.DeepEquals(a[key], b[key])) {
7126
+ return false;
7127
+ }
7128
+ }
7129
+ return typeof a === typeof b;
7130
+ };
7131
+ ObjectUtils._supportsArgumentsClass = function () {
7132
+ return Object.prototype.toString.call(arguments) === "[object Arguments]";
7133
+ };
7134
+ return ObjectUtils;
7135
+ }());
7136
+
7137
+ // Static utility function holder related to numeric variable evaluations and operations.
7138
+ var NumberUtils = /** @class */ (function () {
7139
+ function NumberUtils() {
7140
+ }
7141
+ // For user-typed number input; supports comma's as decimal delimiter.
7142
+ NumberUtils.ParseIntNumberInput = function (arg) {
7143
+ return NumberUtils.ParseInt(NumberUtils._NumberInputToNumberStr(arg));
7144
+ };
7145
+ // Parses given argument to an integer, using a native parseInt() function with a radix of 10. Returns NaN if parsing was not possible.
7146
+ NumberUtils.ParseInt = function (arg) {
7147
+ if (isNill(arg) || Array.isArray(arg)) {
7148
+ return undefined;
7149
+ }
7150
+ return parseInt(arg, 10);
7151
+ };
7152
+ // For user-typed number input; supports comma's as decimal delimiter.
7153
+ NumberUtils.ParseFloatNumberInput = function (arg, decimalPrecision) {
7154
+ if (decimalPrecision === void 0) { decimalPrecision = 2; }
7155
+ return NumberUtils.ParseFloat(NumberUtils._NumberInputToNumberStr(arg), decimalPrecision);
7156
+ };
7157
+ NumberUtils.ParseFloatNumberInputKeepPrecision = function (arg) {
7158
+ var correctedInputStr = NumberUtils._NumberInputToNumberStr(arg);
7159
+ var decimalPrecision = this.GetDecimalPlaces(correctedInputStr);
7160
+ return NumberUtils.ParseFloat(correctedInputStr, decimalPrecision);
7161
+ };
7162
+ /**
7163
+ * Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
7164
+ *
7165
+ * @param {any} arg The argument to parse to a float
7166
+ * @param {number} decimalPrecision The number of decimals, or the precision, the parsed return float should have
7167
+ * @returns {number} NaN if not possible, else the parsed float value
7168
+ */
7169
+ NumberUtils.ParseFloat = function (arg, decimalPrecision) {
7170
+ if (decimalPrecision === void 0) { decimalPrecision = 2; }
7171
+ if (!ObjectUtils.AllExist(arg, decimalPrecision) || Array.isArray(arg)) {
7172
+ return NaN;
7173
+ }
7174
+ if (!NumberUtils.IsInteger(decimalPrecision) || decimalPrecision < 0) {
7175
+ decimalPrecision = 2;
7176
+ // toFixed() can only handle up until 20
7177
+ }
7178
+ else if (decimalPrecision > 20) {
7179
+ decimalPrecision = 20;
7180
+ }
7181
+ return parseFloat(parseFloat(arg).toFixed(decimalPrecision));
7182
+ };
7183
+ /**
7184
+ * Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
7185
+ *
7186
+ * @param arg The argument to parse to a float
7187
+ * @returns {number} The argument as a float with its original decimal precision intact
7188
+ */
7189
+ NumberUtils.ParseFloatKeepPrecision = function (arg) {
7190
+ var decimalPrecision = this.GetDecimalPlaces(arg);
7191
+ return this.ParseFloat(arg, decimalPrecision);
7192
+ };
7193
+ /**
7194
+ * Returns the given argument as a number. Returns given defaultValue if conversion of argument was impossible.
7195
+ * @param arg
7196
+ * @param {number} [defaultValue = 0]
7197
+ * @returns {number}
7198
+ */
7199
+ NumberUtils.ParseNumberOrDefault = function (arg, defaultValue) {
7200
+ if (defaultValue === void 0) { defaultValue = 0; }
7201
+ if (Array.isArray(arg)) {
7202
+ return defaultValue;
7203
+ }
7204
+ if (!NumberUtils.IsNumber(arg)) {
7205
+ arg = parseFloat(arg);
7206
+ arg = isNaN(arg) ? defaultValue : arg;
7207
+ }
7208
+ return arg;
7209
+ };
7210
+ // Returns true iff given argument is an integer number. Returns false on non-numbers or numbers with significant decimals.
7211
+ NumberUtils.IsInteger = function (arg) {
7212
+ if (isNaN(arg) || Array.isArray(arg)) {
7213
+ return false;
7214
+ }
7215
+ var argAsFloat = parseFloat(arg);
7216
+ return ((argAsFloat | 0) === argAsFloat); // returns whether 'arg converted to an integer equals arg'
7217
+ };
7218
+ // Returns the number of decimal places of the given number. Returns 0 if no decimals whatsoever could be found on given arg.
7219
+ NumberUtils.GetDecimalPlaces = function (arg, maxAnswer) {
7220
+ if (maxAnswer === void 0) { maxAnswer = 1000; }
7221
+ var match = ("" + arg).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
7222
+ if (!match) {
7223
+ return 0;
7224
+ }
7225
+ var answer = Math.max(0,
7226
+ // number of digits right of decimal point.
7227
+ (match[1] ? match[1].length : 0)
7228
+ // adjust for scientific notation
7229
+ - (match[2] ? +match[2] : 0));
7230
+ if (answer > maxAnswer) {
7231
+ answer = maxAnswer;
7232
+ }
7233
+ return answer;
7234
+ };
7235
+ // Parses given numberInput to a number, or returns given defaultValue if parse not possible. Allows ',' char as decimal delimiter.
7236
+ NumberUtils.ParseNumberInputOrDefault = function (numberInput, defaultValue) {
7237
+ if (defaultValue === void 0) { defaultValue = 0; }
7238
+ return NumberUtils.ParseNumberOrDefault(NumberUtils._NumberInputToNumberStr(numberInput), defaultValue);
7239
+ };
7240
+ // Returns whether the type of given argument is 'number'.
7241
+ NumberUtils.IsNumber = function (arg) {
7242
+ return typeof arg === "number" && !isNaN(arg);
7243
+ };
7244
+ /**
7245
+ * Returns whether given arg is indeed not a number (it's NaN or it has another type than 'number')
7246
+ * Our exact copy of AS Flex'es isNaN(arg) function. Always use this method for copying Flex isNaN(..) occurences into TypeScript.
7247
+ * @param arg
7248
+ * @returns {boolean}
7249
+ * @constructor
7250
+ */
7251
+ NumberUtils.IsNaN = function (arg) {
7252
+ return isNaN(arg) || !NumberUtils.IsNumber(arg);
7253
+ };
7254
+ // Our copy of CoMath.NaN. Returns number, or substitute if NumberUtils.IsNaN(number) holds true.
7255
+ NumberUtils.NaN = function (number, substitute) {
7256
+ if (substitute === void 0) { substitute = 0; }
7257
+ return NumberUtils.IsNaN(number) ? substitute : number;
7258
+ };
7259
+ // Returns whether the value is parasable as a number.
7260
+ NumberUtils.IsParsableNumber = function (arg) {
7261
+ if (Array.isArray(arg)) {
7262
+ return false;
7263
+ }
7264
+ return !isNaN(parseFloat(arg));
7265
+ };
7266
+ NumberUtils.IsParsableNumberInput = function (numberInput) {
7267
+ return NumberUtils.IsParsableNumber(NumberUtils._NumberInputToNumberStr(numberInput));
7268
+ };
7269
+ /**
7270
+ * Returns whether given arg is parseable as a number, and whether the lengts of its number parse result is equal to its original length.
7271
+ * I.e. this function returns FALSE with given number-parsable strings, but that have non-numeric appendices, eg '2233ff'. That arg
7272
+ * IS number-parseable, but not a strict 'string number', the latter being what this method actually checks for.
7273
+ */
7274
+ NumberUtils.IsStringNumber = function (arg) {
7275
+ if (!NumberUtils.IsParsableNumber(arg)) {
7276
+ return false;
7277
+ }
7278
+ else {
7279
+ return arg.toString().length === parseFloat(arg).toString().length;
7280
+ }
7281
+ };
7282
+ NumberUtils.IsListOfNumbers = function (arg, separator) {
7283
+ if (separator === void 0) { separator = ","; }
7284
+ var nrs = arg.split(separator);
7285
+ if (nrs.length === 0) {
7286
+ return false;
7287
+ }
7288
+ return nrs.filter(function (s) { return NumberUtils.IsStringNumber(s); }).length === nrs.length;
7289
+ };
7290
+ // Returns given argument as a string representation of a number parse, e.g. "1" for a number parse result of arg to 1.
7291
+ NumberUtils.ParseStringNumber = function (arg) {
7292
+ if (!this.IsStringNumber(arg)) {
7293
+ return NaN;
7294
+ }
7295
+ return NumberUtils.ParseFloatKeepPrecision(arg);
7296
+ };
7297
+ NumberUtils.ParseStringNumberDefault = function (arg, defaultValue) {
7298
+ if (defaultValue === void 0) { defaultValue = 0; }
7299
+ return NumberUtils.NaN(NumberUtils.ParseStringNumber(arg), defaultValue);
7300
+ };
7301
+ /**
7302
+ * Returns a random integer in range [lowerBound .. upperBound], an inclusive range. Returns NaN if not possible.
7303
+ * Given bounds are truncated first, before serving as the true lower- and upper bounds for the random int.
7304
+ */
7305
+ NumberUtils.RandomInt = function (lowerBoundInt, upperBoundInt) {
7306
+ if (!NumberUtils.IsNumber(lowerBoundInt) || !NumberUtils.IsNumber(upperBoundInt) || lowerBoundInt > upperBoundInt) {
7307
+ return NaN;
7308
+ }
7309
+ lowerBoundInt = Math.trunc(lowerBoundInt);
7310
+ upperBoundInt = Math.trunc(upperBoundInt);
7311
+ if (lowerBoundInt === upperBoundInt) {
7312
+ return lowerBoundInt;
7313
+ }
7314
+ var delta = upperBoundInt - lowerBoundInt;
7315
+ return (Math.round(Math.random() * delta) + lowerBoundInt);
7316
+ };
7317
+ // Adds thousands comma's to given value, E.g. '1000' to '1,000'. Returns empty string if value was undefined.
7318
+ NumberUtils.AddThousandsCommasTo = function (value) {
7319
+ if (isNill(value)) {
7320
+ return "";
7321
+ }
7322
+ return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
7323
+ };
7324
+ /**
7325
+ * Function used to check wether a given number is composed of another number, power-of-two wise.
7326
+ * Example usage: NumberUtils.NumIsComposedOf(articleListObject.publication, ArticlePublication.Selector).
7327
+ * This would return whether or not that articleListObject was publicated for selector or not, where articleListObject.publication
7328
+ * was possibly a 'COMPOSITE that was made out of (including)' ArticlePublication.Selector.
7329
+ */
7330
+ NumberUtils.NumIsComposedOfOtherPowTwoNum = function (bigNrToCheck, powTwoNumItShouldBeComposedOf) {
7331
+ if (!bigNrToCheck) {
7332
+ return false;
7333
+ }
7334
+ else if (!powTwoNumItShouldBeComposedOf) {
7335
+ return true;
7336
+ }
7337
+ else {
7338
+ return ((bigNrToCheck & powTwoNumItShouldBeComposedOf) === powTwoNumItShouldBeComposedOf);
7339
+ }
7340
+ };
7341
+ /**
7342
+ * Returns given nr, or the given default number (default 0) if the nr number was undefined or otherwise not a number.
7343
+ * Same as CoMath.NaN from AS code (used as its substitute in transaction logic)
7344
+ * @param nr
7345
+ * @param defaultNr
7346
+ * @returns {number}
7347
+ */
7348
+ NumberUtils.NrOrDefault = function (nr, defaultNr) {
7349
+ if (defaultNr === void 0) { defaultNr = 0; }
7350
+ if (notNill(nr) && NumberUtils.IsNumber(nr)) {
7351
+ return nr;
7352
+ }
7353
+ else {
7354
+ return defaultNr;
7355
+ }
7356
+ };
7357
+ /**
7358
+ * Returns whether given nrToCheck is within the given precision and scale limits. Precision and scale, here, are Oracle DB terms.
7359
+ * This function can thus be used to check whether the given number is safe to send to the 'database' beforehand, if we know the
7360
+ * precision and scale of the number in the db declaration.
7361
+ *
7362
+ * I.e. A number declared in the Oracle DB as number(5, 2) has a precision of 5 and a scale of 2.
7363
+ *
7364
+ * @param {number} nrToCheck
7365
+ * @param {number} precision The number of significant digits, including possibly negative scale. E.g. 3 in '123' and 5 in '51.123'
7366
+ * @param {number} [scale = 0] The number of significant digits AFTER the decimal point. E.g. 1 in 5432.1 and 3 in 54000.003
7367
+ * @returns {CheckPrecisionAndScaleResult} Whether given nrToCheck is ok for given precision and scale, and if not, the
7368
+ * nearest number that IS ok for those constraints.
7369
+ */
7370
+ NumberUtils.CheckPrecisionAndScale = function (nrToCheck, precision, scale) {
7371
+ if (scale === void 0) { scale = 0; }
7372
+ // let's say any undefined number is checked OK, and all numbers are checked OK for an undefined precision
7373
+ if (!ObjectUtils.AllExist(nrToCheck, precision, scale)) {
7374
+ return { isOk: true, nearestOkNr: NaN };
7375
+ }
7376
+ // no number can have 0 or less than 0 significant digits, in our universe
7377
+ if (precision < 1 || precision - scale < 1) {
7378
+ return { isOk: false, nearestOkNr: NaN };
7379
+ }
7380
+ // begin check
7381
+ var isNegative = (nrToCheck < 0);
7382
+ var nrParts = nrToCheck.toString().split(".");
7383
+ // remove minus sign if negative
7384
+ if (isNegative) {
7385
+ nrParts[0] = nrParts[0].slice(1);
7386
+ }
7387
+ var numCountBeforeDot = nrParts[0].length;
7388
+ var allowedNumCountBeforeDot = precision - scale;
7389
+ if (numCountBeforeDot <= allowedNumCountBeforeDot) {
7390
+ return { isOk: true, nearestOkNr: nrToCheck };
7391
+ }
7392
+ else {
7393
+ // cut a part from the "before decimal number" so that the number is not too big anymore
7394
+ var numCountToRemove = numCountBeforeDot - allowedNumCountBeforeDot;
7395
+ // remove the right-most numbers before the decimal dot
7396
+ nrParts[0] = nrParts[0].slice(0, -1 * numCountToRemove);
7397
+ // add minus sign again if it was negative
7398
+ if (isNegative) {
7399
+ nrParts[0] = "-" + nrParts[0];
7400
+ }
7401
+ // build and return composite number again
7402
+ var nearestOkNr = void 0;
7403
+ if (nrParts[1]) {
7404
+ nearestOkNr = Number(nrParts[0] + "." + nrParts[1]);
7405
+ }
7406
+ else {
7407
+ nearestOkNr = Number(nrParts[0]);
7408
+ }
7409
+ return { isOk: false, nearestOkNr: nearestOkNr };
7410
+ }
7411
+ };
7412
+ /**
7413
+ * Returns whether given x is OK within the given min, max and step boundaries, where it should hold that nrToCheck = min + N * step,
7414
+ * with N integer or 0.
7415
+ * @param {number} nrToCheck Number to check whether it's within the given bounds
7416
+ * @param min Inclusive
7417
+ * @param max Inclusive
7418
+ * @param stepSize
7419
+ * @returns {CheckWithinSteppedBounds} Returns remainder of undefined when nrToCheck was OUTSIDE [min, max], else full result object.
7420
+ */
7421
+ NumberUtils.CheckWithinSteppedBounds = function (nrToCheck, min, max, stepSize) {
7422
+ if (stepSize === void 0) { stepSize = 1; }
7423
+ if (nrToCheck < min || nrToCheck > max) {
7424
+ return { isOk: false, remainder: undefined };
7425
+ }
7426
+ // we're in [min, max], but still check if nrToCheck = min + N * step holds (for N integer or 0)
7427
+ var remainder = (nrToCheck - min) % stepSize;
7428
+ // correct float for largest precision amongst input numbers
7429
+ remainder = NumberUtils.ParseFloat(remainder, NumberUtils._GetLargestDecimalPrecisionOf(nrToCheck, min, stepSize));
7430
+ return { isOk: (remainder === 0), remainder: remainder };
7431
+ };
7432
+ /**
7433
+ * Finds the number closest to the originalNumber, that adheres to the given bounds. That is, for which it holds that
7434
+ * nr = min + N * step with N integer or 0.
7435
+ * @param {number} originalNr Find closest answer to this number
7436
+ * @param min Inclusive
7437
+ * @param max Inclusive
7438
+ * @param stepSize
7439
+ * @returns {boolean} The closest OK number for bounds.
7440
+ */
7441
+ NumberUtils.GetNearestNumberWithinSteppedBounds = function (originalNr, min, max, stepSize) {
7442
+ if (stepSize === void 0) { stepSize = 1; }
7443
+ if (originalNr < min) {
7444
+ return min;
7445
+ }
7446
+ else if (originalNr > max) {
7447
+ return NumberUtils.GetTrueSteppedBoundsMax(min, max, stepSize);
7448
+ }
7449
+ var boundsCheck = NumberUtils.CheckWithinSteppedBounds(originalNr, min, max, stepSize);
7450
+ if (boundsCheck.isOk) {
7451
+ return originalNr;
7452
+ }
7453
+ var answer;
7454
+ var remainder = boundsCheck.remainder;
7455
+ if (remainder) {
7456
+ // round up or down?
7457
+ if ((remainder / stepSize) < 0.5) {
7458
+ // round down, but not below min
7459
+ answer = (originalNr - remainder >= min ? originalNr - remainder : min);
7460
+ }
7461
+ else {
7462
+ // round up, but not above max
7463
+ answer = (originalNr + stepSize - remainder <= max ? originalNr + stepSize - remainder :
7464
+ NumberUtils.GetTrueSteppedBoundsMax(min, max, stepSize));
7465
+ }
7466
+ }
7467
+ else {
7468
+ // is this real life, why wasn't our stepped bounds check OK?
7469
+ answer = originalNr;
7470
+ }
7471
+ // 'correct' float errors
7472
+ answer = NumberUtils.ParseFloat(answer, NumberUtils._GetLargestDecimalPrecisionOf(originalNr, min, max, stepSize));
7473
+ return answer;
7474
+ };
7475
+ /**
7476
+ * Returns the true maximum allowed value for the given "stepped bounds": min, stepSize and max, for which it holds that each allowed
7477
+ * value Y = min + stepSize * N, for any INTEGER or 0 N where it also holds, of course, that Y <= max.
7478
+ * @param min
7479
+ * @param max
7480
+ * @param stepSize
7481
+ */
7482
+ NumberUtils.GetTrueSteppedBoundsMax = function (min, max, stepSize) {
7483
+ if (stepSize === void 0) { stepSize = 1; }
7484
+ // solve max integer X in formula min + X * step <= max, and return min + X * stepSize for that X
7485
+ var maxSteps = Math.floor((max - min) / stepSize);
7486
+ // 'correct' float errors
7487
+ return NumberUtils.ParseFloat(min + maxSteps * stepSize, NumberUtils._GetLargestDecimalPrecisionOf(min, min, max));
7488
+ };
7489
+ // Returns the nearest number, relative to the given originalNr, that is within the given [min, max] inclusive bounds.
7490
+ NumberUtils.GetNearestNumberWithinBounds = function (originalNr, min, max) {
7491
+ var answer = originalNr;
7492
+ if (originalNr < min) {
7493
+ answer = min;
7494
+ }
7495
+ else if (originalNr > max) {
7496
+ answer = max;
7497
+ }
7498
+ return answer;
7499
+ };
7500
+ // Returns the string representation of given number. If it's not a number, returns the empty string.
7501
+ NumberUtils.ToString = function (nr) {
7502
+ if (!NumberUtils.IsNaN(nr)) {
7503
+ return "" + nr;
7504
+ }
7505
+ else {
7506
+ return "";
7507
+ }
7508
+ };
7509
+ NumberUtils.DecimalsToStepIncrement = function (numberOfDecimals) {
7510
+ return Math.pow(10, -1 * numberOfDecimals);
7511
+ };
7512
+ NumberUtils.Round = function (value, decimals) {
7513
+ var factor = Math.pow(10, decimals);
7514
+ return Math.round(value * factor) / factor;
7515
+ };
7516
+ // @returns The inclusive max value
7517
+ NumberUtils.PrecisionScaleToMaxValue = function (precision, scale) {
7518
+ var oneStep = this.DecimalsToStepIncrement(scale);
7519
+ var maxExclusive = Math.pow(10, precision - scale);
7520
+ return maxExclusive - oneStep;
7521
+ };
7522
+ // @returns the difference between given 2 numbers
7523
+ NumberUtils.DifferenceBetweenNumbers = function (numberA, numberB) {
7524
+ return Math.abs(numberA - numberB);
7525
+ };
7526
+ NumberUtils._GetLargestDecimalPrecisionOf = function () {
7527
+ var args = [];
7528
+ for (var _i = 0; _i < arguments.length; _i++) {
7529
+ args[_i] = arguments[_i];
7530
+ }
7531
+ var result = ArrayUtils.GetMaxCalculatedValue(args, function (arg) {
7532
+ return NumberUtils.GetDecimalPlaces(arg);
7533
+ });
7534
+ return result;
7535
+ };
7536
+ // Returns given number input as a number that's useable by Javascript. Allows for incoming ',' decimal delimiter.
7537
+ NumberUtils._NumberInputToNumberStr = function (numberInput) {
7538
+ return (numberInput + "").replace(",", ".");
7539
+ };
7540
+ return NumberUtils;
7541
+ }());
7542
+
7543
+ var ArrayUtils = /** @class */ (function () {
7544
+ function ArrayUtils() {
7545
+ }
7546
+ /**
7547
+ * Returns whether at least one element in given array could be found by given finder function.
7548
+ *
7549
+ * @param {T[]} array
7550
+ * @param {(element: T) => boolean} finder A finder function that takes an element of the array and returns a boolean that represents
7551
+ * the 'found status' for that element; whether it should have been found or not.
7552
+ */
7553
+ ArrayUtils.ContainsAnElementFoundBy = function (array, finder) {
7554
+ if (!array || !finder) {
7555
+ return false;
7556
+ }
7557
+ return notNill(this.Find(array, finder));
7558
+ };
7559
+ /**
7560
+ * Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
7561
+ * undefined when none was found.
7562
+ *
7563
+ * Example usage:
7564
+ * const foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
7565
+ * (return modelItem.getId() === '1')
7566
+ * * });
7567
+ *
7568
+ * @param array The array with items to search in.
7569
+ * @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
7570
+ */
7571
+ ArrayUtils.Find = function (array, foundBy) {
7572
+ if (!array || !foundBy) {
7573
+ return undefined;
7574
+ }
7575
+ for (var i = 0, len = array.length; i < len; i++) {
7576
+ var itemCur = array[i];
7577
+ if (foundBy(itemCur)) {
7578
+ return itemCur;
7579
+ }
7580
+ }
7581
+ return undefined;
7582
+ };
7583
+ // @returns empty array when nothing found, otherwise array with found items
7584
+ ArrayUtils.FindAll = function (array, foundBy) {
7585
+ var answer = [];
7586
+ if (!array || !foundBy) {
7587
+ return answer;
7588
+ }
7589
+ for (var i = 0, len = array.length; i < len; i++) {
7590
+ var itemCur = array[i];
7591
+ if (foundBy(itemCur)) {
7592
+ answer.push(itemCur);
7593
+ }
7594
+ }
7595
+ return answer;
7596
+ };
7597
+ // returns a simple clone of given array, using array.slice(0)
7598
+ ArrayUtils.CloneArray = function (array) {
7599
+ var answer = [];
7600
+ if (array) {
7601
+ answer = array.slice(0);
7602
+ }
7603
+ return answer;
7604
+ };
7605
+ /**
7606
+ * Returns a 'semi deep clone' of given array. Its first-level members are object-shallow-cloned (optionally with a strongly typed constructor),
7607
+ * or just as plain object (see param arrayItemsClass).
7608
+ * @param array
7609
+ * @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
7610
+ * it'll be a plain object.
7611
+ * @param deepClone Set to true if array items contain FUNCTIONS that need to be cloned..
7612
+ * @returns {Array} semi-deep clone of given array
7613
+ */
7614
+ ArrayUtils.CloneArrayAndItsItems = function (array, arrayItemsClass, deepClone) {
7615
+ if (deepClone === void 0) { deepClone = false; }
7616
+ var cloneArray = [];
7617
+ if (array) {
7618
+ for (var i = 0, len = array.length; i < len; i++) {
7619
+ if (deepClone) {
7620
+ cloneArray.push(ObjectUtils.GetDeepClone(array[i]));
7621
+ }
7622
+ else {
7623
+ cloneArray.push(ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
7624
+ }
7625
+ }
7626
+ }
7627
+ else {
7628
+ return [];
7629
+ }
7630
+ return cloneArray;
7631
+ };
7632
+ /**
7633
+ * Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
7634
+ * removes the element using splice().
7635
+ *
7636
+ * @param {number} index
7637
+ * @param {any[]} array in-out
7638
+ * @returns {boolean} True if and only if the element on given index is succesfully removed from given array.
7639
+ */
7640
+ ArrayUtils.RemoveElementAtIndex = function (index, array) {
7641
+ if (NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
7642
+ return false;
7643
+ }
7644
+ if (index in array) {
7645
+ array.splice(index, 1);
7646
+ return true;
7647
+ }
7648
+ else {
7649
+ return false;
7650
+ }
7651
+ };
7652
+ /**
7653
+ * Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really removes the
7654
+ * element using splice(). Also works on associative arrays.
7655
+ *
7656
+ * @param {T} element The element to remove.
7657
+ * @param {T[]} array The array to remove the element from.
7658
+ * @returns {boolean} True iff given element was truly successfully removed from given array.
7659
+ */
7660
+ ArrayUtils.RemoveElement = function (element, array) {
7661
+ if (!Array.isArray(array)) {
7662
+ return false;
7663
+ }
7664
+ var index = array.indexOf(element);
7665
+ return ArrayUtils.RemoveElementAtIndex(index, array);
7666
+ };
7667
+ // 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.
7668
+ ArrayUtils.IsArrayWithElements = function (arrayToCheck, classItemsMustBeInstanceOf) {
7669
+ if (isNill(arrayToCheck)) {
7670
+ return false;
7671
+ }
7672
+ if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
7673
+ if (classItemsMustBeInstanceOf) {
7674
+ return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
7675
+ }
7676
+ else {
7677
+ return true;
7678
+ }
7679
+ }
7680
+ else {
7681
+ return false;
7682
+ }
7683
+ };
7684
+ // Removes all elements from given array for which given filter function holds true. Returns true if at least one removed, else false.
7685
+ ArrayUtils.RemoveElementsByFilter = function (array, filterFunction) {
7686
+ if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
7687
+ return false;
7688
+ }
7689
+ var atLeastOneRemoved = false;
7690
+ var len = array.length;
7691
+ for (var i = len - 1; i >= 0; i--) {
7692
+ var item = array[i];
7693
+ if (filterFunction.call(this, item) === true) {
7694
+ array.splice(i, 1);
7695
+ atLeastOneRemoved = true;
7696
+ }
7697
+ }
7698
+ return atLeastOneRemoved;
7699
+ };
7700
+ ArrayUtils.MoveElement = function (element, toIndex, array) {
7701
+ if (!Array.isArray(array) || isNill(toIndex)) {
7702
+ return false;
7703
+ }
7704
+ var fromIndex = array.indexOf(element);
7705
+ var toIndexCorrected = NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
7706
+ if (fromIndex === -1 || array[toIndexCorrected] === element) {
7707
+ // element did not exist in given array, or already existed on given toIndex
7708
+ return false;
7709
+ }
7710
+ array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
7711
+ return true;
7712
+ };
7713
+ // PRE: elements exists in given array. POST: given elementToPlace has a lower index than given afterThisElement. Array is in-out manipulated.
7714
+ ArrayUtils.PlaceElementAfterOther = function (array, elementToPlace, afterThisElement) {
7715
+ if (array) {
7716
+ var afterThisElIdx = array.indexOf(afterThisElement);
7717
+ var elToPlaceIdx = array.indexOf(elementToPlace);
7718
+ if (afterThisElIdx >= elToPlaceIdx) {
7719
+ ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
7720
+ }
7721
+ }
7722
+ };
7723
+ /**
7724
+ * Returns max value from all resulting values from applying given itemValueFunction to all items of given array.
7725
+ * @param array
7726
+ * @param itemValueFunction The function applied to each array item that gives it a numerical value. The max num val found is returned.
7727
+ */
7728
+ ArrayUtils.GetMaxCalculatedValue = function (array, itemValueFunction) {
7729
+ if (!array || !itemValueFunction) {
7730
+ return NaN;
7731
+ }
7732
+ var max = undefined;
7733
+ var len = array.length;
7734
+ for (var i = 0; i < len; i++) {
7735
+ var valueCur = itemValueFunction.call(this);
7736
+ if (valueCur > max) {
7737
+ max = valueCur;
7738
+ }
7739
+ }
7740
+ return max;
7741
+ };
7742
+ return ArrayUtils;
7743
+ }());
7744
+
7745
+ // Static utility function holder related to ref codes and string enums (as in our string enum representations of the db table REF_CODE).
7746
+ var RefCodeUtils = /** @class */ (function () {
7747
+ function RefCodeUtils() {
7748
+ }
7749
+ // Returns true if given valueToCheck is a composition of the second numeric argument. Usesul for checking user rights, for instance.
7750
+ RefCodeUtils.Check = function (valueToCheck, powTwoNumToCheckAgainst) {
7751
+ return NumberUtils.NumIsComposedOfOtherPowTwoNum(valueToCheck, powTwoNumToCheckAgainst);
7752
+ };
7753
+ /**
7754
+ * Returns true if given number value is a composition of at least one of the rest numeric arguments. Usesul for checking user rights,
7755
+ * for instance, or any other numerical composite refcode.
7756
+ */
7757
+ RefCodeUtils.CheckAny = function (valueToCheck) {
7758
+ var powTwoNumsToCheckAgainst = [];
7759
+ for (var _i = 1; _i < arguments.length; _i++) {
7760
+ powTwoNumsToCheckAgainst[_i - 1] = arguments[_i];
7761
+ }
7762
+ var len = powTwoNumsToCheckAgainst.length;
7763
+ for (var i = 0; i < len; i++) {
7764
+ if (RefCodeUtils.Check(valueToCheck, powTwoNumsToCheckAgainst[i])) {
7765
+ return true;
7766
+ }
7767
+ }
7768
+ return false;
7769
+ };
7770
+ RefCodeUtils.GetMultiRefCodeChoices = function (multiRefCode) {
7771
+ var choices = [];
7772
+ // magic number 22 was chosen as a 'high' power of two, i.e. we don't expect multi ref codes with more than 21 options
7773
+ var powTwoExponent = 22;
7774
+ var powTwoVal = Math.pow(2, powTwoExponent);
7775
+ var remainder = multiRefCode;
7776
+ while (remainder > 0) {
7777
+ if (remainder - powTwoVal >= 0) {
7778
+ choices.push(powTwoVal);
7779
+ remainder -= powTwoVal;
7780
+ }
7781
+ powTwoExponent--;
7782
+ powTwoVal = Math.pow(2, powTwoExponent);
7783
+ }
7784
+ choices.reverse();
7785
+ return choices;
7786
+ };
7787
+ RefCodeUtils.GetNumbersArraySum = function (numbersArray) {
7788
+ if (!Array.isArray(numbersArray) || numbersArray.length === 0) {
7789
+ return;
7790
+ }
7791
+ var sum = 0;
7792
+ numbersArray.forEach(function (num) {
7793
+ sum += num;
7794
+ });
7795
+ return sum;
7796
+ };
7797
+ return RefCodeUtils;
7798
+ }());
7799
+
7800
+ // DOM_BESTANDSSOORT
7801
+ var FileType;
7802
+ (function (FileType) {
7803
+ // DOC: Document
7804
+ FileType["Document"] = "DOC";
7805
+ // IMG: Afbeelding
7806
+ FileType["Image"] = "IMG";
7807
+ // SDWEB: Digitale handtekening
7808
+ FileType["DigitalSignature"] = "SDWEB";
7809
+ FileType["CollectiveSalaryInfo"] = "LOONSTAAT";
7810
+ //3d model file
7811
+ FileType["ThreeDFile"] = "UNITYWEB";
7812
+ })(FileType || (FileType = {}));
7813
+
7814
+ var CoDocumentSharedFieldLogic = /** @class */ (function () {
7815
+ function CoDocumentSharedFieldLogic() {
7816
+ }
7817
+ CoDocumentSharedFieldLogic.BuildAllDocuments = function (documentation, images) {
7818
+ var allDocuments = [];
7819
+ allDocuments = allDocuments.concat(documentation);
7820
+ allDocuments = allDocuments.concat(images);
7821
+ allDocuments.sort(function (a, b) {
7822
+ return a.index < b.index ? -1 : 1;
7823
+ });
7824
+ return allDocuments;
7825
+ };
7826
+ CoDocumentSharedFieldLogic.BuildImagesAndDocumentation = function (documents) {
7827
+ var images = [];
7828
+ var documentation = [];
7829
+ var len = documents.length;
7830
+ for (var i = 0; i < len; i++) {
7831
+ // re-index documents order
7832
+ documents[i].index = i + 1;
7833
+ if (documents[i].fileType === FileType.Image) {
7834
+ images.push(documents[i]);
7835
+ }
7836
+ else {
7837
+ documentation.push(documents[i]);
7838
+ }
7839
+ }
7840
+ return {
7841
+ images: images,
7842
+ documentation: documentation
7843
+ };
7844
+ };
7845
+ // Returns an index number that is 1 higher than the highest one in the collection
7846
+ CoDocumentSharedFieldLogic.GenerateAvailableIndexNr = function (documents) {
7847
+ var indexNumbers = [];
7848
+ documents.forEach(function (collectionItem) {
7849
+ if (collectionItem && collectionItem.index > -1) {
7850
+ indexNumbers.push(collectionItem.index);
7851
+ }
7852
+ });
7853
+ indexNumbers.sort(function (a, b) {
7854
+ return a - b;
7855
+ });
7856
+ if (indexNumbers && indexNumbers.length > 0) {
7857
+ return indexNumbers[indexNumbers.length - 1] + 1;
7858
+ }
7859
+ else {
7860
+ return 0;
7861
+ }
7862
+ };
7863
+ return CoDocumentSharedFieldLogic;
7864
+ }());
7865
+
7866
+ /**
7867
+ * Property decorator which enables template syntax like "someBoolInput" instead of "[someBoolInput]='true'". Makes use of the fact that
7868
+ * Angular assigns an empty string to the input property in the naked "someBoolInput" template case.
7869
+ */
7870
+ function InputBoolean(bindingPropertyName) {
7871
+ var inputDecorator = i0.Input(bindingPropertyName);
7872
+ return function (target, key) {
7873
+ inputDecorator(target, key);
7874
+ var descriptor = Object.getOwnPropertyDescriptor(target, key) || {};
7875
+ Object.defineProperty(target, key, {
7876
+ get: descriptor.get || function () {
7877
+ return this["__" + key];
7878
+ },
7879
+ set: function (newValue) {
7880
+ var val = InputBooleanDecorator.InputValueToBoolean(newValue);
7881
+ descriptor.set ? descriptor.set(val) : this["__" + key] = val;
7882
+ },
7883
+ enumerable: true,
7884
+ configurable: true
7885
+ });
7886
+ };
7887
+ }
7888
+ // Utility function holder of the InputBooleanDecorator decorator.
7889
+ var InputBooleanDecorator = /** @class */ (function () {
7890
+ function InputBooleanDecorator() {
7891
+ }
7892
+ InputBooleanDecorator.InputValueToBoolean = function (value) {
7893
+ if (StringUtils.IsString(value) && !StringUtils.IsStringWithLength(value)) {
7894
+ return true;
7895
+ }
7896
+ return !!value;
7897
+ };
7898
+ return InputBooleanDecorator;
7899
+ }());
7900
+
7901
+ // Component that shows a full screen dropzone target area
7902
+ var AppFileDropzoneComponent = /** @class */ (function () {
7903
+ function AppFileDropzoneComponent(dictionary, iconCacheService) {
7904
+ this.dictionary = dictionary;
7905
+ this.iconCacheService = iconCacheService;
7906
+ this.icons = exports["ɵbt"];
7907
+ this.Icons = exports["ɵbt"];
7908
+ this._defaultDropActionMessage = "DROP_ZONE_DOCUMENTS";
7909
+ }
7910
+ AppFileDropzoneComponent.prototype.showClass = function () {
7911
+ return true;
7912
+ };
7913
+ AppFileDropzoneComponent.prototype.getDropActionMessage = function () {
7914
+ return this.dictionary.get(this.customDropActionMessage ? this.customDropActionMessage : this._defaultDropActionMessage);
7915
+ };
7916
+ return AppFileDropzoneComponent;
7917
+ }());
7918
+ AppFileDropzoneComponent.decorators = [
7919
+ { type: i0.Component, args: [{
7920
+ selector: "co-app-file-dropzone",
7921
+ template: "\n <div class=\"drop-files-wrapper\">\n <div class=\"description\">\n <span class=\"title\" [textContent]=\"getDropActionMessage()\"></span>\n <span class=\"description\"></span>\n <div class=\"icon-wrapper\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.Dropzone)\"></co-icon>\n </div>\n </div>\n <div class=\"dropzone\"></div>\n </div>\n ",
7922
+ encapsulation: i0.ViewEncapsulation.None
7923
+ },] }
7924
+ ];
7925
+ AppFileDropzoneComponent.ctorParameters = function () { return [
7926
+ { type: DictionaryService },
7927
+ { type: IconCacheService }
7928
+ ]; };
7929
+ AppFileDropzoneComponent.propDecorators = {
7930
+ customDropActionMessage: [{ type: i0.Input }],
7931
+ showClass: [{ type: i0.HostBinding, args: ['class.co-app-file-dropzone',] }]
7932
+ };
7933
+
7934
+ // <b>Enum</b> Encapsulation of the doc numbers to store it in DOCUMENTATIE table, java enum ReportDocKind
7935
+ var DocumentEmailReport;
7936
+ (function (DocumentEmailReport) {
7937
+ DocumentEmailReport[DocumentEmailReport["Orderbevestiging"] = 1] = "Orderbevestiging";
7938
+ DocumentEmailReport[DocumentEmailReport["Afleverbon"] = 2] = "Afleverbon";
7939
+ DocumentEmailReport[DocumentEmailReport["Factuur"] = 4] = "Factuur";
7940
+ DocumentEmailReport[DocumentEmailReport["Bestelbon"] = 8] = "Bestelbon";
7941
+ DocumentEmailReport[DocumentEmailReport["Atelierbon"] = 16] = "Atelierbon";
7942
+ DocumentEmailReport[DocumentEmailReport["Werkbon"] = 32] = "Werkbon";
7943
+ DocumentEmailReport[DocumentEmailReport["Vrachtbrief"] = 64] = "Vrachtbrief";
7944
+ DocumentEmailReport[DocumentEmailReport["Leverindicatie"] = 128] = "Leverindicatie";
7945
+ DocumentEmailReport[DocumentEmailReport["Uitlopende_levering"] = 256] = "Uitlopende_levering";
7946
+ DocumentEmailReport[DocumentEmailReport["Goederen_binnen"] = 512] = "Goederen_binnen";
7947
+ DocumentEmailReport[DocumentEmailReport["Afspraakbevestiging"] = 1024] = "Afspraakbevestiging";
7948
+ DocumentEmailReport[DocumentEmailReport["Herinneringsbestelbon"] = 2048] = "Herinneringsbestelbon";
7949
+ DocumentEmailReport[DocumentEmailReport["Aanmaninglevertijd"] = 4096] = "Aanmaninglevertijd";
7950
+ })(DocumentEmailReport || (DocumentEmailReport = {}));
7951
+
7952
+ // Enum of all domain names (refcodes) from db table CG_REF_CODES2 (2!!) that iOneJS currently uses.
7953
+ var DomainMultipleName;
7954
+ (function (DomainMultipleName) {
7955
+ DomainMultipleName["ArticlePublication"] = "ART_PUBLICATIE";
7956
+ DomainMultipleName["ArticlePublicationSales"] = "ART_PUBLICATIE_VERK";
7957
+ DomainMultipleName["ArticleSyncField"] = "DOM_SYNC_VELDEN";
7958
+ DomainMultipleName["DocumentPublication"] = "DOC_PUBLICATIE";
7959
+ DomainMultipleName["TextType"] = "TEKST_PUBLICATIE";
7960
+ DomainMultipleName["TextPublication"] = "TEKSTSOORT";
7961
+ DomainMultipleName["RotationOption"] = "ART_ROTATION_ALLOWED";
7962
+ DomainMultipleName["WeekDays"] = "WEEKDAGEN";
7963
+ })(DomainMultipleName || (DomainMultipleName = {}));
7964
+
7965
+ // Component that shows a popup when the user wants to upload a CoDocument
7966
+ var FileUploadPopupComponent = /** @class */ (function () {
7967
+ function FileUploadPopupComponent(
7968
+ //private _workabilityService: AppWorkabilityService,
7969
+ _promptService, _fileTypeImgPipe) {
7970
+ this._promptService = _promptService;
7971
+ this._fileTypeImgPipe = _fileTypeImgPipe;
7972
+ this.useWithoutSettingProps = false;
7973
+ this.hasPublicAccessVisible = false;
7974
+ this.showDocumentReportPicker = true;
7975
+ this.displayReadWriteAccess = true;
7976
+ this.documentChangeEvent = new i0.EventEmitter();
7977
+ this.popupCloseEvent = new i0.EventEmitter();
7978
+ this.documentPublication = documentPublication_enum.DocumentPublication;
7979
+ this.documentEmailReports = DocumentEmailReport;
7980
+ this.domain = DomainMultipleName;
7981
+ this.fileTypes = FileType;
7982
+ this.hideCancel = false;
7983
+ this.storeGroups = [];
7984
+ this.userGroupsForWrite = [];
7985
+ this.userGroupsForRead = [];
7986
+ this.documentTags = [];
7987
+ this._filesUploadConfigObjects = {}; // Instantiate with empty object to avoid nullpointers in the template
7988
+ this._boFactory = new businessObjectFactory.BusinessObjectFactory();
7989
+ this._readonly = false;
7990
+ }
7991
+ Object.defineProperty(FileUploadPopupComponent.prototype, "documentUnderEdit", {
7992
+ get: function () {
7993
+ return this._documentUnderEdit;
7994
+ },
7995
+ set: function (doc) {
7996
+ this._documentUnderEdit = doc ? this._boFactory.makeWithRawBackendData(coDocument.CoDocument, doc) : undefined;
7997
+ },
7998
+ enumerable: false,
7999
+ configurable: true
8000
+ });
8001
+ Object.defineProperty(FileUploadPopupComponent.prototype, "readonly", {
8002
+ set: function (value) {
8003
+ this._readonly = value;
8004
+ if (value) {
8005
+ //this._toastService.spawnToast("MESSAGE_DOCUMENT_LOCK_SINGLE");
8006
+ }
8007
+ },
8008
+ enumerable: false,
8009
+ configurable: true
8010
+ });
8011
+ Object.defineProperty(FileUploadPopupComponent.prototype, "filesUploadConfigObjects", {
8012
+ get: function () {
8013
+ return this._filesUploadConfigObjects;
8014
+ },
8015
+ set: function (value) {
8016
+ this._filesUploadConfigObjects = value;
8017
+ },
8018
+ enumerable: false,
8019
+ configurable: true
8020
+ });
8021
+ FileUploadPopupComponent.prototype.showClass = function () {
8022
+ return true;
8023
+ };
8024
+ Object.defineProperty(FileUploadPopupComponent.prototype, "showReadWriteAccess", {
8025
+ get: function () {
8026
+ //TODO get userrights
8027
+ return true;
8028
+ //return this._userRights.workabilityParameterEnabled && this.displayReadWriteAccess;
8029
+ },
8030
+ enumerable: false,
8031
+ configurable: true
8032
+ });
8033
+ Object.defineProperty(FileUploadPopupComponent.prototype, "isWorkability", {
8034
+ get: function () {
8035
+ //TODO fix workability
8036
+ return false;
8037
+ //return this._workabilityService.workabilitySystemEnabled;
8038
+ },
8039
+ enumerable: false,
8040
+ configurable: true
8041
+ });
8042
+ Object.defineProperty(FileUploadPopupComponent.prototype, "docUnderEditIsReadOnly", {
8043
+ get: function () {
8044
+ return this.documentUnderEdit.readonly || this._readonly;
8045
+ },
8046
+ enumerable: false,
8047
+ configurable: true
8048
+ });
8049
+ Object.defineProperty(FileUploadPopupComponent.prototype, "thumbnail", {
8050
+ get: function () {
8051
+ if (this.documentUnderEdit.isImageDocument()) {
8052
+ return this._thumbnail;
8053
+ }
8054
+ return this._fileTypeImgPipe.transform(this.documentUnderEdit.fileTypeInternal);
8055
+ },
8056
+ enumerable: false,
8057
+ configurable: true
8058
+ });
8059
+ Object.defineProperty(FileUploadPopupComponent.prototype, "popupHeader", {
8060
+ get: function () {
8061
+ if (this.documentUnderEdit && this.documentUnderEdit.isImageDocument()) {
8062
+ return "IMAGE";
8063
+ }
8064
+ else {
8065
+ return "DOCUMENT";
8066
+ }
8067
+ },
8068
+ enumerable: false,
8069
+ configurable: true
8070
+ });
8071
+ Object.defineProperty(FileUploadPopupComponent.prototype, "publicationConfigName", {
8072
+ get: function () {
8073
+ if (this.filesUploadConfigObjects) {
8074
+ return this.documentUnderEdit.isImageDocument() ?
8075
+ this.filesUploadConfigObjects.ImageDocumentPublishTo :
8076
+ this.filesUploadConfigObjects.TextDocumentPublishTo;
8077
+ }
8078
+ else {
8079
+ return; // No configname found
8080
+ }
8081
+ },
8082
+ enumerable: false,
8083
+ configurable: true
8084
+ });
8085
+ Object.defineProperty(FileUploadPopupComponent.prototype, "tagsConfigName", {
8086
+ get: function () {
8087
+ if (this.filesUploadConfigObjects) {
8088
+ return this.documentUnderEdit.isImageDocument() ?
8089
+ this.filesUploadConfigObjects.TagsImageConfigNames :
8090
+ this.filesUploadConfigObjects.TagsTextConfigNames;
8091
+ }
8092
+ else {
8093
+ return; // No configname found
8094
+ }
8095
+ },
8096
+ enumerable: false,
8097
+ configurable: true
8098
+ });
8099
+ FileUploadPopupComponent.prototype.ngOnInit = function () {
8100
+ this.loadCollection();
8101
+ if (this.documentUnderEdit.isImageDocument()) {
8102
+ this._thumbnail = this.documentUnderEdit.documentBodyAsDataUri;
8103
+ }
8104
+ };
8105
+ FileUploadPopupComponent.prototype.loadCollection = function () {
8106
+ return __awaiter(this, void 0, void 0, function () {
8107
+ return __generator(this, function (_a) {
8108
+ return [2 /*return*/];
8109
+ });
8110
+ });
8111
+ };
8112
+ FileUploadPopupComponent.prototype.onPreviewClick = function () {
8113
+ if (this.documentUnderEdit.isImageDocument()) { //preview image
8114
+ this._promptService.showImage(this.documentUnderEdit.documentBodyAsDataUri, "Preview");
8115
+ }
8116
+ else { //download document
8117
+ try {
8118
+ fileUtils.FileUtils.DownloadFromDataUri(this.documentUnderEdit.bodyAsDataUri, this.documentUnderEdit.fileName);
8119
+ }
8120
+ catch (error) {
8121
+ }
8122
+ }
8123
+ };
8124
+ FileUploadPopupComponent.prototype.saveDocumentUnderEditRights = function () {
8125
+ this.documentUnderEdit.rights = [];
8126
+ var forWriteLength = this.userGroupsForWrite.length;
8127
+ for (var i = 0; i < forWriteLength; i++) {
8128
+ var rights = new coDocumentRight.CoDocumentRight();
8129
+ rights.userGroupId = this.userGroupsForWrite[i];
8130
+ rights.rightLevel = objectRightType_enum.ObjectRightType.ReadWrite;
8131
+ this.documentUnderEdit.rights.push(rights);
8132
+ }
8133
+ var forReadLength = this.userGroupsForRead.length;
8134
+ for (var i = 0; i < forReadLength; i++) {
8135
+ var rights = new coDocumentRight.CoDocumentRight();
8136
+ rights.userGroupId = this.userGroupsForRead[i];
8137
+ rights.rightLevel = objectRightType_enum.ObjectRightType.ReadOnly;
8138
+ this.documentUnderEdit.rights.push(rights);
8139
+ }
8140
+ };
8141
+ FileUploadPopupComponent.prototype.onPopupOkClick = function () {
8142
+ if (this.form) {
8143
+ this.form.submit();
8144
+ }
8145
+ };
8146
+ FileUploadPopupComponent.prototype.handlePropertyChange = function (refSumOfEnabledItems) {
8147
+ this._publicationNumber = refSumOfEnabledItems;
8148
+ };
8149
+ FileUploadPopupComponent.prototype.handleReportsPropertyChange = function (refSumOfEnabledItems) {
8150
+ this._reportsNumber = refSumOfEnabledItems;
8151
+ };
8152
+ FileUploadPopupComponent.prototype.onValidSubmit = function () {
8153
+ return __awaiter(this, void 0, void 0, function () {
8154
+ return __generator(this, function (_a) {
8155
+ this._publicationNumber ? this.documentUnderEdit.publication = this._publicationNumber : this.documentUnderEdit.publication = 0;
8156
+ this._reportsNumber ? this.documentUnderEdit.reports = this._reportsNumber : this.documentUnderEdit.reports = 0;
8157
+ this.documentUnderEdit.retailFormulas = this.storeGroupIds;
8158
+ this.saveDocumentUnderEditRights();
8159
+ this.documentChangeEvent.emit(this.documentUnderEdit);
8160
+ this.onPopupClose();
8161
+ return [2 /*return*/];
8162
+ });
8163
+ });
8164
+ };
8165
+ FileUploadPopupComponent.prototype.onPopupCancelClick = function () {
8166
+ return __awaiter(this, void 0, void 0, function () {
8167
+ return __generator(this, function (_a) {
8168
+ this.onPopupClose();
8169
+ return [2 /*return*/];
8170
+ });
8171
+ });
8172
+ };
8173
+ FileUploadPopupComponent.prototype.onPopupClose = function () {
8174
+ this.userGroupsForWrite.length = 0;
8175
+ this.userGroupsForRead.length = 0;
8176
+ this.documentUnderEdit = undefined;
8177
+ this.popupCloseEvent.next();
8178
+ };
8179
+ return FileUploadPopupComponent;
8180
+ }());
8181
+ FileUploadPopupComponent.decorators = [
8182
+ { type: i0.Component, args: [{
8183
+ selector: "co-file-upload-popup",
8184
+ template: "\n <co-dialog *ngIf=\"!useWithoutSettingProps && documentUnderEdit\" cssId=\"popup_files_upload_content\"\n [headerTemplate]=\"headerTemplate\" contentSize noClickOutside\n (close)=\"onPopupClose()\">\n <div class=\"co-dialog-wrapper\">\n <div class=\"file-upload-form-wrapper\" fxLayout=\"column\" fxLayoutGap=\"10px\">\n <co-form class=\"narrow-scrollbar\" (validSubmit)=\"onValidSubmit()\">\n <div class=\"horizontal-layout-column\">\n <div class=\"document-thumb column-left\" *ngIf=\"!addDocumentByUrl\">\n <a (click)=\"onPreviewClick()\"><img [src]=\"thumbnail\"/></a>\n </div>\n <div class=\"column-right\">\n <co-input-text\n [model]=\"documentUnderEdit.fileSize\"\n [screenConfigurationObject]=\"documentUnderEdit.isImageDocument() ?\n filesUploadConfigObjects?.ImageDocumentFileSize :\n filesUploadConfigObjects?.TextDocumentFileSize\"\n [placeholder]=\"'SIZE' | localize\"\n forceReadonly\n noValidation>\n </co-input-text>\n <ng-container *ngIf=\"documentUnderEdit.isImageDocument()\">\n <co-input-text [placeholder]=\"'DIMENSIONS' | localize\"\n [model]=\"documentUnderEdit.imageDimensions\"\n [screenConfigurationObject]=\"filesUploadConfigObjects?.ImageDocumentDimensions\"\n forceReadonly noValidation></co-input-text>\n </ng-container>\n <co-input-text\n [(model)]=\"documentUnderEdit.title\"\n [screenConfigurationObject]=\"documentUnderEdit.isImageDocument() ?\n filesUploadConfigObjects?.ImageDocumentTitle :\n filesUploadConfigObjects?.TextDocumentTitle\"\n [placeholder]=\"'TITLE2' | localize\"\n noValidation forceReadonly></co-input-text>\n </div>\n </div>\n\n <div>\n <!--<sc-tags\n [tagCategory]=\"tagCategory\"\n [readonly]=\"docUnderEditIsReadOnly\"-->\n\n <!-- ></sc-tags>--><!-- [myCfgNames]=\"tagsConfigName\" | [(joinedTags)]=\"this.documentUnderEdit.tags\"-->\n </div>\n <!--<div>\n <read-write-access *ngIf=\"showReadWriteAccess\"\n [readWriteCfgNames]=\"filesUploadConfigObjects?.readWriteAccess\"\n [layoutHorizontal]=\"true\"\n [medicalUserGroups]=\"medicalUserGroups\"\n [(userGroupsForWrite)]=\"userGroupsForWrite\"\n [(userGroupsForRead)]=\"userGroupsForRead\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></read-write-access>\n </div>-->\n <!--<div class=\"horizontal-layout-column\">\n <ng-container *ngIf=\"addDocumentByUrl\">\n <co-input-text required [placeholder]=\"'URL' | localize\" [(model)]=\"documentUnderEdit.filePath\"\n [readonly]=\"docUnderEditIsReadOnly\"></co-input-text>\n </ng-container>\n </div>-->\n <div class=\"horizontal-layout-column\">\n <div class=\"column-left\">\n <co-input-text [placeholder]=\"'DESCRIPTION' | localize\" [(model)]=\"documentUnderEdit.description\"\n [screenConfigurationObject]=\"documentUnderEdit.isImageDocument() ?\n filesUploadConfigObjects?.ImageDocumentDescription :\n filesUploadConfigObjects?.TextDocumentDescription\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></co-input-text>\n\n </div>\n <!--<div *ngIf=\"hasPublicAccessVisible\" class=\"column-right\">\n <input-switcher-yes-no label=\"PUBLIC_ACCESS\"\n [(model)]=\"documentUnderEdit.hasPublicAccess\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></input-switcher-yes-no>\n </div>-->\n </div>\n <div class=\"horizontal-layout-column\">\n <ng-container *ngIf=\"!documentUnderEdit.isImageDocument()\">\n <div class=\"column-left\">\n <!-- <input-switcher-yes-no label=\"DOWNLOADABLE\"\n [(model)]=\"documentUnderEdit.downloadable\"\n [cfgName]=\"filesUploadConfigObjects?.TextDocumentDownloadable\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></input-switcher-yes-no>-->\n </div>\n </ng-container>\n </div>\n <div class=\"horizontal-layout-column\">\n <ng-container *ngIf=\"fileType === fileTypes.ThreeDFile\">\n <div class=\"column-left\">\n <!-- <input-switcher-yes-no label=\"ALSO_AS_USDZ\"\n [(model)]=\"documentUnderEdit.convertToUSDZ\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></input-switcher-yes-no>-->\n </div>\n </ng-container>\n </div>\n <div class=\"horizontal-layout-column\">\n <ng-container *ngIf=\"documentUnderEdit.isImageDocument()\">\n <div class=\"column-left\"><!--\n <input-switcher-yes-no label=\"ATTACH_TO_NOTIFICATION\"\n [(model)]=\"documentUnderEdit.attachToNotification\"\n [cfgName]=\"filesUploadConfigObjects?.ImageDocumentAttachNotification\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></input-switcher-yes-no>-->\n </div>\n <div class=\"column-right\"><!--\n <image-type-select\n [cfgName]=\"filesUploadConfigObjects?.ImageDocumentDisplayType\"\n [(selectedModelId)]=\"this.documentUnderEdit.imageDisplayKind\"\n [readonly]=\"docUnderEditIsReadOnly\"\n label=\"DISPLAY_TYPE\"\n ></image-type-select>-->\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"!isWorkability\">\n <!-- <multiple-property-toggler *ngIf=\"!showDocumentReportPicker\"\n [propertyNamesToToggle]=\"documentPublication\"\n [(enableditems)]=\"this.documentUnderEdit.publication\"\n (onPropertyItemChange)=\"handlePropertyChange($event)\"\n label=\"PUBLISH_TO\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></multiple-property-toggler>-->\n <co-multiple-property-toggler *ngIf=\"showDocumentReportPicker\"\n [propertyNamesToToggle]=\"documentEmailReports\"\n [(enableditems)]=\"documentUnderEdit.reports\"\n (onPropertyItemChange)=\"handleReportsPropertyChange($event)\"\n label=\"REPORTS_TO_ATTACH_TO\"\n [readonly]=\"docUnderEditIsReadOnly\"\n ></co-multiple-property-toggler>\n\n <!--<ng-container *ngIf=\"documentUnderEdit.isImageDocument()\"\n [templateWrapper]=\"templateImage\"></ng-container>-->\n </div>\n </co-form>\n <div class=\"ok-cancel-buttons\">\n <co-button [disabled]=\"docUnderEditIsReadOnly\" [textContent]=\"'OK' | localize\" (click)=\"onPopupOkClick()\"></co-button>\n <co-button *ngIf=\"hideCancel\" [textContent]=\"'STICKER' | localize\" (click)=\"onPopupCancelClick()\"></co-button>\n </div>\n <!-- <default-ok-cancel-buttons class=\"justify-center\"\n [okDisabled]=\"docUnderEditIsReadOnly\"\n [hideCancel]=\"hideCancel\"\n (okClick)=\"onPopupOkClick()\"\n (cancelClick)=\"onPopupCancelClick()\">\n </default-ok-cancel-buttons>-->\n </div>\n </div>\n </co-dialog>\n <ng-template #headerTemplate>\n <div [textContent]=\"popupHeader | localize\"></div>\n </ng-template>\n <ng-template #templateImage *ngIf=\"!isWorkability\">\n <!-- <div class=\"column-right\">\n <input-lov-multi-select\n [cfgName]=\"filesUploadConfigObjects.ImageDocumentStoreGroups\"\n [(selectedModelIds)]=\"storeGroupIds\"\n [collection]=\"storeGroups\"\n [readonly]=\"docUnderEditIsReadOnly\"\n descriptionField=\"description\"\n doNotLoadCollection\n customWidth\n label=\"RETAIL_FORMULAS\"\n ></input-lov-multi-select>\n </div>-->\n </ng-template>\n ",
8185
+ encapsulation: i0.ViewEncapsulation.None
8186
+ },] }
8187
+ ];
8188
+ FileUploadPopupComponent.ctorParameters = function () { return [
8189
+ { type: corecomponents_v12.PromptService },
8190
+ { type: FileTypeImagePipe }
8191
+ ]; };
8192
+ FileUploadPopupComponent.propDecorators = {
8193
+ form: [{ type: i0.ViewChild, args: [corecomponents_v12.FormComponent,] }],
8194
+ useWithoutSettingProps: [{ type: i0.Input }],
8195
+ hasPublicAccessVisible: [{ type: i0.Input }],
8196
+ showDocumentReportPicker: [{ type: i0.Input }],
8197
+ documentUnderEdit: [{ type: i0.Input }],
8198
+ readonly: [{ type: i0.Input }],
8199
+ filesUploadConfigObjects: [{ type: i0.Input }],
8200
+ tagCategory: [{ type: i0.Input }],
8201
+ medicalUserGroups: [{ type: i0.Input }],
8202
+ displayReadWriteAccess: [{ type: i0.Input }],
8203
+ tagReferenceTable: [{ type: i0.Input }],
8204
+ documentKey: [{ type: i0.Input }],
8205
+ documentTable: [{ type: i0.Input }],
8206
+ fileType: [{ type: i0.Input }],
8207
+ addDocumentByUrl: [{ type: i0.Input }],
8208
+ documentChangeEvent: [{ type: i0.Output }],
8209
+ popupCloseEvent: [{ type: i0.Output }],
8210
+ showClass: [{ type: i0.HostBinding, args: ['class.co-file-upload-popup',] }]
8211
+ };
8212
+ __decorate([
8213
+ InputBoolean()
8214
+ ], FileUploadPopupComponent.prototype, "useWithoutSettingProps", void 0);
8215
+ __decorate([
8216
+ InputBoolean()
8217
+ ], FileUploadPopupComponent.prototype, "hasPublicAccessVisible", void 0);
8218
+ __decorate([
8219
+ InputBoolean()
8220
+ ], FileUploadPopupComponent.prototype, "showDocumentReportPicker", void 0);
8221
+ __decorate([
8222
+ InputBoolean()
8223
+ ], FileUploadPopupComponent.prototype, "medicalUserGroups", void 0);
8224
+ __decorate([
8225
+ InputBoolean()
8226
+ ], FileUploadPopupComponent.prototype, "addDocumentByUrl", void 0);
8227
+
8228
+ // A base component that lets the user make a list of files from its device. Doesn't actually upload, but outputs chosen files as filesChanged.
8229
+ var BaseFileUploadComponent = /** @class */ (function () {
8230
+ // private static readonly _dummyTrueFunction: OperationCallbackSimpleFunction = (object: any) => Promise.resolve(true);
8231
+ function BaseFileUploadComponent(
8232
+ //protected _promptService: PromptService,
8233
+ _dictionaryService,
8234
+ //protected _userService: UserService,
8235
+ _container, _factory) {
8236
+ this._dictionaryService = _dictionaryService;
8237
+ this._container = _container;
8238
+ this._factory = _factory;
8239
+ this.documents = [];
8240
+ // The ability to drop files on the page
8241
+ this.fullPageDrop = false;
8242
+ // If user gets the ability of adding files.
8243
+ this.canAdd = true;
8244
+ // Show add button
8245
+ this.addWithButton = true;
8246
+ // If user gets the ability of deleting files.
8247
+ this.canDelete = true;
8248
+ this.noDragDropOrdering = false;
8249
+ this.askBeforeDelete = true;
8250
+ this.resizeImages = false;
8251
+ this.lockOperation = OperationWithAlwaysSuccessCallback;
8252
+ this.unlockOperation = OperationWithAlwaysSuccessCallback;
8253
+ this.beforeDeleteOperation = OperationWithAlwaysSuccessCallback;
8254
+ this.afterDeleteOperation = OperationWithAlwaysSuccessCallback;
8255
+ this.beforeCreateOperation = OperationWithAlwaysSuccessCallback;
8256
+ this.afterCreateOperation = OperationWithAlwaysSuccessCallback;
8257
+ this.beforeEditOperation = OperationWithAlwaysSuccessCallback;
8258
+ this.dontAskBeforeDelete = false;
8259
+ this.noOwnDeleteOperation = false;
8260
+ this.useWithoutSettingProps = false;
8261
+ this.medicalUserGroups = false;
8262
+ // Use with customFileDropEvent
8263
+ this.useCustomFileDropEvent = false;
8264
+ // Use in conjunction with useCustomFileDropEvent
8265
+ this.customFileDropEvent = new i0.EventEmitter();
8266
+ // Emits if user wants to add multiple documents at once
8267
+ this.documentsAdded = new i0.EventEmitter();
8268
+ this.documentDeleted = new i0.EventEmitter();
8269
+ // Emits every time the order of documents was changed
8270
+ this.sortableListChanged = new i0.EventEmitter();
8271
+ this.documentChangeEvent = new i0.EventEmitter();
8272
+ // Use this if consumer requires to perform extra actions, like locking a parent businessObject if it contains the collection of documents. Emit with true when popup opened, false for close
8273
+ this.popupOpenedStateChange = new i0.EventEmitter();
8274
+ this._documentKey = "";
8275
+ this._readonly = false;
8276
+ }
8277
+ Object.defineProperty(BaseFileUploadComponent.prototype, "fileType", {
8278
+ get: function () {
8279
+ return this._fileType;
8280
+ },
8281
+ // The fileType that the documents should be saved as, leave empty to automatically detect filetype. Also determines file picker filter
8282
+ set: function (value) {
8283
+ if (value) {
8284
+ this._fileType = value;
8285
+ //TODO Documentdataloader fix
8286
+ //this._coDocumentDataLoader.loadAllowedTypes().then(() => {this.handleAcceptedFileTypesLoaded(value)});
8287
+ }
8288
+ },
8289
+ enumerable: false,
8290
+ configurable: true
8291
+ });
8292
+ Object.defineProperty(BaseFileUploadComponent.prototype, "documentKey", {
8293
+ get: function () {
8294
+ return this._documentKey;
8295
+ },
8296
+ set: function (value) {
8297
+ this._documentKey = value + ""; // force string
8298
+ },
8299
+ enumerable: false,
8300
+ configurable: true
8301
+ });
8302
+ Object.defineProperty(BaseFileUploadComponent.prototype, "readonly", {
8303
+ get: function () {
8304
+ return this._readonly;
8305
+ },
8306
+ set: function (value) {
8307
+ this._readonly = value;
8308
+ if (this._popup && this._popup.instance) {
8309
+ this._popup.instance.readonly = value;
8310
+ }
8311
+ },
8312
+ enumerable: false,
8313
+ configurable: true
8314
+ });
8315
+ Object.defineProperty(BaseFileUploadComponent.prototype, "maxUploadSizeParam", {
8316
+ set: function (value) {
8317
+ if (value) {
8318
+ this._setInternalParamObj(value);
8319
+ }
8320
+ },
8321
+ enumerable: false,
8322
+ configurable: true
8323
+ });
8324
+ BaseFileUploadComponent.prototype.onDrop = function (event) {
8325
+ event.preventDefault();
8326
+ event.stopPropagation();
8327
+ if (!this.useCustomFileDropEvent) {
8328
+ this.filesPicked(event.dataTransfer.files);
8329
+ }
8330
+ else {
8331
+ this.customFileDropEvent.emit(event.dataTransfer.files);
8332
+ }
8333
+ this._clearDropzone();
8334
+ };
8335
+ BaseFileUploadComponent.prototype.onDragEnd = function (event) {
8336
+ event.dataTransfer.clearData();
8337
+ this._clearDropzone();
8338
+ };
8339
+ BaseFileUploadComponent.prototype.onDragOver = function (event) {
8340
+ event.preventDefault();
8341
+ };
8342
+ BaseFileUploadComponent.prototype.onDragEnter = function (event) {
8343
+ this._dragEnterTarget = event.target;
8344
+ this._showDropzone();
8345
+ };
8346
+ BaseFileUploadComponent.prototype.onDragLeave = function (event) {
8347
+ if (event.target === this._dragEnterTarget) {
8348
+ this._clearDropzone();
8349
+ }
8350
+ };
8351
+ BaseFileUploadComponent.prototype.ngOnDestroy = function () {
8352
+ this._clearDropzone();
8353
+ };
8354
+ BaseFileUploadComponent.prototype._showDropzone = function () {
8355
+ if (!this._dropZone) {
8356
+ var fact = this._factory.resolveComponentFactory(AppFileDropzoneComponent);
8357
+ this._dropZone = this._container.createComponent(fact);
8358
+ this._dropZone.instance.customDropActionMessage = this.dropMessage;
8359
+ }
8360
+ };
8361
+ BaseFileUploadComponent.prototype._clearDropzone = function () {
8362
+ this._container.clear();
8363
+ if (this._dropZone) {
8364
+ this._dropZone.destroy();
8365
+ this._dropZone = undefined;
8366
+ }
8367
+ };
8368
+ // Remove file from upload array.
8369
+ BaseFileUploadComponent.prototype.handleDelete = function (file) {
8370
+ return __awaiter(this, void 0, void 0, function () {
8371
+ var success;
8372
+ return __generator(this, function (_a) {
8373
+ switch (_a.label) {
8374
+ case 0: return [4 /*yield*/, this.beforeDeleteOperation(file)];
8375
+ case 1:
8376
+ success = _a.sent();
8377
+ _a.label = 2;
8378
+ case 2:
8379
+ _a.trys.push([2, , 5, 7]);
8380
+ if (!success) return [3 /*break*/, 4];
8381
+ return [4 /*yield*/, this._delete(file)];
8382
+ case 3:
8383
+ _a.sent();
8384
+ success = true;
8385
+ _a.label = 4;
8386
+ case 4: return [3 /*break*/, 7];
8387
+ case 5: return [4 /*yield*/, this.afterDeleteOperation(file)];
8388
+ case 6:
8389
+ _a.sent();
8390
+ return [7 /*endfinally*/];
8391
+ case 7: return [2 /*return*/, Promise.resolve(success)];
8392
+ }
8393
+ });
8394
+ });
8395
+ };
8396
+ BaseFileUploadComponent.prototype._delete = function (file) {
8397
+ return __awaiter(this, void 0, void 0, function () {
8398
+ var doDelete;
8399
+ return __generator(this, function (_a) {
8400
+ doDelete = true;
8401
+ if (!this.dontAskBeforeDelete) {
8402
+ //TODO make dialogService
8403
+ //doDelete = await this._promptService.showYesNo("MESSAGE_DELETE_RECORD_QUESTION");
8404
+ }
8405
+ if (doDelete) {
8406
+ if (!this.noOwnDeleteOperation) {
8407
+ ArrayUtils.RemoveElement(file, this.documents);
8408
+ }
8409
+ this.documentDeleted.emit(file);
8410
+ }
8411
+ return [2 /*return*/];
8412
+ });
8413
+ });
8414
+ };
8415
+ BaseFileUploadComponent.prototype.handleSortingChange = function (docs) {
8416
+ this.sortableListChanged.emit(docs);
8417
+ };
8418
+ BaseFileUploadComponent.prototype.handleFileChange = function (event) {
8419
+ return __awaiter(this, void 0, void 0, function () {
8420
+ var allFilesAreSmallEnough, allFilesHaveAllowedExtensions, sizeToCompare, len, i, uploadSizeAllowed, extensionAllowed, filesToAdd;
8421
+ return __generator(this, function (_a) {
8422
+ switch (_a.label) {
8423
+ case 0:
8424
+ if (!(event && event.target && event.target.files && event.target.files.length > 0)) return [3 /*break*/, 4];
8425
+ allFilesAreSmallEnough = true;
8426
+ allFilesHaveAllowedExtensions = true;
8427
+ sizeToCompare = this._maxUploadFileSize ? this._maxUploadFileSize : undefined;
8428
+ len = event.target.files.length;
8429
+ for (i = 0; i < len; i++) {
8430
+ uploadSizeAllowed = fileUtils.FileUtils.CheckMaxUploadSize(event.target.files[i], sizeToCompare);
8431
+ if (!uploadSizeAllowed) {
8432
+ allFilesAreSmallEnough = false;
8433
+ break;
8434
+ }
8435
+ extensionAllowed = true;
8436
+ if (!extensionAllowed) {
8437
+ allFilesHaveAllowedExtensions = false;
8438
+ break;
8439
+ }
8440
+ }
8441
+ if (!!allFilesAreSmallEnough) return [3 /*break*/, 1];
8442
+ return [3 /*break*/, 4];
8443
+ case 1:
8444
+ if (!!allFilesHaveAllowedExtensions) return [3 /*break*/, 2];
8445
+ return [3 /*break*/, 4];
8446
+ case 2: return [4 /*yield*/, this.convertFilesIntoCoDocuments(event.target.files)];
8447
+ case 3:
8448
+ filesToAdd = _a.sent();
8449
+ if (filesToAdd.length > 1) {
8450
+ this.documentsAdded.emit(filesToAdd);
8451
+ }
8452
+ else {
8453
+ if (this.useWithoutSettingProps) {
8454
+ this.documentsAdded.next(filesToAdd);
8455
+ }
8456
+ else {
8457
+ this.documentUnderEdit = filesToAdd[0];
8458
+ this.openPopup();
8459
+ }
8460
+ }
8461
+ _a.label = 4;
8462
+ case 4: return [2 /*return*/];
8463
+ }
8464
+ });
8465
+ });
8466
+ };
8467
+ BaseFileUploadComponent.prototype.handleEditDocumentClick = function (docToEdit) {
8468
+ return __awaiter(this, void 0, void 0, function () {
8469
+ var showPopup;
8470
+ return __generator(this, function (_a) {
8471
+ switch (_a.label) {
8472
+ case 0:
8473
+ this.documentUnderEdit = docToEdit;
8474
+ return [4 /*yield*/, this.beforeEditOperation(docToEdit)];
8475
+ case 1:
8476
+ showPopup = _a.sent();
8477
+ if (showPopup) {
8478
+ this.openPopup();
8479
+ }
8480
+ return [2 /*return*/];
8481
+ }
8482
+ });
8483
+ });
8484
+ };
8485
+ BaseFileUploadComponent.prototype.openPopup = function () {
8486
+ return __awaiter(this, void 0, void 0, function () {
8487
+ var _this = this;
8488
+ return __generator(this, function (_a) {
8489
+ this._createAndFillPopupInstance();
8490
+ this._docChangeSub = this._popup.instance.documentChangeEvent.subscribe(function (doc) {
8491
+ _this.documentChangeEvent.emit(doc);
8492
+ });
8493
+ return [2 /*return*/];
8494
+ });
8495
+ });
8496
+ };
8497
+ BaseFileUploadComponent.prototype.openPopupToAddDocumentByUrl = function () {
8498
+ var _this = this;
8499
+ this._createDocumentToAddByUrl();
8500
+ this._createAndFillPopupInstance(true);
8501
+ this._docChangeSub = this._popup.instance.documentChangeEvent.subscribe(function (doc) {
8502
+ doc.fileName = doc.filePath;
8503
+ _this.documentChangeEvent.emit(doc);
8504
+ });
8505
+ };
8506
+ BaseFileUploadComponent.prototype._createDocumentToAddByUrl = function () {
8507
+ this.documentUnderEdit = new coDocument.CoDocument();
8508
+ this.documentUnderEdit.table = this.documentTable;
8509
+ this.documentUnderEdit.key = this.documentKey;
8510
+ this.documentUnderEdit.fileType = this.fileType;
8511
+ this.documentUnderEdit.documentType = coDocumentType_enum.CoDocumentType.SaveAsLinkOnRandomLocation;
8512
+ this.documentUnderEdit.pathIsUrl = true;
8513
+ //TODO Fix user Input
8514
+ //this.documentUnderEdit.creationUser = this._userService.userName.toUpperCase();
8515
+ //this.documentUnderEdit.modifiedUser = this._userService.userName.toUpperCase();
8516
+ this.documentUnderEdit.creationDate = new Date();
8517
+ this.documentUnderEdit.modifiedDate = new Date();
8518
+ };
8519
+ BaseFileUploadComponent.prototype._createAndFillPopupInstance = function (addDocumentByUrl) {
8520
+ var _this = this;
8521
+ if (addDocumentByUrl === void 0) { addDocumentByUrl = false; }
8522
+ this.popupOpenedStateChange.emit(true);
8523
+ var factory = this._factory.resolveComponentFactory(FileUploadPopupComponent);
8524
+ this._popup = this._container.createComponent(factory);
8525
+ this._popup.instance.readonly = this._readonly;
8526
+ this._popup.instance.addDocumentByUrl = addDocumentByUrl;
8527
+ this._popup.instance.hasPublicAccessVisible = this.documentTable === TableName.Goods;
8528
+ this._popup.instance.showDocumentReportPicker = (this.documentTable === TableName.Transactions || this.documentTable === TableName.TransactionLines);
8529
+ this._popup.instance.documentUnderEdit = this.documentUnderEdit;
8530
+ this._popup.instance.filesUploadConfigObjects = this.filesUploadConfigObjects;
8531
+ this._popup.instance.medicalUserGroups = this.medicalUserGroups;
8532
+ this._popup.instance.tagCategory = this.tagCategory;
8533
+ this._popup.instance.displayReadWriteAccess = this.displayReadWriteAccess;
8534
+ this._popup.instance.tagReferenceTable = this.tagReferenceTable;
8535
+ this._popup.instance.publicationIds = RefCodeUtils.GetMultiRefCodeChoices(this.documentUnderEdit.publication);
8536
+ this._popup.instance.storeGroupIds = this.documentUnderEdit.retailFormulas;
8537
+ this._popup.instance.fileType = this.fileType;
8538
+ this._prepareFileRights();
8539
+ this._popupCloseSub = this._popup.instance.popupCloseEvent.subscribe(function () {
8540
+ _this._unlockDocument();
8541
+ _this.popupOpenedStateChange.emit(false);
8542
+ _this._popupCloseSub.unsubscribe();
8543
+ _this._docChangeSub.unsubscribe();
8544
+ _this._popup.destroy();
8545
+ _this._popup = undefined;
8546
+ });
8547
+ };
8548
+ BaseFileUploadComponent.prototype.convertFilesIntoCoDocuments = function (files) {
8549
+ return __awaiter(this, void 0, void 0, function () {
8550
+ var amountOfFiles, filesToAdd, i, fileAsDocument;
8551
+ return __generator(this, function (_a) {
8552
+ switch (_a.label) {
8553
+ case 0:
8554
+ amountOfFiles = files.length;
8555
+ filesToAdd = [];
8556
+ i = 0;
8557
+ _a.label = 1;
8558
+ case 1:
8559
+ if (!(i < amountOfFiles)) return [3 /*break*/, 4];
8560
+ return [4 /*yield*/, this._getFileAsDocument(files[i])];
8561
+ case 2:
8562
+ fileAsDocument = _a.sent();
8563
+ fileAsDocument.index = CoDocumentSharedFieldLogic.GenerateAvailableIndexNr(this.documents || []) + i;
8564
+ filesToAdd.push(fileAsDocument);
8565
+ _a.label = 3;
8566
+ case 3:
8567
+ i++;
8568
+ return [3 /*break*/, 1];
8569
+ case 4: return [2 /*return*/, filesToAdd];
8570
+ }
8571
+ });
8572
+ });
8573
+ };
8574
+ BaseFileUploadComponent.prototype.filesPicked = function (files) {
8575
+ return __awaiter(this, void 0, void 0, function () {
8576
+ var allFilesAreValid, amountOfFiles, i, filesToAdd;
8577
+ return __generator(this, function (_a) {
8578
+ switch (_a.label) {
8579
+ case 0:
8580
+ if (!(files && files.length)) return [3 /*break*/, 3];
8581
+ allFilesAreValid = true;
8582
+ amountOfFiles = files.length;
8583
+ for (i = 0; i < amountOfFiles; i++) {
8584
+ if (!fileUtils.FileUtils.CheckMaxUploadSize(files[i], this._maxUploadFileSize)) {
8585
+ allFilesAreValid = false;
8586
+ break;
8587
+ }
8588
+ }
8589
+ if (!!allFilesAreValid) return [3 /*break*/, 1];
8590
+ return [3 /*break*/, 3];
8591
+ case 1: return [4 /*yield*/, this.convertFilesIntoCoDocuments(files)];
8592
+ case 2:
8593
+ filesToAdd = _a.sent();
8594
+ if (filesToAdd.length > 1 || this.useWithoutSettingProps) {
8595
+ this.documentsAdded.emit(filesToAdd);
8596
+ }
8597
+ else {
8598
+ this.documentUnderEdit = filesToAdd[0]; // Setting docUnderEdit opens the popup window
8599
+ this.openPopup();
8600
+ }
8601
+ _a.label = 3;
8602
+ case 3: return [2 /*return*/];
8603
+ }
8604
+ });
8605
+ });
8606
+ };
8607
+ BaseFileUploadComponent.prototype.handleAcceptedFileTypesLoaded = function (value) {
8608
+ //TODO fix loading
8609
+ //this.acceptedUploadFormats = this._coDocumentDataLoader.getAllowedExtensionsForType(value);
8610
+ };
8611
+ BaseFileUploadComponent.prototype._getFileAsDocument = function (file) {
8612
+ return __awaiter(this, void 0, void 0, function () {
8613
+ var fileAsCoDocument;
8614
+ return __generator(this, function (_a) {
8615
+ switch (_a.label) {
8616
+ case 0: return [4 /*yield*/, fileUtils.FileUtils.ReadFileAsNewCoDocument(file, this.resizeImages)];
8617
+ case 1:
8618
+ fileAsCoDocument = _a.sent();
8619
+ // set some extra known fields for the codocument:
8620
+ fileAsCoDocument.table = this.documentTable;
8621
+ fileAsCoDocument.key = this.documentKey;
8622
+ //TODO fix add users
8623
+ //fileAsCoDocument.creationUser = this._userService.userName.toUpperCase();
8624
+ //fileAsCoDocument.modifiedUser = this._userService.userName.toUpperCase();
8625
+ fileAsCoDocument.creationDate = new Date();
8626
+ fileAsCoDocument.modifiedDate = new Date();
8627
+ fileAsCoDocument.fileType = this.fileType ? this.fileType : fileUtils.FileUtils.IsImageFile(file) ? fileType_enum.FileType.Image : fileType_enum.FileType.Document;
8628
+ if (fileAsCoDocument) {
8629
+ return [2 /*return*/, fileAsCoDocument];
8630
+ }
8631
+ return [2 /*return*/];
8632
+ }
8633
+ });
8634
+ });
8635
+ };
8636
+ BaseFileUploadComponent.prototype._setInternalParamObj = function (value) {
8637
+ return __awaiter(this, void 0, void 0, function () {
8638
+ return __generator(this, function (_a) {
8639
+ return [2 /*return*/];
8640
+ });
8641
+ });
8642
+ };
8643
+ BaseFileUploadComponent.prototype._lockDocument = function () {
8644
+ return __awaiter(this, void 0, void 0, function () {
8645
+ var lockOk;
8646
+ return __generator(this, function (_a) {
8647
+ switch (_a.label) {
8648
+ case 0:
8649
+ if (!this.documentUnderEdit.documentId) {
8650
+ return [2 /*return*/, true]; // New document does not have an ID and therefore does not have to be locked
8651
+ }
8652
+ return [4 /*yield*/, this.lockOperation(coDocument.CoDocument)];
8653
+ case 1:
8654
+ lockOk = _a.sent();
8655
+ return [2 /*return*/, lockOk];
8656
+ }
8657
+ });
8658
+ });
8659
+ };
8660
+ BaseFileUploadComponent.prototype._unlockDocument = function () {
8661
+ return __awaiter(this, void 0, void 0, function () {
8662
+ var unlockOk;
8663
+ return __generator(this, function (_a) {
8664
+ switch (_a.label) {
8665
+ case 0:
8666
+ if (!this.documentUnderEdit.documentId) {
8667
+ return [2 /*return*/, true]; // New document does not have an ID and therefore does not have to be locked
8668
+ }
8669
+ return [4 /*yield*/, this.unlockOperation(coDocument.CoDocument)];
8670
+ case 1:
8671
+ unlockOk = _a.sent();
8672
+ return [2 /*return*/, unlockOk];
8673
+ }
8674
+ });
8675
+ });
8676
+ };
8677
+ BaseFileUploadComponent.prototype._prepareFileRights = function () {
8678
+ var len = this.documentUnderEdit.rights.length;
8679
+ for (var i = 0; i < len; i++) {
8680
+ var right = this.documentUnderEdit.rights[i];
8681
+ if (right.rightLevel === objectRightType_enum.ObjectRightType.ReadWrite) {
8682
+ this._popup.instance.userGroupsForWrite.push(right.userGroupId);
8683
+ }
8684
+ if (right.rightLevel === objectRightType_enum.ObjectRightType.ReadOnly) {
8685
+ this._popup.instance.userGroupsForRead.push(right.userGroupId);
8686
+ }
8687
+ }
8688
+ };
8689
+ return BaseFileUploadComponent;
8690
+ }());
8691
+ BaseFileUploadComponent.decorators = [
8692
+ { type: i0.Directive }
8693
+ ];
8694
+ BaseFileUploadComponent.ctorParameters = function () { return [
8695
+ { type: DictionaryService },
8696
+ { type: i0.ViewContainerRef },
8697
+ { type: i0.ComponentFactoryResolver }
8698
+ ]; };
8699
+ BaseFileUploadComponent.propDecorators = {
8700
+ fileType: [{ type: i0.Input }],
8701
+ documents: [{ type: i0.Input }],
8702
+ documentTable: [{ type: i0.Input }],
8703
+ documentKey: [{ type: i0.Input }],
8704
+ fullPageDrop: [{ type: i0.Input }],
8705
+ canAdd: [{ type: i0.Input }],
8706
+ dropMessage: [{ type: i0.Input }],
8707
+ addWithButton: [{ type: i0.Input }],
8708
+ canDelete: [{ type: i0.Input }],
8709
+ noDragDropOrdering: [{ type: i0.Input }],
8710
+ readonly: [{ type: i0.Input }],
8711
+ askBeforeDelete: [{ type: i0.Input }],
8712
+ resizeImages: [{ type: i0.Input }],
8713
+ lockOperation: [{ type: i0.Input }],
8714
+ unlockOperation: [{ type: i0.Input }],
8715
+ beforeDeleteOperation: [{ type: i0.Input }],
8716
+ afterDeleteOperation: [{ type: i0.Input }],
8717
+ beforeCreateOperation: [{ type: i0.Input }],
8718
+ afterCreateOperation: [{ type: i0.Input }],
8719
+ beforeEditOperation: [{ type: i0.Input }],
8720
+ dontAskBeforeDelete: [{ type: i0.Input }],
8721
+ noOwnDeleteOperation: [{ type: i0.Input }],
8722
+ maxUploadSizeParam: [{ type: i0.Input }],
8723
+ useWithoutSettingProps: [{ type: i0.Input }],
8724
+ filesUploadConfigObjects: [{ type: i0.Input }],
8725
+ medicalUserGroups: [{ type: i0.Input }],
8726
+ tagCategory: [{ type: i0.Input }],
8727
+ tagReferenceTable: [{ type: i0.Input }],
8728
+ displayReadWriteAccess: [{ type: i0.Input }],
8729
+ useCustomFileDropEvent: [{ type: i0.Input }],
8730
+ customFileDropEvent: [{ type: i0.Output }],
8731
+ documentsAdded: [{ type: i0.Output }],
8732
+ documentDeleted: [{ type: i0.Output }],
8733
+ sortableListChanged: [{ type: i0.Output }],
8734
+ documentChangeEvent: [{ type: i0.Output }],
8735
+ popupOpenedStateChange: [{ type: i0.Output }],
8736
+ hidden: [{ type: i0.HostBinding, args: ["class.hidden",] }],
8737
+ onDrop: [{ type: i0.HostListener, args: ["drop", ["$event"],] }],
8738
+ onDragEnd: [{ type: i0.HostListener, args: ["dragend", ["$event"],] }],
8739
+ onDragOver: [{ type: i0.HostListener, args: ["dragover", ["$event"],] }],
8740
+ onDragEnter: [{ type: i0.HostListener, args: ["dragenter", ["$event"],] }],
8741
+ onDragLeave: [{ type: i0.HostListener, args: ["dragleave", ["$event"],] }]
8742
+ };
8743
+ __decorate([
8744
+ InputBoolean()
8745
+ ], BaseFileUploadComponent.prototype, "noDragDropOrdering", void 0);
8746
+ __decorate([
8747
+ InputBoolean()
8748
+ ], BaseFileUploadComponent.prototype, "readonly", null);
8749
+ __decorate([
8750
+ InputBoolean()
8751
+ ], BaseFileUploadComponent.prototype, "askBeforeDelete", void 0);
8752
+ __decorate([
8753
+ InputBoolean()
8754
+ ], BaseFileUploadComponent.prototype, "resizeImages", void 0);
8755
+ __decorate([
8756
+ InputBoolean()
8757
+ ], BaseFileUploadComponent.prototype, "dontAskBeforeDelete", void 0);
8758
+ __decorate([
8759
+ InputBoolean()
8760
+ ], BaseFileUploadComponent.prototype, "noOwnDeleteOperation", void 0);
8761
+ __decorate([
8762
+ InputBoolean()
8763
+ ], BaseFileUploadComponent.prototype, "useWithoutSettingProps", void 0);
8764
+ __decorate([
8765
+ InputBoolean()
8766
+ ], BaseFileUploadComponent.prototype, "medicalUserGroups", void 0);
8767
+ __decorate([
8768
+ InputBoolean()
8769
+ ], BaseFileUploadComponent.prototype, "displayReadWriteAccess", void 0);
8770
+ __decorate([
8771
+ InputBoolean()
8772
+ ], BaseFileUploadComponent.prototype, "useCustomFileDropEvent", void 0);
8773
+
8774
+ // A component that lets the user make a list of files from its device. Doesn't actually upload, but outputs chosen files as filesChanged.
8775
+ var FilesUploadComponent = /** @class */ (function (_super) {
8776
+ __extends(FilesUploadComponent, _super);
8777
+ function FilesUploadComponent(
8778
+ //promptService: PromptService,
8779
+ dictionaryService,
8780
+ //userService: UserService,
8781
+ _container, _factory) {
8782
+ var _this = _super.call(this, dictionaryService, _container, _factory) || this;
8783
+ _this._container = _container;
8784
+ _this._factory = _factory;
8785
+ // Input button label
8786
+ _this.label = "UPLOAD_FILE";
8787
+ _this.customImageClick = false;
8788
+ _this.isEditable = false;
8789
+ _this.hideAvatars = false;
8790
+ _this.editSlideoutSubmit = new i0.EventEmitter();
8791
+ _this.tagsChangeEvent = new i0.EventEmitter();
8792
+ _this.imageClick = new i0.EventEmitter();
8793
+ _this.slideoutShown = false;
8794
+ _this.isDropzone = false;
8795
+ return _this;
8796
+ }
8797
+ Object.defineProperty(FilesUploadComponent.prototype, "dropzone", {
8798
+ set: function (value) {
8799
+ this.isDropzone = value;
8800
+ },
8801
+ enumerable: false,
8802
+ configurable: true
8803
+ });
8804
+ FilesUploadComponent.prototype.showClass = function () {
8805
+ return true;
8806
+ };
8807
+ Object.defineProperty(FilesUploadComponent.prototype, "editable", {
8808
+ get: function () {
8809
+ return this.canAdd;
8810
+ },
8811
+ enumerable: false,
8812
+ configurable: true
8813
+ });
8814
+ Object.defineProperty(FilesUploadComponent.prototype, "empty", {
8815
+ get: function () {
8816
+ return !this.documents || this.documents.length === 0;
8817
+ },
8818
+ enumerable: false,
8819
+ configurable: true
8820
+ });
8821
+ FilesUploadComponent.prototype.ngOnDestroy = function () {
8822
+ this.slideoutTemplate = undefined;
8823
+ this.input = undefined;
8824
+ _super.prototype.ngOnDestroy.call(this);
8825
+ };
8826
+ FilesUploadComponent.prototype.openFileBrowser = function () {
8827
+ return __awaiter(this, void 0, void 0, function () {
8828
+ return __generator(this, function (_a) {
8829
+ if (this.input && this.input.nativeElement) {
8830
+ this.input.nativeElement.click();
8831
+ }
8832
+ return [2 /*return*/];
8833
+ });
8834
+ });
8835
+ };
8836
+ FilesUploadComponent.prototype.handleAddClick = function () {
8837
+ this.openFileBrowser();
8838
+ };
8839
+ return FilesUploadComponent;
8840
+ }(BaseFileUploadComponent));
8841
+ FilesUploadComponent.decorators = [
8842
+ { type: i0.Component, args: [{
8843
+ selector: "co-files-upload",
8844
+ template: "\n <div class=\"files-upload-wrapper\">\n <drag-drop-container\n [sortableList]=\"documents\"\n (sortingChange)=\"handleSortingChange($event)\"\n [handleSort]=\"true\"\n dragHandle=\"tile\"\n [enabled]=\"!noDragDropOrdering\">\n <co-file-upload *ngIf=\"canAdd && addWithButton\" class=\"add-file\"\n isAddingTile\n icon=\"plus_round_open\"\n [link]=\"true\"\n [label]=\"label | localize\"\n (mouseover)=\"mouseOverAdd = true\"\n (mouseout)=\"mouseOverAdd = false\"\n (click)=\"handleAddClick()\"></co-file-upload> <!-- (click)=\"handleAddClick()\" -->\n <co-file-upload *ngFor=\"let file of documents\" class=\"tile\"\n [readonly]=\"file.readonly || readonly\"\n [class.hidden]=\"hideAvatars ? file.isAvatar : false\"\n [file]=\"file\"\n [label]=\"file.fileName\"\n [showTrashCan]=\"canDelete\"\n [fileSavesOnPopupOkClick]=\"fileSavesOnPopupOkClick\"\n [isEditable]=\"isEditable\"\n [customImageClick]=\"customImageClick\"\n (imageClick)=\"imageClick.emit($event)\"\n (deleteClick)=\"handleDelete(file)\"\n (editClick)=\"handleEditDocumentClick($event)\"></co-file-upload>\n </drag-drop-container>\n <span class=\"maxuploadsize\" textContent=\"getMaxFileSizeNotition()\" [class.show]=\"mouseOverAdd\"></span>\n <input #inputFile [accept]=\"acceptedUploadFormats\" (change)=\"handleFileChange($event)\" type=\"file\" hidden multiple/>\n </div>\n ",
8845
+ encapsulation: i0.ViewEncapsulation.None,
8846
+ providers: [
8847
+ {
8848
+ provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
8849
+ useExisting: i0.forwardRef(function () { return FilesUploadComponent; })
8850
+ }
8851
+ ]
8852
+ },] }
8853
+ ];
8854
+ FilesUploadComponent.ctorParameters = function () { return [
8855
+ { type: DictionaryService },
8856
+ { type: i0.ViewContainerRef },
8857
+ { type: i0.ComponentFactoryResolver }
8858
+ ]; };
8859
+ FilesUploadComponent.propDecorators = {
8860
+ dropzone: [{ type: i0.Input }],
8861
+ slideoutTemplate: [{ type: i0.ContentChild, args: ["slideoutTemplate", { static: true },] }],
8862
+ input: [{ type: i0.ViewChild, args: ["inputFile", { static: true },] }],
8863
+ label: [{ type: i0.Input }],
8864
+ cfgNames: [{ type: i0.Input }],
8865
+ customImageClick: [{ type: i0.Input }],
8866
+ isEditable: [{ type: i0.Input }],
8867
+ hideAvatars: [{ type: i0.Input }],
8868
+ fileSavesOnPopupOkClick: [{ type: i0.Input }],
8869
+ selected: [{ type: i0.Input }],
8870
+ editSlideoutSubmit: [{ type: i0.Output }],
8871
+ tagsChangeEvent: [{ type: i0.Output }],
8872
+ imageClick: [{ type: i0.Output }],
8873
+ showClass: [{ type: i0.HostBinding, args: ['class.co-files-upload',] }],
8874
+ editable: [{ type: i0.HostBinding, args: ["class.editable",] }],
8875
+ empty: [{ type: i0.HostBinding, args: ["class.empty",] }],
8876
+ isDropzone: [{ type: i0.HostBinding, args: ['class.dropzone',] }]
8877
+ };
8878
+ __decorate([
8879
+ InputBoolean()
8880
+ ], FilesUploadComponent.prototype, "isEditable", void 0);
8881
+ __decorate([
8882
+ InputBoolean()
8883
+ ], FilesUploadComponent.prototype, "hideAvatars", void 0);
8884
+
8885
+ var DragDropContainer = /** @class */ (function () {
8886
+ function DragDropContainer(element, direction) {
8887
+ this.element = element;
8888
+ this.direction = direction;
8889
+ }
8890
+ return DragDropContainer;
8891
+ }());
8892
+
8893
+ /**
8894
+ * Handles drag and drop elements
8895
+ */
8896
+ var DragDropService = /** @class */ (function () {
8897
+ function DragDropService() {
8898
+ var _this = this;
8899
+ this.drag = new rxjs.Subject();
8900
+ this.drop = new rxjs.Subject();
8901
+ // Container(s) holding the elements to be dragged.
8902
+ this._containers = [];
8903
+ this._disabledContainers = [];
8904
+ // Drag handle(s) that contains the classes of the handles.
8905
+ this._dragHandles = [];
8906
+ this._isdragging = false;
8907
+ this._clickCounter = 0;
8908
+ this._ghostLeft = 0;
8909
+ this._ghostTop = 0;
8910
+ this._mouseDown = false;
8911
+ this._currentMousePosition = { x: 0, y: 0 };
8912
+ this._currentMouseOffset = { x: 0, y: 0 };
8913
+ // Handles the mouse down event. Saves the current mouse position.
8914
+ this._handleMouseDown = function (event) {
8915
+ _this._currentMousePosition.x = event.screenX;
8916
+ _this._currentMousePosition.y = event.screenY;
8917
+ if (event.buttons !== 1 || event.metaKey || event.ctrlKey) {
8918
+ return;
8919
+ }
8920
+ var element = event.target ? event.target : event.srcElement;
8921
+ var dragElement = _this._getValidDragDropElement(element, true);
8922
+ if (!dragElement) {
8923
+ return;
8924
+ }
8925
+ if (_this._disabledContainers.indexOf(dragElement.container) !== -1) {
8926
+ return;
8927
+ }
8928
+ _this._dragElement = dragElement;
8929
+ _this._dragInContainer = dragElement.container.element;
8930
+ var offset = _this._getOffset();
8931
+ _this._currentMouseOffset.x = event.clientX - offset.left;
8932
+ _this._currentMouseOffset.y = event.clientY - offset.top;
8933
+ _this._mouseDown = true;
8934
+ _this._handleEventListener(document, "mousemove", _this._handleMouseMove);
8935
+ _this._clickCounter++;
8936
+ };
8937
+ this._handleMouseUp = function (event) {
8938
+ _this._mouseDown = false;
8939
+ _this._handleEventListener(document, "mousemove", _this._handleMouseMove, false);
8940
+ _this._clickCounter--;
8941
+ if (_this._isdragging) {
8942
+ _this._endDrag();
8943
+ }
8944
+ };
8945
+ this._handleMouseMove = function (event) {
8946
+ // nothing to drag?
8947
+ if (!_this._dragElement) {
8948
+ return;
8949
+ }
8950
+ // only drag when mouse down and there actually is movement
8951
+ if (!_this._mouseDown || (_this._currentMousePosition.x === event.screenX && _this._currentMousePosition.y === event.screenY)) {
8952
+ return;
8953
+ }
8954
+ _this._isdragging = true;
8955
+ _this._startDrag();
8956
+ _this._drag(event);
8957
+ _this._currentMousePosition.x = event.screenX;
8958
+ _this._currentMousePosition.y = event.screenY;
8959
+ };
8960
+ }
8961
+ Object.defineProperty(DragDropService.prototype, "renderer", {
8962
+ set: function (value) {
8963
+ this._renderer = value;
8964
+ this._setEvents();
8965
+ },
8966
+ enumerable: false,
8967
+ configurable: true
8968
+ });
8969
+ Object.defineProperty(DragDropService.prototype, "ghostLeft", {
8970
+ set: function (value) {
8971
+ this._ghostLeft = value;
8972
+ this._positionGhostImage();
8973
+ },
8974
+ enumerable: false,
8975
+ configurable: true
8976
+ });
8977
+ Object.defineProperty(DragDropService.prototype, "ghostTop", {
8978
+ set: function (value) {
8979
+ this._ghostTop = value;
8980
+ this._positionGhostImage();
8981
+ },
8982
+ enumerable: false,
8983
+ configurable: true
8984
+ });
8985
+ DragDropService.prototype.ngOnDestroy = function () {
8986
+ this._removeListeners();
8987
+ };
8988
+ DragDropService.prototype.addContainer = function (container) {
8989
+ var direction = (getComputedStyle(container.element).flexDirection === "row" && getComputedStyle(container.element).display === "flex")
8990
+ ? corecomponents_v12.CoOrientation.Horizontal
8991
+ : corecomponents_v12.CoOrientation.Vertical;
8992
+ container.direction = direction;
8993
+ this._containers.push(container);
8994
+ };
8995
+ DragDropService.prototype.addDragHandle = function (handle) {
8996
+ this._dragHandles.push(handle);
8997
+ };
8998
+ DragDropService.prototype.removeContainer = function (container) {
8999
+ ArrayUtils.RemoveElement(container, this._containers);
9000
+ ArrayUtils.RemoveElement(container, this._disabledContainers);
9001
+ if (!this._containers || this._containers.length === 0) {
9002
+ this._removeListeners();
9003
+ }
9004
+ };
9005
+ DragDropService.prototype.removeDragHandle = function (handle) {
9006
+ ArrayUtils.RemoveElement(handle, this._dragHandles);
9007
+ };
9008
+ DragDropService.prototype.enableContainer = function (container) {
9009
+ ArrayUtils.RemoveElement(container, this._disabledContainers);
9010
+ };
9011
+ DragDropService.prototype.disableContainer = function (container) {
9012
+ this._disabledContainers.push(container);
9013
+ };
9014
+ DragDropService.prototype._removeListeners = function () {
9015
+ this._handleEventListener(document, "mouseup", this._handleMouseUp, false);
9016
+ this._handleEventListener(document, "mousemove", this._handleMouseMove, false);
9017
+ };
9018
+ DragDropService.prototype._setEvents = function () {
9019
+ this._handleEventListener(document, "mousedown", this._handleMouseDown); //TODO: mousedown only within given containers
9020
+ this._handleEventListener(document, "mouseup", this._handleMouseUp);
9021
+ };
9022
+ DragDropService.prototype._setElementClass = function (element, elementClass) {
9023
+ if (!this._renderer) {
9024
+ return;
9025
+ }
9026
+ this._renderer.addClass(element, elementClass);
9027
+ };
9028
+ DragDropService.prototype._handleEventListener = function (element, event, handler, add) {
9029
+ if (add === void 0) { add = true; }
9030
+ if (add) {
9031
+ element.removeEventListener(event, handler);
9032
+ element.addEventListener(event, handler);
9033
+ }
9034
+ else {
9035
+ element.removeEventListener(event, handler);
9036
+ }
9037
+ };
9038
+ // Returns the container that holds given element.
9039
+ DragDropService.prototype._getContainerOfElement = function (element) {
9040
+ for (var i = 0, len1 = this._containers.length; i < len1; i++) {
9041
+ var container = this._containers[i];
9042
+ for (var ii = 0, len2 = container.element.children.length; ii < len2; ii++) {
9043
+ if (container.element.children[ii] === element) {
9044
+ return container;
9045
+ }
9046
+ }
9047
+ }
9048
+ };
9049
+ /**
9050
+ * Checks if given element is a child of container(s)
9051
+ * @param element
9052
+ * @returns {number} index of element
9053
+ */
9054
+ DragDropService.prototype._getElementOfContainer = function (element) {
9055
+ for (var i = 0, len1 = this._containers.length; i < len1; i++) {
9056
+ var container = this._containers[i];
9057
+ for (var ii = 0, len2 = container.element.children.length; ii < len2; ii++) {
9058
+ if (container.element.children[ii] === element) {
9059
+ return { container: container, element: element, elementIdx: ii };
9060
+ }
9061
+ }
9062
+ }
9063
+ return { container: undefined, element: undefined, elementIdx: -1 };
9064
+ };
9065
+ /**
9066
+ * Returns next sibling of container that contains given element.
9067
+ * @param element
9068
+ * @returns {any} null if there are no siblings left
9069
+ */
9070
+ DragDropService.prototype._getNextElementInContainer = function (element) {
9071
+ var container = this._getContainerOfElement(element);
9072
+ for (var i = 0, len = container.element.children.length; i < len; i++) {
9073
+ if (container.element.children[i] === element) {
9074
+ return i < (len - 1) ? { container: container, element: container.element.children[i + 1], elementIdx: i } : null;
9075
+ }
9076
+ }
9077
+ };
9078
+ DragDropService.prototype._getDragHandleClicked = function (element) {
9079
+ if (this._dragHandles && this._dragHandles.length > 0) { // check if handle clicked
9080
+ while (element) {
9081
+ for (var i = 0, len = this._dragHandles.length; i < len; i++) {
9082
+ if (element.classList && element.classList.length > 0 && !!this._dragHandles[i]) {
9083
+ if (element.classList.contains(this._dragHandles[i])) {
9084
+ return true;
9085
+ }
9086
+ }
9087
+ }
9088
+ element = element.parentNode === document ? null : element.parentNode;
9089
+ }
9090
+ return false;
9091
+ }
9092
+ else {
9093
+ return true;
9094
+ }
9095
+ };
9096
+ // Returns element when it's a valid drop target, false otherwise.
9097
+ DragDropService.prototype._getValidDragDropElement = function (element, checkHandle) {
9098
+ if (checkHandle === void 0) { checkHandle = false; }
9099
+ if (checkHandle) {
9100
+ var validHandleClicked = this._getDragHandleClicked(element);
9101
+ if (!validHandleClicked) {
9102
+ return undefined;
9103
+ }
9104
+ }
9105
+ while (element) {
9106
+ var elementOfContainer = this._getElementOfContainer(element);
9107
+ if (elementOfContainer.elementIdx > -1) {
9108
+ return elementOfContainer;
9109
+ }
9110
+ element = element.parentNode === document ? null : element.parentNode;
9111
+ }
9112
+ return undefined;
9113
+ };
9114
+ DragDropService.prototype._getNextSibling = function (element) {
9115
+ return this._getNextElementInContainer(element);
9116
+ };
9117
+ // Returns the current index of element within its container.
9118
+ DragDropService.prototype._indexOf = function (element) {
9119
+ var elementOfContainer = this._getElementOfContainer(element.hasOwnProperty("element") ? element.element : element);
9120
+ return elementOfContainer ? elementOfContainer.elementIdx : -1;
9121
+ };
9122
+ // Creates a ghost image/element of the element being dragged.
9123
+ DragDropService.prototype._createGhostImage = function () {
9124
+ if (this._ghostDragImage) {
9125
+ return;
9126
+ }
9127
+ // create ghost drag image
9128
+ var offsetRect = this._getOffset();
9129
+ this._ghostDragImage = this._dragElement.element.cloneNode(true);
9130
+ this._ghostDragImage.style.width = offsetRect.width + "px";
9131
+ this._ghostDragImage.style.height = offsetRect.height + "px";
9132
+ this.ghostLeft = offsetRect.left;
9133
+ this.ghostTop = offsetRect.top;
9134
+ this._setElementClass(this._ghostDragImage, "ghost-image");
9135
+ this._setElementClass(document.activeElement, "no-select");
9136
+ document.body.appendChild(this._ghostDragImage);
9137
+ };
9138
+ DragDropService.prototype._destroyGhostImage = function () {
9139
+ if (this._ghostDragImage) {
9140
+ this._renderer.removeClass(document.activeElement, "no-select");
9141
+ document.body.removeChild(this._ghostDragImage);
9142
+ this._ghostDragImage = undefined;
9143
+ }
9144
+ };
9145
+ // Positions the ghost image at the given coordinates.
9146
+ DragDropService.prototype._positionGhostImage = function () {
9147
+ if (!this._ghostDragImage) {
9148
+ return;
9149
+ }
9150
+ this._ghostDragImage.style.left = this._ghostLeft + "px";
9151
+ this._ghostDragImage.style.top = this._ghostTop + "px";
9152
+ };
9153
+ DragDropService.prototype._getScroll = function (scrollProp, offsetProp) {
9154
+ if (document.activeElement.clientHeight) {
9155
+ return document.activeElement[scrollProp];
9156
+ }
9157
+ return document.body[scrollProp];
9158
+ };
9159
+ DragDropService.prototype._getOffset = function () {
9160
+ var rect = this._dragElement.element.getBoundingClientRect();
9161
+ var scrollLeft = 0;
9162
+ var scrollTop = 0;
9163
+ return {
9164
+ bottom: rect.bottom,
9165
+ height: rect.height,
9166
+ left: rect.left + scrollLeft,
9167
+ right: rect.right,
9168
+ top: rect.top + scrollTop,
9169
+ width: rect.width
9170
+ };
9171
+ };
9172
+ DragDropService.prototype._determineDroptarget = function (element, x, y) {
9173
+ var dropElement = this._getValidDragDropElement(element);
9174
+ if (dropElement) {
9175
+ if (dropElement.element !== this._dragElement.element) {
9176
+ this._dropTargetElement = dropElement;
9177
+ return;
9178
+ }
9179
+ }
9180
+ this._dropTargetElement = null;
9181
+ };
9182
+ /**
9183
+ * Briefly hides the ghost image to be able to determine which element is under mouse.
9184
+ * @param x
9185
+ * @param y
9186
+ * @returns {Element} Top level element
9187
+ */
9188
+ DragDropService.prototype._getHoveredElement = function (x, y) {
9189
+ this._setElementClass(this._ghostDragImage, "ghost-image-hide");
9190
+ var elm = document.elementFromPoint(x, y);
9191
+ this._renderer.removeClass(this._ghostDragImage, "ghost-image-hide");
9192
+ return elm;
9193
+ };
9194
+ DragDropService.prototype._animateVisibility = function (element, transitionTime, start, end) {
9195
+ if (transitionTime === void 0) { transitionTime = 0.2; }
9196
+ if (start === void 0) { start = "0"; }
9197
+ if (end === void 0) { end = "1"; }
9198
+ if (!element) {
9199
+ return;
9200
+ }
9201
+ var transitionStyle = "opacity " + transitionTime + "s ease-in-out";
9202
+ var transition = element.style.transition;
9203
+ element.style.transition = transition + (transition ? "," : "") + transitionStyle;
9204
+ element.style.opacity = start;
9205
+ element.style.opacity = end;
9206
+ return new Promise(function (resolve) {
9207
+ setTimeout(function () {
9208
+ resolve();
9209
+ }, transitionTime * 1000);
9210
+ });
9211
+ };
9212
+ DragDropService.prototype._animateMove = function (parent, dragElement, dropTargetElement, down) {
9213
+ if (down) { // insert element before
9214
+ parent.insertBefore(dragElement.element, dropTargetElement.element);
9215
+ }
9216
+ else { // insert after
9217
+ parent.insertBefore(dragElement.element, dropTargetElement.element.nextSibling);
9218
+ }
9219
+ };
9220
+ DragDropService.prototype._startDrag = function () {
9221
+ this._createGhostImage();
9222
+ this._setElementClass(this._dragElement.element, "is-dragged");
9223
+ };
9224
+ DragDropService.prototype._drag = function (event) {
9225
+ this.ghostLeft = this._ghostLeft + (event.screenX - this._currentMousePosition.x);
9226
+ this.ghostTop = this._ghostTop + (event.screenY - this._currentMousePosition.y);
9227
+ var x = event.clientX;
9228
+ var y = event.clientY;
9229
+ var hoveredElement = this._getHoveredElement(x, y);
9230
+ this._determineDroptarget(hoveredElement, x, y);
9231
+ if (this._dropTargetElement) {
9232
+ var down = (this._dropTargetElement.container.direction === corecomponents_v12.CoOrientation.Vertical && event.screenY > this._currentMousePosition.y) ||
9233
+ (this._dropTargetElement.container.direction === corecomponents_v12.CoOrientation.Horizontal && event.screenX > this._currentMousePosition.x);
9234
+ this._animateMove(this._dropTargetElement.container.element, this._dragElement, this._dropTargetElement, down);
9235
+ this.drag.next({
9236
+ element: this._dragElement,
9237
+ elementIndex: this._dragElement.elementIdx,
9238
+ source: this._dropTargetElement.container.element
9239
+ });
9240
+ this._lastDropTarget = this._dropTargetElement;
9241
+ }
9242
+ };
9243
+ // element is dropped
9244
+ DragDropService.prototype._endDrag = function () {
9245
+ this._renderer.removeClass(this._dragElement.element, "is-dragged");
9246
+ this._destroyGhostImage();
9247
+ this.drop.next({
9248
+ element: this._dragElement.element,
9249
+ elementIndex: this._dragElement.elementIdx,
9250
+ target: this._lastDropTarget ? this._lastDropTarget.element : null,
9251
+ targetIndex: this._lastDropTarget ? this._lastDropTarget.elementIdx : -1,
9252
+ container: this._lastDropTarget ? this._lastDropTarget.container : null
9253
+ });
9254
+ this._resetDrag();
9255
+ };
9256
+ DragDropService.prototype._resetDrag = function () {
9257
+ this._dragElement = null;
9258
+ this._dragInContainer = null;
9259
+ this._lastDropTarget = null;
9260
+ this._isdragging = false;
9261
+ };
9262
+ return DragDropService;
9263
+ }());
9264
+ DragDropService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DragDropService_Factory() { return new DragDropService(); }, token: DragDropService, providedIn: "root" });
9265
+ DragDropService.decorators = [
9266
+ { type: i0.Injectable, args: [{
9267
+ providedIn: "root"
9268
+ },] }
9269
+ ];
9270
+ DragDropService.ctorParameters = function () { return []; };
9271
+
9272
+ var DragDropContainerComponent = /** @class */ (function () {
9273
+ function DragDropContainerComponent(_elementRef, _renderer, _dragDropService) {
9274
+ this._elementRef = _elementRef;
9275
+ this._renderer = _renderer;
9276
+ this._dragDropService = _dragDropService;
9277
+ this.handleSort = false;
9278
+ /**
9279
+ * Class of the handle to drag operations
9280
+ */
9281
+ this.dragHandle = "";
9282
+ // Emits when the order of sortableList items changed after a drag-drop action.
9283
+ this.sortingChange = new i0.EventEmitter();
9284
+ this.showClass = true;
9285
+ this._enabled = true;
9286
+ this._initialized = false;
9287
+ this._dragDropService.renderer = this._renderer;
9288
+ this._container = new DragDropContainer(_elementRef.nativeElement, corecomponents_v12.CoOrientation.Vertical);
9289
+ }
9290
+ Object.defineProperty(DragDropContainerComponent.prototype, "enabled", {
9291
+ set: function (value) {
9292
+ this._enabled = value;
9293
+ this.handleEnabledChange();
9294
+ },
9295
+ enumerable: false,
9296
+ configurable: true
9297
+ });
9298
+ DragDropContainerComponent.prototype.ngAfterViewInit = function () {
9299
+ this._initialized = true;
9300
+ this._createDragDrop();
9301
+ if (this._initialized) {
9302
+ this._updateEnableDisableContainer();
9303
+ }
9304
+ };
9305
+ /**
9306
+ * Cleanup...
9307
+ */
9308
+ DragDropContainerComponent.prototype.ngOnDestroy = function () {
9309
+ this._removeDragDrop();
9310
+ this._elementRef = undefined;
9311
+ };
9312
+ DragDropContainerComponent.prototype.handleEnabledChange = function () {
9313
+ if (!this._initialized) {
9314
+ return;
9315
+ }
9316
+ if (this._enabled) {
9317
+ this._dragDropService.enableContainer(this._container);
9318
+ this._createDragDrop();
9319
+ }
9320
+ else {
9321
+ this._dragDropService.disableContainer(this._container);
9322
+ this._removeDragDrop();
9323
+ this._initialized = false;
9324
+ }
9325
+ };
9326
+ DragDropContainerComponent.prototype._createDragDrop = function () {
9327
+ var _this = this;
9328
+ this._dragDropService.addContainer(this._container);
9329
+ this._dragDropService.addDragHandle(this.dragHandle);
9330
+ if (this.handleSort) { // subscribe drop event to be able to adapt the order of dropped items
9331
+ this._handleOrderSub = this._dragDropService.drop.subscribe(function (event) {
9332
+ _this._handleOrder(event.container, event.elementIndex, event.targetIndex);
9333
+ });
9334
+ }
9335
+ this._initialized = true;
9336
+ };
9337
+ DragDropContainerComponent.prototype._removeDragDrop = function () {
9338
+ this._dragDropService.removeContainer(this._container);
9339
+ this._dragDropService.removeDragHandle(this.dragHandle);
9340
+ if (this._handleOrderSub) {
9341
+ this._handleOrderSub.unsubscribe();
9342
+ }
9343
+ };
9344
+ DragDropContainerComponent.prototype._handleOrder = function (container, oldIndex, newIndex) {
9345
+ if (container !== this._container) {
9346
+ return;
9347
+ }
9348
+ if (newIndex === -1) {
9349
+ newIndex = this.sortableList.length;
9350
+ }
9351
+ arrayUtils.ArrayUtils.MoveElement(this.sortableList[oldIndex], newIndex, this.sortableList);
9352
+ this.sortingChange.emit(this.sortableList);
9353
+ };
9354
+ DragDropContainerComponent.prototype._updateEnableDisableContainer = function () {
9355
+ if (this._enabled) {
9356
+ this._dragDropService.enableContainer(this._container);
9357
+ }
9358
+ else {
9359
+ this._dragDropService.disableContainer(this._container);
9360
+ }
9361
+ };
9362
+ return DragDropContainerComponent;
9363
+ }());
9364
+ DragDropContainerComponent.decorators = [
9365
+ { type: i0.Directive, args: [{
9366
+ selector: "drag-drop-container"
9367
+ },] }
9368
+ ];
9369
+ DragDropContainerComponent.ctorParameters = function () { return [
9370
+ { type: i0.ElementRef },
9371
+ { type: i0.Renderer2 },
9372
+ { type: DragDropService }
9373
+ ]; };
9374
+ DragDropContainerComponent.propDecorators = {
9375
+ sortableList: [{ type: i0.Input }],
9376
+ handleSort: [{ type: i0.Input }],
9377
+ enabled: [{ type: i0.Input }],
9378
+ dragHandle: [{ type: i0.Input }],
9379
+ sortingChange: [{ type: i0.Output }],
9380
+ showClass: [{ type: i0.HostBinding, args: ["class.co-drag-drop-container",] }]
9381
+ };
9382
+ __decorate([
9383
+ InputBoolean()
9384
+ ], DragDropContainerComponent.prototype, "handleSort", void 0);
9385
+
9386
+ var ImageDisplayComponent = /** @class */ (function () {
9387
+ function ImageDisplayComponent() {
9388
+ // The (localized) text to show when there is no image. Defaults to 'NO_IMAGE'.
9389
+ this.label = "NO_IMAGE";
9390
+ }
9391
+ ImageDisplayComponent.prototype.showClass = function () {
9392
+ return true;
9393
+ };
9394
+ return ImageDisplayComponent;
9395
+ }());
9396
+ ImageDisplayComponent.decorators = [
9397
+ { type: i0.Component, args: [{
9398
+ selector: "co-image-display",
9399
+ template: "\n <img class=\"image\" *ngIf=\"!!model\" [src]=\"model\">\n <div class=\"no-image\" *ngIf=\"!model\">\n <div class=\"img\"></div>\n <div class=\"no-image-label\" [textContent]=\"label | localize\"></div>\n </div>\n ",
9400
+ providers: [{
9401
+ provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
9402
+ useExisting: i0.forwardRef(function () { return ImageDisplayComponent; })
9403
+ }
9404
+ ],
9405
+ encapsulation: i0.ViewEncapsulation.None
9406
+ },] }
9407
+ ];
9408
+ ImageDisplayComponent.propDecorators = {
9409
+ model: [{ type: i0.Input }],
9410
+ label: [{ type: i0.Input }],
9411
+ showClass: [{ type: i0.HostBinding, args: ['class.co-image-display',] }],
9412
+ hidden: [{ type: i0.HostBinding, args: ["class.co-transaction-hidden",] }]
9413
+ };
9414
+
9415
+ var ImageDisplayModule = /** @class */ (function () {
9416
+ function ImageDisplayModule() {
9417
+ }
9418
+ return ImageDisplayModule;
9419
+ }());
9420
+ ImageDisplayModule.decorators = [
9421
+ { type: i0.NgModule, args: [{
9422
+ imports: [
9423
+ corecomponents_v12.CoreComponentsTranslationModule,
9424
+ common.CommonModule,
9425
+ LocalizationModule
9426
+ ],
9427
+ declarations: [
9428
+ ImageDisplayComponent
9429
+ ],
9430
+ exports: [
9431
+ ImageDisplayComponent
9432
+ ]
9433
+ },] }
9434
+ ];
9435
+
9436
+ // The GUI part of the files-upload component. Not a standalone component.
9437
+ var FileUploadComponent = /** @class */ (function () {
9438
+ function FileUploadComponent(_promptService, _fileTypeImgPipe, iconService) {
9439
+ this._promptService = _promptService;
9440
+ this._fileTypeImgPipe = _fileTypeImgPipe;
9441
+ this.iconService = iconService;
9442
+ this.icons = exports["ɵbt"];
9443
+ // Element clickable
9444
+ this.link = false;
9445
+ this.readonly = false;
9446
+ // Is tile an 'adding' tile
9447
+ this.isAddingTile = false;
9448
+ // Set this parameter to false if clicking ok on the document edit popup does not save the document
9449
+ // so that refreshing of content on file open works correctly
9450
+ this.fileSavesOnPopupOkClick = true;
9451
+ this.isEditable = false;
9452
+ // Show a trashcan icon
9453
+ this.showTrashCan = false;
9454
+ // Show an image as placeholder
9455
+ this.showImage = false;
9456
+ this.customImageClick = false;
9457
+ this.deleteClick = new i0.EventEmitter();
9458
+ this.editClick = new i0.EventEmitter();
9459
+ this.imageClick = new i0.EventEmitter();
9460
+ this.previewImage = "";
9461
+ this._label = "";
9462
+ }
9463
+ Object.defineProperty(FileUploadComponent.prototype, "file", {
9464
+ get: function () {
9465
+ return this._file;
9466
+ },
9467
+ // Input file to upload.
9468
+ set: function (document) {
9469
+ this._file = document;
9470
+ this._updatePreviewImage();
9471
+ // we should produce a preview image from given document, but its contents might not yet have been loaded:
9472
+ this._listenForDocumentBodyChanges();
9473
+ },
9474
+ enumerable: false,
9475
+ configurable: true
9476
+ });
9477
+ Object.defineProperty(FileUploadComponent.prototype, "label", {
9478
+ get: function () {
9479
+ if (this._file && this._file.description) {
9480
+ return this._file.description;
9481
+ }
9482
+ else {
9483
+ return this._label;
9484
+ }
9485
+ },
9486
+ set: function (value) {
9487
+ this._label = value;
9488
+ },
9489
+ enumerable: false,
9490
+ configurable: true
9491
+ });
9492
+ FileUploadComponent.prototype.showClass = function () {
9493
+ return true;
9494
+ };
9495
+ Object.defineProperty(FileUploadComponent.prototype, "isLink", {
9496
+ get: function () {
9497
+ return this.link;
9498
+ },
9499
+ enumerable: false,
9500
+ configurable: true
9501
+ });
9502
+ FileUploadComponent.prototype.ngOnDestroy = function () {
9503
+ if (this._docBodyChangeSub) {
9504
+ this._docBodyChangeSub.unsubscribe();
9505
+ }
9506
+ };
9507
+ FileUploadComponent.prototype.onDeleteClick = function () {
9508
+ this.deleteClick.emit();
9509
+ };
9510
+ FileUploadComponent.prototype.onImageClick = function () {
9511
+ return __awaiter(this, void 0, void 0, function () {
9512
+ return __generator(this, function (_a) {
9513
+ if (this.isAddingTile) {
9514
+ return [2 /*return*/];
9515
+ }
9516
+ if (this.customImageClick) {
9517
+ this.imageClick.next(this._file);
9518
+ return [2 /*return*/];
9519
+ }
9520
+ //todo fix methods
9521
+ //first download document body if it is stored in a private cdn directory
9522
+ if (!this._file.documentBody) {
9523
+ //await this._generalDal.getDocumentContent(this._file).then(documentBody => this._file.documentBody = documentBody);
9524
+ }
9525
+ if (this._file.isImageDocument()) { //preview image
9526
+ this._promptService.showImage(this.file.documentBodyAsDataUri, "Preview");
9527
+ }
9528
+ else { //download document
9529
+ try {
9530
+ //FileUtils.DownloadFromDataUri(this._file.bodyAsDataUri, this._file.fileName);
9531
+ }
9532
+ catch (e) {
9533
+ }
9534
+ }
9535
+ return [2 /*return*/];
9536
+ });
9537
+ });
9538
+ };
9539
+ FileUploadComponent.prototype.onPencilClick = function () {
9540
+ return __awaiter(this, void 0, void 0, function () {
9541
+ var idForLink;
9542
+ return __generator(this, function (_a) {
9543
+ // refresh file content if files are saved individually
9544
+ if (this._file.hasId() && this.fileSavesOnPopupOkClick) {
9545
+ idForLink = void 0;
9546
+ if (this._file.idForLink) {
9547
+ idForLink = this._file.idForLink;
9548
+ }
9549
+ // Get most recent version of this file if it has an id and therefore has been saved in the db
9550
+ //TODO fix fetch
9551
+ // this._file = await this._generalDal.getDocumentFromTable(this._file.documentId);
9552
+ //this._file.idForLink = idForLink; // Restore the idForLink
9553
+ }
9554
+ this.editClick.emit(this._file);
9555
+ return [2 /*return*/];
9556
+ });
9557
+ });
9558
+ };
9559
+ // updates this.previewImage when doc body changes
9560
+ FileUploadComponent.prototype._listenForDocumentBodyChanges = function () {
9561
+ var _this = this;
9562
+ if (this._file) {
9563
+ if (this._docBodyChangeSub) {
9564
+ this._docBodyChangeSub.unsubscribe();
9565
+ }
9566
+ // @ts-ignore
9567
+ this._docBodyChangeSub = this._file.documentBodyChange.subscribe(function () {
9568
+ _this._updatePreviewImage();
9569
+ });
9570
+ }
9571
+ };
9572
+ FileUploadComponent.prototype._updatePreviewImage = function () {
9573
+ if (this._file) {
9574
+ if (this._file.isImageDocument()) {
9575
+ this.previewImage = this._file.documentBodyAsDataUri;
9576
+ if (this.previewImage === "") {
9577
+ //TODO fix fetch
9578
+ //this._generalDal.getDocumentContent(this._file).then(documentBody => this._file.documentBody = documentBody);
9579
+ //this.previewImage = this._file.documentBody;
9580
+ }
9581
+ }
9582
+ else {
9583
+ this.previewImage = this._fileTypeImgPipe.transform(this.file.fileTypeInternal);
9584
+ }
9585
+ }
9586
+ };
9587
+ return FileUploadComponent;
9588
+ }());
9589
+ FileUploadComponent.decorators = [
9590
+ { type: i0.Component, args: [{
9591
+ selector: "co-file-upload",
9592
+ template: "\n <co-tile-render [hideImageDisplayWhenNoImage]=\"true\" [imageDataUri]=\"previewImage\" [description]=\"label\" (imageClick)=\"onImageClick()\">\n <ng-template #infoTemplate>\n <co-button *ngIf=\"isEditable && !readonly\" class=\"edit-file\" [iconData]=\"iconService.getIcon(icons.Account)\"\n (click)=\"onPencilClick()\"></co-button>\n </ng-template>\n <co-icon *ngIf=\"showTrashCan && !readonly\" [iconData]=\"iconService.getIcon(icons.Trashbin)\" class=\"trash\" (click)=\"onDeleteClick()\"></co-icon>\n <co-icon tile-render-image-content *ngIf=\"icon\" class=\"dark add-button\" [icon]=\"icon\"></co-icon>\n </co-tile-render>\n ",
9593
+ encapsulation: i0.ViewEncapsulation.None
9594
+ },] }
9595
+ ];
9596
+ FileUploadComponent.ctorParameters = function () { return [
9597
+ { type: corecomponents_v12.PromptService },
9598
+ { type: FileTypeImagePipe },
9599
+ { type: IconCacheService }
9600
+ ]; };
9601
+ FileUploadComponent.propDecorators = {
9602
+ form: [{ type: i0.ViewChild, args: [corecomponents_v12.FormComponent,] }],
9603
+ file: [{ type: i0.Input }],
9604
+ icon: [{ type: i0.Input }],
9605
+ link: [{ type: i0.Input }],
9606
+ readonly: [{ type: i0.Input }],
9607
+ isAddingTile: [{ type: i0.Input }],
9608
+ fileSavesOnPopupOkClick: [{ type: i0.Input }],
9609
+ isEditable: [{ type: i0.Input }],
9610
+ label: [{ type: i0.Input }],
9611
+ showTrashCan: [{ type: i0.Input }],
9612
+ showImage: [{ type: i0.Input }],
9613
+ customImageClick: [{ type: i0.Input }],
9614
+ deleteClick: [{ type: i0.Output }],
9615
+ editClick: [{ type: i0.Output }],
9616
+ imageClick: [{ type: i0.Output }],
9617
+ showClass: [{ type: i0.HostBinding, args: ['class.co-file-upload',] }],
9618
+ isLink: [{ type: i0.HostBinding, args: ["class.link",] }]
9619
+ };
9620
+ __decorate([
9621
+ InputBoolean()
9622
+ ], FileUploadComponent.prototype, "isAddingTile", void 0);
9623
+ __decorate([
9624
+ InputBoolean()
9625
+ ], FileUploadComponent.prototype, "fileSavesOnPopupOkClick", void 0);
9626
+ __decorate([
9627
+ InputBoolean()
9628
+ ], FileUploadComponent.prototype, "isEditable", void 0);
9629
+
9630
+ // large or small tiles for the <tile-render> component.
9631
+ var TileSizeType;
9632
+ (function (TileSizeType) {
9633
+ TileSizeType[TileSizeType["Small"] = 0] = "Small";
9634
+ TileSizeType[TileSizeType["Large"] = 1] = "Large";
9635
+ })(TileSizeType || (TileSizeType = {}));
9636
+
9637
+ /**
9638
+ * A generic component that shows a collection of simple inputs (description, image, price, etc.) as a tile-shaped graphic with an image
9639
+ * part (upper) and an info part (lower).
9640
+ */
9641
+ var TileRenderComponent = /** @class */ (function () {
9642
+ function TileRenderComponent(iconCacheService) {
9643
+ this.iconCacheService = iconCacheService;
9644
+ this.icons = exports["ɵbt"];
9645
+ // Render a large or small tile.
9646
+ this.tileSize = TileSizeType.Large;
9647
+ // When this tile is selected, this icon will be shown green in the upper-left corner (defaults to 'check').
9648
+ this.iconWhenSelected = "check";
9649
+ // Emits when the image wrapper was clicked (top half of this component) .
9650
+ this.imageClick = new i0.EventEmitter();
9651
+ // Emits when the info wrapper was clicked (bottom half of this component).
9652
+ this.infoClick = new i0.EventEmitter();
9653
+ this.Icon = exports["ɵbt"];
9654
+ }
9655
+ Object.defineProperty(TileRenderComponent.prototype, "inSmallTileMode", {
9656
+ get: function () {
9657
+ return this.tileSize === TileSizeType.Small;
9658
+ },
9659
+ enumerable: false,
9660
+ configurable: true
9661
+ });
9662
+ TileRenderComponent.prototype.showClass = function () {
9663
+ return true;
9664
+ };
9665
+ Object.defineProperty(TileRenderComponent.prototype, "inLargeTileMode", {
9666
+ get: function () {
9667
+ return this.tileSize === TileSizeType.Large;
9668
+ },
9669
+ enumerable: false,
9670
+ configurable: true
9671
+ });
9672
+ TileRenderComponent.prototype.ngOnDestroy = function () {
9673
+ this.infoTemplate = undefined;
9674
+ };
9675
+ return TileRenderComponent;
9676
+ }());
9677
+ TileRenderComponent.decorators = [
9678
+ { type: i0.Component, args: [{
9679
+ selector: "co-tile-render",
9680
+ template: "\n <div class=\"image\" (click)=\"imageClick.emit()\">\n <label *ngIf=\"inLargeTileMode && tagDescription\" [textContent]=\"tagDescription\"></label>\n <co-icon *ngIf=\"selected\" class=\"selected small light circle\" [iconData]=\"iconCacheService.getIcon(iconWhenSelected)\" ></co-icon>\n <co-image [source]=\"imageDataUri\" [class.hidden]=\"(inSmallTileMode || hideImageDisplayWhenNoImage) && !imageDataUri\"\n ></co-image>\n\n\n\n <ng-content select=\"[tile-render-image-content]\"></ng-content>\n </div>\n <div class=\"info\" (click)=\"infoClick.emit()\">\n <ng-container *ngIf=\"infoTemplate\" [templateWrapper]=\"infoTemplate\"></ng-container>\n <span *ngIf=\"inLargeTileMode && label\" class=\"label\" [textContent]=\"label\"></span>\n <span *ngIf=\"inLargeTileMode && description\" class=\"description\" [textContent]=\"description\"></span>\n </div>\n <ng-content></ng-content>\n ",
9681
+ encapsulation: i0.ViewEncapsulation.None
9682
+ },] }
9683
+ ];
9684
+ TileRenderComponent.ctorParameters = function () { return [
9685
+ { type: IconCacheService }
9686
+ ]; };
9687
+ TileRenderComponent.propDecorators = {
9688
+ infoTemplate: [{ type: i0.ContentChild, args: ["infoTemplate", { static: true },] }],
9689
+ imageDataUri: [{ type: i0.Input }],
9690
+ tagDescription: [{ type: i0.Input }],
9691
+ label: [{ type: i0.Input }],
9692
+ description: [{ type: i0.Input }],
9693
+ tileSize: [{ type: i0.Input }],
9694
+ price: [{ type: i0.Input }],
9695
+ hidePrice: [{ type: i0.Input }],
9696
+ iconWhenSelected: [{ type: i0.Input }],
9697
+ hideImageDisplayWhenNoImage: [{ type: i0.Input }],
9698
+ selected: [{ type: i0.Input }, { type: i0.HostBinding, args: ["class.selected",] }],
9699
+ imageClick: [{ type: i0.Output }],
9700
+ infoClick: [{ type: i0.Output }],
9701
+ inSmallTileMode: [{ type: i0.HostBinding, args: ["class.small-size",] }],
9702
+ showClass: [{ type: i0.HostBinding, args: ["class.co-tile-render",] }]
9703
+ };
9704
+
9705
+ var TileRenderModule = /** @class */ (function () {
9706
+ function TileRenderModule() {
9707
+ }
9708
+ return TileRenderModule;
9709
+ }());
9710
+ TileRenderModule.decorators = [
9711
+ { type: i0.NgModule, args: [{
9712
+ imports: [
9713
+ ImageDisplayModule,
9714
+ common.CommonModule,
9715
+ corecomponents_v12.IconModule,
9716
+ corecomponents_v12.ImageModule,
9717
+ corecomponents_v12.TemplateWrapperModule
9718
+ ],
9719
+ declarations: [
9720
+ TileRenderComponent
9721
+ ],
9722
+ exports: [
9723
+ TileRenderComponent
9724
+ ],
9725
+ providers: []
9726
+ },] }
9727
+ ];
9728
+
9729
+ var FileUploadModule = /** @class */ (function () {
9730
+ function FileUploadModule() {
9731
+ }
9732
+ return FileUploadModule;
9733
+ }());
9734
+ FileUploadModule.decorators = [
9735
+ { type: i0.NgModule, args: [{
9736
+ imports: [
9737
+ corecomponents_v12.IconModule,
9738
+ TileRenderModule,
9739
+ common.CommonModule,
9740
+ corecomponents_v12.ButtonModule
9741
+ ],
9742
+ declarations: [
9743
+ FileUploadComponent
9744
+ ],
9745
+ exports: [
9746
+ FileUploadComponent
9747
+ ],
9748
+ providers: []
9749
+ },] }
9750
+ ];
9751
+
9752
+ // @dynamic
9753
+ var EnumUtils = /** @class */ (function () {
9754
+ function EnumUtils() {
9755
+ }
9756
+ // Returns a new array with all string values (not keys) of given string enum class.
9757
+ EnumUtils.StringEnumToArray = function (clazz) {
9758
+ var asArray = [];
9759
+ var keys = Object.keys(clazz);
9760
+ for (var i = 0, len = keys.length; i < len; i++) {
9761
+ asArray.push(clazz[keys[i]]);
9762
+ }
9763
+ return asArray;
9764
+ };
9765
+ /**
9766
+ * Returns a single string representation of given string enum class
9767
+ * @param clazz
9768
+ * @returns {string} eg "input-lov-slideout, financial-customer-group-select" for a given clazz of InputLovSlideoutComponentSelectors
9769
+ */
9770
+ EnumUtils.StringEnumToSingleString = function (clazz) {
9771
+ return StringEnumToSingleString(clazz);
9772
+ };
9773
+ // Get the number values from an enum
9774
+ EnumUtils.GetNumberEnumValues = function (numberEnumClass) {
9775
+ return this.GetObjValues(numberEnumClass).filter(function (value) { return NumberUtils.IsNumber(value); });
9776
+ };
9777
+ // Get the the property object value names in string format from the enum
9778
+ EnumUtils.GetStringEnumValues = function (stringEnumClass) {
9779
+ return this.GetObjValues(stringEnumClass).filter(function (value) { return StringUtils.IsString(value); });
9780
+ };
9781
+ EnumUtils.GetObjValues = function (numberEnumClass) {
9782
+ return Object.keys(numberEnumClass).map(function (key) { return numberEnumClass[key]; });
9783
+ };
9784
+ /**
9785
+ * Returns the enum in object format to make handling easier
9786
+ * Works for Enums with the following format:
9787
+ * foo: 1
9788
+ * bar: 2
9789
+ * etc...
9790
+ * @param enumClass
9791
+ * @returns {Object}
9792
+ */
9793
+ EnumUtils.createObjectFromEnum = function (enumClass) {
9794
+ // const objectifiedEnum: { refNumber: number; name: string }[] = [];
9795
+ var objectifiedEnum = [];
9796
+ for (var enumItem in enumClass) {
9797
+ if (typeof enumClass[enumItem] === "number") {
9798
+ objectifiedEnum.push({ key: enumClass[enumItem], value: enumItem });
9799
+ }
9800
+ }
9801
+ return objectifiedEnum;
9802
+ };
9803
+ EnumUtils.getStringEnumKeysArray = function (enumType) {
9804
+ var members = Object.keys(enumType);
9805
+ if (!EnumUtils.isNumeral(enumType)) {
9806
+ return members;
9807
+ }
9808
+ var keys = [];
9809
+ members.forEach(function (x) {
9810
+ var parsedValue = parseInt(x, 10);
9811
+ if (Number.isNaN(parsedValue)) {
9812
+ keys.push(x);
9813
+ }
9814
+ });
9815
+ return keys;
9816
+ };
9817
+ EnumUtils.buildPromiseDomainValueListFromEnumClass = function (enumClass, dictionary, keysAsDescription) {
9818
+ if (keysAsDescription === void 0) { keysAsDescription = false; }
9819
+ return new Promise(function (resolve, reject) {
9820
+ try {
9821
+ resolve(EnumUtils.buildDomainValueListFromEnumClass(enumClass, dictionary, keysAsDescription));
9822
+ }
9823
+ catch (e) {
9824
+ reject();
9825
+ }
9826
+ });
9827
+ };
9828
+ EnumUtils.buildDomainValueListFromEnumClass = function (enumClass, dictionary, keysAsDescription) {
9829
+ if (keysAsDescription === void 0) { keysAsDescription = false; }
9830
+ var collection = [];
9831
+ if (keysAsDescription) {
9832
+ var enumKeys = EnumUtils.getStringEnumKeysArray(enumClass);
9833
+ enumKeys.forEach(function (key, index) {
9834
+ var domainObjectForLov = new coDomainValue_bo.CoDomainValue();
9835
+ domainObjectForLov.code = enumClass[key];
9836
+ domainObjectForLov.description = dictionary.get(key);
9837
+ domainObjectForLov.sequence = index;
9838
+ collection.push(domainObjectForLov);
9839
+ });
9840
+ }
9841
+ else {
9842
+ EnumUtils.StringEnumToArray(enumClass).forEach(function (strEnumVal, index) {
9843
+ var domainObjectForLov = new coDomainValue_bo.CoDomainValue();
9844
+ domainObjectForLov.code = strEnumVal;
9845
+ domainObjectForLov.description = dictionary.get(strEnumVal);
9846
+ domainObjectForLov.sequence = index;
9847
+ collection.push(domainObjectForLov);
9848
+ });
9849
+ }
9850
+ return collection;
9851
+ };
9852
+ EnumUtils.getKeyByValue = function (enumType, enumValue) {
9853
+ return Object.keys(enumType)[Object.values(enumType).indexOf(enumValue)];
9854
+ };
9855
+ EnumUtils.isNumeral = function (enumType) {
9856
+ var members = Object.keys(enumType);
9857
+ if (!members.some(function (x) { return true; })) {
9858
+ throw new TypeError("Invalid enumeration type.");
9859
+ }
9860
+ var parsedCount = 0;
9861
+ members.forEach(function (x) {
9862
+ var parsedValue = parseInt(x, 10);
9863
+ if (!Number.isNaN(parsedValue)) {
9864
+ parsedCount++;
9865
+ }
9866
+ });
9867
+ return parsedCount === members.length / 2;
9868
+ };
9869
+ return EnumUtils;
9870
+ }());
9871
+ // Outside the class because it's used to generate component selectors, and aot can't call statics.
9872
+ function StringEnumToSingleString(clazz) {
9873
+ var str = "";
9874
+ var keys = Object.keys(clazz);
9875
+ for (var i = 0, len = keys.length; i < len; i++) {
9876
+ str += clazz[keys[i]] + ", ";
9877
+ }
9878
+ str = StringUtils.RemoveLastChars(str, 2);
9879
+ return str;
9880
+ }
9881
+
9882
+ /**
9883
+ * Custom component for enabling and disabling multiple items based on an input enum
9884
+ * For the component to work, an enum is required and a list of enabled items so that
9885
+ * the component knows which items from the enum are already enabled
9886
+ *
9887
+ * Note: can be improved by not only accepting a string array of enabledItemProperties but also a full cgref number because that will save one conversion step as
9888
+ * BO's already contain these numbers.
9889
+ */
9890
+ var MultiplePropertyTogglerComponent = /** @class */ (function () {
9891
+ function MultiplePropertyTogglerComponent() {
9892
+ this.label = "";
9893
+ this.readonly = false;
9894
+ this.enableditemsChange = new i0.EventEmitter();
9895
+ // Outputs the sum of cgrefkeys of all newly enabled items
9896
+ this.onPropertyItemChange = new i0.EventEmitter();
9897
+ this.Icons = exports["ɵbt"];
9898
+ this.objectifiedEnum = [];
9899
+ this.enabledItemNumberList = [];
9900
+ }
9901
+ MultiplePropertyTogglerComponent.prototype.showClass = function () {
9902
+ return true;
9903
+ };
9904
+ MultiplePropertyTogglerComponent.prototype.ngAfterViewInit = function () {
9905
+ if (this.propertyNamesToToggle) {
9906
+ this.objectifiedEnum = EnumUtils.createObjectFromEnum(this.propertyNamesToToggle);
9907
+ }
9908
+ else {
9909
+ // PropertytogglerItems is empty
9910
+ }
9911
+ this.makeNumberArrayFromCgRefCodeSum();
9912
+ };
9913
+ MultiplePropertyTogglerComponent.prototype.isValueActive = function (propertyToCheck) {
9914
+ return this.enabledItemNumberList.includes(propertyToCheck.key);
9915
+ };
9916
+ MultiplePropertyTogglerComponent.prototype.clickToToggleProperty = function (target) {
9917
+ var _this = this;
9918
+ var newRefNumberSum = 0;
9919
+ if (this.enabledItemNumberList.includes(target.key)) {
9920
+ this.enabledItemNumberList.splice(this.enabledItemNumberList.indexOf(target.key), 1);
9921
+ }
9922
+ else {
9923
+ this.enabledItemNumberList.push(target.key);
9924
+ }
9925
+ this.enabledItemNumberList.forEach(function (enabledItem) {
9926
+ newRefNumberSum += _this.objectifiedEnum.find(function (x) { return x.key === enabledItem; }).key;
9927
+ });
9928
+ this.onPropertyItemChange.emit(newRefNumberSum);
9929
+ };
9930
+ MultiplePropertyTogglerComponent.prototype.makeNumberArrayFromCgRefCodeSum = function () {
9931
+ if (this.enableditems) {
9932
+ this.enabledItemNumberList = RefCodeUtils.GetMultiRefCodeChoices(this.enableditems);
9933
+ }
9934
+ };
9935
+ return MultiplePropertyTogglerComponent;
9936
+ }());
9937
+ MultiplePropertyTogglerComponent.decorators = [
9938
+ { type: i0.Component, args: [{
9939
+ selector: "co-multiple-property-toggler",
9940
+ template: "\n <div class=\"input-text-content-wrapper\">\n <h3 [textContent]=\"label\"></h3> <!-- | localize-->\n\n <div class=\"property-toggling-container\">\n\n <div class=\"row\" *ngFor=\"let propertyTogglerItem of objectifiedEnum | keyvalue\">\n\n <co-input-checkbox [model]=\"isValueActive(propertyTogglerItem.value)\"\n (click)=\"clickToToggleProperty(propertyTogglerItem.value)\"></co-input-checkbox>\n\n <label [textContent]=\"propertyTogglerItem.value.value\"></label>\n </div>\n </div>\n </div>\n ",
9941
+ encapsulation: i0.ViewEncapsulation.None
9942
+ },] }
9943
+ ];
9944
+ MultiplePropertyTogglerComponent.propDecorators = {
9945
+ label: [{ type: i0.Input }],
9946
+ propertyNamesToToggle: [{ type: i0.Input }],
9947
+ readonly: [{ type: i0.Input }],
9948
+ enableditems: [{ type: i0.Input }],
9949
+ enableditemsChange: [{ type: i0.Output }],
9950
+ onPropertyItemChange: [{ type: i0.Output }],
9951
+ showClass: [{ type: i0.HostBinding, args: ["class.co-multiple-property-toggler",] }]
9952
+ };
9953
+
9954
+ var MultiplePropertyTogglerModule = /** @class */ (function () {
9955
+ function MultiplePropertyTogglerModule() {
9956
+ }
9957
+ return MultiplePropertyTogglerModule;
9958
+ }());
9959
+ MultiplePropertyTogglerModule.decorators = [
9960
+ { type: i0.NgModule, args: [{
9961
+ imports: [
9962
+ corecomponents_v12.InputCheckboxModule,
9963
+ common.CommonModule
9964
+ ],
9965
+ declarations: [
9966
+ MultiplePropertyTogglerComponent
9967
+ ],
9968
+ exports: [
9969
+ MultiplePropertyTogglerComponent
9970
+ ]
9971
+ },] }
9972
+ ];
9973
+
9974
+ var FileUploadPopupModule = /** @class */ (function () {
9975
+ function FileUploadPopupModule() {
9976
+ }
9977
+ return FileUploadPopupModule;
9978
+ }());
9979
+ FileUploadPopupModule.decorators = [
9980
+ { type: i0.NgModule, args: [{
9981
+ imports: [
9982
+ corecomponents_v12.CoDialogModule,
9983
+ corecomponents_v12.FormModule,
9984
+ LocalizationModule,
9985
+ corecomponents_v12.InputTextModule,
9986
+ corecomponents_v12.ButtonModule,
9987
+ common.CommonModule,
9988
+ corecomponents_v12.ScreenConfigurationModule,
9989
+ MultiplePropertyTogglerModule
9990
+ ],
9991
+ declarations: [
9992
+ FileUploadPopupComponent
9993
+ ],
9994
+ exports: [
9995
+ FileUploadPopupComponent
9996
+ ],
9997
+ providers: []
9998
+ },] }
9999
+ ];
10000
+
10001
+ var AppFileDropzoneModule = /** @class */ (function () {
10002
+ function AppFileDropzoneModule() {
10003
+ }
10004
+ return AppFileDropzoneModule;
10005
+ }());
10006
+ AppFileDropzoneModule.decorators = [
10007
+ { type: i0.NgModule, args: [{
10008
+ imports: [
10009
+ corecomponents_v12.IconModule,
10010
+ ],
10011
+ declarations: [
10012
+ AppFileDropzoneComponent
10013
+ ],
10014
+ exports: [
10015
+ AppFileDropzoneComponent
10016
+ ],
10017
+ providers: []
10018
+ },] }
10019
+ ];
10020
+
10021
+ var FilesUploadModule = /** @class */ (function () {
10022
+ function FilesUploadModule() {
10023
+ }
10024
+ return FilesUploadModule;
10025
+ }());
10026
+ FilesUploadModule.decorators = [
10027
+ { type: i0.NgModule, args: [{
10028
+ imports: [
10029
+ corecomponents_v12.CoDialogModule,
10030
+ corecomponents_v12.FormModule,
10031
+ corecomponents_v12.InputTextModule,
10032
+ corecomponents_v12.ScreenConfigurationModule,
10033
+ corecomponents_v12.ButtonModule,
10034
+ LocalizationModule,
10035
+ corecomponents_v12.IconModule,
10036
+ ImageDisplayModule,
10037
+ common.CommonModule,
10038
+ // TagsModule,
10039
+ corecomponents_v12.InputCheckboxModule,
10040
+ FileUploadModule,
10041
+ FileUploadPopupModule,
10042
+ AppFileDropzoneModule
10043
+ ],
10044
+ declarations: [
10045
+ FilesUploadComponent,
10046
+ DragDropContainerComponent
10047
+ ],
10048
+ exports: [
10049
+ FilesUploadComponent,
10050
+ DragDropContainerComponent
10051
+ ],
10052
+ providers: [
10053
+ overlay.Overlay,
10054
+ FileTypeImagePipe
10055
+ ]
10056
+ },] }
10057
+ ];
10058
+
10059
+ var ActivityListComponent = /** @class */ (function () {
10060
+ function ActivityListComponent(iconCacheService, _dictionaryService) {
10061
+ this.iconCacheService = iconCacheService;
10062
+ this._dictionaryService = _dictionaryService;
10063
+ this.Icon = exports["ɵbt"];
10064
+ this.RelationKind = relationKind_enum.RelationKind;
10065
+ this.ActivityType = activityType.ActivityType;
10066
+ this.TimeUtils = timeUtils.TimeUtils;
10067
+ this.activities = [];
10068
+ this.remarkIcon = exports["ɵbt"].CommentRegular;
10069
+ this.workIcon = exports["ɵbt"].PersonDiggingRegular;
10070
+ }
10071
+ ActivityListComponent.prototype.showClass = function () {
10072
+ return true;
10073
+ };
10074
+ ActivityListComponent.prototype.ngOnInit = function () {
10075
+ return __awaiter(this, void 0, void 0, function () {
10076
+ return __generator(this, function (_a) {
10077
+ return [2 /*return*/];
10078
+ });
10079
+ });
10080
+ };
10081
+ ActivityListComponent.prototype.getRelationKind = function (author) {
10082
+ if (author) {
10083
+ return author.relationType;
10084
+ }
10085
+ else {
10086
+ return null;
10087
+ }
10088
+ };
10089
+ ActivityListComponent.prototype.getDateString = function (date) {
10090
+ return date.getDay().toString() + ' ' + (this._dictionaryService.get(ALL_MONTHS[date.getMonth()])) + ' ' + date.getFullYear();
10091
+ };
10092
+ ActivityListComponent.prototype.getActivityIcon = function (activity) {
10093
+ switch (activity.activityType) {
10094
+ case activityType.ActivityType.Remark:
10095
+ return this.remarkIcon;
10096
+ case activityType.ActivityType.StateChange:
10097
+ case activityType.ActivityType.WorkflowStatus:
10098
+ case activityType.ActivityType.Work:
10099
+ case activityType.ActivityType.Task:
10100
+ case activityType.ActivityType.WorkflowTask:
10101
+ case activityType.ActivityType.Form:
10102
+ return this.workIcon;
10103
+ }
10104
+ };
10105
+ ActivityListComponent.prototype.showAttachments = function (activity) {
10106
+ if (activity.documents && activity.documents.length > 0) {
10107
+ return true;
10108
+ }
10109
+ return false;
10110
+ };
10111
+ ActivityListComponent.prototype.showWorkedTime = function (activity) {
10112
+ if ((activity.IsWork && activity.work && activity.work.workedTime) ||
10113
+ (activity.IsTask && activity.task && activity.task.workedTime)) {
10114
+ return true;
10115
+ }
10116
+ return false;
10117
+ };
10118
+ ActivityListComponent.prototype.getWorkedTime = function (activity) {
10119
+ if (activity.IsWork && activity.work && activity.work.workedTime) {
10120
+ return activity.work.workedTime;
10121
+ }
10122
+ else if (activity.IsTask && activity.task && activity.task.workedTime) {
10123
+ return activity.task.workedTime;
10124
+ }
10125
+ return 0;
10126
+ };
10127
+ ActivityListComponent.prototype.openActivityPopup = function (activity) {
10128
+ this.showActivityPopup = true;
10129
+ this.currentActivityDocuments = activity.documents;
10130
+ };
10131
+ return ActivityListComponent;
10132
+ }());
10133
+ ActivityListComponent.decorators = [
10134
+ { type: i0.Component, args: [{
10135
+ selector: "co-activity-list",
10136
+ template: "\n <div class=\"activity-list-wrapper\">\n <div class=\"activity-wrapper\" [class.customer-reply-wrapper]=\"(getRelationKind(activity.author) === RelationKind.Customer)\" *ngFor=\"let activity of activities\" >\n <div class=\"activity-display\">\n <div class=\"activity-display-title\">\n <span>{{activity.author ? ( activity.author.initials + ' ' + activity.author.familyName) : \" \"}}</span>\n <span>{{getDateString(activity.lastActionDateTime)}}</span>\n <co-icon [iconData]=\"iconCacheService.getIcon(getActivityIcon(activity))\"></co-icon>\n </div>\n <div class=\"activity-display-content\" [class.customer-reply-content]=\"(getRelationKind(activity.author) === RelationKind.Customer)\">\n <div class=\"activity-display-body\">\n <span>{{activity.subDescription}}</span>\n </div>\n <div class=\"activity-display-footer\">\n <!--TODO discuss with Rob is we can gather the info needed to see which workflow triggers have previously been activated for this trigger-->\n <!--<div *ngIf=\"showState(activity)\" class=\"activity-state\">\n <span *ngIf=\"showAttachments(activity)\">{{activity.documents.length}}</span>\n </div>-->\n <co-icon *ngIf=\"showAttachments(activity)\" [iconData]=\"iconCacheService.getIcon(Icon.PaperclipRegular)\" (click)=\"openActivityPopup(activity)\"></co-icon>\n <span *ngIf=\"showAttachments(activity)\">{{activity.documents.length}}</span>\n <co-icon *ngIf=\"showWorkedTime(activity)\"\n [iconData]=\"iconCacheService.getIcon(Icon.ClockRegular)\"></co-icon>\n <span *ngIf=\"showWorkedTime(activity)\" >\n {{TimeUtils.ConvertToDuration(getWorkedTime(activity))}}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <co-dialog *ngIf=\"showActivityPopup\" (closeClick)=\"showActivityPopup = false\">\n <co-files-upload [documents]=\"currentActivityDocuments\">\n </co-files-upload>\n </co-dialog>\n ",
10137
+ encapsulation: i0.ViewEncapsulation.None
10138
+ },] }
10139
+ ];
10140
+ ActivityListComponent.ctorParameters = function () { return [
10141
+ { type: IconCacheService },
10142
+ { type: DictionaryService }
10143
+ ]; };
10144
+ ActivityListComponent.propDecorators = {
10145
+ showClass: [{ type: i0.HostBinding, args: ["class.co-activity-list",] }],
10146
+ activities: [{ type: i0.Input }],
10147
+ remarkIcon: [{ type: i0.Input }],
10148
+ workIcon: [{ type: i0.Input }]
10149
+ };
10150
+
10151
+ var ActivityListModule = /** @class */ (function () {
10152
+ function ActivityListModule() {
10153
+ }
10154
+ return ActivityListModule;
10155
+ }());
10156
+ ActivityListModule.decorators = [
10157
+ { type: i0.NgModule, args: [{
10158
+ imports: [
10159
+ corecomponents_v12.IconModule,
10160
+ common.CommonModule,
10161
+ corecomponents_v12.CoDialogModule,
10162
+ FilesUploadModule
10163
+ ],
10164
+ declarations: [
10165
+ ActivityListComponent
10166
+ ],
10167
+ exports: [
10168
+ ActivityListComponent
10169
+ ]
10170
+ },] }
10171
+ ];
10172
+
6645
10173
  /*
6646
10174
  * Public API Surface of sharedcomponents
6647
10175
  */
@@ -6650,6 +10178,8 @@
6650
10178
  * Generated bundle index. Do not edit.
6651
10179
  */
6652
10180
 
10181
+ exports.ActivityListComponent = ActivityListComponent;
10182
+ exports.ActivityListModule = ActivityListModule;
6653
10183
  exports.AgendaEvent = AgendaEvent;
6654
10184
  exports.AgendaEventPerDay = AgendaEventPerDay;
6655
10185
  exports.CoLinearGaugeComponent = CoLinearGaugeComponent;
@@ -6658,6 +10188,8 @@
6658
10188
  exports.DatePlanningModule = DatePlanningModule;
6659
10189
  exports.DocsignComponent = DocsignComponent;
6660
10190
  exports.DocsignModule = DocsignModule;
10191
+ exports.FilesUploadComponent = FilesUploadComponent;
10192
+ exports.FilesUploadModule = FilesUploadModule;
6661
10193
  exports.KeyPadComponent = KeyPadComponent;
6662
10194
  exports.KeyPadModule = KeyPadModule;
6663
10195
  exports.LayoutSwitcherComponent = LayoutSwitcherComponent;
@@ -6718,7 +10250,24 @@
6718
10250
  exports["ɵcp"] = MASTER_PIPES;
6719
10251
  exports["ɵcq"] = ArrayNumberPipe;
6720
10252
  exports["ɵcr"] = UCfirstPipe;
10253
+ exports["ɵcs"] = FileTypeImagePipe;
10254
+ exports["ɵct"] = BaseFileUploadComponent;
10255
+ exports["ɵcu"] = InputBoolean;
10256
+ exports["ɵcv"] = ImageDisplayModule;
10257
+ exports["ɵcw"] = ImageDisplayComponent;
10258
+ exports["ɵcx"] = FileUploadModule;
10259
+ exports["ɵcy"] = TileRenderModule;
10260
+ exports["ɵcz"] = TileRenderComponent;
6721
10261
  exports["ɵd"] = SharedConnectorService;
10262
+ exports["ɵda"] = FileUploadComponent;
10263
+ exports["ɵdb"] = FileUploadPopupModule;
10264
+ exports["ɵdc"] = MultiplePropertyTogglerModule;
10265
+ exports["ɵdd"] = MultiplePropertyTogglerComponent;
10266
+ exports["ɵde"] = FileUploadPopupComponent;
10267
+ exports["ɵdf"] = AppFileDropzoneModule;
10268
+ exports["ɵdg"] = AppFileDropzoneComponent;
10269
+ exports["ɵdh"] = DragDropContainerComponent;
10270
+ exports["ɵdi"] = DragDropService;
6722
10271
  exports["ɵe"] = OptionsService;
6723
10272
  exports["ɵf"] = DictionaryService;
6724
10273
  exports["ɵg"] = LocalizeService;