@esri/solutions-components 0.6.16 → 0.6.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) 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-combobox_6.cjs.entry.js +1 -1
  15. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +4 -3
  16. package/dist/cjs/card-manager_3.cjs.entry.js +10 -7
  17. package/dist/{collection/components/basemap-gallery/test/basemap-gallery.e2e.js → cjs/common-13719149.js} +17 -9
  18. package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -7
  19. package/dist/cjs/{downloadUtils-34a515ad.js → downloadUtils-121fd7ff.js} +2 -2
  20. package/dist/cjs/edit-card_2.cjs.entry.js +4 -3
  21. package/dist/cjs/{index.es-0ba11065.js → index.es-5c0c137a.js} +2 -2
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  24. package/dist/cjs/{mapViewUtils-a2884698.js → mapViewUtils-786a219b.js} +32 -19
  25. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  26. package/dist/cjs/solution-configuration.cjs.entry.js +2 -1
  27. package/dist/cjs/solution-contents_3.cjs.entry.js +21 -21256
  28. package/dist/cjs/solution-item-icon.cjs.entry.js +327 -0
  29. package/dist/cjs/{solution-store-c443e657.js → solution-resource-f9e3b289.js} +2 -1698
  30. package/dist/cjs/solution-store-2414dd8a.js +1707 -0
  31. package/dist/cjs/solutions-components.cjs.js +1 -1
  32. package/dist/cjs/spatial-ref.cjs.entry.js +21293 -0
  33. package/dist/collection/collection-manifest.json +2 -0
  34. package/dist/collection/components/card-manager/card-manager.js +1 -1
  35. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +17 -2
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +47 -6
  37. package/dist/collection/components/edit-card/edit-card.css +0 -8
  38. package/dist/collection/components/floor-filter/floor-filter.css +19 -0
  39. package/dist/collection/components/floor-filter/floor-filter.js +163 -0
  40. package/dist/collection/components/info-card/info-card.js +3 -2
  41. package/dist/collection/components/layer-table/layer-table.css +8 -0
  42. package/dist/collection/components/layer-table/layer-table.js +18 -2
  43. package/dist/collection/components/map-card/map-card.js +19 -1
  44. package/dist/collection/components/map-picker/map-picker.css +0 -4
  45. package/dist/collection/components/map-picker/map-picker.js +1 -1
  46. package/dist/collection/components/map-tools/map-tools.js +54 -1
  47. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +1 -7
  48. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +37 -291
  49. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.e2e.js +24 -12
  50. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +32 -128
  51. package/dist/collection/components/spatial-ref/spatial-ref.css +20 -0
  52. package/dist/collection/components/spatial-ref/spatial-ref.js +445 -0
  53. package/dist/collection/components/spatial-ref/test/spatial-ref.e2e.js +71 -0
  54. package/dist/collection/components/spatial-ref/test/spatial-ref.spec.js +158 -0
  55. package/dist/collection/demos/crowdsource-manager.html +4 -0
  56. package/dist/collection/demos/solution-spatial-ref.html +9 -16
  57. package/dist/collection/demos/spatial-ref.html +53 -0
  58. package/dist/collection/utils/mapViewUtils.js +32 -19
  59. package/dist/collection/utils/mapViewUtils.ts +43 -20
  60. package/dist/collection/utils/{templates.e2e.js → test/templates.e2e.js} +2 -2
  61. package/dist/collection/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
  62. package/dist/components/card-manager2.js +1 -1
  63. package/dist/components/crowdsource-manager.js +86 -73
  64. package/dist/components/edit-card2.js +1 -1
  65. package/dist/components/floor-filter.d.ts +11 -0
  66. package/dist/components/floor-filter.js +11 -0
  67. package/dist/components/floor-filter2.js +115 -0
  68. package/dist/components/info-card2.js +3 -2
  69. package/dist/components/layer-table2.js +5 -3
  70. package/dist/components/map-card2.js +45 -37
  71. package/dist/components/map-picker2.js +2 -2
  72. package/dist/components/map-tools2.js +52 -11
  73. package/dist/components/mapViewUtils.js +32 -19
  74. package/dist/components/solution-configuration.js +79 -72
  75. package/dist/components/solution-resource-item2.js +2 -1
  76. package/dist/components/solution-resource.js +1836 -0
  77. package/dist/components/solution-spatial-ref2.js +41 -21277
  78. package/dist/components/solution-store.js +2 -1830
  79. package/dist/components/spatial-ref.d.ts +11 -0
  80. package/dist/components/spatial-ref.js +11 -0
  81. package/dist/components/spatial-ref2.js +21374 -0
  82. package/dist/esm/{basemap-gallery_6.entry.js → basemap-gallery_7.entry.js} +124 -4
  83. package/dist/esm/{calcite-tree_3.entry.js → calcite-checkbox_3.entry.js} +125 -321
  84. package/dist/esm/calcite-combobox_6.entry.js +1 -1
  85. package/dist/esm/calcite-shell-panel_14.entry.js +2 -1
  86. package/dist/esm/card-manager_3.entry.js +10 -7
  87. package/dist/{collection/components/layer-table/test/layer-table.e2e.js → esm/common-e4a8e353.js} +15 -9
  88. package/dist/esm/crowdsource-manager.entry.js +12 -7
  89. package/dist/esm/{downloadUtils-ac67a786.js → downloadUtils-287994b1.js} +2 -2
  90. package/dist/esm/edit-card_2.entry.js +4 -3
  91. package/dist/esm/{index.es-f553598f.js → index.es-a3f8409f.js} +2 -2
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/map-select-tools_3.entry.js +2 -2
  94. package/dist/esm/{mapViewUtils-8141d8c1.js → mapViewUtils-8bfabd80.js} +32 -19
  95. package/dist/esm/public-notification.entry.js +2 -2
  96. package/dist/esm/solution-configuration.entry.js +2 -1
  97. package/dist/esm/solution-contents_3.entry.js +20 -21255
  98. package/dist/esm/solution-item-icon.entry.js +323 -0
  99. package/dist/esm/{solution-store-b29d50f7.js → solution-resource-be35d35b.js} +1 -1697
  100. package/dist/esm/solution-store-e734626a.js +1704 -0
  101. package/dist/esm/solutions-components.js +1 -1
  102. package/dist/esm/spatial-ref.entry.js +21289 -0
  103. package/dist/solutions-components/demos/crowdsource-manager.html +4 -0
  104. package/dist/solutions-components/demos/solution-spatial-ref.html +9 -16
  105. package/dist/solutions-components/demos/spatial-ref.html +53 -0
  106. package/dist/solutions-components/{p-64d29ba2.entry.js → p-0bc27ba7.entry.js} +2 -2
  107. package/dist/{collection/components/map-card/test/map-card.e2e.js → solutions-components/p-1b228f97.js} +2 -10
  108. package/dist/solutions-components/{p-9f11a403.entry.js → p-3c5c1487.entry.js} +1 -1
  109. package/dist/solutions-components/{p-a26711e8.js → p-469c8f8a.js} +1 -1
  110. package/dist/solutions-components/p-53bc5fc1.js +36 -0
  111. package/dist/solutions-components/p-5b8c8942.entry.js +21 -0
  112. package/dist/solutions-components/p-63c6fc29.entry.js +6 -0
  113. package/dist/solutions-components/p-64945b43.entry.js +18 -0
  114. package/dist/solutions-components/{p-c8d0ce92.js → p-698c6a56.js} +2 -2
  115. package/dist/solutions-components/{p-b9d29f30.entry.js → p-734cb206.entry.js} +1 -1
  116. package/dist/solutions-components/p-770bff06.entry.js +6 -0
  117. package/dist/solutions-components/p-7741dbab.entry.js +6 -0
  118. package/dist/solutions-components/p-80465067.entry.js +6 -0
  119. package/dist/solutions-components/p-846df994.entry.js +6 -0
  120. package/dist/solutions-components/p-b3f8d2cb.js +192 -0
  121. package/dist/solutions-components/p-c26d8b36.entry.js +6 -0
  122. package/dist/solutions-components/{p-57cf6784.entry.js → p-d22be647.entry.js} +1 -1
  123. package/dist/solutions-components/{p-4d942b0f.entry.js → p-f35147d5.entry.js} +1 -1
  124. package/dist/solutions-components/p-ff0d7712.js +44 -0
  125. package/dist/solutions-components/solutions-components.esm.js +1 -1
  126. package/dist/solutions-components/utils/mapViewUtils.ts +43 -20
  127. package/dist/solutions-components/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
  128. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
  129. package/dist/types/components/floor-filter/floor-filter.d.ts +61 -0
  130. package/dist/types/components/layer-table/layer-table.d.ts +4 -0
  131. package/dist/types/components/map-card/map-card.d.ts +4 -0
  132. package/dist/types/components/map-tools/map-tools.d.ts +24 -0
  133. package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +11 -93
  134. package/dist/types/components/spatial-ref/spatial-ref.d.ts +142 -0
  135. package/dist/types/components.d.ts +123 -16
  136. package/dist/types/preact.d.ts +8 -1
  137. package/package.json +6 -6
  138. package/dist/cjs/calcite-checkbox.cjs.entry.js +0 -136
  139. package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +0 -37
  140. package/dist/collection/components/buffer-tools/test/buffer-tools.e2e.js +0 -29
  141. package/dist/collection/components/buffer-tools/test/buffer-tools.spec.js +0 -160
  142. package/dist/collection/components/card-manager/test/card-manager.e2e.js +0 -29
  143. package/dist/collection/components/card-manager/test/card-manager.spec.js +0 -37
  144. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.e2e.js +0 -29
  145. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.spec.js +0 -37
  146. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.e2e.js +0 -29
  147. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.spec.js +0 -37
  148. package/dist/collection/components/deduct-calculator/test/deduct-calculator.e2e.js +0 -29
  149. package/dist/collection/components/deduct-calculator/test/deduct-calculator.spec.js +0 -37
  150. package/dist/collection/components/edit-card/test/edit-card.e2e.js +0 -14
  151. package/dist/collection/components/edit-card/test/edit-card.spec.js +0 -22
  152. package/dist/collection/components/info-card/test/info-card.e2e.js +0 -29
  153. package/dist/collection/components/info-card/test/info-card.spec.js +0 -37
  154. package/dist/collection/components/json-editor/test/json-editor.e2e.js +0 -36
  155. package/dist/collection/components/json-editor/test/json-editor.spec.js +0 -65
  156. package/dist/collection/components/layer-table/test/layer-table.spec.js +0 -37
  157. package/dist/collection/components/layout-manager/test/layout-manager.e2e.js +0 -29
  158. package/dist/collection/components/layout-manager/test/layout-manager.spec.js +0 -37
  159. package/dist/collection/components/list-item/test/list-item.e2e.js +0 -29
  160. package/dist/collection/components/list-item/test/list-item.spec.js +0 -37
  161. package/dist/collection/components/map-card/test/map-card.spec.js +0 -37
  162. package/dist/collection/components/map-draw-tools/test/map-draw-tools.e2e.js +0 -29
  163. package/dist/collection/components/map-draw-tools/test/map-draw-tools.spec.js +0 -37
  164. package/dist/collection/components/map-fullscreen/test/map-fullscreen.e2e.js +0 -29
  165. package/dist/collection/components/map-fullscreen/test/map-fullscreen.spec.js +0 -37
  166. package/dist/collection/components/map-layer-picker/test/map-layer-picker.e2e.js +0 -29
  167. package/dist/collection/components/map-layer-picker/test/map-layer-picker.spec.js +0 -114
  168. package/dist/collection/components/map-legend/test/map-legend.e2e.js +0 -14
  169. package/dist/collection/components/map-legend/test/map-legend.spec.js +0 -22
  170. package/dist/collection/components/map-picker/test/map-picker.e2e.js +0 -29
  171. package/dist/collection/components/map-picker/test/map-picker.spec.js +0 -37
  172. package/dist/collection/components/map-search/test/map-search.e2e.js +0 -29
  173. package/dist/collection/components/map-search/test/map-search.spec.js +0 -37
  174. package/dist/collection/components/map-select-tools/test/map-select-tools.e2e.js +0 -29
  175. package/dist/collection/components/map-select-tools/test/map-select-tools.spec.js +0 -366
  176. package/dist/collection/components/map-tools/test/map-tools.e2e.js +0 -29
  177. package/dist/collection/components/map-tools/test/map-tools.spec.js +0 -37
  178. package/dist/collection/components/pci-calculator/test/pci-calculator.e2e.js +0 -29
  179. package/dist/collection/components/pci-calculator/test/pci-calculator.spec.js +0 -37
  180. package/dist/collection/components/pdf-download/test/pdf-download.e2e.js +0 -76
  181. package/dist/collection/components/pdf-download/test/pdf-download.spec.js +0 -107
  182. package/dist/collection/components/public-notification/test/public-notification.spec.js +0 -161
  183. package/dist/collection/components/refine-selection/test/refine-selection.e2e.js +0 -14
  184. package/dist/collection/components/refine-selection/test/refine-selection.spec.js +0 -22
  185. package/dist/collection/components/solution-configuration/test/solution-configuration.e2e.js +0 -36
  186. package/dist/collection/components/solution-configuration/test/solution-configuration.spec.js +0 -119
  187. package/dist/collection/components/solution-contents/test/solution-contents.e2e.js +0 -94
  188. package/dist/collection/components/solution-contents/test/solution-contents.spec.js +0 -143
  189. package/dist/collection/components/solution-item/test/solution-item.e2e.js +0 -36
  190. package/dist/collection/components/solution-item/test/solution-item.spec.js +0 -77
  191. package/dist/collection/components/solution-item-details/test/solution-item-details.e2e.js +0 -36
  192. package/dist/collection/components/solution-item-details/test/solution-item-details.spec.js +0 -142
  193. package/dist/collection/components/solution-item-icon/test/solution-item-icon.e2e.js +0 -29
  194. package/dist/collection/components/solution-item-icon/test/solution-item-icon.spec.js +0 -39
  195. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.e2e.js +0 -36
  196. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.spec.js +0 -54
  197. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.e2e.js +0 -36
  198. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.spec.js +0 -65
  199. package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js +0 -36
  200. package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js +0 -55
  201. package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js +0 -36
  202. package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js +0 -60
  203. package/dist/collection/components/solution-variables/test/solution-variables.e2e.js +0 -36
  204. package/dist/collection/components/solution-variables/test/solution-variables.spec.js +0 -131
  205. package/dist/esm/calcite-checkbox.entry.js +0 -132
  206. package/dist/solutions-components/p-07d7e11f.entry.js +0 -6
  207. package/dist/solutions-components/p-16362eb4.js +0 -36
  208. package/dist/solutions-components/p-17d176b5.js +0 -230
  209. package/dist/solutions-components/p-1d9a5198.entry.js +0 -37
  210. package/dist/solutions-components/p-3707d9bd.entry.js +0 -6
  211. package/dist/solutions-components/p-4dbe8337.entry.js +0 -6
  212. package/dist/solutions-components/p-5ffaaaf4.entry.js +0 -6
  213. package/dist/solutions-components/p-736e76fb.entry.js +0 -17
  214. package/dist/solutions-components/p-99f1a767.entry.js +0 -6
  215. /package/dist/collection/components/{solution-spatial-ref → spatial-ref}/spatialreferences.js +0 -0
  216. /package/dist/types/components/{solution-spatial-ref → spatial-ref}/spatialreferences.d.ts +0 -0
@@ -1,29 +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
- xdescribe('map-tools', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<map-tools></map-tools>');
26
- const element = await page.find('map-tools');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,37 +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 { MapTools } from "../map-tools";
23
- xdescribe('map-tools', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [MapTools],
27
- html: `<map-tools></map-tools>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <map-tools>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </map-tools>
35
- `);
36
- });
37
- });
@@ -1,29 +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
- xdescribe('pci-calculator', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<pci-calculator></pci-calculator>');
26
- const element = await page.find('pci-calculator');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,37 +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 { PciCalculator } from "../pci-calculator";
23
- xdescribe('pci-calculator', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [PciCalculator],
27
- html: `<pci-calculator></pci-calculator>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <pci-calculator>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </pci-calculator>
35
- `);
36
- });
37
- });
@@ -1,76 +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
- import * as locale from "../../../utils/locale";
23
- import * as translations from "../../../assets/t9n/pdf-download/resources.json";
24
- import { LayerView } from "../../../utils/test/mocks/jsApi";
25
- jest.setTimeout(60000);
26
- afterEach(() => {
27
- jest.restoreAllMocks();
28
- });
29
- beforeEach(() => {
30
- jest.spyOn(locale, "getLocaleComponentStrings").mockImplementation(() => [
31
- translations
32
- ]);
33
- });
34
- xdescribe('pdf-download', () => {
35
- it('renders', async (done) => {
36
- const page = await newE2EPage();
37
- await page.setContent('<pdf-download></pdf-download>');
38
- const element = await page.find('pdf-download');
39
- expect(element).toHaveClass('hydrated');
40
- expect(element).toEqualHtml(`
41
- <pdf-download class="hydrated">
42
- <mock:shadow-root>
43
- <calcite-select aria-disabled="true" class="hydrated" disabled="" scale="m" tabindex="-1" width="auto">
44
- <calcite-option class="hydrated" selected="">
45
- 6 per page | 4 x 3-1/3
46
- </calcite-option>
47
- <calcite-option class="hydrated">
48
- 10 per page | 4 x 2
49
- </calcite-option>
50
- <calcite-option class="hydrated">
51
- 14 per page | 4 x 1-1/3
52
- </calcite-option>
53
- <calcite-option class="hydrated">
54
- 20 per page | 4 x 1
55
- </calcite-option>
56
- <calcite-option class="hydrated">
57
- 30 per page | 2-5/8 x 1
58
- </calcite-option>
59
- <calcite-option class="hydrated">
60
- 60 per page | 1-3/4 x 2/3
61
- </calcite-option>
62
- <calcite-option class="hydrated">
63
- 80 per page | 1-3/4 x 1/2
64
- </calcite-option>
65
- </calcite-select>
66
- </mock:shadow-root>
67
- </pdf-download>
68
- `);
69
- const layerView = new LayerView();
70
- await element.setProperty("layerView", layerView);
71
- await page.waitForChanges();
72
- window.alert = jest.fn();
73
- await element.callMethod("downloadPDF", [], true);
74
- done();
75
- });
76
- });
@@ -1,107 +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 { h } from "@stencil/core";
22
- import { newSpecPage } from "@stencil/core/testing";
23
- import * as PdfDownload from "../pdf-download";
24
- import * as locale from "../../../utils/locale";
25
- import * as translations from "../../../assets/t9n/pdf-download/resources.json";
26
- import * as csvUtils from "../../../utils/csvUtils";
27
- jest.setTimeout(30000);
28
- afterEach(() => {
29
- jest.restoreAllMocks();
30
- });
31
- beforeEach(() => {
32
- jest.spyOn(locale, "getLocaleComponentStrings").mockImplementation(() => [
33
- translations
34
- ]);
35
- });
36
- describe('pdf-download', () => {
37
- xit('renders', async () => {
38
- const page = await newSpecPage({
39
- components: [PdfDownload],
40
- template: () => (h("pdf-download", null)),
41
- });
42
- expect(page.root).toEqualHtml(`
43
- <pdf-download>
44
- <mock:shadow-root>
45
- <calcite-select disabled="" label="">
46
- <calcite-option>
47
- 6 per page | 4 x 3-1/3
48
- </calcite-option>
49
- <calcite-option>
50
- 10 per page | 4 x 2
51
- </calcite-option>
52
- <calcite-option>
53
- 14 per page | 4 x 1-1/3
54
- </calcite-option>
55
- <calcite-option>
56
- 20 per page | 4 x 1
57
- </calcite-option>
58
- <calcite-option>
59
- 30 per page | 2-5/8 x 1
60
- </calcite-option>
61
- <calcite-option>
62
- 60 per page | 1-3/4 x 2/3
63
- </calcite-option>
64
- <calcite-option>
65
- 80 per page | 1-3/4 x 1/2
66
- </calcite-option>
67
- </calcite-select>
68
- </mock:shadow-root>
69
- </pdf-download>
70
- `);
71
- });
72
- xit('downloads csv', async () => {
73
- const exportCSVMock = jest.fn();
74
- jest.spyOn(csvUtils, "exportCSV").mockImplementation(exportCSVMock);
75
- const consoleLogMock = jest.fn();
76
- jest.spyOn(console, "log").mockImplementation(consoleLogMock);
77
- const page = await newSpecPage({
78
- components: [PdfDownload],
79
- template: () => (h("pdf-download", null)),
80
- });
81
- await page.root.downloadCSV([], true);
82
- expect(exportCSVMock).toBeCalledTimes(1);
83
- expect(consoleLogMock).toBeCalledTimes(1);
84
- expect(consoleLogMock).toBeCalledWith(true);
85
- await page.root.downloadCSV([], false);
86
- expect(exportCSVMock).toBeCalledTimes(2);
87
- expect(consoleLogMock).toBeCalledTimes(2);
88
- expect(consoleLogMock).toBeCalledWith(false);
89
- });
90
- // it('downloads pdf', async () => {
91
- // const layerView = new LayerView() as unknown as any;
92
- // const page = await newSpecPage({
93
- // components: [PdfDownload],
94
- // template: () => (<pdf-download layerView={layerView}></pdf-download>),
95
- // supportsShadowDom: true,
96
- // autoApplyChanges: true,
97
- // });
98
- // const sel = page.root.shadowRoot.querySelector("calcite-option");
99
- // //.getElementsByTagName("calcite-option");
100
- // sel[0].selected = true;
101
- // //expect(sel.length).toEqual(0);
102
- // const tempAlertMock = jest.fn();
103
- // jest.spyOn(page.win, "alert").mockImplementation(tempAlertMock);
104
- // await page.root.downloadPDF([], true);
105
- // expect(tempAlertMock).toBeCalledTimes(1);
106
- // });
107
- });
@@ -1,161 +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 { h } from "@stencil/core";
22
- import { newSpecPage } from "@stencil/core/testing";
23
- import { PublicNotification } from "../public-notification";
24
- import * as locale from "../../../utils/locale";
25
- import * as translations from "../../../assets/t9n/map-draw-tools/resources.json";
26
- //import * as queryUtils from "../../../utils/queryUtils";
27
- import { EWorkflowType } from "../../../utils/interfaces";
28
- import { LayerView } from "../../../utils/test/mocks/jsApi";
29
- jest.setTimeout(30000);
30
- afterEach(() => {
31
- jest.restoreAllMocks();
32
- });
33
- let mapView;
34
- beforeEach(() => {
35
- jest.spyOn(locale, "getLocaleComponentStrings").mockImplementation(() => [
36
- translations
37
- ]);
38
- jest.spyOn(console, 'warn').mockImplementation(() => { });
39
- mapView = {
40
- map: {
41
- layers: {
42
- add: () => { },
43
- getItemAt: () => { return -1; },
44
- findIndex: () => { return -1; }
45
- }
46
- }
47
- };
48
- });
49
- xdescribe('public-notification', () => {
50
- it('renders', async () => {
51
- //const getSelectionSetQueryMock = jest.fn();
52
- //jest.spyOn(queryUtils, "getSelectionSetQuery").mockImplementation(getSelectionSetQueryMock)
53
- const page = await newSpecPage({
54
- autoApplyChanges: true,
55
- components: [PublicNotification],
56
- template: () => (h("public-notification", { "show-refine-selection": "true" })),
57
- });
58
- //page.rootInstance.showRefineSelection = true;
59
- expect(page.root).toEqualHtml(`
60
- <public-notification show-refine-selection="true">
61
- <calcite-shell>
62
- <calcite-action-bar class="action-bar-size border-bottom-1" expand-disabled="" layout="horizontal" slot="header">
63
- <calcite-action-group class="action-center w-1-4" layout="horizontal">
64
- <calcite-action active="" alignment="center" class="height-full width-full" icon="list-check" id="list-check" text=""></calcite-action>
65
- <calcite-tooltip label="" placement="bottom" reference-element="list-check">
66
- <span></span>
67
- </calcite-tooltip>
68
- </calcite-action-group>
69
- <calcite-action-group class="action-center w-1-4" layout="horizontal">
70
- <calcite-action alignment="center" class="height-full width-full" disabled="" icon="test-data" id="test-data" text=""></calcite-action>
71
- <calcite-tooltip label="" placement="bottom" reference-element="test-data">
72
- <span></span>
73
- </calcite-tooltip>
74
- </calcite-action-group>
75
- <calcite-action-group class="action-center w-1-4" layout="horizontal">
76
- <calcite-action alignment="center" class="height-full width-full" disabled="" icon="file-pdf" id="file-pdf" text=""></calcite-action>
77
- <calcite-tooltip label="" placement="bottom" reference-element="file-pdf">
78
- <span></span>
79
- </calcite-tooltip>
80
- </calcite-action-group>
81
- <calcite-action-group class="action-center w-1-4" layout="horizontal">
82
- <calcite-action alignment="center" class="height-full width-full" disabled="" icon="file-csv" id="file-csv" text=""></calcite-action>
83
- <calcite-tooltip label="" placement="bottom" reference-element="file-csv">
84
- <span></span>
85
- </calcite-tooltip>
86
- </calcite-action-group>
87
- </calcite-action-bar>
88
- <calcite-panel>
89
- <div class="padding-top-sides-1">
90
- <calcite-label class="font-bold"></calcite-label>
91
- </div>
92
- <div class="padding-sides-1">
93
- <calcite-label></calcite-label>
94
- </div>
95
- <div class="info-message padding-bottom-1">
96
- <calcite-input-message active="" class="info-blue" scale="m"></calcite-input-message>
97
- </div>
98
- <calcite-notice active="" class="padding-bottom-1 padding-sides-1" color="green" icon="lightbulb">
99
- <div slot="message"></div>
100
- </calcite-notice>
101
- <div class="display-flex padding-sides-1">
102
- <calcite-label class="font-bold width-full">
103
- <map-layer-picker selectionmode="single"></map-layer-picker>
104
- </calcite-label>
105
- </div>
106
- <div class="display-flex padding-1">
107
- <calcite-button width="full"></calcite-button>
108
- </div>
109
- </calcite-panel>
110
- </calcite-shell>
111
- </public-notification>
112
- `);
113
- });
114
- it('handles selectionSetsWatchHandler', async () => {
115
- //const getSelectionSetQueryMock = jest.fn();
116
- //jest.spyOn(queryUtils, "getSelectionSetQuery").mockImplementation(getSelectionSetQueryMock);
117
- const page = await newSpecPage({
118
- autoApplyChanges: true,
119
- components: [PublicNotification],
120
- template: () => (h("public-notification", { mapView: mapView })),
121
- });
122
- page.win.dispatchEvent(new CustomEvent("selectionSetsChanged", { detail: [] }));
123
- page.win.dispatchEvent(new CustomEvent("selectionSetsChanged", { detail: [{
124
- id: 123456789,
125
- searchResult: undefined,
126
- buffer: {},
127
- distance: 100,
128
- download: true,
129
- unit: "meters",
130
- label: "Sketch 100",
131
- selectedIds: [],
132
- layerView: new LayerView(),
133
- geometries: [],
134
- graphics: [],
135
- selectLayers: [],
136
- workflowType: EWorkflowType.SKETCH,
137
- searchDistanceEnabled: true,
138
- useLayerFeaturesEnabled: true,
139
- refineInfos: undefined,
140
- sketchGraphic: undefined
141
- }] }));
142
- page.win.dispatchEvent(new CustomEvent("selectionSetsChanged", { detail: [{
143
- searchResult: undefined,
144
- buffer: {},
145
- distance: 100,
146
- download: true,
147
- unit: "meters",
148
- label: "Sketch 100",
149
- selectedIds: [],
150
- layerView: new LayerView(),
151
- geometries: [],
152
- graphics: [],
153
- selectLayers: [],
154
- workflowType: EWorkflowType.REFINE,
155
- searchDistanceEnabled: true,
156
- useLayerFeaturesEnabled: true,
157
- refineInfos: undefined,
158
- sketchGraphic: undefined
159
- }] }));
160
- });
161
- });
@@ -1,14 +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 { newE2EPage } from "@stencil/core/testing";
7
- xdescribe('refine-selection', () => {
8
- it('renders', async () => {
9
- const page = await newE2EPage();
10
- await page.setContent('<refine-selection></refine-selection>');
11
- const element = await page.find('refine-selection');
12
- expect(element).toHaveClass('hydrated');
13
- });
14
- });
@@ -1,22 +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 { newSpecPage } from "@stencil/core/testing";
7
- import { RefineSelection } from "../refine-selection";
8
- xdescribe('refine-selection', () => {
9
- it('renders', async () => {
10
- const page = await newSpecPage({
11
- components: [RefineSelection],
12
- html: `<refine-selection></refine-selection>`,
13
- });
14
- expect(page.root).toEqualHtml(`
15
- <refine-selection>
16
- <mock:shadow-root>
17
- <slot></slot>
18
- </mock:shadow-root>
19
- </refine-selection>
20
- `);
21
- });
22
- });
@@ -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-configuration', () => {
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-configuration></solution-configuration>');
33
- // const element = await page.find('solution-configuration');
34
- // expect(element).toHaveClass('hydrated');
35
- });
36
- });
@@ -1,119 +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 { SolutionConfiguration } from "../solution-configuration";
23
- import { h } from "@stencil/core";
24
- import state from "../../../utils/solution-store";
25
- // Mock MutationObserver because Jest environment doesn't have it
26
- const mutationObserverMock = jest.fn(function MutationObserver() {
27
- this.observe = jest.fn();
28
- });
29
- global.MutationObserver = mutationObserverMock;
30
- xdescribe('solution-configuration', () => {
31
- // has to be a better way..
32
- global.MutationObserver = class {
33
- constructor() { }
34
- disconnect() { }
35
- observe() { }
36
- takeRecords() { return []; }
37
- };
38
- beforeEach(() => {
39
- state._testAccess("_emptyTheStore");
40
- });
41
- it('renders', async () => {
42
- state.setStoreInfo("featureServices", [
43
- "Feature Service 1",
44
- "Feature Service 2"
45
- ]);
46
- const page = await newSpecPage({
47
- components: [SolutionConfiguration],
48
- supportsShadowDom: false,
49
- template: () => (h("solution-configuration", null))
50
- });
51
- expect(page.root).toEqualHtml(`
52
- <solution-configuration itemid="">
53
- <div class="configuration-container">
54
- <div class="configuration">
55
- <calcite-tabs class="config-tabs">
56
- <calcite-tab-nav slot="tab-nav">
57
- <calcite-tab-title>Definition</calcite-tab-title>
58
- <calcite-tab-title>Spatial Reference</calcite-tab-title>
59
- </calcite-tab-nav>
60
-
61
- <calcite-tab class="config-tab" active>
62
- <div class="config-solution">
63
-
64
- <div class="config-inventory">
65
- <solution-contents id="configInventory"></solution-contents>
66
- </div>
67
- <calcite-button appearance="transparent" class="collapse-btn" icon-start="chevrons-left" id="collapse-vars" scale="s" title="Cancel Edits"></calcite-button>
68
- <div class="config-item">
69
- <solution-item></solution-item>
70
- </div>
71
-
72
- </div>
73
- </calcite-tab>
74
- <calcite-tab class="config-tab">
75
- <div class="config-solution">
76
- <solution-spatial-ref id="configure-solution-spatial-ref" locked=""></solution-spatial-ref>
77
- </div>
78
- </calcite-tab>
79
- </calcite-tabs>
80
- </div>
81
- </div>
82
- </solution-configuration>
83
- `);
84
- });
85
- it('does not render spatial ref tab when no services are found', async () => {
86
- const page = await newSpecPage({
87
- components: [SolutionConfiguration],
88
- supportsShadowDom: false,
89
- template: () => (h("solution-configuration", null))
90
- });
91
- expect(page.root).toEqualHtml(`
92
- <solution-configuration itemid="">
93
- <div class="configuration-container">
94
- <div class="configuration">
95
- <calcite-tabs class="config-tabs">
96
- <calcite-tab-nav slot="tab-nav">
97
- <calcite-tab-title>Definition</calcite-tab-title>
98
- </calcite-tab-nav>
99
-
100
- <calcite-tab class="config-tab" active>
101
- <div class="config-solution">
102
-
103
- <div class="config-inventory">
104
- <solution-contents id="configInventory"></solution-contents>
105
- </div>
106
- <calcite-button appearance="transparent" class="collapse-btn" icon-start="chevrons-left" id="collapse-vars" scale="s" title="Cancel Edits"></calcite-button>
107
- <div class="config-item">
108
- <solution-item></solution-item>
109
- </div>
110
-
111
- </div>
112
- </calcite-tab>
113
- </calcite-tabs>
114
- </div>
115
- </div>
116
- </solution-configuration>
117
- `);
118
- });
119
- });