ux4g-components-angular 1.4.0 → 1.5.0

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 (273) hide show
  1. package/README.md +330 -48
  2. package/dist/accessibility-bar/README.md +330 -48
  3. package/dist/accordion/README.md +330 -48
  4. package/dist/alert/README.md +330 -48
  5. package/dist/avatar/README.md +330 -48
  6. package/dist/badge/README.md +330 -48
  7. package/dist/breadcrumb/README.md +330 -48
  8. package/dist/button/README.md +330 -48
  9. package/dist/card/README.md +330 -48
  10. package/dist/carousel/README.md +330 -48
  11. package/dist/checkbox/README.md +330 -48
  12. package/dist/chip/README.md +330 -48
  13. package/dist/chip-group/README.md +330 -48
  14. package/dist/combobox/README.md +330 -48
  15. package/dist/date-time-picker/README.md +330 -48
  16. package/dist/divider/README.md +330 -48
  17. package/dist/draft-status-banner/README.md +330 -48
  18. package/dist/drawer/README.md +330 -48
  19. package/dist/dropdown/README.md +330 -48
  20. package/dist/empty-state/README.md +330 -48
  21. package/dist/feedback/README.md +330 -48
  22. package/dist/file-upload/README.md +330 -48
  23. package/dist/footer/README.md +330 -48
  24. package/dist/form-field-group/README.md +330 -48
  25. package/dist/icon-button/README.md +330 -48
  26. package/dist/image/README.md +330 -48
  27. package/dist/input/README.md +330 -48
  28. package/dist/journey-timeline/README.md +330 -48
  29. package/dist/link/README.md +330 -48
  30. package/dist/list/README.md +330 -48
  31. package/dist/mega-menu/README.md +330 -48
  32. package/dist/modal/README.md +330 -48
  33. package/dist/native/accordion/README.md +1541 -0
  34. package/dist/native/accordion/fesm2022/ux4g-components-angular-native-accordion.mjs +85 -0
  35. package/dist/native/accordion/fesm2022/ux4g-components-angular-native-accordion.mjs.map +1 -0
  36. package/dist/native/accordion/index.d.ts +6 -0
  37. package/dist/native/accordion/public-api.d.ts +3 -0
  38. package/dist/native/accordion/public-api.d.ts.map +1 -0
  39. package/dist/native/accordion/ux4g-components-angular-native-accordion.d.ts.map +1 -0
  40. package/dist/native/accordion/ux4g-native-accordion.component.d.ts +31 -0
  41. package/dist/native/accordion/ux4g-native-accordion.component.d.ts.map +1 -0
  42. package/dist/native/accordion/ux4g-native-accordion.module.d.ts +12 -0
  43. package/dist/native/accordion/ux4g-native-accordion.module.d.ts.map +1 -0
  44. package/dist/native/avatar/README.md +1541 -0
  45. package/dist/native/avatar/fesm2022/ux4g-components-angular-native-avatar.mjs +81 -0
  46. package/dist/native/avatar/fesm2022/ux4g-components-angular-native-avatar.mjs.map +1 -0
  47. package/dist/native/avatar/index.d.ts +6 -0
  48. package/dist/native/avatar/public-api.d.ts +3 -0
  49. package/dist/native/avatar/public-api.d.ts.map +1 -0
  50. package/dist/native/avatar/ux4g-components-angular-native-avatar.d.ts.map +1 -0
  51. package/dist/native/avatar/ux4g-native-avatar.component.d.ts +34 -0
  52. package/dist/native/avatar/ux4g-native-avatar.component.d.ts.map +1 -0
  53. package/dist/native/avatar/ux4g-native-avatar.module.d.ts +8 -0
  54. package/dist/native/avatar/ux4g-native-avatar.module.d.ts.map +1 -0
  55. package/dist/native/carousel/README.md +1541 -0
  56. package/dist/native/carousel/fesm2022/ux4g-components-angular-native-carousel.mjs +91 -0
  57. package/dist/native/carousel/fesm2022/ux4g-components-angular-native-carousel.mjs.map +1 -0
  58. package/dist/native/carousel/index.d.ts +6 -0
  59. package/dist/native/carousel/public-api.d.ts +3 -0
  60. package/dist/native/carousel/public-api.d.ts.map +1 -0
  61. package/dist/native/carousel/ux4g-components-angular-native-carousel.d.ts.map +1 -0
  62. package/dist/native/carousel/ux4g-native-carousel.component.d.ts +34 -0
  63. package/dist/native/carousel/ux4g-native-carousel.component.d.ts.map +1 -0
  64. package/dist/native/carousel/ux4g-native-carousel.module.d.ts +8 -0
  65. package/dist/native/carousel/ux4g-native-carousel.module.d.ts.map +1 -0
  66. package/dist/native/chip/README.md +1541 -0
  67. package/dist/native/chip/fesm2022/ux4g-components-angular-native-chip.mjs +99 -0
  68. package/dist/native/chip/fesm2022/ux4g-components-angular-native-chip.mjs.map +1 -0
  69. package/dist/native/chip/index.d.ts +6 -0
  70. package/dist/native/chip/public-api.d.ts +3 -0
  71. package/dist/native/chip/public-api.d.ts.map +1 -0
  72. package/dist/native/chip/ux4g-components-angular-native-chip.d.ts.map +1 -0
  73. package/dist/native/chip/ux4g-native-chip.component.d.ts +34 -0
  74. package/dist/native/chip/ux4g-native-chip.component.d.ts.map +1 -0
  75. package/dist/native/chip/ux4g-native-chip.module.d.ts +8 -0
  76. package/dist/native/chip/ux4g-native-chip.module.d.ts.map +1 -0
  77. package/dist/native/combobox/README.md +1541 -0
  78. package/dist/native/combobox/fesm2022/ux4g-components-angular-native-combobox.mjs +107 -0
  79. package/dist/native/combobox/fesm2022/ux4g-components-angular-native-combobox.mjs.map +1 -0
  80. package/dist/native/combobox/index.d.ts +6 -0
  81. package/dist/native/combobox/public-api.d.ts +3 -0
  82. package/dist/native/combobox/public-api.d.ts.map +1 -0
  83. package/dist/native/combobox/ux4g-components-angular-native-combobox.d.ts.map +1 -0
  84. package/dist/native/combobox/ux4g-native-combobox.component.d.ts +30 -0
  85. package/dist/native/combobox/ux4g-native-combobox.component.d.ts.map +1 -0
  86. package/dist/native/combobox/ux4g-native-combobox.module.d.ts +8 -0
  87. package/dist/native/combobox/ux4g-native-combobox.module.d.ts.map +1 -0
  88. package/dist/native/date-picker/README.md +1541 -0
  89. package/dist/native/date-picker/fesm2022/ux4g-components-angular-native-date-picker.mjs +181 -0
  90. package/dist/native/date-picker/fesm2022/ux4g-components-angular-native-date-picker.mjs.map +1 -0
  91. package/dist/native/date-picker/index.d.ts +6 -0
  92. package/dist/native/date-picker/public-api.d.ts +3 -0
  93. package/dist/native/date-picker/public-api.d.ts.map +1 -0
  94. package/dist/native/date-picker/ux4g-components-angular-native-date-picker.d.ts.map +1 -0
  95. package/dist/native/date-picker/ux4g-native-date-picker.component.d.ts +39 -0
  96. package/dist/native/date-picker/ux4g-native-date-picker.component.d.ts.map +1 -0
  97. package/dist/native/date-picker/ux4g-native-date-picker.module.d.ts +12 -0
  98. package/dist/native/date-picker/ux4g-native-date-picker.module.d.ts.map +1 -0
  99. package/dist/native/drawer/README.md +1541 -0
  100. package/dist/native/drawer/fesm2022/ux4g-components-angular-native-drawer.mjs +159 -0
  101. package/dist/native/drawer/fesm2022/ux4g-components-angular-native-drawer.mjs.map +1 -0
  102. package/dist/native/drawer/index.d.ts +6 -0
  103. package/dist/native/drawer/public-api.d.ts +3 -0
  104. package/dist/native/drawer/public-api.d.ts.map +1 -0
  105. package/dist/native/drawer/ux4g-components-angular-native-drawer.d.ts.map +1 -0
  106. package/dist/native/drawer/ux4g-native-drawer.component.d.ts +37 -0
  107. package/dist/native/drawer/ux4g-native-drawer.component.d.ts.map +1 -0
  108. package/dist/native/drawer/ux4g-native-drawer.module.d.ts +12 -0
  109. package/dist/native/drawer/ux4g-native-drawer.module.d.ts.map +1 -0
  110. package/dist/native/dropdown/README.md +1541 -0
  111. package/dist/native/dropdown/fesm2022/ux4g-components-angular-native-dropdown.mjs +108 -0
  112. package/dist/native/dropdown/fesm2022/ux4g-components-angular-native-dropdown.mjs.map +1 -0
  113. package/dist/native/dropdown/index.d.ts +6 -0
  114. package/dist/native/dropdown/public-api.d.ts +3 -0
  115. package/dist/native/dropdown/public-api.d.ts.map +1 -0
  116. package/dist/native/dropdown/ux4g-components-angular-native-dropdown.d.ts.map +1 -0
  117. package/dist/native/dropdown/ux4g-native-dropdown.component.d.ts +32 -0
  118. package/dist/native/dropdown/ux4g-native-dropdown.component.d.ts.map +1 -0
  119. package/dist/native/dropdown/ux4g-native-dropdown.module.d.ts +8 -0
  120. package/dist/native/dropdown/ux4g-native-dropdown.module.d.ts.map +1 -0
  121. package/dist/native/file-upload/README.md +1541 -0
  122. package/dist/native/file-upload/fesm2022/ux4g-components-angular-native-file-upload.mjs +193 -0
  123. package/dist/native/file-upload/fesm2022/ux4g-components-angular-native-file-upload.mjs.map +1 -0
  124. package/dist/native/file-upload/index.d.ts +6 -0
  125. package/dist/native/file-upload/public-api.d.ts +3 -0
  126. package/dist/native/file-upload/public-api.d.ts.map +1 -0
  127. package/dist/native/file-upload/ux4g-components-angular-native-file-upload.d.ts.map +1 -0
  128. package/dist/native/file-upload/ux4g-native-file-upload.component.d.ts +40 -0
  129. package/dist/native/file-upload/ux4g-native-file-upload.component.d.ts.map +1 -0
  130. package/dist/native/file-upload/ux4g-native-file-upload.module.d.ts +8 -0
  131. package/dist/native/file-upload/ux4g-native-file-upload.module.d.ts.map +1 -0
  132. package/dist/native/modal/README.md +1541 -0
  133. package/dist/native/modal/fesm2022/ux4g-components-angular-native-modal.mjs +219 -0
  134. package/dist/native/modal/fesm2022/ux4g-components-angular-native-modal.mjs.map +1 -0
  135. package/dist/native/modal/index.d.ts +6 -0
  136. package/dist/native/modal/public-api.d.ts +3 -0
  137. package/dist/native/modal/public-api.d.ts.map +1 -0
  138. package/dist/native/modal/ux4g-components-angular-native-modal.d.ts.map +1 -0
  139. package/dist/native/modal/ux4g-native-modal.component.d.ts +42 -0
  140. package/dist/native/modal/ux4g-native-modal.component.d.ts.map +1 -0
  141. package/dist/native/modal/ux4g-native-modal.module.d.ts +12 -0
  142. package/dist/native/modal/ux4g-native-modal.module.d.ts.map +1 -0
  143. package/dist/native/otp/README.md +1541 -0
  144. package/dist/native/otp/fesm2022/ux4g-components-angular-native-otp.mjs +176 -0
  145. package/dist/native/otp/fesm2022/ux4g-components-angular-native-otp.mjs.map +1 -0
  146. package/dist/native/otp/index.d.ts +6 -0
  147. package/dist/native/otp/public-api.d.ts +3 -0
  148. package/dist/native/otp/public-api.d.ts.map +1 -0
  149. package/dist/native/otp/ux4g-components-angular-native-otp.d.ts.map +1 -0
  150. package/dist/native/otp/ux4g-native-otp.component.d.ts +32 -0
  151. package/dist/native/otp/ux4g-native-otp.component.d.ts.map +1 -0
  152. package/dist/native/otp/ux4g-native-otp.module.d.ts +8 -0
  153. package/dist/native/otp/ux4g-native-otp.module.d.ts.map +1 -0
  154. package/dist/native/popover/README.md +1541 -0
  155. package/dist/native/popover/fesm2022/ux4g-components-angular-native-popover.mjs +75 -0
  156. package/dist/native/popover/fesm2022/ux4g-components-angular-native-popover.mjs.map +1 -0
  157. package/dist/native/popover/index.d.ts +6 -0
  158. package/dist/native/popover/public-api.d.ts +3 -0
  159. package/dist/native/popover/public-api.d.ts.map +1 -0
  160. package/dist/native/popover/ux4g-components-angular-native-popover.d.ts.map +1 -0
  161. package/dist/native/popover/ux4g-native-popover.component.d.ts +29 -0
  162. package/dist/native/popover/ux4g-native-popover.component.d.ts.map +1 -0
  163. package/dist/native/popover/ux4g-native-popover.module.d.ts +8 -0
  164. package/dist/native/popover/ux4g-native-popover.module.d.ts.map +1 -0
  165. package/dist/native/progress/README.md +1541 -0
  166. package/dist/native/progress/fesm2022/ux4g-components-angular-native-progress.mjs +79 -0
  167. package/dist/native/progress/fesm2022/ux4g-components-angular-native-progress.mjs.map +1 -0
  168. package/dist/native/progress/index.d.ts +6 -0
  169. package/dist/native/progress/public-api.d.ts +3 -0
  170. package/dist/native/progress/public-api.d.ts.map +1 -0
  171. package/dist/native/progress/ux4g-components-angular-native-progress.d.ts.map +1 -0
  172. package/dist/native/progress/ux4g-native-progress.component.d.ts +29 -0
  173. package/dist/native/progress/ux4g-native-progress.component.d.ts.map +1 -0
  174. package/dist/native/progress/ux4g-native-progress.module.d.ts +8 -0
  175. package/dist/native/progress/ux4g-native-progress.module.d.ts.map +1 -0
  176. package/dist/native/search/README.md +1541 -0
  177. package/dist/native/search/fesm2022/ux4g-components-angular-native-search.mjs +148 -0
  178. package/dist/native/search/fesm2022/ux4g-components-angular-native-search.mjs.map +1 -0
  179. package/dist/native/search/index.d.ts +6 -0
  180. package/dist/native/search/public-api.d.ts +3 -0
  181. package/dist/native/search/public-api.d.ts.map +1 -0
  182. package/dist/native/search/ux4g-components-angular-native-search.d.ts.map +1 -0
  183. package/dist/native/search/ux4g-native-search.component.d.ts +46 -0
  184. package/dist/native/search/ux4g-native-search.component.d.ts.map +1 -0
  185. package/dist/native/search/ux4g-native-search.module.d.ts +8 -0
  186. package/dist/native/search/ux4g-native-search.module.d.ts.map +1 -0
  187. package/dist/native/shared/README.md +1541 -0
  188. package/dist/native/shared/base-native.component.d.ts +38 -0
  189. package/dist/native/shared/base-native.component.d.ts.map +1 -0
  190. package/dist/native/shared/fesm2022/ux4g-components-angular-native-shared.mjs +113 -0
  191. package/dist/native/shared/fesm2022/ux4g-components-angular-native-shared.mjs.map +1 -0
  192. package/dist/native/shared/index.d.ts +6 -0
  193. package/dist/native/shared/public-api.d.ts +3 -0
  194. package/dist/native/shared/public-api.d.ts.map +1 -0
  195. package/dist/native/shared/render-descriptor.d.ts +8 -0
  196. package/dist/native/shared/render-descriptor.d.ts.map +1 -0
  197. package/dist/native/shared/ux4g-components-angular-native-shared.d.ts.map +1 -0
  198. package/dist/native/stepper/README.md +1541 -0
  199. package/dist/native/stepper/fesm2022/ux4g-components-angular-native-stepper.mjs +92 -0
  200. package/dist/native/stepper/fesm2022/ux4g-components-angular-native-stepper.mjs.map +1 -0
  201. package/dist/native/stepper/index.d.ts +6 -0
  202. package/dist/native/stepper/public-api.d.ts +3 -0
  203. package/dist/native/stepper/public-api.d.ts.map +1 -0
  204. package/dist/native/stepper/ux4g-components-angular-native-stepper.d.ts.map +1 -0
  205. package/dist/native/stepper/ux4g-native-stepper.component.d.ts +35 -0
  206. package/dist/native/stepper/ux4g-native-stepper.component.d.ts.map +1 -0
  207. package/dist/native/stepper/ux4g-native-stepper.module.d.ts +8 -0
  208. package/dist/native/stepper/ux4g-native-stepper.module.d.ts.map +1 -0
  209. package/dist/native/table/README.md +1541 -0
  210. package/dist/native/table/fesm2022/ux4g-components-angular-native-table.mjs +91 -0
  211. package/dist/native/table/fesm2022/ux4g-components-angular-native-table.mjs.map +1 -0
  212. package/dist/native/table/index.d.ts +6 -0
  213. package/dist/native/table/public-api.d.ts +3 -0
  214. package/dist/native/table/public-api.d.ts.map +1 -0
  215. package/dist/native/table/ux4g-components-angular-native-table.d.ts.map +1 -0
  216. package/dist/native/table/ux4g-native-table.component.d.ts +32 -0
  217. package/dist/native/table/ux4g-native-table.component.d.ts.map +1 -0
  218. package/dist/native/table/ux4g-native-table.module.d.ts +12 -0
  219. package/dist/native/table/ux4g-native-table.module.d.ts.map +1 -0
  220. package/dist/native/tabs/README.md +1541 -0
  221. package/dist/native/tabs/fesm2022/ux4g-components-angular-native-tabs.mjs +190 -0
  222. package/dist/native/tabs/fesm2022/ux4g-components-angular-native-tabs.mjs.map +1 -0
  223. package/dist/native/tabs/index.d.ts +6 -0
  224. package/dist/native/tabs/public-api.d.ts +3 -0
  225. package/dist/native/tabs/public-api.d.ts.map +1 -0
  226. package/dist/native/tabs/ux4g-components-angular-native-tabs.d.ts.map +1 -0
  227. package/dist/native/tabs/ux4g-native-tabs.component.d.ts +43 -0
  228. package/dist/native/tabs/ux4g-native-tabs.component.d.ts.map +1 -0
  229. package/dist/native/tabs/ux4g-native-tabs.module.d.ts +12 -0
  230. package/dist/native/tabs/ux4g-native-tabs.module.d.ts.map +1 -0
  231. package/dist/native/time-picker/README.md +1541 -0
  232. package/dist/native/time-picker/fesm2022/ux4g-components-angular-native-time-picker.mjs +104 -0
  233. package/dist/native/time-picker/fesm2022/ux4g-components-angular-native-time-picker.mjs.map +1 -0
  234. package/dist/native/time-picker/index.d.ts +6 -0
  235. package/dist/native/time-picker/public-api.d.ts +3 -0
  236. package/dist/native/time-picker/public-api.d.ts.map +1 -0
  237. package/dist/native/time-picker/ux4g-components-angular-native-time-picker.d.ts.map +1 -0
  238. package/dist/native/time-picker/ux4g-native-time-picker.component.d.ts +27 -0
  239. package/dist/native/time-picker/ux4g-native-time-picker.component.d.ts.map +1 -0
  240. package/dist/native/time-picker/ux4g-native-time-picker.module.d.ts +8 -0
  241. package/dist/native/time-picker/ux4g-native-time-picker.module.d.ts.map +1 -0
  242. package/dist/native/tooltip/README.md +1541 -0
  243. package/dist/native/tooltip/fesm2022/ux4g-components-angular-native-tooltip.mjs +80 -0
  244. package/dist/native/tooltip/fesm2022/ux4g-components-angular-native-tooltip.mjs.map +1 -0
  245. package/dist/native/tooltip/index.d.ts +6 -0
  246. package/dist/native/tooltip/public-api.d.ts +3 -0
  247. package/dist/native/tooltip/public-api.d.ts.map +1 -0
  248. package/dist/native/tooltip/ux4g-components-angular-native-tooltip.d.ts.map +1 -0
  249. package/dist/native/tooltip/ux4g-native-tooltip.component.d.ts +31 -0
  250. package/dist/native/tooltip/ux4g-native-tooltip.component.d.ts.map +1 -0
  251. package/dist/native/tooltip/ux4g-native-tooltip.module.d.ts +8 -0
  252. package/dist/native/tooltip/ux4g-native-tooltip.module.d.ts.map +1 -0
  253. package/dist/navbar/README.md +330 -48
  254. package/dist/otp-input/README.md +330 -48
  255. package/dist/pagination/README.md +330 -48
  256. package/dist/popover/README.md +330 -48
  257. package/dist/progress-indicator/README.md +330 -48
  258. package/dist/radio/README.md +330 -48
  259. package/dist/result-list-row/README.md +330 -48
  260. package/dist/search/README.md +330 -48
  261. package/dist/sla-progress-indicator/README.md +330 -48
  262. package/dist/slider/README.md +330 -48
  263. package/dist/slot-grid/README.md +330 -48
  264. package/dist/social-links/README.md +330 -48
  265. package/dist/spinner/README.md +330 -48
  266. package/dist/status-pipeline/README.md +330 -48
  267. package/dist/stepper/README.md +330 -48
  268. package/dist/switch/README.md +330 -48
  269. package/dist/tab/README.md +330 -48
  270. package/dist/table/README.md +330 -48
  271. package/dist/tag/README.md +330 -48
  272. package/dist/tooltip/README.md +330 -48
  273. package/package.json +176 -3
@@ -0,0 +1,193 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, inject, NgZone, Output, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
+ import { generateFileUploadDOM } from 'ux4g-components-web/dom-generators';
4
+ import { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';
5
+
6
+ /**
7
+ * Validates a file against accept and maxSizeBytes constraints.
8
+ * Returns null if valid, or a reason string if invalid.
9
+ */
10
+ function validateFile(file, accept, maxSizeBytes) {
11
+ if (maxSizeBytes !== undefined && file.size > maxSizeBytes) {
12
+ return `File size ${file.size} bytes exceeds maximum ${maxSizeBytes} bytes`;
13
+ }
14
+ if (accept) {
15
+ const acceptedTypes = accept.split(',').map((t) => t.trim().toLowerCase());
16
+ const fileType = file.type.toLowerCase();
17
+ const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();
18
+ const isAccepted = acceptedTypes.some((accepted) => {
19
+ if (accepted === fileType)
20
+ return true;
21
+ if (accepted.endsWith('/*')) {
22
+ const category = accepted.slice(0, accepted.indexOf('/'));
23
+ return fileType.startsWith(category + '/');
24
+ }
25
+ if (accepted.startsWith('.')) {
26
+ return accepted === fileExtension;
27
+ }
28
+ return false;
29
+ });
30
+ if (!isAccepted) {
31
+ return `File type "${file.type || fileExtension}" is not accepted. Allowed: ${accept}`;
32
+ }
33
+ }
34
+ return null;
35
+ }
36
+ /**
37
+ * Angular Native FileUpload component.
38
+ * Generates the complete UX4G file upload DOM structure internally using the shared DOM Generator.
39
+ *
40
+ * Usage:
41
+ * ```html
42
+ * <ux4g-native-file-upload
43
+ * [accept]="'image/*,.pdf'"
44
+ * [maxSizeBytes]="5242880"
45
+ * [multiple]="true"
46
+ * (upload)="onUpload($event)"
47
+ * (uploadError)="onError($event)">
48
+ * </ux4g-native-file-upload>
49
+ * ```
50
+ */
51
+ class UX4GNativeFileUploadComponent extends BaseNativeComponent {
52
+ constructor() {
53
+ super(...arguments);
54
+ this.multiple = false;
55
+ this.upload = new EventEmitter();
56
+ this.uploadError = new EventEmitter();
57
+ this.ngZone = inject(NgZone);
58
+ this.files = [];
59
+ this.isDragOver = false;
60
+ }
61
+ ngOnInit() {
62
+ this.renderComponent();
63
+ this.attachEventListeners();
64
+ }
65
+ ngOnChanges(_changes) {
66
+ this.renderComponent();
67
+ }
68
+ renderComponent() {
69
+ super.renderComponent();
70
+ const props = {
71
+ files: this.files,
72
+ accept: this.accept,
73
+ maxSizeBytes: this.maxSizeBytes,
74
+ multiple: this.multiple,
75
+ };
76
+ const descriptor = generateFileUploadDOM(props);
77
+ renderDescriptorToDOM(this.renderer, descriptor, this.elementRef.nativeElement);
78
+ }
79
+ attachEventListeners() {
80
+ const hostEl = this.elementRef.nativeElement;
81
+ // Click on drop zone triggers file input
82
+ this.renderer.listen(hostEl, 'click', (event) => {
83
+ const target = event.target;
84
+ if (target.closest('.ux4g-upload-drop-zone')) {
85
+ const input = hostEl.querySelector('input[type="file"]');
86
+ if (input) {
87
+ input.click();
88
+ }
89
+ }
90
+ });
91
+ // File input change
92
+ this.renderer.listen(hostEl, 'change', (event) => {
93
+ const target = event.target;
94
+ if (target.tagName === 'INPUT' && target.type === 'file' && target.files) {
95
+ this.processFiles(target.files);
96
+ target.value = '';
97
+ }
98
+ });
99
+ // Drag and drop support
100
+ this.renderer.listen(hostEl, 'dragover', (event) => {
101
+ event.preventDefault();
102
+ event.stopPropagation();
103
+ if (!this.isDragOver) {
104
+ this.isDragOver = true;
105
+ this.renderer.addClass(hostEl, 'ux4g-upload-drag-over');
106
+ }
107
+ });
108
+ this.renderer.listen(hostEl, 'dragleave', (event) => {
109
+ event.preventDefault();
110
+ event.stopPropagation();
111
+ this.isDragOver = false;
112
+ this.renderer.removeClass(hostEl, 'ux4g-upload-drag-over');
113
+ });
114
+ this.renderer.listen(hostEl, 'drop', (event) => {
115
+ event.preventDefault();
116
+ event.stopPropagation();
117
+ this.isDragOver = false;
118
+ this.renderer.removeClass(hostEl, 'ux4g-upload-drag-over');
119
+ if (event.dataTransfer?.files && event.dataTransfer.files.length > 0) {
120
+ this.processFiles(event.dataTransfer.files);
121
+ }
122
+ });
123
+ }
124
+ processFiles(fileList) {
125
+ this.ngZone.run(() => {
126
+ const validFiles = [];
127
+ for (let i = 0; i < fileList.length; i++) {
128
+ const file = fileList[i];
129
+ const reason = validateFile(file, this.accept, this.maxSizeBytes);
130
+ if (reason) {
131
+ this.uploadError.emit({ file, reason });
132
+ }
133
+ else {
134
+ validFiles.push(file);
135
+ }
136
+ }
137
+ if (validFiles.length > 0) {
138
+ this.upload.emit(validFiles);
139
+ // Update internal file list
140
+ const newFileEntries = validFiles.map((f) => ({
141
+ name: f.name,
142
+ size: f.size,
143
+ }));
144
+ this.files = this.multiple ? [...this.files, ...newFileEntries] : newFileEntries;
145
+ this.renderComponent();
146
+ }
147
+ });
148
+ }
149
+ ngOnDestroy() {
150
+ // Cleanup handled by base class
151
+ }
152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeFileUploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
153
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: UX4GNativeFileUploadComponent, isStandalone: true, selector: "ux4g-native-file-upload", inputs: { accept: "accept", maxSizeBytes: "maxSizeBytes", multiple: "multiple" }, outputs: { upload: "upload", uploadError: "uploadError" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeFileUploadComponent, decorators: [{
156
+ type: Component,
157
+ args: [{
158
+ selector: 'ux4g-native-file-upload',
159
+ standalone: true,
160
+ template: '',
161
+ encapsulation: ViewEncapsulation.None,
162
+ }]
163
+ }], propDecorators: { accept: [{
164
+ type: Input
165
+ }], maxSizeBytes: [{
166
+ type: Input
167
+ }], multiple: [{
168
+ type: Input
169
+ }], upload: [{
170
+ type: Output
171
+ }], uploadError: [{
172
+ type: Output
173
+ }] } });
174
+
175
+ class UX4GNativeFileUploadModule {
176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
177
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeFileUploadModule, imports: [UX4GNativeFileUploadComponent], exports: [UX4GNativeFileUploadComponent] }); }
178
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeFileUploadModule }); }
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeFileUploadModule, decorators: [{
181
+ type: NgModule,
182
+ args: [{
183
+ imports: [UX4GNativeFileUploadComponent],
184
+ exports: [UX4GNativeFileUploadComponent],
185
+ }]
186
+ }] });
187
+
188
+ /**
189
+ * Generated bundle index. Do not edit.
190
+ */
191
+
192
+ export { UX4GNativeFileUploadComponent, UX4GNativeFileUploadModule };
193
+ //# sourceMappingURL=ux4g-components-angular-native-file-upload.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-components-angular-native-file-upload.mjs","sources":["../../../../src/native/file-upload/ux4g-native-file-upload.component.ts","../../../../src/native/file-upload/ux4g-native-file-upload.module.ts","../../../../src/native/file-upload/ux4g-components-angular-native-file-upload.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ViewEncapsulation,\r\n OnChanges,\r\n SimpleChanges,\r\n OnInit,\r\n NgZone,\r\n inject,\r\n} from '@angular/core';\r\nimport { generateFileUploadDOM, FileUploadGeneratorProps } from 'ux4g-components-web/dom-generators';\r\nimport { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';\r\n\r\n/**\r\n * Validates a file against accept and maxSizeBytes constraints.\r\n * Returns null if valid, or a reason string if invalid.\r\n */\r\nfunction validateFile(\r\n file: File,\r\n accept?: string,\r\n maxSizeBytes?: number\r\n): string | null {\r\n if (maxSizeBytes !== undefined && file.size > maxSizeBytes) {\r\n return `File size ${file.size} bytes exceeds maximum ${maxSizeBytes} bytes`;\r\n }\r\n\r\n if (accept) {\r\n const acceptedTypes = accept.split(',').map((t) => t.trim().toLowerCase());\r\n const fileType = file.type.toLowerCase();\r\n const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();\r\n\r\n const isAccepted = acceptedTypes.some((accepted) => {\r\n if (accepted === fileType) return true;\r\n if (accepted.endsWith('/*')) {\r\n const category = accepted.slice(0, accepted.indexOf('/'));\r\n return fileType.startsWith(category + '/');\r\n }\r\n if (accepted.startsWith('.')) {\r\n return accepted === fileExtension;\r\n }\r\n return false;\r\n });\r\n\r\n if (!isAccepted) {\r\n return `File type \"${file.type || fileExtension}\" is not accepted. Allowed: ${accept}`;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Angular Native FileUpload component.\r\n * Generates the complete UX4G file upload DOM structure internally using the shared DOM Generator.\r\n *\r\n * Usage:\r\n * ```html\r\n * <ux4g-native-file-upload\r\n * [accept]=\"'image/*,.pdf'\"\r\n * [maxSizeBytes]=\"5242880\"\r\n * [multiple]=\"true\"\r\n * (upload)=\"onUpload($event)\"\r\n * (uploadError)=\"onError($event)\">\r\n * </ux4g-native-file-upload>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'ux4g-native-file-upload',\r\n standalone: true,\r\n template: '',\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class UX4GNativeFileUploadComponent extends BaseNativeComponent implements OnChanges, OnInit {\r\n @Input() accept?: string;\r\n @Input() maxSizeBytes?: number;\r\n @Input() multiple: boolean = false;\r\n\r\n @Output() upload = new EventEmitter<File[]>();\r\n @Output() uploadError = new EventEmitter<{ file: File; reason: string }>();\r\n\r\n private ngZone = inject(NgZone);\r\n private files: Array<{ name: string; size: number }> = [];\r\n private isDragOver = false;\r\n\r\n ngOnInit(): void {\r\n this.renderComponent();\r\n this.attachEventListeners();\r\n }\r\n\r\n ngOnChanges(_changes: SimpleChanges): void {\r\n this.renderComponent();\r\n }\r\n\r\n protected override renderComponent(): void {\r\n super.renderComponent();\r\n\r\n const props: FileUploadGeneratorProps = {\r\n files: this.files,\r\n accept: this.accept,\r\n maxSizeBytes: this.maxSizeBytes,\r\n multiple: this.multiple,\r\n };\r\n\r\n const descriptor = generateFileUploadDOM(props);\r\n renderDescriptorToDOM(this.renderer, descriptor, this.elementRef.nativeElement);\r\n }\r\n\r\n private attachEventListeners(): void {\r\n const hostEl = this.elementRef.nativeElement;\r\n\r\n // Click on drop zone triggers file input\r\n this.renderer.listen(hostEl, 'click', (event: Event) => {\r\n const target = event.target as HTMLElement;\r\n if (target.closest('.ux4g-upload-drop-zone')) {\r\n const input = hostEl.querySelector('input[type=\"file\"]') as HTMLInputElement;\r\n if (input) {\r\n input.click();\r\n }\r\n }\r\n });\r\n\r\n // File input change\r\n this.renderer.listen(hostEl, 'change', (event: Event) => {\r\n const target = event.target as HTMLInputElement;\r\n if (target.tagName === 'INPUT' && target.type === 'file' && target.files) {\r\n this.processFiles(target.files);\r\n target.value = '';\r\n }\r\n });\r\n\r\n // Drag and drop support\r\n this.renderer.listen(hostEl, 'dragover', (event: DragEvent) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (!this.isDragOver) {\r\n this.isDragOver = true;\r\n this.renderer.addClass(hostEl, 'ux4g-upload-drag-over');\r\n }\r\n });\r\n\r\n this.renderer.listen(hostEl, 'dragleave', (event: DragEvent) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = false;\r\n this.renderer.removeClass(hostEl, 'ux4g-upload-drag-over');\r\n });\r\n\r\n this.renderer.listen(hostEl, 'drop', (event: DragEvent) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = false;\r\n this.renderer.removeClass(hostEl, 'ux4g-upload-drag-over');\r\n\r\n if (event.dataTransfer?.files && event.dataTransfer.files.length > 0) {\r\n this.processFiles(event.dataTransfer.files);\r\n }\r\n });\r\n }\r\n\r\n private processFiles(fileList: FileList): void {\r\n this.ngZone.run(() => {\r\n const validFiles: File[] = [];\r\n\r\n for (let i = 0; i < fileList.length; i++) {\r\n const file = fileList[i];\r\n const reason = validateFile(file, this.accept, this.maxSizeBytes);\r\n\r\n if (reason) {\r\n this.uploadError.emit({ file, reason });\r\n } else {\r\n validFiles.push(file);\r\n }\r\n }\r\n\r\n if (validFiles.length > 0) {\r\n this.upload.emit(validFiles);\r\n\r\n // Update internal file list\r\n const newFileEntries = validFiles.map((f) => ({\r\n name: f.name,\r\n size: f.size,\r\n }));\r\n this.files = this.multiple ? [...this.files, ...newFileEntries] : newFileEntries;\r\n this.renderComponent();\r\n }\r\n });\r\n }\r\n\r\n override ngOnDestroy(): void {\r\n // Cleanup handled by base class\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UX4GNativeFileUploadComponent } from './ux4g-native-file-upload.component';\r\n\r\n@NgModule({\r\n imports: [UX4GNativeFileUploadComponent],\r\n exports: [UX4GNativeFileUploadComponent],\r\n})\r\nexport class UX4GNativeFileUploadModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAeA;;;AAGG;AACH,SAAS,YAAY,CACnB,IAAU,EACV,MAAe,EACf,YAAqB,EAAA;IAErB,IAAI,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,GAAG,YAAY,EAAE;AAC1D,QAAA,OAAO,aAAa,IAAI,CAAC,IAAI,CAAA,uBAAA,EAA0B,YAAY,QAAQ;IAC7E;IAEA,IAAI,MAAM,EAAE;QACV,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC1E,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;AACxC,QAAA,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAA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A6B,4QAH9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAGD,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,EAAE;oBACZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACtC,iBAAA;8BAEU,MAAM,EAAA,CAAA;sBAAd;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBAES,MAAM,EAAA,CAAA;sBAAf;gBACS,WAAW,EAAA,CAAA;sBAApB;;;MCzEU,0BAA0B,CAAA;+GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAA1B,0BAA0B,EAAA,OAAA,EAAA,CAH3B,6BAA6B,CAAA,EAAA,OAAA,EAAA,CAC7B,6BAA6B,CAAA,EAAA,CAAA,CAAA;gHAE5B,0BAA0B,EAAA,CAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,6BAA6B,CAAC;oBACxC,OAAO,EAAE,CAAC,6BAA6B,CAAC;AACzC,iBAAA;;;ACND;;AAEG;;;;"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ux4g-components-angular" />
5
+ export * from './public-api';
6
+ //# sourceMappingURL=ux4g-components-angular-native-file-upload.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { UX4GNativeFileUploadComponent } from './ux4g-native-file-upload.component';
2
+ export { UX4GNativeFileUploadModule } from './ux4g-native-file-upload.module';
3
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../src/native/file-upload/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-components-angular-native-file-upload.d.ts","sourceRoot":"","sources":["../../../src/native/file-upload/ux4g-components-angular-native-file-upload.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges, OnInit } from '@angular/core';
2
+ import { BaseNativeComponent } from '@ux4g-native-shared';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular Native FileUpload component.
6
+ * Generates the complete UX4G file upload DOM structure internally using the shared DOM Generator.
7
+ *
8
+ * Usage:
9
+ * ```html
10
+ * <ux4g-native-file-upload
11
+ * [accept]="'image/*,.pdf'"
12
+ * [maxSizeBytes]="5242880"
13
+ * [multiple]="true"
14
+ * (upload)="onUpload($event)"
15
+ * (uploadError)="onError($event)">
16
+ * </ux4g-native-file-upload>
17
+ * ```
18
+ */
19
+ export declare class UX4GNativeFileUploadComponent extends BaseNativeComponent implements OnChanges, OnInit {
20
+ accept?: string;
21
+ maxSizeBytes?: number;
22
+ multiple: boolean;
23
+ upload: EventEmitter<File[]>;
24
+ uploadError: EventEmitter<{
25
+ file: File;
26
+ reason: string;
27
+ }>;
28
+ private ngZone;
29
+ private files;
30
+ private isDragOver;
31
+ ngOnInit(): void;
32
+ ngOnChanges(_changes: SimpleChanges): void;
33
+ protected renderComponent(): void;
34
+ private attachEventListeners;
35
+ private processFiles;
36
+ ngOnDestroy(): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeFileUploadComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<UX4GNativeFileUploadComponent, "ux4g-native-file-upload", never, { "accept": { "alias": "accept"; "required": false; }; "maxSizeBytes": { "alias": "maxSizeBytes"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; }, { "upload": "upload"; "uploadError": "uploadError"; }, never, never, true, never>;
39
+ }
40
+ //# sourceMappingURL=ux4g-native-file-upload.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-native-file-upload.component.d.ts","sourceRoot":"","sources":["../../../src/native/file-upload/ux4g-native-file-upload.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,SAAS,EACT,aAAa,EACb,MAAM,EAGP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAyB,MAAM,qBAAqB,CAAC;;AAwCjF;;;;;;;;;;;;;;GAcG;AACH,qBAMa,6BAA8B,SAAQ,mBAAoB,YAAW,SAAS,EAAE,MAAM;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAS;IAEzB,MAAM,uBAA8B;IACpC,WAAW;cAA4B,IAAI;gBAAU,MAAM;OAAM;IAE3E,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,KAAK,CAA6C;IAC1D,OAAO,CAAC,UAAU,CAAS;IAE3B,QAAQ,IAAI,IAAI;IAKhB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;cAIvB,eAAe,IAAI,IAAI;IAc1C,OAAO,CAAC,oBAAoB;IAoD5B,OAAO,CAAC,YAAY;IA6BX,WAAW,IAAI,IAAI;yCApHjB,6BAA6B;2CAA7B,6BAA6B;CAuHzC"}
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ux4g-native-file-upload.component";
3
+ export declare class UX4GNativeFileUploadModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeFileUploadModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UX4GNativeFileUploadModule, never, [typeof i1.UX4GNativeFileUploadComponent], [typeof i1.UX4GNativeFileUploadComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<UX4GNativeFileUploadModule>;
7
+ }
8
+ //# sourceMappingURL=ux4g-native-file-upload.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-native-file-upload.module.d.ts","sourceRoot":"","sources":["../../../src/native/file-upload/ux4g-native-file-upload.module.ts"],"names":[],"mappings":";;AAGA,qBAIa,0BAA0B;yCAA1B,0BAA0B;0CAA1B,0BAA0B;0CAA1B,0BAA0B;CAAG"}