@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.
- package/README.md +1 -1
- package/dist/assets/t9n/map-tools/resources.json +2 -1
- package/dist/assets/t9n/map-tools/resources_en.json +2 -1
- package/dist/assets/t9n/solution-spatial-ref/resources.json +0 -1
- package/dist/assets/t9n/solution-spatial-ref/resources_en.json +0 -1
- package/dist/assets/t9n/solution-spatial-ref/resources_fr.json +6 -0
- package/dist/assets/t9n/solution-spatial-ref/resources_he.json +6 -0
- package/dist/assets/t9n/spatial-ref/resources.json +3 -0
- package/dist/assets/t9n/spatial-ref/resources_en.json +3 -0
- package/dist/assets/t9n/spatial-ref/resources_fr.json +3 -0
- package/dist/assets/t9n/spatial-ref/resources_he.json +3 -0
- package/dist/cjs/{basemap-gallery_6.cjs.entry.js → basemap-gallery_7.cjs.entry.js} +124 -3
- package/dist/cjs/{calcite-tree_3.cjs.entry.js → calcite-checkbox_3.cjs.entry.js} +123 -319
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +4 -3
- package/dist/cjs/card-manager_3.cjs.entry.js +10 -7
- package/dist/{collection/components/basemap-gallery/test/basemap-gallery.e2e.js → cjs/common-13719149.js} +17 -9
- package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -7
- package/dist/cjs/{downloadUtils-34a515ad.js → downloadUtils-121fd7ff.js} +2 -2
- package/dist/cjs/edit-card_2.cjs.entry.js +4 -3
- package/dist/cjs/{index.es-0ba11065.js → index.es-5c0c137a.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-a2884698.js → mapViewUtils-786a219b.js} +32 -19
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +21 -21256
- package/dist/cjs/solution-item-icon.cjs.entry.js +327 -0
- package/dist/cjs/{solution-store-c443e657.js → solution-resource-f9e3b289.js} +2 -1698
- package/dist/cjs/solution-store-2414dd8a.js +1707 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +21293 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +17 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +47 -6
- package/dist/collection/components/edit-card/edit-card.css +0 -8
- package/dist/collection/components/floor-filter/floor-filter.css +19 -0
- package/dist/collection/components/floor-filter/floor-filter.js +163 -0
- package/dist/collection/components/info-card/info-card.js +3 -2
- package/dist/collection/components/layer-table/layer-table.css +8 -0
- package/dist/collection/components/layer-table/layer-table.js +18 -2
- package/dist/collection/components/map-card/map-card.js +19 -1
- package/dist/collection/components/map-picker/map-picker.css +0 -4
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/components/map-tools/map-tools.js +54 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +1 -7
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +37 -291
- package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.e2e.js +24 -12
- package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +32 -128
- package/dist/collection/components/spatial-ref/spatial-ref.css +20 -0
- package/dist/collection/components/spatial-ref/spatial-ref.js +445 -0
- package/dist/collection/components/spatial-ref/test/spatial-ref.e2e.js +71 -0
- package/dist/collection/components/spatial-ref/test/spatial-ref.spec.js +158 -0
- package/dist/collection/demos/crowdsource-manager.html +4 -0
- package/dist/collection/demos/solution-spatial-ref.html +9 -16
- package/dist/collection/demos/spatial-ref.html +53 -0
- package/dist/collection/utils/mapViewUtils.js +32 -19
- package/dist/collection/utils/mapViewUtils.ts +43 -20
- package/dist/collection/utils/{templates.e2e.js → test/templates.e2e.js} +2 -2
- package/dist/collection/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/crowdsource-manager.js +86 -73
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/floor-filter.d.ts +11 -0
- package/dist/components/floor-filter.js +11 -0
- package/dist/components/floor-filter2.js +115 -0
- package/dist/components/info-card2.js +3 -2
- package/dist/components/layer-table2.js +5 -3
- package/dist/components/map-card2.js +45 -37
- package/dist/components/map-picker2.js +2 -2
- package/dist/components/map-tools2.js +52 -11
- package/dist/components/mapViewUtils.js +32 -19
- package/dist/components/solution-configuration.js +79 -72
- package/dist/components/solution-resource-item2.js +2 -1
- package/dist/components/solution-resource.js +1836 -0
- package/dist/components/solution-spatial-ref2.js +41 -21277
- package/dist/components/solution-store.js +2 -1830
- package/dist/components/spatial-ref.d.ts +11 -0
- package/dist/components/spatial-ref.js +11 -0
- package/dist/components/spatial-ref2.js +21374 -0
- package/dist/esm/{basemap-gallery_6.entry.js → basemap-gallery_7.entry.js} +124 -4
- package/dist/esm/{calcite-tree_3.entry.js → calcite-checkbox_3.entry.js} +125 -321
- package/dist/esm/calcite-combobox_6.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -1
- package/dist/esm/card-manager_3.entry.js +10 -7
- package/dist/{collection/components/layer-table/test/layer-table.e2e.js → esm/common-e4a8e353.js} +15 -9
- package/dist/esm/crowdsource-manager.entry.js +12 -7
- package/dist/esm/{downloadUtils-ac67a786.js → downloadUtils-287994b1.js} +2 -2
- package/dist/esm/edit-card_2.entry.js +4 -3
- package/dist/esm/{index.es-f553598f.js → index.es-a3f8409f.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-8141d8c1.js → mapViewUtils-8bfabd80.js} +32 -19
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-configuration.entry.js +2 -1
- package/dist/esm/solution-contents_3.entry.js +20 -21255
- package/dist/esm/solution-item-icon.entry.js +323 -0
- package/dist/esm/{solution-store-b29d50f7.js → solution-resource-be35d35b.js} +1 -1697
- package/dist/esm/solution-store-e734626a.js +1704 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +21289 -0
- package/dist/solutions-components/demos/crowdsource-manager.html +4 -0
- package/dist/solutions-components/demos/solution-spatial-ref.html +9 -16
- package/dist/solutions-components/demos/spatial-ref.html +53 -0
- package/dist/solutions-components/{p-64d29ba2.entry.js → p-0bc27ba7.entry.js} +2 -2
- package/dist/{collection/components/map-card/test/map-card.e2e.js → solutions-components/p-1b228f97.js} +2 -10
- package/dist/solutions-components/{p-9f11a403.entry.js → p-3c5c1487.entry.js} +1 -1
- package/dist/solutions-components/{p-a26711e8.js → p-469c8f8a.js} +1 -1
- package/dist/solutions-components/p-53bc5fc1.js +36 -0
- package/dist/solutions-components/p-5b8c8942.entry.js +21 -0
- package/dist/solutions-components/p-63c6fc29.entry.js +6 -0
- package/dist/solutions-components/p-64945b43.entry.js +18 -0
- package/dist/solutions-components/{p-c8d0ce92.js → p-698c6a56.js} +2 -2
- package/dist/solutions-components/{p-b9d29f30.entry.js → p-734cb206.entry.js} +1 -1
- package/dist/solutions-components/p-770bff06.entry.js +6 -0
- package/dist/solutions-components/p-7741dbab.entry.js +6 -0
- package/dist/solutions-components/p-80465067.entry.js +6 -0
- package/dist/solutions-components/p-846df994.entry.js +6 -0
- package/dist/solutions-components/p-b3f8d2cb.js +192 -0
- package/dist/solutions-components/p-c26d8b36.entry.js +6 -0
- package/dist/solutions-components/{p-57cf6784.entry.js → p-d22be647.entry.js} +1 -1
- package/dist/solutions-components/{p-4d942b0f.entry.js → p-f35147d5.entry.js} +1 -1
- package/dist/solutions-components/p-ff0d7712.js +44 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +43 -20
- package/dist/solutions-components/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
- package/dist/types/components/floor-filter/floor-filter.d.ts +61 -0
- package/dist/types/components/layer-table/layer-table.d.ts +4 -0
- package/dist/types/components/map-card/map-card.d.ts +4 -0
- package/dist/types/components/map-tools/map-tools.d.ts +24 -0
- package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +11 -93
- package/dist/types/components/spatial-ref/spatial-ref.d.ts +142 -0
- package/dist/types/components.d.ts +123 -16
- package/dist/types/preact.d.ts +8 -1
- package/package.json +6 -6
- package/dist/cjs/calcite-checkbox.cjs.entry.js +0 -136
- package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +0 -37
- package/dist/collection/components/buffer-tools/test/buffer-tools.e2e.js +0 -29
- package/dist/collection/components/buffer-tools/test/buffer-tools.spec.js +0 -160
- package/dist/collection/components/card-manager/test/card-manager.e2e.js +0 -29
- package/dist/collection/components/card-manager/test/card-manager.spec.js +0 -37
- package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.e2e.js +0 -29
- package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.spec.js +0 -37
- package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.e2e.js +0 -29
- package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.spec.js +0 -37
- package/dist/collection/components/deduct-calculator/test/deduct-calculator.e2e.js +0 -29
- package/dist/collection/components/deduct-calculator/test/deduct-calculator.spec.js +0 -37
- package/dist/collection/components/edit-card/test/edit-card.e2e.js +0 -14
- package/dist/collection/components/edit-card/test/edit-card.spec.js +0 -22
- package/dist/collection/components/info-card/test/info-card.e2e.js +0 -29
- package/dist/collection/components/info-card/test/info-card.spec.js +0 -37
- package/dist/collection/components/json-editor/test/json-editor.e2e.js +0 -36
- package/dist/collection/components/json-editor/test/json-editor.spec.js +0 -65
- package/dist/collection/components/layer-table/test/layer-table.spec.js +0 -37
- package/dist/collection/components/layout-manager/test/layout-manager.e2e.js +0 -29
- package/dist/collection/components/layout-manager/test/layout-manager.spec.js +0 -37
- package/dist/collection/components/list-item/test/list-item.e2e.js +0 -29
- package/dist/collection/components/list-item/test/list-item.spec.js +0 -37
- package/dist/collection/components/map-card/test/map-card.spec.js +0 -37
- package/dist/collection/components/map-draw-tools/test/map-draw-tools.e2e.js +0 -29
- package/dist/collection/components/map-draw-tools/test/map-draw-tools.spec.js +0 -37
- package/dist/collection/components/map-fullscreen/test/map-fullscreen.e2e.js +0 -29
- package/dist/collection/components/map-fullscreen/test/map-fullscreen.spec.js +0 -37
- package/dist/collection/components/map-layer-picker/test/map-layer-picker.e2e.js +0 -29
- package/dist/collection/components/map-layer-picker/test/map-layer-picker.spec.js +0 -114
- package/dist/collection/components/map-legend/test/map-legend.e2e.js +0 -14
- package/dist/collection/components/map-legend/test/map-legend.spec.js +0 -22
- package/dist/collection/components/map-picker/test/map-picker.e2e.js +0 -29
- package/dist/collection/components/map-picker/test/map-picker.spec.js +0 -37
- package/dist/collection/components/map-search/test/map-search.e2e.js +0 -29
- package/dist/collection/components/map-search/test/map-search.spec.js +0 -37
- package/dist/collection/components/map-select-tools/test/map-select-tools.e2e.js +0 -29
- package/dist/collection/components/map-select-tools/test/map-select-tools.spec.js +0 -366
- package/dist/collection/components/map-tools/test/map-tools.e2e.js +0 -29
- package/dist/collection/components/map-tools/test/map-tools.spec.js +0 -37
- package/dist/collection/components/pci-calculator/test/pci-calculator.e2e.js +0 -29
- package/dist/collection/components/pci-calculator/test/pci-calculator.spec.js +0 -37
- package/dist/collection/components/pdf-download/test/pdf-download.e2e.js +0 -76
- package/dist/collection/components/pdf-download/test/pdf-download.spec.js +0 -107
- package/dist/collection/components/public-notification/test/public-notification.spec.js +0 -161
- package/dist/collection/components/refine-selection/test/refine-selection.e2e.js +0 -14
- package/dist/collection/components/refine-selection/test/refine-selection.spec.js +0 -22
- package/dist/collection/components/solution-configuration/test/solution-configuration.e2e.js +0 -36
- package/dist/collection/components/solution-configuration/test/solution-configuration.spec.js +0 -119
- package/dist/collection/components/solution-contents/test/solution-contents.e2e.js +0 -94
- package/dist/collection/components/solution-contents/test/solution-contents.spec.js +0 -143
- package/dist/collection/components/solution-item/test/solution-item.e2e.js +0 -36
- package/dist/collection/components/solution-item/test/solution-item.spec.js +0 -77
- package/dist/collection/components/solution-item-details/test/solution-item-details.e2e.js +0 -36
- package/dist/collection/components/solution-item-details/test/solution-item-details.spec.js +0 -142
- package/dist/collection/components/solution-item-icon/test/solution-item-icon.e2e.js +0 -29
- package/dist/collection/components/solution-item-icon/test/solution-item-icon.spec.js +0 -39
- package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.e2e.js +0 -36
- package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.spec.js +0 -54
- package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.e2e.js +0 -36
- package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.spec.js +0 -65
- package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js +0 -36
- package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js +0 -55
- package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js +0 -36
- package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js +0 -60
- package/dist/collection/components/solution-variables/test/solution-variables.e2e.js +0 -36
- package/dist/collection/components/solution-variables/test/solution-variables.spec.js +0 -131
- package/dist/esm/calcite-checkbox.entry.js +0 -132
- package/dist/solutions-components/p-07d7e11f.entry.js +0 -6
- package/dist/solutions-components/p-16362eb4.js +0 -36
- package/dist/solutions-components/p-17d176b5.js +0 -230
- package/dist/solutions-components/p-1d9a5198.entry.js +0 -37
- package/dist/solutions-components/p-3707d9bd.entry.js +0 -6
- package/dist/solutions-components/p-4dbe8337.entry.js +0 -6
- package/dist/solutions-components/p-5ffaaaf4.entry.js +0 -6
- package/dist/solutions-components/p-736e76fb.entry.js +0 -17
- package/dist/solutions-components/p-99f1a767.entry.js +0 -6
- /package/dist/collection/components/{solution-spatial-ref → spatial-ref}/spatialreferences.js +0 -0
- /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
|
-
});
|
package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js
DELETED
@@ -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
|
-
});
|
package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js
DELETED
@@ -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
|
-
});
|
package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js
DELETED
@@ -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
|
-
});
|
package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js
DELETED
@@ -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 };
|