@esri/solutions-components 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/{pciUtils-6a806ba4.js → pciUtils-423cfc68.js} +25 -7
- package/dist/collection/demos/deduct-calculator.html +2 -5
- package/dist/collection/demos/new-public-notification.html +6 -4
- package/dist/collection/utils/pciUtils.js +25 -7
- package/dist/collection/utils/pciUtils.ts +30 -7
- package/dist/components/ExpandToggle.js +110 -0
- package/dist/components/Heading.js +22 -0
- package/dist/components/_commonjsHelpers.js +22 -0
- package/dist/components/action-bar.js +276 -0
- package/dist/components/action-group.js +149 -0
- package/dist/components/action-menu.js +356 -0
- package/dist/components/action.js +214 -0
- package/dist/components/add-record-modal.d.ts +11 -0
- package/dist/components/add-record-modal.js +171 -0
- package/dist/components/array.js +15 -0
- package/dist/components/block.js +272 -0
- package/dist/components/buffer-tools.d.ts +11 -0
- package/dist/components/buffer-tools.js +11 -0
- package/dist/components/buffer-tools2.js +262 -0
- package/dist/components/button.js +263 -0
- package/dist/components/calcite-accordion-item.js +244 -0
- package/dist/components/calcite-accordion.js +180 -0
- package/dist/components/calcite-action-bar.js +11 -0
- package/dist/components/calcite-action-group.js +11 -0
- package/dist/components/calcite-action-menu.js +11 -0
- package/dist/components/calcite-action-pad.js +197 -0
- package/dist/components/calcite-action.js +11 -0
- package/dist/components/calcite-alert.js +297 -0
- package/dist/components/calcite-avatar.js +182 -0
- package/dist/components/calcite-block-section.js +155 -0
- package/dist/components/calcite-block.js +11 -0
- package/dist/components/calcite-button.js +11 -0
- package/dist/components/calcite-card.js +187 -0
- package/dist/components/calcite-checkbox.js +11 -0
- package/dist/components/calcite-chip.js +11 -0
- package/dist/components/calcite-color-picker-hex-input.js +11 -0
- package/dist/components/calcite-color-picker-swatch.js +11 -0
- package/dist/components/calcite-color-picker.js +1036 -0
- package/dist/components/calcite-combobox-item-group.js +75 -0
- package/dist/components/calcite-combobox-item.js +11 -0
- package/dist/components/calcite-combobox.js +11 -0
- package/dist/components/calcite-date-picker-day.js +11 -0
- package/dist/components/calcite-date-picker-month-header.js +11 -0
- package/dist/components/calcite-date-picker-month.js +11 -0
- package/dist/components/calcite-date-picker.js +11 -0
- package/dist/components/calcite-dropdown-group.js +11 -0
- package/dist/components/calcite-dropdown-item.js +11 -0
- package/dist/components/calcite-dropdown.js +11 -0
- package/dist/components/calcite-fab.js +144 -0
- package/dist/components/calcite-filter.js +195 -0
- package/dist/components/calcite-flow-item.js +243 -0
- package/dist/components/calcite-flow.js +147 -0
- package/dist/components/calcite-graph.js +11 -0
- package/dist/components/calcite-handle.js +11 -0
- package/dist/components/calcite-icon.js +11 -0
- package/dist/components/calcite-inline-editable.js +294 -0
- package/dist/components/calcite-input-date-picker.js +713 -0
- package/dist/components/calcite-input-message.js +11 -0
- package/dist/components/calcite-input-number.js +637 -0
- package/dist/components/calcite-input-text.js +400 -0
- package/dist/components/calcite-input-time-picker.js +434 -0
- package/dist/components/calcite-input.js +11 -0
- package/dist/components/calcite-label.js +11 -0
- package/dist/components/calcite-link.js +11 -0
- package/dist/components/calcite-list-item-group.js +65 -0
- package/dist/components/calcite-list-item.js +11 -0
- package/dist/components/calcite-list.js +11 -0
- package/dist/components/calcite-loader.js +11 -0
- package/dist/components/calcite-modal.js +11 -0
- package/dist/components/calcite-notice.js +11 -0
- package/dist/components/calcite-option-group.js +64 -0
- package/dist/components/calcite-option.js +11 -0
- package/dist/components/calcite-pagination.js +258 -0
- package/dist/components/calcite-panel.js +11 -0
- package/dist/components/calcite-pick-list-group.js +74 -0
- package/dist/components/calcite-pick-list-item.js +11 -0
- package/dist/components/calcite-pick-list.js +11 -0
- package/dist/components/calcite-popover-manager.js +94 -0
- package/dist/components/calcite-popover.js +11 -0
- package/dist/components/calcite-progress.js +11 -0
- package/dist/components/calcite-radio-button-group.js +132 -0
- package/dist/components/calcite-radio-button.js +310 -0
- package/dist/components/calcite-radio-group-item.js +11 -0
- package/dist/components/calcite-radio-group.js +11 -0
- package/dist/components/calcite-rating.js +201 -0
- package/dist/components/calcite-scrim.js +11 -0
- package/dist/components/calcite-select.js +11 -0
- package/dist/components/calcite-shell-center-row.js +100 -0
- package/dist/components/calcite-shell-panel.js +11 -0
- package/dist/components/calcite-shell.js +11 -0
- package/dist/components/calcite-slider.js +11 -0
- package/dist/components/calcite-sortable-list.js +202 -0
- package/dist/components/calcite-split-button.js +11 -0
- package/dist/components/calcite-stepper-item.js +271 -0
- package/dist/components/calcite-stepper.js +256 -0
- package/dist/components/calcite-switch.js +11 -0
- package/dist/components/calcite-tab-nav.js +11 -0
- package/dist/components/calcite-tab-title.js +11 -0
- package/dist/components/calcite-tab.js +11 -0
- package/dist/components/calcite-tabs.js +11 -0
- package/dist/components/calcite-tile-select-group.js +65 -0
- package/dist/components/calcite-tile-select.js +266 -0
- package/dist/components/calcite-tile.js +11 -0
- package/dist/components/calcite-time-picker.js +11 -0
- package/dist/components/calcite-tip-group.js +41 -0
- package/dist/components/calcite-tip-manager.js +223 -0
- package/dist/components/calcite-tip.js +162 -0
- package/dist/components/calcite-tooltip-manager.js +57 -0
- package/dist/components/calcite-tooltip.js +11 -0
- package/dist/components/calcite-tree-item.js +11 -0
- package/dist/components/calcite-tree.js +11 -0
- package/dist/components/calcite-value-list-item.js +11 -0
- package/dist/components/calcite-value-list.js +11 -0
- package/dist/components/card-manager.d.ts +11 -0
- package/dist/components/card-manager.js +143 -0
- package/dist/components/check-list.d.ts +11 -0
- package/dist/components/check-list.js +11 -0
- package/dist/components/check-list2.js +131 -0
- package/dist/components/checkbox.js +165 -0
- package/dist/components/chip.js +170 -0
- package/dist/components/color-picker-hex-input.js +363 -0
- package/dist/components/color-picker-swatch.js +2034 -0
- package/dist/components/combobox-item.js +182 -0
- package/dist/components/combobox.js +912 -0
- package/dist/components/comment-card.d.ts +11 -0
- package/dist/components/comment-card.js +90 -0
- package/dist/components/conditionalSlot.js +50 -0
- package/dist/components/config-buffer-tools.d.ts +11 -0
- package/dist/components/config-buffer-tools.js +187 -0
- package/dist/components/config-draw-tools.d.ts +11 -0
- package/dist/components/config-draw-tools.js +121 -0
- package/dist/components/config-layer-picker.d.ts +11 -0
- package/dist/components/config-layer-picker.js +163 -0
- package/dist/components/config-pdf-download.d.ts +11 -0
- package/dist/components/config-pdf-download.js +154 -0
- package/dist/components/crowdsource-manager.d.ts +11 -0
- package/dist/components/crowdsource-manager.js +90 -0
- package/dist/components/crowdsource-reporter.d.ts +11 -0
- package/dist/components/crowdsource-reporter.js +90 -0
- package/dist/components/csvUtils.js +74 -0
- package/dist/components/date-picker-day.js +111 -0
- package/dist/components/date-picker-month-header.js +224 -0
- package/dist/components/date-picker-month.js +344 -0
- package/dist/components/date-picker.js +575 -0
- package/dist/components/date.js +180 -0
- package/dist/components/debounce.js +487 -0
- package/dist/components/deduct-calculator.d.ts +11 -0
- package/dist/components/deduct-calculator.js +11 -0
- package/dist/components/deduct-calculator2.js +1002 -0
- package/dist/components/dom.js +231 -0
- package/dist/components/dropdown-group.js +96 -0
- package/dist/components/dropdown-item.js +232 -0
- package/dist/components/dropdown.js +505 -0
- package/dist/components/edit-record-modal.d.ts +11 -0
- package/dist/components/edit-record-modal.js +11 -0
- package/dist/components/edit-record-modal2.js +161 -0
- package/dist/components/filter.js +763 -0
- package/dist/components/floating-ui.js +1768 -0
- package/dist/components/form.js +228 -0
- package/dist/components/graph.js +254 -0
- package/dist/components/guid.js +24 -0
- package/dist/components/handle.js +119 -0
- package/dist/components/icon.js +202 -0
- package/dist/components/index.d.ts +61 -0
- package/dist/components/index.js +196 -0
- package/dist/components/index2.js +199 -0
- package/dist/components/info-card.d.ts +11 -0
- package/dist/components/info-card.js +11 -0
- package/dist/components/info-card2.js +97 -0
- package/dist/components/input-message.js +101 -0
- package/dist/components/input.js +740 -0
- package/dist/components/interactive.js +51 -0
- package/dist/components/interfaces.js +19 -0
- package/dist/components/interfaces2.js +21 -0
- package/dist/components/interfaces3.js +80 -0
- package/dist/components/json-editor.d.ts +11 -0
- package/dist/components/json-editor.js +11 -0
- package/dist/components/json-editor2.js +441 -0
- package/dist/components/key.js +16 -0
- package/dist/components/label.js +106 -0
- package/dist/components/label2.js +131 -0
- package/dist/components/labelFormats.js +210 -0
- package/dist/components/layer-table.d.ts +11 -0
- package/dist/components/layer-table.js +453 -0
- package/dist/components/link.js +123 -0
- package/dist/components/list-item.d.ts +11 -0
- package/dist/components/list-item.js +90 -0
- package/dist/components/list-item2.js +149 -0
- package/dist/components/list.js +83 -0
- package/dist/components/loadModules.js +28 -0
- package/dist/components/loader.js +116 -0
- package/dist/components/locale.js +412 -0
- package/dist/components/locale2.js +413 -0
- package/dist/components/map-card.d.ts +11 -0
- package/dist/components/map-card.js +354 -0
- package/dist/components/map-draw-tools.d.ts +11 -0
- package/dist/components/map-draw-tools.js +11 -0
- package/dist/components/map-draw-tools2.js +228 -0
- package/dist/components/map-layer-picker.d.ts +11 -0
- package/dist/components/map-layer-picker.js +11 -0
- package/dist/components/map-layer-picker2.js +188 -0
- package/dist/components/map-search.d.ts +11 -0
- package/dist/components/map-search.js +155 -0
- package/dist/components/map-select-tools.d.ts +11 -0
- package/dist/components/map-select-tools.js +11 -0
- package/dist/components/map-select-tools2.js +588 -0
- package/dist/components/mapViewUtils.js +129 -0
- package/dist/components/math.js +24 -0
- package/dist/components/media-card.d.ts +11 -0
- package/dist/components/media-card.js +11 -0
- package/dist/components/media-card2.js +177 -0
- package/dist/components/modal.js +495 -0
- package/dist/components/nonChromiumPlatformUtils.js +503 -0
- package/dist/components/notice.js +192 -0
- package/dist/components/observers.js +56 -0
- package/dist/components/openCloseComponent.js +56 -0
- package/dist/components/option.js +109 -0
- package/dist/components/panel.js +459 -0
- package/dist/components/pci-calculator.d.ts +11 -0
- package/dist/components/pci-calculator.js +193 -0
- package/dist/components/pdf-download.d.ts +11 -0
- package/dist/components/pdf-download.js +11 -0
- package/dist/components/pdf-download2.js +189 -0
- package/dist/components/pick-list-item.js +255 -0
- package/dist/components/pick-list.js +170 -0
- package/dist/components/popover.js +500 -0
- package/dist/components/progress.js +60 -0
- package/dist/components/public-notification.d.ts +11 -0
- package/dist/components/public-notification.js +825 -0
- package/dist/components/publicNotificationStore.js +38 -0
- package/dist/components/queryUtils.js +187 -0
- package/dist/components/radio-group-item.js +101 -0
- package/dist/components/radio-group.js +235 -0
- package/dist/components/refine-selection-tools.d.ts +11 -0
- package/dist/components/refine-selection-tools.js +11 -0
- package/dist/components/refine-selection-tools2.js +492 -0
- package/dist/components/refine-selection.d.ts +11 -0
- package/dist/components/refine-selection.js +11 -0
- package/dist/components/refine-selection2.js +376 -0
- package/dist/components/resources.js +24 -0
- package/dist/components/resources2.js +21 -0
- package/dist/components/resources3.js +38 -0
- package/dist/components/scrim.js +83 -0
- package/dist/components/select.js +259 -0
- package/dist/components/shared-list-render.js +319 -0
- package/dist/components/shell-panel.js +281 -0
- package/dist/components/shell.js +121 -0
- package/dist/components/slider.js +896 -0
- package/dist/components/solution-configuration.d.ts +11 -0
- package/dist/components/solution-configuration.js +2233 -0
- package/dist/components/solution-contents.d.ts +11 -0
- package/dist/components/solution-contents.js +11 -0
- package/dist/components/solution-contents2.js +128 -0
- package/dist/components/solution-item-details.d.ts +11 -0
- package/dist/components/solution-item-details.js +11 -0
- package/dist/components/solution-item-details2.js +234 -0
- package/dist/components/solution-item-icon.d.ts +11 -0
- package/dist/components/solution-item-icon.js +11 -0
- package/dist/components/solution-item-icon2.js +342 -0
- package/dist/components/solution-item-sharing.d.ts +11 -0
- package/dist/components/solution-item-sharing.js +11 -0
- package/dist/components/solution-item-sharing2.js +167 -0
- package/dist/components/solution-item.d.ts +11 -0
- package/dist/components/solution-item.js +11 -0
- package/dist/components/solution-item2.js +315 -0
- package/dist/components/solution-organization-variables.d.ts +11 -0
- package/dist/components/solution-organization-variables.js +11 -0
- package/dist/components/solution-organization-variables2.js +132 -0
- package/dist/components/solution-resource-item.d.ts +11 -0
- package/dist/components/solution-resource-item.js +11 -0
- package/dist/components/solution-resource-item2.js +356 -0
- package/dist/components/solution-spatial-ref.d.ts +11 -0
- package/dist/components/solution-spatial-ref.js +11 -0
- package/dist/components/solution-spatial-ref2.js +21446 -0
- package/dist/components/solution-store.js +4092 -0
- package/dist/components/solution-template-data.d.ts +11 -0
- package/dist/components/solution-template-data.js +11 -0
- package/dist/components/solution-template-data2.js +233 -0
- package/dist/components/solution-variables.d.ts +11 -0
- package/dist/components/solution-variables.js +11 -0
- package/dist/components/solution-variables2.js +150 -0
- package/dist/components/sortable.esm.js +3026 -0
- package/dist/components/split-button.js +165 -0
- package/dist/components/store-manager.d.ts +11 -0
- package/dist/components/store-manager.js +83 -0
- package/dist/components/switch.js +139 -0
- package/dist/components/tab-nav.js +241 -0
- package/dist/components/tab-title.js +276 -0
- package/dist/components/tab.js +154 -0
- package/dist/components/tabs.js +188 -0
- package/dist/components/tile.js +129 -0
- package/dist/components/time-picker.js +943 -0
- package/dist/components/tooltip.js +399 -0
- package/dist/components/tree-item.js +294 -0
- package/dist/components/tree.js +327 -0
- package/dist/components/utils.js +119 -0
- package/dist/components/utils2.js +51 -0
- package/dist/components/value-list-item.js +204 -0
- package/dist/components/value-list.js +333 -0
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/{pciUtils-e3007a1c.js → pciUtils-ecda46e5.js} +25 -7
- package/dist/solutions-components/demos/deduct-calculator.html +2 -5
- package/dist/solutions-components/demos/new-public-notification.html +6 -4
- package/dist/solutions-components/{p-ff80ffbb.entry.js → p-0512635b.entry.js} +1 -1
- package/dist/solutions-components/{p-5ec407c2.entry.js → p-0c088725.entry.js} +1 -1
- package/dist/solutions-components/p-cc815aca.js +21 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/pciUtils.ts +30 -7
- package/dist/types/utils/pciUtils.d.ts +2 -1
- package/package.json +4 -3
- package/dist/solutions-components/p-647bbd18.js +0 -21
@@ -0,0 +1,202 @@
|
|
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 { getAssetPath, proxyCustomElement, HTMLElement, h, Host, Build } from '@stencil/core/internal/client';
|
7
|
+
import { c as getElementDir, t as toAriaBoolean } from './dom.js';
|
8
|
+
import { c as createObserver } from './observers.js';
|
9
|
+
|
10
|
+
/*!
|
11
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
12
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
13
|
+
* v1.0.0-beta.97
|
14
|
+
*/
|
15
|
+
const CSS = {
|
16
|
+
icon: "icon",
|
17
|
+
flipRtl: "flip-rtl"
|
18
|
+
};
|
19
|
+
|
20
|
+
/*!
|
21
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
22
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
23
|
+
* v1.0.0-beta.97
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* Icon data cache.
|
27
|
+
* Exported for testing purposes.
|
28
|
+
*
|
29
|
+
* @private
|
30
|
+
*/
|
31
|
+
const iconCache = {};
|
32
|
+
/**
|
33
|
+
* Icon request cache.
|
34
|
+
* Exported for testing purposes.
|
35
|
+
*
|
36
|
+
* @private
|
37
|
+
*/
|
38
|
+
const requestCache = {};
|
39
|
+
const scaleToPx = {
|
40
|
+
s: 16,
|
41
|
+
m: 24,
|
42
|
+
l: 32
|
43
|
+
};
|
44
|
+
async function fetchIcon({ icon, scale }) {
|
45
|
+
const size = scaleToPx[scale];
|
46
|
+
const name = normalizeIconName(icon);
|
47
|
+
const filled = name.charAt(name.length - 1) === "F";
|
48
|
+
const iconName = filled ? name.substring(0, name.length - 1) : name;
|
49
|
+
const id = `${iconName}${size}${filled ? "F" : ""}`;
|
50
|
+
if (iconCache[id]) {
|
51
|
+
return iconCache[id];
|
52
|
+
}
|
53
|
+
if (!requestCache[id]) {
|
54
|
+
requestCache[id] = fetch(getAssetPath(`./assets/icon/${id}.json`))
|
55
|
+
.then((resp) => resp.json())
|
56
|
+
.catch(() => {
|
57
|
+
console.error(`"${id}" is not a valid calcite-ui-icon name`);
|
58
|
+
return "";
|
59
|
+
});
|
60
|
+
}
|
61
|
+
const path = await requestCache[id];
|
62
|
+
iconCache[id] = path;
|
63
|
+
return path;
|
64
|
+
}
|
65
|
+
/**
|
66
|
+
* Normalize the icon name to match the path data module exports.
|
67
|
+
* Exported for testing purposes.
|
68
|
+
*
|
69
|
+
* @param name
|
70
|
+
* @private
|
71
|
+
*/
|
72
|
+
function normalizeIconName(name) {
|
73
|
+
const numberLeadingName = !isNaN(Number(name.charAt(0)));
|
74
|
+
const parts = name.split("-");
|
75
|
+
if (parts.length === 1) {
|
76
|
+
return numberLeadingName ? `i${name}` : name;
|
77
|
+
}
|
78
|
+
return parts
|
79
|
+
.map((part, index) => {
|
80
|
+
if (index === 0) {
|
81
|
+
return numberLeadingName ? `i${part.toUpperCase()}` : part;
|
82
|
+
}
|
83
|
+
return part.charAt(0).toUpperCase() + part.slice(1);
|
84
|
+
})
|
85
|
+
.join("");
|
86
|
+
}
|
87
|
+
|
88
|
+
const iconCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:inline-flex;color:var(--calcite-ui-icon-color)}:host([scale=s]){block-size:1rem;inline-size:1rem;min-inline-size:1rem;min-block-size:1rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem;min-inline-size:1.5rem;min-block-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem;min-inline-size:2rem;min-block-size:2rem}.flip-rtl{transform:scaleX(-1)}.svg{display:block}";
|
89
|
+
|
90
|
+
const Icon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
91
|
+
constructor() {
|
92
|
+
super();
|
93
|
+
this.__registerHost();
|
94
|
+
this.__attachShadow();
|
95
|
+
//--------------------------------------------------------------------------
|
96
|
+
//
|
97
|
+
// Properties
|
98
|
+
//
|
99
|
+
//--------------------------------------------------------------------------
|
100
|
+
/**
|
101
|
+
* The name of the icon to display. The value of this property must match the icon name from https://esri.github.io/calcite-ui-icons/.
|
102
|
+
*/
|
103
|
+
this.icon = null;
|
104
|
+
/**
|
105
|
+
* When true, the icon will be flipped when the element direction is 'rtl'.
|
106
|
+
*/
|
107
|
+
this.flipRtl = false;
|
108
|
+
/**
|
109
|
+
* Icon scale.
|
110
|
+
*/
|
111
|
+
this.scale = "m";
|
112
|
+
this.visible = false;
|
113
|
+
}
|
114
|
+
//--------------------------------------------------------------------------
|
115
|
+
//
|
116
|
+
// Lifecycle
|
117
|
+
//
|
118
|
+
//--------------------------------------------------------------------------
|
119
|
+
connectedCallback() {
|
120
|
+
this.waitUntilVisible(() => {
|
121
|
+
this.visible = true;
|
122
|
+
this.loadIconPathData();
|
123
|
+
});
|
124
|
+
}
|
125
|
+
disconnectedCallback() {
|
126
|
+
var _a;
|
127
|
+
(_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
128
|
+
this.intersectionObserver = null;
|
129
|
+
}
|
130
|
+
async componentWillLoad() {
|
131
|
+
this.loadIconPathData();
|
132
|
+
}
|
133
|
+
render() {
|
134
|
+
const { el, flipRtl, pathData, scale, textLabel } = this;
|
135
|
+
const dir = getElementDir(el);
|
136
|
+
const size = scaleToPx[scale];
|
137
|
+
const semantic = !!textLabel;
|
138
|
+
const paths = [].concat(pathData || "");
|
139
|
+
return (h(Host, { "aria-hidden": toAriaBoolean(!semantic), "aria-label": semantic ? textLabel : null, role: semantic ? "img" : null }, h("svg", { class: {
|
140
|
+
[CSS.flipRtl]: dir === "rtl" && flipRtl,
|
141
|
+
svg: true
|
142
|
+
}, fill: "currentColor", height: "100%", viewBox: `0 0 ${size} ${size}`, width: "100%", xmlns: "http://www.w3.org/2000/svg" }, paths.map((path) => typeof path === "string" ? (h("path", { d: path })) : (h("path", { d: path.d, opacity: "opacity" in path ? path.opacity : 1 }))))));
|
143
|
+
}
|
144
|
+
//--------------------------------------------------------------------------
|
145
|
+
//
|
146
|
+
// Private Methods
|
147
|
+
//
|
148
|
+
//--------------------------------------------------------------------------
|
149
|
+
async loadIconPathData() {
|
150
|
+
const { icon, scale, visible } = this;
|
151
|
+
if (!Build.isBrowser || !icon || !visible) {
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
this.pathData = await fetchIcon({ icon, scale });
|
155
|
+
}
|
156
|
+
waitUntilVisible(callback) {
|
157
|
+
this.intersectionObserver = createObserver("intersection", (entries) => {
|
158
|
+
entries.forEach((entry) => {
|
159
|
+
if (entry.isIntersecting) {
|
160
|
+
this.intersectionObserver.disconnect();
|
161
|
+
this.intersectionObserver = null;
|
162
|
+
callback();
|
163
|
+
}
|
164
|
+
});
|
165
|
+
}, { rootMargin: "50px" });
|
166
|
+
if (!this.intersectionObserver) {
|
167
|
+
callback();
|
168
|
+
return;
|
169
|
+
}
|
170
|
+
this.intersectionObserver.observe(this.el);
|
171
|
+
}
|
172
|
+
static get assetsDirs() { return ["assets"]; }
|
173
|
+
get el() { return this; }
|
174
|
+
static get watchers() { return {
|
175
|
+
"icon": ["loadIconPathData"],
|
176
|
+
"scale": ["loadIconPathData"]
|
177
|
+
}; }
|
178
|
+
static get style() { return iconCss; }
|
179
|
+
}, [1, "calcite-icon", {
|
180
|
+
"icon": [513],
|
181
|
+
"flipRtl": [516, "flip-rtl"],
|
182
|
+
"scale": [513],
|
183
|
+
"textLabel": [1, "text-label"],
|
184
|
+
"pathData": [32],
|
185
|
+
"visible": [32]
|
186
|
+
}]);
|
187
|
+
function defineCustomElement() {
|
188
|
+
if (typeof customElements === "undefined") {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
const components = ["calcite-icon"];
|
192
|
+
components.forEach(tagName => { switch (tagName) {
|
193
|
+
case "calcite-icon":
|
194
|
+
if (!customElements.get(tagName)) {
|
195
|
+
customElements.define(tagName, Icon);
|
196
|
+
}
|
197
|
+
break;
|
198
|
+
} });
|
199
|
+
}
|
200
|
+
defineCustomElement();
|
201
|
+
|
202
|
+
export { Icon as I, defineCustomElement as d };
|
@@ -0,0 +1,61 @@
|
|
1
|
+
/* SolutionsComponents custom elements */
|
2
|
+
export { AddRecordModal as AddRecordModal } from '../types/components/add-record-modal/add-record-modal';
|
3
|
+
export { BufferTools as BufferTools } from '../types/components/buffer-tools/buffer-tools';
|
4
|
+
export { CardManager as CardManager } from '../types/components/card-manager/card-manager';
|
5
|
+
export { CheckList as CheckList } from '../types/components/check-list/check-list';
|
6
|
+
export { CommentCard as CommentCard } from '../types/components/comment-card/comment-card';
|
7
|
+
export { ConfigBufferTools as ConfigBufferTools } from '../types/components/config-buffer-tools/config-buffer-tools';
|
8
|
+
export { ConfigDrawTools as ConfigDrawTools } from '../types/components/config-draw-tools/config-draw-tools';
|
9
|
+
export { ConfigLayerPicker as ConfigLayerPicker } from '../types/components/config-layer-picker/config-layer-picker';
|
10
|
+
export { ConfigPdfDownload as ConfigPdfDownload } from '../types/components/config-pdf-download/config-pdf-download';
|
11
|
+
export { CrowdsourceManager as CrowdsourceManager } from '../types/components/crowdsource-manager/crowdsource-manager';
|
12
|
+
export { CrowdsourceReporter as CrowdsourceReporter } from '../types/components/crowdsource-reporter/crowdsource-reporter';
|
13
|
+
export { DeductCalculator as DeductCalculator } from '../types/components/deduct-calculator/deduct-calculator';
|
14
|
+
export { EditRecordModal as EditRecordModal } from '../types/components/edit-record-modal/edit-record-modal';
|
15
|
+
export { InfoCard as InfoCard } from '../types/components/info-card/info-card';
|
16
|
+
export { JsonEditor as JsonEditor } from '../types/components/json-editor/json-editor';
|
17
|
+
export { LayerTable as LayerTable } from '../types/components/layer-table/layer-table';
|
18
|
+
export { ListItem as ListItem } from '../types/components/list-item/list-item';
|
19
|
+
export { MapCard as MapCard } from '../types/components/map-card/map-card';
|
20
|
+
export { MapDrawTools as MapDrawTools } from '../types/components/map-draw-tools/map-draw-tools';
|
21
|
+
export { MapLayerPicker as MapLayerPicker } from '../types/components/map-layer-picker/map-layer-picker';
|
22
|
+
export { MapSearch as MapSearch } from '../types/components/map-search/map-search';
|
23
|
+
export { MapSelectTools as MapSelectTools } from '../types/components/map-select-tools/map-select-tools';
|
24
|
+
export { MediaCard as MediaCard } from '../types/components/media-card/media-card';
|
25
|
+
export { PciCalculator as PciCalculator } from '../types/components/pci-calculator/pci-calculator';
|
26
|
+
export { PdfDownload as PdfDownload } from '../types/components/pdf-download/pdf-download';
|
27
|
+
export { PublicNotification as PublicNotification } from '../types/components/public-notification/public-notification';
|
28
|
+
export { RefineSelection as RefineSelection } from '../types/components/refine-selection/refine-selection';
|
29
|
+
export { RefineSelectionTools as RefineSelectionTools } from '../types/components/refine-selection-tools/refine-selection-tools';
|
30
|
+
export { SolutionConfiguration as SolutionConfiguration } from '../types/components/solution-configuration/solution-configuration';
|
31
|
+
export { SolutionContents as SolutionContents } from '../types/components/solution-contents/solution-contents';
|
32
|
+
export { SolutionItem as SolutionItem } from '../types/components/solution-item/solution-item';
|
33
|
+
export { SolutionItemDetails as SolutionItemDetails } from '../types/components/solution-item-details/solution-item-details';
|
34
|
+
export { SolutionItemIcon as SolutionItemIcon } from '../types/components/solution-item-icon/solution-item-icon';
|
35
|
+
export { SolutionItemSharing as SolutionItemSharing } from '../types/components/solution-item-sharing/solution-item-sharing';
|
36
|
+
export { SolutionOrganizationVariables as SolutionOrganizationVariables } from '../types/components/solution-organization-variables/solution-organization-variables';
|
37
|
+
export { SolutionResourceItem as SolutionResourceItem } from '../types/components/solution-resource-item/solution-resource-item';
|
38
|
+
export { SolutionSpatialRef as SolutionSpatialRef } from '../types/components/solution-spatial-ref/solution-spatial-ref';
|
39
|
+
export { SolutionTemplateData as SolutionTemplateData } from '../types/components/solution-template-data/solution-template-data';
|
40
|
+
export { SolutionVariables as SolutionVariables } from '../types/components/solution-variables/solution-variables';
|
41
|
+
export { StoreManager as StoreManager } from '../types/components/store-manager/store-manager';
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Used to manually set the base path where assets can be found.
|
45
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
46
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
47
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
48
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
49
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
50
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
51
|
+
* will have to ensure the static assets are copied to its build directory.
|
52
|
+
*/
|
53
|
+
export declare const setAssetPath: (path: string) => void;
|
54
|
+
|
55
|
+
export interface SetPlatformOptions {
|
56
|
+
raf?: (c: FrameRequestCallback) => number;
|
57
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
58
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
59
|
+
}
|
60
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
61
|
+
export * from '../types';
|
@@ -0,0 +1,196 @@
|
|
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
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
7
|
+
import { d as darkTheme, a as autoTheme } from './dom.js';
|
8
|
+
export { AddRecordModal, defineCustomElement as defineCustomElementAddRecordModal } from './add-record-modal.js';
|
9
|
+
export { BufferTools, defineCustomElement as defineCustomElementBufferTools } from './buffer-tools.js';
|
10
|
+
export { CalciteAccordion, defineCustomElement as defineCustomElementCalciteAccordion } from './calcite-accordion.js';
|
11
|
+
export { CalciteAccordionItem, defineCustomElement as defineCustomElementCalciteAccordionItem } from './calcite-accordion-item.js';
|
12
|
+
export { CalciteAction, defineCustomElement as defineCustomElementCalciteAction } from './calcite-action.js';
|
13
|
+
export { CalciteActionBar, defineCustomElement as defineCustomElementCalciteActionBar } from './calcite-action-bar.js';
|
14
|
+
export { CalciteActionGroup, defineCustomElement as defineCustomElementCalciteActionGroup } from './calcite-action-group.js';
|
15
|
+
export { CalciteActionMenu, defineCustomElement as defineCustomElementCalciteActionMenu } from './calcite-action-menu.js';
|
16
|
+
export { CalciteActionPad, defineCustomElement as defineCustomElementCalciteActionPad } from './calcite-action-pad.js';
|
17
|
+
export { CalciteAlert, defineCustomElement as defineCustomElementCalciteAlert } from './calcite-alert.js';
|
18
|
+
export { CalciteAvatar, defineCustomElement as defineCustomElementCalciteAvatar } from './calcite-avatar.js';
|
19
|
+
export { CalciteBlock, defineCustomElement as defineCustomElementCalciteBlock } from './calcite-block.js';
|
20
|
+
export { CalciteBlockSection, defineCustomElement as defineCustomElementCalciteBlockSection } from './calcite-block-section.js';
|
21
|
+
export { CalciteButton, defineCustomElement as defineCustomElementCalciteButton } from './calcite-button.js';
|
22
|
+
export { CalciteCard, defineCustomElement as defineCustomElementCalciteCard } from './calcite-card.js';
|
23
|
+
export { CalciteCheckbox, defineCustomElement as defineCustomElementCalciteCheckbox } from './calcite-checkbox.js';
|
24
|
+
export { CalciteChip, defineCustomElement as defineCustomElementCalciteChip } from './calcite-chip.js';
|
25
|
+
export { CalciteColorPicker, defineCustomElement as defineCustomElementCalciteColorPicker } from './calcite-color-picker.js';
|
26
|
+
export { CalciteColorPickerHexInput, defineCustomElement as defineCustomElementCalciteColorPickerHexInput } from './calcite-color-picker-hex-input.js';
|
27
|
+
export { CalciteColorPickerSwatch, defineCustomElement as defineCustomElementCalciteColorPickerSwatch } from './calcite-color-picker-swatch.js';
|
28
|
+
export { CalciteCombobox, defineCustomElement as defineCustomElementCalciteCombobox } from './calcite-combobox.js';
|
29
|
+
export { CalciteComboboxItem, defineCustomElement as defineCustomElementCalciteComboboxItem } from './calcite-combobox-item.js';
|
30
|
+
export { CalciteComboboxItemGroup, defineCustomElement as defineCustomElementCalciteComboboxItemGroup } from './calcite-combobox-item-group.js';
|
31
|
+
export { CalciteDatePicker, defineCustomElement as defineCustomElementCalciteDatePicker } from './calcite-date-picker.js';
|
32
|
+
export { CalciteDatePickerDay, defineCustomElement as defineCustomElementCalciteDatePickerDay } from './calcite-date-picker-day.js';
|
33
|
+
export { CalciteDatePickerMonth, defineCustomElement as defineCustomElementCalciteDatePickerMonth } from './calcite-date-picker-month.js';
|
34
|
+
export { CalciteDatePickerMonthHeader, defineCustomElement as defineCustomElementCalciteDatePickerMonthHeader } from './calcite-date-picker-month-header.js';
|
35
|
+
export { CalciteDropdown, defineCustomElement as defineCustomElementCalciteDropdown } from './calcite-dropdown.js';
|
36
|
+
export { CalciteDropdownGroup, defineCustomElement as defineCustomElementCalciteDropdownGroup } from './calcite-dropdown-group.js';
|
37
|
+
export { CalciteDropdownItem, defineCustomElement as defineCustomElementCalciteDropdownItem } from './calcite-dropdown-item.js';
|
38
|
+
export { CalciteFab, defineCustomElement as defineCustomElementCalciteFab } from './calcite-fab.js';
|
39
|
+
export { CalciteFilter, defineCustomElement as defineCustomElementCalciteFilter } from './calcite-filter.js';
|
40
|
+
export { CalciteFlow, defineCustomElement as defineCustomElementCalciteFlow } from './calcite-flow.js';
|
41
|
+
export { CalciteFlowItem, defineCustomElement as defineCustomElementCalciteFlowItem } from './calcite-flow-item.js';
|
42
|
+
export { CalciteGraph, defineCustomElement as defineCustomElementCalciteGraph } from './calcite-graph.js';
|
43
|
+
export { CalciteHandle, defineCustomElement as defineCustomElementCalciteHandle } from './calcite-handle.js';
|
44
|
+
export { CalciteIcon, defineCustomElement as defineCustomElementCalciteIcon } from './calcite-icon.js';
|
45
|
+
export { CalciteInlineEditable, defineCustomElement as defineCustomElementCalciteInlineEditable } from './calcite-inline-editable.js';
|
46
|
+
export { CalciteInput, defineCustomElement as defineCustomElementCalciteInput } from './calcite-input.js';
|
47
|
+
export { CalciteInputDatePicker, defineCustomElement as defineCustomElementCalciteInputDatePicker } from './calcite-input-date-picker.js';
|
48
|
+
export { CalciteInputMessage, defineCustomElement as defineCustomElementCalciteInputMessage } from './calcite-input-message.js';
|
49
|
+
export { CalciteInputNumber, defineCustomElement as defineCustomElementCalciteInputNumber } from './calcite-input-number.js';
|
50
|
+
export { CalciteInputText, defineCustomElement as defineCustomElementCalciteInputText } from './calcite-input-text.js';
|
51
|
+
export { CalciteInputTimePicker, defineCustomElement as defineCustomElementCalciteInputTimePicker } from './calcite-input-time-picker.js';
|
52
|
+
export { CalciteLabel, defineCustomElement as defineCustomElementCalciteLabel } from './calcite-label.js';
|
53
|
+
export { CalciteLink, defineCustomElement as defineCustomElementCalciteLink } from './calcite-link.js';
|
54
|
+
export { CalciteList, defineCustomElement as defineCustomElementCalciteList } from './calcite-list.js';
|
55
|
+
export { CalciteListItem, defineCustomElement as defineCustomElementCalciteListItem } from './calcite-list-item.js';
|
56
|
+
export { CalciteListItemGroup, defineCustomElement as defineCustomElementCalciteListItemGroup } from './calcite-list-item-group.js';
|
57
|
+
export { CalciteLoader, defineCustomElement as defineCustomElementCalciteLoader } from './calcite-loader.js';
|
58
|
+
export { CalciteModal, defineCustomElement as defineCustomElementCalciteModal } from './calcite-modal.js';
|
59
|
+
export { CalciteNotice, defineCustomElement as defineCustomElementCalciteNotice } from './calcite-notice.js';
|
60
|
+
export { CalciteOption, defineCustomElement as defineCustomElementCalciteOption } from './calcite-option.js';
|
61
|
+
export { CalciteOptionGroup, defineCustomElement as defineCustomElementCalciteOptionGroup } from './calcite-option-group.js';
|
62
|
+
export { CalcitePagination, defineCustomElement as defineCustomElementCalcitePagination } from './calcite-pagination.js';
|
63
|
+
export { CalcitePanel, defineCustomElement as defineCustomElementCalcitePanel } from './calcite-panel.js';
|
64
|
+
export { CalcitePickList, defineCustomElement as defineCustomElementCalcitePickList } from './calcite-pick-list.js';
|
65
|
+
export { CalcitePickListGroup, defineCustomElement as defineCustomElementCalcitePickListGroup } from './calcite-pick-list-group.js';
|
66
|
+
export { CalcitePickListItem, defineCustomElement as defineCustomElementCalcitePickListItem } from './calcite-pick-list-item.js';
|
67
|
+
export { CalcitePopover, defineCustomElement as defineCustomElementCalcitePopover } from './calcite-popover.js';
|
68
|
+
export { CalcitePopoverManager, defineCustomElement as defineCustomElementCalcitePopoverManager } from './calcite-popover-manager.js';
|
69
|
+
export { CalciteProgress, defineCustomElement as defineCustomElementCalciteProgress } from './calcite-progress.js';
|
70
|
+
export { CalciteRadioButton, defineCustomElement as defineCustomElementCalciteRadioButton } from './calcite-radio-button.js';
|
71
|
+
export { CalciteRadioButtonGroup, defineCustomElement as defineCustomElementCalciteRadioButtonGroup } from './calcite-radio-button-group.js';
|
72
|
+
export { CalciteRadioGroup, defineCustomElement as defineCustomElementCalciteRadioGroup } from './calcite-radio-group.js';
|
73
|
+
export { CalciteRadioGroupItem, defineCustomElement as defineCustomElementCalciteRadioGroupItem } from './calcite-radio-group-item.js';
|
74
|
+
export { CalciteRating, defineCustomElement as defineCustomElementCalciteRating } from './calcite-rating.js';
|
75
|
+
export { CalciteScrim, defineCustomElement as defineCustomElementCalciteScrim } from './calcite-scrim.js';
|
76
|
+
export { CalciteSelect, defineCustomElement as defineCustomElementCalciteSelect } from './calcite-select.js';
|
77
|
+
export { CalciteShell, defineCustomElement as defineCustomElementCalciteShell } from './calcite-shell.js';
|
78
|
+
export { CalciteShellCenterRow, defineCustomElement as defineCustomElementCalciteShellCenterRow } from './calcite-shell-center-row.js';
|
79
|
+
export { CalciteShellPanel, defineCustomElement as defineCustomElementCalciteShellPanel } from './calcite-shell-panel.js';
|
80
|
+
export { CalciteSlider, defineCustomElement as defineCustomElementCalciteSlider } from './calcite-slider.js';
|
81
|
+
export { CalciteSortableList, defineCustomElement as defineCustomElementCalciteSortableList } from './calcite-sortable-list.js';
|
82
|
+
export { CalciteSplitButton, defineCustomElement as defineCustomElementCalciteSplitButton } from './calcite-split-button.js';
|
83
|
+
export { CalciteStepper, defineCustomElement as defineCustomElementCalciteStepper } from './calcite-stepper.js';
|
84
|
+
export { CalciteStepperItem, defineCustomElement as defineCustomElementCalciteStepperItem } from './calcite-stepper-item.js';
|
85
|
+
export { CalciteSwitch, defineCustomElement as defineCustomElementCalciteSwitch } from './calcite-switch.js';
|
86
|
+
export { CalciteTab, defineCustomElement as defineCustomElementCalciteTab } from './calcite-tab.js';
|
87
|
+
export { CalciteTabNav, defineCustomElement as defineCustomElementCalciteTabNav } from './calcite-tab-nav.js';
|
88
|
+
export { CalciteTabTitle, defineCustomElement as defineCustomElementCalciteTabTitle } from './calcite-tab-title.js';
|
89
|
+
export { CalciteTabs, defineCustomElement as defineCustomElementCalciteTabs } from './calcite-tabs.js';
|
90
|
+
export { CalciteTile, defineCustomElement as defineCustomElementCalciteTile } from './calcite-tile.js';
|
91
|
+
export { CalciteTileSelect, defineCustomElement as defineCustomElementCalciteTileSelect } from './calcite-tile-select.js';
|
92
|
+
export { CalciteTileSelectGroup, defineCustomElement as defineCustomElementCalciteTileSelectGroup } from './calcite-tile-select-group.js';
|
93
|
+
export { CalciteTimePicker, defineCustomElement as defineCustomElementCalciteTimePicker } from './calcite-time-picker.js';
|
94
|
+
export { CalciteTip, defineCustomElement as defineCustomElementCalciteTip } from './calcite-tip.js';
|
95
|
+
export { CalciteTipGroup, defineCustomElement as defineCustomElementCalciteTipGroup } from './calcite-tip-group.js';
|
96
|
+
export { CalciteTipManager, defineCustomElement as defineCustomElementCalciteTipManager } from './calcite-tip-manager.js';
|
97
|
+
export { CalciteTooltip, defineCustomElement as defineCustomElementCalciteTooltip } from './calcite-tooltip.js';
|
98
|
+
export { CalciteTooltipManager, defineCustomElement as defineCustomElementCalciteTooltipManager } from './calcite-tooltip-manager.js';
|
99
|
+
export { CalciteTree, defineCustomElement as defineCustomElementCalciteTree } from './calcite-tree.js';
|
100
|
+
export { CalciteTreeItem, defineCustomElement as defineCustomElementCalciteTreeItem } from './calcite-tree-item.js';
|
101
|
+
export { CalciteValueList, defineCustomElement as defineCustomElementCalciteValueList } from './calcite-value-list.js';
|
102
|
+
export { CalciteValueListItem, defineCustomElement as defineCustomElementCalciteValueListItem } from './calcite-value-list-item.js';
|
103
|
+
export { CardManager, defineCustomElement as defineCustomElementCardManager } from './card-manager.js';
|
104
|
+
export { CheckList, defineCustomElement as defineCustomElementCheckList } from './check-list.js';
|
105
|
+
export { CommentCard, defineCustomElement as defineCustomElementCommentCard } from './comment-card.js';
|
106
|
+
export { ConfigBufferTools, defineCustomElement as defineCustomElementConfigBufferTools } from './config-buffer-tools.js';
|
107
|
+
export { ConfigDrawTools, defineCustomElement as defineCustomElementConfigDrawTools } from './config-draw-tools.js';
|
108
|
+
export { ConfigLayerPicker, defineCustomElement as defineCustomElementConfigLayerPicker } from './config-layer-picker.js';
|
109
|
+
export { ConfigPdfDownload, defineCustomElement as defineCustomElementConfigPdfDownload } from './config-pdf-download.js';
|
110
|
+
export { CrowdsourceManager, defineCustomElement as defineCustomElementCrowdsourceManager } from './crowdsource-manager.js';
|
111
|
+
export { CrowdsourceReporter, defineCustomElement as defineCustomElementCrowdsourceReporter } from './crowdsource-reporter.js';
|
112
|
+
export { DeductCalculator, defineCustomElement as defineCustomElementDeductCalculator } from './deduct-calculator.js';
|
113
|
+
export { EditRecordModal, defineCustomElement as defineCustomElementEditRecordModal } from './edit-record-modal.js';
|
114
|
+
export { InfoCard, defineCustomElement as defineCustomElementInfoCard } from './info-card.js';
|
115
|
+
export { JsonEditor, defineCustomElement as defineCustomElementJsonEditor } from './json-editor.js';
|
116
|
+
export { LayerTable, defineCustomElement as defineCustomElementLayerTable } from './layer-table.js';
|
117
|
+
export { ListItem, defineCustomElement as defineCustomElementListItem } from './list-item.js';
|
118
|
+
export { MapCard, defineCustomElement as defineCustomElementMapCard } from './map-card.js';
|
119
|
+
export { MapDrawTools, defineCustomElement as defineCustomElementMapDrawTools } from './map-draw-tools.js';
|
120
|
+
export { MapLayerPicker, defineCustomElement as defineCustomElementMapLayerPicker } from './map-layer-picker.js';
|
121
|
+
export { MapSearch, defineCustomElement as defineCustomElementMapSearch } from './map-search.js';
|
122
|
+
export { MapSelectTools, defineCustomElement as defineCustomElementMapSelectTools } from './map-select-tools.js';
|
123
|
+
export { MediaCard, defineCustomElement as defineCustomElementMediaCard } from './media-card.js';
|
124
|
+
export { PciCalculator, defineCustomElement as defineCustomElementPciCalculator } from './pci-calculator.js';
|
125
|
+
export { PdfDownload, defineCustomElement as defineCustomElementPdfDownload } from './pdf-download.js';
|
126
|
+
export { PublicNotification, defineCustomElement as defineCustomElementPublicNotification } from './public-notification.js';
|
127
|
+
export { RefineSelection, defineCustomElement as defineCustomElementRefineSelection } from './refine-selection.js';
|
128
|
+
export { RefineSelectionTools, defineCustomElement as defineCustomElementRefineSelectionTools } from './refine-selection-tools.js';
|
129
|
+
export { SolutionConfiguration, defineCustomElement as defineCustomElementSolutionConfiguration } from './solution-configuration.js';
|
130
|
+
export { SolutionContents, defineCustomElement as defineCustomElementSolutionContents } from './solution-contents.js';
|
131
|
+
export { SolutionItem, defineCustomElement as defineCustomElementSolutionItem } from './solution-item.js';
|
132
|
+
export { SolutionItemDetails, defineCustomElement as defineCustomElementSolutionItemDetails } from './solution-item-details.js';
|
133
|
+
export { SolutionItemIcon, defineCustomElement as defineCustomElementSolutionItemIcon } from './solution-item-icon.js';
|
134
|
+
export { SolutionItemSharing, defineCustomElement as defineCustomElementSolutionItemSharing } from './solution-item-sharing.js';
|
135
|
+
export { SolutionOrganizationVariables, defineCustomElement as defineCustomElementSolutionOrganizationVariables } from './solution-organization-variables.js';
|
136
|
+
export { SolutionResourceItem, defineCustomElement as defineCustomElementSolutionResourceItem } from './solution-resource-item.js';
|
137
|
+
export { SolutionSpatialRef, defineCustomElement as defineCustomElementSolutionSpatialRef } from './solution-spatial-ref.js';
|
138
|
+
export { SolutionTemplateData, defineCustomElement as defineCustomElementSolutionTemplateData } from './solution-template-data.js';
|
139
|
+
export { SolutionVariables, defineCustomElement as defineCustomElementSolutionVariables } from './solution-variables.js';
|
140
|
+
export { StoreManager, defineCustomElement as defineCustomElementStoreManager } from './store-manager.js';
|
141
|
+
|
142
|
+
/*!
|
143
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
144
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
145
|
+
* v1.0.0-beta.97
|
146
|
+
*/
|
147
|
+
/**
|
148
|
+
* Emits when the theme is dynamically toggled between light and dark on <body> or in OS preferences.
|
149
|
+
*/
|
150
|
+
function initThemeChangeEvent() {
|
151
|
+
const { classList } = document.body;
|
152
|
+
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
153
|
+
const getTheme = () => classList.contains(darkTheme) || (classList.contains(autoTheme) && prefersDark) ? "dark" : "light";
|
154
|
+
const emitThemeChange = (theme) => document.body.dispatchEvent(new CustomEvent("calciteThemeChange", { bubbles: true, detail: { theme } }));
|
155
|
+
const themeChangeHandler = (newTheme) => {
|
156
|
+
currentTheme !== newTheme && emitThemeChange(newTheme);
|
157
|
+
currentTheme = newTheme;
|
158
|
+
};
|
159
|
+
let currentTheme = getTheme();
|
160
|
+
// emits event on page load
|
161
|
+
emitThemeChange(currentTheme);
|
162
|
+
// emits event when changing OS theme preferences
|
163
|
+
window
|
164
|
+
.matchMedia("(prefers-color-scheme: dark)")
|
165
|
+
.addEventListener("change", (event) => themeChangeHandler(event.matches ? "dark" : "light"));
|
166
|
+
// emits event when toggling between theme classes on <body>
|
167
|
+
new MutationObserver(() => themeChangeHandler(getTheme())).observe(document.body, {
|
168
|
+
attributes: true,
|
169
|
+
attributeFilter: ["class"]
|
170
|
+
});
|
171
|
+
}
|
172
|
+
|
173
|
+
/**
|
174
|
+
* This file is imported in Stencil's `globalScript` config option.
|
175
|
+
*
|
176
|
+
* @see {@link https://stenciljs.com/docs/config#globalscript}
|
177
|
+
*/
|
178
|
+
function appGlobalScript () {
|
179
|
+
const isBrowser = typeof window !== "undefined" &&
|
180
|
+
typeof location !== "undefined" &&
|
181
|
+
typeof document !== "undefined" &&
|
182
|
+
window.location === location &&
|
183
|
+
window.document === document;
|
184
|
+
if (isBrowser) {
|
185
|
+
if (document.readyState === "interactive") {
|
186
|
+
initThemeChangeEvent();
|
187
|
+
}
|
188
|
+
else {
|
189
|
+
document.addEventListener("DOMContentLoaded", () => initThemeChangeEvent(), { once: true });
|
190
|
+
}
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
const globalScripts = appGlobalScript;
|
195
|
+
|
196
|
+
globalScripts();
|
@@ -0,0 +1,199 @@
|
|
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 { getRenderingRef, forceUpdate } from '@stencil/core/internal/client';
|
7
|
+
|
8
|
+
const appendToMap = (map, propName, value) => {
|
9
|
+
const items = map.get(propName);
|
10
|
+
if (!items) {
|
11
|
+
map.set(propName, [value]);
|
12
|
+
}
|
13
|
+
else if (!items.includes(value)) {
|
14
|
+
items.push(value);
|
15
|
+
}
|
16
|
+
};
|
17
|
+
const debounce = (fn, ms) => {
|
18
|
+
let timeoutId;
|
19
|
+
return (...args) => {
|
20
|
+
if (timeoutId) {
|
21
|
+
clearTimeout(timeoutId);
|
22
|
+
}
|
23
|
+
timeoutId = setTimeout(() => {
|
24
|
+
timeoutId = 0;
|
25
|
+
fn(...args);
|
26
|
+
}, ms);
|
27
|
+
};
|
28
|
+
};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Check if a possible element isConnected.
|
32
|
+
* The property might not be there, so we check for it.
|
33
|
+
*
|
34
|
+
* We want it to return true if isConnected is not a property,
|
35
|
+
* otherwise we would remove these elements and would not update.
|
36
|
+
*
|
37
|
+
* Better leak in Edge than to be useless.
|
38
|
+
*/
|
39
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
40
|
+
const cleanupElements = debounce((map) => {
|
41
|
+
for (let key of map.keys()) {
|
42
|
+
map.set(key, map.get(key).filter(isConnected));
|
43
|
+
}
|
44
|
+
}, 2000);
|
45
|
+
const stencilSubscription = () => {
|
46
|
+
if (typeof getRenderingRef !== 'function') {
|
47
|
+
// If we are not in a stencil project, we do nothing.
|
48
|
+
// This function is not really exported by @stencil/core.
|
49
|
+
return {};
|
50
|
+
}
|
51
|
+
const elmsToUpdate = new Map();
|
52
|
+
return {
|
53
|
+
dispose: () => elmsToUpdate.clear(),
|
54
|
+
get: (propName) => {
|
55
|
+
const elm = getRenderingRef();
|
56
|
+
if (elm) {
|
57
|
+
appendToMap(elmsToUpdate, propName, elm);
|
58
|
+
}
|
59
|
+
},
|
60
|
+
set: (propName) => {
|
61
|
+
const elements = elmsToUpdate.get(propName);
|
62
|
+
if (elements) {
|
63
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
64
|
+
}
|
65
|
+
cleanupElements(elmsToUpdate);
|
66
|
+
},
|
67
|
+
reset: () => {
|
68
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
69
|
+
cleanupElements(elmsToUpdate);
|
70
|
+
},
|
71
|
+
};
|
72
|
+
};
|
73
|
+
|
74
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
75
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
76
|
+
const unwrappedState = unwrap(defaultState);
|
77
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
78
|
+
const handlers = {
|
79
|
+
dispose: [],
|
80
|
+
get: [],
|
81
|
+
set: [],
|
82
|
+
reset: [],
|
83
|
+
};
|
84
|
+
const reset = () => {
|
85
|
+
var _a;
|
86
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
87
|
+
// otherwise, the state won't be properly reset
|
88
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
89
|
+
handlers.reset.forEach((cb) => cb());
|
90
|
+
};
|
91
|
+
const dispose = () => {
|
92
|
+
// Call first dispose as resetting the state would
|
93
|
+
// cause less updates ;)
|
94
|
+
handlers.dispose.forEach((cb) => cb());
|
95
|
+
reset();
|
96
|
+
};
|
97
|
+
const get = (propName) => {
|
98
|
+
handlers.get.forEach((cb) => cb(propName));
|
99
|
+
return states.get(propName);
|
100
|
+
};
|
101
|
+
const set = (propName, value) => {
|
102
|
+
const oldValue = states.get(propName);
|
103
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
104
|
+
states.set(propName, value);
|
105
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
106
|
+
}
|
107
|
+
};
|
108
|
+
const state = (typeof Proxy === 'undefined'
|
109
|
+
? {}
|
110
|
+
: new Proxy(unwrappedState, {
|
111
|
+
get(_, propName) {
|
112
|
+
return get(propName);
|
113
|
+
},
|
114
|
+
ownKeys(_) {
|
115
|
+
return Array.from(states.keys());
|
116
|
+
},
|
117
|
+
getOwnPropertyDescriptor() {
|
118
|
+
return {
|
119
|
+
enumerable: true,
|
120
|
+
configurable: true,
|
121
|
+
};
|
122
|
+
},
|
123
|
+
has(_, propName) {
|
124
|
+
return states.has(propName);
|
125
|
+
},
|
126
|
+
set(_, propName, value) {
|
127
|
+
set(propName, value);
|
128
|
+
return true;
|
129
|
+
},
|
130
|
+
}));
|
131
|
+
const on = (eventName, callback) => {
|
132
|
+
handlers[eventName].push(callback);
|
133
|
+
return () => {
|
134
|
+
removeFromArray(handlers[eventName], callback);
|
135
|
+
};
|
136
|
+
};
|
137
|
+
const onChange = (propName, cb) => {
|
138
|
+
const unSet = on('set', (key, newValue) => {
|
139
|
+
if (key === propName) {
|
140
|
+
cb(newValue);
|
141
|
+
}
|
142
|
+
});
|
143
|
+
// We need to unwrap the defaultState because it might be a function.
|
144
|
+
// Otherwise we might not be sending the right reset value.
|
145
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
146
|
+
return () => {
|
147
|
+
unSet();
|
148
|
+
unReset();
|
149
|
+
};
|
150
|
+
};
|
151
|
+
const use = (...subscriptions) => {
|
152
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
153
|
+
if (subscription.set) {
|
154
|
+
unsubs.push(on('set', subscription.set));
|
155
|
+
}
|
156
|
+
if (subscription.get) {
|
157
|
+
unsubs.push(on('get', subscription.get));
|
158
|
+
}
|
159
|
+
if (subscription.reset) {
|
160
|
+
unsubs.push(on('reset', subscription.reset));
|
161
|
+
}
|
162
|
+
if (subscription.dispose) {
|
163
|
+
unsubs.push(on('dispose', subscription.dispose));
|
164
|
+
}
|
165
|
+
return unsubs;
|
166
|
+
}, []);
|
167
|
+
return () => unsubs.forEach((unsub) => unsub());
|
168
|
+
};
|
169
|
+
const forceUpdate = (key) => {
|
170
|
+
const oldValue = states.get(key);
|
171
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
172
|
+
};
|
173
|
+
return {
|
174
|
+
state,
|
175
|
+
get,
|
176
|
+
set,
|
177
|
+
on,
|
178
|
+
onChange,
|
179
|
+
use,
|
180
|
+
dispose,
|
181
|
+
reset,
|
182
|
+
forceUpdate,
|
183
|
+
};
|
184
|
+
};
|
185
|
+
const removeFromArray = (array, item) => {
|
186
|
+
const index = array.indexOf(item);
|
187
|
+
if (index >= 0) {
|
188
|
+
array[index] = array[array.length - 1];
|
189
|
+
array.length--;
|
190
|
+
}
|
191
|
+
};
|
192
|
+
|
193
|
+
const createStore = (defaultState, shouldUpdate) => {
|
194
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
195
|
+
map.use(stencilSubscription());
|
196
|
+
return map;
|
197
|
+
};
|
198
|
+
|
199
|
+
export { createStore as c };
|