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,219 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, inject, NgZone, Output, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
+ import { generateModalDOM } from 'ux4g-components-web/dom-generators';
4
+ import { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';
5
+
6
+ const FOCUSABLE_SELECTORS = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
7
+ /**
8
+ * UX4GNativeModalComponent — Angular Native Wrapper for the UX4G Modal component.
9
+ *
10
+ * Generates the complete modal DOM structure via generateModalDOM(),
11
+ * including backdrop, dialog box with role="dialog" and aria-modal="true",
12
+ * close button with data-ux4g-modal-close, and focus trap.
13
+ *
14
+ * Usage:
15
+ * ```html
16
+ * <ux4g-native-modal [open]="isOpen" [title]="'Dialog'" (closeEvent)="onClose()">
17
+ * <p>Modal content goes here</p>
18
+ * </ux4g-native-modal>
19
+ * ```
20
+ */
21
+ class UX4GNativeModalComponent extends BaseNativeComponent {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.open = false;
25
+ this.size = 'm';
26
+ this.closable = true;
27
+ this.backdropOpacity = '50';
28
+ this.backdropBlur = false;
29
+ this.closeEvent = new EventEmitter();
30
+ this.ngZone = inject(NgZone);
31
+ this.previousFocus = null;
32
+ this.keydownHandler = null;
33
+ this.clickHandler = null;
34
+ }
35
+ ngAfterViewInit() {
36
+ if (this.open) {
37
+ this.renderComponent();
38
+ this.activateFocusTrap();
39
+ }
40
+ }
41
+ ngOnChanges(changes) {
42
+ if (changes['open']) {
43
+ if (this.open) {
44
+ this.renderComponent();
45
+ this.activateFocusTrap();
46
+ }
47
+ else {
48
+ this.deactivateFocusTrap();
49
+ this.clearHost();
50
+ this.restoreFocus();
51
+ }
52
+ }
53
+ else if (this.open) {
54
+ // Other inputs changed while open — re-render
55
+ this.renderComponent();
56
+ }
57
+ }
58
+ renderComponent() {
59
+ // Clear existing children (but leave ng-content slot alone by clearing manually)
60
+ const hostEl = this.elementRef.nativeElement;
61
+ // Remove all children that are NOT projected content (ng-content)
62
+ // We prepend the generated modal DOM before ng-content
63
+ this.clearHost();
64
+ if (!this.open)
65
+ return;
66
+ const props = {
67
+ open: this.open,
68
+ size: this.size,
69
+ title: this.title,
70
+ closable: this.closable,
71
+ backdropOpacity: this.backdropOpacity,
72
+ backdropBlur: this.backdropBlur,
73
+ };
74
+ const descriptor = generateModalDOM(props);
75
+ // Render the descriptor tree into the host element
76
+ renderDescriptorToDOM(this.renderer, descriptor, hostEl);
77
+ }
78
+ ngOnDestroy() {
79
+ this.deactivateFocusTrap();
80
+ super.ngOnDestroy();
81
+ }
82
+ clearHost() {
83
+ const hostEl = this.elementRef.nativeElement;
84
+ while (hostEl.firstChild) {
85
+ this.renderer.removeChild(hostEl, hostEl.firstChild);
86
+ }
87
+ }
88
+ activateFocusTrap() {
89
+ // Store current focus to restore later
90
+ if (typeof document !== 'undefined') {
91
+ this.previousFocus = document.activeElement;
92
+ }
93
+ // Set up keyboard handler for focus trapping and Escape close
94
+ this.keydownHandler = (e) => {
95
+ if (e.key === 'Escape' && this.closable) {
96
+ this.ngZone.run(() => this.closeEvent.emit());
97
+ return;
98
+ }
99
+ if (e.key === 'Tab') {
100
+ const hostEl = this.elementRef.nativeElement;
101
+ const focusableElements = Array.from(hostEl.querySelectorAll(FOCUSABLE_SELECTORS));
102
+ if (focusableElements.length === 0) {
103
+ e.preventDefault();
104
+ return;
105
+ }
106
+ const firstFocusable = focusableElements[0];
107
+ const lastFocusable = focusableElements[focusableElements.length - 1];
108
+ if (e.shiftKey) {
109
+ if (document.activeElement === firstFocusable) {
110
+ e.preventDefault();
111
+ lastFocusable.focus();
112
+ }
113
+ }
114
+ else {
115
+ if (document.activeElement === lastFocusable) {
116
+ e.preventDefault();
117
+ firstFocusable.focus();
118
+ }
119
+ }
120
+ }
121
+ };
122
+ // Set up click handler for close button and backdrop clicks
123
+ this.clickHandler = (e) => {
124
+ const target = e.target;
125
+ // Close button click
126
+ if (target.hasAttribute('data-ux4g-modal-close')) {
127
+ this.ngZone.run(() => this.closeEvent.emit());
128
+ return;
129
+ }
130
+ // Backdrop click
131
+ if (target.classList.contains('ux4g-modal-backdrop')) {
132
+ this.ngZone.run(() => this.closeEvent.emit());
133
+ }
134
+ };
135
+ if (typeof document !== 'undefined') {
136
+ document.addEventListener('keydown', this.keydownHandler);
137
+ this.elementRef.nativeElement.addEventListener('click', this.clickHandler);
138
+ }
139
+ // Focus the first focusable element inside the modal
140
+ setTimeout(() => {
141
+ const hostEl = this.elementRef.nativeElement;
142
+ const firstFocusable = hostEl.querySelector(FOCUSABLE_SELECTORS);
143
+ if (firstFocusable) {
144
+ firstFocusable.focus();
145
+ }
146
+ else {
147
+ hostEl.setAttribute('tabindex', '-1');
148
+ hostEl.focus();
149
+ }
150
+ }, 0);
151
+ }
152
+ deactivateFocusTrap() {
153
+ if (typeof document !== 'undefined') {
154
+ if (this.keydownHandler) {
155
+ document.removeEventListener('keydown', this.keydownHandler);
156
+ this.keydownHandler = null;
157
+ }
158
+ if (this.clickHandler) {
159
+ this.elementRef.nativeElement.removeEventListener('click', this.clickHandler);
160
+ this.clickHandler = null;
161
+ }
162
+ }
163
+ }
164
+ restoreFocus() {
165
+ if (this.previousFocus) {
166
+ this.previousFocus.focus();
167
+ this.previousFocus = null;
168
+ }
169
+ }
170
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
171
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: UX4GNativeModalComponent, isStandalone: true, selector: "ux4g-native-modal", inputs: { open: "open", size: "size", title: "title", closable: "closable", backdropOpacity: "backdropOpacity", backdropBlur: "backdropBlur" }, outputs: { closeEvent: "closeEvent" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
172
+ }
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeModalComponent, decorators: [{
174
+ type: Component,
175
+ args: [{
176
+ selector: 'ux4g-native-modal',
177
+ standalone: true,
178
+ template: `<ng-content></ng-content>`,
179
+ encapsulation: ViewEncapsulation.None,
180
+ }]
181
+ }], propDecorators: { open: [{
182
+ type: Input
183
+ }], size: [{
184
+ type: Input
185
+ }], title: [{
186
+ type: Input
187
+ }], closable: [{
188
+ type: Input
189
+ }], backdropOpacity: [{
190
+ type: Input
191
+ }], backdropBlur: [{
192
+ type: Input
193
+ }], closeEvent: [{
194
+ type: Output
195
+ }] } });
196
+
197
+ /**
198
+ * NgModule for backward compatibility with module-based Angular applications.
199
+ * For standalone components (Angular 17+), import UX4GNativeModalComponent directly.
200
+ */
201
+ class UX4GNativeModalModule {
202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
203
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeModalModule, imports: [UX4GNativeModalComponent], exports: [UX4GNativeModalComponent] }); }
204
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeModalModule }); }
205
+ }
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeModalModule, decorators: [{
207
+ type: NgModule,
208
+ args: [{
209
+ imports: [UX4GNativeModalComponent],
210
+ exports: [UX4GNativeModalComponent],
211
+ }]
212
+ }] });
213
+
214
+ /**
215
+ * Generated bundle index. Do not edit.
216
+ */
217
+
218
+ export { UX4GNativeModalComponent, UX4GNativeModalModule };
219
+ //# sourceMappingURL=ux4g-components-angular-native-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-components-angular-native-modal.mjs","sources":["../../../../src/native/modal/ux4g-native-modal.component.ts","../../../../src/native/modal/ux4g-native-modal.module.ts","../../../../src/native/modal/ux4g-components-angular-native-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ViewEncapsulation,\r\n OnChanges,\r\n OnDestroy,\r\n AfterViewInit,\r\n SimpleChanges,\r\n NgZone,\r\n inject,\r\n} from '@angular/core';\r\nimport { generateModalDOM, ModalGeneratorProps } from 'ux4g-components-web/dom-generators';\r\nimport { ModalSize, ModalOpacity } from 'ux4g-components-web/types';\r\nimport { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';\r\n\r\nconst FOCUSABLE_SELECTORS =\r\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\r\n\r\n/**\r\n * UX4GNativeModalComponent — Angular Native Wrapper for the UX4G Modal component.\r\n *\r\n * Generates the complete modal DOM structure via generateModalDOM(),\r\n * including backdrop, dialog box with role=\"dialog\" and aria-modal=\"true\",\r\n * close button with data-ux4g-modal-close, and focus trap.\r\n *\r\n * Usage:\r\n * ```html\r\n * <ux4g-native-modal [open]=\"isOpen\" [title]=\"'Dialog'\" (closeEvent)=\"onClose()\">\r\n * <p>Modal content goes here</p>\r\n * </ux4g-native-modal>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'ux4g-native-modal',\r\n standalone: true,\r\n template: `<ng-content></ng-content>`,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class UX4GNativeModalComponent\r\n extends BaseNativeComponent\r\n implements OnChanges, OnDestroy, AfterViewInit\r\n{\r\n @Input() open: boolean = false;\r\n @Input() size: ModalSize = 'm';\r\n @Input() title: string | undefined;\r\n @Input() closable: boolean = true;\r\n @Input() backdropOpacity: ModalOpacity = '50';\r\n @Input() backdropBlur: boolean = false;\r\n\r\n @Output() closeEvent = new EventEmitter<void>();\r\n\r\n private ngZone = inject(NgZone);\r\n private previousFocus: HTMLElement | null = null;\r\n private keydownHandler: ((e: KeyboardEvent) => void) | null = null;\r\n private clickHandler: ((e: MouseEvent) => void) | null = null;\r\n\r\n ngAfterViewInit(): void {\r\n if (this.open) {\r\n this.renderComponent();\r\n this.activateFocusTrap();\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['open']) {\r\n if (this.open) {\r\n this.renderComponent();\r\n this.activateFocusTrap();\r\n } else {\r\n this.deactivateFocusTrap();\r\n this.clearHost();\r\n this.restoreFocus();\r\n }\r\n } else if (this.open) {\r\n // Other inputs changed while open — re-render\r\n this.renderComponent();\r\n }\r\n }\r\n\r\n override renderComponent(): void {\r\n // Clear existing children (but leave ng-content slot alone by clearing manually)\r\n const hostEl = this.elementRef.nativeElement as HTMLElement;\r\n // Remove all children that are NOT projected content (ng-content)\r\n // We prepend the generated modal DOM before ng-content\r\n this.clearHost();\r\n\r\n if (!this.open) return;\r\n\r\n const props: ModalGeneratorProps = {\r\n open: this.open,\r\n size: this.size,\r\n title: this.title,\r\n closable: this.closable,\r\n backdropOpacity: this.backdropOpacity,\r\n backdropBlur: this.backdropBlur,\r\n };\r\n\r\n const descriptor = generateModalDOM(props);\r\n\r\n // Render the descriptor tree into the host element\r\n renderDescriptorToDOM(this.renderer, descriptor, hostEl);\r\n }\r\n\r\n override ngOnDestroy(): void {\r\n this.deactivateFocusTrap();\r\n super.ngOnDestroy();\r\n }\r\n\r\n private clearHost(): void {\r\n const hostEl = this.elementRef.nativeElement;\r\n while (hostEl.firstChild) {\r\n this.renderer.removeChild(hostEl, hostEl.firstChild);\r\n }\r\n }\r\n\r\n private activateFocusTrap(): void {\r\n // Store current focus to restore later\r\n if (typeof document !== 'undefined') {\r\n this.previousFocus = document.activeElement as HTMLElement;\r\n }\r\n\r\n // Set up keyboard handler for focus trapping and Escape close\r\n this.keydownHandler = (e: KeyboardEvent) => {\r\n if (e.key === 'Escape' && this.closable) {\r\n this.ngZone.run(() => this.closeEvent.emit());\r\n return;\r\n }\r\n\r\n if (e.key === 'Tab') {\r\n const hostEl = this.elementRef.nativeElement as HTMLElement;\r\n const focusableElements = Array.from(\r\n hostEl.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTORS)\r\n );\r\n\r\n if (focusableElements.length === 0) {\r\n e.preventDefault();\r\n return;\r\n }\r\n\r\n const firstFocusable = focusableElements[0];\r\n const lastFocusable = focusableElements[focusableElements.length - 1];\r\n\r\n if (e.shiftKey) {\r\n if (document.activeElement === firstFocusable) {\r\n e.preventDefault();\r\n lastFocusable.focus();\r\n }\r\n } else {\r\n if (document.activeElement === lastFocusable) {\r\n e.preventDefault();\r\n firstFocusable.focus();\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Set up click handler for close button and backdrop clicks\r\n this.clickHandler = (e: MouseEvent) => {\r\n const target = e.target as HTMLElement;\r\n\r\n // Close button click\r\n if (target.hasAttribute('data-ux4g-modal-close')) {\r\n this.ngZone.run(() => this.closeEvent.emit());\r\n return;\r\n }\r\n\r\n // Backdrop click\r\n if (target.classList.contains('ux4g-modal-backdrop')) {\r\n this.ngZone.run(() => this.closeEvent.emit());\r\n }\r\n };\r\n\r\n if (typeof document !== 'undefined') {\r\n document.addEventListener('keydown', this.keydownHandler);\r\n this.elementRef.nativeElement.addEventListener('click', this.clickHandler);\r\n }\r\n\r\n // Focus the first focusable element inside the modal\r\n setTimeout(() => {\r\n const hostEl = this.elementRef.nativeElement as HTMLElement;\r\n const firstFocusable = hostEl.querySelector<HTMLElement>(FOCUSABLE_SELECTORS);\r\n if (firstFocusable) {\r\n firstFocusable.focus();\r\n } else {\r\n hostEl.setAttribute('tabindex', '-1');\r\n hostEl.focus();\r\n }\r\n }, 0);\r\n }\r\n\r\n private deactivateFocusTrap(): void {\r\n if (typeof document !== 'undefined') {\r\n if (this.keydownHandler) {\r\n document.removeEventListener('keydown', this.keydownHandler);\r\n this.keydownHandler = null;\r\n }\r\n if (this.clickHandler) {\r\n this.elementRef.nativeElement.removeEventListener('click', this.clickHandler);\r\n this.clickHandler = null;\r\n }\r\n }\r\n }\r\n\r\n private restoreFocus(): void {\r\n if (this.previousFocus) {\r\n this.previousFocus.focus();\r\n this.previousFocus = null;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UX4GNativeModalComponent } from './ux4g-native-modal.component';\r\n\r\n/**\r\n * NgModule for backward compatibility with module-based Angular applications.\r\n * For standalone components (Angular 17+), import UX4GNativeModalComponent directly.\r\n */\r\n@NgModule({\r\n imports: [UX4GNativeModalComponent],\r\n exports: [UX4GNativeModalComponent],\r\n})\r\nexport class UX4GNativeModalModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAiBA,MAAM,mBAAmB,GACvB,2IAA2I;AAE7I;;;;;;;;;;;;;AAaG;AAOG,MAAO,wBACX,SAAQ,mBAAmB,CAAA;AAP7B,IAAA,WAAA,GAAA;;QAUW,IAAA,CAAA,IAAI,GAAY,KAAK;QACrB,IAAA,CAAA,IAAI,GAAc,GAAG;QAErB,IAAA,CAAA,QAAQ,GAAY,IAAI;QACxB,IAAA,CAAA,eAAe,GAAiB,IAAI;QACpC,IAAA,CAAA,YAAY,GAAY,KAAK;AAE5B,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAQ;AAEvC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACvB,IAAA,CAAA,aAAa,GAAuB,IAAI;QACxC,IAAA,CAAA,cAAc,GAAwC,IAAI;QAC1D,IAAA,CAAA,YAAY,GAAqC,IAAI;AA2J9D,IAAA;IAzJC,eAAe,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,eAAe,EAAE;YACtB,IAAI,CAAC,iBAAiB,EAAE;QAC1B;IACF;AAEA,IAAA,WAAW,CAAC,OAAsB,EAAA;AAChC,QAAA,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;AACnB,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,IAAI,CAAC,eAAe,EAAE;gBACtB,IAAI,CAAC,iBAAiB,EAAE;YAC1B;iBAAO;gBACL,IAAI,CAAC,mBAAmB,EAAE;gB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A,CAAA,CAAA;gHAEvB,qBAAqB,EAAA,CAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,wBAAwB,CAAC;oBACnC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;ACVD;;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-modal.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { UX4GNativeModalComponent } from './ux4g-native-modal.component';
2
+ export { UX4GNativeModalModule } from './ux4g-native-modal.module';
3
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../src/native/modal/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-components-angular-native-modal.d.ts","sourceRoot":"","sources":["../../../src/native/modal/ux4g-components-angular-native-modal.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { EventEmitter, OnChanges, OnDestroy, AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { ModalSize, ModalOpacity } from 'ux4g-components-web/types';
3
+ import { BaseNativeComponent } from '@ux4g-native-shared';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * UX4GNativeModalComponent — Angular Native Wrapper for the UX4G Modal component.
7
+ *
8
+ * Generates the complete modal DOM structure via generateModalDOM(),
9
+ * including backdrop, dialog box with role="dialog" and aria-modal="true",
10
+ * close button with data-ux4g-modal-close, and focus trap.
11
+ *
12
+ * Usage:
13
+ * ```html
14
+ * <ux4g-native-modal [open]="isOpen" [title]="'Dialog'" (closeEvent)="onClose()">
15
+ * <p>Modal content goes here</p>
16
+ * </ux4g-native-modal>
17
+ * ```
18
+ */
19
+ export declare class UX4GNativeModalComponent extends BaseNativeComponent implements OnChanges, OnDestroy, AfterViewInit {
20
+ open: boolean;
21
+ size: ModalSize;
22
+ title: string | undefined;
23
+ closable: boolean;
24
+ backdropOpacity: ModalOpacity;
25
+ backdropBlur: boolean;
26
+ closeEvent: EventEmitter<void>;
27
+ private ngZone;
28
+ private previousFocus;
29
+ private keydownHandler;
30
+ private clickHandler;
31
+ ngAfterViewInit(): void;
32
+ ngOnChanges(changes: SimpleChanges): void;
33
+ renderComponent(): void;
34
+ ngOnDestroy(): void;
35
+ private clearHost;
36
+ private activateFocusTrap;
37
+ private deactivateFocusTrap;
38
+ private restoreFocus;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeModalComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<UX4GNativeModalComponent, "ux4g-native-modal", never, { "open": { "alias": "open"; "required": false; }; "size": { "alias": "size"; "required": false; }; "title": { "alias": "title"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "backdropOpacity": { "alias": "backdropOpacity"; "required": false; }; "backdropBlur": { "alias": "backdropBlur"; "required": false; }; }, { "closeEvent": "closeEvent"; }, never, ["*"], true, never>;
41
+ }
42
+ //# sourceMappingURL=ux4g-native-modal.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-native-modal.component.d.ts","sourceRoot":"","sources":["../../../src/native/modal/ux4g-native-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,SAAS,EACT,SAAS,EACT,aAAa,EACb,aAAa,EAGd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAyB,MAAM,qBAAqB,CAAC;;AAKjF;;;;;;;;;;;;;GAaG;AACH,qBAMa,wBACX,SAAQ,mBACR,YAAW,SAAS,EAAE,SAAS,EAAE,aAAa;IAErC,IAAI,EAAE,OAAO,CAAS;IACtB,IAAI,EAAE,SAAS,CAAO;IACtB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAQ;IACzB,eAAe,EAAE,YAAY,CAAQ;IACrC,YAAY,EAAE,OAAO,CAAS;IAE7B,UAAU,qBAA4B;IAEhD,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,cAAc,CAA6C;IACnE,OAAO,CAAC,YAAY,CAA0C;IAE9D,eAAe,IAAI,IAAI;IAOvB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAgBhC,eAAe,IAAI,IAAI;IAwBvB,WAAW,IAAI,IAAI;IAK5B,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,iBAAiB;IA2EzB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,YAAY;yCArKT,wBAAwB;2CAAxB,wBAAwB;CA2KpC"}
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ux4g-native-modal.component";
3
+ /**
4
+ * NgModule for backward compatibility with module-based Angular applications.
5
+ * For standalone components (Angular 17+), import UX4GNativeModalComponent directly.
6
+ */
7
+ export declare class UX4GNativeModalModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeModalModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UX4GNativeModalModule, never, [typeof i1.UX4GNativeModalComponent], [typeof i1.UX4GNativeModalComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<UX4GNativeModalModule>;
11
+ }
12
+ //# sourceMappingURL=ux4g-native-modal.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-native-modal.module.d.ts","sourceRoot":"","sources":["../../../src/native/modal/ux4g-native-modal.module.ts"],"names":[],"mappings":";;AAGA;;;GAGG;AACH,qBAIa,qBAAqB;yCAArB,qBAAqB;0CAArB,qBAAqB;0CAArB,qBAAqB;CAAG"}