@esri/solutions-components 0.5.3 → 0.5.4

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 (116) hide show
  1. package/dist/cjs/calcite-input-text_5.cjs.entry.js +36 -36
  2. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
  3. package/dist/cjs/solution-configuration.cjs.entry.js +1 -1
  4. package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
  5. package/dist/cjs/{solution-store-70002b57.js → solution-store-ca4639d5.js} +3 -3
  6. package/dist/collection/components/add-record-modal/test/add-record-modal.e2e.js +24 -0
  7. package/dist/collection/components/add-record-modal/test/add-record-modal.spec.js +32 -0
  8. package/dist/collection/components/buffer-tools/test/buffer-tools.e2e.js +24 -0
  9. package/dist/collection/components/buffer-tools/test/buffer-tools.spec.js +157 -0
  10. package/dist/collection/components/card-manager/test/card-manager.e2e.js +24 -0
  11. package/dist/collection/components/card-manager/test/card-manager.spec.js +32 -0
  12. package/dist/collection/components/comment-card/test/comment-card.e2e.js +24 -0
  13. package/dist/collection/components/comment-card/test/comment-card.spec.js +32 -0
  14. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.e2e.js +24 -0
  15. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.spec.js +32 -0
  16. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.e2e.js +24 -0
  17. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.spec.js +32 -0
  18. package/dist/collection/components/deduct-calculator/test/deduct-calculator.e2e.js +24 -0
  19. package/dist/collection/components/deduct-calculator/test/deduct-calculator.spec.js +32 -0
  20. package/dist/collection/components/edit-record-modal/test/edit-record-modal.e2e.js +24 -0
  21. package/dist/collection/components/edit-record-modal/test/edit-record-modal.spec.js +32 -0
  22. package/dist/collection/components/info-card/test/info-card.e2e.js +24 -0
  23. package/dist/collection/components/info-card/test/info-card.spec.js +32 -0
  24. package/dist/collection/components/json-editor/test/json-editor.e2e.js +31 -0
  25. package/dist/collection/components/json-editor/test/json-editor.spec.js +60 -0
  26. package/dist/collection/components/layer-table/test/layer-table.e2e.js +24 -0
  27. package/dist/collection/components/layer-table/test/layer-table.spec.js +32 -0
  28. package/dist/collection/components/list-item/test/list-item.e2e.js +24 -0
  29. package/dist/collection/components/list-item/test/list-item.spec.js +32 -0
  30. package/dist/collection/components/map-card/test/map-card.e2e.js +24 -0
  31. package/dist/collection/components/map-card/test/map-card.spec.js +32 -0
  32. package/dist/collection/components/map-draw-tools/test/map-draw-tools.e2e.js +24 -0
  33. package/dist/collection/components/map-draw-tools/test/map-draw-tools.spec.js +32 -0
  34. package/dist/collection/components/map-layer-picker/test/map-layer-picker.e2e.js +24 -0
  35. package/dist/collection/components/map-layer-picker/test/map-layer-picker.spec.js +109 -0
  36. package/dist/collection/components/map-search/test/map-search.e2e.js +24 -0
  37. package/dist/collection/components/map-search/test/map-search.spec.js +53 -0
  38. package/dist/collection/components/map-select-tools/map-select-tools.js +36 -36
  39. package/dist/collection/components/map-select-tools/test/map-select-tools.e2e.js +24 -0
  40. package/dist/collection/components/map-select-tools/test/map-select-tools.spec.js +349 -0
  41. package/dist/collection/components/media-card/test/media-card.e2e.js +24 -0
  42. package/dist/collection/components/media-card/test/media-card.spec.js +32 -0
  43. package/dist/collection/components/pci-calculator/test/pci-calculator.e2e.js +24 -0
  44. package/dist/collection/components/pci-calculator/test/pci-calculator.spec.js +32 -0
  45. package/dist/collection/components/pdf-download/test/pdf-download.e2e.js +71 -0
  46. package/dist/collection/components/pdf-download/test/pdf-download.spec.js +104 -0
  47. package/dist/collection/components/public-notification/test/public-notification.e2e.js +95 -0
  48. package/dist/collection/components/public-notification/test/public-notification.spec.js +149 -0
  49. package/dist/collection/components/refine-selection/refine-selection.css +85 -85
  50. package/dist/collection/components/solution-configuration/test/solution-configuration.e2e.js +31 -0
  51. package/dist/collection/components/solution-configuration/test/solution-configuration.spec.js +114 -0
  52. package/dist/collection/components/solution-contents/test/solution-contents.e2e.js +89 -0
  53. package/dist/collection/components/solution-contents/test/solution-contents.spec.js +138 -0
  54. package/dist/collection/components/solution-item/test/solution-item.e2e.js +31 -0
  55. package/dist/collection/components/solution-item/test/solution-item.spec.js +72 -0
  56. package/dist/collection/components/solution-item-details/test/solution-item-details.e2e.js +31 -0
  57. package/dist/collection/components/solution-item-details/test/solution-item-details.spec.js +137 -0
  58. package/dist/collection/components/solution-item-icon/test/solution-item-icon.e2e.js +24 -0
  59. package/dist/collection/components/solution-item-icon/test/solution-item-icon.spec.js +34 -0
  60. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.e2e.js +31 -0
  61. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.spec.js +49 -0
  62. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.e2e.js +31 -0
  63. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.spec.js +60 -0
  64. package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js +31 -0
  65. package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js +50 -0
  66. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.e2e.js +31 -0
  67. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +170 -0
  68. package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js +31 -0
  69. package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js +55 -0
  70. package/dist/collection/components/solution-variables/test/solution-variables.e2e.js +31 -0
  71. package/dist/collection/components/solution-variables/test/solution-variables.spec.js +126 -0
  72. package/dist/collection/utils/publicNotificationUtils.js +45 -0
  73. package/dist/collection/utils/templates.e2e.js +25 -0
  74. package/dist/collection/utils/test/csvUtils.spec.js +46 -0
  75. package/dist/collection/utils/test/downloadUtils.spec.js +102 -0
  76. package/dist/collection/utils/test/pciUtils.spec.js +297 -0
  77. package/dist/collection/utils/test/solution-store.spec.js +439 -0
  78. package/dist/components/map-select-tools2.js +36 -36
  79. package/dist/components/solution-store.js +3 -3
  80. package/dist/esm/calcite-input-text_5.entry.js +36 -36
  81. package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
  82. package/dist/esm/solution-configuration.entry.js +1 -1
  83. package/dist/esm/solution-contents_3.entry.js +1 -1
  84. package/dist/esm/{solution-store-5d068b07.js → solution-store-70f874f8.js} +3 -3
  85. package/dist/solutions-components/{p-41802f6b.entry.js → p-16dfb254.entry.js} +1 -1
  86. package/dist/solutions-components/{p-4769a2a5.entry.js → p-5ed755a2.entry.js} +1 -1
  87. package/dist/solutions-components/{p-826a814d.js → p-78719506.js} +2 -2
  88. package/dist/solutions-components/{p-9f620303.entry.js → p-b4b19fd3.entry.js} +1 -1
  89. package/dist/solutions-components/{p-24fe6e1c.entry.js → p-d5d5942d.entry.js} +1 -1
  90. package/dist/solutions-components/solutions-components.esm.js +1 -1
  91. package/dist/solutions-components/utils/common.js +291 -0
  92. package/dist/solutions-components/utils/csvDownload.js +36 -0
  93. package/dist/solutions-components/utils/csvUtils.js +32 -0
  94. package/dist/solutions-components/utils/downloadUtils.js +386 -0
  95. package/dist/solutions-components/utils/interfaces.js +56 -0
  96. package/dist/solutions-components/utils/languageUtil.js +85 -0
  97. package/dist/solutions-components/utils/loadModules.js +20 -0
  98. package/dist/solutions-components/utils/locale.js +56 -0
  99. package/dist/solutions-components/utils/mapViewUtils.js +140 -0
  100. package/dist/solutions-components/utils/pciUtils.js +837 -0
  101. package/dist/solutions-components/utils/pdfUtils.js +62 -0
  102. package/dist/solutions-components/utils/publicNotificationStore.js +38 -0
  103. package/dist/solutions-components/utils/publicNotificationUtils.js +45 -0
  104. package/dist/solutions-components/utils/queryUtils.js +148 -0
  105. package/dist/solutions-components/utils/solution-store.js +579 -0
  106. package/dist/solutions-components/utils/templates.e2e.js +25 -0
  107. package/dist/solutions-components/utils/templates.js +341 -0
  108. package/dist/solutions-components/utils/test/csvUtils.spec.js +46 -0
  109. package/dist/solutions-components/utils/test/downloadUtils.spec.js +102 -0
  110. package/dist/solutions-components/utils/test/mocks/jsApi.js +74 -0
  111. package/dist/solutions-components/utils/test/pciUtils.spec.js +297 -0
  112. package/dist/solutions-components/utils/test/solution-store.spec.js +439 -0
  113. package/dist/solutions-components/utils/test/testUtils.js +135 -0
  114. package/dist/solutions-components/utils/types.js +14 -0
  115. package/dist/solutions-components_commit.txt +7 -0
  116. package/package.json +7 -7
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { DeductCalculator } from '../deduct-calculator';
18
+ xdescribe('pci-calculator', () => {
19
+ it('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [DeductCalculator],
22
+ html: `<deduct-calculator></deduct-calculator>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <deduct-calculator>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </deduct-calculator>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('edit-record-modal', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<edit-record-modal></edit-record-modal>');
21
+ const element = await page.find('edit-record-modal');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { EditRecordModal } from '../edit-record-modal';
18
+ xdescribe('edit-record-modal', () => {
19
+ it('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [EditRecordModal],
22
+ html: `<edit-record-modal></edit-record-modal>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <edit-record-modal>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </edit-record-modal>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('info-card', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<info-card></info-card>');
21
+ const element = await page.find('info-card');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { InfoCard } from '../info-card';
18
+ xdescribe('info-card', () => {
19
+ it('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [InfoCard],
22
+ html: `<info-card></info-card>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <info-card>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </info-card>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,31 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ //import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('json-editor', () => {
18
+ it('renders', async () => {
19
+ //TEST commented out for now.
20
+ // need to work out how we pass translations
21
+ // e2e tests don't seem to support a similar apporach to the unit tests where we can use template to load JSX
22
+ // could flatten the translations further so it would contain no sub groups
23
+ // could set default translations for each file
24
+ // and could still have a test to compare the default with the actual as a way to verify
25
+ // const page = await newE2EPage();
26
+ // await page.setContent('<json-editor></json-editor>');
27
+ // const element = await page.find('json-editor');
28
+ // expect(element).toHaveClass('hydrated');
29
+ expect("Nothing").toEqual("Nothing");
30
+ });
31
+ });
@@ -0,0 +1,60 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { JsonEditor } from '../json-editor';
18
+ import { h } from '@stencil/core';
19
+ // Mock MutationObserver because Jest environment doesn't have it
20
+ const mutationObserverMock = jest.fn(function MutationObserver() {
21
+ this.observe = jest.fn();
22
+ });
23
+ global.MutationObserver = mutationObserverMock;
24
+ xdescribe('json-editor', () => {
25
+ it('renders', async () => {
26
+ const page = await newSpecPage({
27
+ components: [JsonEditor],
28
+ template: () => (h("json-editor", { instanceid: "ABC123", value: "{a:'A'}" }))
29
+ });
30
+ expect(page.root).toEqualHtml(`
31
+ <json-editor class="json-editor-position" instanceid="ABC123" value="{a:'A'}">
32
+ <div class="editor-container padding-right" id="ABC123-editor-container">
33
+ <div class="editor-controls">
34
+ <div class="editor-buttons">
35
+ <calcite-button appearance="solid" class="edit-button" color="blue" id="ABC123-undo" scale="s" title="Undo">
36
+ <calcite-icon icon="undo" scale="s"></calcite-icon>
37
+ </calcite-button>
38
+ <calcite-button appearance="solid" class="edit-button" color="blue" id="ABC123-redo" scale="s" title="Redo">
39
+ <calcite-icon icon="redo" scale="s"></calcite-icon>
40
+ </calcite-button>
41
+ <calcite-button appearance="solid" class="edit-button" color="blue" id="ABC123-diff" scale="s" title="Toggle Diff Editor">
42
+ <calcite-icon icon="compare" scale="s"></calcite-icon>
43
+ </calcite-button>
44
+ <calcite-button appearance="outline" class="edit-button" color="blue" id="ABC123-search" scale="s" title="Search">
45
+ <calcite-icon icon="search" scale="s"></calcite-icon>
46
+ </calcite-button>
47
+ <calcite-button appearance="solid" class="edit-button" color="blue" disabled="" id="ABC123-reset" scale="s" title="Cancel Edits">
48
+ <calcite-icon icon="reset" scale="s"></calcite-icon>
49
+ </calcite-button>
50
+ </div>
51
+ </div>
52
+ <div class="edit-parent">
53
+ <div class="json-edit-container" id="ABC123-container"></div>
54
+ <div class="json-edit-container display-none" id="ABC123-diff-container"></div>
55
+ </div>
56
+ </div>
57
+ </json-editor>
58
+ `);
59
+ });
60
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('layer-table', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<layer-table></layer-table>');
21
+ const element = await page.find('layer-table');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { LayerTable } from '../layer-table';
18
+ xdescribe('layer-table', () => {
19
+ it('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [LayerTable],
22
+ html: `<layer-table></layer-table>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <layer-table>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </layer-table>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('list-item', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<list-item></list-item>');
21
+ const element = await page.find('list-item');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { ListItem } from '../list-item';
18
+ xdescribe('list-item', () => {
19
+ it('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [ListItem],
22
+ html: `<list-item></list-item>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <list-item>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </list-item>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('map-card', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<map-card></map-card>');
21
+ const element = await page.find('map-card');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { MapCard } from '../map-card';
18
+ xdescribe('map-card', () => {
19
+ it('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [MapCard],
22
+ html: `<map-card></map-card>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <map-card>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </map-card>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('map-draw-tools', () => {
18
+ xit('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<map-draw-tools></map-draw-tools>');
21
+ const element = await page.find('map-draw-tools');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,32 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newSpecPage } from '@stencil/core/testing';
17
+ import { MapDrawTools } from '../map-draw-tools';
18
+ xdescribe('map-draw-tools', () => {
19
+ xit('renders', async () => {
20
+ const page = await newSpecPage({
21
+ components: [MapDrawTools],
22
+ html: `<map-draw-tools></map-draw-tools>`,
23
+ });
24
+ expect(page.root).toEqualHtml(`
25
+ <map-draw-tools>
26
+ <mock:shadow-root>
27
+ <slot></slot>
28
+ </mock:shadow-root>
29
+ </map-draw-tools>
30
+ `);
31
+ });
32
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('map-layer-picker', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<map-layer-picker></map-layer-picker>');
21
+ const element = await page.find('map-layer-picker');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });
@@ -0,0 +1,109 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { h } from '@stencil/core';
17
+ import { newSpecPage } from '@stencil/core/testing';
18
+ import { MapLayerPicker } from '../map-layer-picker';
19
+ import * as mapViewUtils from "../../../utils/mapViewUtils";
20
+ let mapView;
21
+ beforeEach(() => {
22
+ jest.spyOn(mapViewUtils, "getMapLayerNames").mockImplementation(() => [
23
+ "A", "B"
24
+ ]);
25
+ mapView = {
26
+ map: {
27
+ layers: {
28
+ add: () => { },
29
+ getItemAt: () => { return -1; },
30
+ findIndex: () => { return -1; }
31
+ }
32
+ }
33
+ };
34
+ });
35
+ xdescribe('map-layer-picker', () => {
36
+ it('renders single selection mode', async () => {
37
+ const page = await newSpecPage({
38
+ autoApplyChanges: true,
39
+ components: [MapLayerPicker],
40
+ template: () => (h("map-layer-picker", { mapView: mapView })),
41
+ });
42
+ expect(page.root).toEqualHtml(`
43
+ <map-layer-picker selection-mode="single">
44
+ <div class="map-layer-picker-container">
45
+ <div class="map-layer-picker">
46
+ <calcite-select label="">
47
+ <calcite-option label="A" value="A"></calcite-option>
48
+ <calcite-option label="B" value="B"></calcite-option>
49
+ </calcite-select>
50
+ </div>
51
+ </div>
52
+ </map-layer-picker>
53
+ `);
54
+ jest.spyOn(mapViewUtils, "getMapLayerNames").mockImplementation(() => [
55
+ "A", "B", "C"
56
+ ]);
57
+ page.root.mapView = Object.assign({}, mapView);
58
+ expect(page.root).toEqualHtml(`
59
+ <map-layer-picker selection-mode="single">
60
+ <div class="map-layer-picker-container">
61
+ <div class="map-layer-picker">
62
+ <calcite-select label="">
63
+ <calcite-option label="A" value="A"></calcite-option>
64
+ <calcite-option label="B" value="B"></calcite-option>
65
+ </calcite-select>
66
+ </div>
67
+ </div>
68
+ </map-layer-picker>
69
+ `);
70
+ });
71
+ it('renders single selection mode with selectedLayers', async () => {
72
+ const page = await newSpecPage({
73
+ autoApplyChanges: true,
74
+ components: [MapLayerPicker],
75
+ template: () => (h("map-layer-picker", { mapView: mapView, selectedLayers: ["B"] })),
76
+ });
77
+ expect(page.root).toEqualHtml(`
78
+ <map-layer-picker selection-mode="single">
79
+ <div class="map-layer-picker-container">
80
+ <div class="map-layer-picker">
81
+ <calcite-select label="">
82
+ <calcite-option label="A" value="A"></calcite-option>
83
+ <calcite-option label="B" selected="" value="B"></calcite-option>
84
+ </calcite-select>
85
+ </div>
86
+ </div>
87
+ </map-layer-picker>
88
+ `);
89
+ });
90
+ it('renders multi selection mode', async () => {
91
+ const page = await newSpecPage({
92
+ autoApplyChanges: true,
93
+ components: [MapLayerPicker],
94
+ template: () => (h("map-layer-picker", { mapView: mapView, selectedLayers: ["A"], selectionMode: "multi" })),
95
+ });
96
+ expect(page.root).toEqualHtml(`
97
+ <map-layer-picker selection-mode="multi">
98
+ <div class="map-layer-picker-container">
99
+ <div class="map-layer-picker">
100
+ <calcite-combobox label="" selection-mode="multi">
101
+ <calcite-combobox-item selected="" textlabel="A" value="A"></calcite-combobox-item>
102
+ <calcite-combobox-item textlabel="B" value="B"></calcite-combobox-item>
103
+ </calcite-combobox>
104
+ </div>
105
+ </div>
106
+ </map-layer-picker>
107
+ `);
108
+ });
109
+ });
@@ -0,0 +1,24 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { newE2EPage } from '@stencil/core/testing';
17
+ xdescribe('map-search', () => {
18
+ it('renders', async () => {
19
+ const page = await newE2EPage();
20
+ await page.setContent('<map-search></map-search>');
21
+ const element = await page.find('map-search');
22
+ expect(element).toHaveClass('hydrated');
23
+ });
24
+ });