@flarehr/apollo-benefits 0.1.109 → 0.3.53405

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