@esri/solutions-components 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/t9n/solution-config-modal/resources.json +22 -0
- package/dist/assets/t9n/solution-config-modal/resources_en.json +22 -0
- package/dist/cjs/calcite-action-menu_2.cjs.entry.js +18 -401
- package/dist/cjs/calcite-action-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/calcite-action_2.cjs.entry.js +423 -71
- package/dist/cjs/calcite-action_2.cjs.entry.js.map +1 -1
- package/dist/cjs/calcite-loader.cjs.entry.js +97 -0
- package/dist/cjs/calcite-loader.cjs.entry.js.map +1 -0
- package/dist/cjs/{solution-configuration.cjs.entry.js → calcite-modal_2.cjs.entry.js} +451 -13
- package/dist/cjs/calcite-modal_2.cjs.entry.js.map +1 -0
- package/dist/cjs/{calcite-shell-panel_14.cjs.entry.js → calcite-panel_12.cjs.entry.js} +455 -709
- package/dist/cjs/calcite-panel_12.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solution-config-modal.cjs.entry.js +131 -0
- package/dist/cjs/solution-config-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/{solution-contents_3.cjs.entry.js → solution-contents_7.cjs.entry.js} +664 -5
- package/dist/cjs/solution-contents_7.cjs.entry.js.map +1 -0
- package/dist/cjs/{solution-store-893499a5.js → solution-store-09b3fc53.js} +4 -6
- package/dist/cjs/solution-store-09b3fc53.js.map +1 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/solution-config-modal/solution-config-modal.css +91 -0
- package/dist/collection/components/solution-config-modal/solution-config-modal.js +245 -0
- package/dist/collection/components/solution-config-modal/solution-config-modal.js.map +1 -0
- package/dist/collection/components/solution-configuration/solution-configuration.js +23 -17
- package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
- package/dist/collection/components/solution-item/solution-item.js +0 -2
- package/dist/collection/components/solution-item/solution-item.js.map +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +0 -13
- package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
- package/dist/collection/utils/solution-store.js +3 -5
- package/dist/collection/utils/solution-store.js.map +1 -1
- package/dist/collection/utils/solution-store.ts +3 -5
- package/dist/esm/buffer-tools_6.entry.js +2 -2
- package/dist/esm/calcite-action-bar_6.entry.js +2 -2
- package/dist/esm/calcite-action-menu_2.entry.js +20 -403
- package/dist/esm/calcite-action-menu_2.entry.js.map +1 -1
- package/dist/esm/calcite-action_2.entry.js +424 -72
- package/dist/esm/calcite-action_2.entry.js.map +1 -1
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-loader.entry.js +93 -0
- package/dist/esm/calcite-loader.entry.js.map +1 -0
- package/dist/esm/{solution-configuration.entry.js → calcite-modal_2.entry.js} +453 -16
- package/dist/esm/calcite-modal_2.entry.js.map +1 -0
- package/dist/esm/{calcite-shell-panel_14.entry.js → calcite-panel_12.entry.js} +454 -706
- package/dist/esm/calcite-panel_12.entry.js.map +1 -0
- package/dist/esm/config-layer-picker.entry.js +2 -2
- package/dist/esm/{interfaces-e2a2064d.js → interfaces-1bdfc3a8.js} +2 -2
- package/dist/esm/{interfaces-e2a2064d.js.map → interfaces-1bdfc3a8.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-09f1e7bd.js → mapViewUtils-809947c8.js} +2 -2
- package/dist/esm/{mapViewUtils-09f1e7bd.js.map → mapViewUtils-809947c8.js.map} +1 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-config-modal.entry.js +127 -0
- package/dist/esm/solution-config-modal.entry.js.map +1 -0
- package/dist/esm/{solution-contents_3.entry.js → solution-contents_7.entry.js} +661 -6
- package/dist/esm/solution-contents_7.entry.js.map +1 -0
- package/dist/esm/{solution-store-0c58c852.js → solution-store-d8519c64.js} +5 -7
- package/dist/esm/solution-store-d8519c64.js.map +1 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-be1ed982.entry.js → p-11068040.entry.js} +3 -3
- package/dist/solutions-components/{p-be1ed982.entry.js.map → p-11068040.entry.js.map} +0 -0
- package/dist/solutions-components/{p-659edb14.js → p-2910dd9e.js} +5 -7
- package/dist/{cjs/solution-store-893499a5.js.map → solutions-components/p-2910dd9e.js.map} +1 -1
- package/dist/solutions-components/{p-291fd295.entry.js → p-30810b45.entry.js} +3 -3
- package/dist/solutions-components/{p-291fd295.entry.js.map → p-30810b45.entry.js.map} +0 -0
- package/dist/solutions-components/p-38ddadf2.entry.js +342 -0
- package/dist/solutions-components/p-38ddadf2.entry.js.map +1 -0
- package/dist/solutions-components/{p-77c75f3a.entry.js → p-5b20090f.entry.js} +661 -6
- package/dist/solutions-components/p-5b20090f.entry.js.map +1 -0
- package/dist/solutions-components/{p-9393631c.entry.js → p-9ef1328a.entry.js} +3 -3
- package/dist/solutions-components/{p-9393631c.entry.js.map → p-9ef1328a.entry.js.map} +0 -0
- package/dist/solutions-components/{p-984cb687.entry.js → p-a1786d11.entry.js} +454 -706
- package/dist/solutions-components/p-a1786d11.entry.js.map +1 -0
- package/dist/solutions-components/{p-fe0fdd8b.js → p-c20bd963.js} +2 -2
- package/dist/solutions-components/{p-fe0fdd8b.js.map → p-c20bd963.js.map} +1 -1
- package/dist/solutions-components/p-c5721b0f.entry.js +127 -0
- package/dist/solutions-components/p-c5721b0f.entry.js.map +1 -0
- package/dist/solutions-components/{p-24d75151.entry.js → p-c818e661.entry.js} +3 -3
- package/dist/solutions-components/{p-24d75151.entry.js.map → p-c818e661.entry.js.map} +0 -0
- package/dist/solutions-components/{p-90629c1d.entry.js → p-cf59eb16.entry.js} +453 -16
- package/dist/solutions-components/p-cf59eb16.entry.js.map +1 -0
- package/dist/solutions-components/p-e405ebe8.entry.js +93 -0
- package/dist/solutions-components/p-e405ebe8.entry.js.map +1 -0
- package/dist/solutions-components/{p-77e6b03c.entry.js → p-e6fb9cde.entry.js} +3 -3
- package/dist/solutions-components/{p-77e6b03c.entry.js.map → p-e6fb9cde.entry.js.map} +0 -0
- package/dist/solutions-components/{p-97c4a268.entry.js → p-ef6f9e24.entry.js} +113 -229
- package/dist/solutions-components/p-ef6f9e24.entry.js.map +1 -0
- package/dist/solutions-components/{p-6b9dc092.js → p-f04fdb9a.js} +2 -2
- package/dist/solutions-components/{p-6b9dc092.js.map → p-f04fdb9a.js.map} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/solution-store.ts +3 -5
- package/dist/solutions-components_commit.txt +8 -8
- package/dist/types/components/solution-config-modal/solution-config-modal.d.ts +69 -0
- package/dist/types/components/solution-configuration/solution-configuration.d.ts +4 -2
- package/dist/types/components/solution-item-details/solution-item-details.d.ts +0 -1
- package/dist/types/components.d.ts +43 -5
- package/dist/types/preact.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/calcite-modal.cjs.entry.js +0 -449
- package/dist/cjs/calcite-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/calcite-panel_2.cjs.entry.js +0 -439
- package/dist/cjs/calcite-panel_2.cjs.entry.js.map +0 -1
- package/dist/cjs/calcite-scrim.cjs.entry.js +0 -64
- package/dist/cjs/calcite-scrim.cjs.entry.js.map +0 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +0 -1
- package/dist/cjs/solution-configuration.cjs.entry.js.map +0 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js.map +0 -1
- package/dist/esm/calcite-modal.entry.js +0 -445
- package/dist/esm/calcite-modal.entry.js.map +0 -1
- package/dist/esm/calcite-panel_2.entry.js +0 -434
- package/dist/esm/calcite-panel_2.entry.js.map +0 -1
- package/dist/esm/calcite-scrim.entry.js +0 -60
- package/dist/esm/calcite-scrim.entry.js.map +0 -1
- package/dist/esm/calcite-shell-panel_14.entry.js.map +0 -1
- package/dist/esm/solution-configuration.entry.js.map +0 -1
- package/dist/esm/solution-contents_3.entry.js.map +0 -1
- package/dist/esm/solution-store-0c58c852.js.map +0 -1
- package/dist/solutions-components/p-0fda7d9e.entry.js +0 -434
- package/dist/solutions-components/p-0fda7d9e.entry.js.map +0 -1
- package/dist/solutions-components/p-2ff754ce.entry.js +0 -257
- package/dist/solutions-components/p-2ff754ce.entry.js.map +0 -1
- package/dist/solutions-components/p-30a6199a.entry.js +0 -445
- package/dist/solutions-components/p-30a6199a.entry.js.map +0 -1
- package/dist/solutions-components/p-659edb14.js.map +0 -1
- package/dist/solutions-components/p-77c75f3a.entry.js.map +0 -1
- package/dist/solutions-components/p-90629c1d.entry.js.map +0 -1
- package/dist/solutions-components/p-97c4a268.entry.js.map +0 -1
- package/dist/solutions-components/p-984cb687.entry.js.map +0 -1
- package/dist/solutions-components/p-f5268b4f.entry.js +0 -60
- package/dist/solutions-components/p-f5268b4f.entry.js.map +0 -1
|
@@ -3,13 +3,448 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-15022d11.js';
|
|
7
|
-
import {
|
|
6
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-15022d11.js';
|
|
7
|
+
import { f as focusElement, a as getSlotted, h as ensureId, j as isCalciteFocusable } from './dom-e593bf85.js';
|
|
8
|
+
import { c as createObserver } from './observers-31601001.js';
|
|
9
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-bb4cab11.js';
|
|
10
|
+
import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent-5caff873.js';
|
|
11
|
+
import { r as request, N as NODEJS_DEFAULT_REFERER_HEADER, c as cleanUrl, e as encodeQueryString, A as ArcGISAuthError, g as getProp, s as state } from './solution-store-d8519c64.js';
|
|
8
12
|
import { g as getLocaleComponentStrings } from './locale-0e10d7e5.js';
|
|
13
|
+
import './resources-436ae282.js';
|
|
14
|
+
import './guid-15fce7c0.js';
|
|
9
15
|
import './index-9c882a6e.js';
|
|
10
|
-
import './interfaces-
|
|
16
|
+
import './interfaces-1bdfc3a8.js';
|
|
11
17
|
import './_commonjsHelpers-8fd39c50.js';
|
|
12
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Traverses the slots of the open shadowroots and returns all children matching the query.
|
|
21
|
+
* @param {ShadowRoot | HTMLElement} root
|
|
22
|
+
* @param skipNode
|
|
23
|
+
* @param isMatch
|
|
24
|
+
* @param {number} maxDepth
|
|
25
|
+
* @param {number} depth
|
|
26
|
+
* @returns {HTMLElement[]}
|
|
27
|
+
*/
|
|
28
|
+
function queryShadowRoot(root, skipNode, isMatch, maxDepth = 20, depth = 0) {
|
|
29
|
+
let matches = [];
|
|
30
|
+
// If the depth is above the max depth, abort the searching here.
|
|
31
|
+
if (depth >= maxDepth) {
|
|
32
|
+
return matches;
|
|
33
|
+
}
|
|
34
|
+
// Traverses a slot element
|
|
35
|
+
const traverseSlot = ($slot) => {
|
|
36
|
+
// Only check nodes that are of the type Node.ELEMENT_NODE
|
|
37
|
+
// Read more here https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
38
|
+
const assignedNodes = $slot.assignedNodes().filter(node => node.nodeType === 1);
|
|
39
|
+
if (assignedNodes.length > 0) {
|
|
40
|
+
return queryShadowRoot(assignedNodes[0].parentElement, skipNode, isMatch, maxDepth, depth + 1);
|
|
41
|
+
}
|
|
42
|
+
return [];
|
|
43
|
+
};
|
|
44
|
+
// Go through each child and continue the traversing if necessary
|
|
45
|
+
// Even though the typing says that children can't be undefined, Edge 15 sometimes gives an undefined value.
|
|
46
|
+
// Therefore we fallback to an empty array if it is undefined.
|
|
47
|
+
const children = Array.from(root.children || []);
|
|
48
|
+
for (const $child of children) {
|
|
49
|
+
// Check if the node and its descendants should be skipped
|
|
50
|
+
if (skipNode($child)) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
// If the child matches we always add it
|
|
54
|
+
if (isMatch($child)) {
|
|
55
|
+
matches.push($child);
|
|
56
|
+
}
|
|
57
|
+
if ($child.shadowRoot != null) {
|
|
58
|
+
matches.push(...queryShadowRoot($child.shadowRoot, skipNode, isMatch, maxDepth, depth + 1));
|
|
59
|
+
}
|
|
60
|
+
else if ($child.tagName === "SLOT") {
|
|
61
|
+
matches.push(...traverseSlot($child));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
matches.push(...queryShadowRoot($child, skipNode, isMatch, maxDepth, depth + 1));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return matches;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Returns whether the element is hidden.
|
|
72
|
+
* @param $elem
|
|
73
|
+
*/
|
|
74
|
+
function isHidden($elem) {
|
|
75
|
+
return $elem.hasAttribute("hidden")
|
|
76
|
+
|| ($elem.hasAttribute("aria-hidden") && $elem.getAttribute("aria-hidden") !== "false")
|
|
77
|
+
// A quick and dirty way to check whether the element is hidden.
|
|
78
|
+
// For a more fine-grained check we could use "window.getComputedStyle" but we don't because of bad performance.
|
|
79
|
+
// If the element has visibility set to "hidden" or "collapse", display set to "none" or opacity set to "0" through CSS
|
|
80
|
+
// we won't be able to catch it here. We accept it due to the huge performance benefits.
|
|
81
|
+
|| $elem.style.display === `none`
|
|
82
|
+
|| $elem.style.opacity === `0`
|
|
83
|
+
|| $elem.style.visibility === `hidden`
|
|
84
|
+
|| $elem.style.visibility === `collapse`;
|
|
85
|
+
// If offsetParent is null we can assume that the element is hidden
|
|
86
|
+
// https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null
|
|
87
|
+
//|| $elem.offsetParent == null;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns whether the element is disabled.
|
|
91
|
+
* @param $elem
|
|
92
|
+
*/
|
|
93
|
+
function isDisabled($elem) {
|
|
94
|
+
return $elem.hasAttribute("disabled")
|
|
95
|
+
|| ($elem.hasAttribute("aria-disabled") && $elem.getAttribute("aria-disabled") !== "false");
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Determines whether an element is focusable.
|
|
99
|
+
* Read more here: https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus/1600194#1600194
|
|
100
|
+
* Or here: https://stackoverflow.com/questions/18261595/how-to-check-if-a-dom-element-is-focusable
|
|
101
|
+
* @param $elem
|
|
102
|
+
*/
|
|
103
|
+
function isFocusable($elem) {
|
|
104
|
+
// Discard elements that are removed from the tab order.
|
|
105
|
+
if ($elem.getAttribute("tabindex") === "-1" || isHidden($elem) || isDisabled($elem)) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
return (
|
|
109
|
+
// At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists
|
|
110
|
+
$elem.hasAttribute("tabindex")
|
|
111
|
+
// Anchor tags or area tags with a href set
|
|
112
|
+
|| ($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) && $elem.hasAttribute("href")
|
|
113
|
+
// Form elements which are not disabled
|
|
114
|
+
|| ($elem instanceof HTMLButtonElement
|
|
115
|
+
|| $elem instanceof HTMLInputElement
|
|
116
|
+
|| $elem instanceof HTMLTextAreaElement
|
|
117
|
+
|| $elem instanceof HTMLSelectElement)
|
|
118
|
+
// IFrames
|
|
119
|
+
|| $elem instanceof HTMLIFrameElement);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/*!
|
|
123
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
124
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
125
|
+
* v1.0.0-beta.97
|
|
126
|
+
*/
|
|
127
|
+
const CSS = {
|
|
128
|
+
modal: "modal",
|
|
129
|
+
modalOpen: "modal--open",
|
|
130
|
+
title: "title",
|
|
131
|
+
header: "header",
|
|
132
|
+
footer: "footer",
|
|
133
|
+
scrim: "scrim",
|
|
134
|
+
back: "back",
|
|
135
|
+
close: "close",
|
|
136
|
+
secondary: "secondary",
|
|
137
|
+
primary: "primary",
|
|
138
|
+
overflowHidden: "overflow-hidden",
|
|
139
|
+
// these classes help apply the animation in phases to only set transform on open/close
|
|
140
|
+
// this helps avoid a positioning issue for any floating-ui-owning children
|
|
141
|
+
openingIdle: "modal--opening-idle",
|
|
142
|
+
openingActive: "modal--opening-active",
|
|
143
|
+
closingIdle: "modal--closing-idle",
|
|
144
|
+
closingActive: "modal--closing-active"
|
|
145
|
+
};
|
|
146
|
+
const ICONS = {
|
|
147
|
+
close: "x"
|
|
148
|
+
};
|
|
149
|
+
const SLOTS = {
|
|
150
|
+
content: "content",
|
|
151
|
+
header: "header",
|
|
152
|
+
back: "back",
|
|
153
|
+
secondary: "secondary",
|
|
154
|
+
primary: "primary"
|
|
155
|
+
};
|
|
156
|
+
const TEXT = {
|
|
157
|
+
close: "Close"
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const modalCss = "@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{position:fixed;inset:0px;z-index:700;display:flex;align-items:center;justify-content:center;overflow-y:hidden;color:var(--calcite-ui-text-2);opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88)}:host([scale=s]){--calcite-modal-padding:0.75rem;--calcite-modal-padding-large:1rem;--calcite-modal-title-text:var(--calcite-font-size-1);--calcite-modal-content-text:var(--calcite-font-size--1);--calcite-modal-padding-internal:0.75rem;--calcite-modal-padding-large-internal:1rem;--calcite-modal-title-text-internal:var(--calcite-font-size-1);--calcite-modal-content-text-internal:var(--calcite-font-size--1)}:host([scale=m]){--calcite-modal-padding:1rem;--calcite-modal-padding-large:1.25rem;--calcite-modal-title-text:var(--calcite-font-size-2);--calcite-modal-content-text:var(--calcite-font-size-0);--calcite-modal-padding-internal:1rem;--calcite-modal-padding-large-internal:1.25rem;--calcite-modal-title-text-internal:var(--calcite-font-size-2);--calcite-modal-content-text-internal:var(--calcite-font-size-0)}:host([scale=l]){--calcite-modal-padding:1.25rem;--calcite-modal-padding-large:1.5rem;--calcite-modal-title-text:var(--calcite-font-size-3);--calcite-modal-content-text:var(--calcite-font-size-1);--calcite-modal-padding-internal:1.25rem;--calcite-modal-padding-large-internal:1.5rem;--calcite-modal-title-text-internal:var(--calcite-font-size-3);--calcite-modal-content-text-internal:var(--calcite-font-size-1)}.scrim{--calcite-scrim-background:rgba(0, 0, 0, 0.75);position:fixed;inset:0px;display:flex;overflow-y:hidden}.modal{pointer-events:none;z-index:800;float:none;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);opacity:0;--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-hidden-position:translate3d(0, 20px, 0);--calcite-modal-shown-position:translate3d(0, 0, 0)}.modal--opening-idle{transform:var(--calcite-modal-hidden-position)}.modal--opening-active{transform:var(--calcite-modal-shown-position)}.modal--closing-idle{transform:var(--calcite-modal-shown-position)}.modal--closing-active{transform:var(--calcite-modal-hidden-position)}:host([open]){opacity:1;visibility:visible !important;transition-delay:0ms}:host([open]) .modal--open{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear, opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-inline-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-block-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);transition-delay:0ms}.header{z-index:400;display:flex;min-inline-size:0px;max-inline-size:100%;border-start-start-radius:0.25rem;border-start-end-radius:0.25rem;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto}.close{order:2;margin:0px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-start-end-radius:0.25rem;padding-block:var(--calcite-modal-padding, var(--calcite-modal-padding-internal));padding-inline:var(--calcite-modal-padding, var(--calcite-modal-padding-internal));flex:0 0 auto}.close calcite-icon{pointer-events:none;vertical-align:-2px}.close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.close:hover,.close:focus,.close:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.title{order:1;display:flex;min-inline-size:0px;align-items:center;flex:1 1 auto;padding-block:var(--calcite-modal-padding, var(--calcite-model-padding-internal));padding-inline:var(--calcite-modal-padding-large, var(--calcite-modal-padding-large-internal))}slot[name=header]::slotted(*),*::slotted([slot=header]){margin:0px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1);font-size:var(--calcite-modal-title-text, var(--calcite-modal-title-text-internal))}.content{position:relative;box-sizing:border-box;display:block;block-size:100%;overflow:auto;background-color:var(--calcite-ui-foreground-1);padding:0px;max-block-size:calc(100vh - 12rem)}.content--spaced{padding:var(--calcite-modal-padding)}.content--no-footer{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}slot[name=content]::slotted(*),*::slotted([slot=content]){font-size:var(--calcite-modal-content-text, var(--calcite-modal-context-text-internal))}:host([background-color=grey]) .content{background-color:var(--calcite-ui-background)}.footer{z-index:400;-webkit-margin-before:auto;margin-block-start:auto;box-sizing:border-box;display:flex;inline-size:100%;justify-content:space-between;border-end-end-radius:0.25rem;border-end-start-radius:0.25rem;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto;padding-block:var(--calcite-modal-padding, var(--calcite-modal-padding-internal));padding-inline:var(--calcite-modal-padding-large, var(--calcite-modal-padding-large-internal))}.footer--hide-back .back,.footer--hide-secondary .secondary{display:none}.back{display:block;-webkit-margin-end:auto;margin-inline-end:auto}.secondary{margin-inline:0.25rem;display:block}slot[name=primary]{display:block}:host([width=small]) .modal{inline-size:auto}:host([width=s]) .modal{max-inline-size:32rem}@media screen and (max-width: 35rem){:host([width=s]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}:host([width=s]) .content{flex:1 1 auto;max-block-size:unset}:host([width=s][docked]){align-items:flex-end}}:host([width=m]) .modal{max-inline-size:48rem}@media screen and (max-width: 51rem){:host([width=m]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}:host([width=m]) .content{flex:1 1 auto;max-block-size:unset}:host([width=m][docked]){align-items:flex-end}}:host([width=l]) .modal{max-inline-size:94rem}@media screen and (max-width: 97rem){:host([width=l]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}:host([width=l]) .content{flex:1 1 auto;max-block-size:unset}:host([width=l][docked]){align-items:flex-end}}:host([fullscreen]){background-color:transparent}:host([fullscreen]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;--calcite-modal-hidden-position:translate3D(0, 20px, 0) scale(0.95);--calcite-modal-shown-position:translate3D(0, 0, 0) scale(1)}:host([fullscreen]) .content{max-block-size:100%;flex:1 1 auto}:host([open][fullscreen]) .header{border-radius:0}:host([open][fullscreen]) .footer{border-radius:0}:host([docked]) .modal{block-size:auto}:host([docked]) .content{block-size:auto;flex:1 1 auto}@media screen and (max-width: 860px){:host([docked]) .modal{border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}:host([docked]) .close{border-start-end-radius:var(--calcite-border-radius)}}:host([color=red]) .modal{border-color:var(--calcite-ui-danger)}:host([color=blue]) .modal{border-color:var(--calcite-ui-info)}:host([color=red]) .modal,:host([color=blue]) .modal{border-width:0px;border-block-start-width:4px;border-style:solid}:host([color=red]) .header,:host([color=blue]) .header{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){slot[name=header]::slotted(*),*::slotted([slot=header]){font-size:var(--calcite-font-size-1)}.footer{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){.footer{flex-direction:column}.back,.secondary{margin:0px;-webkit-margin-after:0.25rem;margin-block-end:0.25rem}}";
|
|
161
|
+
|
|
162
|
+
const isFocusableExtended = (el) => {
|
|
163
|
+
return isCalciteFocusable(el) || isFocusable(el);
|
|
164
|
+
};
|
|
165
|
+
const getFocusableElements = (el) => {
|
|
166
|
+
return queryShadowRoot(el, isHidden, isFocusableExtended);
|
|
167
|
+
};
|
|
168
|
+
const Modal = class {
|
|
169
|
+
constructor(hostRef) {
|
|
170
|
+
registerInstance(this, hostRef);
|
|
171
|
+
this.calciteModalBeforeClose = createEvent(this, "calciteModalBeforeClose", 6);
|
|
172
|
+
this.calciteModalClose = createEvent(this, "calciteModalClose", 6);
|
|
173
|
+
this.calciteModalBeforeOpen = createEvent(this, "calciteModalBeforeOpen", 6);
|
|
174
|
+
this.calciteModalOpen = createEvent(this, "calciteModalOpen", 6);
|
|
175
|
+
//--------------------------------------------------------------------------
|
|
176
|
+
//
|
|
177
|
+
// Properties
|
|
178
|
+
//
|
|
179
|
+
//--------------------------------------------------------------------------
|
|
180
|
+
/**
|
|
181
|
+
* When `true`, the component is active.
|
|
182
|
+
*
|
|
183
|
+
* @deprecated use `open` instead.
|
|
184
|
+
*/
|
|
185
|
+
this.active = false;
|
|
186
|
+
/** When `true`, displays and positions the component. */
|
|
187
|
+
this.open = false;
|
|
188
|
+
/** Passes a function to run before the component closes. */
|
|
189
|
+
this.beforeClose = () => Promise.resolve();
|
|
190
|
+
/** When `true`, disables the component's close button. */
|
|
191
|
+
this.disableCloseButton = false;
|
|
192
|
+
/** When `true`, disables the closing of the component when clicked outside. */
|
|
193
|
+
this.disableOutsideClose = false;
|
|
194
|
+
/** Accessible name for the component's close button. */
|
|
195
|
+
this.intlClose = TEXT.close;
|
|
196
|
+
/** When `true`, disables the default close on escape behavior. */
|
|
197
|
+
this.disableEscape = false;
|
|
198
|
+
/** Specifies the size of the component. */
|
|
199
|
+
this.scale = "m";
|
|
200
|
+
/** Specifies the width of the component. Can use scale sizes or pass a number (displays in pixels). */
|
|
201
|
+
this.width = "m";
|
|
202
|
+
/** Sets the background color of the component's content. */
|
|
203
|
+
this.backgroundColor = "white";
|
|
204
|
+
/**
|
|
205
|
+
* When `true`, disables spacing to the content area slot.
|
|
206
|
+
*
|
|
207
|
+
* @deprecated Use `--calcite-modal-padding` CSS variable instead.
|
|
208
|
+
*/
|
|
209
|
+
this.noPadding = false;
|
|
210
|
+
//--------------------------------------------------------------------------
|
|
211
|
+
//
|
|
212
|
+
// Variables
|
|
213
|
+
//
|
|
214
|
+
//--------------------------------------------------------------------------
|
|
215
|
+
this.hasFooter = true;
|
|
216
|
+
/**
|
|
217
|
+
* We use internal variable to make sure initially open modal can transition from closed state when rendered
|
|
218
|
+
*
|
|
219
|
+
* @private
|
|
220
|
+
*/
|
|
221
|
+
this.isOpen = false;
|
|
222
|
+
this.mutationObserver = createObserver("mutation", () => this.updateFooterVisibility());
|
|
223
|
+
this.openTransitionProp = "opacity";
|
|
224
|
+
//--------------------------------------------------------------------------
|
|
225
|
+
//
|
|
226
|
+
// Private Methods
|
|
227
|
+
//
|
|
228
|
+
//--------------------------------------------------------------------------
|
|
229
|
+
this.setTransitionEl = (el) => {
|
|
230
|
+
this.transitionEl = el;
|
|
231
|
+
connectOpenCloseComponent(this);
|
|
232
|
+
};
|
|
233
|
+
this.openEnd = () => {
|
|
234
|
+
this.setFocus();
|
|
235
|
+
this.el.removeEventListener("calciteModalOpen", this.openEnd);
|
|
236
|
+
};
|
|
237
|
+
this.handleOutsideClose = () => {
|
|
238
|
+
if (this.disableOutsideClose) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
this.close();
|
|
242
|
+
};
|
|
243
|
+
/** Close the modal, first running the `beforeClose` method */
|
|
244
|
+
this.close = () => {
|
|
245
|
+
return this.beforeClose(this.el).then(() => {
|
|
246
|
+
this.open = false;
|
|
247
|
+
this.isOpen = false;
|
|
248
|
+
focusElement(this.previousActiveElement);
|
|
249
|
+
this.removeOverflowHiddenClass();
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
this.focusFirstElement = () => {
|
|
253
|
+
focusElement(this.disableCloseButton ? getFocusableElements(this.el)[0] : this.closeButtonEl);
|
|
254
|
+
};
|
|
255
|
+
this.focusLastElement = () => {
|
|
256
|
+
const focusableElements = getFocusableElements(this.el).filter((el) => !el.getAttribute("data-focus-fence"));
|
|
257
|
+
if (focusableElements.length > 0) {
|
|
258
|
+
focusElement(focusableElements[focusableElements.length - 1]);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
focusElement(this.closeButtonEl);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
this.updateFooterVisibility = () => {
|
|
265
|
+
this.hasFooter = !!getSlotted(this.el, [SLOTS.back, SLOTS.primary, SLOTS.secondary]);
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
//--------------------------------------------------------------------------
|
|
269
|
+
//
|
|
270
|
+
// Lifecycle
|
|
271
|
+
//
|
|
272
|
+
//--------------------------------------------------------------------------
|
|
273
|
+
componentWillLoad() {
|
|
274
|
+
// when modal initially renders, if active was set we need to open as watcher doesn't fire
|
|
275
|
+
if (this.open) {
|
|
276
|
+
requestAnimationFrame(() => this.openModal());
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
connectedCallback() {
|
|
280
|
+
var _a;
|
|
281
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
282
|
+
this.updateFooterVisibility();
|
|
283
|
+
connectConditionalSlotComponent(this);
|
|
284
|
+
connectOpenCloseComponent(this);
|
|
285
|
+
if (this.open) {
|
|
286
|
+
this.active = this.open;
|
|
287
|
+
}
|
|
288
|
+
if (this.active) {
|
|
289
|
+
this.activeHandler(this.active);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
disconnectedCallback() {
|
|
293
|
+
var _a;
|
|
294
|
+
this.removeOverflowHiddenClass();
|
|
295
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
296
|
+
disconnectConditionalSlotComponent(this);
|
|
297
|
+
disconnectOpenCloseComponent(this);
|
|
298
|
+
}
|
|
299
|
+
render() {
|
|
300
|
+
return (h(Host, { "aria-describedby": this.contentId, "aria-labelledby": this.titleId, "aria-modal": "true", role: "dialog" }, h("calcite-scrim", { class: CSS.scrim, onClick: this.handleOutsideClose }), this.renderStyle(), h("div", { class: {
|
|
301
|
+
[CSS.modal]: true,
|
|
302
|
+
[CSS.modalOpen]: this.isOpen
|
|
303
|
+
}, ref: this.setTransitionEl }, h("div", { "data-focus-fence": true, onFocus: this.focusLastElement, tabindex: "0" }), h("div", { class: CSS.header }, this.renderCloseButton(), h("header", { class: CSS.title }, h("slot", { name: CSS.header }))), h("div", { class: {
|
|
304
|
+
content: true,
|
|
305
|
+
"content--spaced": !this.noPadding,
|
|
306
|
+
"content--no-footer": !this.hasFooter
|
|
307
|
+
}, ref: (el) => (this.modalContent = el) }, h("slot", { name: SLOTS.content })), this.renderFooter(), h("div", { "data-focus-fence": true, onFocus: this.focusFirstElement, tabindex: "0" }))));
|
|
308
|
+
}
|
|
309
|
+
renderFooter() {
|
|
310
|
+
return this.hasFooter ? (h("div", { class: CSS.footer, key: "footer" }, h("span", { class: CSS.back }, h("slot", { name: SLOTS.back })), h("span", { class: CSS.secondary }, h("slot", { name: SLOTS.secondary })), h("span", { class: CSS.primary }, h("slot", { name: SLOTS.primary })))) : null;
|
|
311
|
+
}
|
|
312
|
+
renderCloseButton() {
|
|
313
|
+
return !this.disableCloseButton ? (h("button", { "aria-label": this.intlClose, class: CSS.close, key: "button", onClick: this.close, ref: (el) => (this.closeButtonEl = el), title: this.intlClose }, h("calcite-icon", { icon: ICONS.close, scale: this.scale === "s" ? "s" : this.scale === "m" ? "m" : this.scale === "l" ? "l" : null }))) : null;
|
|
314
|
+
}
|
|
315
|
+
renderStyle() {
|
|
316
|
+
const hasCustomWidth = !isNaN(parseInt(`${this.width}`));
|
|
317
|
+
return hasCustomWidth ? (h("style", null, `
|
|
318
|
+
.${CSS.modal} {
|
|
319
|
+
max-width: ${this.width}px !important;
|
|
320
|
+
}
|
|
321
|
+
@media screen and (max-width: ${this.width}px) {
|
|
322
|
+
.${CSS.modal} {
|
|
323
|
+
height: 100% !important;
|
|
324
|
+
max-height: 100% !important;
|
|
325
|
+
width: 100% !important;
|
|
326
|
+
max-width: 100% !important;
|
|
327
|
+
margin: 0 !important;
|
|
328
|
+
border-radius: 0 !important;
|
|
329
|
+
}
|
|
330
|
+
.content {
|
|
331
|
+
flex: 1 1 auto !important;
|
|
332
|
+
max-height: unset !important;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
`)) : null;
|
|
336
|
+
}
|
|
337
|
+
//--------------------------------------------------------------------------
|
|
338
|
+
//
|
|
339
|
+
// Event Listeners
|
|
340
|
+
//
|
|
341
|
+
//--------------------------------------------------------------------------
|
|
342
|
+
handleEscape(event) {
|
|
343
|
+
if (this.open && !this.disableEscape && event.key === "Escape" && !event.defaultPrevented) {
|
|
344
|
+
this.close();
|
|
345
|
+
event.preventDefault();
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
//--------------------------------------------------------------------------
|
|
349
|
+
//
|
|
350
|
+
// Public Methods
|
|
351
|
+
//
|
|
352
|
+
//--------------------------------------------------------------------------
|
|
353
|
+
/**
|
|
354
|
+
* Focus the first interactive element.
|
|
355
|
+
*
|
|
356
|
+
* @param el
|
|
357
|
+
* @deprecated use `setFocus` instead.
|
|
358
|
+
*/
|
|
359
|
+
async focusElement(el) {
|
|
360
|
+
if (el) {
|
|
361
|
+
el.focus();
|
|
362
|
+
}
|
|
363
|
+
return this.setFocus();
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Sets focus on the component.
|
|
367
|
+
*
|
|
368
|
+
* By default, tries to focus on focusable content. If there is none, it will focus on the close button.
|
|
369
|
+
* To focus on the close button, use the `close-button` focus ID.
|
|
370
|
+
*
|
|
371
|
+
* @param focusId
|
|
372
|
+
*/
|
|
373
|
+
async setFocus(focusId) {
|
|
374
|
+
const closeButton = this.closeButtonEl;
|
|
375
|
+
return focusElement(focusId === "close-button" ? closeButton : getFocusableElements(this.el)[0] || closeButton);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Sets the scroll top of the component's content.
|
|
379
|
+
*
|
|
380
|
+
* @param top
|
|
381
|
+
* @param left
|
|
382
|
+
*/
|
|
383
|
+
async scrollContent(top = 0, left = 0) {
|
|
384
|
+
if (this.modalContent) {
|
|
385
|
+
if (this.modalContent.scrollTo) {
|
|
386
|
+
this.modalContent.scrollTo({ top, left, behavior: "smooth" });
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
this.modalContent.scrollTop = top;
|
|
390
|
+
this.modalContent.scrollLeft = left;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
onBeforeOpen() {
|
|
395
|
+
this.transitionEl.classList.add(CSS.openingActive);
|
|
396
|
+
this.calciteModalBeforeOpen.emit();
|
|
397
|
+
}
|
|
398
|
+
onOpen() {
|
|
399
|
+
this.transitionEl.classList.remove(CSS.openingIdle, CSS.openingActive);
|
|
400
|
+
this.calciteModalOpen.emit();
|
|
401
|
+
}
|
|
402
|
+
onBeforeClose() {
|
|
403
|
+
this.transitionEl.classList.add(CSS.closingActive);
|
|
404
|
+
this.calciteModalBeforeClose.emit();
|
|
405
|
+
}
|
|
406
|
+
onClose() {
|
|
407
|
+
this.transitionEl.classList.remove(CSS.closingIdle, CSS.closingActive);
|
|
408
|
+
this.calciteModalClose.emit();
|
|
409
|
+
}
|
|
410
|
+
activeHandler(value) {
|
|
411
|
+
this.open = value;
|
|
412
|
+
}
|
|
413
|
+
async toggleModal(value) {
|
|
414
|
+
var _a, _b;
|
|
415
|
+
this.active = value;
|
|
416
|
+
if (value) {
|
|
417
|
+
(_a = this.transitionEl) === null || _a === void 0 ? void 0 : _a.classList.add(CSS.openingIdle);
|
|
418
|
+
this.openModal();
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
(_b = this.transitionEl) === null || _b === void 0 ? void 0 : _b.classList.add(CSS.closingIdle);
|
|
422
|
+
this.close();
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
/** Open the modal */
|
|
426
|
+
openModal() {
|
|
427
|
+
this.previousActiveElement = document.activeElement;
|
|
428
|
+
this.el.addEventListener("calciteModalOpen", this.openEnd);
|
|
429
|
+
this.open = true;
|
|
430
|
+
this.isOpen = true;
|
|
431
|
+
const titleEl = getSlotted(this.el, SLOTS.header);
|
|
432
|
+
const contentEl = getSlotted(this.el, SLOTS.content);
|
|
433
|
+
this.titleId = ensureId(titleEl);
|
|
434
|
+
this.contentId = ensureId(contentEl);
|
|
435
|
+
document.documentElement.classList.add(CSS.overflowHidden);
|
|
436
|
+
}
|
|
437
|
+
removeOverflowHiddenClass() {
|
|
438
|
+
document.documentElement.classList.remove(CSS.overflowHidden);
|
|
439
|
+
}
|
|
440
|
+
get el() { return getElement(this); }
|
|
441
|
+
static get watchers() { return {
|
|
442
|
+
"active": ["activeHandler"],
|
|
443
|
+
"open": ["toggleModal"]
|
|
444
|
+
}; }
|
|
445
|
+
};
|
|
446
|
+
Modal.style = modalCss;
|
|
447
|
+
|
|
13
448
|
/** @license
|
|
14
449
|
* Copyright 2022 Esri
|
|
15
450
|
*
|
|
@@ -1450,7 +1885,7 @@ const SolutionConfiguration = class {
|
|
|
1450
1885
|
this._solutionEditorHasChanges = false;
|
|
1451
1886
|
this._solutionEditorHasErrors = false;
|
|
1452
1887
|
this._canSave = false;
|
|
1453
|
-
this.
|
|
1888
|
+
this.serializedAuthentication = "";
|
|
1454
1889
|
this.solutionItemId = "";
|
|
1455
1890
|
this.showLoading = false;
|
|
1456
1891
|
this._currentEditItemId = "";
|
|
@@ -1461,6 +1896,8 @@ const SolutionConfiguration = class {
|
|
|
1461
1896
|
this._templateHierarchy = [];
|
|
1462
1897
|
this._translations = undefined;
|
|
1463
1898
|
this._treeOpen = true;
|
|
1899
|
+
this._authentication = this.serializedAuthentication ? UserSession.deserialize(this.serializedAuthentication) : new UserSession({});
|
|
1900
|
+
console.log("CONFIG constructor " + this.solutionItemId); //???
|
|
1464
1901
|
void this._loadSolution(this.solutionItemId);
|
|
1465
1902
|
window.addEventListener("solutionStoreHasChanges", (evt) => {
|
|
1466
1903
|
this._updateSaveability(this._solutionStoreHasChanges = evt.detail, this._solutionEditorHasChanges, this._solutionEditorHasErrors);
|
|
@@ -1472,8 +1909,11 @@ const SolutionConfiguration = class {
|
|
|
1472
1909
|
this._updateSaveability(this._solutionStoreHasChanges, this._solutionEditorHasChanges, this._solutionEditorHasErrors = evt.detail);
|
|
1473
1910
|
});
|
|
1474
1911
|
}
|
|
1912
|
+
async serializedAuthenticationWatchHandler() {
|
|
1913
|
+
this._authentication = this.serializedAuthentication ? UserSession.deserialize(this.serializedAuthentication) : new UserSession({});
|
|
1914
|
+
}
|
|
1475
1915
|
async valueWatchHandler() {
|
|
1476
|
-
console.log("
|
|
1916
|
+
console.log("CONFIG watch " + this.solutionItemId); //???
|
|
1477
1917
|
await this._loadSolution(this.solutionItemId);
|
|
1478
1918
|
}
|
|
1479
1919
|
/**
|
|
@@ -1488,17 +1928,17 @@ const SolutionConfiguration = class {
|
|
|
1488
1928
|
* Renders the component.
|
|
1489
1929
|
*/
|
|
1490
1930
|
render() {
|
|
1491
|
-
console.log("render solution config " + this.solutionItemId); //???
|
|
1492
1931
|
const wkid = getProp(state.getStoreInfo("spatialReferenceInfo"), "spatialReference");
|
|
1493
1932
|
const hasServices = state.getStoreInfo("featureServices").length > 0;
|
|
1494
1933
|
const solutionData = state.getStoreInfo("solutionData");
|
|
1495
1934
|
this._solutionVariables = JSON.stringify(getSolutionVariables(solutionData.templates, this._translations));
|
|
1496
1935
|
this._organizationVariables = JSON.stringify(getOrganizationVariables(this._translations));
|
|
1936
|
+
console.log("CONFIG render " + this.solutionItemId); //???
|
|
1497
1937
|
return (h(Host, null, !this._solutionIsLoaded
|
|
1498
1938
|
? h("calcite-loader", { active: true, label: '' })
|
|
1499
1939
|
: null, h("div", { class: "configuration-container" }, h("div", { class: "configuration" }, h("calcite-tabs", { class: "config-tabs" }, h("calcite-tab-nav", { slot: "tab-nav" }, h("calcite-tab-title", null, this._translations.definitionTab), hasServices ?
|
|
1500
1940
|
h("calcite-tab-title", null, this._translations.spatialReferenceTab) :
|
|
1501
|
-
null), h("calcite-tab", { active: true, class: "config-tab" }, h("div", { class: "config-solution" }, h("div", { class: this._treeOpen ? "config-inventory" : "config-inventory-hide" }, h("solution-contents", { id: "configInventory", key: `${this.solutionItemId}-contents`, ref: (el) => (this._solutionContentsComponent = el) })), h("calcite-button", { appearance: "transparent", class: "collapse-btn", "icon-start": this._treeOpen ? "chevrons-left" : "chevrons-right", id: "collapse-vars", onClick: () => this._toggleTree(), scale: "s", title: this._treeOpen ? this._translations.collapse : this._translations.expand }), h("div", { class: "config-item" }, h("solution-item", { authentication: this.
|
|
1941
|
+
null), h("calcite-tab", { active: true, class: "config-tab" }, h("div", { class: "config-solution" }, h("div", { class: this._treeOpen ? "config-inventory" : "config-inventory-hide" }, h("solution-contents", { id: "configInventory", key: `${this.solutionItemId}-contents`, ref: (el) => (this._solutionContentsComponent = el) })), h("calcite-button", { appearance: "transparent", class: "collapse-btn", "icon-start": this._treeOpen ? "chevrons-left" : "chevrons-right", id: "collapse-vars", onClick: () => this._toggleTree(), scale: "s", title: this._treeOpen ? this._translations.collapse : this._translations.expand }), h("div", { class: "config-item" }, h("solution-item", { authentication: this._authentication, "item-id": this._currentEditItemId, key: `${this.solutionItemId}-item`, "organization-variables": this._organizationVariables, "solution-item-id": this.solutionItemId, "solution-variables": this._solutionVariables })))), hasServices
|
|
1502
1942
|
? h("calcite-tab", { class: "config-tab" }, h("div", { class: "config-solution" }, h("solution-spatial-ref", { defaultWkid: wkid, id: "configure-solution-spatial-ref", key: `${this.solutionItemId}-spatial-ref`, locked: !wkid, services: state.getStoreInfo("featureServices").map(fs => fs.name) })))
|
|
1503
1943
|
: null)))));
|
|
1504
1944
|
}
|
|
@@ -1566,7 +2006,7 @@ const SolutionConfiguration = class {
|
|
|
1566
2006
|
this.modelsSet = false;
|
|
1567
2007
|
state.reset();
|
|
1568
2008
|
}
|
|
1569
|
-
getModels(templates, this.
|
|
2009
|
+
getModels(templates, this._authentication, this.solutionItemId).then(models => {
|
|
1570
2010
|
state.models = models;
|
|
1571
2011
|
|
|
1572
2012
|
state.featureServices = getFeatureServices(templates);
|
|
@@ -1600,10 +2040,6 @@ const SolutionConfiguration = class {
|
|
|
1600
2040
|
if (this._templateHierarchy.length > 0) {
|
|
1601
2041
|
// Start with the first item in the contents
|
|
1602
2042
|
firstItem = state.getItemInfo(this._templateHierarchy[0].id);
|
|
1603
|
-
console.log("init with first item " + firstItem.itemId); //???
|
|
1604
|
-
}
|
|
1605
|
-
else {
|
|
1606
|
-
console.log("no initial first item"); //???
|
|
1607
2043
|
}
|
|
1608
2044
|
this._currentEditItemId = firstItem ? firstItem.itemId : "";
|
|
1609
2045
|
}
|
|
@@ -1619,7 +2055,7 @@ const SolutionConfiguration = class {
|
|
|
1619
2055
|
async _loadSolution(solutionItemId) {
|
|
1620
2056
|
if (solutionItemId) {
|
|
1621
2057
|
this._solutionIsLoaded = false;
|
|
1622
|
-
await state.loadSolution(solutionItemId, this.
|
|
2058
|
+
await state.loadSolution(solutionItemId, this._authentication);
|
|
1623
2059
|
this._initProps();
|
|
1624
2060
|
this._solutionIsLoaded = true;
|
|
1625
2061
|
}
|
|
@@ -1682,7 +2118,7 @@ const SolutionConfiguration = class {
|
|
|
1682
2118
|
this.solutionItemId,
|
|
1683
2119
|
data,
|
|
1684
2120
|
state.models,
|
|
1685
|
-
this.
|
|
2121
|
+
this._authentication,
|
|
1686
2122
|
this._translations
|
|
1687
2123
|
).then(saveResult => {
|
|
1688
2124
|
// need to trigger re-render...and re-fetch
|
|
@@ -1976,11 +2412,12 @@ const SolutionConfiguration = class {
|
|
|
1976
2412
|
}
|
|
1977
2413
|
get el() { return getElement(this); }
|
|
1978
2414
|
static get watchers() { return {
|
|
2415
|
+
"serializedAuthentication": ["serializedAuthenticationWatchHandler"],
|
|
1979
2416
|
"solutionItemId": ["valueWatchHandler"]
|
|
1980
2417
|
}; }
|
|
1981
2418
|
};
|
|
1982
2419
|
SolutionConfiguration.style = solutionConfigurationCss;
|
|
1983
2420
|
|
|
1984
|
-
export { SolutionConfiguration as solution_configuration };
|
|
2421
|
+
export { Modal as calcite_modal, SolutionConfiguration as solution_configuration };
|
|
1985
2422
|
|
|
1986
|
-
//# sourceMappingURL=
|
|
2423
|
+
//# sourceMappingURL=calcite-modal_2.entry.js.map
|