@flarehr/apollo-benefits 0.1.106 → 0.3.53396

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 (219) hide show
  1. package/README.md +19 -0
  2. package/dist/assets/@splitsoftware-7d799540.js +18 -0
  3. package/dist/assets/all_tab_color-548783b9.svg +21 -0
  4. package/dist/assets/all_tab_gray-a5051313.svg +6 -0
  5. package/dist/assets/check-57fe1dcb.svg +15 -0
  6. package/dist/assets/datadog-c7ede347.js +5 -0
  7. package/dist/assets/date-fns-c5d8fbc0.js +1 -0
  8. package/dist/assets/default_backdrop-fdd955b8.png +0 -0
  9. package/dist/assets/external_link-599a0aec.svg +3 -0
  10. package/dist/assets/external_link_white-55111b2e.svg +3 -0
  11. package/dist/assets/framer-motion-bb8d6b82.js +1 -0
  12. package/dist/assets/index-87923fdc.js +35 -0
  13. package/dist/assets/index-cfa25e28.css +1 -0
  14. package/dist/assets/index-ee9d2045.js +5 -0
  15. package/dist/assets/lodash-5d893f8c.js +1 -0
  16. package/dist/assets/logo-a34e9b4b.png +0 -0
  17. package/dist/assets/oidc-client-6f6e47c2.js +101 -0
  18. package/dist/assets/padlock-8c081120.svg +26 -0
  19. package/dist/assets/suitcase-6471ad05.svg +17 -0
  20. package/dist/assets/vendor-2d0139ca.js +788 -0
  21. package/dist/assets/warning-a7f1af23.svg +14 -0
  22. package/dist/assets/welcome_image_mobile-dbde6c80.png +0 -0
  23. package/dist/assets/welcome_image_v2-869c59e4.png +0 -0
  24. package/dist/assets/wellbeing_banner-6903d615.png +0 -0
  25. package/dist/assets/workplace_link_banner_mobile-6ebaa24b.png +0 -0
  26. package/dist/assets/workplace_link_banner_v2-c81ed849.png +0 -0
  27. package/dist/config.json +14 -0
  28. package/dist/favicon.ico +0 -0
  29. package/dist/icons/android-chrome-192x192.png +0 -0
  30. package/dist/icons/android-chrome-512x512.png +0 -0
  31. package/dist/icons/apple-touch-icon.png +0 -0
  32. package/dist/icons/favicon-16x16.png +0 -0
  33. package/dist/icons/favicon-32x32.png +0 -0
  34. package/dist/index.html +114 -0
  35. package/dist/manifest.json +21 -0
  36. package/dist/sw-esm.js +16 -0
  37. package/package.json +129 -60
  38. package/LICENSE +0 -21
  39. package/dist/lib/apollo-benefits/apollo-benefits.esm.js +0 -1
  40. package/dist/lib/apollo-benefits/assets/car-placeholder.svg +0 -5
  41. package/dist/lib/apollo-benefits/assets/check.svg +0 -13
  42. package/dist/lib/apollo-benefits/index.esm.js +0 -0
  43. package/dist/lib/apollo-benefits/p-06a1f65f.js +0 -1
  44. package/dist/lib/apollo-benefits/p-077d7f8d.entry.js +0 -1
  45. package/dist/lib/apollo-benefits/p-0a21a709.entry.js +0 -1
  46. package/dist/lib/apollo-benefits/p-14054f15.js +0 -1
  47. package/dist/lib/apollo-benefits/p-24a37d64.js +0 -1
  48. package/dist/lib/apollo-benefits/p-2b3f3b72.entry.js +0 -1
  49. package/dist/lib/apollo-benefits/p-3111d565.entry.js +0 -1
  50. package/dist/lib/apollo-benefits/p-327396fa.entry.js +0 -1
  51. package/dist/lib/apollo-benefits/p-3af26279.entry.js +0 -1
  52. package/dist/lib/apollo-benefits/p-3d4d2683.js +0 -1
  53. package/dist/lib/apollo-benefits/p-4474bcf8.entry.js +0 -1
  54. package/dist/lib/apollo-benefits/p-50fe790f.js +0 -1
  55. package/dist/lib/apollo-benefits/p-53bcbd1d.js +0 -1
  56. package/dist/lib/apollo-benefits/p-64a2b03a.entry.js +0 -1
  57. package/dist/lib/apollo-benefits/p-68c136da.js +0 -1
  58. package/dist/lib/apollo-benefits/p-6bd16f5b.js +0 -1
  59. package/dist/lib/apollo-benefits/p-71dbc8ff.entry.js +0 -1
  60. package/dist/lib/apollo-benefits/p-774d9bc5.entry.js +0 -1
  61. package/dist/lib/apollo-benefits/p-7a2ca86d.entry.js +0 -1
  62. package/dist/lib/apollo-benefits/p-7a572b50.js +0 -1
  63. package/dist/lib/apollo-benefits/p-7c2cd94a.entry.js +0 -1
  64. package/dist/lib/apollo-benefits/p-839493d7.entry.js +0 -1
  65. package/dist/lib/apollo-benefits/p-acf61bdc.js +0 -1
  66. package/dist/lib/apollo-benefits/p-b33fc683.js +0 -1
  67. package/dist/lib/apollo-benefits/p-beb8f728.entry.js +0 -1
  68. package/dist/lib/apollo-benefits/p-d7bea1d9.entry.js +0 -1
  69. package/dist/lib/apollo-benefits/p-ddb176cb.entry.js +0 -1
  70. package/dist/lib/apollo-benefits/p-e241f55b.entry.js +0 -1
  71. package/dist/lib/apollo-benefits/p-ef8ea713.entry.js +0 -1
  72. package/dist/lib/apollo-benefits/p-f603197d.js +0 -15
  73. package/dist/lib/cjs/active-router-0ecaf2b8.js +0 -75
  74. package/dist/lib/cjs/ap-ben-choose-vehicle-section_4.cjs.entry.js +0 -2684
  75. package/dist/lib/cjs/ap-ben-complete-section_4.cjs.entry.js +0 -108
  76. package/dist/lib/cjs/ap-ben-notifications-section.cjs.entry.js +0 -238
  77. package/dist/lib/cjs/apollo-benefits.cjs.js +0 -25
  78. package/dist/lib/cjs/app-globals-67583b8b.js +0 -12
  79. package/dist/lib/cjs/async-6a7926f0.js +0 -753
  80. package/dist/lib/cjs/cars-calculator-app.cjs.entry.js +0 -52
  81. package/dist/lib/cjs/cars-calculator.service-11b0cd88.js +0 -901
  82. package/dist/lib/cjs/context-consumer.cjs.entry.js +0 -29
  83. package/dist/lib/cjs/datorama-akita-31d23240.js +0 -2551
  84. package/dist/lib/cjs/delay-d31618c3.js +0 -206
  85. package/dist/lib/cjs/distinctUntilChanged-e8538790.js +0 -371
  86. package/dist/lib/cjs/dom-utils-b8befdd5.js +0 -63
  87. package/dist/lib/cjs/fl-button.cjs.entry.js +0 -30
  88. package/dist/lib/cjs/fl-dropdown-async_2.cjs.entry.js +0 -467
  89. package/dist/lib/cjs/fl-dropdown.cjs.entry.js +0 -232
  90. package/dist/lib/cjs/fl-loading-indicator.cjs.entry.js +0 -26
  91. package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -91
  92. package/dist/lib/cjs/index-f1fadf90.js +0 -1735
  93. package/dist/lib/cjs/index.cjs.js +0 -2
  94. package/dist/lib/cjs/loader.cjs.js +0 -27
  95. package/dist/lib/cjs/location-utils-36fe7e5e.js +0 -237
  96. package/dist/lib/cjs/match-path-be4ea5f6.js +0 -279
  97. package/dist/lib/cjs/session.query-d61ba7ec.js +0 -1731
  98. package/dist/lib/cjs/stencil-async-content.cjs.entry.js +0 -32
  99. package/dist/lib/cjs/stencil-route-link.cjs.entry.js +0 -78
  100. package/dist/lib/cjs/stencil-route-switch.cjs.entry.js +0 -104
  101. package/dist/lib/cjs/stencil-route-title.cjs.entry.js +0 -32
  102. package/dist/lib/cjs/stencil-route.cjs.entry.js +0 -97
  103. package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +0 -59
  104. package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +0 -32
  105. package/dist/lib/cjs/stencil-router.cjs.entry.js +0 -640
  106. package/dist/lib/collection/assets/image/complete.svg +0 -122
  107. package/dist/lib/collection/collection-manifest.json +0 -53
  108. package/dist/lib/collection/components/cars-calculator-app/api/api-client.js +0 -5
  109. package/dist/lib/collection/components/cars-calculator-app/api/cars-calculator.api.js +0 -45
  110. package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.css +0 -22
  111. package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.js +0 -93
  112. package/dist/lib/collection/components/cars-calculator-app/modal-section/modal-section.css +0 -0
  113. package/dist/lib/collection/components/cars-calculator-app/modal-section/modal-section.js +0 -144
  114. package/dist/lib/collection/components/cars-calculator-app/notifications-section/notifications-section.js +0 -25
  115. package/dist/lib/collection/components/cars-calculator-app/pages/assets/car-placeholder.svg +0 -5
  116. package/dist/lib/collection/components/cars-calculator-app/pages/assets/check.svg +0 -13
  117. package/dist/lib/collection/components/cars-calculator-app/pages/choose-vehicle-section.component.js +0 -193
  118. package/dist/lib/collection/components/cars-calculator-app/pages/complete-section.component.js +0 -38
  119. package/dist/lib/collection/components/cars-calculator-app/pages/cost-breakdown-section.component.js +0 -47
  120. package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.css +0 -34
  121. package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.js +0 -64
  122. package/dist/lib/collection/components/cars-calculator-app/pages/personal-info-section.component.js +0 -66
  123. package/dist/lib/collection/components/cars-calculator-app/pages/quote-result-section.component.js +0 -86
  124. package/dist/lib/collection/components/cars-calculator-app/pages/submit-quote-section.component.js +0 -75
  125. package/dist/lib/collection/components/cars-calculator-app/services/app-configuration.service.js +0 -13
  126. package/dist/lib/collection/components/cars-calculator-app/services/cars-calculator.service.js +0 -103
  127. package/dist/lib/collection/components/cars-calculator-app/services/notifications.service.js +0 -37
  128. package/dist/lib/collection/components/cars-calculator-app/services/notifications.store.js +0 -3
  129. package/dist/lib/collection/components/cars-calculator-app/services/session.query.js +0 -35
  130. package/dist/lib/collection/components/cars-calculator-app/services/session.store.js +0 -78
  131. package/dist/lib/collection/global/config.js +0 -2
  132. package/dist/lib/collection/global/main.dev.js +0 -5
  133. package/dist/lib/collection/global/main.js +0 -5
  134. package/dist/lib/collection/index.js +0 -2
  135. package/dist/lib/collection/utils/config.js +0 -2
  136. package/dist/lib/collection/utils/index.js +0 -15
  137. package/dist/lib/collection/utils/lazy.js +0 -29
  138. package/dist/lib/esm/active-router-7c2ca849.js +0 -73
  139. package/dist/lib/esm/ap-ben-choose-vehicle-section_4.entry.js +0 -2677
  140. package/dist/lib/esm/ap-ben-complete-section_4.entry.js +0 -101
  141. package/dist/lib/esm/ap-ben-notifications-section.entry.js +0 -234
  142. package/dist/lib/esm/apollo-benefits.js +0 -23
  143. package/dist/lib/esm/app-globals-65714cca.js +0 -10
  144. package/dist/lib/esm/async-68e9cad7.js +0 -738
  145. package/dist/lib/esm/cars-calculator-app.entry.js +0 -48
  146. package/dist/lib/esm/cars-calculator.service-2cde6288.js +0 -894
  147. package/dist/lib/esm/context-consumer.entry.js +0 -25
  148. package/dist/lib/esm/datorama-akita-c87196a0.js +0 -2545
  149. package/dist/lib/esm/delay-115d4292.js +0 -200
  150. package/dist/lib/esm/distinctUntilChanged-bf69e0f8.js +0 -363
  151. package/dist/lib/esm/dom-utils-109a7d75.js +0 -55
  152. package/dist/lib/esm/fl-button.entry.js +0 -26
  153. package/dist/lib/esm/fl-dropdown-async_2.entry.js +0 -462
  154. package/dist/lib/esm/fl-dropdown.entry.js +0 -228
  155. package/dist/lib/esm/fl-loading-indicator.entry.js +0 -22
  156. package/dist/lib/esm/fl-style-guide.entry.js +0 -87
  157. package/dist/lib/esm/index-19c4d245.js +0 -1703
  158. package/dist/lib/esm/index.js +0 -1
  159. package/dist/lib/esm/loader.js +0 -23
  160. package/dist/lib/esm/location-utils-312665d3.js +0 -226
  161. package/dist/lib/esm/match-path-4b5c7d98.js +0 -276
  162. package/dist/lib/esm/polyfills/core-js.js +0 -11
  163. package/dist/lib/esm/polyfills/css-shim.js +0 -1
  164. package/dist/lib/esm/polyfills/dom.js +0 -79
  165. package/dist/lib/esm/polyfills/es5-html-element.js +0 -1
  166. package/dist/lib/esm/polyfills/index.js +0 -34
  167. package/dist/lib/esm/polyfills/system.js +0 -6
  168. package/dist/lib/esm/session.query-0f1c9503.js +0 -1719
  169. package/dist/lib/esm/stencil-async-content.entry.js +0 -28
  170. package/dist/lib/esm/stencil-route-link.entry.js +0 -74
  171. package/dist/lib/esm/stencil-route-switch.entry.js +0 -100
  172. package/dist/lib/esm/stencil-route-title.entry.js +0 -28
  173. package/dist/lib/esm/stencil-route.entry.js +0 -93
  174. package/dist/lib/esm/stencil-router-prompt.entry.js +0 -55
  175. package/dist/lib/esm/stencil-router-redirect.entry.js +0 -28
  176. package/dist/lib/esm/stencil-router.entry.js +0 -636
  177. package/dist/lib/index.cjs.js +0 -1
  178. package/dist/lib/index.js +0 -1
  179. package/dist/lib/loader/cdn.js +0 -3
  180. package/dist/lib/loader/index.cjs.js +0 -3
  181. package/dist/lib/loader/index.d.ts +0 -13
  182. package/dist/lib/loader/index.es2017.js +0 -3
  183. package/dist/lib/loader/index.js +0 -4
  184. package/dist/lib/loader/package.json +0 -10
  185. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
  186. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
  187. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
  188. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
  189. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
  190. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
  191. package/dist/lib/node_modules/@stencil/router/dist/collection/components/route/route.css +0 -3
  192. package/dist/lib/types/components/cars-calculator-app/api/api-client.d.ts +0 -2
  193. package/dist/lib/types/components/cars-calculator-app/api/cars-calculator.api.d.ts +0 -96
  194. package/dist/lib/types/components/cars-calculator-app/cars-calculator-app.d.ts +0 -15
  195. package/dist/lib/types/components/cars-calculator-app/modal-section/modal-section.d.ts +0 -16
  196. package/dist/lib/types/components/cars-calculator-app/notifications-section/notifications-section.d.ts +0 -5
  197. package/dist/lib/types/components/cars-calculator-app/pages/choose-vehicle-section.component.d.ts +0 -23
  198. package/dist/lib/types/components/cars-calculator-app/pages/complete-section.component.d.ts +0 -5
  199. package/dist/lib/types/components/cars-calculator-app/pages/cost-breakdown-section.component.d.ts +0 -6
  200. package/dist/lib/types/components/cars-calculator-app/pages/model-variants-section.component.d.ts +0 -12
  201. package/dist/lib/types/components/cars-calculator-app/pages/personal-info-section.component.d.ts +0 -10
  202. package/dist/lib/types/components/cars-calculator-app/pages/quote-result-section.component.d.ts +0 -13
  203. package/dist/lib/types/components/cars-calculator-app/pages/submit-quote-section.component.d.ts +0 -10
  204. package/dist/lib/types/components/cars-calculator-app/services/app-configuration.service.d.ts +0 -7
  205. package/dist/lib/types/components/cars-calculator-app/services/cars-calculator.service.d.ts +0 -11
  206. package/dist/lib/types/components/cars-calculator-app/services/notifications.service.d.ts +0 -15
  207. package/dist/lib/types/components/cars-calculator-app/services/notifications.store.d.ts +0 -14
  208. package/dist/lib/types/components/cars-calculator-app/services/session.query.d.ts +0 -25
  209. package/dist/lib/types/components/cars-calculator-app/services/session.store.d.ts +0 -74
  210. package/dist/lib/types/components.d.ts +0 -170
  211. package/dist/lib/types/global/config.d.ts +0 -2
  212. package/dist/lib/types/global/main.d.ts +0 -1
  213. package/dist/lib/types/global/main.dev.d.ts +0 -1
  214. package/dist/lib/types/index.d.ts +0 -2
  215. package/dist/lib/types/stencil-public-runtime.d.ts +0 -1555
  216. package/dist/lib/types/utils/config.d.ts +0 -2
  217. package/dist/lib/types/utils/index.d.ts +0 -7
  218. package/dist/lib/types/utils/lazy.d.ts +0 -12
  219. package/readme.md +0 -1
@@ -1,28 +0,0 @@
1
- import { r as registerInstance, h } from './index-19c4d245.js';
2
-
3
- const AsyncContent = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- this.content = '';
7
- }
8
- componentWillLoad() {
9
- if (this.documentLocation != null) {
10
- return this.fetchNewContent(this.documentLocation);
11
- }
12
- }
13
- fetchNewContent(newDocumentLocation) {
14
- return fetch(newDocumentLocation)
15
- .then(response => response.text())
16
- .then(data => {
17
- this.content = data;
18
- });
19
- }
20
- render() {
21
- return (h("div", { innerHTML: this.content }));
22
- }
23
- static get watchers() { return {
24
- "documentLocation": ["fetchNewContent"]
25
- }; }
26
- };
27
-
28
- export { AsyncContent as stencil_async_content };
@@ -1,74 +0,0 @@
1
- import { r as registerInstance, h, a as getElement } from './index-19c4d245.js';
2
- import { A as ActiveRouter } from './active-router-7c2ca849.js';
3
- import { m as matchPath } from './match-path-4b5c7d98.js';
4
- import './location-utils-312665d3.js';
5
- import { i as isModifiedEvent } from './dom-utils-109a7d75.js';
6
-
7
- const getUrl = (url, root) => {
8
- // Don't allow double slashes
9
- if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') {
10
- return root.slice(0, root.length - 1) + url;
11
- }
12
- return root + url;
13
- };
14
- const RouteLink = class {
15
- constructor(hostRef) {
16
- registerInstance(this, hostRef);
17
- this.unsubscribe = () => { return; };
18
- this.activeClass = 'link-active';
19
- this.exact = false;
20
- this.strict = true;
21
- /**
22
- * Custom tag to use instead of an anchor
23
- */
24
- this.custom = 'a';
25
- this.match = null;
26
- }
27
- componentWillLoad() {
28
- this.computeMatch();
29
- }
30
- // Identify if the current route is a match.
31
- computeMatch() {
32
- if (this.location) {
33
- this.match = matchPath(this.location.pathname, {
34
- path: this.urlMatch || this.url,
35
- exact: this.exact,
36
- strict: this.strict
37
- });
38
- }
39
- }
40
- handleClick(e) {
41
- if (isModifiedEvent(e) || !this.history || !this.url || !this.root) {
42
- return;
43
- }
44
- e.preventDefault();
45
- return this.history.push(getUrl(this.url, this.root));
46
- }
47
- // Get the URL for this route link without the root from the router
48
- render() {
49
- let anchorAttributes = {
50
- class: {
51
- [this.activeClass]: this.match !== null,
52
- },
53
- onClick: this.handleClick.bind(this)
54
- };
55
- if (this.anchorClass) {
56
- anchorAttributes.class[this.anchorClass] = true;
57
- }
58
- if (this.custom === 'a') {
59
- anchorAttributes = Object.assign({}, anchorAttributes, { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex, 'aria-haspopup': this.ariaHaspopup, id: this.anchorId, 'aria-posinset': this.ariaPosinset, 'aria-setsize': this.ariaSetsize, 'aria-label': this.ariaLabel });
60
- }
61
- return (h(this.custom, Object.assign({}, anchorAttributes), h("slot", null)));
62
- }
63
- get el() { return getElement(this); }
64
- static get watchers() { return {
65
- "location": ["computeMatch"]
66
- }; }
67
- };
68
- ActiveRouter.injectProps(RouteLink, [
69
- 'history',
70
- 'location',
71
- 'root'
72
- ]);
73
-
74
- export { RouteLink as stencil_route_link };
@@ -1,100 +0,0 @@
1
- import { r as registerInstance, c as getContext, h, a as getElement } from './index-19c4d245.js';
2
- import { A as ActiveRouter } from './active-router-7c2ca849.js';
3
- import { m as matchPath } from './match-path-4b5c7d98.js';
4
- import './location-utils-312665d3.js';
5
-
6
- const getUniqueId = () => {
7
- return ((Math.random() * 10e16).toString().match(/.{4}/g) || []).join('-');
8
- };
9
- const getMatch = (pathname, url, exact) => {
10
- return matchPath(pathname, {
11
- path: url,
12
- exact: exact,
13
- strict: true
14
- });
15
- };
16
- const isHTMLStencilRouteElement = (elm) => {
17
- return elm.tagName === 'STENCIL-ROUTE';
18
- };
19
- const RouteSwitch = class {
20
- constructor(hostRef) {
21
- registerInstance(this, hostRef);
22
- this.group = getUniqueId();
23
- this.subscribers = [];
24
- this.queue = getContext(this, "queue");
25
- }
26
- componentWillLoad() {
27
- if (this.location != null) {
28
- this.regenerateSubscribers(this.location);
29
- }
30
- }
31
- async regenerateSubscribers(newLocation) {
32
- if (newLocation == null) {
33
- return;
34
- }
35
- let newActiveIndex = -1;
36
- this.subscribers = Array.prototype.slice.call(this.el.children)
37
- .filter(isHTMLStencilRouteElement)
38
- .map((childElement, index) => {
39
- const match = getMatch(newLocation.pathname, childElement.url, childElement.exact);
40
- if (match && newActiveIndex === -1) {
41
- newActiveIndex = index;
42
- }
43
- return {
44
- el: childElement,
45
- match: match
46
- };
47
- });
48
- if (newActiveIndex === -1) {
49
- return;
50
- }
51
- // Check if this actually changes which child is active
52
- // then just pass the new match down if the active route isn't changing.
53
- if (this.activeIndex === newActiveIndex) {
54
- this.subscribers[newActiveIndex].el.match = this.subscribers[newActiveIndex].match;
55
- return;
56
- }
57
- this.activeIndex = newActiveIndex;
58
- // Set all props on the new active route then wait until it says that it
59
- // is completed
60
- const activeChild = this.subscribers[this.activeIndex];
61
- if (this.scrollTopOffset) {
62
- activeChild.el.scrollTopOffset = this.scrollTopOffset;
63
- }
64
- activeChild.el.group = this.group;
65
- activeChild.el.match = activeChild.match;
66
- activeChild.el.componentUpdated = (routeViewUpdatedOptions) => {
67
- // After the new active route has completed then update visibility of routes
68
- this.queue.write(() => {
69
- this.subscribers.forEach((child, index) => {
70
- child.el.componentUpdated = undefined;
71
- if (index === this.activeIndex) {
72
- return child.el.style.display = '';
73
- }
74
- if (this.scrollTopOffset) {
75
- child.el.scrollTopOffset = this.scrollTopOffset;
76
- }
77
- child.el.group = this.group;
78
- child.el.match = null;
79
- child.el.style.display = 'none';
80
- });
81
- });
82
- if (this.routeViewsUpdated) {
83
- this.routeViewsUpdated(Object.assign({ scrollTopOffset: this.scrollTopOffset }, routeViewUpdatedOptions));
84
- }
85
- };
86
- }
87
- render() {
88
- return (h("slot", null));
89
- }
90
- get el() { return getElement(this); }
91
- static get watchers() { return {
92
- "location": ["regenerateSubscribers"]
93
- }; }
94
- };
95
- ActiveRouter.injectProps(RouteSwitch, [
96
- 'location',
97
- 'routeViewsUpdated'
98
- ]);
99
-
100
- export { RouteSwitch as stencil_route_switch };
@@ -1,28 +0,0 @@
1
- import { r as registerInstance, a as getElement } from './index-19c4d245.js';
2
- import { A as ActiveRouter } from './active-router-7c2ca849.js';
3
-
4
- const RouteTitle = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.titleSuffix = '';
8
- this.pageTitle = '';
9
- }
10
- updateDocumentTitle() {
11
- const el = this.el;
12
- if (el.ownerDocument) {
13
- el.ownerDocument.title = `${this.pageTitle}${this.titleSuffix || ''}`;
14
- }
15
- }
16
- componentWillLoad() {
17
- this.updateDocumentTitle();
18
- }
19
- get el() { return getElement(this); }
20
- static get watchers() { return {
21
- "pageTitle": ["updateDocumentTitle"]
22
- }; }
23
- };
24
- ActiveRouter.injectProps(RouteTitle, [
25
- 'titleSuffix',
26
- ]);
27
-
28
- export { RouteTitle as stencil_route_title };
@@ -1,93 +0,0 @@
1
- import { r as registerInstance, h, a as getElement } from './index-19c4d245.js';
2
- import { A as ActiveRouter } from './active-router-7c2ca849.js';
3
- import { m as matchPath, a as matchesAreEqual } from './match-path-4b5c7d98.js';
4
- import './location-utils-312665d3.js';
5
-
6
- const routeCss = "stencil-route.inactive{display:none}";
7
-
8
- const Route = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.group = null;
12
- this.match = null;
13
- this.componentProps = {};
14
- this.exact = false;
15
- this.scrollOnNextRender = false;
16
- this.previousMatch = null;
17
- }
18
- // Identify if the current route is a match.
19
- computeMatch(newLocation) {
20
- const isGrouped = this.group != null || (this.el.parentElement != null && this.el.parentElement.tagName.toLowerCase() === 'stencil-route-switch');
21
- if (!newLocation || isGrouped) {
22
- return;
23
- }
24
- this.previousMatch = this.match;
25
- return this.match = matchPath(newLocation.pathname, {
26
- path: this.url,
27
- exact: this.exact,
28
- strict: true
29
- });
30
- }
31
- async loadCompleted() {
32
- let routeViewOptions = {};
33
- if (this.history && this.history.location.hash) {
34
- routeViewOptions = {
35
- scrollToId: this.history.location.hash.substr(1)
36
- };
37
- }
38
- else if (this.scrollTopOffset) {
39
- routeViewOptions = {
40
- scrollTopOffset: this.scrollTopOffset
41
- };
42
- }
43
- // After all children have completed then tell switch
44
- // the provided callback will get executed after this route is in view
45
- if (typeof this.componentUpdated === 'function') {
46
- this.componentUpdated(routeViewOptions);
47
- // If this is an independent route and it matches then routes have updated.
48
- // If the only change to location is a hash change then do not scroll.
49
- }
50
- else if (this.match && !matchesAreEqual(this.match, this.previousMatch) && this.routeViewsUpdated) {
51
- this.routeViewsUpdated(routeViewOptions);
52
- }
53
- }
54
- async componentDidUpdate() {
55
- await this.loadCompleted();
56
- }
57
- async componentDidLoad() {
58
- await this.loadCompleted();
59
- }
60
- render() {
61
- // If there is no activeRouter then do not render
62
- // Check if this route is in the matching URL (for example, a parent route)
63
- if (!this.match || !this.history) {
64
- return null;
65
- }
66
- // component props defined in route
67
- // the history api
68
- // current match data including params
69
- const childProps = Object.assign({}, this.componentProps, { history: this.history, match: this.match });
70
- // If there is a routerRender defined then use
71
- // that and pass the component and component props with it.
72
- if (this.routeRender) {
73
- return this.routeRender(Object.assign({}, childProps, { component: this.component }));
74
- }
75
- if (this.component) {
76
- const ChildComponent = this.component;
77
- return (h(ChildComponent, Object.assign({}, childProps)));
78
- }
79
- }
80
- get el() { return getElement(this); }
81
- static get watchers() { return {
82
- "location": ["computeMatch"]
83
- }; }
84
- };
85
- ActiveRouter.injectProps(Route, [
86
- 'location',
87
- 'history',
88
- 'historyType',
89
- 'routeViewsUpdated'
90
- ]);
91
- Route.style = routeCss;
92
-
93
- export { Route as stencil_route };
@@ -1,55 +0,0 @@
1
- import { r as registerInstance, a as getElement } from './index-19c4d245.js';
2
- import { A as ActiveRouter } from './active-router-7c2ca849.js';
3
-
4
- const StencilRouterPrompt = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.when = true;
8
- this.message = '';
9
- }
10
- enable(message) {
11
- if (this.unblock) {
12
- this.unblock();
13
- }
14
- if (this.history) {
15
- this.unblock = this.history.block(message);
16
- }
17
- }
18
- disable() {
19
- if (this.unblock) {
20
- this.unblock();
21
- this.unblock = undefined;
22
- }
23
- }
24
- componentWillLoad() {
25
- if (this.when) {
26
- this.enable(this.message);
27
- }
28
- }
29
- updateMessage(newMessage, prevMessage) {
30
- if (this.when) {
31
- if (!this.when || prevMessage !== newMessage) {
32
- this.enable(this.message);
33
- }
34
- }
35
- else {
36
- this.disable();
37
- }
38
- }
39
- componentDidUnload() {
40
- this.disable();
41
- }
42
- render() {
43
- return null;
44
- }
45
- get el() { return getElement(this); }
46
- static get watchers() { return {
47
- "message": ["updateMessage"],
48
- "when": ["updateMessage"]
49
- }; }
50
- };
51
- ActiveRouter.injectProps(StencilRouterPrompt, [
52
- 'history',
53
- ]);
54
-
55
- export { StencilRouterPrompt as stencil_router_prompt };
@@ -1,28 +0,0 @@
1
- import { r as registerInstance, a as getElement } from './index-19c4d245.js';
2
- import { A as ActiveRouter } from './active-router-7c2ca849.js';
3
-
4
- // Get the URL for this route link without the root from the router
5
- const getUrl = (url, root) => {
6
- // Don't allow double slashes
7
- if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') {
8
- return root.slice(0, root.length - 1) + url;
9
- }
10
- return root + url;
11
- };
12
- const Redirect = class {
13
- constructor(hostRef) {
14
- registerInstance(this, hostRef);
15
- }
16
- componentWillLoad() {
17
- if (this.history && this.root && this.url) {
18
- return this.history.replace(getUrl(this.url, this.root));
19
- }
20
- }
21
- get el() { return getElement(this); }
22
- };
23
- ActiveRouter.injectProps(Redirect, [
24
- 'history',
25
- 'root'
26
- ]);
27
-
28
- export { Redirect as stencil_router_redirect };