@leavittsoftware/web 8.7.2 → 8.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +54 -0
  294. package/titanium/drawer/drawer.js +431 -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,5 @@
1
+ import { DateRangeKey } from './date-range-key';
2
+ import { DateRangeOption } from './date-range-option';
3
+ export declare function rangeLabel(range: DateRangeKey, startDate: string | null, endDate: string | null, prefix?: string, ranges?: Map<DateRangeKey, DateRangeOption>): string;
4
+ export declare function humanizeRange(rangeKey: string, startDate: string | null, endDate: string | null, ranges?: Map<string, DateRangeOption>): string;
5
+ //# sourceMappingURL=range-label.d.ts.map
@@ -0,0 +1,25 @@
1
+ import dayjs from 'dayjs/esm';
2
+ import { DateRanges } from './date-ranges';
3
+ export function rangeLabel(range, startDate, endDate, prefix = 'Created', ranges = DateRanges) {
4
+ if (range !== 'custom') {
5
+ return `${prefix} ${ranges.get(range)?.name?.toLowerCase() ?? ''}`;
6
+ }
7
+ else {
8
+ if (startDate && endDate) {
9
+ return `${prefix} ${dayjs(startDate).format('MMM D, YYYY')} to ${dayjs(endDate).format('MMM D, YYYY')}`;
10
+ }
11
+ return endDate ? `${prefix} to ${dayjs(endDate).format('MMM D, YYYY')}` : `${prefix} from ${dayjs(startDate).format('MMM D, YYYY')}`;
12
+ }
13
+ }
14
+ export function humanizeRange(rangeKey, startDate, endDate, ranges = DateRanges) {
15
+ if (rangeKey !== 'custom') {
16
+ return `${ranges.get(rangeKey)?.name ?? ''}`;
17
+ }
18
+ else {
19
+ if (startDate && endDate) {
20
+ return `${dayjs(startDate).format('MMM D, YYYY')} to ${dayjs(endDate).format('MMM D, YYYY')}`;
21
+ }
22
+ return endDate ? `Ending ${dayjs(endDate).format('MMM D, YYYY')}` : `Starting ${dayjs(startDate).format('MMM D, YYYY')}`;
23
+ }
24
+ }
25
+ //# sourceMappingURL=range-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range-label.js","sourceRoot":"","sources":["range-label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,WAAW,CAAC;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,UAAU,UAAU,CAAC,KAAmB,EAAE,SAAwB,EAAE,OAAsB,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM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AS,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;IAC3H,CAAC;AACH,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ /**
3
+ * Titanium drawer - a minimalist fly-out style drawer based on a native dialog
4
+ *
5
+ * @element titanium-drawer
6
+ * @slot - Main drawer content slot
7
+ * @csspart dialog - internal native dialog element
8
+ * @cssprop {Color} [--md-sys-color-outline-variant] Color of left border when open
9
+ * @cssprop {Color} [--md-sys-color-on-background] Color of slotted h3 and h4
10
+ */
11
+ export declare class TitaniumDrawer extends LitElement {
12
+ #private;
13
+ private accessor dialog;
14
+ /**
15
+ * Set the position of content fixed when menu is closed. Only takes effect if always-show-content is set.
16
+ */
17
+ accessor fixed: boolean;
18
+ /**
19
+ * Show the slotted content regardless if the menu is open or closed
20
+ * @deprecated use mode instead
21
+ */
22
+ accessor alwayShowContent: boolean;
23
+ /**
24
+ * Reverse the direction of the drawer opening and closing animations
25
+ */
26
+ accessor direction: 'ltr' | 'rtl';
27
+ private accessor hasHeader;
28
+ private accessor hasFooter;
29
+ private accessor keepOpenWhenGoingToFlyover;
30
+ accessor mode: 'inline' | 'flyover' | null;
31
+ accessor isOpen: boolean;
32
+ private readonly headerElements;
33
+ private readonly footerElements;
34
+ updated(changedProps: PropertyValues<this>): Promise<void>;
35
+ firstUpdated(): Promise<void>;
36
+ static animationsComplete(element: HTMLElement): Promise<PromiseSettledResult<Animation>[] | undefined>;
37
+ /**
38
+ * Opens drawer
39
+ */
40
+ open(): void;
41
+ /**
42
+ * Closes drawer
43
+ */
44
+ close(): Promise<void>;
45
+ toggle(): void;
46
+ /**
47
+ * Closes drawer without animations
48
+ */
49
+ closeQuick(): void;
50
+ protected setBodyOverflow(value: string): void;
51
+ static styles: import("lit").CSSResult;
52
+ render(): import("lit-html").TemplateResult<1>;
53
+ }
54
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1,431 @@
1
+ var TitaniumDrawer_1;
2
+ import { __decorate } from "tslib";
3
+ import { LitElement, css, html } from 'lit';
4
+ import { customElement, property, query, queryAssignedElements } from 'lit/decorators.js';
5
+ import { redispatchEvent } from '@material/web/internal/events/redispatch-event';
6
+ /**
7
+ * Titanium drawer - a minimalist fly-out style drawer based on a native dialog
8
+ *
9
+ * @element titanium-drawer
10
+ * @slot - Main drawer content slot
11
+ * @csspart dialog - internal native dialog element
12
+ * @cssprop {Color} [--md-sys-color-outline-variant] Color of left border when open
13
+ * @cssprop {Color} [--md-sys-color-on-background] Color of slotted h3 and h4
14
+ */
15
+ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
16
+ static { TitaniumDrawer_1 = this; }
17
+ #dialog_accessor_storage;
18
+ get dialog() { return this.#dialog_accessor_storage; }
19
+ set dialog(value) { this.#dialog_accessor_storage = value; }
20
+ #fixed_accessor_storage = false;
21
+ /**
22
+ * Set the position of content fixed when menu is closed. Only takes effect if always-show-content is set.
23
+ */
24
+ get fixed() { return this.#fixed_accessor_storage; }
25
+ set fixed(value) { this.#fixed_accessor_storage = value; }
26
+ #alwayShowContent_accessor_storage = false;
27
+ /**
28
+ * Show the slotted content regardless if the menu is open or closed
29
+ * @deprecated use mode instead
30
+ */
31
+ get alwayShowContent() { return this.#alwayShowContent_accessor_storage; }
32
+ set alwayShowContent(value) { this.#alwayShowContent_accessor_storage = value; }
33
+ #direction_accessor_storage = 'ltr';
34
+ /**
35
+ * Reverse the direction of the drawer opening and closing animations
36
+ */
37
+ get direction() { return this.#direction_accessor_storage; }
38
+ set direction(value) { this.#direction_accessor_storage = value; }
39
+ #hasHeader_accessor_storage = false;
40
+ get hasHeader() { return this.#hasHeader_accessor_storage; }
41
+ set hasHeader(value) { this.#hasHeader_accessor_storage = value; }
42
+ #hasFooter_accessor_storage = false;
43
+ get hasFooter() { return this.#hasFooter_accessor_storage; }
44
+ set hasFooter(value) { this.#hasFooter_accessor_storage = value; }
45
+ #keepOpenWhenGoingToFlyover_accessor_storage = false;
46
+ get keepOpenWhenGoingToFlyover() { return this.#keepOpenWhenGoingToFlyover_accessor_storage; }
47
+ set keepOpenWhenGoingToFlyover(value) { this.#keepOpenWhenGoingToFlyover_accessor_storage = value; }
48
+ #mode_accessor_storage;
49
+ get mode() { return this.#mode_accessor_storage; }
50
+ set mode(value) { this.#mode_accessor_storage = value; }
51
+ #isOpen_accessor_storage = false;
52
+ get isOpen() { return this.#isOpen_accessor_storage; } //read only
53
+ set isOpen(value) { this.#isOpen_accessor_storage = value; }
54
+ async updated(changedProps) {
55
+ if (changedProps.has('mode')) {
56
+ if (this.mode === 'inline') {
57
+ if (this.isOpen) {
58
+ //drawer was already open in inline mode, so we need to keep it open
59
+ this.alwayShowContent = true;
60
+ }
61
+ //close the flyover drawer, we are inline
62
+ this.dialog?.close();
63
+ }
64
+ if (this.mode === 'flyover') {
65
+ if (this.isOpen) {
66
+ if (this.keepOpenWhenGoingToFlyover) {
67
+ //we are now in flyover mode, so we need to open the drawer if it was open
68
+ this.dialog?.showModal();
69
+ this.dialog?.removeAttribute('hide');
70
+ this.setBodyOverflow('hidden');
71
+ }
72
+ else {
73
+ this.#setOpen(false);
74
+ }
75
+ }
76
+ //we are now in flyover mode, we need to hide the inline content
77
+ this.alwayShowContent = false;
78
+ }
79
+ }
80
+ }
81
+ #setOpen(isOpen) {
82
+ this.isOpen = isOpen;
83
+ this.dispatchEvent(new Event('open-change'));
84
+ }
85
+ async firstUpdated() {
86
+ let touchstartX = 0;
87
+ let touchendX = 0;
88
+ this.addEventListener('touchstart', (e) => {
89
+ touchstartX = e.changedTouches[0].screenX;
90
+ });
91
+ this.addEventListener('touchend', (e) => {
92
+ touchendX = e.changedTouches[0].screenX;
93
+ if (touchstartX - touchendX > 50) {
94
+ this.close();
95
+ }
96
+ });
97
+ this.dialog?.addEventListener('click', (e) => {
98
+ if (e.target instanceof Element && e.target?.nodeName === 'DIALOG') {
99
+ this.close();
100
+ }
101
+ });
102
+ this.dialog?.addEventListener('cancel', (event) => {
103
+ event.preventDefault();
104
+ this.close();
105
+ });
106
+ window.addEventListener('popstate', () => this.dialog?.close(), false);
107
+ // prevent page load @keyframes playing
108
+ await TitaniumDrawer_1.animationsComplete(this.dialog);
109
+ await TitaniumDrawer_1.animationsComplete(this.dialog);
110
+ this.dialog?.removeAttribute('loading');
111
+ }
112
+ static async animationsComplete(element) {
113
+ if (!element)
114
+ return;
115
+ return await Promise.allSettled(element.getAnimations().map((animation) => animation.finished));
116
+ }
117
+ /**
118
+ * Opens drawer
119
+ */
120
+ open() {
121
+ if (this.mode === 'inline') {
122
+ this.#setOpen(true);
123
+ this.alwayShowContent = true;
124
+ }
125
+ else {
126
+ this.dialog?.showModal();
127
+ this.dialog?.removeAttribute('hide');
128
+ this.setBodyOverflow('hidden');
129
+ }
130
+ }
131
+ /**
132
+ * Closes drawer
133
+ */
134
+ async close() {
135
+ if (this.mode === 'inline') {
136
+ this.#setOpen(false);
137
+ this.alwayShowContent = false;
138
+ }
139
+ else {
140
+ this.dialog?.setAttribute('hide', '');
141
+ await TitaniumDrawer_1.animationsComplete(this.dialog);
142
+ this.dialog?.close();
143
+ this.dialog?.removeAttribute('hide');
144
+ }
145
+ }
146
+ toggle() {
147
+ if (this.isOpen) {
148
+ this.close();
149
+ }
150
+ else {
151
+ this.open();
152
+ }
153
+ }
154
+ /**
155
+ * Closes drawer without animations
156
+ */
157
+ closeQuick() {
158
+ if (this.mode === 'inline') {
159
+ this.#setOpen(false);
160
+ this.alwayShowContent = false;
161
+ }
162
+ else {
163
+ this.dialog?.close();
164
+ }
165
+ }
166
+ setBodyOverflow(value) {
167
+ const htmlNode = document.querySelector('html');
168
+ if (htmlNode) {
169
+ htmlNode.style.overflow = value;
170
+ }
171
+ }
172
+ static { this.styles = css `
173
+ :host {
174
+ display: block;
175
+ }
176
+
177
+ dialog {
178
+ background-color: var(--titanium-drawer-background-color, var(--md-sys-color-background));
179
+ color: var(--titanium-drawer-color, var(--md-sys-color-on-background));
180
+ box-sizing: border-box;
181
+
182
+ grid:
183
+ 'content' 1fr
184
+ 'footer' auto;
185
+ }
186
+
187
+ :host([has-footer]) dialog {
188
+ grid:
189
+ 'content' 1fr
190
+ 'footer' auto;
191
+ }
192
+
193
+ :host([has-header]) dialog {
194
+ grid:
195
+ 'header' auto
196
+ 'content' 1fr;
197
+ }
198
+
199
+ :host([has-footer][has-header]) dialog {
200
+ grid:
201
+ 'header' auto
202
+ 'content' 1fr
203
+ 'footer' auto;
204
+ }
205
+
206
+ dialog[loading] {
207
+ visibility: hidden;
208
+ }
209
+
210
+ dialog[open] {
211
+ display: grid;
212
+
213
+ inset-inline-end: inherit;
214
+ border: 0;
215
+ padding: 0;
216
+ margin: 0;
217
+
218
+ flex-direction: column;
219
+ width: var(--titanium-drawer-width, 300px);
220
+
221
+ min-height: 100dvh;
222
+ max-height: -webkit-fill-available;
223
+
224
+ border-right: 1px solid var(--md-sys-color-outline-variant);
225
+ padding-right: 8px;
226
+ animation: show 0.25s ease normal;
227
+ }
228
+
229
+ :host([direction='rtl']) dialog[open] {
230
+ animation: show-reverse 0.25s ease normal;
231
+ }
232
+
233
+ main {
234
+ grid-area: content;
235
+ display: grid;
236
+ align-content: start;
237
+ scrollbar-color: var(--md-sys-color-surface-container-highest) transparent;
238
+ scrollbar-width: thin;
239
+ overflow-y: auto;
240
+ }
241
+
242
+ header,
243
+ footer {
244
+ display: none;
245
+
246
+ background-color: var(--titanium-drawer-background-color, var(--md-sys-color-background));
247
+ color: var(--titanium-drawer-color, var(--md-sys-color-on-background));
248
+ }
249
+
250
+ :host([has-header]) header {
251
+ display: grid;
252
+ grid-area: header;
253
+ }
254
+
255
+ :host([has-footer]) footer {
256
+ grid-area: footer;
257
+
258
+ display: flex;
259
+ flex-direction: row;
260
+ padding: 8px 24px;
261
+ gap: 24px;
262
+ }
263
+
264
+ footer ::slotted(a) {
265
+ text-decoration: none;
266
+ color: var(--md-sys-color-on-surface-variant);
267
+ font-family: var(--titanium-styles-a-font-family, Metropolis, Roboto, Noto, sans-serif);
268
+ font-weight: 400;
269
+ font-size: 12px;
270
+ opacity: 0.8;
271
+ }
272
+
273
+ :host([always-show-content]) dialog:not([open]) {
274
+ position: sticky;
275
+ top: var(--titanium-drawer-full-height-padding, 48px);
276
+
277
+ display: grid;
278
+ inset-inline-start: initial;
279
+ inset-inline-end: inherit;
280
+ border: 0;
281
+ min-width: var(--titanium-drawer-width, 300px);
282
+ padding: 0;
283
+ margin: 0;
284
+ width: 100%;
285
+
286
+ height: calc(100dvh - var(--titanium-drawer-full-height-padding, 48px));
287
+
288
+ animation: show 0.25s ease normal;
289
+ }
290
+
291
+ :host([always-show-content][direction='rtl']) dialog:not([open]) {
292
+ animation: show-reverse 0.25s ease normal;
293
+ }
294
+
295
+ ::slotted(h3) {
296
+ font-family: 'Metropolis';
297
+ color: var(--md-sys-color-on-background);
298
+ margin: 0px;
299
+ font-weight: 400;
300
+ padding: 12px 0px 4px 16px;
301
+ }
302
+
303
+ ::slotted(h4) {
304
+ white-space: nowrap;
305
+ overflow: hidden;
306
+ text-overflow: ellipsis;
307
+ color: var(--md-sys-color-on-background);
308
+ font-weight: 400;
309
+ margin: 0px;
310
+ padding: 16px 16px 8px 16px;
311
+ min-height: 24px;
312
+ }
313
+
314
+ ::slotted(h4[sub]) {
315
+ font-weight: 300;
316
+ font-size: 14px;
317
+ padding: 4px 12px 2px 66px;
318
+ cursor: inherit;
319
+ }
320
+
321
+ dialog[hide] {
322
+ animation: close 0.25s ease normal;
323
+ }
324
+
325
+ dialog[hide][direction='rtl'] {
326
+ animation: close-reverse 0.25s ease normal;
327
+ }
328
+
329
+ @keyframes show {
330
+ from {
331
+ transform: translateX(-110%);
332
+ }
333
+ to {
334
+ transform: translateX(0%);
335
+ }
336
+ }
337
+
338
+ @keyframes close {
339
+ to {
340
+ transform: translateX(-110%);
341
+ }
342
+ }
343
+
344
+ @keyframes show-reverse {
345
+ from {
346
+ transform: translateX(110%);
347
+ }
348
+ to {
349
+ transform: translateX(0%);
350
+ }
351
+ }
352
+
353
+ @keyframes close-reverse {
354
+ to {
355
+ transform: translateX(110%);
356
+ }
357
+ }
358
+
359
+ dialog::backdrop {
360
+ background-color: rgba(0, 0, 0, 0.5);
361
+ }
362
+
363
+ @supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
364
+ dialog::backdrop {
365
+ backdrop-filter: blur(3px);
366
+ /* Not supported yet */
367
+ transition: backdrop-filter 0.5s ease;
368
+ }
369
+ }
370
+ `; }
371
+ render() {
372
+ return html `<dialog
373
+ loading
374
+ @close=${(e) => {
375
+ this.setBodyOverflow('');
376
+ redispatchEvent(this, e);
377
+ }}
378
+ @toggle=${(e) => {
379
+ //isOpen state is fully managed by the drawer when not in flyover mode
380
+ if (this.mode === 'flyover') {
381
+ const isOpen = e.target?.hasAttribute('open');
382
+ this.#setOpen(isOpen);
383
+ }
384
+ redispatchEvent(this, e);
385
+ }}
386
+ part="dialog"
387
+ >
388
+ <header part="header"><slot name="header" @slotchange=${() => (this.hasHeader = this.headerElements.length > 0)}></slot></header>
389
+ <main part="main"><slot></slot></main>
390
+ <footer part="footer"><slot name="footer" @slotchange=${() => (this.hasFooter = this.footerElements.length > 0)}></slot></footer>
391
+ </dialog>`;
392
+ }
393
+ };
394
+ __decorate([
395
+ query('dialog')
396
+ ], TitaniumDrawer.prototype, "dialog", null);
397
+ __decorate([
398
+ property({ type: Boolean, reflect: true })
399
+ ], TitaniumDrawer.prototype, "fixed", null);
400
+ __decorate([
401
+ property({ type: Boolean, reflect: true, attribute: 'always-show-content' })
402
+ ], TitaniumDrawer.prototype, "alwayShowContent", null);
403
+ __decorate([
404
+ property({ type: String, reflect: true })
405
+ ], TitaniumDrawer.prototype, "direction", null);
406
+ __decorate([
407
+ property({ type: Boolean, reflect: true, attribute: 'has-header' })
408
+ ], TitaniumDrawer.prototype, "hasHeader", null);
409
+ __decorate([
410
+ property({ type: Boolean, reflect: true, attribute: 'has-footer' })
411
+ ], TitaniumDrawer.prototype, "hasFooter", null);
412
+ __decorate([
413
+ property({ type: Boolean, reflect: true, attribute: 'keep-open-when-going-to-flyover' })
414
+ ], TitaniumDrawer.prototype, "keepOpenWhenGoingToFlyover", null);
415
+ __decorate([
416
+ property({ type: String, reflect: true, attribute: 'mode' })
417
+ ], TitaniumDrawer.prototype, "mode", null);
418
+ __decorate([
419
+ property({ type: Boolean, reflect: true, attribute: 'open' })
420
+ ], TitaniumDrawer.prototype, "isOpen", null);
421
+ __decorate([
422
+ queryAssignedElements({ slot: 'header' })
423
+ ], TitaniumDrawer.prototype, "headerElements", void 0);
424
+ __decorate([
425
+ queryAssignedElements({ slot: 'footer' })
426
+ ], TitaniumDrawer.prototype, "footerElements", void 0);
427
+ TitaniumDrawer = TitaniumDrawer_1 = __decorate([
428
+ customElement('titanium-drawer')
429
+ ], TitaniumDrawer);
430
+ export { TitaniumDrawer };
431
+ //# sourceMappingURL=drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["drawer.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAkB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEjF;;;;;;;;GAQG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;;IACV,yBAAiC;IAAjC,IAAA,MAAM,4CAA2B;IAAjC,IAAA,MAAM,kDAA2B;IAKd,0BAAiB,KAAK,CAAC;IAH5E;;OAEG;IACkD,IAAA,KAAK,2CAAkB;IAAvB,IAAA,KAAK,iDAAkB;IAMW,qCAA4B,KAAK,CAAC;IAJzH;;;OAGG;IACoF,IAAA,gBAAgB,sDAAkB;IAAlC,IAAA,gBAAgB,4DAAkB;IAKrE,8BAA2B,KAAK,CAAC;IAHrF;;OAE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AC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iCAAiC,EAAE,CAAC;gEAAqD;AAEvE;IAAtE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;0CAA4C;AACjC;IAAvE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;4CAAkC;AAEpC;IAA3D,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sDAA6C;AAC3B;IAA3D,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sDAA6C;AA3B5E,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAgY1B"}
@@ -0,0 +1,31 @@
1
+ import { PropertyValues } from 'lit';
2
+ import duration from 'dayjs/esm/plugin/duration';
3
+ import { ExtendableOutlinedTextField } from '../extendable-outlined-text-field/extendable-outlined-text-field';
4
+ /**
5
+ * titanium-duration-input is a human readable duration textfield.
6
+ *
7
+ * @element titanium-duration-input
8
+ *
9
+ * @fires duration-change The duration can be accessed via event.target.duration
10
+ *
11
+ */
12
+ export declare class TitaniumDurationInput extends ExtendableOutlinedTextField {
13
+ #private;
14
+ /**
15
+ * Dayjs duration object. This is the main property you will interact with because the value
16
+ * property of this component is actually the human readable string and not the duration you most likely
17
+ * want to work with. When changed a duration-change event will be dispatched.
18
+ */
19
+ accessor duration: duration.Duration | null;
20
+ accessor autocomplete: string;
21
+ accessor spellcheck: boolean;
22
+ accessor placeholder: string;
23
+ accessor label: string;
24
+ firstUpdated(): void;
25
+ static styles: import("lit").CSSResult;
26
+ updated(changedProps: PropertyValues<this>): void;
27
+ checkValidity(): boolean;
28
+ reportValidity(): boolean;
29
+ reset(): Promise<void>;
30
+ }
31
+ //# sourceMappingURL=duration-input.d.ts.map
@@ -0,0 +1,126 @@
1
+ import { __decorate } from "tslib";
2
+ import { property, customElement } from 'lit/decorators.js';
3
+ import { css } from 'lit';
4
+ import dayjs from 'dayjs/esm';
5
+ import duration from 'dayjs/esm/plugin/duration';
6
+ import { ExtendableOutlinedTextField } from '../extendable-outlined-text-field/extendable-outlined-text-field';
7
+ import humanInterval, { durationToString } from './human-interval';
8
+ dayjs.extend(duration);
9
+ /**
10
+ * titanium-duration-input is a human readable duration textfield.
11
+ *
12
+ * @element titanium-duration-input
13
+ *
14
+ * @fires duration-change The duration can be accessed via event.target.duration
15
+ *
16
+ */
17
+ let TitaniumDurationInput = class TitaniumDurationInput extends ExtendableOutlinedTextField {
18
+ #duration_accessor_storage = null;
19
+ /**
20
+ * Dayjs duration object. This is the main property you will interact with because the value
21
+ * property of this component is actually the human readable string and not the duration you most likely
22
+ * want to work with. When changed a duration-change event will be dispatched.
23
+ */
24
+ get duration() { return this.#duration_accessor_storage; }
25
+ set duration(value) { this.#duration_accessor_storage = value; }
26
+ #autocomplete_accessor_storage = 'off';
27
+ get autocomplete() { return this.#autocomplete_accessor_storage; }
28
+ set autocomplete(value) { this.#autocomplete_accessor_storage = value; }
29
+ #spellcheck_accessor_storage = false;
30
+ get spellcheck() { return this.#spellcheck_accessor_storage; }
31
+ set spellcheck(value) { this.#spellcheck_accessor_storage = value; }
32
+ #placeholder_accessor_storage = '3 hours and 30 minutes';
33
+ get placeholder() { return this.#placeholder_accessor_storage; }
34
+ set placeholder(value) { this.#placeholder_accessor_storage = value; }
35
+ #label_accessor_storage = 'Duration';
36
+ get label() { return this.#label_accessor_storage; }
37
+ set label(value) { this.#label_accessor_storage = value; }
38
+ firstUpdated() {
39
+ this.addEventListener('change', () => {
40
+ this.#customReportValidity(this.input.value);
41
+ const dur = this.#textToInterval(this.input.value);
42
+ if (dur?.asMilliseconds() != this.duration?.asMilliseconds()) {
43
+ this.duration = dur;
44
+ this.dispatchEvent(new Event('duration-change'));
45
+ }
46
+ });
47
+ }
48
+ static { this.styles = css `
49
+ :host {
50
+ display: block;
51
+ }
52
+
53
+ md-outlined-text-field {
54
+ width: 100%;
55
+ }
56
+ `; }
57
+ updated(changedProps) {
58
+ if (changedProps.has('duration') && changedProps.get('duration') !== this.duration) {
59
+ if (this.duration) {
60
+ this.value = durationToString(this.duration);
61
+ }
62
+ else {
63
+ this.duration = null;
64
+ this.value = '';
65
+ }
66
+ }
67
+ }
68
+ checkValidity() {
69
+ return super.checkValidity() && this.#customCheckValidity(this.input.value);
70
+ }
71
+ reportValidity() {
72
+ this.#customReportValidity(this.input.value);
73
+ return super.reportValidity();
74
+ }
75
+ #customCheckValidity(input) {
76
+ if (input && !this.#textToInterval(input)) {
77
+ return false;
78
+ }
79
+ else {
80
+ return true;
81
+ }
82
+ }
83
+ #customReportValidity(input) {
84
+ if (!this.#customCheckValidity(input)) {
85
+ this.error = true;
86
+ this.errorText = 'Duration was entered in an incorrect format. Try "3 hours and 30 minutes"';
87
+ }
88
+ else {
89
+ this.error = false;
90
+ this.errorText = '';
91
+ }
92
+ }
93
+ #textToInterval(input) {
94
+ if (!input) {
95
+ return null;
96
+ }
97
+ const ms = humanInterval(input);
98
+ return isNaN(ms) ? null : dayjs.duration(ms, 'ms');
99
+ }
100
+ async reset() {
101
+ super.reset();
102
+ this.error = false;
103
+ this.errorText = '';
104
+ this.duration = null;
105
+ }
106
+ };
107
+ __decorate([
108
+ property({ type: Object })
109
+ ], TitaniumDurationInput.prototype, "duration", null);
110
+ __decorate([
111
+ property({ reflect: true, type: String })
112
+ ], TitaniumDurationInput.prototype, "autocomplete", null);
113
+ __decorate([
114
+ property({ reflect: true, type: Boolean })
115
+ ], TitaniumDurationInput.prototype, "spellcheck", null);
116
+ __decorate([
117
+ property({ reflect: true, type: String })
118
+ ], TitaniumDurationInput.prototype, "placeholder", null);
119
+ __decorate([
120
+ property({ reflect: true, type: String })
121
+ ], TitaniumDurationInput.prototype, "label", null);
122
+ TitaniumDurationInput = __decorate([
123
+ customElement('titanium-duration-input')
124
+ ], TitaniumDurationInput);
125
+ export { TitaniumDurationInput };
126
+ //# sourceMappingURL=duration-input.js.map