@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,170 @@
1
+ import { __decorate } from "tslib";
2
+ import { css, html, LitElement } from 'lit';
3
+ import { property, customElement } from 'lit/decorators.js';
4
+ import { PendingStateEvent } from '../types/pending-state-event';
5
+ import '@material/web/progress/linear-progress';
6
+ /**
7
+ * A simple full-screen veil with loading indicator that uses promise driven pending-state-events
8
+ *
9
+ * @element titanium-full-page-loading-indicator
10
+ *
11
+ *
12
+ */
13
+ let TitaniumFullPageLoadingIndicator = class TitaniumFullPageLoadingIndicator extends LitElement {
14
+ #opened_accessor_storage;
15
+ get opened() { return this.#opened_accessor_storage; }
16
+ set opened(value) { this.#opened_accessor_storage = value; }
17
+ #opening_accessor_storage;
18
+ get opening() { return this.#opening_accessor_storage; }
19
+ set opening(value) { this.#opening_accessor_storage = value; }
20
+ #closing_accessor_storage;
21
+ get closing() { return this.#closing_accessor_storage; }
22
+ set closing(value) { this.#closing_accessor_storage = value; }
23
+ #animationTimer;
24
+ #animationFrame;
25
+ #openDelayTimer;
26
+ #closeDelayTimer;
27
+ //Promises faster than this do not cause the scrim to open at all
28
+ //Prevents flicker for fast promises
29
+ #openDelay = 75;
30
+ // min time scrim has to remain open
31
+ #minTimeOpen = 350;
32
+ #timeOpen;
33
+ #openCount = 0;
34
+ firstUpdated() {
35
+ window.addEventListener(PendingStateEvent.eventType, async (e) => {
36
+ this.#open();
37
+ this.#openCount++;
38
+ try {
39
+ await e.detail.promise;
40
+ }
41
+ catch {
42
+ }
43
+ finally {
44
+ this.#openCount--;
45
+ if (this.#openCount === 0) {
46
+ this.#close();
47
+ }
48
+ }
49
+ });
50
+ }
51
+ #open() {
52
+ window.clearTimeout(this.#openDelayTimer);
53
+ //If re-opened while close timer is running, prevent the close
54
+ window.clearTimeout(this.#closeDelayTimer);
55
+ this.#openDelayTimer = window.setTimeout(() => {
56
+ this.#timeOpen = performance.now();
57
+ this.closing = false;
58
+ this.opened = false;
59
+ this.opening = true;
60
+ document.body.style.overflow = 'hidden';
61
+ this.#runNextAnimationFrame_(() => {
62
+ if (this.closing) {
63
+ return;
64
+ }
65
+ this.opened = true;
66
+ this.#animationTimer = window.setTimeout(() => {
67
+ this.#handleAnimationTimerEnd_();
68
+ }, 50);
69
+ });
70
+ }, this.#openDelay);
71
+ }
72
+ #close() {
73
+ window.clearTimeout(this.#openDelayTimer);
74
+ const totalTimeOpened = performance.now() - this.#timeOpen;
75
+ const closeDelay = Math.max(this.#minTimeOpen - totalTimeOpened, 0);
76
+ this.#closeDelayTimer = window.setTimeout(() => {
77
+ cancelAnimationFrame(this.#animationFrame);
78
+ this.#animationFrame = 0;
79
+ this.closing = true;
80
+ this.opened = false;
81
+ this.opening = false;
82
+ clearTimeout(this.#animationTimer);
83
+ this.#animationTimer = window.setTimeout(() => {
84
+ this.#handleAnimationTimerEnd_();
85
+ document.body.style.overflow = '';
86
+ }, 150);
87
+ }, closeDelay);
88
+ }
89
+ #handleAnimationTimerEnd_() {
90
+ this.opening = false;
91
+ this.closing = false;
92
+ }
93
+ /**
94
+ * Runs the given logic on the next animation frame, using setTimeout to factor in Firefox reflow behavior.
95
+ */
96
+ #runNextAnimationFrame_(callback) {
97
+ cancelAnimationFrame(this.#animationFrame);
98
+ this.#animationFrame = requestAnimationFrame(() => {
99
+ this.#animationFrame = 0;
100
+ clearTimeout(this.#animationFrame);
101
+ this.#animationFrame = window.setTimeout(callback, 0);
102
+ });
103
+ }
104
+ static { this.styles = css `
105
+ :host {
106
+ display: none;
107
+ position: relative;
108
+ position: fixed;
109
+ z-index: 19;
110
+ top: 0;
111
+ left: 0;
112
+ width: 100%;
113
+ height: 100%;
114
+ opacity: 0;
115
+ background: var(--md-sys-color-scrim, #000);
116
+ -webkit-transition: opacity 75ms linear;
117
+ -o-transition: opacity 75ms linear;
118
+ transition: opacity 75ms linear;
119
+ }
120
+
121
+ :host([opening]),
122
+ :host([closing]),
123
+ :host([opened]) {
124
+ display: block;
125
+ z-index: 7;
126
+ }
127
+
128
+ :host([opening]) {
129
+ -webkit-transition: opacity 50ms linear;
130
+ -o-transition: opacity 50ms linear;
131
+ transition: opacity 50ms linear;
132
+ }
133
+
134
+ :host([closing]) {
135
+ -webkit-transition: opacity 150ms linear;
136
+ -o-transition: opacity 150ms linear;
137
+ transition: opacity 150ms linear;
138
+ }
139
+
140
+ :host([opened]) {
141
+ opacity: 0.32;
142
+ backdrop-filter: blur(6px);
143
+ }
144
+
145
+ md-linear-progress {
146
+ position: absolute;
147
+ width: 100%;
148
+ top: 0;
149
+ right: 0;
150
+ left: 0;
151
+ }
152
+ `; }
153
+ render() {
154
+ return html ` <md-linear-progress ?indeterminate=${this.opened} ?hide=${!this.opening && !this.closing && !this.opened}></md-linear-progress> `;
155
+ }
156
+ };
157
+ __decorate([
158
+ property({ type: Boolean, reflect: true })
159
+ ], TitaniumFullPageLoadingIndicator.prototype, "opened", null);
160
+ __decorate([
161
+ property({ type: Boolean, reflect: true })
162
+ ], TitaniumFullPageLoadingIndicator.prototype, "opening", null);
163
+ __decorate([
164
+ property({ type: Boolean, reflect: true })
165
+ ], TitaniumFullPageLoadingIndicator.prototype, "closing", null);
166
+ TitaniumFullPageLoadingIndicator = __decorate([
167
+ customElement('titanium-full-page-loading-indicator')
168
+ ], TitaniumFullPageLoadingIndicator);
169
+ export { TitaniumFullPageLoadingIndicator };
170
+ //# sourceMappingURL=full-page-loading-indicator.js.map
@@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CAAC;;AArJ8D;IAA9D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8DAAoC;AAChB;IAA9D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+DAAqC;AACjB;IAA9D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+DAAqC;AAHrE,gCAAgC;IAD5C,aAAa,CAAC,sCAAsC,CAAC;GACzC,gCAAgC,CAuJ5C"}
@@ -0,0 +1,4 @@
1
+ import { MdDialog } from '@material/web/dialog/dialog';
2
+ export declare function preventDialogOverflow(dialog: MdDialog): void;
3
+ export declare function allowDialogOverflow(dialog: MdDialog): void;
4
+ //# sourceMappingURL=dialog-overflow-hacks.d.ts.map
@@ -0,0 +1,21 @@
1
+ export function preventDialogOverflow(dialog) {
2
+ const container = dialog?.shadowRoot?.querySelector('.container');
3
+ const scroller = container?.querySelector('.scroller');
4
+ if (scroller) {
5
+ scroller.style.overflow = 'initial';
6
+ }
7
+ if (container) {
8
+ container.style.overflow = 'initial';
9
+ }
10
+ }
11
+ export function allowDialogOverflow(dialog) {
12
+ const container = dialog?.shadowRoot?.querySelector('.container');
13
+ const scroller = container?.querySelector('.scroller');
14
+ if (scroller) {
15
+ scroller.style.overflow = '';
16
+ }
17
+ if (container) {
18
+ container.style.overflow = '';
19
+ }
20
+ }
21
+ //# sourceMappingURL=dialog-overflow-hacks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog-overflow-hacks.js","sourceRoot":"","sources":["dialog-overflow-hacks.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,MAAgB;IACpD,MAAM,SAAS,GAAG,MAAM,EAAE,UAAU,EAAE,aAAa,CAAc,YAAY,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,SAAS,EAAE,aAAa,CAAc,WAAW,CAAC,CAAC;IACpE,IAAI,QAAQ,EAAE;QACZ,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;KACrC;IACD,IAAI,SAAS,EAAE;QACb,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;KACtC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAgB;IAClD,MAAM,SAAS,GAAG,MAAM,EAAE,UAAU,EAAE,aAAa,CAAc,YAAY,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,SAAS,EAAE,aAAa,CAAc,WAAW,CAAC,CAAC;IACpE,IAAI,QAAQ,EAAE;QACZ,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;KAC9B;IACD,IAAI,SAAS,EAAE;QACb,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;KAC/B;AACH,CAAC"}
@@ -0,0 +1,39 @@
1
+ import '@material/web/icon/icon';
2
+ import '@material/web/iconbutton/icon-button';
3
+ import { LitElement } from 'lit';
4
+ /**
5
+ * A pre-styled page header with sub header and optional back button.
6
+ *
7
+ * @element titanium-header
8
+ *
9
+ * @fires titanium-header-back-click - Fired when the back button is clicked
10
+ *
11
+ * @cssprop {Color} [--md-sys-color-on-background] - Header text color
12
+ * @cssprop {Color} [--md-sys-color-on-surface-variant] - Sub-header text color
13
+ */
14
+ export declare class TitaniumHeader extends LitElement {
15
+ #private;
16
+ /**
17
+ * Header text
18
+ */
19
+ header: string;
20
+ /**
21
+ * Sub-header text
22
+ */
23
+ subHeader: string;
24
+ /**
25
+ * Leading header icon
26
+ */
27
+ icon: string;
28
+ /**
29
+ * Removes the back button
30
+ */
31
+ noNav: boolean;
32
+ /**
33
+ * Lets user override back button behavior
34
+ */
35
+ disableDefaultBackButtonBehavior: boolean;
36
+ static styles: import("lit").CSSResult[];
37
+ render(): import("lit-html").TemplateResult<1>;
38
+ }
39
+ //# sourceMappingURL=header.d.ts.map
@@ -0,0 +1,148 @@
1
+ import { __decorate } from "tslib";
2
+ import '@material/web/icon/icon';
3
+ import '@material/web/iconbutton/icon-button';
4
+ import { h1, h3 } from '../../titanium/styles/styles';
5
+ import { css, html, LitElement, nothing } from 'lit';
6
+ import { property, customElement } from 'lit/decorators.js';
7
+ /**
8
+ * A pre-styled page header with sub header and optional back button.
9
+ *
10
+ * @element titanium-header
11
+ *
12
+ * @fires titanium-header-back-click - Fired when the back button is clicked
13
+ *
14
+ * @cssprop {Color} [--md-sys-color-on-background] - Header text color
15
+ * @cssprop {Color} [--md-sys-color-on-surface-variant] - Sub-header text color
16
+ */
17
+ let TitaniumHeader = class TitaniumHeader extends LitElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ /**
21
+ * Removes the back button
22
+ */
23
+ this.noNav = false;
24
+ /**
25
+ * Lets user override back button behavior
26
+ */
27
+ this.disableDefaultBackButtonBehavior = false;
28
+ }
29
+ #handleBackClick() {
30
+ if (this.disableDefaultBackButtonBehavior) {
31
+ this.dispatchEvent(new CustomEvent('titanium-header-back-click', { composed: true }));
32
+ }
33
+ else {
34
+ window.history.back();
35
+ }
36
+ }
37
+ static { this.styles = [
38
+ h1,
39
+ h3,
40
+ css `
41
+ :host {
42
+ display: flex;
43
+ flex-direction: column;
44
+ -webkit-font-smoothing: antialiased;
45
+ padding: 0 52px 8px 52px;
46
+ position: relative;
47
+ }
48
+
49
+ :host([no-nav]) md-icon-button {
50
+ display: none;
51
+ }
52
+
53
+ :host([no-nav]) {
54
+ padding: 0 0 8px 0;
55
+ }
56
+
57
+ header {
58
+ display: block;
59
+ text-align: center;
60
+ padding: 0 0 8px 0;
61
+ }
62
+
63
+ h1 {
64
+ display: inline;
65
+ font-size: 40px;
66
+ line-height: 42px;
67
+ font-weight: 200;
68
+
69
+ margin: 0;
70
+ color: var(--md-sys-color-on-background);
71
+ }
72
+
73
+ h3 {
74
+ color: var(--md-sys-color-on-surface-variant);
75
+ font-family: Metropolis, Roboto, Noto, sans-serif;
76
+ font-weight: 300;
77
+ font-size: 16px;
78
+ line-height: 20px;
79
+ text-align: center;
80
+ }
81
+
82
+ md-icon[header-icon] {
83
+ display: inline;
84
+ vertical-align: text-bottom;
85
+ font-size: 40px;
86
+ color: var(--md-sys-color-on-background);
87
+ margin-right: 8px;
88
+ }
89
+
90
+ md-icon-button {
91
+ position: absolute;
92
+ top: 0;
93
+ left: 0;
94
+ }
95
+
96
+ @media (max-width: 920px) {
97
+ h1 {
98
+ font-size: 30px;
99
+ line-height: 32px;
100
+ }
101
+
102
+ h3 {
103
+ font-size: 14px;
104
+ line-height: 16px;
105
+ }
106
+
107
+ md-icon[header-icon] {
108
+ font-size: 30px;
109
+ }
110
+ }
111
+
112
+ :host([hidden]) {
113
+ display: none;
114
+ }
115
+ `,
116
+ ]; }
117
+ render() {
118
+ return html `
119
+ <header part="header">
120
+ ${this.icon ? html `<md-icon header-icon part="icon">${this.icon}</md-icon>` : nothing}
121
+ <h1 part="h1">${this.header}</h1>
122
+ <md-icon-button part="button" @click="${this.#handleBackClick}" large> <md-icon>arrow_back</md-icon></md-icon-button>
123
+ </header>
124
+
125
+ <h3 part="h3">${this.subHeader}</h3>
126
+ `;
127
+ }
128
+ };
129
+ __decorate([
130
+ property({ type: String })
131
+ ], TitaniumHeader.prototype, "header", void 0);
132
+ __decorate([
133
+ property({ type: String })
134
+ ], TitaniumHeader.prototype, "subHeader", void 0);
135
+ __decorate([
136
+ property({ type: String })
137
+ ], TitaniumHeader.prototype, "icon", void 0);
138
+ __decorate([
139
+ property({ type: Boolean, reflect: true, attribute: 'no-nav' })
140
+ ], TitaniumHeader.prototype, "noNav", void 0);
141
+ __decorate([
142
+ property({ type: Boolean, reflect: true, attribute: 'disable-default-back-button-behavior' })
143
+ ], TitaniumHeader.prototype, "disableDefaultBackButtonBehavior", void 0);
144
+ TitaniumHeader = __decorate([
145
+ customElement('titanium-header')
146
+ ], TitaniumHeader);
147
+ export { TitaniumHeader };
148
+ //# sourceMappingURL=header.js.map
@@ -0,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,MAAM,EAAE,CAAC;8CAAgB;AAKf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAmB;AAKlB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc;AAKwB;IAAhE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;6CAAwB;AAKO;IAA9F,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,sCAAsC,EAAE,CAAC;wEAAmD;AAxBtI,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CA8H1B"}
@@ -0,0 +1,3 @@
1
+ export declare const startCsvDownload: (fileName: string, csv: string, context?: HTMLElement) => void;
2
+ export declare const convertArrayToCsv: (json: Array<any>, flatten?: boolean) => string;
3
+ //# sourceMappingURL=csv-download.d.ts.map
@@ -0,0 +1,78 @@
1
+ export const startCsvDownload = (fileName, csv, context = document.body) => {
2
+ const link = document.createElement('a');
3
+ link.setAttribute('download', fileName);
4
+ link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csv));
5
+ link.style.visibility = 'hidden';
6
+ const clickEvent = document.createEvent('MouseEvent');
7
+ clickEvent.initEvent('click', true, true);
8
+ context.appendChild(link);
9
+ link.dispatchEvent(clickEvent);
10
+ context.removeChild(link);
11
+ };
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ const flattenObject = (data) => {
14
+ // also strips odata annotation properties
15
+ const result = {};
16
+ const recurse = (cur, prop) => {
17
+ if (Object(cur) !== cur) {
18
+ if (prop.indexOf('@odata') === -1) {
19
+ result[prop] = cur;
20
+ }
21
+ }
22
+ else if (Array.isArray(cur)) {
23
+ const l = 0;
24
+ for (let i = 0, l = cur.length; i < l; i++) {
25
+ recurse(cur[i], prop ? prop + '.' + i : '' + i);
26
+ }
27
+ if (l === 0) {
28
+ result[prop] = [];
29
+ }
30
+ }
31
+ else {
32
+ let isEmpty = true;
33
+ for (const p in cur) {
34
+ isEmpty = false;
35
+ recurse(cur[p], prop ? prop + '.' + p : p);
36
+ }
37
+ if (isEmpty) {
38
+ result[prop] = {};
39
+ }
40
+ }
41
+ };
42
+ recurse(data, '');
43
+ return result;
44
+ };
45
+ //TODO: Rewrite in a safer way...check types, etc...
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ export const convertArrayToCsv = (json, flatten = false) => {
48
+ if (!json[0]) {
49
+ return 'Empty List';
50
+ }
51
+ if (flatten) {
52
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
+ json = json.map((o) => flattenObject(o));
54
+ }
55
+ const fields = Object.keys(json[0]);
56
+ const replacer = function (_key, value) {
57
+ return value === null ? '' : value;
58
+ };
59
+ const csv = json.map(function (row) {
60
+ return fields
61
+ .map(function (fieldName) {
62
+ let data = row[fieldName];
63
+ if (data == null) {
64
+ data = '';
65
+ }
66
+ if (typeof data === 'object') {
67
+ data = 'object';
68
+ }
69
+ // JSON.stringify replaces double quotes with \" , but in a csv,
70
+ // double quotes are escaped by using two double quotes
71
+ return JSON.stringify(data, replacer).replace(/\\"/g, '""');
72
+ })
73
+ .join(',');
74
+ });
75
+ csv.unshift(fields.join(',')); // add header column
76
+ return csv.join('\r\n');
77
+ };
78
+ //# sourceMappingURL=csv-download.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv-download.js","sourceRoot":"","sources":["csv-download.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAE,GAAW,EAAE,UAAuB,QAAQ,CAAC,IAAI,EAAE,EAAE;IACtG,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACxC,IA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AC,CAAC;YAC1B,IAAI,IAAI,IAAI,IAAI,EAAE;gBAChB,IAAI,GAAG,EAAE,CAAC;aACX;YACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC5B,IAAI,GAAG,QAAQ,CAAC;aACjB;YACD,iEAAiE;YACjE,uDAAuD;YACvD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB;IACnD,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare class Debouncer<T, A> {
2
+ #private;
3
+ constructor(promise: (...args: A[]) => Promise<T>, interval?: number);
4
+ /**
5
+ * Returns the same pending promise each time called until interval expires.
6
+ *
7
+ * When the interval expires, the work promise is executed with the args from the latest call
8
+ * to debounce. Then all pending promises are resolved with the value from the work promise.
9
+ *
10
+ */
11
+ debounce(...args: A[]): Promise<T>;
12
+ }
13
+ //# sourceMappingURL=debouncer.d.ts.map
@@ -0,0 +1,33 @@
1
+ export class Debouncer {
2
+ #debouncePromise;
3
+ #debounceResolve;
4
+ #timer = 0;
5
+ #work;
6
+ #interval;
7
+ constructor(promise, interval = 300) {
8
+ this.#work = promise;
9
+ this.#interval = interval;
10
+ }
11
+ /**
12
+ * Returns the same pending promise each time called until interval expires.
13
+ *
14
+ * When the interval expires, the work promise is executed with the args from the latest call
15
+ * to debounce. Then all pending promises are resolved with the value from the work promise.
16
+ *
17
+ */
18
+ debounce(...args) {
19
+ clearTimeout(this.#timer);
20
+ this.#timer = window.setTimeout(async () => {
21
+ const workResult = await this.#work(...args);
22
+ this.#debounceResolve(workResult);
23
+ this.#debouncePromise = undefined;
24
+ }, this.#interval);
25
+ if (!this.#debouncePromise) {
26
+ this.#debouncePromise = new Promise(async (res) => {
27
+ this.#debounceResolve = res;
28
+ });
29
+ }
30
+ return this.#debouncePromise;
31
+ }
32
+ }
33
+ //# sourceMappingURL=debouncer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debouncer.js","sourceRoot":"","sources":["debouncer.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IACpB,gBAAgB,CAAyB;IACzC,gBAAgB,CAAsE;IACtF,MAAM,GAAW,CAAC,CAAC;IACnB,KAAK,CAA+B;IACpC,SAAS,CAAS;IAElB,YAAY,OAAqC,EAAE,WAAmB,GAAG;QACvE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,IAAS;QACnB,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE;YACzC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAC7C,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YAClC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACpC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAEnB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,OAAO,CAAI,KAAK,EAAC,GAAG,EAAC,EAAE;gBACjD,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC;YAC9B,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export declare function delay(delay: number): Promise<unknown>;
2
+ //# sourceMappingURL=delay.d.ts.map
@@ -0,0 +1,6 @@
1
+ export function delay(delay) {
2
+ return new Promise(function (resolve) {
3
+ setTimeout(resolve, delay);
4
+ });
5
+ }
6
+ //# sourceMappingURL=delay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.js","sourceRoot":"","sources":["delay.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO;QAClC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const determineIsDevelopment: (url: string) => boolean;
2
+ export declare const isDevelopment: boolean;
3
+ //# sourceMappingURL=dev-detection.d.ts.map
@@ -0,0 +1,12 @@
1
+ export const determineIsDevelopment = (url) => {
2
+ const allowedUrlRegularExpressions = [
3
+ new RegExp('^https://10[\\.]'),
4
+ new RegExp('^http://10[\\.]'),
5
+ new RegExp('^http://192.168[\\.]'),
6
+ new RegExp('^http://localhost[:]0*(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'),
7
+ new RegExp('^https://localhost[:]0*(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'),
8
+ ];
9
+ return !url || url.indexOf('dev') > -1 || allowedUrlRegularExpressions.some(o => o.exec(url) !== null);
10
+ };
11
+ export const isDevelopment = determineIsDevelopment(window.location.origin);
12
+ //# sourceMappingURL=dev-detection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-detection.js","sourceRoot":"","sources":["dev-detection.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAW,EAAW,EAAE;IAC7D,MAAM,4BAA4B,GAAG;QACnC,IAAI,MAAM,CAAC,kBAAkB,CAAC;QAC9B,IAAI,MAAM,CAAC,iBAAiB,CAAC;QAC7B,IAAI,MAAM,CAAC,sBAAsB,CAAC;QAClC,IAAI,MAAM,CAAC,sHAAsH,CAAC;QAClI,IAAI,MAAM,CAAC,uHAAuH,CAAC;KACpI,CAAC;IAEF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;AACzG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export { startCsvDownload, convertArrayToCsv } from './csv-download';
2
+ export { determineIsDevelopment, isDevelopment } from './dev-detection';
3
+ export { escapeTerm } from './odata-helpers';
4
+ export { installMediaQueryWatcher } from './media-query';
5
+ export { getSearchTokens } from './search-token';
6
+ export { Debouncer } from './debouncer';
7
+ export { LoadWhile } from './load-while';
8
+ export { join } from './join';
9
+ export { delay } from './delay';
10
+ export { middleEllipsis } from './middle-ellipsis';
11
+ export { notNullOrUndefined } from './not-null-or-undefined';
12
+ export { notNull } from './not-null';
13
+ export { notUndefined } from './not-undefined';
14
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1,14 @@
1
+ export { startCsvDownload, convertArrayToCsv } from './csv-download';
2
+ export { determineIsDevelopment, isDevelopment } from './dev-detection';
3
+ export { escapeTerm } from './odata-helpers';
4
+ export { installMediaQueryWatcher } from './media-query';
5
+ export { getSearchTokens } from './search-token';
6
+ export { Debouncer } from './debouncer';
7
+ export { LoadWhile } from './load-while';
8
+ export { join } from './join';
9
+ export { delay } from './delay';
10
+ export { middleEllipsis } from './middle-ellipsis';
11
+ export { notNullOrUndefined } from './not-null-or-undefined';
12
+ export { notNull } from './not-null';
13
+ export { notUndefined } from './not-undefined';
14
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function join(values: any, joiner: any): any;
2
+ //# sourceMappingURL=join.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { nothing } from 'lit';
2
+ export function join(values, joiner) {
3
+ return values.map((v, i) => [v, i < values.length - 1 ? joiner : nothing]);
4
+ }
5
+ //# sourceMappingURL=join.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"join.js","sourceRoot":"","sources":["join.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAE9B,MAAM,UAAU,IAAI,CAAC,MAAM,EAAE,MAAM;IACjC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IDatabaseAttachment } from '@leavittsoftware/lg-core-typescript/lg.net.system';
2
+ export declare function getCdnInlineUrl(attachment: Partial<IDatabaseAttachment> | null | undefined, size?: number): string | undefined;
3
+ export declare function isImage(attachment: Partial<IDatabaseAttachment>): boolean;
4
+ export declare function getCdnDownloadUrl(attachment: Partial<IDatabaseAttachment> | null | undefined, size?: number): string | undefined;
5
+ //# sourceMappingURL=leavitt-cdn.d.ts.map