@acorex/core 7.0.41 → 7.1.1

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 (170) hide show
  1. package/config/index.d.ts +5 -5
  2. package/config/public-api.d.ts +1 -1
  3. package/config/src/configs.d.ts +9 -9
  4. package/dateTime/index.d.ts +5 -5
  5. package/dateTime/public-api.d.ts +5 -5
  6. package/dateTime/src/datetime.class.d.ts +100 -100
  7. package/dateTime/src/datetime.module.d.ts +8 -8
  8. package/dateTime/src/datetime.pipe.d.ts +8 -8
  9. package/dateTime/src/georgian.calendar.d.ts +20 -20
  10. package/dateTime/src/jalali.calendar.d.ts +35 -35
  11. package/{esm2020 → esm2022}/acorex-core.mjs +4 -4
  12. package/{esm2020 → esm2022}/config/acorex-core-config.mjs +4 -4
  13. package/{esm2020 → esm2022}/config/public-api.mjs +1 -1
  14. package/esm2022/config/src/configs.mjs +25 -0
  15. package/{esm2020 → esm2022}/dateTime/acorex-core-dateTime.mjs +4 -4
  16. package/{esm2020 → esm2022}/dateTime/public-api.mjs +5 -5
  17. package/esm2022/dateTime/src/datetime.class.mjs +295 -0
  18. package/esm2022/dateTime/src/datetime.module.mjs +40 -0
  19. package/esm2022/dateTime/src/datetime.pipe.mjs +27 -0
  20. package/esm2022/dateTime/src/georgian.calendar.mjs +187 -0
  21. package/esm2022/dateTime/src/jalali.calendar.mjs +357 -0
  22. package/{esm2020 → esm2022}/events/acorex-core-events.mjs +4 -4
  23. package/{esm2020 → esm2022}/events/public-api.mjs +1 -1
  24. package/esm2022/events/src/event.service.mjs +35 -0
  25. package/{esm2020 → esm2022}/file/acorex-core-file.mjs +4 -4
  26. package/{esm2020 → esm2022}/file/public-api.mjs +4 -4
  27. package/esm2022/file/src/file-download-ref.class.mjs +13 -0
  28. package/esm2022/file/src/file-download-result.class.mjs +47 -0
  29. package/esm2022/file/src/file-upload-ref.class.mjs +13 -0
  30. package/esm2022/file/src/file.service.mjs +103 -0
  31. package/{esm2020 → esm2022}/http/acorex-core-http.mjs +4 -4
  32. package/{esm2020 → esm2022}/http/public-api.mjs +5 -5
  33. package/{esm2020 → esm2022}/http/src/http-error.class.mjs +1 -1
  34. package/{esm2020 → esm2022}/http/src/http-events.interceptor.mjs +2 -2
  35. package/{esm2020 → esm2022}/http/src/http-request.class.mjs +1 -1
  36. package/esm2022/http/src/http-result.class.mjs +25 -0
  37. package/esm2022/http/src/http.module.mjs +30 -0
  38. package/esm2022/http/src/http.service.mjs +152 -0
  39. package/{esm2020 → esm2022}/image/acorex-core-image.mjs +4 -4
  40. package/{esm2020 → esm2022}/image/public-api.mjs +1 -1
  41. package/esm2022/image/src/image.service.mjs +44 -0
  42. package/{esm2020 → esm2022}/pipes/acorex-core-pipes.mjs +4 -4
  43. package/{esm2020 → esm2022}/pipes/public-api.mjs +2 -2
  44. package/esm2022/pipes/src/pipes.module.mjs +20 -0
  45. package/{esm2020 → esm2022}/pipes/src/safe.pipe.mjs +32 -30
  46. package/{esm2020 → esm2022}/platform/acorex-core-platform.mjs +4 -4
  47. package/{esm2020 → esm2022}/platform/public-api.mjs +1 -1
  48. package/esm2022/platform/src/platform.service.mjs +152 -0
  49. package/{esm2020 → esm2022}/public-api.mjs +4 -4
  50. package/{esm2020 → esm2022}/translation/acorex-core-translation.mjs +4 -4
  51. package/{esm2020 → esm2022}/translation/public-api.mjs +3 -3
  52. package/esm2022/translation/src/translation.module.mjs +19 -0
  53. package/esm2022/translation/src/translator.mjs +44 -0
  54. package/esm2022/translation/src/translator.pipe.mjs +16 -0
  55. package/{esm2020 → esm2022}/utils/acorex-core-utils.mjs +4 -4
  56. package/{esm2020 → esm2022}/utils/public-api.mjs +5 -5
  57. package/{esm2020 → esm2022}/utils/src/color-util.mjs +114 -114
  58. package/{esm2020 → esm2022}/utils/src/drawing-util.mjs +29 -29
  59. package/{esm2020 → esm2022}/utils/src/html-util.mjs +15 -15
  60. package/{esm2020 → esm2022}/utils/src/object-util.mjs +38 -38
  61. package/{esm2020 → esm2022}/utils/src/string-util.mjs +18 -18
  62. package/events/index.d.ts +5 -5
  63. package/events/public-api.d.ts +1 -1
  64. package/events/src/event.service.d.ts +9 -9
  65. package/{fesm2015 → fesm2022}/acorex-core-config.mjs +23 -24
  66. package/{fesm2015 → fesm2022}/acorex-core-config.mjs.map +1 -1
  67. package/{fesm2015 → fesm2022}/acorex-core-dateTime.mjs +882 -880
  68. package/{fesm2020 → fesm2022}/acorex-core-dateTime.mjs.map +1 -1
  69. package/{fesm2020 → fesm2022}/acorex-core-events.mjs +32 -35
  70. package/fesm2022/acorex-core-events.mjs.map +1 -0
  71. package/{fesm2020 → fesm2022}/acorex-core-file.mjs +162 -159
  72. package/{fesm2020 → fesm2022}/acorex-core-file.mjs.map +1 -1
  73. package/{fesm2020 → fesm2022}/acorex-core-http.mjs +190 -184
  74. package/{fesm2020 → fesm2022}/acorex-core-http.mjs.map +1 -1
  75. package/{fesm2020 → fesm2022}/acorex-core-image.mjs +41 -42
  76. package/{fesm2020 → fesm2022}/acorex-core-image.mjs.map +1 -1
  77. package/{fesm2015 → fesm2022}/acorex-core-pipes.mjs +41 -41
  78. package/fesm2022/acorex-core-pipes.mjs.map +1 -0
  79. package/{fesm2020 → fesm2022}/acorex-core-platform.mjs +147 -154
  80. package/fesm2022/acorex-core-platform.mjs.map +1 -0
  81. package/{fesm2020 → fesm2022}/acorex-core-translation.mjs +64 -65
  82. package/{fesm2020 → fesm2022}/acorex-core-translation.mjs.map +1 -1
  83. package/{fesm2020 → fesm2022}/acorex-core-utils.mjs +209 -210
  84. package/{fesm2015 → fesm2022}/acorex-core.mjs +5 -6
  85. package/file/index.d.ts +5 -5
  86. package/file/public-api.d.ts +4 -4
  87. package/file/src/file-download-ref.class.d.ts +6 -6
  88. package/file/src/file-download-result.class.d.ts +8 -8
  89. package/file/src/file-upload-ref.class.d.ts +5 -5
  90. package/file/src/file.service.d.ts +18 -18
  91. package/http/index.d.ts +5 -5
  92. package/http/public-api.d.ts +5 -5
  93. package/http/src/http-error.class.d.ts +7 -7
  94. package/http/src/http-events.interceptor.d.ts +10 -10
  95. package/http/src/http-request.class.d.ts +14 -14
  96. package/http/src/http-result.class.d.ts +11 -11
  97. package/http/src/http.module.d.ts +8 -8
  98. package/http/src/http.service.d.ts +23 -23
  99. package/image/index.d.ts +5 -5
  100. package/image/public-api.d.ts +1 -1
  101. package/image/src/image.service.d.ts +12 -12
  102. package/index.d.ts +5 -5
  103. package/package.json +39 -65
  104. package/pipes/index.d.ts +5 -5
  105. package/pipes/public-api.d.ts +2 -2
  106. package/pipes/src/pipes.module.d.ts +8 -8
  107. package/pipes/src/safe.pipe.d.ts +10 -10
  108. package/platform/index.d.ts +5 -5
  109. package/platform/public-api.d.ts +1 -1
  110. package/platform/src/platform.service.d.ts +26 -26
  111. package/public-api.d.ts +1 -1
  112. package/translation/index.d.ts +5 -5
  113. package/translation/public-api.d.ts +3 -3
  114. package/translation/src/translation.module.d.ts +7 -7
  115. package/translation/src/translator.d.ts +11 -11
  116. package/translation/src/translator.pipe.d.ts +7 -7
  117. package/utils/index.d.ts +5 -5
  118. package/utils/public-api.d.ts +5 -5
  119. package/utils/src/color-util.d.ts +23 -23
  120. package/utils/src/drawing-util.d.ts +18 -18
  121. package/utils/src/html-util.d.ts +4 -4
  122. package/utils/src/object-util.d.ts +4 -4
  123. package/utils/src/string-util.d.ts +6 -6
  124. package/esm2020/config/src/configs.mjs +0 -24
  125. package/esm2020/dateTime/src/datetime.class.mjs +0 -288
  126. package/esm2020/dateTime/src/datetime.module.mjs +0 -39
  127. package/esm2020/dateTime/src/datetime.pipe.mjs +0 -26
  128. package/esm2020/dateTime/src/georgian.calendar.mjs +0 -189
  129. package/esm2020/dateTime/src/jalali.calendar.mjs +0 -359
  130. package/esm2020/events/src/event.service.mjs +0 -36
  131. package/esm2020/file/src/file-download-ref.class.mjs +0 -12
  132. package/esm2020/file/src/file-download-result.class.mjs +0 -46
  133. package/esm2020/file/src/file-upload-ref.class.mjs +0 -12
  134. package/esm2020/file/src/file.service.mjs +0 -101
  135. package/esm2020/http/src/http-result.class.mjs +0 -21
  136. package/esm2020/http/src/http.module.mjs +0 -29
  137. package/esm2020/http/src/http.service.mjs +0 -148
  138. package/esm2020/image/src/image.service.mjs +0 -43
  139. package/esm2020/pipes/src/pipes.module.mjs +0 -19
  140. package/esm2020/platform/src/platform.service.mjs +0 -157
  141. package/esm2020/translation/src/translation.module.mjs +0 -18
  142. package/esm2020/translation/src/translator.mjs +0 -43
  143. package/esm2020/translation/src/translator.pipe.mjs +0 -15
  144. package/fesm2015/acorex-core-dateTime.mjs.map +0 -1
  145. package/fesm2015/acorex-core-events.mjs +0 -44
  146. package/fesm2015/acorex-core-events.mjs.map +0 -1
  147. package/fesm2015/acorex-core-file.mjs +0 -176
  148. package/fesm2015/acorex-core-file.mjs.map +0 -1
  149. package/fesm2015/acorex-core-http.mjs +0 -203
  150. package/fesm2015/acorex-core-http.mjs.map +0 -1
  151. package/fesm2015/acorex-core-image.mjs +0 -54
  152. package/fesm2015/acorex-core-image.mjs.map +0 -1
  153. package/fesm2015/acorex-core-pipes.mjs.map +0 -1
  154. package/fesm2015/acorex-core-platform.mjs +0 -165
  155. package/fesm2015/acorex-core-platform.mjs.map +0 -1
  156. package/fesm2015/acorex-core-translation.mjs +0 -81
  157. package/fesm2015/acorex-core-translation.mjs.map +0 -1
  158. package/fesm2015/acorex-core-utils.mjs +0 -227
  159. package/fesm2020/acorex-core-config.mjs +0 -32
  160. package/fesm2020/acorex-core-config.mjs.map +0 -1
  161. package/fesm2020/acorex-core-dateTime.mjs +0 -899
  162. package/fesm2020/acorex-core-events.mjs.map +0 -1
  163. package/fesm2020/acorex-core-pipes.mjs +0 -54
  164. package/fesm2020/acorex-core-pipes.mjs.map +0 -1
  165. package/fesm2020/acorex-core-platform.mjs.map +0 -1
  166. package/fesm2020/acorex-core-utils.mjs.map +0 -1
  167. package/fesm2020/acorex-core.mjs +0 -12
  168. package/fesm2020/acorex-core.mjs.map +0 -1
  169. /package/{fesm2015 → fesm2022}/acorex-core-utils.mjs.map +0 -0
  170. /package/{fesm2015 → fesm2022}/acorex-core.mjs.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-translation.mjs","sources":["../../../../projects/acorex/core/translation/src/translator.ts","../../../../projects/acorex/core/translation/src/translator.pipe.ts","../../../../projects/acorex/core/translation/src/translation.module.ts","../../../../projects/acorex/core/translation/acorex-core-translation.ts"],"sourcesContent":["import { Subject, Observable } from 'rxjs';\r\nimport merge from 'lodash-es/merge';\r\nimport * as _ from 'lodash';\r\n\r\n// @dynamic\r\nexport class AXTranslator {\r\n private static lang: string = 'en';\r\n private static dataChangeSubject = new Subject<any>();\r\n private static _varsRegx = /((\\$\\{[a-zA-Z_0-9\\.]+\\})+)/gm;\r\n private static _varNameRegx = /[a-zA-Z_0-9\\.]+/gm;\r\n\r\n\r\n static get onChange(): Observable<any> {\r\n return AXTranslator.dataChangeSubject.asObservable();\r\n }\r\n\r\n public static load(lang: string, value: any) {\r\n if (typeof value === 'object') {\r\n if (!AXTranslator[`__data__${lang}`]) {\r\n AXTranslator[`__data__${lang}`] = {};\r\n }\r\n AXTranslator[`__data__${lang}`] = merge(AXTranslator[`__data__${lang}`], value);\r\n }\r\n }\r\n\r\n public static use(lang: string) {\r\n AXTranslator.lang = lang;\r\n }\r\n\r\n public static get(key: string, arg1?: object | string, arg2?: object): string {\r\n\r\n const lang = arg1 && typeof arg1 == 'string' ? arg1 : AXTranslator.lang;\r\n const params = arg1 && typeof arg1 == 'object' ? arg1 : arg2;\r\n let result = _.get(AXTranslator[`__data__${lang}`], key, key);\r\n const vars = typeof (result) == 'string' ? result?.match(this._varsRegx) : [];\r\n if (vars?.length) {\r\n vars.forEach((v:any) => {\r\n const varKey = v.match(this._varNameRegx)?.length ? v.match(this._varNameRegx)[0] : null;\r\n if (varKey) {\r\n const p = _.get(params, varKey) || this.get(varKey, lang);\r\n if (p) {\r\n result = result.replace(v, p);\r\n }\r\n }\r\n })\r\n }\r\n return typeof (result) == 'string' ? result : JSON.stringify(result);\r\n }\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { AXTranslator } from './translator';\r\n\r\n@Pipe({ name: 'trans', pure: true })\r\nexport class AXTranslatorPipe implements PipeTransform {\r\n transform(value: string, arg1?: object | string, arg2?: object): string {\r\n return AXTranslator.get(value, arg1, arg2);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AXTranslatorPipe } from './translator.pipe';\r\n\r\n@NgModule({\r\n imports: [],\r\n exports: [AXTranslatorPipe],\r\n declarations: [AXTranslatorPipe],\r\n providers: [],\r\n})\r\nexport class AXTranslationModule {\r\n \r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;MACa,YAAY,CAAA;AAOrB,IAAA,WAAW,QAAQ,GAAA;AACf,QAAA,OAAO,YAAY,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACxD;AAEM,IAAA,OAAO,IAAI,CAAC,IAAY,EAAE,KAAU,EAAA;AACvC,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC3B,YAAA,IAAI,CAAC,YAAY,CAAC,WAAW,IAAI,CAAA,CAAE,CAAC,EAAE;AAClC,gBAAA,YAAY,CAAC,CAAW,QAAA,EAAA,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC;AACxC,aAAA;AACD,YAAA,YAAY,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,IAAI,CAAA,CAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AACnF,SAAA;KACJ;IAEM,OAAO,GAAG,CAAC,IAAY,EAAA;AAC1B,QAAA,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC;KAC5B;AAEM,IAAA,OAAO,GAAG,CAAC,GAAW,EAAE,IAAsB,EAAE,IAAa,EAAA;AAEhE,QAAA,MA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ts","../../../../projects/acorex/core/translation/src/translator.pipe.ts","../../../../projects/acorex/core/translation/src/translation.module.ts","../../../../projects/acorex/core/translation/acorex-core-translation.ts"],"sourcesContent":["import { Subject, Observable } from 'rxjs';\r\nimport merge from 'lodash-es/merge';\r\nimport * as _ from 'lodash';\r\n\r\n// @dynamic\r\nexport class AXTranslator {\r\n private static lang: string = 'en';\r\n private static dataChangeSubject = new Subject<any>();\r\n private static _varsRegx = /((\\$\\{[a-zA-Z_0-9\\.]+\\})+)/gm;\r\n private static _varNameRegx = /[a-zA-Z_0-9\\.]+/gm;\r\n\r\n\r\n static get onChange(): Observable<any> {\r\n return AXTranslator.dataChangeSubject.asObservable();\r\n }\r\n\r\n public static load(lang: string, value: any) {\r\n if (typeof value === 'object') {\r\n if (!AXTranslator[`__data__${lang}`]) {\r\n AXTranslator[`__data__${lang}`] = {};\r\n }\r\n AXTranslator[`__data__${lang}`] = merge(AXTranslator[`__data__${lang}`], value);\r\n }\r\n }\r\n\r\n public static use(lang: string) {\r\n AXTranslator.lang = lang;\r\n }\r\n\r\n public static get(key: string, arg1?: object | string, arg2?: object): string {\r\n\r\n const lang = arg1 && typeof arg1 == 'string' ? arg1 : AXTranslator.lang;\r\n const params = arg1 && typeof arg1 == 'object' ? arg1 : arg2;\r\n let result = _.get(AXTranslator[`__data__${lang}`], key, key);\r\n const vars = typeof (result) == 'string' ? result?.match(this._varsRegx) : [];\r\n if (vars?.length) {\r\n vars.forEach((v:any) => {\r\n const varKey = v.match(this._varNameRegx)?.length ? v.match(this._varNameRegx)[0] : null;\r\n if (varKey) {\r\n const p = _.get(params, varKey) || this.get(varKey, lang);\r\n if (p) {\r\n result = result.replace(v, p);\r\n }\r\n }\r\n })\r\n }\r\n return typeof (result) == 'string' ? result : JSON.stringify(result);\r\n }\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { AXTranslator } from './translator';\r\n\r\n@Pipe({ name: 'trans', pure: true })\r\nexport class AXTranslatorPipe implements PipeTransform {\r\n transform(value: string, arg1?: object | string, arg2?: object): string {\r\n return AXTranslator.get(value, arg1, arg2);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AXTranslatorPipe } from './translator.pipe';\r\n\r\n@NgModule({\r\n imports: [],\r\n exports: [AXTranslatorPipe],\r\n declarations: [AXTranslatorPipe],\r\n providers: [],\r\n})\r\nexport class AXTranslationModule {\r\n \r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;AACA,MAAa,YAAY,CAAA;AACb,IAAA,OAAO,IAAI,GAAW,IAAI,CAAC;AAC3B,IAAA,OAAO,iBAAiB,GAAG,IAAI,OAAO,EAAO,CAAC;AAC9C,IAAA,OAAO,SAAS,GAAG,8BAA8B,CAAC;AAClD,IAAA,OAAO,YAAY,GAAG,mBAAmB,CAAC;AAGlD,IAAA,WAAW,QAAQ,GAAA;AACf,QAAA,OAAO,YAAY,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACxD;AAEM,IAAA,OAAO,IAAI,CAAC,IAAY,EAAE,KAAU,EAAA;AACvC,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC3B,YAAA,IAAI,CAAC,YAAY,CAAC,WAAW,IAAI,CAAA,CAAE,CAAC,EAAE;AAClC,gBAAA,YAAY,CAAC,CAAW,QAAA,EAAA,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC;AACxC,aAAA;AACD,YAAA,YAAY,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,IAAI,CAAA,CAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AACnF,SAAA;KACJ;IAEM,OAAO,GAAG,CAAC,IAAY,EAAA;AAC1B,QAAA,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC;KAC5B;AAEM,IAAA,OAAO,GAAG,CAAC,GAAW,EAAE,IAAsB,EAAE,IAAa,E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;AACzB,IAAA,SAAS,CAAC,KAAa,EAAE,IAAsB,EAAE,IAAa,EAAA;QAC1D,OAAO,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;KAC9C;uGAHQ,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;qGAAhB,gBAAgB,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;;;ACAnC,MAMa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAnB,mBAAmB,EAAA,YAAA,EAAA,CAHb,gBAAgB,CAAA,EAAA,OAAA,EAAA,CADrB,gBAAgB,CAAA,EAAA,CAAA,CAAA;wGAIjB,mBAAmB,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,SAAS,EAAE,EAAE;AAChB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -1,227 +1,226 @@
1
1
  import tinycolor from 'tinycolor2';
2
2
  import tinygradient from 'tinygradient';
3
3
 
4
- // @dynamic
5
- class AXObjectUtil {
6
- static deepJSONClone(obj) {
7
- return obj ? JSON.parse(JSON.stringify(obj)) : null;
8
- }
9
- static deepCopy(obj) {
10
- let copy;
11
- // Handle the 3 simple types, and null or undefined
12
- if (null == obj || 'object' !== typeof obj) {
13
- return obj;
14
- }
15
- // Handle Date
16
- if (obj instanceof Date) {
17
- copy = new Date();
18
- copy.setTime(obj.getTime());
19
- return copy;
20
- }
21
- // Handle Array
22
- if (obj instanceof Array) {
23
- copy = [];
24
- for (let i = 0, len = obj.length; i < len; i++) {
25
- copy[i] = AXObjectUtil.deepCopy(obj[i]);
26
- }
27
- return copy;
28
- }
29
- // Handle Object
30
- if (obj instanceof Object) {
31
- copy = {};
32
- for (const attr in obj) {
33
- if (obj.hasOwnProperty(attr)) {
34
- copy[attr] = AXObjectUtil.deepCopy(obj[attr]);
35
- }
36
- }
37
- return copy;
38
- }
39
- throw new Error('Unable to copy obj! Its type isn\'t supported.');
40
- }
4
+ // @dynamic
5
+ class AXObjectUtil {
6
+ static deepJSONClone(obj) {
7
+ return obj ? JSON.parse(JSON.stringify(obj)) : null;
8
+ }
9
+ static deepCopy(obj) {
10
+ let copy;
11
+ // Handle the 3 simple types, and null or undefined
12
+ if (null == obj || 'object' !== typeof obj) {
13
+ return obj;
14
+ }
15
+ // Handle Date
16
+ if (obj instanceof Date) {
17
+ copy = new Date();
18
+ copy.setTime(obj.getTime());
19
+ return copy;
20
+ }
21
+ // Handle Array
22
+ if (obj instanceof Array) {
23
+ copy = [];
24
+ for (let i = 0, len = obj.length; i < len; i++) {
25
+ copy[i] = AXObjectUtil.deepCopy(obj[i]);
26
+ }
27
+ return copy;
28
+ }
29
+ // Handle Object
30
+ if (obj instanceof Object) {
31
+ copy = {};
32
+ for (const attr in obj) {
33
+ if (obj.hasOwnProperty(attr)) {
34
+ copy[attr] = AXObjectUtil.deepCopy(obj[attr]);
35
+ }
36
+ }
37
+ return copy;
38
+ }
39
+ throw new Error('Unable to copy obj! Its type isn\'t supported.');
40
+ }
41
41
  }
42
42
 
43
- // @dynamic
44
- class AXDrawingUtil {
45
- static collision(a, b) {
46
- const ac = a.getBoundingClientRect();
47
- const bc = b.getBoundingClientRect();
48
- if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left &&
49
- ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
50
- return true;
51
- }
52
- else {
53
- return false;
54
- }
55
- }
56
- static isInElementBound(pos, element) {
57
- const elBound = element.getBoundingClientRect();
58
- return AXDrawingUtil.isInRecPoint(pos, {
59
- left: elBound.x,
60
- width: elBound.width,
61
- top: elBound.y,
62
- height: elBound.height
63
- });
64
- }
65
- static isInRecPoint(pos, rec) {
66
- return pos.x >= rec.left && pos.x <= (rec.left + rec.width) && pos.y >= rec.top && (pos.y <= (rec.top + rec.height));
67
- }
68
- static convertRemToPixels(rem) {
69
- return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
70
- }
43
+ // @dynamic
44
+ class AXDrawingUtil {
45
+ static collision(a, b) {
46
+ const ac = a.getBoundingClientRect();
47
+ const bc = b.getBoundingClientRect();
48
+ if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left &&
49
+ ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
50
+ return true;
51
+ }
52
+ else {
53
+ return false;
54
+ }
55
+ }
56
+ static isInElementBound(pos, element) {
57
+ const elBound = element.getBoundingClientRect();
58
+ return AXDrawingUtil.isInRecPoint(pos, {
59
+ left: elBound.x,
60
+ width: elBound.width,
61
+ top: elBound.y,
62
+ height: elBound.height
63
+ });
64
+ }
65
+ static isInRecPoint(pos, rec) {
66
+ return pos.x >= rec.left && pos.x <= (rec.left + rec.width) && pos.y >= rec.top && (pos.y <= (rec.top + rec.height));
67
+ }
68
+ static convertRemToPixels(rem) {
69
+ return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
70
+ }
71
71
  }
72
72
 
73
- // @dynamic
74
- class AXStringUtil {
75
- static getWordBoundsAtPosition(str, position) {
76
- const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);
77
- let start = position - 1;
78
- while (start >= 0 && !isSpace(str[start])) {
79
- start -= 1;
80
- }
81
- start = Math.max(0, start + 1);
82
- const leftSideString = str.slice(start).match(/[a-zA-Z0-9]+/i);
83
- start += leftSideString.index;
84
- let end = start + leftSideString[0].length;
85
- return {
86
- start,
87
- end
88
- };
89
- }
73
+ // @dynamic
74
+ class AXStringUtil {
75
+ static getWordBoundsAtPosition(str, position) {
76
+ const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);
77
+ let start = position - 1;
78
+ while (start >= 0 && !isSpace(str[start])) {
79
+ start -= 1;
80
+ }
81
+ start = Math.max(0, start + 1);
82
+ const leftSideString = str.slice(start).match(/[a-zA-Z0-9]+/i);
83
+ start += leftSideString.index;
84
+ let end = start + leftSideString[0].length;
85
+ return {
86
+ start,
87
+ end
88
+ };
89
+ }
90
90
  }
91
91
 
92
- class AXColorUtil {
93
- static to(color, mode) {
94
- const _color = tinycolor(color);
95
- switch (mode) {
96
- case 'rgba':
97
- ;
98
- return _color.toRgb();
99
- case 'hsla':
100
- return _color.toHsl();
101
- case 'hsva':
102
- return _color.toHsv();
103
- default:
104
- return _color.toHex();
105
- }
106
- }
107
- ;
108
- static toString(color, mode = null) {
109
- const _color = tinycolor(color);
110
- switch (mode) {
111
- case 'rgba':
112
- return _color.toRgbString();
113
- case 'hsla':
114
- return _color.toHslString();
115
- case 'hsva':
116
- return _color.toHsvString();
117
- case 'hsva':
118
- return _color.toHsvString();
119
- case 'hex':
120
- {
121
- const rgba = _color.toRgb();
122
- return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();
123
- }
124
- default:
125
- {
126
- if (typeof color == 'string') {
127
- if (color.toLowerCase().startsWith("#"))
128
- return this.toString(color, "hex");
129
- else
130
- return this.toString(color, "rgba");
131
- }
132
- else {
133
- return this.toString(color, "rgba");
134
- }
135
- }
136
- }
137
- }
138
- ;
139
- static isValid(color) {
140
- const _color = tinycolor(color);
141
- return _color.isValid();
142
- }
143
- ;
144
- static mix(baseColor, hex, percentage) {
145
- return tinycolor.mix(baseColor, hex, percentage).toString('rgb');
146
- }
147
- static multiply(color1, color2) {
148
- let rgb1 = tinycolor(color1).toRgb();
149
- let rgb2 = tinycolor(color2).toRgb();
150
- rgb1.b = Math.floor(rgb1.b * rgb2.b / 255);
151
- rgb1.g = Math.floor(rgb1.g * rgb2.g / 255);
152
- rgb1.r = Math.floor(rgb1.r * rgb2.r / 255);
153
- return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');
154
- }
155
- static contrastToWhite(color) {
156
- return tinycolor.readability("#fff", color);
157
- }
158
- ;
159
- static lighten(hex, percentage) {
160
- return tinycolor(hex).lighten(percentage);
161
- }
162
- static darken(hex, percentage) {
163
- return tinycolor(hex).darken(percentage);
164
- }
165
- static brighten(hex, percentage) {
166
- return tinycolor(hex).brighten(percentage);
167
- }
168
- static saturate(hex, percentage) {
169
- return tinycolor(hex).saturate(percentage);
170
- }
171
- static desaturate(hex, percentage) {
172
- return tinycolor(hex).getLuminance();
173
- }
174
- static equal(color1, color2) {
175
- return tinycolor.equals(color1, color2);
176
- }
177
- static gradient(values) {
178
- return tinygradient([...values]);
179
- }
180
- static xyToRgb(vX, vY) {
181
- vY = vY || 0.00000000001;
182
- const Y = 1;
183
- const X = (Y / vY) * vX;
184
- const Z = (Y / vY) * (1 - vX - vY);
185
- // Convert to RGB using Wide RGB D65 conversion.
186
- let rgb = [
187
- X * 1.656492 - Y * 0.354851 - Z * 0.255038,
188
- -X * 0.707196 + Y * 1.655397 + Z * 0.036152,
189
- X * 0.051713 - Y * 0.121364 + Z * 1.011530
190
- ];
191
- // Apply reverse gamma correction.
192
- rgb = rgb.map(x => x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055);
193
- // Bring all negative components to zero.
194
- rgb = rgb.map(x => Math.max(0, x));
195
- // If one component is greater than 1, weight components by that value.
196
- const max = Math.max(...rgb);
197
- if (max > 1) {
198
- rgb = rgb.map(x => x / max);
199
- }
200
- rgb = rgb.map(x => Math.round(x * 255));
201
- return 'rgb(' + rgb.join(',') + ')';
202
- }
92
+ class AXColorUtil {
93
+ static to(color, mode) {
94
+ const _color = tinycolor(color);
95
+ switch (mode) {
96
+ case 'rgba':
97
+ ;
98
+ return _color.toRgb();
99
+ case 'hsla':
100
+ return _color.toHsl();
101
+ case 'hsva':
102
+ return _color.toHsv();
103
+ default:
104
+ return _color.toHex();
105
+ }
106
+ }
107
+ ;
108
+ static toString(color, mode = null) {
109
+ const _color = tinycolor(color);
110
+ switch (mode) {
111
+ case 'rgba':
112
+ return _color.toRgbString();
113
+ case 'hsla':
114
+ return _color.toHslString();
115
+ case 'hsva':
116
+ return _color.toHsvString();
117
+ case 'hsva':
118
+ return _color.toHsvString();
119
+ case 'hex':
120
+ {
121
+ const rgba = _color.toRgb();
122
+ return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();
123
+ }
124
+ default:
125
+ {
126
+ if (typeof color == 'string') {
127
+ if (color.toLowerCase().startsWith("#"))
128
+ return this.toString(color, "hex");
129
+ else
130
+ return this.toString(color, "rgba");
131
+ }
132
+ else {
133
+ return this.toString(color, "rgba");
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ;
139
+ static isValid(color) {
140
+ const _color = tinycolor(color);
141
+ return _color.isValid();
142
+ }
143
+ ;
144
+ static mix(baseColor, hex, percentage) {
145
+ return tinycolor.mix(baseColor, hex, percentage).toString('rgb');
146
+ }
147
+ static multiply(color1, color2) {
148
+ let rgb1 = tinycolor(color1).toRgb();
149
+ let rgb2 = tinycolor(color2).toRgb();
150
+ rgb1.b = Math.floor(rgb1.b * rgb2.b / 255);
151
+ rgb1.g = Math.floor(rgb1.g * rgb2.g / 255);
152
+ rgb1.r = Math.floor(rgb1.r * rgb2.r / 255);
153
+ return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');
154
+ }
155
+ static contrastToWhite(color) {
156
+ return tinycolor.readability("#fff", color);
157
+ }
158
+ ;
159
+ static lighten(hex, percentage) {
160
+ return tinycolor(hex).lighten(percentage);
161
+ }
162
+ static darken(hex, percentage) {
163
+ return tinycolor(hex).darken(percentage);
164
+ }
165
+ static brighten(hex, percentage) {
166
+ return tinycolor(hex).brighten(percentage);
167
+ }
168
+ static saturate(hex, percentage) {
169
+ return tinycolor(hex).saturate(percentage);
170
+ }
171
+ static desaturate(hex, percentage) {
172
+ return tinycolor(hex).getLuminance();
173
+ }
174
+ static equal(color1, color2) {
175
+ return tinycolor.equals(color1, color2);
176
+ }
177
+ static gradient(values) {
178
+ return tinygradient([...values]);
179
+ }
180
+ static xyToRgb(vX, vY) {
181
+ vY = vY || 0.00000000001;
182
+ const Y = 1;
183
+ const X = (Y / vY) * vX;
184
+ const Z = (Y / vY) * (1 - vX - vY);
185
+ // Convert to RGB using Wide RGB D65 conversion.
186
+ let rgb = [
187
+ X * 1.656492 - Y * 0.354851 - Z * 0.255038,
188
+ -X * 0.707196 + Y * 1.655397 + Z * 0.036152,
189
+ X * 0.051713 - Y * 0.121364 + Z * 1.011530
190
+ ];
191
+ // Apply reverse gamma correction.
192
+ rgb = rgb.map(x => x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055);
193
+ // Bring all negative components to zero.
194
+ rgb = rgb.map(x => Math.max(0, x));
195
+ // If one component is greater than 1, weight components by that value.
196
+ const max = Math.max(...rgb);
197
+ if (max > 1) {
198
+ rgb = rgb.map(x => x / max);
199
+ }
200
+ rgb = rgb.map(x => Math.round(x * 255));
201
+ return 'rgb(' + rgb.join(',') + ')';
202
+ }
203
203
  }
204
204
 
205
- // @dynamic
206
- class AXHtmlUtil {
207
- static focusElement(element) {
208
- const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map(c => c + ':not([tabindex="-1"])');
209
- const focusable = element.querySelector(list.join(', '));
210
- if (focusable) {
211
- focusable.focus();
212
- return focusable;
213
- }
214
- return null;
215
- }
216
- static hasFocus(element) {
217
- return element.matches(':focus-within') || element.matches(':focus');
218
- }
205
+ // @dynamic
206
+ class AXHtmlUtil {
207
+ static focusElement(element) {
208
+ const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map(c => c + ':not([tabindex="-1"])');
209
+ const focusable = element.querySelector(list.join(', '));
210
+ if (focusable) {
211
+ focusable.focus();
212
+ return focusable;
213
+ }
214
+ return null;
215
+ }
216
+ static hasFocus(element) {
217
+ return element.matches(':focus-within') || element.matches(':focus');
218
+ }
219
219
  }
220
220
 
221
- /**
222
- * Generated bundle index. Do not edit.
221
+ /**
222
+ * Generated bundle index. Do not edit.
223
223
  */
224
224
 
225
225
  export { AXColorUtil, AXDrawingUtil, AXHtmlUtil, AXObjectUtil, AXStringUtil };
226
226
  //# sourceMappingURL=acorex-core-utils.mjs.map
227
- //# sourceMappingURL=acorex-core-utils.mjs.map
@@ -1,12 +1,11 @@
1
- /*
2
- * Public API Surface of core
3
- */
1
+ /*
2
+ * Public API Surface of core
3
+ */
4
4
  const ACOREX_CORE = "@acorex/core";
5
5
 
6
- /**
7
- * Generated bundle index. Do not edit.
6
+ /**
7
+ * Generated bundle index. Do not edit.
8
8
  */
9
9
 
10
10
  export { ACOREX_CORE };
11
11
  //# sourceMappingURL=acorex-core.mjs.map
12
- //# sourceMappingURL=acorex-core.mjs.map
package/file/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@acorex/core/file" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@acorex/core/file" />
5
+ export * from './public-api';
@@ -1,4 +1,4 @@
1
- export * from './src/file-download-ref.class';
2
- export * from './src/file-download-result.class';
3
- export * from './src/file-upload-ref.class';
4
- export * from './src/file.service';
1
+ export * from './src/file-download-ref.class';
2
+ export * from './src/file-download-result.class';
3
+ export * from './src/file-upload-ref.class';
4
+ export * from './src/file.service';
@@ -1,6 +1,6 @@
1
- import { AXFileDownloadResult } from "./file-download-result.class";
2
- export declare class AXFileDownloadRef extends Promise<AXFileDownloadResult> {
3
- abortMethod: () => void;
4
- constructor(executor: (resolve: (value?: PromiseLike<AXFileDownloadResult>) => void, reject: (reason?: any) => void) => void);
5
- abort(): void;
6
- }
1
+ import { AXFileDownloadResult } from "./file-download-result.class";
2
+ export declare class AXFileDownloadRef extends Promise<AXFileDownloadResult> {
3
+ abortMethod: () => void;
4
+ constructor(executor: (resolve: (value?: PromiseLike<AXFileDownloadResult>) => void, reject: (reason?: any) => void) => void);
5
+ abort(): void;
6
+ }
@@ -1,8 +1,8 @@
1
- export declare class AXFileDownloadResult {
2
- _response: Blob;
3
- constructor(response: Blob);
4
- save(filename?: string): Promise<void>;
5
- blob(): Blob;
6
- base64(): Promise<string>;
7
- private _defaultBrowserDownload;
8
- }
1
+ export declare class AXFileDownloadResult {
2
+ _response: Blob;
3
+ constructor(response: Blob);
4
+ save(filename?: string): Promise<void>;
5
+ blob(): Blob;
6
+ base64(): Promise<string>;
7
+ private _defaultBrowserDownload;
8
+ }
@@ -1,5 +1,5 @@
1
- export declare class AXFileUploadRef<T = any> extends Promise<T> {
2
- abortMethod: () => void;
3
- constructor(executor: (resolve: (value?: PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
4
- abort(): void;
5
- }
1
+ export declare class AXFileUploadRef<T = any> extends Promise<T> {
2
+ abortMethod: () => void;
3
+ constructor(executor: (resolve: (value?: PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
4
+ abort(): void;
5
+ }
@@ -1,18 +1,18 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { AXFileDownloadRef } from './file-download-ref.class';
4
- import { AXFileUploadRef } from './file-upload-ref.class';
5
- import * as i0 from "@angular/core";
6
- export declare class AXFileService {
7
- private _httpClient;
8
- constructor(_httpClient: HttpClient);
9
- download(request: string | Observable<Blob>): AXFileDownloadRef;
10
- upload<T = any>(url: string, files: File[]): AXFileUploadRef<T>;
11
- choose(options?: {
12
- accept?: string;
13
- multiple?: boolean;
14
- }): Promise<File[]>;
15
- blobToBase64: (blob: Blob) => Promise<string>;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<AXFileService, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<AXFileService>;
18
- }
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { AXFileDownloadRef } from './file-download-ref.class';
4
+ import { AXFileUploadRef } from './file-upload-ref.class';
5
+ import * as i0 from "@angular/core";
6
+ export declare class AXFileService {
7
+ private _httpClient;
8
+ constructor(_httpClient: HttpClient);
9
+ download(request: string | Observable<Blob>): AXFileDownloadRef;
10
+ upload<T = any>(url: string, files: File[]): AXFileUploadRef<T>;
11
+ choose(options?: {
12
+ accept?: string;
13
+ multiple?: boolean;
14
+ }): Promise<File[]>;
15
+ blobToBase64: (blob: Blob) => Promise<string>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFileService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXFileService>;
18
+ }
package/http/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@acorex/core/http" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@acorex/core/http" />
5
+ export * from './public-api';
@@ -1,5 +1,5 @@
1
- export * from './src/http-error.class';
2
- export * from './src/http-events.interceptor';
3
- export * from './src/http-request.class';
4
- export * from './src/http-result.class';
5
- export * from './src/http.module';
1
+ export * from './src/http-error.class';
2
+ export * from './src/http-events.interceptor';
3
+ export * from './src/http-request.class';
4
+ export * from './src/http-result.class';
5
+ export * from './src/http.module';
@@ -1,7 +1,7 @@
1
- export interface IHttpError {
2
- message?: string;
3
- status?: number;
4
- code?: string;
5
- handled: boolean;
6
- error: any | null;
7
- }
1
+ export interface IHttpError {
2
+ message?: string;
3
+ status?: number;
4
+ code?: string;
5
+ handled: boolean;
6
+ error: any | null;
7
+ }
@@ -1,10 +1,10 @@
1
- import { IHttpError } from './http-error.class';
2
- import { InjectionToken } from '@angular/core';
3
- import { AXHttpRequestOptions } from './http-request.class';
4
- export declare const AX_HTTP_EVENT_INTERCEPTOR: InjectionToken<AXHttpEventInterceptor>;
5
- export interface AXHttpEventInterceptor {
6
- begin(request: AXHttpRequestOptions): Promise<AXHttpRequestOptions>;
7
- success(request: AXHttpRequestOptions, result: any): Promise<any>;
8
- complete(request: AXHttpRequestOptions): any;
9
- error(request: AXHttpRequestOptions, error: IHttpError): any;
10
- }
1
+ import { IHttpError } from './http-error.class';
2
+ import { InjectionToken } from '@angular/core';
3
+ import { AXHttpRequestOptions } from './http-request.class';
4
+ export declare const AX_HTTP_EVENT_INTERCEPTOR: InjectionToken<AXHttpEventInterceptor>;
5
+ export interface AXHttpEventInterceptor {
6
+ begin(request: AXHttpRequestOptions): Promise<AXHttpRequestOptions>;
7
+ success(request: AXHttpRequestOptions, result: any): Promise<any>;
8
+ complete(request: AXHttpRequestOptions): any;
9
+ error(request: AXHttpRequestOptions, error: IHttpError): any;
10
+ }