@leavittsoftware/web 1.0.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 (294) hide show
  1. package/leavitt/api-service/HttpError.d.ts +10 -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 +27 -0
  5. package/leavitt/api-service/api-service.js +332 -0
  6. package/leavitt/api-service/api-service.js.map +1 -0
  7. package/leavitt/api-service/api2-service.d.ts +338 -0
  8. package/leavitt/api-service/api2-service.js +17 -0
  9. package/leavitt/api-service/api2-service.js.map +1 -0
  10. package/leavitt/api-service/authenticated-token-provider.d.ts +5 -0
  11. package/leavitt/api-service/authenticated-token-provider.js +7 -0
  12. package/leavitt/api-service/authenticated-token-provider.js.map +1 -0
  13. package/leavitt/api-service/bearer-token-provider.d.ts +4 -0
  14. package/leavitt/api-service/bearer-token-provider.js +2 -0
  15. package/leavitt/api-service/bearer-token-provider.js.map +1 -0
  16. package/leavitt/api-service/mapi-service.d.ts +338 -0
  17. package/leavitt/api-service/mapi-service.js +17 -0
  18. package/leavitt/api-service/mapi-service.js.map +1 -0
  19. package/leavitt/api-service/no-authentication-token-provider.d.ts +5 -0
  20. package/leavitt/api-service/no-authentication-token-provider.js +6 -0
  21. package/leavitt/api-service/no-authentication-token-provider.js.map +1 -0
  22. package/leavitt/api-service/odata-dto.d.ts +6 -0
  23. package/leavitt/api-service/odata-dto.js +7 -0
  24. package/leavitt/api-service/odata-dto.js.map +1 -0
  25. package/leavitt/api-service/odata-model-info.d.ts +5 -0
  26. package/leavitt/api-service/odata-model-info.js +7 -0
  27. package/leavitt/api-service/odata-model-info.js.map +1 -0
  28. package/leavitt/api-service/odata-response.d.ts +15 -0
  29. package/leavitt/api-service/odata-response.js +50 -0
  30. package/leavitt/api-service/odata-response.js.map +1 -0
  31. package/leavitt/api-service/status-codes.d.ts +2 -0
  32. package/leavitt/api-service/status-codes.js +44 -0
  33. package/leavitt/api-service/status-codes.js.map +1 -0
  34. package/leavitt/company-select/company-select.d.ts +50 -0
  35. package/leavitt/company-select/company-select.js +157 -0
  36. package/leavitt/company-select/company-select.js.map +1 -0
  37. package/leavitt/person-company-select/person-company-select.d.ts +41 -0
  38. package/leavitt/person-company-select/person-company-select.js +180 -0
  39. package/leavitt/person-company-select/person-company-select.js.map +1 -0
  40. package/leavitt/person-group-select/people-group-icons.d.ts +5 -0
  41. package/leavitt/person-group-select/people-group-icons.js +66 -0
  42. package/leavitt/person-group-select/people-group-icons.js.map +1 -0
  43. package/leavitt/person-group-select/person-group-select.d.ts +41 -0
  44. package/leavitt/person-group-select/person-group-select.js +186 -0
  45. package/leavitt/person-group-select/person-group-select.js.map +1 -0
  46. package/leavitt/person-select/person-select.d.ts +33 -0
  47. package/leavitt/person-select/person-select.js +128 -0
  48. package/leavitt/person-select/person-select.js.map +1 -0
  49. package/leavitt/profile-picture/profile-picture-menu.d.ts +44 -0
  50. package/leavitt/profile-picture/profile-picture-menu.js +197 -0
  51. package/leavitt/profile-picture/profile-picture-menu.js.map +1 -0
  52. package/leavitt/profile-picture/profile-picture.d.ts +39 -0
  53. package/leavitt/profile-picture/profile-picture.js +151 -0
  54. package/leavitt/profile-picture/profile-picture.js.map +1 -0
  55. package/leavitt/user-feedback/user-feedback.d.ts +357 -0
  56. package/leavitt/user-feedback/user-feedback.js +207 -0
  57. package/leavitt/user-feedback/user-feedback.js.map +1 -0
  58. package/leavitt/user-manager/LssJwtToken.d.ts +21 -0
  59. package/leavitt/user-manager/LssJwtToken.js +2 -0
  60. package/leavitt/user-manager/LssJwtToken.js.map +1 -0
  61. package/leavitt/user-manager/user-manager-events.d.ts +5 -0
  62. package/leavitt/user-manager/user-manager-events.js +7 -0
  63. package/leavitt/user-manager/user-manager-events.js.map +1 -0
  64. package/leavitt/user-manager/user-manager.d.ts +37 -0
  65. package/leavitt/user-manager/user-manager.js +364 -0
  66. package/leavitt/user-manager/user-manager.js.map +1 -0
  67. package/package.json +36 -0
  68. package/titanium/access-denied-page/access-denied-page.d.ts +16 -0
  69. package/titanium/access-denied-page/access-denied-page.js +360 -0
  70. package/titanium/access-denied-page/access-denied-page.js.map +1 -0
  71. package/titanium/address-input/Address.js.map +1 -0
  72. package/titanium/address-input/address-input.d.ts +29 -0
  73. package/titanium/address-input/address-input.js +77 -0
  74. package/titanium/address-input/address-input.js.map +1 -0
  75. package/titanium/address-input/google-address-input.d.ts +30 -0
  76. package/titanium/address-input/google-address-input.js +202 -0
  77. package/titanium/address-input/google-address-input.js.map +1 -0
  78. package/titanium/address-input/manual-address-dialog.d.ts +30 -0
  79. package/titanium/address-input/manual-address-dialog.js +250 -0
  80. package/titanium/address-input/manual-address-dialog.js.map +1 -0
  81. package/titanium/address-input/types/address-input-address.d.ts +17 -0
  82. package/titanium/address-input/types/address-input-address.js +2 -0
  83. package/titanium/address-input/types/address-input-address.js.map +1 -0
  84. package/titanium/address-input/types/address.js.map +1 -0
  85. package/titanium/address-input/types/autocomplete-prediction-suggestion.js.map +1 -0
  86. package/titanium/address-input/utils/address-to-string.d.ts +3 -0
  87. package/titanium/address-input/utils/address-to-string.js +13 -0
  88. package/titanium/address-input/utils/address-to-string.js.map +1 -0
  89. package/titanium/address-input/utils/place-result-to-address.d.ts +4 -0
  90. package/titanium/address-input/utils/place-result-to-address.js +33 -0
  91. package/titanium/address-input/utils/place-result-to-address.js.map +1 -0
  92. package/titanium/address-input/utils/validate-street.d.ts +2 -0
  93. package/titanium/address-input/utils/validate-street.js +8 -0
  94. package/titanium/address-input/utils/validate-street.js.map +1 -0
  95. package/titanium/card/card.d.ts +23 -0
  96. package/titanium/card/card.js +160 -0
  97. package/titanium/card/card.js.map +1 -0
  98. package/titanium/chip-multi-select/chip-multi-select.d.ts +55 -0
  99. package/titanium/chip-multi-select/chip-multi-select.js +119 -0
  100. package/titanium/chip-multi-select/chip-multi-select.js.map +1 -0
  101. package/titanium/data-table/data-table-header.d.ts +67 -0
  102. package/titanium/data-table/data-table-header.js +207 -0
  103. package/titanium/data-table/data-table-header.js.map +1 -0
  104. package/titanium/data-table/data-table-item.d.ts +100 -0
  105. package/titanium/data-table/data-table-item.js +511 -0
  106. package/titanium/data-table/data-table-item.js.map +1 -0
  107. package/titanium/data-table/data-table.d.ts +146 -0
  108. package/titanium/data-table/data-table.js +605 -0
  109. package/titanium/data-table/data-table.js.map +1 -0
  110. package/titanium/data-table/filter-controller.d.ts +23 -0
  111. package/titanium/data-table/filter-controller.js +119 -0
  112. package/titanium/data-table/filter-controller.js.map +1 -0
  113. package/titanium/data-table/filter.d.ts +8 -0
  114. package/titanium/data-table/filter.js +11 -0
  115. package/titanium/data-table/filter.js.map +1 -0
  116. package/titanium/data-table/page-control.d.ts +54 -0
  117. package/titanium/data-table/page-control.js +196 -0
  118. package/titanium/data-table/page-control.js.map +1 -0
  119. package/titanium/date-range-selector/date-range-change-event.d.ts +8 -0
  120. package/titanium/date-range-selector/date-range-change-event.js +10 -0
  121. package/titanium/date-range-selector/date-range-change-event.js.map +1 -0
  122. package/titanium/date-range-selector/date-range-selector.d.ts +65 -0
  123. package/titanium/date-range-selector/date-range-selector.js +423 -0
  124. package/titanium/date-range-selector/date-range-selector.js.map +1 -0
  125. package/titanium/date-range-selector/range-label.d.ts +4 -0
  126. package/titanium/date-range-selector/range-label.js +25 -0
  127. package/titanium/date-range-selector/range-label.js.map +1 -0
  128. package/titanium/drawer/drawer.d.ts +39 -0
  129. package/titanium/drawer/drawer.js +233 -0
  130. package/titanium/drawer/drawer.js.map +1 -0
  131. package/titanium/duration-input/duration-input.d.ts +26 -0
  132. package/titanium/duration-input/duration-input.js +86 -0
  133. package/titanium/duration-input/duration-input.js.map +1 -0
  134. package/titanium/duration-input/human-interval.d.ts +19 -0
  135. package/titanium/duration-input/human-interval.js +74 -0
  136. package/titanium/duration-input/human-interval.js.map +1 -0
  137. package/titanium/error-page/error-page.d.ts +16 -0
  138. package/titanium/error-page/error-page.js +96 -0
  139. package/titanium/error-page/error-page.js.map +1 -0
  140. package/titanium/event-bus/event-bus.d.ts +10 -0
  141. package/titanium/event-bus/event-bus.js +52 -0
  142. package/titanium/event-bus/event-bus.js.map +1 -0
  143. package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.d.ts +160 -0
  144. package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js +295 -0
  145. package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js.map +1 -0
  146. package/titanium/extendable-outlined-text-field/extensible-outlined-text-field.d.ts +45 -0
  147. package/titanium/extendable-outlined-text-field/extensible-outlined-text-field.js.map +1 -0
  148. package/titanium/full-page-loading-indicator/full-page-loading-indicator.d.ts +19 -0
  149. package/titanium/full-page-loading-indicator/full-page-loading-indicator.js +170 -0
  150. package/titanium/full-page-loading-indicator/full-page-loading-indicator.js.map +1 -0
  151. package/titanium/hacks/dialog-overflow-hacks.d.ts +4 -0
  152. package/titanium/hacks/dialog-overflow-hacks.js +21 -0
  153. package/titanium/hacks/dialog-overflow-hacks.js.map +1 -0
  154. package/titanium/header/header.d.ts +39 -0
  155. package/titanium/header/header.js +148 -0
  156. package/titanium/header/header.js.map +1 -0
  157. package/titanium/helpers/csv-download.d.ts +3 -0
  158. package/titanium/helpers/csv-download.js +78 -0
  159. package/titanium/helpers/csv-download.js.map +1 -0
  160. package/titanium/helpers/debouncer.d.ts +13 -0
  161. package/titanium/helpers/debouncer.js +33 -0
  162. package/titanium/helpers/debouncer.js.map +1 -0
  163. package/titanium/helpers/delay.d.ts +2 -0
  164. package/titanium/helpers/delay.js +6 -0
  165. package/titanium/helpers/delay.js.map +1 -0
  166. package/titanium/helpers/dev-detection.d.ts +3 -0
  167. package/titanium/helpers/dev-detection.js +12 -0
  168. package/titanium/helpers/dev-detection.js.map +1 -0
  169. package/titanium/helpers/helpers.d.ts +14 -0
  170. package/titanium/helpers/helpers.js +14 -0
  171. package/titanium/helpers/helpers.js.map +1 -0
  172. package/titanium/helpers/join.d.ts +2 -0
  173. package/titanium/helpers/join.js +5 -0
  174. package/titanium/helpers/join.js.map +1 -0
  175. package/titanium/helpers/leavitt-cdn.d.ts +5 -0
  176. package/titanium/helpers/leavitt-cdn.js +38 -0
  177. package/titanium/helpers/leavitt-cdn.js.map +1 -0
  178. package/titanium/helpers/load-while.d.ts +343 -0
  179. package/titanium/helpers/load-while.js +27 -0
  180. package/titanium/helpers/load-while.js.map +1 -0
  181. package/titanium/helpers/media-query.d.ts +2 -0
  182. package/titanium/helpers/media-query.js +6 -0
  183. package/titanium/helpers/media-query.js.map +1 -0
  184. package/titanium/helpers/middle-ellipsis.d.ts +2 -0
  185. package/titanium/helpers/middle-ellipsis.js +7 -0
  186. package/titanium/helpers/middle-ellipsis.js.map +1 -0
  187. package/titanium/helpers/not-null-or-undefined.d.ts +2 -0
  188. package/titanium/helpers/not-null-or-undefined.js +4 -0
  189. package/titanium/helpers/not-null-or-undefined.js.map +1 -0
  190. package/titanium/helpers/not-null.d.ts +2 -0
  191. package/titanium/helpers/not-null.js +4 -0
  192. package/titanium/helpers/not-null.js.map +1 -0
  193. package/titanium/helpers/not-undefined.d.ts +2 -0
  194. package/titanium/helpers/not-undefined.js +4 -0
  195. package/titanium/helpers/not-undefined.js.map +1 -0
  196. package/titanium/helpers/odata-helpers.d.ts +2 -0
  197. package/titanium/helpers/odata-helpers.js +2 -0
  198. package/titanium/helpers/odata-helpers.js.map +1 -0
  199. package/titanium/helpers/search-token.d.ts +2 -0
  200. package/titanium/helpers/search-token.js +17 -0
  201. package/titanium/helpers/search-token.js.map +1 -0
  202. package/titanium/icon-picker/icon-picker.d.ts +23 -0
  203. package/titanium/icon-picker/icon-picker.js +75 -0
  204. package/titanium/icon-picker/icon-picker.js.map +1 -0
  205. package/titanium/icon-picker/material-symbols.d.ts +3 -0
  206. package/titanium/icon-picker/material-symbols.js +3297 -0
  207. package/titanium/icon-picker/material-symbols.js.map +1 -0
  208. package/titanium/input-validator/input-validator.d.ts +20 -0
  209. package/titanium/input-validator/input-validator.js +45 -0
  210. package/titanium/input-validator/input-validator.js.map +1 -0
  211. package/titanium/search-input/search-input.d.ts +47 -0
  212. package/titanium/search-input/search-input.js +237 -0
  213. package/titanium/search-input/search-input.js.map +1 -0
  214. package/titanium/service-worker-notifier/service-worker-notifier.d.ts +9 -0
  215. package/titanium/service-worker-notifier/service-worker-notifier.js +57 -0
  216. package/titanium/service-worker-notifier/service-worker-notifier.js.map +1 -0
  217. package/titanium/show-hide/show-hide.d.ts +36 -0
  218. package/titanium/show-hide/show-hide.js +144 -0
  219. package/titanium/show-hide/show-hide.js.map +1 -0
  220. package/titanium/single-select-base/single-select-base.d.ts +449 -0
  221. package/titanium/single-select-base/single-select-base.js +411 -0
  222. package/titanium/single-select-base/single-select-base.js.map +1 -0
  223. package/titanium/smart-attachment-input/crop-and-save-image-dialog.d.ts +370 -0
  224. package/titanium/smart-attachment-input/crop-and-save-image-dialog.js +270 -0
  225. package/titanium/smart-attachment-input/crop-and-save-image-dialog.js.map +1 -0
  226. package/titanium/smart-attachment-input/cropper-styles.d.ts +3 -0
  227. package/titanium/smart-attachment-input/cropper-styles.js +311 -0
  228. package/titanium/smart-attachment-input/cropper-styles.js.map +1 -0
  229. package/titanium/smart-attachment-input/image-formats.d.ts +5 -0
  230. package/titanium/smart-attachment-input/image-formats.js +37 -0
  231. package/titanium/smart-attachment-input/image-formats.js.map +1 -0
  232. package/titanium/smart-attachment-input/image-preview-dialog.d.ts +21 -0
  233. package/titanium/smart-attachment-input/image-preview-dialog.js +83 -0
  234. package/titanium/smart-attachment-input/image-preview-dialog.js.map +1 -0
  235. package/titanium/smart-attachment-input/smart-attachment-input.d.ts +126 -0
  236. package/titanium/smart-attachment-input/smart-attachment-input.js +422 -0
  237. package/titanium/smart-attachment-input/smart-attachment-input.js.map +1 -0
  238. package/titanium/smart-attachment-input/type/smart-attachment.d.ts +7 -0
  239. package/titanium/smart-attachment-input/type/smart-attachment.js +2 -0
  240. package/titanium/smart-attachment-input/type/smart-attachment.js.map +1 -0
  241. package/titanium/snackbar/snackbar.d.ts +79 -0
  242. package/titanium/snackbar/snackbar.js +302 -0
  243. package/titanium/snackbar/snackbar.js.map +1 -0
  244. package/titanium/styles/a.d.ts +2 -0
  245. package/titanium/styles/a.js +18 -0
  246. package/titanium/styles/a.js.map +1 -0
  247. package/titanium/styles/data-row.d.ts +2 -0
  248. package/titanium/styles/data-row.js +52 -0
  249. package/titanium/styles/data-row.js.map +1 -0
  250. package/titanium/styles/ellipsis.d.ts +2 -0
  251. package/titanium/styles/ellipsis.js +9 -0
  252. package/titanium/styles/ellipsis.js.map +1 -0
  253. package/titanium/styles/h1.d.ts +2 -0
  254. package/titanium/styles/h1.js +17 -0
  255. package/titanium/styles/h1.js.map +1 -0
  256. package/titanium/styles/h2.d.ts +2 -0
  257. package/titanium/styles/h2.js +17 -0
  258. package/titanium/styles/h2.js.map +1 -0
  259. package/titanium/styles/h3.d.ts +2 -0
  260. package/titanium/styles/h3.js +17 -0
  261. package/titanium/styles/h3.js.map +1 -0
  262. package/titanium/styles/h4.d.ts +2 -0
  263. package/titanium/styles/h4.js +17 -0
  264. package/titanium/styles/h4.js.map +1 -0
  265. package/titanium/styles/h5.d.ts +2 -0
  266. package/titanium/styles/h5.js +19 -0
  267. package/titanium/styles/h5.js.map +1 -0
  268. package/titanium/styles/p.d.ts +2 -0
  269. package/titanium/styles/p.js +17 -0
  270. package/titanium/styles/p.js.map +1 -0
  271. package/titanium/styles/styles.d.ts +17 -0
  272. package/titanium/styles/styles.js +17 -0
  273. package/titanium/styles/styles.js.map +1 -0
  274. package/titanium/toolbar/toolbar.d.ts +34 -0
  275. package/titanium/toolbar/toolbar.js +104 -0
  276. package/titanium/toolbar/toolbar.js.map +1 -0
  277. package/titanium/types/any-function.d.ts +5 -0
  278. package/titanium/types/any-function.js +2 -0
  279. package/titanium/types/any-function.js.map +1 -0
  280. package/titanium/types/dom-event.d.ts +4 -0
  281. package/titanium/types/dom-event.js +2 -0
  282. package/titanium/types/dom-event.js.map +1 -0
  283. package/titanium/types/identifier-interface.d.ts +4 -0
  284. package/titanium/types/identifier-interface.js +2 -0
  285. package/titanium/types/identifier-interface.js.map +1 -0
  286. package/titanium/types/pending-state-event.d.ts +7 -0
  287. package/titanium/types/pending-state-event.js +7 -0
  288. package/titanium/types/pending-state-event.js.map +1 -0
  289. package/titanium/types/string-map.d.ts +7 -0
  290. package/titanium/types/string-map.js +5 -0
  291. package/titanium/types/string-map.js.map +1 -0
  292. package/titanium/youtube-input/youtube-input.d.ts +17 -0
  293. package/titanium/youtube-input/youtube-input.js +52 -0
  294. package/titanium/youtube-input/youtube-input.js.map +1 -0
@@ -0,0 +1,233 @@
1
+ var TitaniumDrawer_1;
2
+ import { __decorate } from "tslib";
3
+ import { LitElement, css, html } from 'lit';
4
+ import { customElement, property, query } from 'lit/decorators.js';
5
+ /**
6
+ * Titanium drawer - a minimalist fly-out style drawer based on a native dialog
7
+ *
8
+ * @element titanium-drawer
9
+ * @slot - Main drawer content slot
10
+ * @csspart dialog - internal native dialog element
11
+ * @cssprop {Color} [--md-sys-color-outline-variant] Color of left border when open
12
+ * @cssprop {Color} [--md-sys-color-on-background] Color of slotted h3 and h4
13
+ */
14
+ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ /**
18
+ * Set the position of content fixed when menu is closed. Only takes effect if always-show-content is set.
19
+ */
20
+ this.fixed = false;
21
+ /**
22
+ * Show the slotted content regardless if the menu is open or closed
23
+ */
24
+ this.alwayShowContent = false;
25
+ }
26
+ static { TitaniumDrawer_1 = this; }
27
+ async firstUpdated() {
28
+ let touchstartX = 0;
29
+ let touchendX = 0;
30
+ this.addEventListener('touchstart', e => {
31
+ touchstartX = e.changedTouches[0].screenX;
32
+ });
33
+ this.addEventListener('touchend', e => {
34
+ touchendX = e.changedTouches[0].screenX;
35
+ if (touchendX < touchstartX) {
36
+ this.close();
37
+ }
38
+ });
39
+ this.dialog?.addEventListener('click', e => {
40
+ if (e.target instanceof Element && e.target?.nodeName === 'DIALOG') {
41
+ this.close();
42
+ }
43
+ });
44
+ this.dialog?.addEventListener('cancel', event => {
45
+ event.preventDefault();
46
+ this.close();
47
+ });
48
+ window.addEventListener('popstate', () => this.dialog?.close(), false);
49
+ // prevent page load @keyframes playing
50
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
51
+ await TitaniumDrawer_1.animationsComplete(this.dialog);
52
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
+ await TitaniumDrawer_1.animationsComplete(this.dialog);
54
+ this.dialog?.removeAttribute('loading');
55
+ }
56
+ static async animationsComplete(element) {
57
+ return await Promise.allSettled(element.getAnimations().map(animation => animation.finished));
58
+ }
59
+ /**
60
+ * Opens drawer
61
+ */
62
+ open() {
63
+ this.dialog?.showModal();
64
+ this.dialog?.removeAttribute('hide');
65
+ this.setBodyOverflow('hidden');
66
+ }
67
+ /**
68
+ * Closes drawer
69
+ */
70
+ async close() {
71
+ if (this.dialog?.open) {
72
+ this.dialog?.setAttribute('hide', '');
73
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
74
+ await TitaniumDrawer_1.animationsComplete(this.dialog);
75
+ this.dialog?.close();
76
+ this.dialog?.removeAttribute('hide');
77
+ }
78
+ }
79
+ /**
80
+ * Closes drawer without animations
81
+ */
82
+ closeQuick() {
83
+ if (this.dialog?.open) {
84
+ this.dialog?.close();
85
+ }
86
+ }
87
+ setBodyOverflow(value) {
88
+ const htmlNode = document.querySelector('html');
89
+ if (htmlNode) {
90
+ htmlNode.style.overflow = value;
91
+ }
92
+ }
93
+ static { this.styles = css `
94
+ :host {
95
+ display: block;
96
+ }
97
+
98
+ dialog {
99
+ background-color: var(--md-sys-color-background);
100
+ color: var(--md-sys-color-on-background);
101
+ }
102
+
103
+ dialog[loading] {
104
+ visibility: hidden;
105
+ }
106
+
107
+ dialog[open] {
108
+ display: flex;
109
+ inset-inline-end: inherit;
110
+ border: 0;
111
+ padding: 0;
112
+ margin: 0;
113
+ width: 100%;
114
+ flex-direction: column;
115
+ width: 300px;
116
+
117
+ min-height: 100vh;
118
+ max-height: -webkit-fill-available;
119
+
120
+ border-right: 1px solid var(--md-sys-color-outline-variant);
121
+ padding-right: 8px;
122
+ animation: show 0.25s ease normal;
123
+ }
124
+
125
+ :host([always-show-content]) dialog:not([open]) {
126
+ display: flex;
127
+ inset-inline-start: initial;
128
+ inset-inline-end: inherit;
129
+ border: 0;
130
+ position: relative;
131
+ min-width: 300px;
132
+ padding: 0;
133
+ margin: 0;
134
+ width: 100%;
135
+ flex-direction: column;
136
+
137
+ animation: show 0.25s ease normal;
138
+ }
139
+
140
+ :host([always-show-content][fixed]) dialog:not([open]) {
141
+ position: fixed;
142
+ top: 56px;
143
+ max-width: 300px;
144
+ max-height: calc(100vh - 56px);
145
+ overflow-y: auto;
146
+ }
147
+
148
+ ::slotted(h3) {
149
+ font-family: 'Metropolis';
150
+ color: var(--md-sys-color-on-background);
151
+ margin: 0px;
152
+ font-weight: 400;
153
+ padding: 12px 0px 8px 24px;
154
+ }
155
+
156
+ ::slotted(h4) {
157
+ white-space: nowrap;
158
+ overflow: hidden;
159
+ text-overflow: ellipsis;
160
+ color: var(--md-sys-color-on-background);
161
+ font-weight: 400;
162
+ cursor: pointer;
163
+ margin: 0px;
164
+ padding: 16px 24px 8px 24px;
165
+ min-height: 24px;
166
+ }
167
+
168
+ ::slotted(h4[sub]) {
169
+ font-weight: 300;
170
+ font-size: 14px;
171
+ padding: 0px 12px 6px 66px;
172
+ cursor: inherit;
173
+ }
174
+
175
+ dialog[hide] {
176
+ animation: close 0.25s ease normal;
177
+ }
178
+
179
+ @keyframes show {
180
+ from {
181
+ transform: translateX(-110%);
182
+ }
183
+ to {
184
+ transform: translateX(0%);
185
+ }
186
+ }
187
+
188
+ @keyframes close {
189
+ to {
190
+ transform: translateX(-110%);
191
+ }
192
+ }
193
+
194
+ dialog::backdrop {
195
+ background-color: rgba(0, 0, 0, 0.5);
196
+ }
197
+
198
+ @supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
199
+ dialog::backdrop {
200
+ background-color: rgba(255, 255, 255, 0.7);
201
+ -webkit-backdrop-filter: blur(3px);
202
+ backdrop-filter: blur(3px);
203
+ /* Not supported yet */
204
+ transition: backdrop-filter 0.5s ease;
205
+ }
206
+ }
207
+ `; }
208
+ render() {
209
+ return html `<dialog
210
+ loading
211
+ @close=${() => {
212
+ this.setBodyOverflow('');
213
+ }}
214
+ part="dialog"
215
+ >
216
+ <slot></slot>
217
+ </dialog>`;
218
+ }
219
+ };
220
+ __decorate([
221
+ query('dialog')
222
+ ], TitaniumDrawer.prototype, "dialog", void 0);
223
+ __decorate([
224
+ property({ type: Boolean, reflect: true })
225
+ ], TitaniumDrawer.prototype, "fixed", void 0);
226
+ __decorate([
227
+ property({ type: Boolean, reflect: true, attribute: 'always-show-content' })
228
+ ], TitaniumDrawer.prototype, "alwayShowContent", void 0);
229
+ TitaniumDrawer = TitaniumDrawer_1 = __decorate([
230
+ customElement('titanium-drawer')
231
+ ], TitaniumDrawer);
232
+ export { TitaniumDrawer };
233
+ //# sourceMappingURL=drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["drawer.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE;;;;;;;;GAQG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QAGL;;WAEG;QACyC,UAAK,GAAY,KAAK,CAAC;QAEnE;;WAEG;QAC2E,qBAAgB,GAAY,KAAK,CAAC;IA+MlH,CAAC;;IA7MC,KAAK,CAAC,YAAY;QAChB,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,SAAS,GAAG,CAAC,C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kHX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;eAEA,GAAG,EAAE;YACZ,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAC3B,CAAC;;;;cAIO,CAAC;IACb,CAAC;;AAxNwB;IAAxB,KAAK,CAAC,QAAQ,CAAC;8CAA0C;AAKd;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAwB;AAKW;IAA7E,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;wDAAmC;AAXrG,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CA0N1B"}
@@ -0,0 +1,26 @@
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
+ duration: duration.Duration | null;
20
+ firstUpdated(): void;
21
+ updated(changedProps: PropertyValues<this>): void;
22
+ checkValidity(): boolean;
23
+ reportValidity(): boolean;
24
+ reset(): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=duration-input.d.ts.map
@@ -0,0 +1,86 @@
1
+ import { __decorate } from "tslib";
2
+ import { property, customElement } from 'lit/decorators.js';
3
+ import dayjs from 'dayjs/esm';
4
+ import duration from 'dayjs/esm/plugin/duration';
5
+ import { ExtendableOutlinedTextField } from '../extendable-outlined-text-field/extendable-outlined-text-field';
6
+ import humanInterval from './human-interval';
7
+ dayjs.extend(duration);
8
+ /**
9
+ * titanium-duration-input is a human readable duration textfield.
10
+ *
11
+ * @element titanium-duration-input
12
+ *
13
+ * @fires duration-change The duration can be accessed via event.target.duration
14
+ *
15
+ */
16
+ let TitaniumDurationInput = class TitaniumDurationInput extends ExtendableOutlinedTextField {
17
+ constructor() {
18
+ super(...arguments);
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
+ this.duration = null;
25
+ }
26
+ firstUpdated() {
27
+ this.label = 'Duration';
28
+ this.supportingText = 'Enter a duration e.g. "3 hours and 30 minutes"';
29
+ }
30
+ updated(changedProps) {
31
+ if (changedProps.has('value')) {
32
+ this.#customReportValidity(this.input.value);
33
+ const dur = this.#textToInterval(this.input.value);
34
+ if (dur?.asMilliseconds() != this.duration?.asMilliseconds()) {
35
+ this.duration = dur;
36
+ this.dispatchEvent(new Event('duration-change'));
37
+ }
38
+ }
39
+ }
40
+ checkValidity() {
41
+ return super.checkValidity() && this.#customCheckValidity(this.input.value);
42
+ }
43
+ reportValidity() {
44
+ this.#customReportValidity(this.input.value);
45
+ return super.reportValidity();
46
+ }
47
+ #customCheckValidity(input) {
48
+ if (input && !this.#textToInterval(input)) {
49
+ return false;
50
+ }
51
+ else {
52
+ return true;
53
+ }
54
+ }
55
+ #customReportValidity(input) {
56
+ if (!this.#customCheckValidity(input)) {
57
+ this.error = true;
58
+ this.errorText = 'Duration was entered in an incorrect format';
59
+ }
60
+ else {
61
+ this.error = false;
62
+ this.errorText = '';
63
+ }
64
+ }
65
+ #textToInterval(input) {
66
+ if (!input) {
67
+ return null;
68
+ }
69
+ const ms = humanInterval(input);
70
+ return isNaN(ms) ? null : dayjs.duration(ms, 'ms');
71
+ }
72
+ async reset() {
73
+ super.reset();
74
+ this.error = false;
75
+ this.errorText = '';
76
+ this.duration = null;
77
+ }
78
+ };
79
+ __decorate([
80
+ property({ type: Object })
81
+ ], TitaniumDurationInput.prototype, "duration", void 0);
82
+ TitaniumDurationInput = __decorate([
83
+ customElement('titanium-duration-input')
84
+ ], TitaniumDurationInput);
85
+ export { TitaniumDurationInput };
86
+ //# sourceMappingURL=duration-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration-input.js","sourceRoot":"","sources":["duration-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,KAAK,MAAM,WAAW,CAAC;AAC9B,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kEAAkE,CAAC;AAC/G,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEvB;;;;;;;GAOG;AAGI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,2BAA2B;IAA/D;;QACL;;;;WAIG;QACyB,aAAQ,GAA6B,IAAI,CAAC;IA4DxE,CAAC;IA1DC,YAAY;QACV,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,gDAAgD,CAAC;IACzE,CAAC;IAED,OAAO,CAAC,YAAkC;QACxC,IAAI,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YAC7B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAE7C,MAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACnD,IAAI,GAAG,EAAE,cAAc,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE;gBAC5D,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;gBACpB,IAAI,CAAC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AC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF,CAAA;AA5D6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAA2C;AAN3D,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAkEjC"}
@@ -0,0 +1,19 @@
1
+ import duration from 'dayjs/esm/plugin/duration';
2
+ declare const humanInterval: {
3
+ (time: any): any;
4
+ languageMap: {
5
+ one: number;
6
+ two: number;
7
+ three: number;
8
+ four: number;
9
+ five: number;
10
+ six: number;
11
+ seven: number;
12
+ eight: number;
13
+ nine: number;
14
+ ten: number;
15
+ };
16
+ };
17
+ export declare function durationToString(d: duration.Duration | null | undefined): string;
18
+ export default humanInterval;
19
+ //# sourceMappingURL=human-interval.d.ts.map
@@ -0,0 +1,74 @@
1
+ // https://github.com/agenda/human-interval
2
+ // Does not support esm
3
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
+ const units = {};
5
+ units.second = 1000;
6
+ units.minute = units.second * 60;
7
+ units.hour = units.minute * 60;
8
+ units.day = units.hour * 24;
9
+ units.week = units.day * 7;
10
+ units.month = units.day * 30;
11
+ units.year = units.day * 365;
12
+ const languageMap = {
13
+ one: 1,
14
+ two: 2,
15
+ three: 3,
16
+ four: 4,
17
+ five: 5,
18
+ six: 6,
19
+ seven: 7,
20
+ eight: 8,
21
+ nine: 9,
22
+ ten: 10,
23
+ };
24
+ const swapLanguageToDecimals = time => {
25
+ const language = languageMap;
26
+ const languageMapRegex = new RegExp('(' + Object.keys(language).join('|') + ')', 'g');
27
+ const matches = time.match(languageMapRegex);
28
+ if (!matches) {
29
+ return time;
30
+ }
31
+ matches.forEach(match => {
32
+ const matchStr = language[match] > 1 ? language[match] : language[match].toString().slice(1);
33
+ time = time.replace(match, matchStr);
34
+ });
35
+ return time;
36
+ };
37
+ const processUnits = time => {
38
+ if (time.match(/(second|minute|hour|day|week|month|year)s?/) === null) {
39
+ return undefined;
40
+ }
41
+ const num = parseFloat(time) || 1;
42
+ const unit = time.match(/(second|minute|hour|day|week|month|year)s?/)[1];
43
+ return units[unit] * num;
44
+ };
45
+ const humanInterval = time => {
46
+ if (!time) {
47
+ return time;
48
+ }
49
+ if (typeof time === 'number') {
50
+ return time;
51
+ }
52
+ time = swapLanguageToDecimals(time);
53
+ time = time.replace(/(second|minute|hour|day|week|month|year)s?(?! ?(s )?and |s?$)/, '$1,');
54
+ return time.split(/and|,/).reduce((sum, group) => sum + (group ? processUnits(group) : 0), 0);
55
+ };
56
+ humanInterval.languageMap = languageMap;
57
+ export function durationToString(d) {
58
+ if (d === null || d === undefined) {
59
+ return '';
60
+ }
61
+ return Object.entries({
62
+ years: d.years(),
63
+ months: d.months(),
64
+ days: d.days(),
65
+ hours: d.hours(),
66
+ minutes: d.minutes(),
67
+ seconds: d.seconds(),
68
+ })
69
+ .filter(value => value[1] !== 0)
70
+ .map(value => `${value[1]} ${value[1] === 1 ? value[0].slice(0, -1) : value[0]}`)
71
+ .join(' and ');
72
+ }
73
+ export default humanInterval;
74
+ //# sourceMappingURL=human-interval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-interval.js","sourceRoot":"","sources":["human-interval.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,uBAAuB;AAIvB,8DAA8D;AAC9D,MAAM,KAAK,GAAQ,EAAE,CAAC;AACtB,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;AACpB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;AACjC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;AAC/B,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;AAC5B,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AAC3B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GA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AAC,CAAC,OAAO,EAAE;KACrB,CAAC;SACC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAC/B,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;SAChF,IAAI,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * A pre-styled error page
4
+ *
5
+ * @element titanium-error-page
6
+ *
7
+ */
8
+ export declare class TitaniumErrorPage extends LitElement {
9
+ /**
10
+ * Reason text for the error
11
+ */
12
+ message: string;
13
+ static styles: import("lit").CSSResult;
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ }
16
+ //# sourceMappingURL=error-page.d.ts.map
@@ -0,0 +1,96 @@
1
+ import { __decorate } from "tslib";
2
+ import { css, html, LitElement } from 'lit';
3
+ import { property, customElement } from 'lit/decorators.js';
4
+ /**
5
+ * A pre-styled error page
6
+ *
7
+ * @element titanium-error-page
8
+ *
9
+ */
10
+ let TitaniumErrorPage = class TitaniumErrorPage extends LitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ /**
14
+ * Reason text for the error
15
+ */
16
+ this.message = 'We were unable to find the page you are looking for...';
17
+ }
18
+ static { this.styles = css `
19
+ :host {
20
+ display: flex;
21
+ flex-direction: row;
22
+ align-items: center;
23
+ justify-content: center;
24
+
25
+ font-family: Roboto, sans-serif;
26
+ -moz-osx-font-smoothing: grayscale;
27
+ -webkit-font-smoothing: antialiased;
28
+
29
+ max-width: 1300px;
30
+ }
31
+
32
+ header {
33
+ flex: 1 1 auto;
34
+ margin-right: 24px;
35
+ }
36
+
37
+ h1 {
38
+ font-family: Metropolis, 'Roboto', 'Noto', sans-serif;
39
+ font-weight: 600;
40
+ font-size: 75px;
41
+ line-height: 85px;
42
+ margin: 0;
43
+ }
44
+
45
+ h2 {
46
+ font-weight: 400;
47
+ margin: 8px 0 0 4px;
48
+ max-width: 75%;
49
+ }
50
+
51
+ img {
52
+ flex-shrink: 0;
53
+ height: 280px;
54
+ width: 280px;
55
+ }
56
+
57
+ @media (max-width: 768px) {
58
+ :host {
59
+ margin-top: 24px;
60
+ }
61
+
62
+ h2 {
63
+ max-width: inherit;
64
+ font-size: 21px;
65
+ }
66
+
67
+ img {
68
+ height: 120px;
69
+ width: 120px;
70
+ align-self: flex-start;
71
+ }
72
+
73
+ h1 {
74
+ font-size: 55px;
75
+ line-height: 65px;
76
+ }
77
+ }
78
+ `; }
79
+ render() {
80
+ return html `
81
+ <header>
82
+ <h1>Oops!</h1>
83
+ <h2>${this.message}</h2>
84
+ </header>
85
+ <img src="https://www.leavitt.com/images/alert.svg" />
86
+ `;
87
+ }
88
+ };
89
+ __decorate([
90
+ property({ type: String })
91
+ ], TitaniumErrorPage.prototype, "message", void 0);
92
+ TitaniumErrorPage = __decorate([
93
+ customElement('titanium-error-page')
94
+ ], TitaniumErrorPage);
95
+ export { TitaniumErrorPage };
96
+ //# sourceMappingURL=error-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-page.js","sourceRoot":"","sources":["error-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;GAKG;AAGI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAA1C;;QACL;;WAEG;QACyB,YAAO,GAAW,wDAAwD,CAAC;IAyEzG,CAAC;aAvEQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DlB,AA5DY,CA4DX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;;cAGD,IAAI,CAAC,OAAO;;;KAGrB,CAAC;IACJ,CAAC;;AAxE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAA4E;AAJ5F,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA6E7B"}
@@ -0,0 +1,10 @@
1
+ export type CrudEventTypes = 'Add' | 'Update' | 'Remove';
2
+ export type EventCallback<TArg> = (arg: TArg) => void;
3
+ export declare class EventBus<TEntityTypes, TEventTypes> {
4
+ #private;
5
+ subscribe<TArg>(entityType: TEntityTypes | TEntityTypes[], eventTypes: TEventTypes | TEventTypes[], callback: EventCallback<TArg>): void;
6
+ subscribeAll(entityType: TEntityTypes | TEntityTypes[], callback: () => void): void;
7
+ unsubscribe(entityType: TEntityTypes | TEntityTypes[], eventTypes: TEventTypes | TEventTypes[], callback: EventCallback<TEntityTypes>): void;
8
+ dispatch<TArg>(entityType: TEntityTypes, eventTypes: TEventTypes, object?: TArg): void;
9
+ }
10
+ //# sourceMappingURL=event-bus.d.ts.map
@@ -0,0 +1,52 @@
1
+ export class EventBus {
2
+ #subscribers = [];
3
+ subscribe(entityType, eventTypes, callback) {
4
+ if (Array.isArray(entityType)) {
5
+ entityType.forEach(o => this.subscribe(o, eventTypes, callback));
6
+ }
7
+ else {
8
+ if (Array.isArray(eventTypes)) {
9
+ eventTypes.forEach(o => this.subscribe(entityType, o, callback));
10
+ }
11
+ else {
12
+ this.#addSubscription(entityType, eventTypes, callback);
13
+ }
14
+ }
15
+ }
16
+ subscribeAll(entityType, callback) {
17
+ if (Array.isArray(entityType)) {
18
+ entityType.forEach(o => this.#addSubscription(o, 'All', callback));
19
+ }
20
+ else {
21
+ this.#addSubscription(entityType, 'All', callback);
22
+ }
23
+ }
24
+ #addSubscription(entityType, eventTypes, callback) {
25
+ const subscription = {
26
+ entityType: entityType,
27
+ eventTypes,
28
+ callback,
29
+ };
30
+ this.#subscribers.push(subscription);
31
+ }
32
+ unsubscribe(entityType, eventTypes, callback) {
33
+ if (Array.isArray(entityType)) {
34
+ entityType.forEach(o => this.unsubscribe(o, eventTypes, callback));
35
+ }
36
+ else {
37
+ if (Array.isArray(eventTypes)) {
38
+ eventTypes.forEach(o => this.unsubscribe(entityType, o, callback));
39
+ }
40
+ else {
41
+ this.#removeSubscription(entityType, eventTypes, callback);
42
+ }
43
+ }
44
+ }
45
+ #removeSubscription(entityType, eventTypes, callback) {
46
+ this.#subscribers = this.#subscribers.filter(s => s.callback !== callback || s.entityType !== entityType || s.eventTypes !== eventTypes);
47
+ }
48
+ dispatch(entityType, eventTypes, object) {
49
+ this.#subscribers.filter(s => s.entityType === entityType && (s.eventTypes === 'All' || s.eventTypes === eventTypes)).forEach(s => s.callback(object));
50
+ }
51
+ }
52
+ //# sourceMappingURL=event-bus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-bus.js","sourceRoot":"","sources":["event-bus.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,QAAQ;IACnB,YAAY,GAAmD,EAAE,CAAC;IAElE,SAAS,CAAO,UAAyC,EAAE,UAAuC,EAAE,QAA6B;QAC/H,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;SAClE;aAAM;YACL,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;gBAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ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