@koalarx/ui 14.0.7 → 14.0.9

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 (346) hide show
  1. package/alert/esm2020/index.mjs +6 -6
  2. package/alert/esm2020/koalarx-ui-alert.mjs +4 -4
  3. package/alert/esm2020/lib/dialog-alert.component.mjs +48 -48
  4. package/alert/esm2020/lib/koala.alert-config.interface.mjs +1 -1
  5. package/alert/esm2020/lib/koala.alert.enum.mjs +8 -8
  6. package/alert/esm2020/lib/koala.alert.module.mjs +46 -46
  7. package/alert/esm2020/lib/koala.alert.service.mjs +19 -19
  8. package/alert/esm2020/lib/koala.request-code-to-alert-enum.translate.mjs +17 -17
  9. package/alert/fesm2015/koalarx-ui-alert.mjs +111 -111
  10. package/alert/fesm2015/koalarx-ui-alert.mjs.map +1 -1
  11. package/alert/fesm2020/koalarx-ui-alert.mjs +109 -109
  12. package/alert/fesm2020/koalarx-ui-alert.mjs.map +1 -1
  13. package/alert/index.d.ts +6 -6
  14. package/alert/lib/dialog-alert.component.d.ts +10 -10
  15. package/alert/lib/koala.alert-config.interface.d.ts +14 -14
  16. package/alert/lib/koala.alert.enum.d.ts +7 -7
  17. package/alert/lib/koala.alert.module.d.ts +12 -12
  18. package/alert/lib/koala.alert.service.d.ts +10 -10
  19. package/alert/lib/koala.request-code-to-alert-enum.translate.d.ts +4 -4
  20. package/button/esm2020/index.mjs +2 -2
  21. package/button/esm2020/koalarx-ui-button.mjs +4 -4
  22. package/button/esm2020/lib/button.component.mjs +44 -44
  23. package/button/esm2020/lib/koala.button.module.mjs +40 -40
  24. package/button/fesm2015/koalarx-ui-button.mjs +67 -67
  25. package/button/fesm2015/koalarx-ui-button.mjs.map +1 -1
  26. package/button/fesm2020/koalarx-ui-button.mjs +67 -67
  27. package/button/fesm2020/koalarx-ui-button.mjs.map +1 -1
  28. package/button/index.d.ts +2 -2
  29. package/button/lib/button.component.d.ts +18 -18
  30. package/button/lib/koala.button.module.d.ts +12 -12
  31. package/common/esm2020/index.mjs +4 -4
  32. package/common/esm2020/koalarx-ui-common.mjs +4 -4
  33. package/common/esm2020/lib/mask-options.mjs +3 -3
  34. package/common/esm2020/lib/services/csv/koala.csv.service.mjs +36 -36
  35. package/common/esm2020/lib/services/xlsx/koala.xlsx-config.interface.mjs +1 -1
  36. package/common/esm2020/lib/services/xlsx/koala.xlsx.service.mjs +127 -127
  37. package/common/fesm2015/koalarx-ui-common.mjs +160 -160
  38. package/common/fesm2015/koalarx-ui-common.mjs.map +1 -1
  39. package/common/fesm2020/koalarx-ui-common.mjs +155 -155
  40. package/common/fesm2020/koalarx-ui-common.mjs.map +1 -1
  41. package/common/index.d.ts +4 -4
  42. package/common/lib/mask-options.d.ts +2 -2
  43. package/common/lib/services/csv/koala.csv.service.d.ts +10 -10
  44. package/common/lib/services/xlsx/koala.xlsx-config.interface.d.ts +11 -11
  45. package/common/lib/services/xlsx/koala.xlsx.service.d.ts +12 -12
  46. package/core/esm2020/index.mjs +36 -36
  47. package/core/esm2020/koalarx-ui-core.mjs +4 -4
  48. package/core/esm2020/lib/environments/koalaEnvironment.mjs +3 -3
  49. package/core/esm2020/lib/helpers/mat-form-field.helper.mjs +16 -16
  50. package/core/esm2020/lib/loader/loader-bar-page.component.mjs +24 -24
  51. package/core/esm2020/lib/loader/loader-bar-page.interface.mjs +1 -1
  52. package/core/esm2020/lib/loader/loader-config.interface.mjs +1 -1
  53. package/core/esm2020/lib/ngx-koala.module.mjs +47 -47
  54. package/core/esm2020/lib/page/koala-language.helper.mjs +113 -113
  55. package/core/esm2020/lib/page/koala-page-pallet-colors.interface.mjs +1 -1
  56. package/core/esm2020/lib/page/koala.page.module.mjs +76 -76
  57. package/core/esm2020/lib/page/koala.user-menu-options.interface.mjs +1 -1
  58. package/core/esm2020/lib/page/notifications/koala.notification.interface.mjs +1 -1
  59. package/core/esm2020/lib/page/notifications/notification.component.mjs +43 -43
  60. package/core/esm2020/lib/page/page.component.mjs +302 -302
  61. package/core/esm2020/lib/router/koala.parameter-hash-location-stategy.mjs +18 -18
  62. package/core/esm2020/lib/services/api-requester/factory/koala.response.factory.mjs +43 -43
  63. package/core/esm2020/lib/services/api-requester/helpers/error/koala.client.error.mjs +2 -2
  64. package/core/esm2020/lib/services/api-requester/helpers/error/koala.errors.helper.mjs +45 -45
  65. package/core/esm2020/lib/services/api-requester/helpers/error/koala.not-found.error.mjs +2 -2
  66. package/core/esm2020/lib/services/api-requester/helpers/error/koala.success.error.mjs +2 -2
  67. package/core/esm2020/lib/services/api-requester/helpers/error/koala.unhautorized.error.mjs +2 -2
  68. package/core/esm2020/lib/services/api-requester/helpers/service/koala.request-header.helper.mjs +14 -14
  69. package/core/esm2020/lib/services/api-requester/koala.api-requester.base.mjs +86 -86
  70. package/core/esm2020/lib/services/api-requester/koala.api-requester.cache.mjs +37 -37
  71. package/core/esm2020/lib/services/api-requester/koala.api-requester.service.mjs +158 -158
  72. package/core/esm2020/lib/services/loader/koala.loader.service.mjs +34 -34
  73. package/core/esm2020/lib/services/openid/koala-oauth2-config.interface.mjs +1 -1
  74. package/core/esm2020/lib/services/openid/koala.oauth.config.mjs +29 -29
  75. package/core/esm2020/lib/services/openid/koala.oauth2.service.mjs +188 -188
  76. package/core/esm2020/lib/services/request/koala.request.service.mjs +52 -52
  77. package/core/esm2020/lib/services/token/koala.token.service.mjs +55 -55
  78. package/core/esm2020/lib/services/token/token.factory.mjs +26 -26
  79. package/core/fesm2015/koalarx-ui-core.mjs +1294 -1294
  80. package/core/fesm2015/koalarx-ui-core.mjs.map +1 -1
  81. package/core/fesm2020/koalarx-ui-core.mjs +1256 -1256
  82. package/core/fesm2020/koalarx-ui-core.mjs.map +1 -1
  83. package/core/index.d.ts +30 -30
  84. package/core/lib/environments/koalaEnvironment.d.ts +15 -15
  85. package/core/lib/helpers/mat-form-field.helper.d.ts +3 -3
  86. package/core/lib/loader/loader-bar-page.component.d.ts +9 -9
  87. package/core/lib/loader/loader-bar-page.interface.d.ts +5 -5
  88. package/core/lib/loader/loader-config.interface.d.ts +7 -7
  89. package/core/lib/ngx-koala.module.d.ts +12 -12
  90. package/core/lib/page/koala-language.helper.d.ts +19 -19
  91. package/core/lib/page/koala-page-pallet-colors.interface.d.ts +38 -38
  92. package/core/lib/page/koala.page.module.d.ts +21 -21
  93. package/core/lib/page/koala.user-menu-options.interface.d.ts +5 -5
  94. package/core/lib/page/notifications/koala.notification.interface.d.ts +6 -6
  95. package/core/lib/page/notifications/notification.component.d.ts +15 -15
  96. package/core/lib/page/page.component.d.ts +58 -58
  97. package/core/lib/router/koala.parameter-hash-location-stategy.d.ts +7 -7
  98. package/core/lib/services/api-requester/factory/koala.response.factory.d.ts +5 -5
  99. package/core/lib/services/api-requester/helpers/error/koala.client.error.d.ts +2 -2
  100. package/core/lib/services/api-requester/helpers/error/koala.errors.helper.d.ts +13 -13
  101. package/core/lib/services/api-requester/helpers/error/koala.not-found.error.d.ts +2 -2
  102. package/core/lib/services/api-requester/helpers/error/koala.success.error.d.ts +2 -2
  103. package/core/lib/services/api-requester/helpers/error/koala.unhautorized.error.d.ts +2 -2
  104. package/core/lib/services/api-requester/helpers/service/koala.request-header.helper.d.ts +4 -4
  105. package/core/lib/services/api-requester/koala.api-requester.base.d.ts +19 -19
  106. package/core/lib/services/api-requester/koala.api-requester.cache.d.ts +13 -13
  107. package/core/lib/services/api-requester/koala.api-requester.service.d.ts +24 -24
  108. package/core/lib/services/loader/koala.loader.service.d.ts +14 -14
  109. package/core/lib/services/openid/koala-oauth2-config.interface.d.ts +11 -11
  110. package/core/lib/services/openid/koala.oauth.config.d.ts +9 -9
  111. package/core/lib/services/openid/koala.oauth2.service.d.ts +82 -82
  112. package/core/lib/services/request/koala.request.service.d.ts +11 -11
  113. package/core/lib/services/token/koala.token.service.d.ts +26 -26
  114. package/core/lib/services/token/token.factory.d.ts +9 -9
  115. package/dialog/esm2020/index.mjs +3 -3
  116. package/dialog/esm2020/koalarx-ui-dialog.mjs +4 -4
  117. package/dialog/esm2020/lib/dialog.component.mjs +25 -25
  118. package/dialog/esm2020/lib/koala.dialog-template.interface.mjs +1 -1
  119. package/dialog/esm2020/lib/koala.dialog.module.mjs +36 -36
  120. package/dialog/esm2020/lib/koala.dialog.service.mjs +57 -57
  121. package/dialog/fesm2015/koalarx-ui-dialog.mjs +96 -96
  122. package/dialog/fesm2015/koalarx-ui-dialog.mjs.map +1 -1
  123. package/dialog/fesm2020/koalarx-ui-dialog.mjs +96 -96
  124. package/dialog/fesm2020/koalarx-ui-dialog.mjs.map +1 -1
  125. package/dialog/index.d.ts +3 -3
  126. package/dialog/lib/dialog.component.d.ts +11 -11
  127. package/dialog/lib/koala.dialog-template.interface.d.ts +9 -9
  128. package/dialog/lib/koala.dialog.module.d.ts +11 -11
  129. package/dialog/lib/koala.dialog.service.d.ts +14 -14
  130. package/dynamic-component/esm2020/index.mjs +5 -5
  131. package/dynamic-component/esm2020/koalarx-ui-dynamic-component.mjs +4 -4
  132. package/dynamic-component/esm2020/lib/koala-dynamic-component.component.mjs +1 -1
  133. package/dynamic-component/esm2020/lib/koala-dynamic-component.directive.mjs +16 -16
  134. package/dynamic-component/esm2020/lib/koala-dynamic-component.factory.mjs +40 -40
  135. package/dynamic-component/esm2020/lib/koala-dynamic-component.mjs +6 -6
  136. package/dynamic-component/esm2020/lib/koala-dynamic-component.module.mjs +23 -23
  137. package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs +71 -71
  138. package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs.map +1 -1
  139. package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs +70 -70
  140. package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs.map +1 -1
  141. package/dynamic-component/index.d.ts +5 -5
  142. package/dynamic-component/lib/koala-dynamic-component.component.d.ts +3 -3
  143. package/dynamic-component/lib/koala-dynamic-component.d.ts +6 -6
  144. package/dynamic-component/lib/koala-dynamic-component.directive.d.ts +8 -8
  145. package/dynamic-component/lib/koala-dynamic-component.factory.d.ts +14 -14
  146. package/dynamic-component/lib/koala-dynamic-component.module.d.ts +8 -8
  147. package/file-button/esm2020/index.mjs +4 -4
  148. package/file-button/esm2020/koalarx-ui-file-button.mjs +4 -4
  149. package/file-button/esm2020/lib/file-button.component.mjs +125 -125
  150. package/file-button/esm2020/lib/koala.btn-file.service.mjs +25 -25
  151. package/file-button/esm2020/lib/koala.file-button.module.mjs +36 -36
  152. package/file-button/esm2020/lib/koala.file.interface.mjs +1 -1
  153. package/file-button/fesm2015/koalarx-ui-file-button.mjs +174 -174
  154. package/file-button/fesm2015/koalarx-ui-file-button.mjs.map +1 -1
  155. package/file-button/fesm2020/koalarx-ui-file-button.mjs +165 -165
  156. package/file-button/fesm2020/koalarx-ui-file-button.mjs.map +1 -1
  157. package/file-button/index.d.ts +4 -4
  158. package/file-button/lib/file-button.component.d.ts +29 -29
  159. package/file-button/lib/koala.btn-file.service.d.ts +11 -11
  160. package/file-button/lib/koala.file-button.module.d.ts +11 -11
  161. package/file-button/lib/koala.file.interface.d.ts +5 -5
  162. package/folder-page/esm2020/index.mjs +3 -3
  163. package/folder-page/esm2020/koalarx-ui-folder-page.mjs +4 -4
  164. package/folder-page/esm2020/lib/folder.component.mjs +70 -70
  165. package/folder-page/esm2020/lib/koala-navigate-history.interface.mjs +1 -1
  166. package/folder-page/esm2020/lib/koala.folder-page.module.mjs +40 -40
  167. package/folder-page/fesm2015/koalarx-ui-folder-page.mjs +95 -95
  168. package/folder-page/fesm2015/koalarx-ui-folder-page.mjs.map +1 -1
  169. package/folder-page/fesm2020/koalarx-ui-folder-page.mjs +94 -94
  170. package/folder-page/fesm2020/koalarx-ui-folder-page.mjs.map +1 -1
  171. package/folder-page/index.d.ts +3 -3
  172. package/folder-page/lib/folder.component.d.ts +21 -21
  173. package/folder-page/lib/koala-navigate-history.interface.d.ts +4 -4
  174. package/folder-page/lib/koala.folder-page.module.d.ts +12 -12
  175. package/form/esm2020/index.mjs +19 -19
  176. package/form/esm2020/koalarx-ui-form.mjs +4 -4
  177. package/form/esm2020/lib/btn-submit/btn-submit.component.mjs +49 -49
  178. package/form/esm2020/lib/directives/koala-autofocus.directive.mjs +25 -25
  179. package/form/esm2020/lib/dynamic-form/builder/dynamic-form.builder.mjs +139 -138
  180. package/form/esm2020/lib/dynamic-form/builder/fields/autocomplete.builder.mjs +37 -37
  181. package/form/esm2020/lib/dynamic-form/builder/fields/field.base.mjs +147 -147
  182. package/form/esm2020/lib/dynamic-form/builder/fields/field.builder.mjs +6 -6
  183. package/form/esm2020/lib/dynamic-form/builder/fields/more-items.builder.mjs +56 -56
  184. package/form/esm2020/lib/dynamic-form/dynamic-form.component.mjs +598 -598
  185. package/form/esm2020/lib/dynamic-form/enums/dynamic-form-type-field.enum.mjs +34 -34
  186. package/form/esm2020/lib/dynamic-form/interfaces/koala-custom-validator-fn.interface.mjs +1 -1
  187. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-autocomplete-options.interface.mjs +1 -1
  188. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-autocomplete-multiple-config.interface.mjs +1 -1
  189. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-config.interface.mjs +2 -2
  190. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-field.interface.mjs +1 -1
  191. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-more-itens-show-field-config.interface.mjs +1 -1
  192. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-show-field.interface.mjs +1 -1
  193. package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-set-value.interface.mjs +1 -1
  194. package/form/esm2020/lib/dynamic-form/koala.dynamic-form.service.mjs +212 -212
  195. package/form/esm2020/lib/dynamic-form/validators/autocomplete-selected.validator.mjs +9 -9
  196. package/form/esm2020/lib/dynamic-form/validators/cnpj.validator.mjs +9 -9
  197. package/form/esm2020/lib/dynamic-form/validators/cpf.validator.mjs +9 -9
  198. package/form/esm2020/lib/dynamic-form/validators/date-max.validator.mjs +10 -10
  199. package/form/esm2020/lib/dynamic-form/validators/date-min.validator.mjs +10 -10
  200. package/form/esm2020/lib/dynamic-form/validators/koala-dynamic-form-validator-result.helper.mjs +9 -9
  201. package/form/esm2020/lib/dynamic-form/validators/validation.helper.mjs +85 -85
  202. package/form/esm2020/lib/form.abstract.mjs +41 -41
  203. package/form/esm2020/lib/koala.form.module.mjs +132 -132
  204. package/form/esm2020/lib/show-invalid-fields/show-invalid-fields.mjs +8 -8
  205. package/form/fesm2015/koalarx-ui-form.mjs +1517 -1516
  206. package/form/fesm2015/koalarx-ui-form.mjs.map +1 -1
  207. package/form/fesm2020/koalarx-ui-form.mjs +1499 -1498
  208. package/form/fesm2020/koalarx-ui-form.mjs.map +1 -1
  209. package/form/index.d.ts +19 -19
  210. package/form/lib/btn-submit/btn-submit.component.d.ts +20 -20
  211. package/form/lib/directives/koala-autofocus.directive.d.ts +10 -10
  212. package/form/lib/dynamic-form/builder/dynamic-form.builder.d.ts +21 -21
  213. package/form/lib/dynamic-form/builder/fields/autocomplete.builder.d.ts +16 -16
  214. package/form/lib/dynamic-form/builder/fields/field.base.d.ts +42 -42
  215. package/form/lib/dynamic-form/builder/fields/field.builder.d.ts +8 -8
  216. package/form/lib/dynamic-form/builder/fields/more-items.builder.d.ts +17 -17
  217. package/form/lib/dynamic-form/dynamic-form.component.d.ts +54 -54
  218. package/form/lib/dynamic-form/enums/dynamic-form-type-field.enum.d.ts +33 -33
  219. package/form/lib/dynamic-form/interfaces/koala-custom-validator-fn.interface.d.ts +4 -4
  220. package/form/lib/dynamic-form/interfaces/koala.dynamic-autocomplete-options.interface.d.ts +4 -4
  221. package/form/lib/dynamic-form/interfaces/koala.dynamic-form-autocomplete-multiple-config.interface.d.ts +4 -4
  222. package/form/lib/dynamic-form/interfaces/koala.dynamic-form-config.interface.d.ts +12 -11
  223. package/form/lib/dynamic-form/interfaces/koala.dynamic-form-field.interface.d.ts +69 -69
  224. package/form/lib/dynamic-form/interfaces/koala.dynamic-form-more-itens-show-field-config.interface.d.ts +8 -8
  225. package/form/lib/dynamic-form/interfaces/koala.dynamic-form-show-field.interface.d.ts +5 -5
  226. package/form/lib/dynamic-form/interfaces/koala.dynamic-set-value.interface.d.ts +4 -4
  227. package/form/lib/dynamic-form/koala.dynamic-form.service.d.ts +28 -28
  228. package/form/lib/dynamic-form/validators/autocomplete-selected.validator.d.ts +4 -4
  229. package/form/lib/dynamic-form/validators/cnpj.validator.d.ts +4 -4
  230. package/form/lib/dynamic-form/validators/cpf.validator.d.ts +4 -4
  231. package/form/lib/dynamic-form/validators/date-max.validator.d.ts +2 -2
  232. package/form/lib/dynamic-form/validators/date-min.validator.d.ts +2 -2
  233. package/form/lib/dynamic-form/validators/koala-dynamic-form-validator-result.helper.d.ts +7 -7
  234. package/form/lib/dynamic-form/validators/validation.helper.d.ts +4 -4
  235. package/form/lib/form.abstract.d.ts +16 -16
  236. package/form/lib/koala.form.module.d.ts +25 -25
  237. package/form/lib/show-invalid-fields/show-invalid-fields.d.ts +6 -6
  238. package/icon/esm2020/index.mjs +3 -3
  239. package/icon/esm2020/koalarx-ui-icon.mjs +4 -4
  240. package/icon/esm2020/lib/icon.component.mjs +41 -41
  241. package/icon/esm2020/lib/koala.icon.module.mjs +24 -24
  242. package/icon/esm2020/lib/koala.icon.type.mjs +1 -1
  243. package/icon/fesm2015/koalarx-ui-icon.mjs +56 -56
  244. package/icon/fesm2015/koalarx-ui-icon.mjs.map +1 -1
  245. package/icon/fesm2020/koalarx-ui-icon.mjs +55 -55
  246. package/icon/fesm2020/koalarx-ui-icon.mjs.map +1 -1
  247. package/icon/index.d.ts +3 -3
  248. package/icon/lib/icon.component.d.ts +14 -14
  249. package/icon/lib/koala.icon.module.d.ts +8 -8
  250. package/icon/lib/koala.icon.type.d.ts +1 -1
  251. package/icons-animated/esm2020/index.mjs +4 -4
  252. package/icons-animated/esm2020/koalarx-ui-icons-animated.mjs +4 -4
  253. package/icons-animated/esm2020/lib/icons/downloading/downloading-icon-animated.component.mjs +23 -23
  254. package/icons-animated/esm2020/lib/icons/loading/loading-icon-animated.component.mjs +23 -23
  255. package/icons-animated/esm2020/lib/icons-animated.component.mjs +20 -20
  256. package/icons-animated/esm2020/lib/icons-animated.service.mjs +27 -27
  257. package/icons-animated/esm2020/lib/koala-icons-animated.module.mjs +30 -30
  258. package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs +95 -95
  259. package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs.map +1 -1
  260. package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs +93 -93
  261. package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs.map +1 -1
  262. package/icons-animated/index.d.ts +4 -4
  263. package/icons-animated/lib/icons/downloading/downloading-icon-animated.component.d.ts +12 -12
  264. package/icons-animated/lib/icons/loading/loading-icon-animated.component.d.ts +12 -12
  265. package/icons-animated/lib/icons-animated.component.d.ts +8 -8
  266. package/icons-animated/lib/icons-animated.service.d.ts +9 -9
  267. package/icons-animated/lib/koala-icons-animated.module.d.ts +10 -10
  268. package/list/esm2020/index.mjs +11 -11
  269. package/list/esm2020/koalarx-ui-list.mjs +4 -4
  270. package/list/esm2020/lib/koala-list-btn-collapse-sub-list-config.interface.mjs +1 -1
  271. package/list/esm2020/lib/koala-list-filter.interface.mjs +1 -1
  272. package/list/esm2020/lib/koala-list-form-filter.interface.mjs +1 -1
  273. package/list/esm2020/lib/koala-list-item-menu-option.interface.mjs +1 -1
  274. package/list/esm2020/lib/koala-list-item.interface.mjs +1 -1
  275. package/list/esm2020/lib/koala.list-config.interface.mjs +1 -1
  276. package/list/esm2020/lib/koala.list.module.mjs +68 -68
  277. package/list/esm2020/lib/koala.list.service.mjs +15 -15
  278. package/list/esm2020/lib/list-builder/list.builder.mjs +104 -104
  279. package/list/esm2020/lib/list.abstract.mjs +163 -163
  280. package/list/esm2020/lib/list.component.mjs +172 -172
  281. package/list/esm2020/lib/providers/pagination/pagination.provider.mjs +32 -32
  282. package/list/fesm2015/koalarx-ui-list.mjs +521 -521
  283. package/list/fesm2015/koalarx-ui-list.mjs.map +1 -1
  284. package/list/fesm2020/koalarx-ui-list.mjs +491 -491
  285. package/list/fesm2020/koalarx-ui-list.mjs.map +1 -1
  286. package/list/index.d.ts +11 -11
  287. package/list/lib/koala-list-btn-collapse-sub-list-config.interface.d.ts +8 -8
  288. package/list/lib/koala-list-filter.interface.d.ts +10 -10
  289. package/list/lib/koala-list-form-filter.interface.d.ts +8 -8
  290. package/list/lib/koala-list-item-menu-option.interface.d.ts +7 -7
  291. package/list/lib/koala-list-item.interface.d.ts +13 -13
  292. package/list/lib/koala.list-config.interface.d.ts +37 -37
  293. package/list/lib/koala.list.module.d.ts +17 -17
  294. package/list/lib/koala.list.service.d.ts +7 -7
  295. package/list/lib/list-builder/list.builder.d.ts +32 -32
  296. package/list/lib/list.abstract.d.ts +44 -44
  297. package/list/lib/list.component.d.ts +54 -54
  298. package/list/lib/providers/pagination/pagination.provider.d.ts +9 -9
  299. package/menu/esm2020/index.mjs +5 -5
  300. package/menu/esm2020/koalarx-ui-menu.mjs +4 -4
  301. package/menu/esm2020/lib/koala.menu-module.interface.mjs +1 -1
  302. package/menu/esm2020/lib/koala.menu-tool.interface.mjs +1 -1
  303. package/menu/esm2020/lib/koala.menu.module.mjs +36 -36
  304. package/menu/esm2020/lib/koala.menu.service.mjs +24 -24
  305. package/menu/esm2020/lib/menu.component.mjs +100 -100
  306. package/menu/fesm2015/koalarx-ui-menu.mjs +139 -139
  307. package/menu/fesm2015/koalarx-ui-menu.mjs.map +1 -1
  308. package/menu/fesm2020/koalarx-ui-menu.mjs +135 -135
  309. package/menu/fesm2020/koalarx-ui-menu.mjs.map +1 -1
  310. package/menu/index.d.ts +5 -5
  311. package/menu/lib/koala.menu-module.interface.d.ts +12 -12
  312. package/menu/lib/koala.menu-tool.interface.d.ts +6 -6
  313. package/menu/lib/koala.menu.module.d.ts +11 -11
  314. package/menu/lib/koala.menu.service.d.ts +10 -10
  315. package/menu/lib/menu.component.d.ts +22 -22
  316. package/package.json +1 -1
  317. package/question/esm2020/index.mjs +4 -4
  318. package/question/esm2020/koalarx-ui-question.mjs +4 -4
  319. package/question/esm2020/lib/dialog-question.component.mjs +25 -25
  320. package/question/esm2020/lib/koala-question-config.interface.mjs +1 -1
  321. package/question/esm2020/lib/koala.question.module.mjs +40 -40
  322. package/question/esm2020/lib/koala.question.service.mjs +26 -26
  323. package/question/fesm2015/koalarx-ui-question.mjs +68 -68
  324. package/question/fesm2015/koalarx-ui-question.mjs.map +1 -1
  325. package/question/fesm2020/koalarx-ui-question.mjs +66 -66
  326. package/question/fesm2020/koalarx-ui-question.mjs.map +1 -1
  327. package/question/index.d.ts +4 -4
  328. package/question/lib/dialog-question.component.d.ts +10 -10
  329. package/question/lib/koala-question-config.interface.d.ts +5 -5
  330. package/question/lib/koala.question.module.d.ts +12 -12
  331. package/question/lib/koala.question.service.d.ts +10 -10
  332. package/snackbar/esm2020/index.mjs +4 -4
  333. package/snackbar/esm2020/koalarx-ui-snackbar.mjs +4 -4
  334. package/snackbar/esm2020/lib/koala.snackbar.component.mjs +22 -22
  335. package/snackbar/esm2020/lib/koala.snackbar.interface.mjs +1 -1
  336. package/snackbar/esm2020/lib/koala.snackbar.module.mjs +36 -36
  337. package/snackbar/esm2020/lib/koala.snackbar.service.mjs +35 -35
  338. package/snackbar/fesm2015/koalarx-ui-snackbar.mjs +74 -74
  339. package/snackbar/fesm2015/koalarx-ui-snackbar.mjs.map +1 -1
  340. package/snackbar/fesm2020/koalarx-ui-snackbar.mjs +72 -72
  341. package/snackbar/fesm2020/koalarx-ui-snackbar.mjs.map +1 -1
  342. package/snackbar/index.d.ts +4 -4
  343. package/snackbar/lib/koala.snackbar.component.d.ts +10 -10
  344. package/snackbar/lib/koala.snackbar.interface.d.ts +4 -4
  345. package/snackbar/lib/koala.snackbar.module.d.ts +10 -10
  346. package/snackbar/lib/koala.snackbar.service.d.ts +12 -12
@@ -10,177 +10,177 @@ import { MatButtonModule } from '@angular/material/button';
10
10
  import * as i4 from '@angular/material/icon';
11
11
  import { MatIconModule } from '@angular/material/icon';
12
12
 
13
- class KoalaBtnFileService {
14
- constructor() {
15
- this.setFileSubject = new BehaviorSubject(null);
16
- this.fileListSubject = new BehaviorSubject([]);
17
- }
18
- async setFile(file) {
19
- if (file) {
20
- this.setFileSubject.next(file);
21
- }
22
- }
23
- removeFile(files, index) {
24
- files.splice(index, 1);
25
- this.fileListSubject.next(files);
26
- }
27
- }
28
- KoalaBtnFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KoalaBtnFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
- KoalaBtnFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KoalaBtnFileService, providedIn: "any" });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KoalaBtnFileService, decorators: [{
31
- type: Injectable,
32
- args: [{ providedIn: "any" }]
13
+ class KoalaBtnFileService {
14
+ constructor() {
15
+ this.setFileSubject = new BehaviorSubject(null);
16
+ this.fileListSubject = new BehaviorSubject([]);
17
+ }
18
+ async setFile(file) {
19
+ if (file) {
20
+ this.setFileSubject.next(file);
21
+ }
22
+ }
23
+ removeFile(files, index) {
24
+ files.splice(index, 1);
25
+ this.fileListSubject.next(files);
26
+ }
27
+ }
28
+ KoalaBtnFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaBtnFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ KoalaBtnFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaBtnFileService, providedIn: "any" });
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaBtnFileService, decorators: [{
31
+ type: Injectable,
32
+ args: [{ providedIn: "any" }]
33
33
  }] });
34
34
 
35
- class FileButtonComponent {
36
- constructor() {
37
- this.autoclear = true;
38
- this.getFiles = new EventEmitter();
39
- this.files = [];
40
- this.textSubject = new BehaviorSubject('');
41
- }
42
- ngOnInit() {
43
- this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;
44
- this.textSubject.next(this.text ?? '');
45
- if (this.setFile) {
46
- this.setFile.subscribe(async (file) => {
47
- if (file) {
48
- const fileResult = await this.convertFile(file);
49
- if (fileResult) {
50
- this.files.push(fileResult);
51
- }
52
- this.generateTextButton();
53
- this.getFiles.emit(this.files);
54
- }
55
- });
56
- }
57
- if (this.updateFileList) {
58
- this.updateFileList.subscribe((fileList) => {
59
- this.files = fileList;
60
- this.generateTextButton();
61
- });
62
- }
63
- }
64
- async emitFiles(files) {
65
- if (files) {
66
- if (files?.length > 0) {
67
- for (let f = 0; f <= files.length; f++) {
68
- const file = files.item(f);
69
- if (file) {
70
- const fileResult = await this.convertFile(file);
71
- if (fileResult) {
72
- this.files.push(fileResult);
73
- }
74
- }
75
- }
76
- this.getFiles.emit(this.files);
77
- }
78
- else {
79
- this.getFiles.emit([]);
80
- }
81
- this.generateTextButton();
82
- }
83
- }
84
- open() {
85
- const elFile = this.file?.nativeElement;
86
- if (elFile)
87
- elFile.value = '';
88
- if (this.autoclear) {
89
- this.files = [];
90
- this.getFiles.emit([]);
91
- this.generateTextButton();
92
- }
93
- elFile?.click();
94
- }
95
- generateTextButton() {
96
- this.textSubject.next(this.files.length > 0
97
- ? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`
98
- : this.text ?? '');
99
- }
100
- async convertFile(file) {
101
- const blobFile = await new Promise((resolve) => {
102
- const fileReader = new FileReader();
103
- fileReader.readAsDataURL(file);
104
- fileReader.onload = () => {
105
- resolve(fileReader.result);
106
- };
107
- });
108
- if (blobFile) {
109
- const fileSplit = blobFile.toString().split(';base64,');
110
- return {
111
- filename: file.name,
112
- type: fileSplit[0].replace('data:', ''),
113
- base64: fileSplit[1],
114
- };
115
- }
116
- return null;
117
- }
118
- }
119
- FileButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: FileButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
120
- FileButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: FileButtonComponent, selector: "koala-file-button", inputs: { color: "color", backgroundColor: "backgroundColor", icon: "icon", text: "text", tooltip: "tooltip", disabled: "disabled", multiple: "multiple", accept: "accept", setFile: "setFile", updateFileList: "updateFileList", autoclear: "autoclear" }, outputs: { getFiles: "getFiles" }, viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], ngImport: i0, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: FileButtonComponent, decorators: [{
122
- type: Component,
123
- args: [{ selector: 'koala-file-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"] }]
124
- }], propDecorators: { color: [{
125
- type: Input
126
- }], backgroundColor: [{
127
- type: Input
128
- }], icon: [{
129
- type: Input
130
- }], text: [{
131
- type: Input
132
- }], tooltip: [{
133
- type: Input
134
- }], disabled: [{
135
- type: Input
136
- }], multiple: [{
137
- type: Input
138
- }], accept: [{
139
- type: Input
140
- }], setFile: [{
141
- type: Input
142
- }], updateFileList: [{
143
- type: Input
144
- }], autoclear: [{
145
- type: Input
146
- }], getFiles: [{
147
- type: Output
148
- }], file: [{
149
- type: ViewChild,
150
- args: ['file', { static: true }]
35
+ class FileButtonComponent {
36
+ constructor() {
37
+ this.autoclear = true;
38
+ this.getFiles = new EventEmitter();
39
+ this.files = [];
40
+ this.textSubject = new BehaviorSubject('');
41
+ }
42
+ ngOnInit() {
43
+ this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;
44
+ this.textSubject.next(this.text ?? '');
45
+ if (this.setFile) {
46
+ this.setFile.subscribe(async (file) => {
47
+ if (file) {
48
+ const fileResult = await this.convertFile(file);
49
+ if (fileResult) {
50
+ this.files.push(fileResult);
51
+ }
52
+ this.generateTextButton();
53
+ this.getFiles.emit(this.files);
54
+ }
55
+ });
56
+ }
57
+ if (this.updateFileList) {
58
+ this.updateFileList.subscribe((fileList) => {
59
+ this.files = fileList;
60
+ this.generateTextButton();
61
+ });
62
+ }
63
+ }
64
+ async emitFiles(files) {
65
+ if (files) {
66
+ if (files?.length > 0) {
67
+ for (let f = 0; f <= files.length; f++) {
68
+ const file = files.item(f);
69
+ if (file) {
70
+ const fileResult = await this.convertFile(file);
71
+ if (fileResult) {
72
+ this.files.push(fileResult);
73
+ }
74
+ }
75
+ }
76
+ this.getFiles.emit(this.files);
77
+ }
78
+ else {
79
+ this.getFiles.emit([]);
80
+ }
81
+ this.generateTextButton();
82
+ }
83
+ }
84
+ open() {
85
+ const elFile = this.file?.nativeElement;
86
+ if (elFile)
87
+ elFile.value = '';
88
+ if (this.autoclear) {
89
+ this.files = [];
90
+ this.getFiles.emit([]);
91
+ this.generateTextButton();
92
+ }
93
+ elFile?.click();
94
+ }
95
+ generateTextButton() {
96
+ this.textSubject.next(this.files.length > 0
97
+ ? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`
98
+ : this.text ?? '');
99
+ }
100
+ async convertFile(file) {
101
+ const blobFile = await new Promise((resolve) => {
102
+ const fileReader = new FileReader();
103
+ fileReader.readAsDataURL(file);
104
+ fileReader.onload = () => {
105
+ resolve(fileReader.result);
106
+ };
107
+ });
108
+ if (blobFile) {
109
+ const fileSplit = blobFile.toString().split(';base64,');
110
+ return {
111
+ filename: file.name,
112
+ type: fileSplit[0].replace('data:', ''),
113
+ base64: fileSplit[1],
114
+ };
115
+ }
116
+ return null;
117
+ }
118
+ }
119
+ FileButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
120
+ FileButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FileButtonComponent, selector: "koala-file-button", inputs: { color: "color", backgroundColor: "backgroundColor", icon: "icon", text: "text", tooltip: "tooltip", disabled: "disabled", multiple: "multiple", accept: "accept", setFile: "setFile", updateFileList: "updateFileList", autoclear: "autoclear" }, outputs: { getFiles: "getFiles" }, viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], ngImport: i0, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileButtonComponent, decorators: [{
122
+ type: Component,
123
+ args: [{ selector: 'koala-file-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"] }]
124
+ }], propDecorators: { color: [{
125
+ type: Input
126
+ }], backgroundColor: [{
127
+ type: Input
128
+ }], icon: [{
129
+ type: Input
130
+ }], text: [{
131
+ type: Input
132
+ }], tooltip: [{
133
+ type: Input
134
+ }], disabled: [{
135
+ type: Input
136
+ }], multiple: [{
137
+ type: Input
138
+ }], accept: [{
139
+ type: Input
140
+ }], setFile: [{
141
+ type: Input
142
+ }], updateFileList: [{
143
+ type: Input
144
+ }], autoclear: [{
145
+ type: Input
146
+ }], getFiles: [{
147
+ type: Output
148
+ }], file: [{
149
+ type: ViewChild,
150
+ args: ['file', { static: true }]
151
151
  }] } });
152
152
 
153
- class KoalaFileButtonModule {
154
- }
155
- KoalaFileButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KoalaFileButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
- KoalaFileButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: KoalaFileButtonModule, declarations: [FileButtonComponent], imports: [CommonModule,
157
- MatTooltipModule,
158
- MatButtonModule,
159
- MatIconModule], exports: [FileButtonComponent] });
160
- KoalaFileButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KoalaFileButtonModule, imports: [CommonModule,
161
- MatTooltipModule,
162
- MatButtonModule,
163
- MatIconModule] });
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KoalaFileButtonModule, decorators: [{
165
- type: NgModule,
166
- args: [{
167
- exports: [
168
- FileButtonComponent
169
- ],
170
- declarations: [
171
- FileButtonComponent
172
- ],
173
- imports: [
174
- CommonModule,
175
- MatTooltipModule,
176
- MatButtonModule,
177
- MatIconModule
178
- ]
179
- }]
153
+ class KoalaFileButtonModule {
154
+ }
155
+ KoalaFileButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
+ KoalaFileButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, declarations: [FileButtonComponent], imports: [CommonModule,
157
+ MatTooltipModule,
158
+ MatButtonModule,
159
+ MatIconModule], exports: [FileButtonComponent] });
160
+ KoalaFileButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, imports: [CommonModule,
161
+ MatTooltipModule,
162
+ MatButtonModule,
163
+ MatIconModule] });
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, decorators: [{
165
+ type: NgModule,
166
+ args: [{
167
+ exports: [
168
+ FileButtonComponent
169
+ ],
170
+ declarations: [
171
+ FileButtonComponent
172
+ ],
173
+ imports: [
174
+ CommonModule,
175
+ MatTooltipModule,
176
+ MatButtonModule,
177
+ MatIconModule
178
+ ]
179
+ }]
180
180
  }] });
181
181
 
182
- /**
183
- * Generated bundle index. Do not edit.
182
+ /**
183
+ * Generated bundle index. Do not edit.
184
184
  */
185
185
 
186
186
  export { FileButtonComponent, KoalaBtnFileService, KoalaFileButtonModule };
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-file-button.mjs","sources":["../../../projects/file-button/src/lib/koala.btn-file.service.ts","../../../projects/file-button/src/lib/file-button.component.ts","../../../projects/file-button/src/lib/file-button.component.html","../../../projects/file-button/src/lib/koala.file-button.module.ts","../../../projects/file-button/src/koalarx-ui-file-button.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { KoalaFileInterface } from './koala.file.interface';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaBtnFileService {\n\tpublic setFileSubject = new BehaviorSubject<File|null>(null);\n\tpublic fileListSubject = new BehaviorSubject<KoalaFileInterface[]>([]);\n\n\tpublic async setFile(file: File) {\n\t\tif (file) {\n\t\t\tthis.setFileSubject.next(file);\n\t\t}\n\t}\n\n\tpublic removeFile(files: KoalaFileInterface[], index: number) {\n\t\tfiles.splice(index, 1);\n\t\tthis.fileListSubject.next(files);\n\t}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { KoalaFileInterface } from './koala.file.interface';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'koala-file-button',\n templateUrl: 'file-button.component.html',\n styleUrls: ['file-button.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FileButtonComponent implements OnInit {\n @Input() color?: string;\n @Input() backgroundColor?: string;\n @Input() icon?: string;\n @Input() text?: string;\n @Input() tooltip?: string;\n @Input() disabled?: boolean;\n @Input() multiple?: boolean;\n @Input() accept?: string;\n @Input() setFile?: BehaviorSubject<File>;\n @Input() updateFileList?: BehaviorSubject<KoalaFileInterface[]>;\n @Input() autoclear = true;\n @Output() getFiles = new EventEmitter<KoalaFileInterface[]>();\n public files: KoalaFileInterface[] = [];\n public style?: string;\n\n @ViewChild('file', { static: true }) private file?: ElementRef<HTMLInputElement>;\n\n public textSubject = new BehaviorSubject<string>('');\n\n ngOnInit() {\n this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;\n this.textSubject.next(this.text ?? '');\n if (this.setFile) {\n this.setFile.subscribe(async (file) => {\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n this.generateTextButton();\n this.getFiles.emit(this.files);\n }\n });\n }\n\n if (this.updateFileList) {\n this.updateFileList.subscribe((fileList) => {\n this.files = fileList;\n this.generateTextButton();\n });\n }\n }\n\n public async emitFiles(files: FileList | null) {\n if (files) {\n if (files?.length > 0) {\n for (let f = 0; f <= files.length; f++) {\n const file = files.item(f);\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n }\n }\n\n this.getFiles.emit(this.files);\n } else {\n this.getFiles.emit([]);\n }\n this.generateTextButton();\n }\n }\n\n public open() {\n const elFile = this.file?.nativeElement;\n if (elFile) elFile.value = '';\n if (this.autoclear) {\n this.files = [];\n this.getFiles.emit([]);\n this.generateTextButton();\n }\n elFile?.click();\n }\n\n private generateTextButton() {\n this.textSubject.next(\n this.files.length > 0\n ? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`\n : this.text ?? '',\n );\n }\n\n private async convertFile(file: File): Promise<KoalaFileInterface | null> {\n const blobFile = await new Promise<string | ArrayBuffer | null>((resolve) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n });\n if (blobFile) {\n const fileSplit = blobFile.toString().split(';base64,');\n return {\n filename: file.name,\n type: fileSplit[0].replace('data:', ''),\n base64: fileSplit[1],\n };\n }\n\n return null;\n }\n}\n","<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FileButtonComponent } from './file-button.component';\n\n@NgModule({\n exports: [\n FileButtonComponent\n ],\n\tdeclarations: [\n\t\tFileButtonComponent\n\t],\n\timports: [\n\t\tCommonModule,\n\t\tMatTooltipModule,\n\t\tMatButtonModule,\n\t\tMatIconModule\n\t]\n})\nexport class KoalaFileButtonModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],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AQ,EAAA,CAAA;sBAAjB,MAAM;gBAIsC,IAAI,EAAA,CAAA;sBAAhD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;MEdxB,qBAAqB,CAAA;;mHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;oHAArB,qBAAqB,EAAA,YAAA,EAAA,CAThC,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAGnB,YAAY;QACZ,gBAAgB;QAChB,eAAe;AACf,QAAA,aAAa,aATX,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAYV,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YANhC,YAAY;QACZ,gBAAgB;QAChB,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;4FAGF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,mBAAmB;AACpB,qBAAA;AACF,oBAAA,YAAY,EAAE;wBACb,mBAAmB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,aAAa;AACb,qBAAA;AACD,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-file-button.mjs","sources":["../../../projects/file-button/src/lib/koala.btn-file.service.ts","../../../projects/file-button/src/lib/file-button.component.ts","../../../projects/file-button/src/lib/file-button.component.html","../../../projects/file-button/src/lib/koala.file-button.module.ts","../../../projects/file-button/src/koalarx-ui-file-button.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { KoalaFileInterface } from './koala.file.interface';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaBtnFileService {\n\tpublic setFileSubject = new BehaviorSubject<File|null>(null);\n\tpublic fileListSubject = new BehaviorSubject<KoalaFileInterface[]>([]);\n\n\tpublic async setFile(file: File) {\n\t\tif (file) {\n\t\t\tthis.setFileSubject.next(file);\n\t\t}\n\t}\n\n\tpublic removeFile(files: KoalaFileInterface[], index: number) {\n\t\tfiles.splice(index, 1);\n\t\tthis.fileListSubject.next(files);\n\t}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { KoalaFileInterface } from './koala.file.interface';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'koala-file-button',\n templateUrl: 'file-button.component.html',\n styleUrls: ['file-button.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FileButtonComponent implements OnInit {\n @Input() color?: string;\n @Input() backgroundColor?: string;\n @Input() icon?: string;\n @Input() text?: string;\n @Input() tooltip?: string;\n @Input() disabled?: boolean;\n @Input() multiple?: boolean;\n @Input() accept?: string;\n @Input() setFile?: BehaviorSubject<File>;\n @Input() updateFileList?: BehaviorSubject<KoalaFileInterface[]>;\n @Input() autoclear = true;\n @Output() getFiles = new EventEmitter<KoalaFileInterface[]>();\n public files: KoalaFileInterface[] = [];\n public style?: string;\n\n @ViewChild('file', { static: true }) private file?: ElementRef<HTMLInputElement>;\n\n public textSubject = new BehaviorSubject<string>('');\n\n ngOnInit() {\n this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;\n this.textSubject.next(this.text ?? '');\n if (this.setFile) {\n this.setFile.subscribe(async (file) => {\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n this.generateTextButton();\n this.getFiles.emit(this.files);\n }\n });\n }\n\n if (this.updateFileList) {\n this.updateFileList.subscribe((fileList) => {\n this.files = fileList;\n this.generateTextButton();\n });\n }\n }\n\n public async emitFiles(files: FileList | null) {\n if (files) {\n if (files?.length > 0) {\n for (let f = 0; f <= files.length; f++) {\n const file = files.item(f);\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n }\n }\n\n this.getFiles.emit(this.files);\n } else {\n this.getFiles.emit([]);\n }\n this.generateTextButton();\n }\n }\n\n public open() {\n const elFile = this.file?.nativeElement;\n if (elFile) elFile.value = '';\n if (this.autoclear) {\n this.files = [];\n this.getFiles.emit([]);\n this.generateTextButton();\n }\n elFile?.click();\n }\n\n private generateTextButton() {\n this.textSubject.next(\n this.files.length > 0\n ? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`\n : this.text ?? '',\n );\n }\n\n private async convertFile(file: File): Promise<KoalaFileInterface | null> {\n const blobFile = await new Promise<string | ArrayBuffer | null>((resolve) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n });\n if (blobFile) {\n const fileSplit = blobFile.toString().split(';base64,');\n return {\n filename: file.name,\n type: fileSplit[0].replace('data:', ''),\n base64: fileSplit[1],\n };\n }\n\n return null;\n }\n}\n","<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FileButtonComponent } from './file-button.component';\n\n@NgModule({\n exports: [\n FileButtonComponent\n ],\n\tdeclarations: [\n\t\tFileButtonComponent\n\t],\n\timports: [\n\t\tCommonModule,\n\t\tMatTooltipModule,\n\t\tMatButtonModule,\n\t\tMatIconModule\n\t]\n})\nexport class KoalaFileButtonModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAEQ,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,eAAe,CAAY,IAAI,CAAC,CAAC;AACtD,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,eAAe,CAAuB,EAAE,CAAC,CAAC;AAYvE,KAAA;IAVO,MAAM,OAAO,CAAC,IAAU,EAAA;AAC9B,QAAA,IAAI,IAAI,EAAE;AACT,YAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B,SAAA;KACD;IAEM,UAAU,CAAC,KAA2B,EAAE,KAAa,EAAA;AAC3D,QAAA,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACvB,QAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjC;;gHAbW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,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BAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,mBAAmB;AACpB,qBAAA;AACF,oBAAA,YAAY,EAAE;wBACb,mBAAmB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,aAAa;AACb,qBAAA;AACD,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- export * from './lib/koala.btn-file.service';
2
- export * from './lib/file-button.component';
3
- export * from './lib/koala.file-button.module';
4
- export * from './lib/koala.file.interface';
1
+ export * from './lib/koala.btn-file.service';
2
+ export * from './lib/file-button.component';
3
+ export * from './lib/koala.file-button.module';
4
+ export * from './lib/koala.file.interface';
@@ -1,29 +1,29 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { KoalaFileInterface } from './koala.file.interface';
3
- import { BehaviorSubject } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare class FileButtonComponent implements OnInit {
6
- color?: string;
7
- backgroundColor?: string;
8
- icon?: string;
9
- text?: string;
10
- tooltip?: string;
11
- disabled?: boolean;
12
- multiple?: boolean;
13
- accept?: string;
14
- setFile?: BehaviorSubject<File>;
15
- updateFileList?: BehaviorSubject<KoalaFileInterface[]>;
16
- autoclear: boolean;
17
- getFiles: EventEmitter<KoalaFileInterface[]>;
18
- files: KoalaFileInterface[];
19
- style?: string;
20
- private file?;
21
- textSubject: BehaviorSubject<string>;
22
- ngOnInit(): void;
23
- emitFiles(files: FileList | null): Promise<void>;
24
- open(): void;
25
- private generateTextButton;
26
- private convertFile;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<FileButtonComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<FileButtonComponent, "koala-file-button", never, { "color": "color"; "backgroundColor": "backgroundColor"; "icon": "icon"; "text": "text"; "tooltip": "tooltip"; "disabled": "disabled"; "multiple": "multiple"; "accept": "accept"; "setFile": "setFile"; "updateFileList": "updateFileList"; "autoclear": "autoclear"; }, { "getFiles": "getFiles"; }, never, never, false>;
29
- }
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { KoalaFileInterface } from './koala.file.interface';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class FileButtonComponent implements OnInit {
6
+ color?: string;
7
+ backgroundColor?: string;
8
+ icon?: string;
9
+ text?: string;
10
+ tooltip?: string;
11
+ disabled?: boolean;
12
+ multiple?: boolean;
13
+ accept?: string;
14
+ setFile?: BehaviorSubject<File>;
15
+ updateFileList?: BehaviorSubject<KoalaFileInterface[]>;
16
+ autoclear: boolean;
17
+ getFiles: EventEmitter<KoalaFileInterface[]>;
18
+ files: KoalaFileInterface[];
19
+ style?: string;
20
+ private file?;
21
+ textSubject: BehaviorSubject<string>;
22
+ ngOnInit(): void;
23
+ emitFiles(files: FileList | null): Promise<void>;
24
+ open(): void;
25
+ private generateTextButton;
26
+ private convertFile;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileButtonComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileButtonComponent, "koala-file-button", never, { "color": "color"; "backgroundColor": "backgroundColor"; "icon": "icon"; "text": "text"; "tooltip": "tooltip"; "disabled": "disabled"; "multiple": "multiple"; "accept": "accept"; "setFile": "setFile"; "updateFileList": "updateFileList"; "autoclear": "autoclear"; }, { "getFiles": "getFiles"; }, never, never, false>;
29
+ }
@@ -1,11 +1,11 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- import { KoalaFileInterface } from './koala.file.interface';
3
- import * as i0 from "@angular/core";
4
- export declare class KoalaBtnFileService {
5
- setFileSubject: BehaviorSubject<File | null>;
6
- fileListSubject: BehaviorSubject<KoalaFileInterface[]>;
7
- setFile(file: File): Promise<void>;
8
- removeFile(files: KoalaFileInterface[], index: number): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<KoalaBtnFileService, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<KoalaBtnFileService>;
11
- }
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { KoalaFileInterface } from './koala.file.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class KoalaBtnFileService {
5
+ setFileSubject: BehaviorSubject<File | null>;
6
+ fileListSubject: BehaviorSubject<KoalaFileInterface[]>;
7
+ setFile(file: File): Promise<void>;
8
+ removeFile(files: KoalaFileInterface[], index: number): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<KoalaBtnFileService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<KoalaBtnFileService>;
11
+ }
@@ -1,11 +1,11 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./file-button.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/material/tooltip";
5
- import * as i4 from "@angular/material/button";
6
- import * as i5 from "@angular/material/icon";
7
- export declare class KoalaFileButtonModule {
8
- static ɵfac: i0.ɵɵFactoryDeclaration<KoalaFileButtonModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<KoalaFileButtonModule, [typeof i1.FileButtonComponent], [typeof i2.CommonModule, typeof i3.MatTooltipModule, typeof i4.MatButtonModule, typeof i5.MatIconModule], [typeof i1.FileButtonComponent]>;
10
- static ɵinj: i0.ɵɵInjectorDeclaration<KoalaFileButtonModule>;
11
- }
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./file-button.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/material/tooltip";
5
+ import * as i4 from "@angular/material/button";
6
+ import * as i5 from "@angular/material/icon";
7
+ export declare class KoalaFileButtonModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<KoalaFileButtonModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KoalaFileButtonModule, [typeof i1.FileButtonComponent], [typeof i2.CommonModule, typeof i3.MatTooltipModule, typeof i4.MatButtonModule, typeof i5.MatIconModule], [typeof i1.FileButtonComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<KoalaFileButtonModule>;
11
+ }
@@ -1,5 +1,5 @@
1
- export interface KoalaFileInterface {
2
- type: string;
3
- base64: string;
4
- filename: string;
5
- }
1
+ export interface KoalaFileInterface {
2
+ type: string;
3
+ base64: string;
4
+ filename: string;
5
+ }
@@ -1,4 +1,4 @@
1
- export * from './lib/folder.component';
2
- export * from './lib/koala.folder-page.module';
3
- export * from './lib/koala-navigate-history.interface';
1
+ export * from './lib/folder.component';
2
+ export * from './lib/koala.folder-page.module';
3
+ export * from './lib/koala-navigate-history.interface';
4
4
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9mb2xkZXItcGFnZS9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsd0NBQXdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9mb2xkZXIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2tvYWxhLmZvbGRlci1wYWdlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9rb2FsYS1uYXZpZ2F0ZS1oaXN0b3J5LmludGVyZmFjZSc7XG4iXX0=
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia29hbGFyeC11aS1mb2xkZXItcGFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2ZvbGRlci1wYWdlL3NyYy9rb2FsYXJ4LXVpLWZvbGRlci1wYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19