@leavittsoftware/web 8.7.2 → 8.7.3

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 (558) hide show
  1. package/leavitt/api-service/HttpError.d.ts +11 -0
  2. package/leavitt/api-service/HttpError.js +2 -0
  3. package/leavitt/api-service/HttpError.js.map +1 -0
  4. package/leavitt/api-service/api-service.d.ts +52 -0
  5. package/leavitt/api-service/api-service.js +369 -0
  6. package/leavitt/api-service/api-service.js.map +1 -0
  7. package/leavitt/api-service/authenticated-token-provider.d.ts +5 -0
  8. package/leavitt/api-service/authenticated-token-provider.js +7 -0
  9. package/leavitt/api-service/authenticated-token-provider.js.map +1 -0
  10. package/leavitt/api-service/bearer-token-provider.d.ts +4 -0
  11. package/leavitt/api-service/bearer-token-provider.js +2 -0
  12. package/leavitt/api-service/bearer-token-provider.js.map +1 -0
  13. package/leavitt/api-service/blob-response.d.ts +8 -0
  14. package/leavitt/api-service/blob-response.js +8 -0
  15. package/leavitt/api-service/blob-response.js.map +1 -0
  16. package/leavitt/api-service/no-authentication-token-provider.d.ts +5 -0
  17. package/leavitt/api-service/no-authentication-token-provider.js +6 -0
  18. package/leavitt/api-service/no-authentication-token-provider.js.map +1 -0
  19. package/leavitt/api-service/object-to-form-data.d.ts +9 -0
  20. package/leavitt/api-service/object-to-form-data.js +42 -0
  21. package/leavitt/api-service/object-to-form-data.js.map +1 -0
  22. package/leavitt/api-service/object-to-form-data.test.d.ts +2 -0
  23. package/leavitt/api-service/object-to-form-data.test.js +229 -0
  24. package/leavitt/api-service/object-to-form-data.test.js.map +1 -0
  25. package/leavitt/api-service/odata-dto.d.ts +6 -0
  26. package/leavitt/api-service/odata-dto.js +7 -0
  27. package/leavitt/api-service/odata-dto.js.map +1 -0
  28. package/leavitt/api-service/odata-model-info.d.ts +5 -0
  29. package/leavitt/api-service/odata-model-info.js +7 -0
  30. package/leavitt/api-service/odata-model-info.js.map +1 -0
  31. package/leavitt/api-service/odata-response.d.ts +15 -0
  32. package/leavitt/api-service/odata-response.js +50 -0
  33. package/leavitt/api-service/odata-response.js.map +1 -0
  34. package/leavitt/api-service/status-codes.d.ts +2 -0
  35. package/leavitt/api-service/status-codes.js +44 -0
  36. package/leavitt/api-service/status-codes.js.map +1 -0
  37. package/leavitt/app/app-logo.d.ts +12 -0
  38. package/leavitt/app/app-logo.js +142 -0
  39. package/leavitt/app/app-logo.js.map +1 -0
  40. package/leavitt/app/app-main-content-container.d.ts +10 -0
  41. package/leavitt/app/app-main-content-container.js +65 -0
  42. package/leavitt/app/app-main-content-container.js.map +1 -0
  43. package/leavitt/app/app-navigation-footer.d.ts +18 -0
  44. package/leavitt/app/app-navigation-footer.js +142 -0
  45. package/leavitt/app/app-navigation-footer.js.map +1 -0
  46. package/leavitt/app/app-navigation-header.d.ts +22 -0
  47. package/leavitt/app/app-navigation-header.js +239 -0
  48. package/leavitt/app/app-navigation-header.js.map +1 -0
  49. package/leavitt/app/app-width-limiter.d.ts +7 -0
  50. package/leavitt/app/app-width-limiter.js +39 -0
  51. package/leavitt/app/app-width-limiter.js.map +1 -0
  52. package/leavitt/app/contexts/main-menu-position-context.d.ts +4 -0
  53. package/leavitt/app/contexts/main-menu-position-context.js +3 -0
  54. package/leavitt/app/contexts/main-menu-position-context.js.map +1 -0
  55. package/leavitt/company-select/company-select.d.ts +53 -0
  56. package/leavitt/company-select/company-select.js +181 -0
  57. package/leavitt/company-select/company-select.js.map +1 -0
  58. package/leavitt/email-history-viewer/email-history-view-list-filter-dialog.d.ts +394 -0
  59. package/leavitt/email-history-viewer/email-history-view-list-filter-dialog.js +233 -0
  60. package/leavitt/email-history-viewer/email-history-view-list-filter-dialog.js.map +1 -0
  61. package/leavitt/email-history-viewer/email-history-viewer-filled-filter-dialog.d.ts +397 -0
  62. package/leavitt/email-history-viewer/email-history-viewer-filled-filter-dialog.js +244 -0
  63. package/leavitt/email-history-viewer/email-history-viewer-filled-filter-dialog.js.map +1 -0
  64. package/leavitt/email-history-viewer/email-history-viewer-filled.d.ts +408 -0
  65. package/leavitt/email-history-viewer/email-history-viewer-filled.js +381 -0
  66. package/leavitt/email-history-viewer/email-history-viewer-filled.js.map +1 -0
  67. package/leavitt/email-history-viewer/email-history-viewer.d.ts +412 -0
  68. package/leavitt/email-history-viewer/email-history-viewer.js +373 -0
  69. package/leavitt/email-history-viewer/email-history-viewer.js.map +1 -0
  70. package/leavitt/email-history-viewer/view-email-template-info-dialog.d.ts +386 -0
  71. package/leavitt/email-history-viewer/view-email-template-info-dialog.js +154 -0
  72. package/leavitt/email-history-viewer/view-email-template-info-dialog.js.map +1 -0
  73. package/leavitt/email-history-viewer/view-sent-email-dialog.d.ts +388 -0
  74. package/leavitt/email-history-viewer/view-sent-email-dialog.js +145 -0
  75. package/leavitt/email-history-viewer/view-sent-email-dialog.js.map +1 -0
  76. package/leavitt/error-page/error-page.d.ts +24 -0
  77. package/leavitt/error-page/error-page.js +185 -0
  78. package/leavitt/error-page/error-page.js.map +1 -0
  79. package/leavitt/file-explorer/add-folder-modal.d.ts +390 -0
  80. package/leavitt/file-explorer/add-folder-modal.js +135 -0
  81. package/leavitt/file-explorer/add-folder-modal.js.map +1 -0
  82. package/leavitt/file-explorer/events/file-explorer-events.d.ts +4 -0
  83. package/leavitt/file-explorer/events/file-explorer-events.js +5 -0
  84. package/leavitt/file-explorer/events/file-explorer-events.js.map +1 -0
  85. package/leavitt/file-explorer/file-explorer-error.d.ts +7 -0
  86. package/leavitt/file-explorer/file-explorer-error.js +38 -0
  87. package/leavitt/file-explorer/file-explorer-error.js.map +1 -0
  88. package/leavitt/file-explorer/file-explorer-image.d.ts +9 -0
  89. package/leavitt/file-explorer/file-explorer-image.js +54 -0
  90. package/leavitt/file-explorer/file-explorer-image.js.map +1 -0
  91. package/leavitt/file-explorer/file-explorer-no-files.d.ts +7 -0
  92. package/leavitt/file-explorer/file-explorer-no-files.js +38 -0
  93. package/leavitt/file-explorer/file-explorer-no-files.js.map +1 -0
  94. package/leavitt/file-explorer/file-explorer-no-permission.d.ts +7 -0
  95. package/leavitt/file-explorer/file-explorer-no-permission.js +38 -0
  96. package/leavitt/file-explorer/file-explorer-no-permission.js.map +1 -0
  97. package/leavitt/file-explorer/file-explorer.d.ts +446 -0
  98. package/leavitt/file-explorer/file-explorer.js +889 -0
  99. package/leavitt/file-explorer/file-explorer.js.map +1 -0
  100. package/leavitt/file-explorer/file-list-item.d.ts +16 -0
  101. package/leavitt/file-explorer/file-list-item.js +300 -0
  102. package/leavitt/file-explorer/file-list-item.js.map +1 -0
  103. package/leavitt/file-explorer/file-modal.d.ts +393 -0
  104. package/leavitt/file-explorer/file-modal.js +323 -0
  105. package/leavitt/file-explorer/file-modal.js.map +1 -0
  106. package/leavitt/file-explorer/folder-list-item.d.ts +15 -0
  107. package/leavitt/file-explorer/folder-list-item.js +210 -0
  108. package/leavitt/file-explorer/folder-list-item.js.map +1 -0
  109. package/leavitt/file-explorer/folder-modal.d.ts +391 -0
  110. package/leavitt/file-explorer/folder-modal.js +226 -0
  111. package/leavitt/file-explorer/folder-modal.js.map +1 -0
  112. package/leavitt/file-explorer/helpers/file-types.d.ts +2 -0
  113. package/leavitt/file-explorer/helpers/file-types.js +19 -0
  114. package/leavitt/file-explorer/helpers/file-types.js.map +1 -0
  115. package/leavitt/file-explorer/helpers/format-bytes.d.ts +2 -0
  116. package/leavitt/file-explorer/helpers/format-bytes.js +8 -0
  117. package/leavitt/file-explorer/helpers/format-bytes.js.map +1 -0
  118. package/leavitt/person-company-select/person-company-select.d.ts +43 -0
  119. package/leavitt/person-company-select/person-company-select.js +198 -0
  120. package/leavitt/person-company-select/person-company-select.js.map +1 -0
  121. package/leavitt/person-group-select/people-group-icons.d.ts +5 -0
  122. package/leavitt/person-group-select/people-group-icons.js +87 -0
  123. package/leavitt/person-group-select/people-group-icons.js.map +1 -0
  124. package/leavitt/person-group-select/person-group-select.d.ts +43 -0
  125. package/leavitt/person-group-select/person-group-select.js +207 -0
  126. package/leavitt/person-group-select/person-group-select.js.map +1 -0
  127. package/leavitt/person-select/person-select.d.ts +46 -0
  128. package/leavitt/person-select/person-select.js +203 -0
  129. package/leavitt/person-select/person-select.js.map +1 -0
  130. package/leavitt/profile-picture/profile-picture-menu.d.ts +48 -0
  131. package/leavitt/profile-picture/profile-picture-menu.js +248 -0
  132. package/leavitt/profile-picture/profile-picture-menu.js.map +1 -0
  133. package/leavitt/profile-picture/profile-picture.d.ts +44 -0
  134. package/leavitt/profile-picture/profile-picture.js +208 -0
  135. package/leavitt/profile-picture/profile-picture.js.map +1 -0
  136. package/leavitt/service-worker-notifier/service-worker-notifier.d.ts +14 -0
  137. package/leavitt/service-worker-notifier/service-worker-notifier.js +180 -0
  138. package/leavitt/service-worker-notifier/service-worker-notifier.js.map +1 -0
  139. package/leavitt/theme/theme-preference-event.d.ts +4 -0
  140. package/leavitt/theme/theme-preference-event.js +5 -0
  141. package/leavitt/theme/theme-preference-event.js.map +1 -0
  142. package/leavitt/theme/theme-preference.d.ts +8 -0
  143. package/leavitt/theme/theme-preference.js +26 -0
  144. package/leavitt/theme/theme-preference.js.map +1 -0
  145. package/leavitt/user-feedback/provide-feedback-dialog.d.ts +386 -0
  146. package/leavitt/user-feedback/provide-feedback-dialog.js +150 -0
  147. package/leavitt/user-feedback/provide-feedback-dialog.js.map +1 -0
  148. package/leavitt/user-feedback/report-a-problem-dialog.d.ts +388 -0
  149. package/leavitt/user-feedback/report-a-problem-dialog.js +170 -0
  150. package/leavitt/user-feedback/report-a-problem-dialog.js.map +1 -0
  151. package/leavitt/user-feedback/user-feedback.d.ts +390 -0
  152. package/leavitt/user-feedback/user-feedback.js +222 -0
  153. package/leavitt/user-feedback/user-feedback.js.map +1 -0
  154. package/leavitt/user-manager/LssJwtToken.d.ts +24 -0
  155. package/leavitt/user-manager/LssJwtToken.js +2 -0
  156. package/leavitt/user-manager/LssJwtToken.js.map +1 -0
  157. package/leavitt/user-manager/auth-zero-lg-access-token.d.ts +15 -0
  158. package/leavitt/user-manager/auth-zero-lg-access-token.js +2 -0
  159. package/leavitt/user-manager/auth-zero-lg-access-token.js.map +1 -0
  160. package/leavitt/user-manager/auth-zero-lg-identity-token.d.ts +24 -0
  161. package/leavitt/user-manager/auth-zero-lg-identity-token.js +2 -0
  162. package/leavitt/user-manager/auth-zero-lg-identity-token.js.map +1 -0
  163. package/leavitt/user-manager/auth-zero-lg-identity.d.ts +24 -0
  164. package/leavitt/user-manager/auth-zero-lg-identity.js +2 -0
  165. package/leavitt/user-manager/auth-zero-lg-identity.js.map +1 -0
  166. package/leavitt/user-manager/auth-zero-lg-user-manager.d.ts +18 -0
  167. package/leavitt/user-manager/auth-zero-lg-user-manager.js +382 -0
  168. package/leavitt/user-manager/auth-zero-lg-user-manager.js.map +1 -0
  169. package/leavitt/user-manager/user-manager-events.d.ts +5 -0
  170. package/leavitt/user-manager/user-manager-events.js +7 -0
  171. package/leavitt/user-manager/user-manager-events.js.map +1 -0
  172. package/leavitt/user-manager/user-manager.d.ts +47 -0
  173. package/leavitt/user-manager/user-manager.js +443 -0
  174. package/leavitt/user-manager/user-manager.js.map +1 -0
  175. package/package.json +2 -2
  176. package/titanium/access-denied-page/access-denied-page.d.ts +16 -0
  177. package/titanium/access-denied-page/access-denied-page.js +359 -0
  178. package/titanium/access-denied-page/access-denied-page.js.map +1 -0
  179. package/titanium/address-input/address-input.d.ts +31 -0
  180. package/titanium/address-input/address-input.js +104 -0
  181. package/titanium/address-input/address-input.js.map +1 -0
  182. package/titanium/address-input/google-address-input.d.ts +35 -0
  183. package/titanium/address-input/google-address-input.js +242 -0
  184. package/titanium/address-input/google-address-input.js.map +1 -0
  185. package/titanium/address-input/manual-address-dialog.d.ts +39 -0
  186. package/titanium/address-input/manual-address-dialog.js +350 -0
  187. package/titanium/address-input/manual-address-dialog.js.map +1 -0
  188. package/titanium/address-input/types/address-input-address.d.ts +17 -0
  189. package/titanium/address-input/types/address-input-address.js +2 -0
  190. package/titanium/address-input/types/address-input-address.js.map +1 -0
  191. package/titanium/address-input/utils/address-to-string.d.ts +3 -0
  192. package/titanium/address-input/utils/address-to-string.js +26 -0
  193. package/titanium/address-input/utils/address-to-string.js.map +1 -0
  194. package/titanium/address-input/utils/place-result-to-address.d.ts +3 -0
  195. package/titanium/address-input/utils/place-result-to-address.js +46 -0
  196. package/titanium/address-input/utils/place-result-to-address.js.map +1 -0
  197. package/titanium/address-input/utils/validate-street.d.ts +2 -0
  198. package/titanium/address-input/utils/validate-street.js +8 -0
  199. package/titanium/address-input/utils/validate-street.js.map +1 -0
  200. package/titanium/card/card.d.ts +24 -0
  201. package/titanium/card/card.js +188 -0
  202. package/titanium/card/card.js.map +1 -0
  203. package/titanium/chip/chip.d.ts +57 -0
  204. package/titanium/chip/chip.js +289 -0
  205. package/titanium/chip/chip.js.map +1 -0
  206. package/titanium/chip-multi-select/chip-multi-select.d.ts +71 -0
  207. package/titanium/chip-multi-select/chip-multi-select.js +228 -0
  208. package/titanium/chip-multi-select/chip-multi-select.js.map +1 -0
  209. package/titanium/circle-loading-indicator/circle-loading-indicator.d.ts +19 -0
  210. package/titanium/circle-loading-indicator/circle-loading-indicator.js +122 -0
  211. package/titanium/circle-loading-indicator/circle-loading-indicator.js.map +1 -0
  212. package/titanium/collapsible-container/collapsible-container.d.ts +12 -0
  213. package/titanium/collapsible-container/collapsible-container.js +115 -0
  214. package/titanium/collapsible-container/collapsible-container.js.map +1 -0
  215. package/titanium/confirm-dialog/confirm-dialog-open-event.d.ts +10 -0
  216. package/titanium/confirm-dialog/confirm-dialog-open-event.js +12 -0
  217. package/titanium/confirm-dialog/confirm-dialog-open-event.js.map +1 -0
  218. package/titanium/confirm-dialog/confirm-dialog.d.ts +25 -0
  219. package/titanium/confirm-dialog/confirm-dialog.js +104 -0
  220. package/titanium/confirm-dialog/confirm-dialog.js.map +1 -0
  221. package/titanium/confirmation-dialog/confirmation-dialog.d.ts +19 -0
  222. package/titanium/confirmation-dialog/confirmation-dialog.js +124 -0
  223. package/titanium/confirmation-dialog/confirmation-dialog.js.map +1 -0
  224. package/titanium/data-table/data-table-action-bar.d.ts +11 -0
  225. package/titanium/data-table/data-table-action-bar.js +216 -0
  226. package/titanium/data-table/data-table-action-bar.js.map +1 -0
  227. package/titanium/data-table/data-table-content-styles.d.ts +2 -0
  228. package/titanium/data-table/data-table-content-styles.js +48 -0
  229. package/titanium/data-table/data-table-content-styles.js.map +1 -0
  230. package/titanium/data-table/data-table-core-reorder-dialog.d.ts +391 -0
  231. package/titanium/data-table/data-table-core-reorder-dialog.js +170 -0
  232. package/titanium/data-table/data-table-core-reorder-dialog.js.map +1 -0
  233. package/titanium/data-table/data-table-core-reorder-item.d.ts +15 -0
  234. package/titanium/data-table/data-table-core-reorder-item.js +154 -0
  235. package/titanium/data-table/data-table-core-reorder-item.js.map +1 -0
  236. package/titanium/data-table/data-table-core-settings-choose-columns-dialog.d.ts +22 -0
  237. package/titanium/data-table/data-table-core-settings-choose-columns-dialog.js +164 -0
  238. package/titanium/data-table/data-table-core-settings-choose-columns-dialog.js.map +1 -0
  239. package/titanium/data-table/data-table-core-settings-choose-columns-item.d.ts +14 -0
  240. package/titanium/data-table/data-table-core-settings-choose-columns-item.js +96 -0
  241. package/titanium/data-table/data-table-core-settings-choose-columns-item.js.map +1 -0
  242. package/titanium/data-table/data-table-core-settings-sort-dialog.d.ts +22 -0
  243. package/titanium/data-table/data-table-core-settings-sort-dialog.js +231 -0
  244. package/titanium/data-table/data-table-core-settings-sort-dialog.js.map +1 -0
  245. package/titanium/data-table/data-table-core-settings-sort-item.d.ts +17 -0
  246. package/titanium/data-table/data-table-core-settings-sort-item.js +171 -0
  247. package/titanium/data-table/data-table-core-settings-sort-item.js.map +1 -0
  248. package/titanium/data-table/data-table-core.d.ts +458 -0
  249. package/titanium/data-table/data-table-core.js +745 -0
  250. package/titanium/data-table/data-table-core.js.map +1 -0
  251. package/titanium/data-table/data-table-header.d.ts +68 -0
  252. package/titanium/data-table/data-table-header.js +295 -0
  253. package/titanium/data-table/data-table-header.js.map +1 -0
  254. package/titanium/data-table/data-table-item.d.ts +99 -0
  255. package/titanium/data-table/data-table-item.js +561 -0
  256. package/titanium/data-table/data-table-item.js.map +1 -0
  257. package/titanium/data-table/data-table.d.ts +127 -0
  258. package/titanium/data-table/data-table.js +688 -0
  259. package/titanium/data-table/data-table.js.map +1 -0
  260. package/titanium/data-table/draggable-item-base.d.ts +30 -0
  261. package/titanium/data-table/draggable-item-base.js +324 -0
  262. package/titanium/data-table/draggable-item-base.js.map +1 -0
  263. package/titanium/data-table/filter-controller.d.ts +24 -0
  264. package/titanium/data-table/filter-controller.js +122 -0
  265. package/titanium/data-table/filter-controller.js.map +1 -0
  266. package/titanium/data-table/filter.d.ts +8 -0
  267. package/titanium/data-table/filter.js +11 -0
  268. package/titanium/data-table/filter.js.map +1 -0
  269. package/titanium/data-table/page-control.d.ts +59 -0
  270. package/titanium/data-table/page-control.js +236 -0
  271. package/titanium/data-table/page-control.js.map +1 -0
  272. package/titanium/date-input/date-input.d.ts +149 -0
  273. package/titanium/date-input/date-input.js +548 -0
  274. package/titanium/date-input/date-input.js.map +1 -0
  275. package/titanium/date-range-selector/date-range-change-event.d.ts +8 -0
  276. package/titanium/date-range-selector/date-range-change-event.js +10 -0
  277. package/titanium/date-range-selector/date-range-change-event.js.map +1 -0
  278. package/titanium/date-range-selector/date-range-selector.d.ts +71 -0
  279. package/titanium/date-range-selector/date-range-selector.js +479 -0
  280. package/titanium/date-range-selector/date-range-selector.js.map +1 -0
  281. package/titanium/date-range-selector/types/date-range-key.d.ts +2 -0
  282. package/titanium/date-range-selector/types/date-range-key.js +2 -0
  283. package/titanium/date-range-selector/types/date-range-key.js.map +1 -0
  284. package/titanium/date-range-selector/types/date-range-option.d.ts +8 -0
  285. package/titanium/date-range-selector/types/date-range-option.js +2 -0
  286. package/titanium/date-range-selector/types/date-range-option.js.map +1 -0
  287. package/titanium/date-range-selector/types/date-ranges.d.ts +4 -0
  288. package/titanium/date-range-selector/types/date-ranges.js +133 -0
  289. package/titanium/date-range-selector/types/date-ranges.js.map +1 -0
  290. package/titanium/date-range-selector/types/range-label.d.ts +5 -0
  291. package/titanium/date-range-selector/types/range-label.js +25 -0
  292. package/titanium/date-range-selector/types/range-label.js.map +1 -0
  293. package/titanium/drawer/drawer.d.ts +52 -0
  294. package/titanium/drawer/drawer.js +417 -0
  295. package/titanium/drawer/drawer.js.map +1 -0
  296. package/titanium/duration-input/duration-input.d.ts +31 -0
  297. package/titanium/duration-input/duration-input.js +126 -0
  298. package/titanium/duration-input/duration-input.js.map +1 -0
  299. package/titanium/duration-input/filled-duration-input.d.ts +31 -0
  300. package/titanium/duration-input/filled-duration-input.js +123 -0
  301. package/titanium/duration-input/filled-duration-input.js.map +1 -0
  302. package/titanium/duration-input/human-interval.d.ts +19 -0
  303. package/titanium/duration-input/human-interval.js +73 -0
  304. package/titanium/duration-input/human-interval.js.map +1 -0
  305. package/titanium/duration-input/outlined-duration-input.d.ts +30 -0
  306. package/titanium/duration-input/outlined-duration-input.js +109 -0
  307. package/titanium/duration-input/outlined-duration-input.js.map +1 -0
  308. package/titanium/error-page/error-page.d.ts +16 -0
  309. package/titanium/error-page/error-page.js +95 -0
  310. package/titanium/error-page/error-page.js.map +1 -0
  311. package/titanium/event-bus/event-bus.d.ts +10 -0
  312. package/titanium/event-bus/event-bus.js +52 -0
  313. package/titanium/event-bus/event-bus.js.map +1 -0
  314. package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.d.ts +168 -0
  315. package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js +373 -0
  316. package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js.map +1 -0
  317. package/titanium/full-page-loading-indicator/full-page-loading-indicator.d.ts +17 -0
  318. package/titanium/full-page-loading-indicator/full-page-loading-indicator.js +121 -0
  319. package/titanium/full-page-loading-indicator/full-page-loading-indicator.js.map +1 -0
  320. package/titanium/hacks/dialog-navigation-hack.d.ts +8 -0
  321. package/titanium/hacks/dialog-navigation-hack.js +22 -0
  322. package/titanium/hacks/dialog-navigation-hack.js.map +1 -0
  323. package/titanium/hacks/dialog-overflow-hacks.d.ts +4 -0
  324. package/titanium/hacks/dialog-overflow-hacks.js +21 -0
  325. package/titanium/hacks/dialog-overflow-hacks.js.map +1 -0
  326. package/titanium/hacks/dialog-zindex-hack.d.ts +11 -0
  327. package/titanium/hacks/dialog-zindex-hack.js +20 -0
  328. package/titanium/hacks/dialog-zindex-hack.js.map +1 -0
  329. package/titanium/hacks/report-validity-if-error.d.ts +4 -0
  330. package/titanium/hacks/report-validity-if-error.js +6 -0
  331. package/titanium/hacks/report-validity-if-error.js.map +1 -0
  332. package/titanium/header/header.d.ts +39 -0
  333. package/titanium/header/header.js +167 -0
  334. package/titanium/header/header.js.map +1 -0
  335. package/titanium/helpers/address/country-abbr-to-titlecase.d.ts +5 -0
  336. package/titanium/helpers/address/country-abbr-to-titlecase.js +243 -0
  337. package/titanium/helpers/address/country-abbr-to-titlecase.js.map +1 -0
  338. package/titanium/helpers/address/format-address.d.ts +22 -0
  339. package/titanium/helpers/address/format-address.js +33 -0
  340. package/titanium/helpers/address/format-address.js.map +1 -0
  341. package/titanium/helpers/address/get-country-name.d.ts +2 -0
  342. package/titanium/helpers/address/get-country-name.js +12 -0
  343. package/titanium/helpers/address/get-country-name.js.map +1 -0
  344. package/titanium/helpers/address/states-abbr-to-titlecase.d.ts +9 -0
  345. package/titanium/helpers/address/states-abbr-to-titlecase.js +117 -0
  346. package/titanium/helpers/address/states-abbr-to-titlecase.js.map +1 -0
  347. package/titanium/helpers/csv/convert-array-to-csv.d.ts +2 -0
  348. package/titanium/helpers/csv/convert-array-to-csv.js +35 -0
  349. package/titanium/helpers/csv/convert-array-to-csv.js.map +1 -0
  350. package/titanium/helpers/csv/flatten-object.d.ts +2 -0
  351. package/titanium/helpers/csv/flatten-object.js +64 -0
  352. package/titanium/helpers/csv/flatten-object.js.map +1 -0
  353. package/titanium/helpers/csv/start-csv-download.d.ts +2 -0
  354. package/titanium/helpers/csv/start-csv-download.js +11 -0
  355. package/titanium/helpers/csv/start-csv-download.js.map +1 -0
  356. package/titanium/helpers/debouncer.d.ts +13 -0
  357. package/titanium/helpers/debouncer.js +33 -0
  358. package/titanium/helpers/debouncer.js.map +1 -0
  359. package/titanium/helpers/delay.d.ts +2 -0
  360. package/titanium/helpers/delay.js +6 -0
  361. package/titanium/helpers/delay.js.map +1 -0
  362. package/titanium/helpers/escape-term.d.ts +2 -0
  363. package/titanium/helpers/escape-term.js +2 -0
  364. package/titanium/helpers/escape-term.js.map +1 -0
  365. package/titanium/helpers/find-scrollable-parent.d.ts +2 -0
  366. package/titanium/helpers/find-scrollable-parent.js +13 -0
  367. package/titanium/helpers/find-scrollable-parent.js.map +1 -0
  368. package/titanium/helpers/get-cdn-Inline-url.d.ts +4 -0
  369. package/titanium/helpers/get-cdn-Inline-url.js +27 -0
  370. package/titanium/helpers/get-cdn-Inline-url.js.map +1 -0
  371. package/titanium/helpers/get-cdn-download-url.d.ts +3 -0
  372. package/titanium/helpers/get-cdn-download-url.js +12 -0
  373. package/titanium/helpers/get-cdn-download-url.js.map +1 -0
  374. package/titanium/helpers/get-company-logo-url.d.ts +3 -0
  375. package/titanium/helpers/get-company-logo-url.js +6 -0
  376. package/titanium/helpers/get-company-logo-url.js.map +1 -0
  377. package/titanium/helpers/get-company-mark-url.d.ts +3 -0
  378. package/titanium/helpers/get-company-mark-url.js +6 -0
  379. package/titanium/helpers/get-company-mark-url.js.map +1 -0
  380. package/titanium/helpers/get-search-token.d.ts +2 -0
  381. package/titanium/helpers/get-search-token.js +17 -0
  382. package/titanium/helpers/get-search-token.js.map +1 -0
  383. package/titanium/helpers/group-by.d.ts +2 -0
  384. package/titanium/helpers/group-by.js +7 -0
  385. package/titanium/helpers/group-by.js.map +1 -0
  386. package/titanium/helpers/helpers.d.ts +15 -0
  387. package/titanium/helpers/helpers.js +15 -0
  388. package/titanium/helpers/helpers.js.map +1 -0
  389. package/titanium/helpers/install-media-query-watcher.d.ts +2 -0
  390. package/titanium/helpers/install-media-query-watcher.js +6 -0
  391. package/titanium/helpers/install-media-query-watcher.js.map +1 -0
  392. package/titanium/helpers/is-development.d.ts +3 -0
  393. package/titanium/helpers/is-development.js +12 -0
  394. package/titanium/helpers/is-development.js.map +1 -0
  395. package/titanium/helpers/join.d.ts +2 -0
  396. package/titanium/helpers/join.js +5 -0
  397. package/titanium/helpers/join.js.map +1 -0
  398. package/titanium/helpers/load-while.d.ts +374 -0
  399. package/titanium/helpers/load-while.js +28 -0
  400. package/titanium/helpers/load-while.js.map +1 -0
  401. package/titanium/helpers/middle-ellipsis.d.ts +2 -0
  402. package/titanium/helpers/middle-ellipsis.js +7 -0
  403. package/titanium/helpers/middle-ellipsis.js.map +1 -0
  404. package/titanium/helpers/not-null-or-undefined.d.ts +2 -0
  405. package/titanium/helpers/not-null-or-undefined.js +4 -0
  406. package/titanium/helpers/not-null-or-undefined.js.map +1 -0
  407. package/titanium/helpers/not-null.d.ts +2 -0
  408. package/titanium/helpers/not-null.js +4 -0
  409. package/titanium/helpers/not-null.js.map +1 -0
  410. package/titanium/helpers/not-undefined.d.ts +2 -0
  411. package/titanium/helpers/not-undefined.js +4 -0
  412. package/titanium/helpers/not-undefined.js.map +1 -0
  413. package/titanium/helpers/pending-state-catcher.d.ts +416 -0
  414. package/titanium/helpers/pending-state-catcher.js +88 -0
  415. package/titanium/helpers/pending-state-catcher.js.map +1 -0
  416. package/titanium/helpers/phone-numbers/format-phone-number-dashes.d.ts +2 -0
  417. package/titanium/helpers/phone-numbers/format-phone-number-dashes.js +9 -0
  418. package/titanium/helpers/phone-numbers/format-phone-number-dashes.js.map +1 -0
  419. package/titanium/helpers/phone-numbers/format-phone-number-dots.d.ts +2 -0
  420. package/titanium/helpers/phone-numbers/format-phone-number-dots.js +9 -0
  421. package/titanium/helpers/phone-numbers/format-phone-number-dots.js.map +1 -0
  422. package/titanium/helpers/phone-numbers/format-phone-number-numbers-only.d.ts +2 -0
  423. package/titanium/helpers/phone-numbers/format-phone-number-numbers-only.js +9 -0
  424. package/titanium/helpers/phone-numbers/format-phone-number-numbers-only.js.map +1 -0
  425. package/titanium/helpers/phone-numbers/format-phone-number.d.ts +2 -0
  426. package/titanium/helpers/phone-numbers/format-phone-number.js +9 -0
  427. package/titanium/helpers/phone-numbers/format-phone-number.js.map +1 -0
  428. package/titanium/helpers/phone-numbers/phone-mask.d.ts +2 -0
  429. package/titanium/helpers/phone-numbers/phone-mask.js +5 -0
  430. package/titanium/helpers/phone-numbers/phone-mask.js.map +1 -0
  431. package/titanium/helpers/phone-numbers/try-format-phone-number.d.ts +2 -0
  432. package/titanium/helpers/phone-numbers/try-format-phone-number.js +9 -0
  433. package/titanium/helpers/phone-numbers/try-format-phone-number.js.map +1 -0
  434. package/titanium/icon-picker/icon-picker.d.ts +37 -0
  435. package/titanium/icon-picker/icon-picker.js +160 -0
  436. package/titanium/icon-picker/icon-picker.js.map +1 -0
  437. package/titanium/icon-picker/material-symbols.d.ts +3 -0
  438. package/titanium/icon-picker/material-symbols.js +3297 -0
  439. package/titanium/icon-picker/material-symbols.js.map +1 -0
  440. package/titanium/input-validator/filled-input-validator.d.ts +20 -0
  441. package/titanium/input-validator/filled-input-validator.js +48 -0
  442. package/titanium/input-validator/filled-input-validator.js.map +1 -0
  443. package/titanium/input-validator/input-validator.d.ts +20 -0
  444. package/titanium/input-validator/input-validator.js +48 -0
  445. package/titanium/input-validator/input-validator.js.map +1 -0
  446. package/titanium/input-validator/outlined-input-validator.d.ts +20 -0
  447. package/titanium/input-validator/outlined-input-validator.js +48 -0
  448. package/titanium/input-validator/outlined-input-validator.js.map +1 -0
  449. package/titanium/profile-picture-stack/profile-picture-stack.d.ts +51 -0
  450. package/titanium/profile-picture-stack/profile-picture-stack.js +212 -0
  451. package/titanium/profile-picture-stack/profile-picture-stack.js.map +1 -0
  452. package/titanium/search-input/filled-search-input.d.ts +15 -0
  453. package/titanium/search-input/filled-search-input.js +111 -0
  454. package/titanium/search-input/filled-search-input.js.map +1 -0
  455. package/titanium/search-input/search-input.d.ts +29 -0
  456. package/titanium/search-input/search-input.js +123 -0
  457. package/titanium/search-input/search-input.js.map +1 -0
  458. package/titanium/service-worker-notifier/service-worker-notifier.d.ts +9 -0
  459. package/titanium/service-worker-notifier/service-worker-notifier.js +58 -0
  460. package/titanium/service-worker-notifier/service-worker-notifier.js.map +1 -0
  461. package/titanium/show-hide/show-hide.d.ts +41 -0
  462. package/titanium/show-hide/show-hide.js +171 -0
  463. package/titanium/show-hide/show-hide.js.map +1 -0
  464. package/titanium/single-select-base/single-select-base.d.ts +514 -0
  465. package/titanium/single-select-base/single-select-base.js +549 -0
  466. package/titanium/single-select-base/single-select-base.js.map +1 -0
  467. package/titanium/smart-attachment-input/crop-and-save-image-dialog.d.ts +422 -0
  468. package/titanium/smart-attachment-input/crop-and-save-image-dialog.js +467 -0
  469. package/titanium/smart-attachment-input/crop-and-save-image-dialog.js.map +1 -0
  470. package/titanium/smart-attachment-input/cropper-styles.d.ts +3 -0
  471. package/titanium/smart-attachment-input/cropper-styles.js +318 -0
  472. package/titanium/smart-attachment-input/cropper-styles.js.map +1 -0
  473. package/titanium/smart-attachment-input/image-formats.d.ts +5 -0
  474. package/titanium/smart-attachment-input/image-formats.js +37 -0
  475. package/titanium/smart-attachment-input/image-formats.js.map +1 -0
  476. package/titanium/smart-attachment-input/image-preview-dialog.d.ts +21 -0
  477. package/titanium/smart-attachment-input/image-preview-dialog.js +96 -0
  478. package/titanium/smart-attachment-input/image-preview-dialog.js.map +1 -0
  479. package/titanium/smart-attachment-input/images/duck-loader.gif +0 -0
  480. package/titanium/smart-attachment-input/images/icon-other-bg.png +0 -0
  481. package/titanium/smart-attachment-input/images/icon-other.png +0 -0
  482. package/titanium/smart-attachment-input/images/icon-pdf-bg.png +0 -0
  483. package/titanium/smart-attachment-input/images/icon-pdf.png +0 -0
  484. package/titanium/smart-attachment-input/smart-attachment-input.d.ts +133 -0
  485. package/titanium/smart-attachment-input/smart-attachment-input.js +497 -0
  486. package/titanium/smart-attachment-input/smart-attachment-input.js.map +1 -0
  487. package/titanium/smart-attachment-input/type/smart-attachment.d.ts +7 -0
  488. package/titanium/smart-attachment-input/type/smart-attachment.js +2 -0
  489. package/titanium/smart-attachment-input/type/smart-attachment.js.map +1 -0
  490. package/titanium/snackbar/show-snackbar-event.d.ts +9 -0
  491. package/titanium/snackbar/show-snackbar-event.js +9 -0
  492. package/titanium/snackbar/show-snackbar-event.js.map +1 -0
  493. package/titanium/snackbar/snackbar-stack.d.ts +24 -0
  494. package/titanium/snackbar/snackbar-stack.js +99 -0
  495. package/titanium/snackbar/snackbar-stack.js.map +1 -0
  496. package/titanium/snackbar/snackbars/http-error-snackbar.d.ts +28 -0
  497. package/titanium/snackbar/snackbars/http-error-snackbar.js +155 -0
  498. package/titanium/snackbar/snackbars/http-error-snackbar.js.map +1 -0
  499. package/titanium/snackbar/snackbars/simple-snackbar.d.ts +27 -0
  500. package/titanium/snackbar/snackbars/simple-snackbar.js +140 -0
  501. package/titanium/snackbar/snackbars/simple-snackbar.js.map +1 -0
  502. package/titanium/snackbar/types/snackbar-options.d.ts +9 -0
  503. package/titanium/snackbar/types/snackbar-options.js +2 -0
  504. package/titanium/snackbar/types/snackbar-options.js.map +1 -0
  505. package/titanium/styles/a.d.ts +2 -0
  506. package/titanium/styles/a.js +18 -0
  507. package/titanium/styles/a.js.map +1 -0
  508. package/titanium/styles/data-row.d.ts +2 -0
  509. package/titanium/styles/data-row.js +61 -0
  510. package/titanium/styles/data-row.js.map +1 -0
  511. package/titanium/styles/ellipsis.d.ts +2 -0
  512. package/titanium/styles/ellipsis.js +9 -0
  513. package/titanium/styles/ellipsis.js.map +1 -0
  514. package/titanium/styles/h1.d.ts +2 -0
  515. package/titanium/styles/h1.js +17 -0
  516. package/titanium/styles/h1.js.map +1 -0
  517. package/titanium/styles/h2.d.ts +2 -0
  518. package/titanium/styles/h2.js +17 -0
  519. package/titanium/styles/h2.js.map +1 -0
  520. package/titanium/styles/h3.d.ts +2 -0
  521. package/titanium/styles/h3.js +17 -0
  522. package/titanium/styles/h3.js.map +1 -0
  523. package/titanium/styles/h4.d.ts +2 -0
  524. package/titanium/styles/h4.js +17 -0
  525. package/titanium/styles/h4.js.map +1 -0
  526. package/titanium/styles/h5.d.ts +2 -0
  527. package/titanium/styles/h5.js +19 -0
  528. package/titanium/styles/h5.js.map +1 -0
  529. package/titanium/styles/nice-badge.d.ts +2 -0
  530. package/titanium/styles/nice-badge.js +53 -0
  531. package/titanium/styles/nice-badge.js.map +1 -0
  532. package/titanium/styles/p.d.ts +2 -0
  533. package/titanium/styles/p.js +17 -0
  534. package/titanium/styles/p.js.map +1 -0
  535. package/titanium/styles/styles.d.ts +17 -0
  536. package/titanium/styles/styles.js +17 -0
  537. package/titanium/styles/styles.js.map +1 -0
  538. package/titanium/toolbar/toolbar.d.ts +24 -0
  539. package/titanium/toolbar/toolbar.js +100 -0
  540. package/titanium/toolbar/toolbar.js.map +1 -0
  541. package/titanium/types/any-function.d.ts +5 -0
  542. package/titanium/types/any-function.js +5 -0
  543. package/titanium/types/any-function.js.map +1 -0
  544. package/titanium/types/dom-event.d.ts +4 -0
  545. package/titanium/types/dom-event.js +2 -0
  546. package/titanium/types/dom-event.js.map +1 -0
  547. package/titanium/types/identifier-interface.d.ts +4 -0
  548. package/titanium/types/identifier-interface.js +2 -0
  549. package/titanium/types/identifier-interface.js.map +1 -0
  550. package/titanium/types/pending-state-event.d.ts +7 -0
  551. package/titanium/types/pending-state-event.js +7 -0
  552. package/titanium/types/pending-state-event.js.map +1 -0
  553. package/titanium/types/string-map.d.ts +7 -0
  554. package/titanium/types/string-map.js +5 -0
  555. package/titanium/types/string-map.js.map +1 -0
  556. package/titanium/youtube-input/youtube-input.d.ts +19 -0
  557. package/titanium/youtube-input/youtube-input.js +68 -0
  558. package/titanium/youtube-input/youtube-input.js.map +1 -0
@@ -0,0 +1,889 @@
1
+ import { __decorate } from "tslib";
2
+ import { LoadWhile } from '../../titanium/helpers/load-while';
3
+ import { css, html, LitElement, nothing } from 'lit';
4
+ import { customElement, property, query, state } from 'lit/decorators.js';
5
+ import { PendingStateEvent } from '../../titanium/types/pending-state-event';
6
+ import { ConfirmDialogOpenEvent } from '../../titanium/confirm-dialog/confirm-dialog-open-event';
7
+ import '../../titanium/confirm-dialog/confirm-dialog';
8
+ import fileExplorerEvents from './events/file-explorer-events';
9
+ import '@material/web/icon/icon';
10
+ import '@material/web/button/text-button';
11
+ import '@material/web/progress/linear-progress';
12
+ import '@material/web/menu/menu';
13
+ import '@material/web/menu/menu-item';
14
+ import './add-folder-modal';
15
+ import './file-explorer-no-files';
16
+ import './file-explorer-error';
17
+ import './file-explorer-no-permission';
18
+ import './file-modal';
19
+ import './folder-modal';
20
+ import './file-list-item';
21
+ import './folder-list-item';
22
+ import * as Throttle from 'promise-parallel-throttle';
23
+ import { join } from '../../titanium/helpers/helpers';
24
+ import { a, ellipsis, h1, h2 } from '../../titanium/styles/styles';
25
+ import { formatBytes } from './helpers/format-bytes';
26
+ import { ShowSnackbarEvent } from '../../titanium/snackbar/show-snackbar-event';
27
+ /**
28
+ * Leavitt Group specific file explorer
29
+ *
30
+ * @element leavitt-file-explorer
31
+ *
32
+ * @cssprop {Color} [--leavitt-file-explorer-font-family='Roboto', 'Noto', sans-serif] - Font family
33
+ *
34
+ * @fires folder-added - Fired when a new folder is added.
35
+ * @fires folder-deleted - Fired when a folder is deleted.
36
+ * @fires file-added - Fired when a new file is added.
37
+ * @fires file-deleted - Fired when a file is deleted.
38
+ */
39
+ let LeavittFileExplorer = class LeavittFileExplorer extends LoadWhile(LitElement) {
40
+ #apiService_accessor_storage;
41
+ /**
42
+ * This is required.
43
+ */
44
+ get apiService() { return this.#apiService_accessor_storage; }
45
+ set apiService(value) { this.#apiService_accessor_storage = value; }
46
+ #fileExplorerId_accessor_storage = 0;
47
+ /**
48
+ * ID File explorer to display. This is required.
49
+ */
50
+ get fileExplorerId() { return this.#fileExplorerId_accessor_storage; }
51
+ set fileExplorerId(value) { this.#fileExplorerId_accessor_storage = value; }
52
+ #folderId_accessor_storage = null;
53
+ /**
54
+ * Optional folder to show on first load rather than showing the root
55
+ */
56
+ get folderId() { return this.#folderId_accessor_storage; }
57
+ set folderId(value) { this.#folderId_accessor_storage = value; }
58
+ #localStorageDisplayKey_accessor_storage = 'leavitt-file-explorer-display';
59
+ /**
60
+ * Optional custom key to use for storing the value of 'display' in local storage
61
+ */
62
+ get localStorageDisplayKey() { return this.#localStorageDisplayKey_accessor_storage; }
63
+ set localStorageDisplayKey(value) { this.#localStorageDisplayKey_accessor_storage = value; }
64
+ #preventNavigationUp_accessor_storage = false;
65
+ /**
66
+ * Prevents a user from navigating up the folder tree past the initially provided folderId.
67
+ *
68
+ * FolderId must be set for this to operate properly.
69
+ */
70
+ get preventNavigationUp() { return this.#preventNavigationUp_accessor_storage; }
71
+ set preventNavigationUp(value) { this.#preventNavigationUp_accessor_storage = value; }
72
+ get display() {
73
+ return window.localStorage.getItem(this.localStorageDisplayKey) || 'grid';
74
+ }
75
+ set display(val) {
76
+ localStorage.setItem(this.localStorageDisplayKey, val);
77
+ }
78
+ #state_accessor_storage = 'files';
79
+ get state() { return this.#state_accessor_storage; }
80
+ set state(value) { this.#state_accessor_storage = value; }
81
+ #isAdmin_accessor_storage = false;
82
+ get isAdmin() { return this.#isAdmin_accessor_storage; }
83
+ set isAdmin(value) { this.#isAdmin_accessor_storage = value; }
84
+ #fileExplorer_accessor_storage = null;
85
+ get fileExplorer() { return this.#fileExplorer_accessor_storage; }
86
+ set fileExplorer(value) { this.#fileExplorer_accessor_storage = value; }
87
+ #files_accessor_storage = [];
88
+ get files() { return this.#files_accessor_storage; }
89
+ set files(value) { this.#files_accessor_storage = value; }
90
+ #folders_accessor_storage = [];
91
+ get folders() { return this.#folders_accessor_storage; }
92
+ set folders(value) { this.#folders_accessor_storage = value; }
93
+ #path_accessor_storage = [];
94
+ get path() { return this.#path_accessor_storage; }
95
+ set path(value) { this.#path_accessor_storage = value; }
96
+ #selected_accessor_storage = [];
97
+ get selected() { return this.#selected_accessor_storage; }
98
+ set selected(value) { this.#selected_accessor_storage = value; }
99
+ #uploadMenu_accessor_storage;
100
+ get uploadMenu() { return this.#uploadMenu_accessor_storage; }
101
+ set uploadMenu(value) { this.#uploadMenu_accessor_storage = value; }
102
+ #folderDialog_accessor_storage;
103
+ get folderDialog() { return this.#folderDialog_accessor_storage; }
104
+ set folderDialog(value) { this.#folderDialog_accessor_storage = value; }
105
+ #addFolderDialog_accessor_storage;
106
+ get addFolderDialog() { return this.#addFolderDialog_accessor_storage; }
107
+ set addFolderDialog(value) { this.#addFolderDialog_accessor_storage = value; }
108
+ #fileDialog_accessor_storage;
109
+ get fileDialog() { return this.#fileDialog_accessor_storage; }
110
+ set fileDialog(value) { this.#fileDialog_accessor_storage = value; }
111
+ #fileInput_accessor_storage;
112
+ get fileInput() { return this.#fileInput_accessor_storage; }
113
+ set fileInput(value) { this.#fileInput_accessor_storage = value; }
114
+ #folderInput_accessor_storage;
115
+ get folderInput() { return this.#folderInput_accessor_storage; }
116
+ set folderInput(value) { this.#folderInput_accessor_storage = value; }
117
+ #confirmDialog_accessor_storage;
118
+ get confirmDialog() { return this.#confirmDialog_accessor_storage; }
119
+ set confirmDialog(value) { this.#confirmDialog_accessor_storage = value; }
120
+ #originalFolderId = 0;
121
+ firstUpdated() {
122
+ //force attribute to reflect
123
+ this.display = structuredClone(this.display);
124
+ this.addEventListener(ConfirmDialogOpenEvent.eventType, async (e) => {
125
+ e.stopPropagation();
126
+ this.confirmDialog.handleEvent(e);
127
+ });
128
+ this.addEventListener(PendingStateEvent.eventType, async (e) => {
129
+ e.stopPropagation();
130
+ this.loadWhile(e.detail.promise);
131
+ });
132
+ fileExplorerEvents.subscribe('FileExplorerFileDto', 'Update', (o) => {
133
+ const index = this.files.findIndex((file) => file.Id === o.Id);
134
+ if (index > -1) {
135
+ this.files[index] = { ...this.files[index], ...o };
136
+ this.requestUpdate('files');
137
+ }
138
+ });
139
+ fileExplorerEvents.subscribe('FileExplorerFolder', 'Update', (o) => {
140
+ const index = this.folders.findIndex((folder) => folder.Id === o.Id);
141
+ if (index > -1) {
142
+ this.folders[index] = { ...this.folders[index], ...o };
143
+ this.requestUpdate('folders');
144
+ }
145
+ });
146
+ }
147
+ async updated(changedProps) {
148
+ if ((this.fileExplorerId > 0 && changedProps.has('fileExplorerId')) || changedProps.has('folderId')) {
149
+ if (this.folderId && this.#originalFolderId === 0) {
150
+ this.#originalFolderId = this.folderId;
151
+ }
152
+ this.isAdmin = false;
153
+ await this.reload();
154
+ }
155
+ }
156
+ #isFolder(fileOrFolder) {
157
+ return fileOrFolder?.type === 'folder';
158
+ }
159
+ /**
160
+ * Refetches current file explorer data and re-renders
161
+ */
162
+ async reload() {
163
+ await this.#getExplorerData(this.fileExplorerId, this.folderId);
164
+ }
165
+ async #getExplorerData(fileExplorerId, folderId) {
166
+ try {
167
+ const get = this.apiService?.getAsync(`FileExplorers(${fileExplorerId})/FileExplorerView(folderId=${folderId})`);
168
+ if (get) {
169
+ this.loadWhile(get);
170
+ }
171
+ const result = await get;
172
+ if (result?.status == 200 && result.entity) {
173
+ this.fileExplorer = result.entity;
174
+ this.folders = result.entity.Folders;
175
+ this.files = result.entity.Files;
176
+ const path = result.entity.Path;
177
+ if (this.preventNavigationUp && this.#originalFolderId > 0) {
178
+ const shortenedPath = [];
179
+ for (let index = path.length - 1; index > 0; index--) {
180
+ const p = path[index];
181
+ shortenedPath.unshift(p);
182
+ if (p.FolderId === this.#originalFolderId) {
183
+ break;
184
+ }
185
+ }
186
+ this.path = shortenedPath;
187
+ }
188
+ else {
189
+ this.path = path;
190
+ }
191
+ this.isAdmin = result.entity.CanEdit || false;
192
+ this.state = this.folders.length > 0 || this.files.length > 0 ? 'files' : 'no-files';
193
+ }
194
+ }
195
+ catch (error) {
196
+ if (error?.statusCode == 401 || error?.statusCode == 404) {
197
+ this.path = [{ Name: 'Files' }];
198
+ this.state = 'no-permission';
199
+ return;
200
+ }
201
+ this.path = [{ Name: 'Files' }];
202
+ this.state = 'error';
203
+ }
204
+ }
205
+ async #addFolderClick() {
206
+ const newFolder = await this.addFolderDialog.open();
207
+ if (newFolder) {
208
+ this.folders = [...this.folders, newFolder];
209
+ if (this.fileExplorer) {
210
+ this.fileExplorer.FoldersCount = this.fileExplorer?.FoldersCount + 1;
211
+ this.requestUpdate('fileExplorer');
212
+ }
213
+ this.state = 'files';
214
+ this.dispatchEvent(new CustomEvent('folder-added', { detail: newFolder }));
215
+ }
216
+ }
217
+ /**
218
+ * @internal
219
+ */
220
+ async #deleteSelectedClick() {
221
+ const confirmationDialogEvent = new ConfirmDialogOpenEvent('Please confirm delete', `Deleting folders will delete all of their contents. Are you sure you would like to delete the selected item${this.selected.length === 1 ? '' : 's'}?`);
222
+ this.dispatchEvent(confirmationDialogEvent);
223
+ if (await confirmationDialogEvent.dialogResult) {
224
+ const items = [...this.selected];
225
+ const errorMessageToCount = new Map();
226
+ let totalErrorCount = 0;
227
+ const requests = Promise.all(items.map(async (o) => {
228
+ try {
229
+ if (this.#isFolder(o)) {
230
+ await this.apiService?.deleteAsync(`FileExplorerFolders(${o.Id})`);
231
+ this.folders.splice(this.folders.findIndex((folder) => folder.Id === o.Id), 1);
232
+ this.dispatchEvent(new CustomEvent('folder-deleted'));
233
+ if (this.fileExplorer) {
234
+ this.fileExplorer.FoldersCount = this.fileExplorer?.FoldersCount - 1;
235
+ this.requestUpdate('fileExplorer');
236
+ }
237
+ this.requestUpdate('folders');
238
+ }
239
+ else {
240
+ await this.apiService?.deleteAsync(`FileExplorerAttachments(${o.Id})`);
241
+ this.files.splice(this.files.findIndex((file) => file.Id === o.Id), 1);
242
+ this.requestUpdate('files');
243
+ if (this.fileExplorer) {
244
+ this.fileExplorer.FilesCount = this.fileExplorer?.FilesCount - 1;
245
+ this.fileExplorer.Size = this.fileExplorer?.Size - o.Size;
246
+ this.requestUpdate('fileExplorer');
247
+ }
248
+ this.dispatchEvent(new CustomEvent('file-deleted'));
249
+ }
250
+ }
251
+ catch (newError) {
252
+ const newErrorCount = (errorMessageToCount.get(newError) ?? 0) + 1;
253
+ errorMessageToCount.set(newError, newErrorCount);
254
+ totalErrorCount++;
255
+ }
256
+ }));
257
+ this.loadWhile(requests);
258
+ await requests;
259
+ this.selected = [];
260
+ this.state = this.folders.length > 0 || this.files.length > 0 ? 'files' : 'no-files';
261
+ await this.reload();
262
+ if (totalErrorCount > 0) {
263
+ this.dispatchEvent(new ShowSnackbarEvent('', {
264
+ overrideTemplate: html `Failed to delete ${totalErrorCount === 1 ? 'files and folders' : `${totalErrorCount} files and folders: <br />`}.
265
+ ${errorMessageToCount.size === 1
266
+ ? Array.from(errorMessageToCount.keys())[0]
267
+ : Array.from(errorMessageToCount.entries()).map(([error, count]) => `(${count}) ${error} <br />`)}`,
268
+ }));
269
+ }
270
+ }
271
+ }
272
+ #getFolderPath(file) {
273
+ return file.webkitRelativePath.replace('/' + file.name, '');
274
+ }
275
+ async #createDirectoryStructure(files) {
276
+ const pathToFolderId = new Map();
277
+ const filesArr = Array.from(files ?? []);
278
+ for (let index = 0; index < filesArr.length; index++) {
279
+ const file = filesArr[index];
280
+ const parentFolderPath = this.#getFolderPath(file).split('/');
281
+ const parentFolders = [];
282
+ let parentId = this.folderId;
283
+ for (let index = 0; index < parentFolderPath.length; index++) {
284
+ const folderName = parentFolderPath[index];
285
+ const newPath = [...parentFolders, folderName].join('/');
286
+ if (pathToFolderId.has(newPath)) {
287
+ parentFolders.push(folderName);
288
+ parentId = pathToFolderId.get(newPath) ?? 0;
289
+ continue;
290
+ }
291
+ const folder = await this.#createFolder(folderName, parentId || null);
292
+ parentId = folder?.Id ?? 0;
293
+ parentFolders.push(folderName);
294
+ pathToFolderId.set(parentFolders.join('/'), folder?.Id ?? 0);
295
+ if ((folder?.ParentFolderId && folder?.ParentFolderId === this.folderId) || (!folder?.ParentFolderId && !this.folderId)) {
296
+ const folderDto = {
297
+ ...folder,
298
+ CreatorLastName: folder?.CreatorPerson?.LastName,
299
+ CreatorFirstName: folder?.CreatorPerson?.FirstName,
300
+ };
301
+ this.folders = [...this.folders, folderDto];
302
+ this.state = 'files';
303
+ this.dispatchEvent(new CustomEvent('folder-added', { detail: folderDto }));
304
+ }
305
+ }
306
+ }
307
+ return pathToFolderId;
308
+ }
309
+ async #uploadFiles(files) {
310
+ const uri = this.folderId
311
+ ? `FileExplorerFolders(${this.folderId})/UploadAttachment?expand=Creator(select=FullName,ProfilePictureCdnFileName)`
312
+ : `FileExplorers(${this.fileExplorerId})/UploadAttachment?expand=Creator(select=FullName,ProfilePictureCdnFileName)`;
313
+ const failedFiles = [];
314
+ const requests = Array.from(files ?? []).map((file) => async () => {
315
+ try {
316
+ const result = (await this.apiService?.uploadFile(uri, file, () => console.log))?.entity;
317
+ if (result) {
318
+ const attachment = {
319
+ ...result,
320
+ CreatorProfilePictureCndFileName: result.Creator?.ProfilePictureCdnFileName ?? '',
321
+ CreatorFullName: result.Creator?.FullName ?? '',
322
+ CreatorFirstName: '',
323
+ CreatorLastName: '',
324
+ };
325
+ this.files = [...this.files, attachment];
326
+ this.state = 'files';
327
+ this.dispatchEvent(new CustomEvent('file-added'));
328
+ if (this.fileExplorer) {
329
+ this.fileExplorer.FilesCount = this.fileExplorer?.FilesCount + 1;
330
+ this.fileExplorer.Size = this.fileExplorer?.Size + result.Size;
331
+ this.requestUpdate('fileExplorer');
332
+ }
333
+ }
334
+ }
335
+ catch (error) {
336
+ failedFiles.push(file.name + ': ' + error.message);
337
+ }
338
+ });
339
+ const uploadAll = Throttle.all(requests, { maxInProgress: 4 });
340
+ this.loadWhile(uploadAll);
341
+ await uploadAll;
342
+ if (failedFiles.length > 0) {
343
+ this.dispatchEvent(new ShowSnackbarEvent('', {
344
+ overrideTemplate: html `Failed to upload ${failedFiles.length} file${failedFiles.length === 1 ? '' : 's'}: <br />
345
+ ${join(failedFiles, html `<br />`)}`,
346
+ }));
347
+ console.warn(`Failed to upload ${failedFiles.length} file${failedFiles.length === 1 ? '' : 's'}: \r\n${failedFiles.join('\r\n')}`);
348
+ }
349
+ this.fileInput.value = '';
350
+ }
351
+ async #uploadFolders(files) {
352
+ const directoryToIdMap = this.#createDirectoryStructure(files);
353
+ const failedFiles = [];
354
+ const requests = Array.from(files ?? []).map((file) => async () => {
355
+ try {
356
+ const path = this.#getFolderPath(file);
357
+ const folderId = (await directoryToIdMap).get(path);
358
+ const uri = folderId
359
+ ? `FileExplorerFolders(${folderId})/UploadAttachment?expand=Creator(select=FullName,ProfilePictureCdnFileName)`
360
+ : `FileExplorers(${this.fileExplorerId})/UploadAttachment?expand=Creator(select=FullName,ProfilePictureCdnFileName)`;
361
+ const result = (await this.apiService?.uploadFile(uri, file, () => console.log))?.entity;
362
+ if (result) {
363
+ this.dispatchEvent(new CustomEvent('file-added'));
364
+ if (this.fileExplorer) {
365
+ this.fileExplorer.FilesCount = this.fileExplorer?.FilesCount + 1;
366
+ this.fileExplorer.Size = this.fileExplorer?.Size + result.Size;
367
+ this.requestUpdate('fileExplorer');
368
+ }
369
+ }
370
+ }
371
+ catch (error) {
372
+ failedFiles.push(file.webkitRelativePath + ': ' + error.message);
373
+ }
374
+ });
375
+ const uploadAll = Throttle.all(requests, { maxInProgress: 4 });
376
+ this.loadWhile(uploadAll);
377
+ await uploadAll;
378
+ if (failedFiles.length > 0) {
379
+ this.dispatchEvent(new ShowSnackbarEvent('', {
380
+ overrideTemplate: html `Failed to upload ${failedFiles.length} file${failedFiles.length === 1 ? '' : 's'}: <br />
381
+ ${join(failedFiles, html `<br />`)}`,
382
+ }));
383
+ console.warn(`Failed to upload ${failedFiles.length} file${failedFiles.length === 1 ? '' : 's'}: \r\n${failedFiles.join('\r\n')}`);
384
+ }
385
+ await this.reload();
386
+ this.folderInput.value = '';
387
+ }
388
+ async #createFolder(name, parentFolderId) {
389
+ const dto = {
390
+ FileExplorerId: this.fileExplorerId,
391
+ Name: name,
392
+ ParentFolderId: parentFolderId || undefined,
393
+ };
394
+ try {
395
+ const post = this.apiService?.postAsync('FileExplorerFolders?expand=CreatorPerson(select=FirstName,LastName)', dto);
396
+ if (post) {
397
+ /**
398
+ * @ignore
399
+ */
400
+ this.dispatchEvent(new PendingStateEvent(post));
401
+ }
402
+ const result = (await post)?.entity;
403
+ if (this.fileExplorer) {
404
+ this.fileExplorer.FoldersCount = this.fileExplorer?.FoldersCount + 1;
405
+ this.requestUpdate('fileExplorer');
406
+ }
407
+ return result;
408
+ }
409
+ catch (error) {
410
+ this.dispatchEvent(new ShowSnackbarEvent(error));
411
+ }
412
+ return null;
413
+ }
414
+ #toggleSelected(item, type) {
415
+ const selected = this.selected.find((s) => s?.Id === item.Id && s.type === type);
416
+ if (selected) {
417
+ this.selected = [...this.selected.filter((o) => o !== selected)];
418
+ }
419
+ else {
420
+ this.selected = [...this.selected, { ...item, type: type }];
421
+ }
422
+ }
423
+ static { this.styles = [
424
+ h1,
425
+ h2,
426
+ ellipsis,
427
+ a,
428
+ css `
429
+ :host {
430
+ display: grid;
431
+ grid:
432
+ 'header' 69px
433
+ 'main' minmax(150px, 1fr)
434
+ 'footer' auto;
435
+
436
+ border: 1px solid var(--md-sys-color-outline-variant);
437
+ background-color: var(--md-sys-color-surface);
438
+ color: var(--md-sys-color-on-surface);
439
+ border-radius: 8px;
440
+
441
+ font-family: var(--leavitt-file-explorer-font-family, 'Roboto', 'Noto', sans-serif);
442
+ -webkit-font-smoothing: antialiased;
443
+ width: 100%;
444
+ }
445
+
446
+ header {
447
+ display: grid;
448
+ grid: 'nav actions' / 4fr auto;
449
+ gap: 0px 12px;
450
+ position: relative;
451
+
452
+ margin: 0;
453
+ padding: 0 12px 0 12px;
454
+ border-bottom: 1px solid var(--md-sys-color-outline-variant);
455
+ }
456
+
457
+ header aside {
458
+ grid-area: nav;
459
+ }
460
+
461
+ header nav {
462
+ font-family: Metropolis;
463
+ font-size: 18px;
464
+ letter-spacing: -0.264px;
465
+ font-weight: 400;
466
+ flex-direction: row;
467
+ align-items: center;
468
+ gap: 2px;
469
+ display: flex;
470
+ margin: 12px 0 0 12px;
471
+ }
472
+
473
+ header md-icon-button {
474
+ justify-self: center;
475
+ align-self: center;
476
+ }
477
+
478
+ main {
479
+ position: relative;
480
+ overflow-y: auto;
481
+ }
482
+
483
+ content-veil {
484
+ display: none;
485
+ position: absolute;
486
+ top: 0;
487
+ left: 0;
488
+ width: 100%;
489
+ height: 100%;
490
+ background-color: var(--md-sys-color-scrim);
491
+ opacity: 0;
492
+ -webkit-transition: opacity 75ms linear;
493
+ -o-transition: opacity 75ms linear;
494
+ transition: opacity 75ms linear;
495
+ z-index: 6;
496
+ backdrop-filter: blur(6px);
497
+ }
498
+
499
+ content-veil[opened] {
500
+ opacity: 0.32;
501
+ display: block;
502
+ }
503
+
504
+ main > section {
505
+ display: flex;
506
+ flex-direction: column;
507
+ }
508
+
509
+ :host([display='grid']) section:last-of-type {
510
+ margin-bottom: 12px;
511
+ }
512
+
513
+ main > h3 {
514
+ display: none;
515
+ }
516
+
517
+ :host([display='grid']) main > h3 {
518
+ display: block;
519
+ -moz-osx-font-smoothing: grayscale;
520
+ -webkit-font-smoothing: antialiased;
521
+ letter-spacing: -0.264px;
522
+ font-weight: 400;
523
+ font-size: 14px;
524
+ line-height: 18px;
525
+ margin: 24px 12px 0 24px;
526
+ }
527
+
528
+ :host([display='grid']) main > section {
529
+ display: grid;
530
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
531
+ grid-gap: 12px;
532
+ padding: 12px 24px;
533
+ }
534
+
535
+ md-linear-progress {
536
+ position: absolute;
537
+ right: 0;
538
+ left: 0;
539
+ bottom: 0;
540
+ width: unset;
541
+ }
542
+
543
+ file-summary {
544
+ grid-area: summary;
545
+ display: block;
546
+ padding-left: 12px !important;
547
+ font-size: 12px;
548
+ }
549
+
550
+ :host([prevent-navigation-up]) file-summary {
551
+ display: none;
552
+ }
553
+
554
+ header nav md-icon {
555
+ color: var(--md-sys-color-surface-variant);
556
+ flex-shrink: 0;
557
+ }
558
+
559
+ selected-actions {
560
+ display: grid;
561
+ gap: 6px;
562
+ grid: 'deselect selected-text buttons' / auto 1fr auto;
563
+ background-color: var(--md-sys-color-secondary-container);
564
+ position: absolute;
565
+ top: 0px;
566
+ left: 0px;
567
+ right: 0px;
568
+ bottom: 0px;
569
+ margin: 0 !important;
570
+ align-content: center;
571
+ align-items: center;
572
+ padding: 12px;
573
+ z-index: 1;
574
+ }
575
+
576
+ selected-actions h2 {
577
+ color: var(--md-sys-color-on-secondary-container);
578
+ font-size: 18px;
579
+ font-weight: 400;
580
+ }
581
+
582
+ selected-actions div[buttons] {
583
+ display: flex;
584
+ align-items: center;
585
+ gap: 0 8px;
586
+ justify-content: flex-end;
587
+ }
588
+
589
+ nav a:visited,
590
+ nav span,
591
+ nav a {
592
+ display: block;
593
+ font-size: 18px;
594
+ min-width: 20px;
595
+ }
596
+
597
+ a[disabled] {
598
+ pointer-events: none;
599
+ cursor: default;
600
+ }
601
+
602
+ nav a span {
603
+ padding: 0;
604
+ }
605
+
606
+ header span {
607
+ grid-area: text;
608
+ position: relative;
609
+ }
610
+
611
+ /*File item styles */
612
+
613
+ footer {
614
+ display: grid;
615
+ grid: 'count . actions' / auto 1fr auto;
616
+ gap: 12px;
617
+ align-items: center;
618
+ padding: 6px 8px 6px 24px;
619
+ border-top: 1px solid var(--md-sys-color-outline-variant);
620
+ }
621
+
622
+ footer span[counts] {
623
+ grid-area: count;
624
+ font-size: 12px;
625
+ font-weight: 400;
626
+ letter-spacing: 0.011em;
627
+ line-height: 20px;
628
+
629
+ user-select: none;
630
+ -webkit-user-select: none;
631
+ -moz-user-select: none;
632
+ }
633
+
634
+ footer-actions {
635
+ grid-area: actions;
636
+ display: flex;
637
+ flex-direction: row;
638
+ flex-wrap: wrap;
639
+ }
640
+
641
+ md-menu[upload-menu] md-menu-item {
642
+ min-width: 200px;
643
+ }
644
+
645
+ :host([display='grid']) footer span[counts] {
646
+ display: none;
647
+ }
648
+
649
+ [hidden] {
650
+ display: none !important;
651
+ }
652
+ `,
653
+ ]; }
654
+ render() {
655
+ return html `
656
+ <header>
657
+ <aside ellipsis>
658
+ <nav ellipsis>
659
+ ${this.fileExplorer
660
+ ? this.path.map((o, i) => html `
661
+ ${i == this.path.length - 1
662
+ ? html ` <span ellipsis end title=${o?.Name ?? ''}> ${o.Name} </span> `
663
+ : html `
664
+ <a
665
+ ?disabled=${this.isLoading}
666
+ ellipsis
667
+ title=${o.Name ?? ''}
668
+ href="#"
669
+ @click=${(e) => {
670
+ e.preventDefault();
671
+ this.folderId = o.FolderId ?? null;
672
+ this.selected = [];
673
+ }}
674
+ >
675
+ ${o.Name}</a
676
+ >
677
+ <md-icon>navigate_next</md-icon>
678
+ `}
679
+ `)
680
+ : html `<span ellipsis end> File explorer</span>`}
681
+ </nav>
682
+ <file-summary ?hidden=${!this.fileExplorer} ellipsis heading3
683
+ >${this.fileExplorer?.FilesCount} files | ${this.fileExplorer?.FoldersCount} folders | ${formatBytes(this.fileExplorer?.Size)}</file-summary
684
+ >
685
+ </aside>
686
+ <md-icon-button
687
+ ?disabled=${this.isLoading}
688
+ view-style
689
+ @click=${() => (this.display = this.display === 'grid' ? 'list' : 'grid')}
690
+ title=${this.display === 'grid' ? 'Show list view' : 'Show grid view'}
691
+ >
692
+ <md-icon>${this.display === 'grid' ? 'view_list' : 'view_module'}</md-icon>
693
+ </md-icon-button>
694
+ <selected-actions ?hidden=${this.selected.length === 0}>
695
+ <md-icon-button title="Clear selected" @click=${() => (this.selected = [])}> <md-icon>clear</md-icon></md-icon-button>
696
+ <h2 ellipsis>${this.selected.length} selected</h2>
697
+ <div buttons part="selected-actions-container">
698
+ ${this.isAdmin
699
+ ? html ` <md-icon-button title="Delete selected" @click=${this.#deleteSelectedClick}> <md-icon>delete</md-icon></md-icon-button> `
700
+ : nothing}
701
+ <md-icon-button
702
+ primary
703
+ ?hidden=${!this.selected.length}
704
+ ?disabled=${this.selected.length !== 1}
705
+ @click=${() => {
706
+ if (!this.selected) {
707
+ return;
708
+ }
709
+ if (this.#isFolder(this.selected[0])) {
710
+ this.folderDialog.open(this.selected[0]);
711
+ }
712
+ else {
713
+ this.fileDialog.open(this.selected[0]);
714
+ }
715
+ }}
716
+ >
717
+ <md-icon>info</md-icon>
718
+ </md-icon-button>
719
+ </div>
720
+ </selected-actions>
721
+
722
+ <md-linear-progress ?hidden=${!this.isLoading} indeterminate></md-linear-progress>
723
+ </header>
724
+ <main>
725
+ <leavitt-file-explorer-no-files ?hidden=${this.state !== 'no-files'}> </leavitt-file-explorer-no-files>
726
+ <leavitt-file-explorer-no-permission ?hidden=${this.state !== 'no-permission'}> </leavitt-file-explorer-no-permission>
727
+ <leavitt-file-explorer-error ?hidden=${this.state !== 'error'}> </leavitt-file-explorer-error>
728
+
729
+ <h3 ?hidden=${this.folders.length === 0 || this.state != 'files'}>Folders (${this.folders.length})</h3>
730
+ <section ?hidden=${this.folders.length === 0 || this.state != 'files'}>
731
+ ${this.folders.map((folder) => html `
732
+ <folder-list-item
733
+ .folder=${folder}
734
+ ?selected=${this.selected.some((s) => s?.Id === folder.Id && s.type === 'folder')}
735
+ .selectedCount=${this.selected.length}
736
+ .display=${this.display}
737
+ @show-details=${() => this.folderDialog.open(folder)}
738
+ @toggle-selected=${() => this.#toggleSelected(folder, 'folder')}
739
+ @navigate=${() => {
740
+ this.selected = [];
741
+ this.folderId = folder.Id ?? null;
742
+ }}
743
+ ></folder-list-item>
744
+ `)}
745
+ </section>
746
+ <h3 ?hidden=${this.files.length === 0 || this.state != 'files'}>Files (${this.files.length})</h3>
747
+ <section ?hidden=${this.files.length === 0 || this.state != 'files'}>
748
+ ${this.files.map((file) => html `
749
+ <file-list-item
750
+ .file=${file}
751
+ ?selected=${this.selected.some((s) => s?.Id === file.Id && s.type === 'file')}
752
+ .selectedCount=${this.selected.length}
753
+ .display=${this.display}
754
+ @show-details=${() => this.fileDialog.open(file)}
755
+ @toggle-selected=${() => this.#toggleSelected(file, 'file')}
756
+ ></file-list-item>
757
+ `)}
758
+ </section>
759
+ <content-veil ?opened=${this.isLoading}></content-veil>
760
+ </main>
761
+ <footer>
762
+ <span counts> ${this.files.length} files | ${this.folders.length} folders </span>
763
+
764
+ ${this.isAdmin
765
+ ? html `
766
+ <footer-actions>
767
+ <md-text-button ?disabled=${this.isLoading} @click=${this.#addFolderClick}>
768
+ <md-icon slot="icon">create_new_folder</md-icon>
769
+ <span> Add folder</span>
770
+ </md-text-button>
771
+ <div style="position: relative;">
772
+ <md-text-button
773
+ id="upload-button"
774
+ ?disabled=${this.isLoading}
775
+ @click=${() => {
776
+ this.uploadMenu.open = !this.uploadMenu.open;
777
+ }}
778
+ >
779
+ <md-icon slot="icon">backup</md-icon>
780
+ Upload
781
+ </md-text-button>
782
+ <md-menu
783
+ upload-menu
784
+ anchor="upload-button"
785
+ @close-menu=${(e) => {
786
+ e.detail.itemPath?.[0]?.action?.();
787
+ }}
788
+ >
789
+ <md-menu-item .action=${() => this.fileInput.click()}>
790
+ <span slot="headline">Upload files</span>
791
+ <md-icon slot="start">upload_file</md-icon>
792
+ </md-menu-item>
793
+ <md-menu-item .action=${() => this.folderInput.click()}>
794
+ <span slot="headline">Upload folders</span>
795
+ <md-icon slot="start">perm_media</md-icon>
796
+ </md-menu-item>
797
+ </md-menu>
798
+ </div>
799
+ <input
800
+ folders
801
+ @change=${async () => this.#uploadFolders(this.folderInput.files)}
802
+ type="file"
803
+ webkitdirectory
804
+ directory
805
+ multiple
806
+ id="file"
807
+ style="display:none;"
808
+ />
809
+ <input files @change=${async () => this.#uploadFiles(this.fileInput.files)} type="file" multiple id="file" style="display:none;" />
810
+ </footer-actions>
811
+ `
812
+ : nothing}
813
+ </footer>
814
+ <leavitt-add-folder-modal
815
+ .apiService=${this.apiService}
816
+ .fileExplorerId=${this.fileExplorerId}
817
+ .parentFolderId=${this?.folderId ?? 0}
818
+ ></leavitt-add-folder-modal>
819
+ <leavitt-folder-modal .apiService=${this.apiService} .enableEditing=${this.isAdmin}></leavitt-folder-modal>
820
+ <leavitt-file-modal .apiService=${this.apiService} .enableEditing=${this.isAdmin}></leavitt-file-modal>
821
+ <titanium-confirm-dialog></titanium-confirm-dialog>
822
+ `;
823
+ }
824
+ };
825
+ __decorate([
826
+ property({ attribute: false })
827
+ ], LeavittFileExplorer.prototype, "apiService", null);
828
+ __decorate([
829
+ property({ type: Number, attribute: 'file-explorer-id' })
830
+ ], LeavittFileExplorer.prototype, "fileExplorerId", null);
831
+ __decorate([
832
+ property({ type: Number, attribute: 'folder-id' })
833
+ ], LeavittFileExplorer.prototype, "folderId", null);
834
+ __decorate([
835
+ property({ type: String, attribute: 'local-storage-display-key' })
836
+ ], LeavittFileExplorer.prototype, "localStorageDisplayKey", null);
837
+ __decorate([
838
+ property({ type: Boolean, reflect: true, attribute: 'prevent-navigation-up' })
839
+ ], LeavittFileExplorer.prototype, "preventNavigationUp", null);
840
+ __decorate([
841
+ property({ type: String, reflect: true, attribute: 'display' })
842
+ ], LeavittFileExplorer.prototype, "display", null);
843
+ __decorate([
844
+ property({ type: String })
845
+ ], LeavittFileExplorer.prototype, "state", null);
846
+ __decorate([
847
+ state()
848
+ ], LeavittFileExplorer.prototype, "isAdmin", null);
849
+ __decorate([
850
+ state()
851
+ ], LeavittFileExplorer.prototype, "fileExplorer", null);
852
+ __decorate([
853
+ state()
854
+ ], LeavittFileExplorer.prototype, "files", null);
855
+ __decorate([
856
+ state()
857
+ ], LeavittFileExplorer.prototype, "folders", null);
858
+ __decorate([
859
+ state()
860
+ ], LeavittFileExplorer.prototype, "path", null);
861
+ __decorate([
862
+ state()
863
+ ], LeavittFileExplorer.prototype, "selected", null);
864
+ __decorate([
865
+ query('md-menu[upload-menu]')
866
+ ], LeavittFileExplorer.prototype, "uploadMenu", null);
867
+ __decorate([
868
+ query('leavitt-folder-modal')
869
+ ], LeavittFileExplorer.prototype, "folderDialog", null);
870
+ __decorate([
871
+ query('leavitt-add-folder-modal')
872
+ ], LeavittFileExplorer.prototype, "addFolderDialog", null);
873
+ __decorate([
874
+ query('leavitt-file-modal')
875
+ ], LeavittFileExplorer.prototype, "fileDialog", null);
876
+ __decorate([
877
+ query('input[files]')
878
+ ], LeavittFileExplorer.prototype, "fileInput", null);
879
+ __decorate([
880
+ query('input[folders]')
881
+ ], LeavittFileExplorer.prototype, "folderInput", null);
882
+ __decorate([
883
+ query('titanium-confirm-dialog')
884
+ ], LeavittFileExplorer.prototype, "confirmDialog", null);
885
+ LeavittFileExplorer = __decorate([
886
+ customElement('leavitt-file-explorer')
887
+ ], LeavittFileExplorer);
888
+ export { LeavittFileExplorer };
889
+ //# sourceMappingURL=file-explorer.js.map