@colijnit/mainapi 1.0.38 → 1.0.40

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 (281) hide show
  1. package/build/enum/absence-type.enum.d.ts +10 -10
  2. package/build/enum/absence-type.enum.js +14 -14
  3. package/build/enum/activities-object-name.enum.d.ts +4 -4
  4. package/build/enum/activities-object-name.enum.js +8 -8
  5. package/build/enum/activities-operation-name.enum.d.ts +8 -8
  6. package/build/enum/activities-operation-name.enum.js +12 -12
  7. package/build/enum/activity-sort-type.enum.d.ts +5 -5
  8. package/build/enum/activity-sort-type.enum.js +9 -9
  9. package/build/enum/activity-type.d.ts +9 -9
  10. package/build/enum/activity-type.js +13 -13
  11. package/build/enum/article-publication.enum.d.ts +5 -5
  12. package/build/enum/article-publication.enum.js +9 -9
  13. package/build/enum/backend-service-name.enum.d.ts +9 -9
  14. package/build/enum/backend-service-name.enum.js +13 -13
  15. package/build/enum/co-document-image-display-kind.enum.d.ts +5 -5
  16. package/build/enum/co-document-image-display-kind.enum.js +9 -9
  17. package/build/enum/co-document-type.enum.d.ts +5 -5
  18. package/build/enum/co-document-type.enum.js +9 -9
  19. package/build/enum/co-sub-report.bo.d.ts +11 -11
  20. package/build/enum/co-sub-report.bo.js +21 -21
  21. package/build/enum/config-object-name.enum.d.ts +3 -3
  22. package/build/enum/config-object-name.enum.js +7 -7
  23. package/build/enum/data-mapping.enum.d.ts +5 -5
  24. package/build/enum/data-mapping.enum.js +9 -9
  25. package/build/enum/data-service-method.enum.d.ts +15 -15
  26. package/build/enum/data-service-method.enum.js +19 -19
  27. package/build/enum/db-boolean-value-type.enum.d.ts +12 -12
  28. package/build/enum/db-boolean-value-type.enum.js +32 -32
  29. package/build/enum/delivery-time-unit-type.enum.d.ts +4 -4
  30. package/build/enum/delivery-time-unit-type.enum.js +8 -8
  31. package/build/enum/document-allowed-type.enum.d.ts +10 -10
  32. package/build/enum/document-allowed-type.enum.js +14 -14
  33. package/build/enum/document-method.enum.d.ts +6 -6
  34. package/build/enum/document-method.enum.js +10 -10
  35. package/build/enum/domain-name.enum.d.ts +64 -64
  36. package/build/enum/domain-name.enum.js +68 -68
  37. package/build/enum/event-notification-operation-name.enum.d.ts +3 -0
  38. package/build/enum/event-notification-operation-name.enum.js +7 -0
  39. package/build/enum/file-type-internal.enum.d.ts +11 -11
  40. package/build/enum/file-type-internal.enum.js +15 -15
  41. package/build/enum/file-type.enum.d.ts +5 -5
  42. package/build/enum/file-type.enum.js +9 -9
  43. package/build/enum/general-method.enum.d.ts +37 -37
  44. package/build/enum/general-method.enum.js +41 -41
  45. package/build/enum/insured-interest-type.enum.d.ts +10 -10
  46. package/build/enum/insured-interest-type.enum.js +14 -14
  47. package/build/enum/internal-param.enum.d.ts +10 -10
  48. package/build/enum/internal-param.enum.js +14 -14
  49. package/build/enum/ione-module-name.enum.d.ts +39 -39
  50. package/build/enum/ione-module-name.enum.js +55 -55
  51. package/build/enum/master-data-object-name.enum.d.ts +25 -25
  52. package/build/enum/master-data-object-name.enum.js +29 -29
  53. package/build/enum/message-type.enum.d.ts +6 -6
  54. package/build/enum/message-type.enum.js +10 -10
  55. package/build/enum/module-name.enum.d.ts +15 -14
  56. package/build/enum/module-name.enum.js +19 -18
  57. package/build/enum/module-navigation-link.d.ts +5 -5
  58. package/build/enum/module-navigation-link.js +2 -2
  59. package/build/enum/note-display-type.enum.d.ts +5 -5
  60. package/build/enum/note-display-type.enum.js +9 -9
  61. package/build/enum/one-zero-bool-db-type.enum.d.ts +5 -5
  62. package/build/enum/one-zero-bool-db-type.enum.js +20 -20
  63. package/build/enum/own-risk.enum.d.ts +7 -7
  64. package/build/enum/own-risk.enum.js +11 -11
  65. package/build/enum/period.enum.d.ts +7 -7
  66. package/build/enum/period.enum.js +11 -11
  67. package/build/enum/personal-activity-tab.enum.d.ts +4 -4
  68. package/build/enum/personal-activity-tab.enum.js +8 -8
  69. package/build/enum/preset-object-name.enum.d.ts +3 -3
  70. package/build/enum/preset-object-name.enum.js +7 -7
  71. package/build/enum/price-type.enum.d.ts +4 -4
  72. package/build/enum/price-type.enum.js +8 -8
  73. package/build/enum/printing-service-method.d.ts +8 -8
  74. package/build/enum/printing-service-method.js +12 -12
  75. package/build/enum/priority-type.enum.d.ts +7 -7
  76. package/build/enum/priority-type.enum.js +11 -11
  77. package/build/enum/product-kind.enum.d.ts +6 -6
  78. package/build/enum/product-kind.enum.js +10 -10
  79. package/build/enum/public-service-method.d.ts +20 -20
  80. package/build/enum/public-service-method.js +24 -24
  81. package/build/enum/relation-kind.d.ts +10 -10
  82. package/build/enum/relation-kind.js +14 -14
  83. package/build/enum/relman-complete-name.d.ts +5 -5
  84. package/build/enum/relman-complete-name.js +2 -2
  85. package/build/enum/report-method.enum.d.ts +15 -15
  86. package/build/enum/report-method.enum.js +19 -19
  87. package/build/enum/report-object-name.enum.d.ts +3 -3
  88. package/build/enum/report-object-name.enum.js +7 -7
  89. package/build/enum/report-param-type.enum.d.ts +15 -15
  90. package/build/enum/report-param-type.enum.js +19 -19
  91. package/build/enum/report-type.enum.d.ts +45 -45
  92. package/build/enum/report-type.enum.js +49 -49
  93. package/build/enum/reporting-documents-method.enum.d.ts +4 -4
  94. package/build/enum/reporting-documents-method.enum.js +8 -8
  95. package/build/enum/send-method-type.enum.d.ts +10 -10
  96. package/build/enum/send-method-type.enum.js +14 -14
  97. package/build/enum/sequence-name.enum.d.ts +31 -31
  98. package/build/enum/sequence-name.enum.js +35 -35
  99. package/build/enum/simple-base-data-object-name.enum.d.ts +5 -5
  100. package/build/enum/simple-base-data-object-name.enum.js +9 -9
  101. package/build/enum/simple-base-data-operation-name.enum.d.ts +4 -4
  102. package/build/enum/simple-base-data-operation-name.enum.js +8 -8
  103. package/build/enum/tab-category.enum.d.ts +19 -19
  104. package/build/enum/tab-category.enum.js +23 -23
  105. package/build/enum/table-name.enum.d.ts +82 -82
  106. package/build/enum/table-name.enum.js +86 -86
  107. package/build/enum/tag-method.enum.d.ts +4 -4
  108. package/build/enum/tag-method.enum.js +8 -8
  109. package/build/enum/tag-object.enum.d.ts +3 -3
  110. package/build/enum/tag-object.enum.js +7 -7
  111. package/build/enum/tag-operation-name.enum.d.ts +3 -3
  112. package/build/enum/tag-operation-name.enum.js +7 -7
  113. package/build/enum/text-standard-type-text.d.ts +7 -7
  114. package/build/enum/text-standard-type-text.js +11 -11
  115. package/build/enum/text-standard-type.d.ts +7 -7
  116. package/build/enum/text-standard-type.js +11 -11
  117. package/build/enum/transaction-kind.d.ts +13 -13
  118. package/build/enum/transaction-kind.js +17 -17
  119. package/build/enum/true-false-db-type.enum.d.ts +5 -5
  120. package/build/enum/true-false-db-type.enum.js +20 -20
  121. package/build/enum/vat-type.enum.d.ts +4 -4
  122. package/build/enum/vat-type.enum.js +8 -8
  123. package/build/enum/workflow-category.enum.d.ts +18 -18
  124. package/build/enum/workflow-category.enum.js +22 -22
  125. package/build/enum/workflow-trigger-type.enum.d.ts +8 -8
  126. package/build/enum/workflow-trigger-type.enum.js +12 -12
  127. package/build/enum/yes-no-db-type.enum.d.ts +5 -5
  128. package/build/enum/yes-no-db-type.enum.js +20 -20
  129. package/build/main-api-connection.d.ts +68 -66
  130. package/build/main-api-connection.js +14 -14
  131. package/build/main-api.d.ts +83 -81
  132. package/build/main-api.js +227 -219
  133. package/build/main-api.unit.test.d.ts +1 -1
  134. package/build/main-api.unit.test.js +128 -128
  135. package/build/main-auth.d.ts +63 -62
  136. package/build/main-auth.js +589 -556
  137. package/build/main-public.d.ts +64 -62
  138. package/build/main-public.js +258 -248
  139. package/build/model/activity-list-view-model.d.ts +11 -11
  140. package/build/model/activity-list-view-model.js +20 -20
  141. package/build/model/activity-view-model.d.ts +13 -13
  142. package/build/model/activity-view-model.js +27 -27
  143. package/build/model/activity-workflow.d.ts +24 -0
  144. package/build/model/activity-workflow.js +66 -0
  145. package/build/model/activity.bo.d.ts +58 -58
  146. package/build/model/activity.bo.js +484 -484
  147. package/build/model/article-seo-value.d.ts +5 -5
  148. package/build/model/article-seo-value.js +6 -6
  149. package/build/model/branch.bo.d.ts +8 -8
  150. package/build/model/branch.bo.js +7 -7
  151. package/build/model/brand.d.ts +8 -8
  152. package/build/model/brand.js +10 -10
  153. package/build/model/category.bo.d.ts +12 -12
  154. package/build/model/category.bo.js +16 -16
  155. package/build/model/co-document-right.d.ts +7 -7
  156. package/build/model/co-document-right.js +7 -7
  157. package/build/model/co-document.d.ts +64 -64
  158. package/build/model/co-document.js +180 -180
  159. package/build/model/co-domain-value.bo.d.ts +10 -10
  160. package/build/model/co-domain-value.bo.js +20 -20
  161. package/build/model/co-notition-right.bo.d.ts +10 -10
  162. package/build/model/co-notition-right.bo.js +13 -13
  163. package/build/model/co-notition.bo.d.ts +24 -24
  164. package/build/model/co-notition.bo.js +79 -79
  165. package/build/model/co-report-category-link.bo.d.ts +8 -8
  166. package/build/model/co-report-category-link.bo.js +7 -7
  167. package/build/model/co-report-sjablonen-documenten.bo.d.ts +6 -6
  168. package/build/model/co-report-sjablonen-documenten.bo.js +7 -7
  169. package/build/model/co-report.bo.d.ts +47 -47
  170. package/build/model/co-report.bo.js +68 -68
  171. package/build/model/co-rv-domain-value.bo.d.ts +10 -10
  172. package/build/model/co-rv-domain-value.bo.js +20 -20
  173. package/build/model/co-text.d.ts +26 -26
  174. package/build/model/co-text.js +28 -28
  175. package/build/model/color.bo.d.ts +7 -7
  176. package/build/model/color.bo.js +10 -10
  177. package/build/model/constant/java-constants.d.ts +2 -2
  178. package/build/model/constant/java-constants.js +5 -5
  179. package/build/model/contact-moment.bo.d.ts +17 -17
  180. package/build/model/contact-moment.bo.js +39 -39
  181. package/build/model/currency.bo.d.ts +13 -13
  182. package/build/model/currency.bo.js +33 -33
  183. package/build/model/department.bo.d.ts +12 -12
  184. package/build/model/department.bo.js +69 -69
  185. package/build/model/document-allowed-extension.bo.d.ts +6 -6
  186. package/build/model/document-allowed-extension.bo.js +7 -7
  187. package/build/model/form-question-response.bo.d.ts +10 -10
  188. package/build/model/form-question-response.bo.js +31 -31
  189. package/build/model/form.bo.d.ts +16 -16
  190. package/build/model/form.bo.js +13 -13
  191. package/build/model/get-postal-code-retrieval-output-params.d.ts +7 -7
  192. package/build/model/get-postal-code-retrieval-output-params.js +6 -6
  193. package/build/model/insured-interest.bo.d.ts +13 -13
  194. package/build/model/insured-interest.bo.js +39 -39
  195. package/build/model/language.bo.d.ts +5 -5
  196. package/build/model/language.bo.js +7 -7
  197. package/build/model/order-line-set-category.bo.d.ts +8 -8
  198. package/build/model/order-line-set-category.bo.js +7 -7
  199. package/build/model/own-risk.bo.d.ts +11 -11
  200. package/build/model/own-risk.bo.js +39 -39
  201. package/build/model/payment-condition-ledger-account.bo.d.ts +6 -6
  202. package/build/model/payment-condition-ledger-account.bo.js +7 -7
  203. package/build/model/payment-condition.bo.d.ts +11 -11
  204. package/build/model/payment-condition.bo.js +34 -34
  205. package/build/model/preset.bo.d.ts +12 -12
  206. package/build/model/preset.bo.js +16 -16
  207. package/build/model/printer.bo.d.ts +8 -8
  208. package/build/model/printer.bo.js +13 -13
  209. package/build/model/printing-service-request-data.d.ts +16 -16
  210. package/build/model/printing-service-request-data.js +2 -2
  211. package/build/model/privacy-setting.bo.d.ts +9 -9
  212. package/build/model/privacy-setting.bo.js +13 -13
  213. package/build/model/relation-small-object.bo.d.ts +28 -28
  214. package/build/model/relation-small-object.bo.js +63 -63
  215. package/build/model/remark.bo.d.ts +17 -17
  216. package/build/model/remark.bo.js +52 -52
  217. package/build/model/report-category.bo.d.ts +6 -6
  218. package/build/model/report-category.bo.js +7 -7
  219. package/build/model/report-layout-selection-base.bo.d.ts +9 -9
  220. package/build/model/report-layout-selection-base.bo.js +7 -7
  221. package/build/model/report-layout-selection-email.bo.d.ts +4 -4
  222. package/build/model/report-layout-selection-email.bo.js +7 -7
  223. package/build/model/report-layout-selection-print.bo.d.ts +5 -5
  224. package/build/model/report-layout-selection-print.bo.js +7 -7
  225. package/build/model/report-param.d.ts +16 -16
  226. package/build/model/report-param.js +9 -9
  227. package/build/model/reporting-document-base-request.d.ts +4 -4
  228. package/build/model/reporting-document-base-request.js +6 -6
  229. package/build/model/reporting-document-email-base-request.d.ts +5 -5
  230. package/build/model/reporting-document-email-base-request.js +7 -7
  231. package/build/model/reporting-document-email-sign-doc-base-request.d.ts +4 -4
  232. package/build/model/reporting-document-email-sign-doc-base-request.js +7 -7
  233. package/build/model/reporting-document-pdf-base-request.d.ts +3 -3
  234. package/build/model/reporting-document-pdf-base-request.js +7 -7
  235. package/build/model/reporting-document-print-base-request.d.ts +7 -7
  236. package/build/model/reporting-document-print-base-request.js +7 -7
  237. package/build/model/reporting-document-print-sign-doc-base-request.d.ts +4 -4
  238. package/build/model/reporting-document-print-sign-doc-base-request.js +7 -7
  239. package/build/model/role-email-address.d.ts +10 -0
  240. package/build/model/role-email-address.js +28 -0
  241. package/build/model/role-emailaddress.bo.d.ts +10 -0
  242. package/build/model/role-emailaddress.bo.js +28 -0
  243. package/build/model/send-method.bo.d.ts +5 -5
  244. package/build/model/send-method.bo.js +7 -7
  245. package/build/model/store-group.bo.d.ts +9 -9
  246. package/build/model/store-group.bo.js +7 -7
  247. package/build/model/tag-stock-item.bo.d.ts +24 -24
  248. package/build/model/tag-stock-item.bo.js +21 -21
  249. package/build/model/tag-tree-item.bo.d.ts +18 -18
  250. package/build/model/tag-tree-item.bo.js +52 -52
  251. package/build/model/tag.d.ts +11 -11
  252. package/build/model/tag.js +41 -41
  253. package/build/model/task-category.bo.d.ts +13 -13
  254. package/build/model/task-category.bo.js +28 -28
  255. package/build/model/task.bo.d.ts +83 -83
  256. package/build/model/task.bo.js +257 -257
  257. package/build/model/title.bo.d.ts +9 -9
  258. package/build/model/title.bo.js +13 -13
  259. package/build/model/transition.bo.d.ts +5 -5
  260. package/build/model/transition.bo.js +21 -21
  261. package/build/model/tree-object.d.ts +8 -8
  262. package/build/model/tree-object.js +29 -29
  263. package/build/model/user-group.bo.d.ts +13 -13
  264. package/build/model/user-group.bo.js +16 -16
  265. package/build/model/work.bo.d.ts +19 -19
  266. package/build/model/work.bo.js +53 -53
  267. package/build/model/workflow-generic-transition.bo.d.ts +22 -22
  268. package/build/model/workflow-generic-transition.bo.js +28 -28
  269. package/build/model/workflow-process.d.ts +13 -0
  270. package/build/model/workflow-process.js +7 -0
  271. package/build/model/workflow-trigger.bo.d.ts +44 -44
  272. package/build/model/workflow-trigger.bo.js +52 -52
  273. package/build/model/workflow.bo.d.ts +36 -36
  274. package/build/model/workflow.bo.js +151 -151
  275. package/build/utils/css-utils.d.ts +18 -18
  276. package/build/utils/css-utils.js +148 -148
  277. package/build/utils/file-utils.d.ts +34 -34
  278. package/build/utils/file-utils.js +397 -397
  279. package/build/utils/time-utils.d.ts +6 -6
  280. package/build/utils/time-utils.js +44 -44
  281. package/package.json +1 -1
@@ -1,148 +1,148 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CssUtils = void 0;
4
- class CssUtils {
5
- static AnimateMaxWidthTransitionOn(nativeElement, transitionTime = 0.2, startWidth = "0px", endWidth) {
6
- if (!nativeElement) {
7
- return;
8
- }
9
- if (!endWidth) {
10
- endWidth = CssUtils.FindOffsetWidthOfElementWithTransition(nativeElement);
11
- }
12
- const transitionStyle = `max-width ${transitionTime}s ease-out`;
13
- if (!CssUtils.ElementHasStyle(nativeElement, "transition", transitionStyle)) {
14
- CssUtils._AddTransitionStyleOn(nativeElement, transitionStyle);
15
- }
16
- nativeElement.style.maxWidth = startWidth;
17
- CssUtils.PushCssChanges(nativeElement);
18
- nativeElement.style.maxWidth = endWidth;
19
- return this._returnPromise(transitionTime);
20
- }
21
- static AnimateMaxHeightTransitionOn(nativeElement, transitionTime = 0.2, startHeight = "0px", endHeight) {
22
- if (!nativeElement) {
23
- return;
24
- }
25
- if (!endHeight) {
26
- endHeight = CssUtils.FindOffsetHeightOfElementWithTransition(nativeElement);
27
- }
28
- const transitionStyle = `max-height ${transitionTime}s ease-out`;
29
- if (!CssUtils.ElementHasStyle(nativeElement, "transition", transitionStyle)) {
30
- CssUtils._AddTransitionStyleOn(nativeElement, transitionStyle);
31
- }
32
- nativeElement.style.maxHeight = startHeight;
33
- CssUtils.PushCssChanges(nativeElement);
34
- nativeElement.style.maxHeight = endHeight;
35
- return this._returnPromise(transitionTime);
36
- }
37
- static FindOffsetWidthOfElementWithTransition(nativeElement) {
38
- return this._FindOffsetHeightOrWidthOfElementWithTransition(nativeElement, false);
39
- }
40
- static FindOffsetHeightOfElementWithTransition(nativeElement) {
41
- return this._FindOffsetHeightOrWidthOfElementWithTransition(nativeElement, true);
42
- }
43
- static GetComputedStyleVal(nativeElement, styleName) {
44
- return document.defaultView.getComputedStyle(nativeElement, "").getPropertyValue("styleName");
45
- }
46
- static ElementHasStyle(nativeElement, styleName, styleValue) {
47
- if (!nativeElement || !styleName) {
48
- return false;
49
- }
50
- return (nativeElement.style[styleName] === styleValue);
51
- }
52
- static SetStyleOnElement(nativeElement, styleName, styleValue, pushChanges = false) {
53
- if (!nativeElement || !styleName) {
54
- return;
55
- }
56
- nativeElement.style[styleName] = styleValue;
57
- if (pushChanges) {
58
- CssUtils.PushCssChanges(nativeElement);
59
- }
60
- }
61
- static HideElement(nativeElement) {
62
- if (nativeElement) {
63
- CssUtils.SetStyleOnElement(nativeElement, "display", "none");
64
- }
65
- }
66
- static GetStyleValue(nativeElement, styleName) {
67
- if (!nativeElement || !styleName) {
68
- return;
69
- }
70
- return nativeElement.style[styleName];
71
- }
72
- static DbRgbColorStringToCssRgbColor(dbRgbColorStr) {
73
- if (!dbRgbColorStr || dbRgbColorStr.length === 0) {
74
- return undefined;
75
- }
76
- dbRgbColorStr = dbRgbColorStr.split("0x")[1];
77
- if (!dbRgbColorStr) {
78
- return undefined;
79
- }
80
- const strLen = dbRgbColorStr.length;
81
- if (strLen > 6) {
82
- dbRgbColorStr = dbRgbColorStr.slice(0, 6);
83
- }
84
- else if (strLen > 3 && strLen < 6) {
85
- dbRgbColorStr = dbRgbColorStr.slice(0, 3);
86
- }
87
- else if (strLen === 1) {
88
- dbRgbColorStr += dbRgbColorStr + dbRgbColorStr;
89
- }
90
- else if (strLen === 2) {
91
- dbRgbColorStr += dbRgbColorStr[1];
92
- }
93
- return "#" + dbRgbColorStr;
94
- }
95
- static PushCssChanges(nativeElement) {
96
- const notUnused = nativeElement.offsetHeight;
97
- return;
98
- }
99
- static TransparentColor(hexColor, opacity) {
100
- const hex = hexColor.replace("#", "");
101
- return `rgba(${Array.from({ length: 3 }, (v, i) => parseInt(hex.substring(i * 2, (i + 1) * 2), 16)).join(",")},${opacity})`;
102
- }
103
- static ElementHasClass(element, cssClass) {
104
- return element && element.classList && element.classList.contains(cssClass);
105
- }
106
- static _FindOffsetHeightOrWidthOfElementWithTransition(nativeElement, wantHeight) {
107
- if (!nativeElement) {
108
- return "0px";
109
- }
110
- const originalTransitionStyle = nativeElement.style.transition;
111
- CssUtils._AddTransitionStyleOn(nativeElement, "none");
112
- if (wantHeight) {
113
- nativeElement.style.maxHeight = "";
114
- }
115
- else {
116
- nativeElement.style.maxWidth = "";
117
- }
118
- let trueHeightOrWidth;
119
- if (wantHeight) {
120
- trueHeightOrWidth = nativeElement.offsetHeight;
121
- }
122
- else {
123
- trueHeightOrWidth = nativeElement.offsetWidth;
124
- }
125
- trueHeightOrWidth += "px";
126
- nativeElement.style.transition = originalTransitionStyle;
127
- return trueHeightOrWidth;
128
- }
129
- static _AddTransitionStyleOn(nativeElement, styleText) {
130
- if (!nativeElement || !styleText) {
131
- return;
132
- }
133
- if (nativeElement.style.transition) {
134
- styleText = ", " + styleText;
135
- }
136
- nativeElement.style.transition += styleText;
137
- nativeElement.style.WebkitTransition += styleText;
138
- nativeElement.style.MozTransition += styleText;
139
- }
140
- static _returnPromise(transitionTime) {
141
- return new Promise((resolve) => {
142
- setTimeout(() => {
143
- resolve();
144
- }, transitionTime * 1000);
145
- });
146
- }
147
- }
148
- exports.CssUtils = CssUtils;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CssUtils = void 0;
4
+ class CssUtils {
5
+ static AnimateMaxWidthTransitionOn(nativeElement, transitionTime = 0.2, startWidth = "0px", endWidth) {
6
+ if (!nativeElement) {
7
+ return;
8
+ }
9
+ if (!endWidth) {
10
+ endWidth = CssUtils.FindOffsetWidthOfElementWithTransition(nativeElement);
11
+ }
12
+ const transitionStyle = `max-width ${transitionTime}s ease-out`;
13
+ if (!CssUtils.ElementHasStyle(nativeElement, "transition", transitionStyle)) {
14
+ CssUtils._AddTransitionStyleOn(nativeElement, transitionStyle);
15
+ }
16
+ nativeElement.style.maxWidth = startWidth;
17
+ CssUtils.PushCssChanges(nativeElement);
18
+ nativeElement.style.maxWidth = endWidth;
19
+ return this._returnPromise(transitionTime);
20
+ }
21
+ static AnimateMaxHeightTransitionOn(nativeElement, transitionTime = 0.2, startHeight = "0px", endHeight) {
22
+ if (!nativeElement) {
23
+ return;
24
+ }
25
+ if (!endHeight) {
26
+ endHeight = CssUtils.FindOffsetHeightOfElementWithTransition(nativeElement);
27
+ }
28
+ const transitionStyle = `max-height ${transitionTime}s ease-out`;
29
+ if (!CssUtils.ElementHasStyle(nativeElement, "transition", transitionStyle)) {
30
+ CssUtils._AddTransitionStyleOn(nativeElement, transitionStyle);
31
+ }
32
+ nativeElement.style.maxHeight = startHeight;
33
+ CssUtils.PushCssChanges(nativeElement);
34
+ nativeElement.style.maxHeight = endHeight;
35
+ return this._returnPromise(transitionTime);
36
+ }
37
+ static FindOffsetWidthOfElementWithTransition(nativeElement) {
38
+ return this._FindOffsetHeightOrWidthOfElementWithTransition(nativeElement, false);
39
+ }
40
+ static FindOffsetHeightOfElementWithTransition(nativeElement) {
41
+ return this._FindOffsetHeightOrWidthOfElementWithTransition(nativeElement, true);
42
+ }
43
+ static GetComputedStyleVal(nativeElement, styleName) {
44
+ return document.defaultView.getComputedStyle(nativeElement, "").getPropertyValue("styleName");
45
+ }
46
+ static ElementHasStyle(nativeElement, styleName, styleValue) {
47
+ if (!nativeElement || !styleName) {
48
+ return false;
49
+ }
50
+ return (nativeElement.style[styleName] === styleValue);
51
+ }
52
+ static SetStyleOnElement(nativeElement, styleName, styleValue, pushChanges = false) {
53
+ if (!nativeElement || !styleName) {
54
+ return;
55
+ }
56
+ nativeElement.style[styleName] = styleValue;
57
+ if (pushChanges) {
58
+ CssUtils.PushCssChanges(nativeElement);
59
+ }
60
+ }
61
+ static HideElement(nativeElement) {
62
+ if (nativeElement) {
63
+ CssUtils.SetStyleOnElement(nativeElement, "display", "none");
64
+ }
65
+ }
66
+ static GetStyleValue(nativeElement, styleName) {
67
+ if (!nativeElement || !styleName) {
68
+ return;
69
+ }
70
+ return nativeElement.style[styleName];
71
+ }
72
+ static DbRgbColorStringToCssRgbColor(dbRgbColorStr) {
73
+ if (!dbRgbColorStr || dbRgbColorStr.length === 0) {
74
+ return undefined;
75
+ }
76
+ dbRgbColorStr = dbRgbColorStr.split("0x")[1];
77
+ if (!dbRgbColorStr) {
78
+ return undefined;
79
+ }
80
+ const strLen = dbRgbColorStr.length;
81
+ if (strLen > 6) {
82
+ dbRgbColorStr = dbRgbColorStr.slice(0, 6);
83
+ }
84
+ else if (strLen > 3 && strLen < 6) {
85
+ dbRgbColorStr = dbRgbColorStr.slice(0, 3);
86
+ }
87
+ else if (strLen === 1) {
88
+ dbRgbColorStr += dbRgbColorStr + dbRgbColorStr;
89
+ }
90
+ else if (strLen === 2) {
91
+ dbRgbColorStr += dbRgbColorStr[1];
92
+ }
93
+ return "#" + dbRgbColorStr;
94
+ }
95
+ static PushCssChanges(nativeElement) {
96
+ const notUnused = nativeElement.offsetHeight;
97
+ return;
98
+ }
99
+ static TransparentColor(hexColor, opacity) {
100
+ const hex = hexColor.replace("#", "");
101
+ return `rgba(${Array.from({ length: 3 }, (v, i) => parseInt(hex.substring(i * 2, (i + 1) * 2), 16)).join(",")},${opacity})`;
102
+ }
103
+ static ElementHasClass(element, cssClass) {
104
+ return element && element.classList && element.classList.contains(cssClass);
105
+ }
106
+ static _FindOffsetHeightOrWidthOfElementWithTransition(nativeElement, wantHeight) {
107
+ if (!nativeElement) {
108
+ return "0px";
109
+ }
110
+ const originalTransitionStyle = nativeElement.style.transition;
111
+ CssUtils._AddTransitionStyleOn(nativeElement, "none");
112
+ if (wantHeight) {
113
+ nativeElement.style.maxHeight = "";
114
+ }
115
+ else {
116
+ nativeElement.style.maxWidth = "";
117
+ }
118
+ let trueHeightOrWidth;
119
+ if (wantHeight) {
120
+ trueHeightOrWidth = nativeElement.offsetHeight;
121
+ }
122
+ else {
123
+ trueHeightOrWidth = nativeElement.offsetWidth;
124
+ }
125
+ trueHeightOrWidth += "px";
126
+ nativeElement.style.transition = originalTransitionStyle;
127
+ return trueHeightOrWidth;
128
+ }
129
+ static _AddTransitionStyleOn(nativeElement, styleText) {
130
+ if (!nativeElement || !styleText) {
131
+ return;
132
+ }
133
+ if (nativeElement.style.transition) {
134
+ styleText = ", " + styleText;
135
+ }
136
+ nativeElement.style.transition += styleText;
137
+ nativeElement.style.WebkitTransition += styleText;
138
+ nativeElement.style.MozTransition += styleText;
139
+ }
140
+ static _returnPromise(transitionTime) {
141
+ return new Promise((resolve) => {
142
+ setTimeout(() => {
143
+ resolve();
144
+ }, transitionTime * 1000);
145
+ });
146
+ }
147
+ }
148
+ exports.CssUtils = CssUtils;
@@ -1,34 +1,34 @@
1
- import { FileTypeInternal } from '../enum/file-type-internal.enum';
2
- import { CoDocument } from '../model/co-document';
3
- import { DocumentAllowedExtension } from '../model/document-allowed-extension.bo';
4
- export declare class FileUtils {
5
- static get DefaultMaxUploadSizeInMb(): number;
6
- static getMaxUploadSizeInMb(sizeInBytes: number): number;
7
- static DocumentBodyToDataUri(documentBody: string, mimeType: string): string;
8
- static FileNameToFileTypeInternal(fileName: string): FileTypeInternal;
9
- static IsImageFile(file: File | CoDocument): boolean;
10
- static GetGlobalFileType(document: CoDocument): FileTypeInternal;
11
- static CheckMaxUploadSize(file: CoDocument | File, maxSizeInBytesFromParameter?: number): boolean;
12
- static CheckExtension(file: CoDocument | File, allowedExtensions: DocumentAllowedExtension[]): boolean;
13
- static ConvertFileToDataUri(file: File): Promise<string>;
14
- static StripMimeStringFromDataUri(dataUri: string): string;
15
- static GetMimeStringFromDataUri(dataUri: string): string;
16
- static ConvertStringToArrayBuffer(stringData: string): Uint8Array;
17
- static ConvertByteArrayToString(byteArray: number[]): string;
18
- static StringIsImageDataUriOrURL(str: string): boolean;
19
- static FixAssetUrl(assetUrl: string): string;
20
- static MimeTypeFromFilename(fileName: string): string;
21
- static DownloadFile(fileName: string, content: string, mimeType?: string): void;
22
- static ReadAsText(file: File): Promise<string>;
23
- static readAsDataURL(file: File): Promise<string>;
24
- static ReadFileAsNewCoDocument(file: File, resize?: boolean, maxSizeInPixels?: number): Promise<CoDocument>;
25
- static ResizeImage(src: string, fileType: string, maxSizeInPixels: number): Promise<string>;
26
- static ReadFileAsDataURL(file: File): Promise<string>;
27
- static DataURLtoFile(dataURL: string, filename: string): File;
28
- static GetExtensionFromDataUri(dataUri: string): string;
29
- static CreateDownloadFileNameFromBase64(dataUri: string): string;
30
- static DownloadFromDataUri(dataUri: string, fileName: string): void;
31
- static ValidUrl(stringToCheck: string): boolean;
32
- static ReplaceExtension(fileName: string, newExtension: string): string;
33
- static GenerateQRCode(url: string): string;
34
- }
1
+ import { FileTypeInternal } from '../enum/file-type-internal.enum';
2
+ import { CoDocument } from '../model/co-document';
3
+ import { DocumentAllowedExtension } from '../model/document-allowed-extension.bo';
4
+ export declare class FileUtils {
5
+ static get DefaultMaxUploadSizeInMb(): number;
6
+ static getMaxUploadSizeInMb(sizeInBytes: number): number;
7
+ static DocumentBodyToDataUri(documentBody: string, mimeType: string): string;
8
+ static FileNameToFileTypeInternal(fileName: string): FileTypeInternal;
9
+ static IsImageFile(file: File | CoDocument): boolean;
10
+ static GetGlobalFileType(document: CoDocument): FileTypeInternal;
11
+ static CheckMaxUploadSize(file: CoDocument | File, maxSizeInBytesFromParameter?: number): boolean;
12
+ static CheckExtension(file: CoDocument | File, allowedExtensions: DocumentAllowedExtension[]): boolean;
13
+ static ConvertFileToDataUri(file: File): Promise<string>;
14
+ static StripMimeStringFromDataUri(dataUri: string): string;
15
+ static GetMimeStringFromDataUri(dataUri: string): string;
16
+ static ConvertStringToArrayBuffer(stringData: string): Uint8Array;
17
+ static ConvertByteArrayToString(byteArray: number[]): string;
18
+ static StringIsImageDataUriOrURL(str: string): boolean;
19
+ static FixAssetUrl(assetUrl: string): string;
20
+ static MimeTypeFromFilename(fileName: string): string;
21
+ static DownloadFile(fileName: string, content: string, mimeType?: string): void;
22
+ static ReadAsText(file: File): Promise<string>;
23
+ static readAsDataURL(file: File): Promise<string>;
24
+ static ReadFileAsNewCoDocument(file: File, resize?: boolean, maxSizeInPixels?: number): Promise<CoDocument>;
25
+ static ResizeImage(src: string, fileType: string, maxSizeInPixels: number): Promise<string>;
26
+ static ReadFileAsDataURL(file: File): Promise<string>;
27
+ static DataURLtoFile(dataURL: string, filename: string): File;
28
+ static GetExtensionFromDataUri(dataUri: string): string;
29
+ static CreateDownloadFileNameFromBase64(dataUri: string): string;
30
+ static DownloadFromDataUri(dataUri: string, fileName: string): void;
31
+ static ValidUrl(stringToCheck: string): boolean;
32
+ static ReplaceExtension(fileName: string, newExtension: string): string;
33
+ static GenerateQRCode(url: string): string;
34
+ }