@esri/solutions-components 0.6.17 → 0.6.18

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 (198) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/t9n/map-tools/resources.json +2 -1
  3. package/dist/assets/t9n/map-tools/resources_en.json +2 -1
  4. package/dist/assets/t9n/solution-spatial-ref/resources.json +0 -1
  5. package/dist/assets/t9n/solution-spatial-ref/resources_en.json +0 -1
  6. package/dist/assets/t9n/solution-spatial-ref/resources_fr.json +6 -0
  7. package/dist/assets/t9n/solution-spatial-ref/resources_he.json +6 -0
  8. package/dist/assets/t9n/spatial-ref/resources.json +3 -0
  9. package/dist/assets/t9n/spatial-ref/resources_en.json +3 -0
  10. package/dist/assets/t9n/spatial-ref/resources_fr.json +3 -0
  11. package/dist/assets/t9n/spatial-ref/resources_he.json +3 -0
  12. package/dist/cjs/{basemap-gallery_6.cjs.entry.js → basemap-gallery_7.cjs.entry.js} +124 -3
  13. package/dist/cjs/{calcite-tree_3.cjs.entry.js → calcite-checkbox_3.cjs.entry.js} +123 -319
  14. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +4 -3
  15. package/dist/cjs/card-manager_3.cjs.entry.js +8 -5
  16. package/dist/{collection/components/basemap-gallery/test/basemap-gallery.e2e.js → cjs/common-13719149.js} +17 -9
  17. package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -7
  18. package/dist/cjs/edit-card_2.cjs.entry.js +4 -3
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/solution-configuration.cjs.entry.js +2 -1
  21. package/dist/cjs/solution-contents_3.cjs.entry.js +21 -21256
  22. package/dist/cjs/solution-item-icon.cjs.entry.js +327 -0
  23. package/dist/cjs/{solution-store-c443e657.js → solution-resource-f9e3b289.js} +2 -1698
  24. package/dist/cjs/solution-store-2414dd8a.js +1707 -0
  25. package/dist/cjs/solutions-components.cjs.js +1 -1
  26. package/dist/cjs/spatial-ref.cjs.entry.js +21293 -0
  27. package/dist/collection/collection-manifest.json +2 -0
  28. package/dist/collection/components/card-manager/card-manager.js +1 -1
  29. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +15 -0
  30. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +47 -6
  31. package/dist/collection/components/edit-card/edit-card.css +0 -12
  32. package/dist/collection/components/floor-filter/floor-filter.css +19 -0
  33. package/dist/collection/components/floor-filter/floor-filter.js +163 -0
  34. package/dist/collection/components/info-card/info-card.js +3 -2
  35. package/dist/collection/components/layer-table/layer-table.css +8 -0
  36. package/dist/collection/components/layer-table/layer-table.js +18 -2
  37. package/dist/collection/components/map-card/map-card.js +19 -1
  38. package/dist/collection/components/map-picker/map-picker.css +0 -4
  39. package/dist/collection/components/map-picker/map-picker.js +1 -1
  40. package/dist/collection/components/map-tools/map-tools.js +54 -1
  41. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +1 -7
  42. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +37 -291
  43. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.e2e.js +24 -12
  44. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +32 -128
  45. package/dist/collection/components/spatial-ref/spatial-ref.css +20 -0
  46. package/dist/collection/components/spatial-ref/spatial-ref.js +445 -0
  47. package/dist/collection/components/spatial-ref/test/spatial-ref.e2e.js +71 -0
  48. package/dist/collection/components/spatial-ref/test/spatial-ref.spec.js +158 -0
  49. package/dist/collection/demos/crowdsource-manager.html +4 -0
  50. package/dist/collection/demos/solution-spatial-ref.html +9 -16
  51. package/dist/collection/demos/spatial-ref.html +53 -0
  52. package/dist/collection/utils/{templates.e2e.js → test/templates.e2e.js} +2 -2
  53. package/dist/collection/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
  54. package/dist/components/card-manager2.js +1 -1
  55. package/dist/components/crowdsource-manager.js +86 -73
  56. package/dist/components/edit-card2.js +1 -1
  57. package/dist/components/floor-filter.d.ts +11 -0
  58. package/dist/components/floor-filter.js +11 -0
  59. package/dist/components/floor-filter2.js +115 -0
  60. package/dist/components/info-card2.js +3 -2
  61. package/dist/components/layer-table2.js +5 -3
  62. package/dist/components/map-card2.js +45 -37
  63. package/dist/components/map-picker2.js +2 -2
  64. package/dist/components/map-tools2.js +52 -11
  65. package/dist/components/solution-configuration.js +79 -72
  66. package/dist/components/solution-resource-item2.js +2 -1
  67. package/dist/components/solution-resource.js +1836 -0
  68. package/dist/components/solution-spatial-ref2.js +41 -21277
  69. package/dist/components/solution-store.js +2 -1830
  70. package/dist/components/spatial-ref.d.ts +11 -0
  71. package/dist/components/spatial-ref.js +11 -0
  72. package/dist/components/spatial-ref2.js +21374 -0
  73. package/dist/esm/{basemap-gallery_6.entry.js → basemap-gallery_7.entry.js} +124 -4
  74. package/dist/esm/{calcite-tree_3.entry.js → calcite-checkbox_3.entry.js} +125 -321
  75. package/dist/esm/calcite-shell-panel_14.entry.js +2 -1
  76. package/dist/esm/card-manager_3.entry.js +8 -5
  77. package/dist/{collection/components/layer-table/test/layer-table.e2e.js → esm/common-e4a8e353.js} +15 -9
  78. package/dist/esm/crowdsource-manager.entry.js +12 -7
  79. package/dist/esm/edit-card_2.entry.js +4 -3
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/polyfills/core-js.js +11 -0
  82. package/dist/esm/polyfills/dom.js +79 -0
  83. package/dist/esm/polyfills/es5-html-element.js +1 -0
  84. package/dist/esm/polyfills/index.js +34 -0
  85. package/dist/esm/polyfills/system.js +6 -0
  86. package/dist/esm/solution-configuration.entry.js +2 -1
  87. package/dist/esm/solution-contents_3.entry.js +20 -21255
  88. package/dist/esm/solution-item-icon.entry.js +323 -0
  89. package/dist/esm/{solution-store-b29d50f7.js → solution-resource-be35d35b.js} +1 -1697
  90. package/dist/esm/solution-store-e734626a.js +1704 -0
  91. package/dist/esm/solutions-components.js +1 -1
  92. package/dist/esm/spatial-ref.entry.js +21289 -0
  93. package/dist/solutions-components/demos/crowdsource-manager.html +4 -0
  94. package/dist/solutions-components/demos/solution-spatial-ref.html +9 -16
  95. package/dist/solutions-components/demos/spatial-ref.html +53 -0
  96. package/dist/solutions-components/{p-64d29ba2.entry.js → p-0bc27ba7.entry.js} +2 -2
  97. package/dist/{collection/components/map-card/test/map-card.e2e.js → solutions-components/p-1b228f97.js} +2 -10
  98. package/dist/solutions-components/p-5b8c8942.entry.js +21 -0
  99. package/dist/solutions-components/p-63c6fc29.entry.js +6 -0
  100. package/dist/solutions-components/p-64945b43.entry.js +18 -0
  101. package/dist/solutions-components/p-770bff06.entry.js +6 -0
  102. package/dist/solutions-components/p-7741dbab.entry.js +6 -0
  103. package/dist/solutions-components/p-80465067.entry.js +6 -0
  104. package/dist/solutions-components/p-846df994.entry.js +6 -0
  105. package/dist/solutions-components/p-b3f8d2cb.js +192 -0
  106. package/dist/solutions-components/p-c26d8b36.entry.js +6 -0
  107. package/dist/solutions-components/{p-4d942b0f.entry.js → p-f35147d5.entry.js} +1 -1
  108. package/dist/solutions-components/p-ff0d7712.js +44 -0
  109. package/dist/solutions-components/solutions-components.esm.js +1 -1
  110. package/dist/solutions-components/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
  111. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
  112. package/dist/types/components/floor-filter/floor-filter.d.ts +61 -0
  113. package/dist/types/components/layer-table/layer-table.d.ts +4 -0
  114. package/dist/types/components/map-card/map-card.d.ts +4 -0
  115. package/dist/types/components/map-tools/map-tools.d.ts +24 -0
  116. package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +11 -93
  117. package/dist/types/components/spatial-ref/spatial-ref.d.ts +142 -0
  118. package/dist/types/components.d.ts +123 -16
  119. package/dist/types/preact.d.ts +8 -1
  120. package/package.json +6 -6
  121. package/dist/cjs/calcite-checkbox.cjs.entry.js +0 -136
  122. package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +0 -37
  123. package/dist/collection/components/buffer-tools/test/buffer-tools.e2e.js +0 -29
  124. package/dist/collection/components/buffer-tools/test/buffer-tools.spec.js +0 -160
  125. package/dist/collection/components/card-manager/test/card-manager.e2e.js +0 -29
  126. package/dist/collection/components/card-manager/test/card-manager.spec.js +0 -37
  127. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.e2e.js +0 -29
  128. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.spec.js +0 -37
  129. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.e2e.js +0 -29
  130. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.spec.js +0 -37
  131. package/dist/collection/components/deduct-calculator/test/deduct-calculator.e2e.js +0 -29
  132. package/dist/collection/components/deduct-calculator/test/deduct-calculator.spec.js +0 -37
  133. package/dist/collection/components/edit-card/test/edit-card.e2e.js +0 -14
  134. package/dist/collection/components/edit-card/test/edit-card.spec.js +0 -22
  135. package/dist/collection/components/info-card/test/info-card.e2e.js +0 -29
  136. package/dist/collection/components/info-card/test/info-card.spec.js +0 -37
  137. package/dist/collection/components/json-editor/test/json-editor.e2e.js +0 -36
  138. package/dist/collection/components/json-editor/test/json-editor.spec.js +0 -65
  139. package/dist/collection/components/layer-table/test/layer-table.spec.js +0 -37
  140. package/dist/collection/components/layout-manager/test/layout-manager.e2e.js +0 -29
  141. package/dist/collection/components/layout-manager/test/layout-manager.spec.js +0 -37
  142. package/dist/collection/components/list-item/test/list-item.e2e.js +0 -29
  143. package/dist/collection/components/list-item/test/list-item.spec.js +0 -37
  144. package/dist/collection/components/map-card/test/map-card.spec.js +0 -37
  145. package/dist/collection/components/map-draw-tools/test/map-draw-tools.e2e.js +0 -29
  146. package/dist/collection/components/map-draw-tools/test/map-draw-tools.spec.js +0 -37
  147. package/dist/collection/components/map-fullscreen/test/map-fullscreen.e2e.js +0 -29
  148. package/dist/collection/components/map-fullscreen/test/map-fullscreen.spec.js +0 -37
  149. package/dist/collection/components/map-layer-picker/test/map-layer-picker.e2e.js +0 -29
  150. package/dist/collection/components/map-layer-picker/test/map-layer-picker.spec.js +0 -114
  151. package/dist/collection/components/map-legend/test/map-legend.e2e.js +0 -14
  152. package/dist/collection/components/map-legend/test/map-legend.spec.js +0 -22
  153. package/dist/collection/components/map-picker/test/map-picker.e2e.js +0 -29
  154. package/dist/collection/components/map-picker/test/map-picker.spec.js +0 -37
  155. package/dist/collection/components/map-search/test/map-search.e2e.js +0 -29
  156. package/dist/collection/components/map-search/test/map-search.spec.js +0 -37
  157. package/dist/collection/components/map-select-tools/test/map-select-tools.e2e.js +0 -29
  158. package/dist/collection/components/map-select-tools/test/map-select-tools.spec.js +0 -366
  159. package/dist/collection/components/map-tools/test/map-tools.e2e.js +0 -29
  160. package/dist/collection/components/map-tools/test/map-tools.spec.js +0 -37
  161. package/dist/collection/components/pci-calculator/test/pci-calculator.e2e.js +0 -29
  162. package/dist/collection/components/pci-calculator/test/pci-calculator.spec.js +0 -37
  163. package/dist/collection/components/pdf-download/test/pdf-download.e2e.js +0 -76
  164. package/dist/collection/components/pdf-download/test/pdf-download.spec.js +0 -107
  165. package/dist/collection/components/public-notification/test/public-notification.spec.js +0 -161
  166. package/dist/collection/components/refine-selection/test/refine-selection.e2e.js +0 -14
  167. package/dist/collection/components/refine-selection/test/refine-selection.spec.js +0 -22
  168. package/dist/collection/components/solution-configuration/test/solution-configuration.e2e.js +0 -36
  169. package/dist/collection/components/solution-configuration/test/solution-configuration.spec.js +0 -119
  170. package/dist/collection/components/solution-contents/test/solution-contents.e2e.js +0 -94
  171. package/dist/collection/components/solution-contents/test/solution-contents.spec.js +0 -143
  172. package/dist/collection/components/solution-item/test/solution-item.e2e.js +0 -36
  173. package/dist/collection/components/solution-item/test/solution-item.spec.js +0 -77
  174. package/dist/collection/components/solution-item-details/test/solution-item-details.e2e.js +0 -36
  175. package/dist/collection/components/solution-item-details/test/solution-item-details.spec.js +0 -142
  176. package/dist/collection/components/solution-item-icon/test/solution-item-icon.e2e.js +0 -29
  177. package/dist/collection/components/solution-item-icon/test/solution-item-icon.spec.js +0 -39
  178. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.e2e.js +0 -36
  179. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.spec.js +0 -54
  180. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.e2e.js +0 -36
  181. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.spec.js +0 -65
  182. package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js +0 -36
  183. package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js +0 -55
  184. package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js +0 -36
  185. package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js +0 -60
  186. package/dist/collection/components/solution-variables/test/solution-variables.e2e.js +0 -36
  187. package/dist/collection/components/solution-variables/test/solution-variables.spec.js +0 -131
  188. package/dist/esm/calcite-checkbox.entry.js +0 -132
  189. package/dist/solutions-components/p-17d176b5.js +0 -230
  190. package/dist/solutions-components/p-1d9a5198.entry.js +0 -37
  191. package/dist/solutions-components/p-3707d9bd.entry.js +0 -6
  192. package/dist/solutions-components/p-41bbccbc.entry.js +0 -6
  193. package/dist/solutions-components/p-4f2fce86.entry.js +0 -6
  194. package/dist/solutions-components/p-5ffaaaf4.entry.js +0 -6
  195. package/dist/solutions-components/p-736e76fb.entry.js +0 -17
  196. package/dist/solutions-components/p-dda517b9.entry.js +0 -6
  197. /package/dist/collection/components/{solution-spatial-ref → spatial-ref}/spatialreferences.js +0 -0
  198. /package/dist/types/components/{solution-spatial-ref → spatial-ref}/spatialreferences.d.ts +0 -0
@@ -1,54 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { SolutionItemSharing } from "../solution-item-sharing";
23
- import { value } from "../../../demos/data/solution-item-sharing-data.json";
24
- import { h } from "@stencil/core";
25
- xdescribe('solution-item-sharing', () => {
26
- it('renders', async () => {
27
- const page = await newSpecPage({
28
- components: [SolutionItemSharing],
29
- template: () => (h("solution-item-sharing", { "group-id": value }))
30
- });
31
- expect(page.root).toEqualHtml(`
32
- <solution-item-sharing>
33
- <mock:shadow-root>
34
- <div class="container-border">
35
- <calcite-label layout="inline">
36
- <calcite-switch id="A" name="setting" scale="m" switched="" value="enabled"></calcite-switch>
37
- <solution-item-icon type="Feature Service"></solution-item-icon>
38
- <span class="icon-text" title="ElectionGeography_public">
39
- ElectionGeography_public
40
- </span>
41
- </calcite-label>
42
- <calcite-label layout="inline">
43
- <calcite-switch id="B" name="setting" scale="m" value="enabled"></calcite-switch>
44
- <solution-item-icon type="Web Map"></solution-item-icon>
45
- <span class="icon-text" title="Election Polling Places">
46
- Election Polling Places
47
- </span>
48
- </calcite-label>
49
- </div>
50
- </mock:shadow-root>
51
- </solution-item-sharing>
52
- `);
53
- });
54
- });
@@ -1,36 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- //import { newE2EPage } from '@stencil/core/testing';
22
- describe('solution-organization-variables', () => {
23
- it('renders', async () => {
24
- //TEST commented out for now.
25
- // need to work out how we pass translations
26
- // e2e tests don't seem to support a similar apporach to the unit tests where we can use template to load JSX
27
- // could flatten the translations further so it would contain no sub groups
28
- // could set default translations for each file
29
- // and could still have a test to compare the default with the actual as a way to verify
30
- expect("a").toEqual("a");
31
- // const page = await newE2EPage();
32
- // await page.setContent('<solution-organization-variables></solution-organization-variables>');
33
- // const element = await page.find('solution-organization-variables');
34
- // expect(element).toHaveClass('hydrated');
35
- });
36
- });
@@ -1,65 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { SolutionOrganizationVariables } from "../solution-organization-variables";
23
- import { value } from "../../../demos/data/solution-organization-variables-data.json";
24
- import { h } from "@stencil/core";
25
- xdescribe('solution-organization-variables', () => {
26
- it('renders', async () => {
27
- const page = await newSpecPage({
28
- components: [SolutionOrganizationVariables],
29
- template: () => (h("solution-organization-variables", { value: JSON.stringify(value) }))
30
- });
31
- expect(page.root).toEqualHtml(`
32
- <solution-organization-variables>
33
- <mock:shadow-root>
34
- <div>
35
- <h4 class="org-var-header">
36
- Organization Variables
37
- </h4>
38
- </div>
39
- <div class="container-border">
40
- <calcite-label id="variable-label">
41
- <calcite-tree-item>
42
- title
43
- </calcite-tree-item>
44
- <calcite-tree-item>
45
- title2
46
- </calcite-tree-item>
47
- <calcite-tree-item>
48
- title3
49
- </calcite-tree-item>
50
- <calcite-tree-item>
51
- title4
52
- </calcite-tree-item>
53
- <calcite-tree-item>
54
- title5
55
- </calcite-tree-item>
56
- <calcite-tree-item>
57
- title6
58
- </calcite-tree-item>
59
- </calcite-label>
60
- </div>
61
- </mock:shadow-root>
62
- </solution-organization-variables>
63
- `);
64
- });
65
- });
@@ -1,36 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- // import { newE2EPage } from '@stencil/core/testing';
22
- describe('solution-resource-item', () => {
23
- it('renders', async () => {
24
- //TEST commented out for now.
25
- // need to work out how we pass translations
26
- // e2e tests don't seem to support a similar apporach to the unit tests where we can use template to load JSX
27
- // could flatten the translations further so it would contain no sub groups
28
- // could set default translations for each file
29
- // and could still have a test to compare the default with the actual as a way to verify
30
- expect("a").toEqual("a");
31
- // const page = await newE2EPage();
32
- // await page.setContent('<solution-resource-item></solution-resource-item>');
33
- // const element = await page.find('solution-resource-item');
34
- // expect(element).toHaveClass('hydrated');
35
- });
36
- });
@@ -1,55 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { SolutionResourceItem } from "../solution-resource-item";
23
- import { h } from "@stencil/core";
24
- xdescribe('solution-resource-item', () => {
25
- it('renders', async () => {
26
- const page = await newSpecPage({
27
- components: [SolutionResourceItem],
28
- template: () => (h("solution-resource-item", null))
29
- });
30
- page.root.value = {
31
- name: "thename",
32
- url: "theurl"
33
- };
34
- await page.waitForChanges();
35
- expect(page.root).toEqualHtml(`
36
- <solution-resource-item itemid="">
37
- <mock:shadow-root>
38
- <div class="resource-item">
39
- <div class="margin-bottom-1">
40
- <calcite-button appearance="solid" class="resource-button" color="blue">
41
- Add New Resource
42
- </calcite-button>
43
- <calcite-button appearance="solid" color="blue" disabled="">
44
- Download All
45
- </calcite-button>
46
- </div>
47
- <div class="resources-container" style="display: none;">
48
- <calcite-value-list multiple=""></calcite-value-list>
49
- </div>
50
- </div>
51
- </mock:shadow-root>
52
- </solution-resource-item>
53
- `);
54
- });
55
- });
@@ -1,36 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- // import { newE2EPage } from '@stencil/core/testing';
22
- describe('solution-template-data', () => {
23
- it('renders', async () => {
24
- //TEST commented out for now.
25
- // need to work out how we pass translations
26
- // e2e tests don't seem to support a similar apporach to the unit tests where we can use template to load JSX
27
- // could flatten the translations further so it would contain no sub groups
28
- // could set default translations for each file
29
- // and could still have a test to compare the default with the actual as a way to verify
30
- expect("a").toEqual("a");
31
- // const page = await newE2EPage();
32
- // await page.setContent('<solution-template-data></solution-template-data>');
33
- // const element = await page.find('solution-template-data');
34
- // expect(element).toHaveClass('hydrated');
35
- });
36
- });
@@ -1,60 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { SolutionTemplateData } from "../solution-template-data";
23
- import * as data from "../../../demos/data/solution-template-data-data.json";
24
- import { h } from "@stencil/core";
25
- import state from "../../../utils/solution-store";
26
- beforeEach(async () => {
27
- state._testAccess("_emptyTheStore");
28
- });
29
- xdescribe('solution-template-data', () => {
30
- it('renders', async () => {
31
- const page = await newSpecPage({
32
- components: [SolutionTemplateData],
33
- template: () => (h("solution-template-data", { "item-id": data }))
34
- });
35
- expect(page.root).toEqualHtml(`
36
- <solution-template-data instanceid="" itemid="" vars-open="">
37
- <div class="solution-data-container">
38
- <calcite-shell class="light var-container" dir="ltr">
39
- <calcite-panel class="json-editor">
40
- <div class="calcite-match-height solution-data-child-container">
41
- <json-editor instanceid="" value=""></json-editor>
42
- </div>
43
- </calcite-panel>
44
- <calcite-shell-panel height-scale="l" position="end" slot="contextual-panel" width-scale="xs">
45
- <div class="solution-data-child-container">
46
- <calcite-button appearance="transparent" class="collapse-btn" icon-start="chevrons-right" id="collapse-vars" scale="s" title="Cancel Edits"></calcite-button>
47
- <div class="org-vars" id="orgVars">
48
- <solution-organization-variables></solution-organization-variables>
49
- </div>
50
- <div class="sol-vars" id="solVars">
51
- <solution-variables></solution-variables>
52
- </div>
53
- </div>
54
- </calcite-shell-panel>
55
- </calcite-shell>
56
- </div>
57
- </solution-template-data>
58
- `);
59
- });
60
- });
@@ -1,36 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- // import { newE2EPage } from '@stencil/core/testing';
22
- describe('solution-variables', () => {
23
- it('renders', async () => {
24
- //TEST commented out for now.
25
- // need to work out how we pass translations
26
- // e2e tests don't seem to support a similar apporach to the unit tests where we can use template to load JSX
27
- // could flatten the translations further so it would contain no sub groups
28
- // could set default translations for each file
29
- // and could still have a test to compare the default with the actual as a way to verify
30
- expect("a").toEqual("a");
31
- // const page = await newE2EPage();
32
- // await page.setContent('<solution-variables></solution-variables>');
33
- // const element = await page.find('solution-variables');
34
- // expect(element).toHaveClass('hydrated');
35
- });
36
- });
@@ -1,131 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { SolutionVariables } from "../solution-variables";
23
- import { value } from "../../../demos/data/solution-variables-data.json";
24
- import { h } from "@stencil/core";
25
- xdescribe('solution-variables', () => {
26
- it('renders', async () => {
27
- const page = await newSpecPage({
28
- components: [SolutionVariables],
29
- template: () => (h("solution-variables", { value: JSON.stringify(value) }))
30
- });
31
- expect(page.root).toEqualHtml(`
32
- <solution-variables>
33
- <mock:shadow-root>
34
- <div>
35
- <h4 class="org-var-header">
36
- Solution Variables
37
- </h4>
38
- </div>
39
- <div class="container-border">
40
- <calcite-label id="variable-label">
41
- <calcite-tree-item>
42
- <solution-item-icon></solution-item-icon>
43
- <span class="icon-text" title="Dashboard 1">
44
- Dashboard 1
45
- </span>
46
- <calcite-tree slot="children">
47
- <calcite-tree-item>
48
- Item Id
49
- </calcite-tree-item>
50
- <calcite-tree-item>
51
- Url
52
- </calcite-tree-item>
53
- </calcite-tree>
54
- </calcite-tree-item>
55
- <calcite-tree-item>
56
- <solution-item-icon></solution-item-icon>
57
- <span class="icon-text" title="Dashboard 2">
58
- Dashboard 2
59
- </span>
60
- <calcite-tree slot="children">
61
- <calcite-tree-item>
62
- Item Id
63
- </calcite-tree-item>
64
- <calcite-tree-item>
65
- Url
66
- </calcite-tree-item>
67
- </calcite-tree>
68
- </calcite-tree-item>
69
- <calcite-tree-item>
70
- <solution-item-icon></solution-item-icon>
71
- <span class="icon-text" title="Feature Service 1">
72
- Feature Service 1
73
- </span>
74
- <calcite-tree slot="children">
75
- <calcite-tree-item>
76
- Item Id
77
- </calcite-tree-item>
78
- <calcite-tree-item>
79
- Url
80
- </calcite-tree-item>
81
- <calcite-tree-item>
82
- Name
83
- </calcite-tree-item>
84
- <calcite-tree-item>
85
- <solution-item-icon></solution-item-icon>
86
- <span class="icon-text" title="Layer 0">
87
- Layer 0
88
- </span>
89
- <calcite-tree slot="children">
90
- <calcite-tree-item>
91
- Id
92
- </calcite-tree-item>
93
- <calcite-tree-item>
94
- Url
95
- </calcite-tree-item>
96
- </calcite-tree>
97
- </calcite-tree-item>
98
- <calcite-tree-item>
99
- <solution-item-icon></solution-item-icon>
100
- <span class="icon-text" title="Layer 1">
101
- Layer 1
102
- </span>
103
- <calcite-tree slot="children">
104
- <calcite-tree-item>
105
- Id
106
- </calcite-tree-item>
107
- <calcite-tree-item>
108
- Url
109
- </calcite-tree-item>
110
- </calcite-tree>
111
- </calcite-tree-item>
112
- </calcite-tree>
113
- </calcite-tree-item>
114
- <calcite-tree-item>
115
- <solution-item-icon></solution-item-icon>
116
- <span class="icon-text" title="Group 1">
117
- Group 1
118
- </span>
119
- <calcite-tree slot="children">
120
- <calcite-tree-item>
121
- Group Id
122
- </calcite-tree-item>
123
- </calcite-tree>
124
- </calcite-tree-item>
125
- </calcite-label>
126
- </div>
127
- </mock:shadow-root>
128
- </solution-variables>
129
- `);
130
- });
131
- });
@@ -1,132 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c7de2486.js';
7
- import { t as toAriaBoolean } from './dom-ae3d8818.js';
8
- import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-65431957.js';
9
- import { g as guid } from './guid-d34fe102.js';
10
- import { c as connectInteractive, d as disconnectInteractive, u as updateHostInteraction } from './interactive-22a66feb.js';
11
- import { i as isActivationKey } from './key-554ad3f4.js';
12
- import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-7187f15b.js';
13
- import { c as componentFocusable, s as setUpLoadableComponent, a as setComponentLoaded } from './loadable-d0274dee.js';
14
- import './resources-4d5cdf35.js';
15
- import './browser-2ab8d297.js';
16
-
17
- const checkboxCss = ":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-checkbox-size:0.75rem}:host([scale=m]){--calcite-checkbox-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-checkbox-size:1rem}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg,:host .toggle{inline-size:var(--calcite-checkbox-size);block-size:var(--calcite-checkbox-size)}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-ui-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);color:var(--calcite-ui-background)}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.toggle{outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}";
18
-
19
- const Checkbox = class {
20
- constructor(hostRef) {
21
- registerInstance(this, hostRef);
22
- this.calciteInternalCheckboxBlur = createEvent(this, "calciteInternalCheckboxBlur", 6);
23
- this.calciteCheckboxChange = createEvent(this, "calciteCheckboxChange", 6);
24
- this.calciteInternalCheckboxFocus = createEvent(this, "calciteInternalCheckboxFocus", 6);
25
- this.checkedPath = "M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z";
26
- this.indeterminatePath = "M13 8v1H3V8z";
27
- this.getPath = () => this.indeterminate ? this.indeterminatePath : this.checked ? this.checkedPath : "";
28
- this.toggle = () => {
29
- if (!this.disabled) {
30
- this.checked = !this.checked;
31
- this.setFocus();
32
- this.indeterminate = false;
33
- this.calciteCheckboxChange.emit();
34
- }
35
- };
36
- this.keyDownHandler = (event) => {
37
- if (isActivationKey(event.key)) {
38
- this.toggle();
39
- event.preventDefault();
40
- }
41
- };
42
- this.clickHandler = () => {
43
- if (this.disabled) {
44
- return;
45
- }
46
- this.toggle();
47
- };
48
- //--------------------------------------------------------------------------
49
- //
50
- // Event Listeners
51
- //
52
- //--------------------------------------------------------------------------
53
- this.onToggleBlur = () => {
54
- this.calciteInternalCheckboxBlur.emit(false);
55
- };
56
- this.onToggleFocus = () => {
57
- this.calciteInternalCheckboxFocus.emit(true);
58
- };
59
- this.onLabelClick = () => {
60
- this.toggle();
61
- };
62
- this.checked = false;
63
- this.disabled = false;
64
- this.form = undefined;
65
- this.guid = undefined;
66
- this.hovered = false;
67
- this.indeterminate = false;
68
- this.label = undefined;
69
- this.name = undefined;
70
- this.required = false;
71
- this.scale = "m";
72
- this.value = undefined;
73
- }
74
- //--------------------------------------------------------------------------
75
- //
76
- // Public Methods
77
- //
78
- //--------------------------------------------------------------------------
79
- /** Sets focus on the component. */
80
- async setFocus() {
81
- var _a;
82
- await componentFocusable(this);
83
- (_a = this.toggleEl) === null || _a === void 0 ? void 0 : _a.focus();
84
- }
85
- //--------------------------------------------------------------------------
86
- //
87
- // Private Methods
88
- //
89
- //--------------------------------------------------------------------------
90
- syncHiddenFormInput(input) {
91
- input.type = "checkbox";
92
- }
93
- //--------------------------------------------------------------------------
94
- //
95
- // Lifecycle
96
- //
97
- //--------------------------------------------------------------------------
98
- connectedCallback() {
99
- this.guid = this.el.id || `calcite-checkbox-${guid()}`;
100
- connectInteractive(this);
101
- connectLabel(this);
102
- connectForm(this);
103
- }
104
- disconnectedCallback() {
105
- disconnectInteractive(this);
106
- disconnectLabel(this);
107
- disconnectForm(this);
108
- }
109
- componentWillLoad() {
110
- setUpLoadableComponent(this);
111
- }
112
- componentDidLoad() {
113
- setComponentLoaded(this);
114
- }
115
- componentDidRender() {
116
- updateHostInteraction(this);
117
- }
118
- // --------------------------------------------------------------------------
119
- //
120
- // Render Methods
121
- //
122
- // --------------------------------------------------------------------------
123
- render() {
124
- return (h(Host, { onClick: this.clickHandler, onKeyDown: this.keyDownHandler }, h("div", { "aria-checked": toAriaBoolean(this.checked), "aria-label": getLabelText(this), class: "toggle", onBlur: this.onToggleBlur, onFocus: this.onToggleFocus, role: "checkbox", tabIndex: this.disabled ? undefined : 0,
125
- // eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
126
- ref: (toggleEl) => (this.toggleEl = toggleEl) }, h("svg", { "aria-hidden": "true", class: "check-svg", viewBox: "0 0 16 16" }, h("path", { d: this.getPath() })), h("slot", null)), h(HiddenFormInputSlot, { component: this })));
127
- }
128
- get el() { return getElement(this); }
129
- };
130
- Checkbox.style = checkboxCss;
131
-
132
- export { Checkbox as calcite_checkbox };