@aquera/nile-elements 1.4.5 → 1.4.7

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 (265) hide show
  1. package/README.md +9 -0
  2. package/demo/nxtgen.css +1 -0
  3. package/demo/variables.css +2 -0
  4. package/dist/directive-7733ffce.cjs.js +6 -0
  5. package/dist/directive-7733ffce.cjs.js.map +1 -0
  6. package/dist/directive-ee0c609c.esm.js +6 -0
  7. package/dist/{fixture-1c49c014.cjs.js → fixture-958445f8.cjs.js} +2 -2
  8. package/dist/{fixture-1c49c014.cjs.js.map → fixture-958445f8.cjs.js.map} +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.js +261 -256
  12. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  13. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  14. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  15. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  16. package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -1
  17. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  18. package/dist/nile-badge/index.cjs.js +1 -1
  19. package/dist/nile-badge/index.esm.js +1 -1
  20. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  21. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  22. package/dist/nile-badge/nile-badge.esm.js +1 -1
  23. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  24. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
  25. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  26. package/dist/nile-button/index.cjs.js +1 -1
  27. package/dist/nile-button/index.esm.js +1 -1
  28. package/dist/nile-button/nile-button.cjs.js +1 -1
  29. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  30. package/dist/nile-button/nile-button.esm.js +1 -1
  31. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  32. package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
  33. package/dist/nile-button/nile-button.test.esm.js +1 -1
  34. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  35. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  36. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  37. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  38. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  39. package/dist/nile-carousel/index.cjs.js +1 -1
  40. package/dist/nile-carousel/index.esm.js +1 -1
  41. package/dist/nile-carousel/nile-carousel.cjs.js +1 -1
  42. package/dist/nile-carousel/nile-carousel.cjs.js.map +1 -1
  43. package/dist/nile-carousel/nile-carousel.esm.js +1 -1
  44. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  45. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  46. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  47. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  48. package/dist/nile-dialog/index.cjs.js +1 -1
  49. package/dist/nile-dialog/index.esm.js +1 -1
  50. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  51. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  52. package/dist/nile-dialog/nile-dialog.esm.js +1 -1
  53. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  54. package/dist/nile-dialog/nile-dialog.test.cjs.js.map +1 -1
  55. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  56. package/dist/nile-drawer/index.cjs.js +1 -1
  57. package/dist/nile-drawer/index.esm.js +1 -1
  58. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  59. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  60. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  61. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  62. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
  63. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  64. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  65. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  66. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  67. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
  68. package/dist/nile-file-upload/index.cjs.js +1 -1
  69. package/dist/nile-file-upload/index.esm.js +1 -1
  70. package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
  71. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -1
  72. package/dist/nile-file-upload/nile-file-upload.esm.js +2 -2
  73. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +2 -6
  74. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +1 -1
  75. package/dist/nile-file-upload/nile-file-upload.template.esm.js +28 -33
  76. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
  77. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +1 -1
  78. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
  79. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  80. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  81. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  82. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  83. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  84. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  85. package/dist/nile-icon/icons/svg/ng-layers-three-02.cjs.js +2 -0
  86. package/dist/nile-icon/icons/svg/ng-layers-three-02.cjs.js.map +1 -0
  87. package/dist/nile-icon/icons/svg/ng-layers-three-02.esm.js +1 -0
  88. package/dist/nile-icon/icons/svg/ng-shopping-bag-01.cjs.js +2 -0
  89. package/dist/nile-icon/icons/svg/ng-shopping-bag-01.cjs.js.map +1 -0
  90. package/dist/nile-icon/icons/svg/ng-shopping-bag-01.esm.js +1 -0
  91. package/dist/nile-icon/icons/svg/ng-switch-horizontal-01.cjs.js +2 -0
  92. package/dist/nile-icon/icons/svg/ng-switch-horizontal-01.cjs.js.map +1 -0
  93. package/dist/nile-icon/icons/svg/ng-switch-horizontal-01.esm.js +1 -0
  94. package/dist/nile-icon/icons/svg/ng-zap.cjs.js +2 -0
  95. package/dist/nile-icon/icons/svg/ng-zap.cjs.js.map +1 -0
  96. package/dist/nile-icon/icons/svg/ng-zap.esm.js +1 -0
  97. package/dist/nile-icon/index.cjs.js +1 -1
  98. package/dist/nile-icon/index.cjs.js.map +1 -1
  99. package/dist/nile-icon/index.esm.js +3 -4
  100. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  101. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
  102. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  103. package/dist/nile-icon-button/index.cjs.js +1 -1
  104. package/dist/nile-icon-button/index.esm.js +1 -1
  105. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  106. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  107. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  108. package/dist/nile-input/index.cjs.js +1 -1
  109. package/dist/nile-input/index.esm.js +1 -1
  110. package/dist/nile-input/nile-input.cjs.js +1 -1
  111. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  112. package/dist/nile-input/nile-input.esm.js +1 -1
  113. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  114. package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
  115. package/dist/nile-input/nile-input.test.esm.js +1 -1
  116. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  117. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  118. package/dist/nile-menu-item/index.cjs.js +1 -1
  119. package/dist/nile-menu-item/index.esm.js +1 -1
  120. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  121. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  122. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  123. package/dist/nile-option/index.cjs.js +1 -1
  124. package/dist/nile-option/index.esm.js +1 -1
  125. package/dist/nile-option/nile-option.cjs.js +1 -1
  126. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  127. package/dist/nile-option/nile-option.esm.js +1 -1
  128. package/dist/nile-popover/index.cjs.js +1 -1
  129. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  130. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  131. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  132. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  133. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  134. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  135. package/dist/nile-select/index.cjs.js +1 -1
  136. package/dist/nile-select/index.esm.js +1 -1
  137. package/dist/nile-select/nile-select.cjs.js +1 -1
  138. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  139. package/dist/nile-select/nile-select.esm.js +1 -1
  140. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  141. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  142. package/dist/nile-select/nile-select.test.esm.js +1 -1
  143. package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
  144. package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
  145. package/dist/nile-side-bar/nile-side-bar.esm.js +2 -2
  146. package/dist/nile-side-bar-action-menu-item/index.cjs.js +1 -1
  147. package/dist/nile-side-bar-action-menu-item/index.esm.js +1 -1
  148. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js +1 -1
  149. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js.map +1 -1
  150. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.esm.js +1 -1
  151. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
  152. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
  153. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +1 -1
  154. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js +1 -1
  155. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.cjs.js.map +1 -1
  156. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.esm.js +1 -1
  157. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js +1 -1
  158. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.cjs.js.map +1 -1
  159. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.esm.js +3 -3
  160. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
  161. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
  162. package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +2 -1
  163. package/dist/nile-side-bar-logo/nile-side-bar-logo.css.cjs.js +1 -1
  164. package/dist/nile-side-bar-logo/nile-side-bar-logo.css.cjs.js.map +1 -1
  165. package/dist/nile-side-bar-logo/nile-side-bar-logo.css.esm.js +12 -7
  166. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  167. package/dist/nile-tab/index.cjs.js +1 -1
  168. package/dist/nile-tab/index.esm.js +1 -1
  169. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  170. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  171. package/dist/nile-tab/nile-tab.css.cjs.js +1 -1
  172. package/dist/nile-tab/nile-tab.css.cjs.js.map +1 -1
  173. package/dist/nile-tab/nile-tab.css.esm.js +6 -6
  174. package/dist/nile-tab/nile-tab.esm.js +1 -1
  175. package/dist/nile-tab-group/index.cjs.js +1 -1
  176. package/dist/nile-tab-group/index.esm.js +1 -1
  177. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  178. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  179. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  180. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  181. package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
  182. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  183. package/dist/nile-tag/index.cjs.js +1 -1
  184. package/dist/nile-tag/index.esm.js +1 -1
  185. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  186. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  187. package/dist/nile-tag/nile-tag.esm.js +1 -1
  188. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  189. package/dist/nile-toast/index.cjs.js +1 -1
  190. package/dist/nile-toast/index.esm.js +1 -1
  191. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  192. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  193. package/dist/nile-toast/nile-toast.esm.js +1 -1
  194. package/dist/nile-tree/index.cjs.js +1 -1
  195. package/dist/nile-tree/index.esm.js +1 -1
  196. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  197. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  198. package/dist/nile-tree/nile-tree.esm.js +1 -1
  199. package/dist/nile-tree-item/index.cjs.js +1 -1
  200. package/dist/nile-tree-item/index.esm.js +1 -1
  201. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  202. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  203. package/dist/nile-tree-item/nile-tree-item.css.cjs.js +1 -1
  204. package/dist/nile-tree-item/nile-tree-item.css.cjs.js.map +1 -1
  205. package/dist/nile-tree-item/nile-tree-item.css.esm.js +3 -3
  206. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  207. package/dist/nile-virtual-select/index.cjs.js +1 -1
  208. package/dist/nile-virtual-select/index.esm.js +1 -1
  209. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +7 -3
  210. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
  211. package/dist/nile-virtual-select/nile-virtual-select.esm.js +9 -4
  212. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
  213. package/dist/{scopedElementsWrapper-5ea5834f.cjs.js → scopedElementsWrapper-9b188ea6.cjs.js} +2 -2
  214. package/dist/{scopedElementsWrapper-5ea5834f.cjs.js.map → scopedElementsWrapper-9b188ea6.cjs.js.map} +1 -1
  215. package/dist/src/nile-icon/icons/svg/index.d.ts +4 -0
  216. package/dist/src/nile-icon/icons/svg/index.js +4 -0
  217. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  218. package/dist/src/nile-icon/icons/svg/ng-layers-three-02.d.ts +5 -0
  219. package/dist/src/nile-icon/icons/svg/ng-layers-three-02.js +5 -0
  220. package/dist/src/nile-icon/icons/svg/ng-layers-three-02.js.map +1 -0
  221. package/dist/src/nile-icon/icons/svg/ng-shopping-bag-01.d.ts +5 -0
  222. package/dist/src/nile-icon/icons/svg/ng-shopping-bag-01.js +5 -0
  223. package/dist/src/nile-icon/icons/svg/ng-shopping-bag-01.js.map +1 -0
  224. package/dist/src/nile-icon/icons/svg/ng-switch-horizontal-01.d.ts +5 -0
  225. package/dist/src/nile-icon/icons/svg/ng-switch-horizontal-01.js +5 -0
  226. package/dist/src/nile-icon/icons/svg/ng-switch-horizontal-01.js.map +1 -0
  227. package/dist/src/nile-icon/icons/svg/ng-zap.d.ts +5 -0
  228. package/dist/src/nile-icon/icons/svg/ng-zap.js +5 -0
  229. package/dist/src/nile-icon/icons/svg/ng-zap.js.map +1 -0
  230. package/dist/src/nile-icon/index.js +1 -2
  231. package/dist/src/nile-icon/index.js.map +1 -1
  232. package/dist/src/nile-side-bar/nile-side-bar.js +9 -1
  233. package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
  234. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +1 -1
  235. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
  236. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js +1 -1
  237. package/dist/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.js.map +1 -1
  238. package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js +1 -1
  239. package/dist/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.js.map +1 -1
  240. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +2 -1
  241. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
  242. package/dist/src/nile-side-bar-logo/nile-side-bar-logo.css.js +10 -5
  243. package/dist/src/nile-side-bar-logo/nile-side-bar-logo.css.js.map +1 -1
  244. package/dist/src/nile-tab/nile-tab.css.js +4 -4
  245. package/dist/src/nile-tab/nile-tab.css.js.map +1 -1
  246. package/dist/src/nile-tree-item/nile-tree-item.css.js +3 -3
  247. package/dist/src/nile-tree-item/nile-tree-item.css.js.map +1 -1
  248. package/dist/src/version.js +2 -2
  249. package/dist/src/version.js.map +1 -1
  250. package/dist/tsconfig.tsbuildinfo +1 -1
  251. package/package.json +1 -1
  252. package/src/nile-icon/icons/svg/index.ts +4 -0
  253. package/src/nile-icon/icons/svg/ng-layers-three-02.ts +5 -0
  254. package/src/nile-icon/icons/svg/ng-shopping-bag-01.ts +5 -0
  255. package/src/nile-icon/icons/svg/ng-switch-horizontal-01.ts +5 -0
  256. package/src/nile-icon/icons/svg/ng-zap.ts +5 -0
  257. package/src/nile-icon/index.ts +1 -2
  258. package/src/nile-side-bar/nile-side-bar.ts +10 -1
  259. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +1 -1
  260. package/src/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.css.ts +1 -1
  261. package/src/nile-side-bar-group-item-text/nile-side-bar-group-item-text.css.ts +1 -1
  262. package/src/nile-side-bar-header/nile-side-bar-header.css.ts +2 -1
  263. package/src/nile-side-bar-logo/nile-side-bar-logo.css.ts +11 -5
  264. package/src/nile-tab/nile-tab.css.ts +4 -4
  265. package/src/nile-tree-item/nile-tree-item.css.ts +3 -3
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","./nile-file-upload.css.cjs.js","../internal/nile-element.cjs.js","./utils/drag-drop.util.cjs.js","./types/file-upload.enums.cjs.js","lit","lit/decorators.js","./utils/file-validation.util.cjs.js","./nile-file-upload.template.cjs.js","../lit-html-9b3af046.cjs.js"],function(_export,_context){"use strict";var t,s,i,h,e,r,a,o,l,p,n,d,u,c,m,f,y,v,j,g,S,b,w,B,_templateObject,U;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_nileFileUploadCssCjsJs){s=_nileFileUploadCssCjsJs.s;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_utilsDragDropUtilCjsJs){h=_utilsDragDropUtilCjsJs.D;},function(_typesFileUploadEnumsCjsJs){e=_typesFileUploadEnumsCjsJs.c;r=_typesFileUploadEnumsCjsJs.F;a=_typesFileUploadEnumsCjsJs.d;o=_typesFileUploadEnumsCjsJs.b;},function(_lit){l=_lit.html;},function(_litDecoratorsJs){p=_litDecoratorsJs.property;n=_litDecoratorsJs.query;d=_litDecoratorsJs.customElement;},function(_utilsFileValidationUtilCjsJs){u=_utilsFileValidationUtilCjsJs.s;c=_utilsFileValidationUtilCjsJs.a;m=_utilsFileValidationUtilCjsJs.b;f=_utilsFileValidationUtilCjsJs.u;},function(_nileFileUploadTemplateCjsJs){y=_nileFileUploadTemplateCjsJs.g;v=_nileFileUploadTemplateCjsJs.a;j=_nileFileUploadTemplateCjsJs.b;g=_nileFileUploadTemplateCjsJs.c;S=_nileFileUploadTemplateCjsJs.d;b=_nileFileUploadTemplateCjsJs.e;w=_nileFileUploadTemplateCjsJs.f;B=_nileFileUploadTemplateCjsJs.h;},function(_litHtml003CjsJs){}],execute:function execute(){_export("N",U=/*#__PURE__*/function(_i){function U(){var _this;_classCallCheck(this,U);_this=_callSuper(this,U,arguments),_this.size="10MB",_this.error=!1,_this.errorMessage="",_this.allowMultiple=!1,_this.allowDuplicates=!1,_this.allowedTypes=[],_this.uploadedFiles=[],_this.title=e.TITLE,_this.subtitle=e.SUBTITLE,_this.state=r.DEFAULT,_this.variant=a.HORIZONTAL,_this.fileUploadUrl="",_this.autoUpload=!0,_this.uploadRequests=new Map(),_this.fileSizeExceededFilesNumber=0,_this.isStringTruncated=!1,_this.setState=function(t){_this.state=t;};return _this;}_inherits(U,_i);return _createClass(U,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(U,"connectedCallback",this,3)([]),this.emit(o.NILE_INIT);}},{key:"firstUpdated",value:function firstUpdated(t){_superPropGet(U,"firstUpdated",this,3)([t]),this.dragHandler=new h(),u(this,this.dragHandler),c(this,this.dragHandler,this.uploadRequests),m(this.dragHandler);}},{key:"updated",value:function updated(t){_superPropGet(U,"updated",this,3)([t]),t.has("uploadedFiles")?(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles})):t.has("state")&&this.dragHandler.setValuesInDragHandler(this.state),t.has("autoUpload")&&this.autoUpload&&(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles}));}},{key:"browseFiles",value:function browseFiles(){this.emit(o.NILE_BROWSE),this.errorMessage="",this.input.click();}},{key:"render",value:function render(){return l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n "])),this.getState());}},{key:"getState",value:function getState(){return this.variant===a.HORIZONTAL?this.getHorizontalState():this.getVerticalState();}},{key:"getHorizontalState",value:function getHorizontalState(){switch(this.state){case r.DEFAULT:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return g(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DRAG:return j();case r.ERROR:return v(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);default:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);}}},{key:"getVerticalState",value:function getVerticalState(){switch(this.state){case r.DEFAULT:return S(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return B(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DRAG:return w();case r.ERROR:return b(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);default:return S(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);}}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.emit(o.NILE_DESTROY);}}],[{key:"styles",get:function get(){return[s];}}]);}(i));t([p({type:String})],U.prototype,"size",void 0),t([p({type:Boolean})],U.prototype,"error",void 0),t([p({type:String})],U.prototype,"errorMessage",void 0),t([p({type:Boolean})],U.prototype,"allowMultiple",void 0),t([p({type:Boolean})],U.prototype,"allowDuplicates",void 0),t([p({type:Array})],U.prototype,"allowedTypes",void 0),t([p({type:Array})],U.prototype,"uploadedFiles",void 0),t([p({type:String})],U.prototype,"title",void 0),t([p({type:String})],U.prototype,"subtitle",void 0),t([p({type:String})],U.prototype,"state",void 0),t([p({type:String})],U.prototype,"variant",void 0),t([p({type:String})],U.prototype,"fileUploadUrl",void 0),t([p({type:Boolean})],U.prototype,"autoUpload",void 0),t([n("input")],U.prototype,"input",void 0),_export("N",U=t([d("nile-file-upload")],U));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","./nile-file-upload.css.cjs.js","../internal/nile-element.cjs.js","./utils/drag-drop.util.cjs.js","./types/file-upload.enums.cjs.js","lit","lit/decorators.js","./utils/file-validation.util.cjs.js","./nile-file-upload.template.cjs.js","../lit-html-9b3af046.cjs.js","../directive-7733ffce.cjs.js"],function(_export,_context){"use strict";var t,s,i,h,e,r,a,o,l,p,n,d,u,c,m,f,y,j,v,g,S,b,w,B,_templateObject,U;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_nileFileUploadCssCjsJs){s=_nileFileUploadCssCjsJs.s;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_utilsDragDropUtilCjsJs){h=_utilsDragDropUtilCjsJs.D;},function(_typesFileUploadEnumsCjsJs){e=_typesFileUploadEnumsCjsJs.c;r=_typesFileUploadEnumsCjsJs.F;a=_typesFileUploadEnumsCjsJs.d;o=_typesFileUploadEnumsCjsJs.b;},function(_lit){l=_lit.html;},function(_litDecoratorsJs){p=_litDecoratorsJs.property;n=_litDecoratorsJs.query;d=_litDecoratorsJs.customElement;},function(_utilsFileValidationUtilCjsJs){u=_utilsFileValidationUtilCjsJs.s;c=_utilsFileValidationUtilCjsJs.a;m=_utilsFileValidationUtilCjsJs.b;f=_utilsFileValidationUtilCjsJs.u;},function(_nileFileUploadTemplateCjsJs){y=_nileFileUploadTemplateCjsJs.g;j=_nileFileUploadTemplateCjsJs.a;v=_nileFileUploadTemplateCjsJs.b;g=_nileFileUploadTemplateCjsJs.c;S=_nileFileUploadTemplateCjsJs.d;b=_nileFileUploadTemplateCjsJs.e;w=_nileFileUploadTemplateCjsJs.f;B=_nileFileUploadTemplateCjsJs.h;},function(_litHtml003CjsJs){},function(_directive004CjsJs){}],execute:function execute(){_export("N",U=/*#__PURE__*/function(_i){function U(){var _this;_classCallCheck(this,U);_this=_callSuper(this,U,arguments),_this.size="10MB",_this.error=!1,_this.errorMessage="",_this.allowMultiple=!1,_this.allowDuplicates=!1,_this.allowedTypes=[],_this.uploadedFiles=[],_this.title=e.TITLE,_this.subtitle=e.SUBTITLE,_this.state=r.DEFAULT,_this.variant=a.HORIZONTAL,_this.fileUploadUrl="",_this.autoUpload=!0,_this.uploadRequests=new Map(),_this.fileSizeExceededFilesNumber=0,_this.isStringTruncated=!1,_this.setState=function(t){_this.state=t;};return _this;}_inherits(U,_i);return _createClass(U,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(U,"connectedCallback",this,3)([]),this.emit(o.NILE_INIT);}},{key:"firstUpdated",value:function firstUpdated(t){_superPropGet(U,"firstUpdated",this,3)([t]),this.dragHandler=new h(),u(this,this.dragHandler),c(this,this.dragHandler,this.uploadRequests),m(this.dragHandler);}},{key:"updated",value:function updated(t){_superPropGet(U,"updated",this,3)([t]),t.has("uploadedFiles")?(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles})):t.has("state")&&this.dragHandler.setValuesInDragHandler(this.state),t.has("autoUpload")&&this.autoUpload&&(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles}));}},{key:"browseFiles",value:function browseFiles(){this.emit(o.NILE_BROWSE),this.errorMessage="",this.input.click();}},{key:"render",value:function render(){return l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n "])),this.getState());}},{key:"getState",value:function getState(){return this.variant===a.HORIZONTAL?this.getHorizontalState():this.getVerticalState();}},{key:"getHorizontalState",value:function getHorizontalState(){switch(this.state){case r.DEFAULT:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return g(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DRAG:return v();case r.ERROR:return j(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);default:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);}}},{key:"getVerticalState",value:function getVerticalState(){switch(this.state){case r.DEFAULT:return S(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return B(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DRAG:return w();case r.ERROR:return b(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);default:return S(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);}}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.emit(o.NILE_DESTROY);}}],[{key:"styles",get:function get(){return[s];}}]);}(i));t([p({type:String})],U.prototype,"size",void 0),t([p({type:Boolean})],U.prototype,"error",void 0),t([p({type:String})],U.prototype,"errorMessage",void 0),t([p({type:Boolean})],U.prototype,"allowMultiple",void 0),t([p({type:Boolean})],U.prototype,"allowDuplicates",void 0),t([p({type:Array})],U.prototype,"allowedTypes",void 0),t([p({type:Array})],U.prototype,"uploadedFiles",void 0),t([p({type:String})],U.prototype,"title",void 0),t([p({type:String})],U.prototype,"subtitle",void 0),t([p({type:String})],U.prototype,"state",void 0),t([p({type:String})],U.prototype,"variant",void 0),t([p({type:String})],U.prototype,"fileUploadUrl",void 0),t([p({type:Boolean})],U.prototype,"autoUpload",void 0),t([n("input")],U.prototype,"input",void 0),_export("N",U=t([d("nile-file-upload")],U));}};});
2
2
  //# sourceMappingURL=nile-file-upload.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-file-upload.cjs.js","sources":["../../../src/nile-file-upload/nile-file-upload.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { styles } from './nile-file-upload.css';\nimport { ChangedPropsInterface } from './types/file-upload.type'\nimport NileElement from '../internal/nile-element';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { FileUploadDefaults } from './types/file-upload.enums';\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { FileUploadState, FileUploadVariant, FileUploadError, FileUploadEvent } from './types/file-upload.enums';\nimport { setUpDragHandler, addGlobalListeners, addInternalListeners, uploadFiles, cancelFileUpload } from './utils/file-validation.util';\nimport {\n getHorizontalDefaultState,\n getHorizontalDragState,\n getVerticalDefaultState,\n getVerticalDisabledState,\n getVerticalDragState,\n getHorizontalErrorState,\n getVerticalErrorState,\n getHorizontalDisabledState\n} from './nile-file-upload.template';\n\n/**\n * Nile file-upload component.\n *\n * @tag nile-file-upload\n *\n */\n@customElement('nile-file-upload')\nexport class NileFileUpload extends NileElement {\n /**\n * The styles for nile-file-upload\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: String }) size: string = \"10MB\";\n @property({ type: Boolean}) error: boolean = false;\n @property({ type: String }) errorMessage: string = \"\";\n @property({ type: Boolean}) allowMultiple: boolean = false;\n @property({ type: Boolean}) allowDuplicates: boolean = false;\n @property({ type: Array }) allowedTypes: string[] = [];\n @property({ type: Array }) uploadedFiles: File[] = [];\n @property({ type: String }) title: string = FileUploadDefaults.TITLE;\n @property({ type: String }) subtitle: string = FileUploadDefaults.SUBTITLE;\n @property({ type: String }) state: FileUploadState = FileUploadState.DEFAULT; \n @property({ type: String }) variant: FileUploadVariant = FileUploadVariant.HORIZONTAL;\n @property({ type: String }) fileUploadUrl: string = \"\";\n @property({ type: Boolean}) autoUpload: boolean = true;\n @query('input') input!: HTMLInputElement;\n public uploadRequests = new Map<File, XMLHttpRequest>();\n public fileSizeExceededFilesNumber: number = 0;\n public isStringTruncated: boolean = false;\n \n private dragHandler!: DragHandler;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit(FileUploadEvent.NILE_INIT);\n }\n\n firstUpdated(changedProps: ChangedPropsInterface): void {\n super.firstUpdated(changedProps);\n\n this.dragHandler = new DragHandler();\n setUpDragHandler(this, this.dragHandler);\n addInternalListeners(this, this.dragHandler, this.uploadRequests);\n addGlobalListeners(this.dragHandler);\n }\n\n updated(changedProps: ChangedPropsInterface): void {\n super.updated(changedProps);\n\n if (changedProps.has('uploadedFiles')) {\n if(this.fileUploadUrl && this.autoUpload) {\n uploadFiles(this);\n }\n this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });\n } else if (changedProps.has('state')) {\n this.dragHandler.setValuesInDragHandler(this.state);\n }\n\n if(changedProps.has('autoUpload') && this.autoUpload) {\n if(this.fileUploadUrl && this.autoUpload) {\n uploadFiles(this);\n }\n this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });\n }\n }\n\n private browseFiles(): void {\n this.emit(FileUploadEvent.NILE_BROWSE);\n this.errorMessage = \"\";\n this.input.click();\n }\n\n public setState = (newState: FileUploadState): void => {\n this.state = newState;\n }\n\n render(): TemplateResult {\n return html`\n ${this.getState()}\n `;\n }\n\n private getState(): TemplateResult {\n return this.variant === FileUploadVariant.HORIZONTAL\n ? this.getHorizontalState()\n : this.getVerticalState();\n }\n\n private getHorizontalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DISABLED:\n return getHorizontalDisabledState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DRAG:\n return getHorizontalDragState();\n\n case FileUploadState.ERROR:\n return getHorizontalErrorState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n\n default:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n }\n }\n\n private getVerticalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DISABLED:\n return getVerticalDisabledState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DRAG:\n return getVerticalDragState();\n\n case FileUploadState.ERROR:\n return getVerticalErrorState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n\n default:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n }\n }\n\n disconnectedCallback(): void {\n this.emit(FileUploadEvent.NILE_DESTROY);\n }\n}\n"],"names":["NileFileUpload","U","this","size","error","errorMessage","allowMultiple","allowDuplicates","allowedTypes","uploadedFiles","title","FileUploadDefaults","TITLE","subtitle","SUBTITLE","state","FileUploadState","DEFAULT","variant","FileUploadVariant","HORIZONTAL","fileUploadUrl","autoUpload","uploadRequests","Map","fileSizeExceededFilesNumber","isStringTruncated","setState","newState","_this","_inherits","_i","_createClass","key","value","connectedCallback","super","emit","FileUploadEvent","NILE_INIT","firstUpdated","changedProps","dragHandler","DragHandler","setUpDragHandler","addInternalListeners","addGlobalListeners","updated","has","uploadFiles","NILE_CHANGE","files","setValuesInDragHandler","browseFiles","NILE_BROWSE","input","click","render","html","_templateObject","_taggedTemplateLiteral","getState","getHorizontalState","getVerticalState","getHorizontalDefaultState","DISABLED","getHorizontalDisabledState","DRAG","getHorizontalDragState","ERROR","getHorizontalErrorState","getVerticalDefaultState","getVerticalDisabledState","getVerticalDragState","getVerticalErrorState","disconnectedCallback","NILE_DESTROY","get","styles","NileElement","__decorate","property","type","String","prototype","Boolean","Array","query","customElement"],"mappings":"imJAkCaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEASuBC,EAAAA,KAAAA,CAAIC,IAAW,CAAA,MAAA,CACfD,KAAAA,CAAKE,KAAY,CAAA,CAAA,CAAA,CACjBF,KAAAA,CAAYG,YAAAA,CAAW,EACvBH,CAAAA,KAAAA,CAAaI,eAAY,CACzBJ,CAAAA,KAAAA,CAAeK,iBAAY,CAC3BL,CAAAA,KAAAA,CAAYM,aAAa,EACzBN,CAAAA,KAAAA,CAAaO,aAAW,CAAA,EAAA,CACxBP,KAAAA,CAAAQ,KAAAA,CAAgBC,EAAmBC,KACnCV,CAAAA,KAAAA,CAAAW,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EAAAoF,SAAA,CAAA,OAAA,CAAA,IAAA,IACzCJ,CAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAAyDnF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoF,SAAA,CAAA,UAAA,CAAA,IAAA,IAC/CJ,CAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAA2DnF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoF,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CACjDJ,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,UAAoEnF,CAAAoF,CAAAA,SAAAA,CAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAC1DJ,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,UAAqCnF,CAAAoF,CAAAA,SAAAA,CAAA,oBAAA,EAC3BJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,IAAMG,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAqCrF,EAAAoF,SAAA,CAAA,YAAA,CAAA,IAAA,EACvCJ,CAAAA,CAAAA,CAAAA,CAAA,CAAfO,CAAM,CAAA,OAAA,CAAA,CAAA,CAAkCvF,CAAAoF,CAAAA,SAAAA,CAAA,YAAA,EAtB9BpF,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAcgF,EAAA,CAD1BQ,CAAAA,CAAc,qBACFxF"}
1
+ {"version":3,"file":"nile-file-upload.cjs.js","sources":["../../../src/nile-file-upload/nile-file-upload.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { styles } from './nile-file-upload.css';\nimport { ChangedPropsInterface } from './types/file-upload.type'\nimport NileElement from '../internal/nile-element';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { FileUploadDefaults } from './types/file-upload.enums';\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { FileUploadState, FileUploadVariant, FileUploadError, FileUploadEvent } from './types/file-upload.enums';\nimport { setUpDragHandler, addGlobalListeners, addInternalListeners, uploadFiles, cancelFileUpload } from './utils/file-validation.util';\nimport {\n getHorizontalDefaultState,\n getHorizontalDragState,\n getVerticalDefaultState,\n getVerticalDisabledState,\n getVerticalDragState,\n getHorizontalErrorState,\n getVerticalErrorState,\n getHorizontalDisabledState\n} from './nile-file-upload.template';\n\n/**\n * Nile file-upload component.\n *\n * @tag nile-file-upload\n *\n */\n@customElement('nile-file-upload')\nexport class NileFileUpload extends NileElement {\n /**\n * The styles for nile-file-upload\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: String }) size: string = \"10MB\";\n @property({ type: Boolean}) error: boolean = false;\n @property({ type: String }) errorMessage: string = \"\";\n @property({ type: Boolean}) allowMultiple: boolean = false;\n @property({ type: Boolean}) allowDuplicates: boolean = false;\n @property({ type: Array }) allowedTypes: string[] = [];\n @property({ type: Array }) uploadedFiles: File[] = [];\n @property({ type: String }) title: string = FileUploadDefaults.TITLE;\n @property({ type: String }) subtitle: string = FileUploadDefaults.SUBTITLE;\n @property({ type: String }) state: FileUploadState = FileUploadState.DEFAULT; \n @property({ type: String }) variant: FileUploadVariant = FileUploadVariant.HORIZONTAL;\n @property({ type: String }) fileUploadUrl: string = \"\";\n @property({ type: Boolean}) autoUpload: boolean = true;\n @query('input') input!: HTMLInputElement;\n public uploadRequests = new Map<File, XMLHttpRequest>();\n public fileSizeExceededFilesNumber: number = 0;\n public isStringTruncated: boolean = false;\n \n private dragHandler!: DragHandler;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit(FileUploadEvent.NILE_INIT);\n }\n\n firstUpdated(changedProps: ChangedPropsInterface): void {\n super.firstUpdated(changedProps);\n\n this.dragHandler = new DragHandler();\n setUpDragHandler(this, this.dragHandler);\n addInternalListeners(this, this.dragHandler, this.uploadRequests);\n addGlobalListeners(this.dragHandler);\n }\n\n updated(changedProps: ChangedPropsInterface): void {\n super.updated(changedProps);\n\n if (changedProps.has('uploadedFiles')) {\n if(this.fileUploadUrl && this.autoUpload) {\n uploadFiles(this);\n }\n this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });\n } else if (changedProps.has('state')) {\n this.dragHandler.setValuesInDragHandler(this.state);\n }\n\n if(changedProps.has('autoUpload') && this.autoUpload) {\n if(this.fileUploadUrl && this.autoUpload) {\n uploadFiles(this);\n }\n this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });\n }\n }\n\n private browseFiles(): void {\n this.emit(FileUploadEvent.NILE_BROWSE);\n this.errorMessage = \"\";\n this.input.click();\n }\n\n public setState = (newState: FileUploadState): void => {\n this.state = newState;\n }\n\n render(): TemplateResult {\n return html`\n ${this.getState()}\n `;\n }\n\n private getState(): TemplateResult {\n return this.variant === FileUploadVariant.HORIZONTAL\n ? this.getHorizontalState()\n : this.getVerticalState();\n }\n\n private getHorizontalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DISABLED:\n return getHorizontalDisabledState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DRAG:\n return getHorizontalDragState();\n\n case FileUploadState.ERROR:\n return getHorizontalErrorState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n\n default:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.state, this.errorMessage, this.allowedTypes, this);\n }\n }\n\n private getVerticalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DISABLED:\n return getVerticalDisabledState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n\n case FileUploadState.DRAG:\n return getVerticalDragState();\n\n case FileUploadState.ERROR:\n return getVerticalErrorState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n\n default:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.dragHandler, this.errorMessage, this.allowedTypes, this);\n }\n }\n\n disconnectedCallback(): void {\n this.emit(FileUploadEvent.NILE_DESTROY);\n }\n}\n"],"names":["NileFileUpload","_i","U","constructor","this","size","error","errorMessage","allowMultiple","allowDuplicates","allowedTypes","uploadedFiles","title","FileUploadDefaults","TITLE","subtitle","SUBTITLE","state","FileUploadState","DEFAULT","variant","FileUploadVariant","HORIZONTAL","fileUploadUrl","autoUpload","uploadRequests","Map","fileSizeExceededFilesNumber","isStringTruncated","setState","newState","_this","_inherits","_createClass","key","value","connectedCallback","super","emit","FileUploadEvent","NILE_INIT","firstUpdated","changedProps","dragHandler","DragHandler","setUpDragHandler","addInternalListeners","addGlobalListeners","updated","has","uploadFiles","NILE_CHANGE","files","setValuesInDragHandler","browseFiles","NILE_BROWSE","input","click","render","html","_templateObject","_taggedTemplateLiteral","getState","getHorizontalState","getVerticalState","getHorizontalDefaultState","DISABLED","getHorizontalDisabledState","DRAG","getHorizontalDragState","ERROR","getHorizontalErrorState","getVerticalDefaultState","getVerticalDisabledState","getVerticalDragState","getVerticalErrorState","disconnectedCallback","NILE_DESTROY","get","styles","NileElement","__decorate","property","type","String","prototype","Boolean","Array","query","customElement"],"mappings":"+pJAkCaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCASuBC,KAAAA,CAAIC,IAAAA,CAAW,OACfD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
1
- import{__decorate as t}from"tslib";import{s}from"./nile-file-upload.css.esm.js";import{N as i}from"../internal/nile-element.esm.js";import{D as e}from"./utils/drag-drop.util.esm.js";import{c as h,F as r,d as a,b as o}from"./types/file-upload.enums.esm.js";import{html as l}from"lit";import{property as p,query as n,customElement as d}from"lit/decorators.js";import{s as u,a as m,b as c,u as f}from"./utils/file-validation.util.esm.js";import{g as y,a as v,b as g,c as S,d as b,e as j,f as w,h as B}from"./nile-file-upload.template.esm.js";import"../lit-html-39a6718c.esm.js";let U=class extends i{constructor(){super(...arguments),this.size="10MB",this.error=!1,this.errorMessage="",this.allowMultiple=!1,this.allowDuplicates=!1,this.allowedTypes=[],this.uploadedFiles=[],this.title=h.TITLE,this.subtitle=h.SUBTITLE,this.state=r.DEFAULT,this.variant=a.HORIZONTAL,this.fileUploadUrl="",this.autoUpload=!0,this.uploadRequests=new Map,this.fileSizeExceededFilesNumber=0,this.isStringTruncated=!1,this.setState=t=>{this.state=t}}static get styles(){return[s]}connectedCallback(){super.connectedCallback(),this.emit(o.NILE_INIT)}firstUpdated(t){super.firstUpdated(t),this.dragHandler=new e,u(this,this.dragHandler),m(this,this.dragHandler,this.uploadRequests),c(this.dragHandler)}updated(t){super.updated(t),t.has("uploadedFiles")?(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles})):t.has("state")&&this.dragHandler.setValuesInDragHandler(this.state),t.has("autoUpload")&&this.autoUpload&&(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles}))}browseFiles(){this.emit(o.NILE_BROWSE),this.errorMessage="",this.input.click()}render(){return l`
1
+ import{__decorate as t}from"tslib";import{s}from"./nile-file-upload.css.esm.js";import{N as i}from"../internal/nile-element.esm.js";import{D as e}from"./utils/drag-drop.util.esm.js";import{c as h,F as r,d as a,b as o}from"./types/file-upload.enums.esm.js";import{html as l}from"lit";import{property as p,query as n,customElement as d}from"lit/decorators.js";import{s as u,a as m,b as c,u as f}from"./utils/file-validation.util.esm.js";import{g as y,a as v,b as g,c as S,d as j,e as b,f as w,h as B}from"./nile-file-upload.template.esm.js";import"../lit-html-39a6718c.esm.js";import"../directive-ee0c609c.esm.js";let U=class extends i{constructor(){super(...arguments),this.size="10MB",this.error=!1,this.errorMessage="",this.allowMultiple=!1,this.allowDuplicates=!1,this.allowedTypes=[],this.uploadedFiles=[],this.title=h.TITLE,this.subtitle=h.SUBTITLE,this.state=r.DEFAULT,this.variant=a.HORIZONTAL,this.fileUploadUrl="",this.autoUpload=!0,this.uploadRequests=new Map,this.fileSizeExceededFilesNumber=0,this.isStringTruncated=!1,this.setState=t=>{this.state=t}}static get styles(){return[s]}connectedCallback(){super.connectedCallback(),this.emit(o.NILE_INIT)}firstUpdated(t){super.firstUpdated(t),this.dragHandler=new e,u(this,this.dragHandler),m(this,this.dragHandler,this.uploadRequests),c(this.dragHandler)}updated(t){super.updated(t),t.has("uploadedFiles")?(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles})):t.has("state")&&this.dragHandler.setValuesInDragHandler(this.state),t.has("autoUpload")&&this.autoUpload&&(this.fileUploadUrl&&this.autoUpload&&f(this),this.emit(o.NILE_CHANGE,{files:this.uploadedFiles}))}browseFiles(){this.emit(o.NILE_BROWSE),this.errorMessage="",this.input.click()}render(){return l`
2
2
  ${this.getState()}
3
- `}getState(){return this.variant===a.HORIZONTAL?this.getHorizontalState():this.getVerticalState()}getHorizontalState(){switch(this.state){case r.DEFAULT:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return S(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DRAG:return g();case r.ERROR:return v(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);default:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this)}}getVerticalState(){switch(this.state){case r.DEFAULT:return b(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return B(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DRAG:return w();case r.ERROR:return j(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);default:return b(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this)}}disconnectedCallback(){this.emit(o.NILE_DESTROY)}};t([p({type:String})],U.prototype,"size",void 0),t([p({type:Boolean})],U.prototype,"error",void 0),t([p({type:String})],U.prototype,"errorMessage",void 0),t([p({type:Boolean})],U.prototype,"allowMultiple",void 0),t([p({type:Boolean})],U.prototype,"allowDuplicates",void 0),t([p({type:Array})],U.prototype,"allowedTypes",void 0),t([p({type:Array})],U.prototype,"uploadedFiles",void 0),t([p({type:String})],U.prototype,"title",void 0),t([p({type:String})],U.prototype,"subtitle",void 0),t([p({type:String})],U.prototype,"state",void 0),t([p({type:String})],U.prototype,"variant",void 0),t([p({type:String})],U.prototype,"fileUploadUrl",void 0),t([p({type:Boolean})],U.prototype,"autoUpload",void 0),t([n("input")],U.prototype,"input",void 0),U=t([d("nile-file-upload")],U);export{U as N};
3
+ `}getState(){return this.variant===a.HORIZONTAL?this.getHorizontalState():this.getVerticalState()}getHorizontalState(){switch(this.state){case r.DEFAULT:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return S(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);case r.DRAG:return g();case r.ERROR:return v(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this);default:return y(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.state,this.errorMessage,this.allowedTypes,this)}}getVerticalState(){switch(this.state){case r.DEFAULT:return j(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DISABLED:return B(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);case r.DRAG:return w();case r.ERROR:return b(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this);default:return j(this.browseFiles,this.title,this.subtitle,this.dragHandler,this.errorMessage,this.allowedTypes,this)}}disconnectedCallback(){this.emit(o.NILE_DESTROY)}};t([p({type:String})],U.prototype,"size",void 0),t([p({type:Boolean})],U.prototype,"error",void 0),t([p({type:String})],U.prototype,"errorMessage",void 0),t([p({type:Boolean})],U.prototype,"allowMultiple",void 0),t([p({type:Boolean})],U.prototype,"allowDuplicates",void 0),t([p({type:Array})],U.prototype,"allowedTypes",void 0),t([p({type:Array})],U.prototype,"uploadedFiles",void 0),t([p({type:String})],U.prototype,"title",void 0),t([p({type:String})],U.prototype,"subtitle",void 0),t([p({type:String})],U.prototype,"state",void 0),t([p({type:String})],U.prototype,"variant",void 0),t([p({type:String})],U.prototype,"fileUploadUrl",void 0),t([p({type:Boolean})],U.prototype,"autoUpload",void 0),t([n("input")],U.prototype,"input",void 0),U=t([d("nile-file-upload")],U);export{U as N};
@@ -1,10 +1,6 @@
1
- System.register(["lit","./nile-file-upload.css.cjs.js","../lit-html-9b3af046.cjs.js","./types/file-upload.enums.cjs.js","./utils/file-validation.util.cjs.js"],function(_export,_context){"use strict";var i,e,t,s,n,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,l,a,o,r,c,d,v,p,u,h,$,m,b;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n){function n(){return _n.apply(this,arguments);}n.toString=function(){return _n.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_lit){i=_lit.html;},function(_nileFileUploadCssCjsJs){},function(_litHtml003CjsJs){e=_litHtml003CjsJs.T;},function(_typesFileUploadEnumsCjsJs){t=_typesFileUploadEnumsCjsJs.c;s=_typesFileUploadEnumsCjsJs.F;},function(_utilsFileValidationUtilCjsJs){n=_utilsFileValidationUtilCjsJs.t;}],execute:function execute(){/**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */l=1;a=/*#__PURE__*/function(){function a(i){_classCallCheck(this,a);}return _createClass(a,[{key:"_$AU",get:function get(){return this._$AM._$AU;}},{key:"_$AT",value:function _$AT(i,e,t){this._$Ct=i,this._$AM=e,this._$Ci=t;}},{key:"_$AS",value:function _$AS(i,e){return this.update(i,e);}},{key:"update",value:function update(i,e){return this.render.apply(this,_toConsumableArray(e));}}]);}();/**
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["lit","./nile-file-upload.css.cjs.js","../lit-html-9b3af046.cjs.js","../directive-7733ffce.cjs.js","./types/file-upload.enums.cjs.js","./utils/file-validation.util.cjs.js"],function(_export,_context){"use strict";var i,e,t,s,n,l,a,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,r,c,d,v,p,u,m,b,$,h,f;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n){function n(){return _n.apply(this,arguments);}n.toString=function(){return _n.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_lit){i=_lit.html;},function(_nileFileUploadCssCjsJs){},function(_litHtml003CjsJs){e=_litHtml003CjsJs.T;},function(_directive004CjsJs){t=_directive004CjsJs.e;s=_directive004CjsJs.i;n=_directive004CjsJs.t;},function(_typesFileUploadEnumsCjsJs){l=_typesFileUploadEnumsCjsJs.c;a=_typesFileUploadEnumsCjsJs.F;},function(_utilsFileValidationUtilCjsJs){o=_utilsFileValidationUtilCjsJs.t;}],execute:function execute(){/**
6
2
  * @license
7
3
  * Copyright 2018 Google LLC
8
4
  * SPDX-License-Identifier: BSD-3-Clause
9
- */o=function(i){return function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key];}return{_$litDirective$:i,values:e};};}(/*#__PURE__*/function(_a){function _class(i){var _i$strings;var _this;_classCallCheck(this,_class);if(_this=_callSuper(this,_class,[i]),i.type!==l||"class"!==i.name||((_i$strings=i.strings)===null||_i$strings===void 0?void 0:_i$strings.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return _this;}_inherits(_class,_a);return _createClass(_class,[{key:"render",value:function render(i){return" "+Object.keys(i).filter(function(e){return i[e];}).join(" ")+" ";}},{key:"update",value:function update(i,_ref){var _ref2=_slicedToArray(_ref,1),t=_ref2[0];if(void 0===this.st){this.st=new Set(),void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(function(i){return""!==i;})));for(var _i in t){var _this$nt;t[_i]&&!((_this$nt=this.nt)!==null&&_this$nt!==void 0&&_this$nt.has(_i))&&this.st.add(_i);}return this.render(t);}var s=i.element.classList;var _iterator=_createForOfIteratorHelper(this.st),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _i3=_step.value;_i3 in t||(s.remove(_i3),this.st["delete"](_i3));}}catch(err){_iterator.e(err);}finally{_iterator.f();}for(var _i2 in t){var _this$nt2;var _e=!!t[_i2];_e===this.st.has(_i2)||((_this$nt2=this.nt)===null||_this$nt2===void 0?void 0:_this$nt2.has(_i2))||(_e?(s.add(_i2),this.st.add(_i2)):(s.remove(_i2),this.st["delete"](_i2)));}return e;}}]);}(a)),r=function r(e,l,a,_r,c,d,v,p,u){return n(u),i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"wrapper\" part=\"horizontal-wrapper\">\n <div part=\"horizontal-div\" class=",">\n <div part=\"inner-div\" class=\"inner-div\">\n <slot class=\"upload-icon-slot\" name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"content\" class=\"content\">\n <div class=\"title\">","</div>\n <div class=\"subtitle\">","</div>\n </div>\n </div>\n <input\n type=\"file\"\n ?disabled=","\n @change=","\n multiple\n accept=","\n />\n <slot class=\"browse-file-button\" @click="," name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=",">\n Browse File\n </nile-button>\n </slot>\n </div>\n ","\n </div>\n "])),o({"hover-border":"hover"===d,"horizontal-div":!0,disable:_r}),l,a,_r,function(i){c.handleFiles(i);},p.join(","),_r?void 0:e,_r,v||u.state===s.ERROR?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ","\n </div>"])),u.isStringTruncated?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-tooltip content=",">\n <span>","</span>\n </nile-tooltip>"])),v||t.CUSTOM_ERROR,v||t.CUSTOM_ERROR):i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<span>","</span>"])),v||t.CUSTOM_ERROR)):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));},_export("g",c=function c(i,e,t,s,n,l,a,o){return r(i,e,t,!1,s,n,l,a,o);}),_export("c",d=function d(i,e,t,s,n,l,a,o){return r(i,e,t,!0,s,n,l,a,o);}),_export("a",v=function v(i,e,t,s,n,l,a,o){return r(i,e,t,!1,s,n,l,a,o);}),_export("b",p=function p(){return i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div part=\"horizontal-drag-state\" class=\"horizontal-div dragging\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>","</p>\n </div>\n"])),t.DRAG_STATE_DEFAULT);}),u=function u(e,l,a,o,r,c,d,v){return n(v),i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div part=\"vertical-wrapper\" class=\"wrapper\">\n <div part=\"vertical-default\" class=\"vertical-default vertical-div ","\">\n <slot name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"vertical-content-container\" class=\"content-container\">\n <div class=\"title\">","</div>\n <div class=\"subtitle\">","</div>\n </div>\n <input\n type=\"file\"\n ?disabled=","\n @change=","\n multiple\n accept=","\n />\n <slot @click="," name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=",">\n Browse File\n </nile-button>\n </slot>\n </div>\n ","\n </div>\n "])),o?"disable":"",l,a,o,function(i){return r.handleFiles(i);},d.join(","),o?void 0:e,o,c||v.state===s.ERROR?i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<div class=\"vertical-upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ","\n </div>"])),v.isStringTruncated?i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-tooltip content=",">\n <span>","</span>\n </nile-tooltip>"])),c||t.CUSTOM_ERROR,c||t.CUSTOM_ERROR):i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span>","</span>"])),c||t.CUSTOM_ERROR)):i(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))));},_export("d",h=function h(i,e,t,s,n,l,a){return u(i,e,t,!1,s,n,l,a);}),_export("h",$=function $(i,e,t,s,n,l,a){return u(i,e,t,!0,s,n,l,a);}),_export("e",m=function m(i,e,t,s,n,l,a){return u(i,e,t,!1,s,n,l,a);}),_export("f",b=function b(){return i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div part=\"vertical-drag-state\" class=\"vertical-div vertical-drag\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>","</p>\n </div>\n"])),t.DRAG_STATE_DEFAULT);});}};});
5
+ */r=t(/*#__PURE__*/function(_s){function _class(i){var _i$strings;var _this;_classCallCheck(this,_class);if(_this=_callSuper(this,_class,[i]),i.type!==n.ATTRIBUTE||"class"!==i.name||((_i$strings=i.strings)===null||_i$strings===void 0?void 0:_i$strings.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return _this;}_inherits(_class,_s);return _createClass(_class,[{key:"render",value:function render(i){return" "+Object.keys(i).filter(function(e){return i[e];}).join(" ")+" ";}},{key:"update",value:function update(i,_ref){var _ref2=_slicedToArray(_ref,1),t=_ref2[0];if(void 0===this.st){this.st=new Set(),void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(function(i){return""!==i;})));for(var _i in t){var _this$nt;t[_i]&&!((_this$nt=this.nt)!==null&&_this$nt!==void 0&&_this$nt.has(_i))&&this.st.add(_i);}return this.render(t);}var s=i.element.classList;var _iterator=_createForOfIteratorHelper(this.st),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _i3=_step.value;_i3 in t||(s.remove(_i3),this.st["delete"](_i3));}}catch(err){_iterator.e(err);}finally{_iterator.f();}for(var _i2 in t){var _this$nt2;var _e=!!t[_i2];_e===this.st.has(_i2)||((_this$nt2=this.nt)===null||_this$nt2===void 0?void 0:_this$nt2.has(_i2))||(_e?(s.add(_i2),this.st.add(_i2)):(s.remove(_i2),this.st["delete"](_i2)));}return e;}}]);}(s)),c=function c(e,t,s,n,_c,d,v,p,u){return o(u),i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"wrapper\" part=\"horizontal-wrapper\">\n <div part=\"horizontal-div\" class=",">\n <div part=\"inner-div\" class=\"inner-div\">\n <slot class=\"upload-icon-slot\" name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"content\" class=\"content\">\n <div class=\"title\">","</div>\n <div class=\"subtitle\">","</div>\n </div>\n </div>\n <input\n type=\"file\"\n ?disabled=","\n @change=","\n multiple\n accept=","\n />\n <slot class=\"browse-file-button\" @click="," name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=",">\n Browse File\n </nile-button>\n </slot>\n </div>\n ","\n </div>\n "])),r({"hover-border":"hover"===d,"horizontal-div":!0,disable:n}),t,s,n,function(i){_c.handleFiles(i);},p.join(","),n?void 0:e,n,v||u.state===a.ERROR?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ","\n </div>"])),u.isStringTruncated?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-tooltip content=",">\n <span>","</span>\n </nile-tooltip>"])),v||l.CUSTOM_ERROR,v||l.CUSTOM_ERROR):i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<span>","</span>"])),v||l.CUSTOM_ERROR)):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));},_export("g",d=function d(i,e,t,s,n,l,a,o){return c(i,e,t,!1,s,n,l,a,o);}),_export("c",v=function v(i,e,t,s,n,l,a,o){return c(i,e,t,!0,s,n,l,a,o);}),_export("a",p=function p(i,e,t,s,n,l,a,o){return c(i,e,t,!1,s,n,l,a,o);}),_export("b",u=function u(){return i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div part=\"horizontal-drag-state\" class=\"horizontal-div dragging\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>","</p>\n </div>\n"])),l.DRAG_STATE_DEFAULT);}),m=function m(e,t,s,n,r,c,d,v){return o(v),i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div part=\"vertical-wrapper\" class=\"wrapper\">\n <div part=\"vertical-default\" class=\"vertical-default vertical-div ","\">\n <slot name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"vertical-content-container\" class=\"content-container\">\n <div class=\"title\">","</div>\n <div class=\"subtitle\">","</div>\n </div>\n <input\n type=\"file\"\n ?disabled=","\n @change=","\n multiple\n accept=","\n />\n <slot @click="," name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=",">\n Browse File\n </nile-button>\n </slot>\n </div>\n ","\n </div>\n "])),n?"disable":"",t,s,n,function(i){return r.handleFiles(i);},d.join(","),n?void 0:e,n,c||v.state===a.ERROR?i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<div class=\"vertical-upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ","\n </div>"])),v.isStringTruncated?i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-tooltip content=",">\n <span>","</span>\n </nile-tooltip>"])),c||l.CUSTOM_ERROR,c||l.CUSTOM_ERROR):i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span>","</span>"])),c||l.CUSTOM_ERROR)):i(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))));},_export("d",b=function b(i,e,t,s,n,l,a){return m(i,e,t,!1,s,n,l,a);}),_export("h",$=function $(i,e,t,s,n,l,a){return m(i,e,t,!0,s,n,l,a);}),_export("e",h=function h(i,e,t,s,n,l,a){return m(i,e,t,!1,s,n,l,a);}),_export("f",f=function f(){return i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div part=\"vertical-drag-state\" class=\"vertical-div vertical-drag\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>","</p>\n </div>\n"])),l.DRAG_STATE_DEFAULT);});}};});
10
6
  //# sourceMappingURL=nile-file-upload.template.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-file-upload.template.cjs.js","sources":["../../../../node_modules/lit-html/directive.js","../../../../node_modules/lit-html/directives/class-map.js","../../../src/nile-file-upload/nile-file-upload.template.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import { html, TemplateResult } from 'lit';\nimport './nile-file-upload.css';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { FileUploadDefaults, FileUploadState } from './types/file-upload.enums';\nimport { truncateString } from './utils/file-validation.util';\nimport { NileFileUpload } from './nile-file-upload';\n\nconst baseHorizontalState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n disabled: boolean,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => {\n truncateString(nileFileUpload);\n return html`\n <div class=\"wrapper\" part=\"horizontal-wrapper\">\n <div part=\"horizontal-div\" class=${classMap({ 'hover-border': state === \"hover\", 'horizontal-div': true, 'disable': disabled })}>\n <div part=\"inner-div\" class=\"inner-div\">\n <slot class=\"upload-icon-slot\" name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"content\" class=\"content\">\n <div class=\"title\">${title}</div>\n <div class=\"subtitle\">${subtitle}</div>\n </div>\n </div>\n <input\n type=\"file\"\n ?disabled=${disabled}\n @change=${(e: Event | DragEvent) => { dragHandler.handleFiles(e) }}\n multiple\n accept=${allowedTypes.join(',')}\n />\n <slot class=\"browse-file-button\" @click=${disabled ? undefined : browseFiles} name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=${disabled}>\n Browse File\n </nile-button>\n </slot>\n </div>\n ${errorMessage || nileFileUpload.state === FileUploadState.ERROR ?\n html`<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ${\n nileFileUpload.isStringTruncated\n ? html`<nile-tooltip content=${errorMessage || FileUploadDefaults.CUSTOM_ERROR}>\n <span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>\n </nile-tooltip>`\n : html`<span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>`\n }\n </div>` :\n html``\n }\n </div>\n `;\n}\n\nexport const getHorizontalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseHorizontalState(browseFiles, title, subtitle, false, dragHandler, state, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getHorizontalDisabledState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseHorizontalState(browseFiles, title, subtitle, true, dragHandler, state, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getHorizontalErrorState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseHorizontalState(browseFiles, title, subtitle, false, dragHandler, state, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getHorizontalDragState = (): TemplateResult => html`\n <div part=\"horizontal-drag-state\" class=\"horizontal-div dragging\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>${FileUploadDefaults.DRAG_STATE_DEFAULT}</p>\n </div>\n`;\n\n// Vertical States\nconst baseVerticalState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n disabled: boolean,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => {\n truncateString(nileFileUpload);\n return html`\n <div part=\"vertical-wrapper\" class=\"wrapper\">\n <div part=\"vertical-default\" class=\"vertical-default vertical-div ${disabled ? 'disable' : ''}\">\n <slot name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"vertical-content-container\" class=\"content-container\">\n <div class=\"title\">${title}</div>\n <div class=\"subtitle\">${subtitle}</div>\n </div>\n <input\n type=\"file\"\n ?disabled=${disabled}\n @change=${(e: Event | DragEvent) => dragHandler.handleFiles(e)}\n multiple\n accept=${allowedTypes.join(',')}\n />\n <slot @click=${disabled ? undefined : browseFiles} name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=${disabled}>\n Browse File\n </nile-button>\n </slot>\n </div>\n ${errorMessage || nileFileUpload.state === FileUploadState.ERROR ?\n html`<div class=\"vertical-upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ${\n nileFileUpload.isStringTruncated\n ? html`<nile-tooltip content=${errorMessage || FileUploadDefaults.CUSTOM_ERROR}>\n <span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>\n </nile-tooltip>`\n : html`<span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>`\n }\n </div>` :\n html``\n }\n </div>\n `;\n}\n\nexport const getVerticalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseVerticalState(browseFiles, title, subtitle, false, dragHandler, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getVerticalDisabledState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseVerticalState(browseFiles, title, subtitle, true, dragHandler, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getVerticalErrorState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseVerticalState(browseFiles, title, subtitle, false, dragHandler, errorMessage, allowedTypes, nileFileUpload);\n\n\nexport const getVerticalDragState = (): TemplateResult => html`\n <div part=\"vertical-drag-state\" class=\"vertical-div vertical-drag\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>${FileUploadDefaults.DRAG_STATE_DEFAULT}</p>\n </div>\n`;"],"names":["t","i","a","_createClass","key","get","_$AU","this","_$AM","value","_$AT","e","_$Ct","_$Ci","_$AS","update","render","_len","arguments","length","Array","_key","_$litDirective$","values","s","_class","_i$strings","_this","_classCallCheck","super","type","r","name","strings","Error","_inherits","_a","Object","keys","filter","join","st","Set","nt","split","has","add","element","classList","_iterator","_createForOfIteratorHelper","_step","n","done","remove","err","f","_this$nt2","delete","baseHorizontalState","browseFiles","title","subtitle","disabled","dragHandler","state","errorMessage","allowedTypes","nileFileUpload","truncateString","html","_templateObject","_taggedTemplateLiteral","classMap","disable","handleFiles","undefined","FileUploadState","ERROR","_templateObject2","isStringTruncated","_templateObject3","FileUploadDefaults","CUSTOM_ERROR","_templateObject4","_templateObject5","getHorizontalDefaultState","getHorizontalDisabledState","getHorizontalErrorState","getHorizontalDragState","_templateObject6","DRAG_STATE_DEFAULT","baseVerticalState","u","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","getVerticalDefaultState","h","getVerticalDisabledState","$","getVerticalErrorState","getVerticalDragState","b","_templateObject12"],"mappings":";;;;GAKMA,CAAAA,CAAa,EAA8GC,CAAAA,yBAAE,SAAAC,EAAYF,CAAAA,CAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EAAI,CAAA,OAAAG,YAAA,CAAAD,CAAA,GAAAE,GAAA,QAAAC,GAAA,UAAAA,IAAA,CAAIC,CAAO,MAAOC,KAAKC,CAAAA,IAAAA,CAAKF,IAAI,EAAC,GAAAF,GAAA,QAAAK,KAAA,UAAAC,IAAAA,CAAKV,CAAEW,CAAAA,CAAAA,CAAEV,CAAGM,CAAAA,CAAAA,IAAAA,CAAKK,IAAKZ,CAAAA,CAAAA,CAAEO,KAAKC,IAAKG,CAAAA,CAAAA,CAAEJ,KAAKM,IAAKZ,CAAAA,CAAC,EAAC,GAAAG,GAAA,QAAAK,KAAA,UAAAK,IAAAA,CAAKd,CAAEW,CAAAA,CAAAA,CAAAA,CAAG,MAAOJ,KAAAA,CAAKQ,OAAOf,CAAEW,CAAAA,CAAAA,CAAE,EAAC,GAAAP,GAAA,UAA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,seAgBrDU,CAAmBS,CAAAA,kBAAAA","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"nile-file-upload.template.cjs.js","sources":["../../../../node_modules/lit-html/directives/class-map.js","../../../src/nile-file-upload/nile-file-upload.template.ts"],"sourcesContent":["import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import { html, TemplateResult } from 'lit';\nimport './nile-file-upload.css';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { FileUploadDefaults, FileUploadState } from './types/file-upload.enums';\nimport { truncateString } from './utils/file-validation.util';\nimport { NileFileUpload } from './nile-file-upload';\n\nconst baseHorizontalState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n disabled: boolean,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => {\n truncateString(nileFileUpload);\n return html`\n <div class=\"wrapper\" part=\"horizontal-wrapper\">\n <div part=\"horizontal-div\" class=${classMap({ 'hover-border': state === \"hover\", 'horizontal-div': true, 'disable': disabled })}>\n <div part=\"inner-div\" class=\"inner-div\">\n <slot class=\"upload-icon-slot\" name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"content\" class=\"content\">\n <div class=\"title\">${title}</div>\n <div class=\"subtitle\">${subtitle}</div>\n </div>\n </div>\n <input\n type=\"file\"\n ?disabled=${disabled}\n @change=${(e: Event | DragEvent) => { dragHandler.handleFiles(e) }}\n multiple\n accept=${allowedTypes.join(',')}\n />\n <slot class=\"browse-file-button\" @click=${disabled ? undefined : browseFiles} name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=${disabled}>\n Browse File\n </nile-button>\n </slot>\n </div>\n ${errorMessage || nileFileUpload.state === FileUploadState.ERROR ?\n html`<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ${\n nileFileUpload.isStringTruncated\n ? html`<nile-tooltip content=${errorMessage || FileUploadDefaults.CUSTOM_ERROR}>\n <span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>\n </nile-tooltip>`\n : html`<span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>`\n }\n </div>` :\n html``\n }\n </div>\n `;\n}\n\nexport const getHorizontalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseHorizontalState(browseFiles, title, subtitle, false, dragHandler, state, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getHorizontalDisabledState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseHorizontalState(browseFiles, title, subtitle, true, dragHandler, state, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getHorizontalErrorState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n state: FileUploadState,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseHorizontalState(browseFiles, title, subtitle, false, dragHandler, state, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getHorizontalDragState = (): TemplateResult => html`\n <div part=\"horizontal-drag-state\" class=\"horizontal-div dragging\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>${FileUploadDefaults.DRAG_STATE_DEFAULT}</p>\n </div>\n`;\n\n// Vertical States\nconst baseVerticalState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n disabled: boolean,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => {\n truncateString(nileFileUpload);\n return html`\n <div part=\"vertical-wrapper\" class=\"wrapper\">\n <div part=\"vertical-default\" class=\"vertical-default vertical-div ${disabled ? 'disable' : ''}\">\n <slot name=\"upload-icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div part=\"vertical-content-container\" class=\"content-container\">\n <div class=\"title\">${title}</div>\n <div class=\"subtitle\">${subtitle}</div>\n </div>\n <input\n type=\"file\"\n ?disabled=${disabled}\n @change=${(e: Event | DragEvent) => dragHandler.handleFiles(e)}\n multiple\n accept=${allowedTypes.join(',')}\n />\n <slot @click=${disabled ? undefined : browseFiles} name=\"browse-file-button\">\n <nile-button variant=\"tertiary\" ?disabled=${disabled}>\n Browse File\n </nile-button>\n </slot>\n </div>\n ${errorMessage || nileFileUpload.state === FileUploadState.ERROR ?\n html`<div class=\"vertical-upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"var(--nile-colors-red-700)\"></nile-icon>\n ${\n nileFileUpload.isStringTruncated\n ? html`<nile-tooltip content=${errorMessage || FileUploadDefaults.CUSTOM_ERROR}>\n <span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>\n </nile-tooltip>`\n : html`<span>${errorMessage || FileUploadDefaults.CUSTOM_ERROR}</span>`\n }\n </div>` :\n html``\n }\n </div>\n `;\n}\n\nexport const getVerticalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseVerticalState(browseFiles, title, subtitle, false, dragHandler, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getVerticalDisabledState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseVerticalState(browseFiles, title, subtitle, true, dragHandler, errorMessage, allowedTypes, nileFileUpload);\n\nexport const getVerticalErrorState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n dragHandler: DragHandler,\n errorMessage: string,\n allowedTypes: string[],\n nileFileUpload: NileFileUpload\n): TemplateResult => baseVerticalState(browseFiles, title, subtitle, false, dragHandler, errorMessage, allowedTypes, nileFileUpload);\n\n\nexport const getVerticalDragState = (): TemplateResult => html`\n <div part=\"vertical-drag-state\" class=\"vertical-div vertical-drag\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>${FileUploadDefaults.DRAG_STATE_DEFAULT}</p>\n </div>\n`;"],"names":["e","s","_s","_class","t","_i$strings","_this","_classCallCheck","super","type","r","ATTRIBUTE","name","strings","length","Error","_inherits","_createClass","key","value","render","Object","keys","filter","join","update","i","this","st","Set","nt","split","has","add","element","classList","_iterator","_createForOfIteratorHelper","_step","n","done","remove","err","f","_this$nt2","baseHorizontalState","browseFiles","title","subtitle","disabled","dragHandler","state","errorMessage","allowedTypes","nileFileUpload","truncateString","html","_templateObject","_taggedTemplateLiteral","classMap","disable","handleFiles","undefined","FileUploadState","ERROR","_templateObject2","isStringTruncated","_templateObject3","FileUploadDefaults","CUSTOM_ERROR","_templateObject4","_templateObject5","getHorizontalDefaultState","getHorizontalDisabledState","getHorizontalErrorState","getHorizontalDragState","_templateObject6","DRAG_STATE_DEFAULT","baseVerticalState","m","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","getVerticalDefaultState","b","getVerticalDisabledState","$","getVerticalErrorState","getVerticalDragState","_templateObject12"],"mappings":";;;;AAKG,GAAMA,EAAEC,CAAE,uBAAAC,EAAA,EAAgB,SAAAC,OAAYC,CAAG,CAAA,KAAAC,UAAA,KAAAC,KAAA,CAAAC,eAAA,MAAAJ,MAAA,EAAA,GAAGK,KAAAA,CAAAA,UAAAA,MAAAA,MAAAA,EAAMJ,CAAAA,GAAGA,EAAEK,IAAOC,GAAAA,CAAAA,CAAEC,SAAW,EAAA,OAAA,GAAUP,EAAEQ,IAAMR,EAAAA,EAAAA,UAAAA,CAAAA,CAAAA,CAAES,OAASC,UAAAA,UAAAA,iBAAXV,UAAAA,CAAWU,MAAAA,EAAO,EAAE,KAAMC,CAAAA,KAAAA,CAAM,oGAAqG,CAAA,QAAAT,KAAA,EAACU,SAAA,CAAAb,MAAA,CAAAD,EAAA,SAAAe,YAAA,CAAAd,MAAA,GAAAe,GAAA,UAAAC,KAAA,UAAAC,MAAAA,CAAOhB,CAAAA,CAAAA,CAAG,MAAM,GAAA,CAAIiB,OAAOC,IAAKlB,CAAAA,CAAAA,CAAAA,CAAGmB,MAAQtB,CAAAA,SAAAA,CAAAA,QAAGG,CAAAA,EAAEH,CAAKuB,CAAAA,EAAAA,CAAAA,CAAAA,IAAAA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A,CAAAA,CAAuB/C,CAAA,QAAsBa,CAAAA,CAAI,CAAAmC,iBAAA,GAAAA,iBAAA,CAAAjC,sBAAA,seAgBrDU,CAAmBS,CAAAA,kBAAAA","x_google_ignoreList":[0]}
@@ -1,46 +1,41 @@
1
- import{html as i}from"lit";import"./nile-file-upload.css.esm.js";import{T as e}from"../lit-html-39a6718c.esm.js";import{c as t,F as s}from"./types/file-upload.enums.esm.js";import{t as n}from"./utils/file-validation.util.esm.js";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const l=1;class a{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,e,t){this._$Ct=i,this._$AM=e,this._$Ci=t}_$AS(i,e){return this.update(i,e)}update(i,e){return this.render(...e)}}
1
+ import{html as i}from"lit";import"./nile-file-upload.css.esm.js";import{T as e}from"../lit-html-39a6718c.esm.js";import{e as t,i as s,t as n}from"../directive-ee0c609c.esm.js";import{c as l,F as a}from"./types/file-upload.enums.esm.js";import{t as o}from"./utils/file-validation.util.esm.js";
7
2
  /**
8
3
  * @license
9
4
  * Copyright 2018 Google LLC
10
5
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const o=(i=>(...e)=>({_$litDirective$:i,values:e}))(class extends a{constructor(i){if(super(i),i.type!==l||"class"!==i.name||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[t]){if(void 0===this.st){this.st=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((i=>""!==i))));for(const i in t)t[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(t)}const s=i.element.classList;for(const i of this.st)i in t||(s.remove(i),this.st.delete(i));for(const i in t){const e=!!t[i];e===this.st.has(i)||this.nt?.has(i)||(e?(s.add(i),this.st.add(i)):(s.remove(i),this.st.delete(i)))}return e}}),r=(e,l,a,r,c,d,v,p,u)=>(n(u),i`
6
+ */const r=t(class extends s{constructor(i){if(super(i),i.type!==n.ATTRIBUTE||"class"!==i.name||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[t]){if(void 0===this.st){this.st=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((i=>""!==i))));for(const i in t)t[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(t)}const s=i.element.classList;for(const i of this.st)i in t||(s.remove(i),this.st.delete(i));for(const i in t){const e=!!t[i];e===this.st.has(i)||this.nt?.has(i)||(e?(s.add(i),this.st.add(i)):(s.remove(i),this.st.delete(i)))}return e}}),c=(e,t,s,n,c,d,v,p,u)=>(o(u),i`
12
7
  <div class="wrapper" part="horizontal-wrapper">
13
- <div part="horizontal-div" class=${o({"hover-border":"hover"===d,"horizontal-div":!0,disable:r})}>
8
+ <div part="horizontal-div" class=${r({"hover-border":"hover"===d,"horizontal-div":!0,disable:n})}>
14
9
  <div part="inner-div" class="inner-div">
15
10
  <slot class="upload-icon-slot" name="upload-icon">
16
11
  <nile-icon name="upload" size="24"></nile-icon>
17
12
  </slot>
18
13
  <div part="content" class="content">
19
- <div class="title">${l}</div>
20
- <div class="subtitle">${a}</div>
14
+ <div class="title">${t}</div>
15
+ <div class="subtitle">${s}</div>
21
16
  </div>
22
17
  </div>
23
18
  <input
24
19
  type="file"
25
- ?disabled=${r}
20
+ ?disabled=${n}
26
21
  @change=${i=>{c.handleFiles(i)}}
27
22
  multiple
28
23
  accept=${p.join(",")}
29
24
  />
30
- <slot class="browse-file-button" @click=${r?void 0:e} name="browse-file-button">
31
- <nile-button variant="tertiary" ?disabled=${r}>
25
+ <slot class="browse-file-button" @click=${n?void 0:e} name="browse-file-button">
26
+ <nile-button variant="tertiary" ?disabled=${n}>
32
27
  Browse File
33
28
  </nile-button>
34
29
  </slot>
35
30
  </div>
36
- ${v||u.state===s.ERROR?i`<div class="upload-error">
31
+ ${v||u.state===a.ERROR?i`<div class="upload-error">
37
32
  <nile-icon name="warning" size="12" color="var(--nile-colors-red-700)"></nile-icon>
38
- ${u.isStringTruncated?i`<nile-tooltip content=${v||t.CUSTOM_ERROR}>
39
- <span>${v||t.CUSTOM_ERROR}</span>
40
- </nile-tooltip>`:i`<span>${v||t.CUSTOM_ERROR}</span>`}
33
+ ${u.isStringTruncated?i`<nile-tooltip content=${v||l.CUSTOM_ERROR}>
34
+ <span>${v||l.CUSTOM_ERROR}</span>
35
+ </nile-tooltip>`:i`<span>${v||l.CUSTOM_ERROR}</span>`}
41
36
  </div>`:i``}
42
37
  </div>
43
- `),c=(i,e,t,s,n,l,a,o)=>r(i,e,t,!1,s,n,l,a,o),d=(i,e,t,s,n,l,a,o)=>r(i,e,t,!0,s,n,l,a,o),v=(i,e,t,s,n,l,a,o)=>r(i,e,t,!1,s,n,l,a,o),p=()=>i`
38
+ `),d=(i,e,t,s,n,l,a,o)=>c(i,e,t,!1,s,n,l,a,o),v=(i,e,t,s,n,l,a,o)=>c(i,e,t,!0,s,n,l,a,o),p=(i,e,t,s,n,l,a,o)=>c(i,e,t,!1,s,n,l,a,o),u=()=>i`
44
39
  <div part="horizontal-drag-state" class="horizontal-div dragging">
45
40
  <div class="icons-container">
46
41
  <nile-icon
@@ -56,39 +51,39 @@ import{html as i}from"lit";import"./nile-file-upload.css.esm.js";import{T as e}f
56
51
  class="image-icon"
57
52
  ></nile-icon>
58
53
  </div>
59
- <p>${t.DRAG_STATE_DEFAULT}</p>
54
+ <p>${l.DRAG_STATE_DEFAULT}</p>
60
55
  </div>
61
- `,u=(e,l,a,o,r,c,d,v)=>(n(v),i`
56
+ `,m=(e,t,s,n,r,c,d,v)=>(o(v),i`
62
57
  <div part="vertical-wrapper" class="wrapper">
63
- <div part="vertical-default" class="vertical-default vertical-div ${o?"disable":""}">
58
+ <div part="vertical-default" class="vertical-default vertical-div ${n?"disable":""}">
64
59
  <slot name="upload-icon">
65
60
  <nile-icon name="upload" size="24"></nile-icon>
66
61
  </slot>
67
62
  <div part="vertical-content-container" class="content-container">
68
- <div class="title">${l}</div>
69
- <div class="subtitle">${a}</div>
63
+ <div class="title">${t}</div>
64
+ <div class="subtitle">${s}</div>
70
65
  </div>
71
66
  <input
72
67
  type="file"
73
- ?disabled=${o}
68
+ ?disabled=${n}
74
69
  @change=${i=>r.handleFiles(i)}
75
70
  multiple
76
71
  accept=${d.join(",")}
77
72
  />
78
- <slot @click=${o?void 0:e} name="browse-file-button">
79
- <nile-button variant="tertiary" ?disabled=${o}>
73
+ <slot @click=${n?void 0:e} name="browse-file-button">
74
+ <nile-button variant="tertiary" ?disabled=${n}>
80
75
  Browse File
81
76
  </nile-button>
82
77
  </slot>
83
78
  </div>
84
- ${c||v.state===s.ERROR?i`<div class="vertical-upload-error">
79
+ ${c||v.state===a.ERROR?i`<div class="vertical-upload-error">
85
80
  <nile-icon name="warning" size="12" color="var(--nile-colors-red-700)"></nile-icon>
86
- ${v.isStringTruncated?i`<nile-tooltip content=${c||t.CUSTOM_ERROR}>
87
- <span>${c||t.CUSTOM_ERROR}</span>
88
- </nile-tooltip>`:i`<span>${c||t.CUSTOM_ERROR}</span>`}
81
+ ${v.isStringTruncated?i`<nile-tooltip content=${c||l.CUSTOM_ERROR}>
82
+ <span>${c||l.CUSTOM_ERROR}</span>
83
+ </nile-tooltip>`:i`<span>${c||l.CUSTOM_ERROR}</span>`}
89
84
  </div>`:i``}
90
85
  </div>
91
- `),m=(i,e,t,s,n,l,a)=>u(i,e,t,!1,s,n,l,a),h=(i,e,t,s,n,l,a)=>u(i,e,t,!0,s,n,l,a),$=(i,e,t,s,n,l,a)=>u(i,e,t,!1,s,n,l,a),b=()=>i`
86
+ `),b=(i,e,t,s,n,l,a)=>m(i,e,t,!1,s,n,l,a),$=(i,e,t,s,n,l,a)=>m(i,e,t,!0,s,n,l,a),h=(i,e,t,s,n,l,a)=>m(i,e,t,!1,s,n,l,a),f=()=>i`
92
87
  <div part="vertical-drag-state" class="vertical-div vertical-drag">
93
88
  <div class="icons-container">
94
89
  <nile-icon
@@ -104,6 +99,6 @@ import{html as i}from"lit";import"./nile-file-upload.css.esm.js";import{T as e}f
104
99
  class="image-icon"
105
100
  ></nile-icon>
106
101
  </div>
107
- <p>${t.DRAG_STATE_DEFAULT}</p>
102
+ <p>${l.DRAG_STATE_DEFAULT}</p>
108
103
  </div>
109
- `;export{v as a,p as b,d as c,m as d,$ as e,b as f,c as g,h};
104
+ `;export{p as a,u as b,v as c,b as d,h as e,f,d as g,$ as h};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-1c49c014.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-file-upload.cjs.js","tslib","./nile-file-upload.css.cjs.js","../internal/nile-element.cjs.js","./utils/drag-drop.util.cjs.js","./utils/file-validation.util.cjs.js","./types/file-upload.enums.cjs.js","lit/decorators.js","./nile-file-upload.template.cjs.js","../lit-html-9b3af046.cjs.js"],function(_export,_context){"use strict";var t,i,e,l,_templateObject,_templateObject2;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture005CjsJs){t=_fixture005CjsJs.f;i=_fixture005CjsJs.a;e=_fixture005CjsJs.h;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFileUploadCjsJs){},function(_tslib){},function(_nileFileUploadCssCjsJs){},function(_internalNileElementCjsJs){},function(_utilsDragDropUtilCjsJs){},function(_utilsFileValidationUtilCjsJs){},function(_typesFileUploadEnumsCjsJs){},function(_litDecoratorsJs){},function(_nileFileUploadTemplateCjsJs){},function(_litHtml003CjsJs){}],execute:function execute(){describe("<nile-file-upload>",function(){var s;beforeEach(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-file-upload></nile-file-upload>"]))));case 2:s=_context2.sent;case 3:case"end":return _context2.stop();}},_callee);}))),it("passes accessibility test",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return i(s).to.be.accessible();case 2:case"end":return _context3.stop();}},_callee2);}))),it("renders with the correct tag name",function(){i(s.tagName.toLowerCase()).to.equal("nile-file-upload");}),it("renders with slot content when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _r$0$textContent;var o,a,r;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Test Content";_context4.next=3;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-file-upload>","</nile-file-upload>"])),o));case 3:s=_context4.sent;a=s.shadowRoot.querySelector("slot");e.exists(a,"Slot should exist");r=a.assignedNodes({flatten:!0});i(r.length).to.be.greaterThan(0),i((_r$0$textContent=r[0].textContent)===null||_r$0$textContent===void 0?void 0:_r$0$textContent.trim()).to.equal(o);case 8:case"end":return _context4.stop();}},_callee3);})));});}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-958445f8.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-file-upload.cjs.js","tslib","./nile-file-upload.css.cjs.js","../internal/nile-element.cjs.js","./utils/drag-drop.util.cjs.js","./utils/file-validation.util.cjs.js","./types/file-upload.enums.cjs.js","lit/decorators.js","./nile-file-upload.template.cjs.js","../lit-html-9b3af046.cjs.js","../directive-7733ffce.cjs.js"],function(_export,_context){"use strict";var i,t,e,l,_templateObject,_templateObject2;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture006CjsJs){i=_fixture006CjsJs.f;t=_fixture006CjsJs.a;e=_fixture006CjsJs.h;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFileUploadCjsJs){},function(_tslib){},function(_nileFileUploadCssCjsJs){},function(_internalNileElementCjsJs){},function(_utilsDragDropUtilCjsJs){},function(_utilsFileValidationUtilCjsJs){},function(_typesFileUploadEnumsCjsJs){},function(_litDecoratorsJs){},function(_nileFileUploadTemplateCjsJs){},function(_litHtml003CjsJs){},function(_directive004CjsJs){}],execute:function execute(){describe("<nile-file-upload>",function(){var s;beforeEach(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return i(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-file-upload></nile-file-upload>"]))));case 2:s=_context2.sent;case 3:case"end":return _context2.stop();}},_callee);}))),it("passes accessibility test",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(s).to.be.accessible();case 2:case"end":return _context3.stop();}},_callee2);}))),it("renders with the correct tag name",function(){t(s.tagName.toLowerCase()).to.equal("nile-file-upload");}),it("renders with slot content when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _a$0$textContent;var o,r,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Test Content";_context4.next=3;return i(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-file-upload>","</nile-file-upload>"])),o));case 3:s=_context4.sent;r=s.shadowRoot.querySelector("slot");e.exists(r,"Slot should exist");a=r.assignedNodes({flatten:!0});t(a.length).to.be.greaterThan(0),t((_a$0$textContent=a[0].textContent)===null||_a$0$textContent===void 0?void 0:_a$0$textContent.trim()).to.equal(o);case 8:case"end":return _context4.stop();}},_callee3);})));});}};});
2
2
  //# sourceMappingURL=nile-file-upload.test.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-file-upload.test.cjs.js","sources":["../../../src/nile-file-upload/nile-file-upload.test.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-upload'; // Just import to register the element\n\ndescribe('<nile-file-upload>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-upload></nile-file-upload>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-upload>${testContent}</nile-file-upload>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"],"names":["describe","element","beforeEach","async","fixture","html","_templateObject","_taggedTemplateLiteral","it","expect","to","be","accessible","_context3","stop","_callee2","tagName","toLowerCase","equal","_asyncToGenerator","_regeneratorRuntime","mark","testContent","_templateObject2","slot","shadowRoot","querySelector","assert","exists","assignedNodes","flatten","length","greaterThan","textContent","trim","_context4","_callee3"],"mappings":"4iTAWAA,SAAS,oBAAsB,CAAA,UAAA,CAC7B,GAAIC,CAAAA,CAEJC,CAAAA,UAAAA,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAWC,SAAAA,QAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACOC,CAAAA,CAAAA,CAAQC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6CAAwC,CAAA,QAApEN,CAAgBG,CAAAA,SAAAA,CAAAA,IAAAA,yBAAAA,SAAAA,CAAAA,IAAAA,MAAAA,OAAAA,GAAoD,EAAA,CAAA,CAGtEI,GAAG,2BAA6BL,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,SAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACxBM,CAAAA,EAAOR,CAASS,CAAAA,CAAAA,EAAAA,CAAGC,GAAGC,UAAY,CAAA,CAAA,yBAAAC,SAAA,CAAAC,IAAA,MAAAC,QAAA,GAAA,EA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n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-upload'; // Just import to register the element\n\ndescribe('<nile-file-upload>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-upload></nile-file-upload>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-upload>${testContent}</nile-file-upload>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"],"names":["describe","element","beforeEach","async","fixture","html","_templateObject","_taggedTemplateLiteral","it","_asyncToGenerator","_regeneratorRuntime","mark","expect","to","be","accessible","_context3","stop","_callee2","tagName","toLowerCase","equal","testContent","_templateObject2","slot","shadowRoot","querySelector","assert","exists","assignedNodes","flatten","length","greaterThan","textContent","trim","_context4","_callee3"],"mappings":"0mTAWAA,QAAS,CAAA,oBAAA,CAAsB,WAC7B,GAAIC,CAAAA,CAAAA,CAEJC,kFAAWC,SAAAA,QAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACOC,CAAAA,EAAQC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6CAAA,CAAwC,QAApEN,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,yBAAAA,SAAAA,CAAAA,IAAAA,MAAAA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pB,oBAAOiB,CAAc,CAAA,CAAA,CAAA,CAAGI,sDAAjBJ,gBAAAA,CAA8BK,IAAQrB,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAGQ,KAAMC,CAAAA,CAAAA,CAAY,yBAAAa,SAAA,CAAAlB,IAAA,MAAAmB,QAAA,GAClE,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- import{f as t,a as i,h as e}from"../fixture-985bba12.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-file-upload.esm.js";import"tslib";import"./nile-file-upload.css.esm.js";import"../internal/nile-element.esm.js";import"./utils/drag-drop.util.esm.js";import"./utils/file-validation.util.esm.js";import"./types/file-upload.enums.esm.js";import"lit/decorators.js";import"./nile-file-upload.template.esm.js";import"../lit-html-39a6718c.esm.js";describe("<nile-file-upload>",(()=>{let s;beforeEach((async()=>{s=await t(l`<nile-file-upload></nile-file-upload>`)})),it("passes accessibility test",(async()=>{await i(s).to.be.accessible()})),it("renders with the correct tag name",(()=>{i(s.tagName.toLowerCase()).to.equal("nile-file-upload")})),it("renders with slot content when provided",(async()=>{const o="Test Content";s=await t(l`<nile-file-upload>${o}</nile-file-upload>`);const a=s.shadowRoot.querySelector("slot");e.exists(a,"Slot should exist");const r=a.assignedNodes({flatten:!0});i(r.length).to.be.greaterThan(0),i(r[0].textContent?.trim()).to.equal(o)}))}));
1
+ import{f as i,a as t,h as e}from"../fixture-985bba12.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-file-upload.esm.js";import"tslib";import"./nile-file-upload.css.esm.js";import"../internal/nile-element.esm.js";import"./utils/drag-drop.util.esm.js";import"./utils/file-validation.util.esm.js";import"./types/file-upload.enums.esm.js";import"lit/decorators.js";import"./nile-file-upload.template.esm.js";import"../lit-html-39a6718c.esm.js";import"../directive-ee0c609c.esm.js";describe("<nile-file-upload>",(()=>{let s;beforeEach((async()=>{s=await i(l`<nile-file-upload></nile-file-upload>`)})),it("passes accessibility test",(async()=>{await t(s).to.be.accessible()})),it("renders with the correct tag name",(()=>{t(s.tagName.toLowerCase()).to.equal("nile-file-upload")})),it("renders with slot content when provided",(async()=>{const o="Test Content";s=await i(l`<nile-file-upload>${o}</nile-file-upload>`);const r=s.shadowRoot.querySelector("slot");e.exists(r,"Slot should exist");const m=r.assignedNodes({flatten:!0});t(m.length).to.be.greaterThan(0),t(m[0].textContent?.trim()).to.equal(o)}))}));