@esri/solutions-components 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"title": "Configure: {{solutionName}}",
|
3
|
+
"cancel": "Cancel",
|
4
|
+
"save": "Save",
|
5
|
+
"definition": "Definition",
|
6
|
+
"spatialReference": "Spatial Reference",
|
7
|
+
|
8
|
+
|
9
|
+
"item_details": {
|
10
|
+
"editThumbnail": "Edit Thumbnail",
|
11
|
+
"description": "Description",
|
12
|
+
"tags": "Tags",
|
13
|
+
"credits": "Credits",
|
14
|
+
"termsOfUse": "Terms of Use",
|
15
|
+
"snippetCountPattern": "{{n}} of 250"
|
16
|
+
},
|
17
|
+
|
18
|
+
"json_editing": {
|
19
|
+
"startEditing": "Start editing",
|
20
|
+
"search": "Search"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"title": "Configure: {{solutionName}}",
|
3
|
+
"cancel": "Cancel",
|
4
|
+
"save": "Save",
|
5
|
+
"definition": "Definition",
|
6
|
+
"spatialReference": "Spatial Reference",
|
7
|
+
|
8
|
+
|
9
|
+
"item_details": {
|
10
|
+
"editThumbnail": "Edit Thumbnail",
|
11
|
+
"description": "Description",
|
12
|
+
"tags": "Tags",
|
13
|
+
"credits": "Credits",
|
14
|
+
"termsOfUse": "Terms of Use",
|
15
|
+
"snippetCountPattern": "{{n}} of 250"
|
16
|
+
},
|
17
|
+
|
18
|
+
"json_editing": {
|
19
|
+
"startEditing": "Start editing",
|
20
|
+
"search": "Search"
|
21
|
+
}
|
22
|
+
}
|
@@ -13,11 +13,7 @@ const dom = require('./dom-4a580af6.js');
|
|
13
13
|
const array = require('./array-ace6d4b5.js');
|
14
14
|
const guid = require('./guid-84ac4d91.js');
|
15
15
|
const key = require('./key-55aca5c0.js');
|
16
|
-
const floatingUi = require('./floating-ui-ca1bcead.js');
|
17
|
-
const openCloseComponent = require('./openCloseComponent-bf986132.js');
|
18
|
-
const Heading = require('./Heading-6b7b374c.js');
|
19
16
|
require('./resources-b56bce71.js');
|
20
|
-
require('./debounce-69c3bada.js');
|
21
17
|
|
22
18
|
const actionMenuCss = "@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{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size-1);color:var(--calcite-ui-text-2)}.menu ::slotted(calcite-action){margin:0.125rem;display:flex;outline-color:transparent}.menu ::slotted(calcite-action[active]){outline:2px solid var(--calcite-ui-brand);outline-offset:0px}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{flex-direction:column;flex-wrap:nowrap;outline:2px solid transparent;outline-offset:2px}";
|
23
19
|
|
@@ -301,430 +297,51 @@ ActionMenu.style = actionMenuCss;
|
|
301
297
|
* v1.0.0-beta.97
|
302
298
|
*/
|
303
299
|
const CSS = {
|
304
|
-
|
305
|
-
|
306
|
-
imageContainer: "image-container",
|
307
|
-
closeButtonContainer: "close-button-container",
|
308
|
-
closeButton: "close-button",
|
309
|
-
content: "content",
|
310
|
-
hasHeader: "has-header",
|
311
|
-
header: "header",
|
312
|
-
headerContent: "header-content",
|
313
|
-
heading: "heading"
|
300
|
+
scrim: "scrim",
|
301
|
+
content: "content"
|
314
302
|
};
|
315
303
|
const TEXT = {
|
316
|
-
|
304
|
+
loading: "Loading"
|
317
305
|
};
|
318
|
-
const defaultPopoverPlacement = "auto";
|
319
|
-
const ARIA_CONTROLS = "aria-controls";
|
320
|
-
const ARIA_EXPANDED = "aria-expanded";
|
321
|
-
const HEADING_LEVEL = 2;
|
322
306
|
|
323
|
-
|
324
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
325
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
326
|
-
* v1.0.0-beta.97
|
327
|
-
*/
|
328
|
-
class PopoverManager {
|
329
|
-
constructor() {
|
330
|
-
// --------------------------------------------------------------------------
|
331
|
-
//
|
332
|
-
// Private Properties
|
333
|
-
//
|
334
|
-
// --------------------------------------------------------------------------
|
335
|
-
this.registeredElements = new Map();
|
336
|
-
this.registeredElementCount = 0;
|
337
|
-
// --------------------------------------------------------------------------
|
338
|
-
//
|
339
|
-
// Private Methods
|
340
|
-
//
|
341
|
-
// --------------------------------------------------------------------------
|
342
|
-
this.queryPopover = (composedPath) => {
|
343
|
-
const { registeredElements } = this;
|
344
|
-
const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
|
345
|
-
return registeredElements.get(registeredElement);
|
346
|
-
};
|
347
|
-
this.togglePopovers = (event) => {
|
348
|
-
const composedPath = event.composedPath();
|
349
|
-
const togglePopover = this.queryPopover(composedPath);
|
350
|
-
if (togglePopover && !togglePopover.triggerDisabled) {
|
351
|
-
togglePopover.toggle();
|
352
|
-
}
|
353
|
-
Array.from(this.registeredElements.values())
|
354
|
-
.filter((popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover))
|
355
|
-
.forEach((popover) => popover.toggle(false));
|
356
|
-
};
|
357
|
-
this.keyHandler = (event) => {
|
358
|
-
if (event.defaultPrevented || !key.isActivationKey(event.key)) {
|
359
|
-
return;
|
360
|
-
}
|
361
|
-
this.togglePopovers(event);
|
362
|
-
};
|
363
|
-
this.clickHandler = (event) => {
|
364
|
-
if (dom.isPrimaryPointerButton(event)) {
|
365
|
-
this.togglePopovers(event);
|
366
|
-
}
|
367
|
-
};
|
368
|
-
}
|
369
|
-
// --------------------------------------------------------------------------
|
370
|
-
//
|
371
|
-
// Public Methods
|
372
|
-
//
|
373
|
-
// --------------------------------------------------------------------------
|
374
|
-
registerElement(referenceEl, popover) {
|
375
|
-
this.registeredElementCount++;
|
376
|
-
this.registeredElements.set(referenceEl, popover);
|
377
|
-
if (this.registeredElementCount === 1) {
|
378
|
-
this.addListeners();
|
379
|
-
}
|
380
|
-
}
|
381
|
-
unregisterElement(referenceEl) {
|
382
|
-
if (this.registeredElements.delete(referenceEl)) {
|
383
|
-
this.registeredElementCount--;
|
384
|
-
}
|
385
|
-
if (this.registeredElementCount === 0) {
|
386
|
-
this.removeListeners();
|
387
|
-
}
|
388
|
-
}
|
389
|
-
addListeners() {
|
390
|
-
document.addEventListener("pointerdown", this.clickHandler, { capture: true });
|
391
|
-
document.addEventListener("keydown", this.keyHandler, { capture: true });
|
392
|
-
}
|
393
|
-
removeListeners() {
|
394
|
-
document.removeEventListener("pointerdown", this.clickHandler, { capture: true });
|
395
|
-
document.removeEventListener("keydown", this.keyHandler, { capture: true });
|
396
|
-
}
|
397
|
-
}
|
398
|
-
|
399
|
-
const popoverCss = "@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:block;position:absolute;z-index:900}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:\"\";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=left]) .arrow{direction:ltr;inset-inline-end:-4px}:host([data-placement^=right]) .arrow{direction:ltr;inset-inline-start:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}";
|
307
|
+
const scrimCss = "@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:absolute;inset:0px;z-index:700;display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background)}.content{padding:1rem}";
|
400
308
|
|
401
|
-
const
|
402
|
-
const Popover = class {
|
309
|
+
const Scrim = class {
|
403
310
|
constructor(hostRef) {
|
404
311
|
index.registerInstance(this, hostRef);
|
405
|
-
this.calcitePopoverBeforeClose = index.createEvent(this, "calcitePopoverBeforeClose", 6);
|
406
|
-
this.calcitePopoverClose = index.createEvent(this, "calcitePopoverClose", 6);
|
407
|
-
this.calcitePopoverBeforeOpen = index.createEvent(this, "calcitePopoverBeforeOpen", 6);
|
408
|
-
this.calcitePopoverOpen = index.createEvent(this, "calcitePopoverOpen", 6);
|
409
312
|
// --------------------------------------------------------------------------
|
410
313
|
//
|
411
314
|
// Properties
|
412
315
|
//
|
413
316
|
// --------------------------------------------------------------------------
|
414
317
|
/**
|
415
|
-
*
|
416
|
-
*/
|
417
|
-
this.autoClose = false;
|
418
|
-
/**
|
419
|
-
* When `true`, a close button is added to the component.
|
420
|
-
*
|
421
|
-
* @deprecated use dismissible instead.
|
422
|
-
*/
|
423
|
-
this.closeButton = false;
|
424
|
-
/**
|
425
|
-
* When `true`, a close button is added to the component.
|
426
|
-
*
|
427
|
-
* @deprecated use `closable` instead.
|
428
|
-
*/
|
429
|
-
this.dismissible = false;
|
430
|
-
/** When `true`, display a close button within the component. */
|
431
|
-
this.closable = false;
|
432
|
-
/**
|
433
|
-
* When `true`, prevents flipping the component's placement when overlapping its `referenceElement`.
|
434
|
-
*/
|
435
|
-
this.disableFlip = false;
|
436
|
-
/**
|
437
|
-
* When `true`, removes the caret pointer.
|
438
|
-
*/
|
439
|
-
this.disablePointer = false;
|
440
|
-
/**
|
441
|
-
* Offsets the position of the component away from the `referenceElement`.
|
442
|
-
*
|
443
|
-
* @default 6
|
444
|
-
*/
|
445
|
-
this.offsetDistance = floatingUi.defaultOffsetDistance;
|
446
|
-
/**
|
447
|
-
* Offsets the position of the component along the `referenceElement`.
|
448
|
-
*/
|
449
|
-
this.offsetSkidding = 0;
|
450
|
-
/**
|
451
|
-
* When `true`, displays and positions the component.
|
452
|
-
*/
|
453
|
-
this.open = false;
|
454
|
-
/**
|
455
|
-
* Determines the type of positioning to use for the overlaid content.
|
456
|
-
*
|
457
|
-
* Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout.
|
458
|
-
*
|
459
|
-
* `"fixed"` value should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`.
|
460
|
-
*
|
461
|
-
*/
|
462
|
-
this.overlayPositioning = "absolute";
|
463
|
-
/**
|
464
|
-
* Determines where the component will be positioned relative to the `referenceElement`.
|
318
|
+
* Accessible name when the component is loading.
|
465
319
|
*
|
466
|
-
* @
|
320
|
+
* @default "Loading"
|
467
321
|
*/
|
468
|
-
this.
|
322
|
+
this.intlLoading = TEXT.loading;
|
469
323
|
/**
|
470
|
-
* When `true`,
|
471
|
-
*
|
472
|
-
* This property can be set to `true` to manage when the component is open.
|
324
|
+
* When `true`, a busy indicator is displayed.
|
473
325
|
*/
|
474
|
-
this.
|
475
|
-
/**
|
476
|
-
* Accessible name for the component's close button.
|
477
|
-
*
|
478
|
-
* @default "Close"
|
479
|
-
*/
|
480
|
-
this.intlClose = TEXT.close;
|
481
|
-
this.guid = `calcite-popover-${guid.guid()}`;
|
482
|
-
this.openTransitionProp = "opacity";
|
483
|
-
this.hasLoaded = false;
|
484
|
-
// --------------------------------------------------------------------------
|
485
|
-
//
|
486
|
-
// Private Methods
|
487
|
-
//
|
488
|
-
// --------------------------------------------------------------------------
|
489
|
-
this.setTransitionEl = (el) => {
|
490
|
-
this.transitionEl = el;
|
491
|
-
openCloseComponent.connectOpenCloseComponent(this);
|
492
|
-
};
|
493
|
-
this.setFilteredPlacements = () => {
|
494
|
-
const { el, flipPlacements } = this;
|
495
|
-
this.filteredFlipPlacements = flipPlacements
|
496
|
-
? floatingUi.filterComputedPlacements(flipPlacements, el)
|
497
|
-
: null;
|
498
|
-
};
|
499
|
-
this.setUpReferenceElement = (warn = true) => {
|
500
|
-
this.removeReferences();
|
501
|
-
this.effectiveReferenceElement = this.getReferenceElement();
|
502
|
-
floatingUi.connectFloatingUI(this, this.effectiveReferenceElement, this.el);
|
503
|
-
const { el, referenceElement, effectiveReferenceElement } = this;
|
504
|
-
if (warn && referenceElement && !effectiveReferenceElement) {
|
505
|
-
console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
|
506
|
-
el
|
507
|
-
});
|
508
|
-
}
|
509
|
-
this.addReferences();
|
510
|
-
};
|
511
|
-
this.getId = () => {
|
512
|
-
return this.el.id || this.guid;
|
513
|
-
};
|
514
|
-
this.setExpandedAttr = () => {
|
515
|
-
const { effectiveReferenceElement, open } = this;
|
516
|
-
if (!effectiveReferenceElement) {
|
517
|
-
return;
|
518
|
-
}
|
519
|
-
if ("setAttribute" in effectiveReferenceElement) {
|
520
|
-
effectiveReferenceElement.setAttribute(ARIA_EXPANDED, dom.toAriaBoolean(open));
|
521
|
-
}
|
522
|
-
};
|
523
|
-
this.addReferences = () => {
|
524
|
-
const { effectiveReferenceElement } = this;
|
525
|
-
if (!effectiveReferenceElement) {
|
526
|
-
return;
|
527
|
-
}
|
528
|
-
const id = this.getId();
|
529
|
-
if ("setAttribute" in effectiveReferenceElement) {
|
530
|
-
effectiveReferenceElement.setAttribute(ARIA_CONTROLS, id);
|
531
|
-
}
|
532
|
-
manager.registerElement(effectiveReferenceElement, this.el);
|
533
|
-
this.setExpandedAttr();
|
534
|
-
};
|
535
|
-
this.removeReferences = () => {
|
536
|
-
const { effectiveReferenceElement } = this;
|
537
|
-
if (!effectiveReferenceElement) {
|
538
|
-
return;
|
539
|
-
}
|
540
|
-
if ("removeAttribute" in effectiveReferenceElement) {
|
541
|
-
effectiveReferenceElement.removeAttribute(ARIA_CONTROLS);
|
542
|
-
effectiveReferenceElement.removeAttribute(ARIA_EXPANDED);
|
543
|
-
}
|
544
|
-
manager.unregisterElement(effectiveReferenceElement);
|
545
|
-
};
|
546
|
-
this.hide = () => {
|
547
|
-
this.open = false;
|
548
|
-
};
|
549
|
-
this.storeArrowEl = (el) => {
|
550
|
-
this.arrowEl = el;
|
551
|
-
this.reposition(true);
|
552
|
-
};
|
553
|
-
}
|
554
|
-
handleDismissible(value) {
|
555
|
-
this.closable = value;
|
556
|
-
}
|
557
|
-
handleClosable(value) {
|
558
|
-
this.dismissible = value;
|
559
|
-
}
|
560
|
-
flipPlacementsHandler() {
|
561
|
-
this.setFilteredPlacements();
|
562
|
-
this.reposition(true);
|
563
|
-
}
|
564
|
-
offsetDistanceOffsetHandler() {
|
565
|
-
this.reposition(true);
|
566
|
-
}
|
567
|
-
offsetSkiddingHandler() {
|
568
|
-
this.reposition(true);
|
569
|
-
}
|
570
|
-
openHandler(value) {
|
571
|
-
if (value) {
|
572
|
-
this.reposition(true);
|
573
|
-
}
|
574
|
-
else {
|
575
|
-
floatingUi.updateAfterClose(this.el);
|
576
|
-
}
|
577
|
-
this.setExpandedAttr();
|
578
|
-
}
|
579
|
-
overlayPositioningHandler() {
|
580
|
-
this.reposition(true);
|
581
|
-
}
|
582
|
-
placementHandler() {
|
583
|
-
this.reposition(true);
|
584
|
-
}
|
585
|
-
referenceElementHandler() {
|
586
|
-
this.setUpReferenceElement();
|
587
|
-
this.reposition(true);
|
326
|
+
this.loading = false;
|
588
327
|
}
|
589
328
|
// --------------------------------------------------------------------------
|
590
329
|
//
|
591
|
-
//
|
330
|
+
// Render Method
|
592
331
|
//
|
593
332
|
// --------------------------------------------------------------------------
|
594
|
-
connectedCallback() {
|
595
|
-
this.setFilteredPlacements();
|
596
|
-
openCloseComponent.connectOpenCloseComponent(this);
|
597
|
-
const closable = this.closable || this.dismissible;
|
598
|
-
if (closable) {
|
599
|
-
this.handleDismissible(closable);
|
600
|
-
}
|
601
|
-
if (closable) {
|
602
|
-
this.handleClosable(closable);
|
603
|
-
}
|
604
|
-
this.setUpReferenceElement(this.hasLoaded);
|
605
|
-
}
|
606
|
-
componentDidLoad() {
|
607
|
-
if (this.referenceElement && !this.effectiveReferenceElement) {
|
608
|
-
this.setUpReferenceElement();
|
609
|
-
}
|
610
|
-
this.reposition();
|
611
|
-
this.hasLoaded = true;
|
612
|
-
}
|
613
|
-
disconnectedCallback() {
|
614
|
-
this.removeReferences();
|
615
|
-
floatingUi.disconnectFloatingUI(this, this.effectiveReferenceElement, this.el);
|
616
|
-
openCloseComponent.disconnectOpenCloseComponent(this);
|
617
|
-
}
|
618
|
-
// --------------------------------------------------------------------------
|
619
|
-
//
|
620
|
-
// Public Methods
|
621
|
-
//
|
622
|
-
// --------------------------------------------------------------------------
|
623
|
-
/**
|
624
|
-
* Updates the position of the component.
|
625
|
-
*
|
626
|
-
* @param delayed
|
627
|
-
*/
|
628
|
-
async reposition(delayed = false) {
|
629
|
-
const { el, effectiveReferenceElement, placement, overlayPositioning, disableFlip, filteredFlipPlacements, offsetDistance, offsetSkidding, arrowEl } = this;
|
630
|
-
return floatingUi.reposition(this, {
|
631
|
-
floatingEl: el,
|
632
|
-
referenceEl: effectiveReferenceElement,
|
633
|
-
overlayPositioning,
|
634
|
-
placement,
|
635
|
-
disableFlip,
|
636
|
-
flipPlacements: filteredFlipPlacements,
|
637
|
-
offsetDistance,
|
638
|
-
offsetSkidding,
|
639
|
-
includeArrow: !this.disablePointer,
|
640
|
-
arrowEl,
|
641
|
-
type: "popover"
|
642
|
-
}, delayed);
|
643
|
-
}
|
644
|
-
/**
|
645
|
-
* Sets focus on the component.
|
646
|
-
*
|
647
|
-
* @param focusId
|
648
|
-
*/
|
649
|
-
async setFocus(focusId) {
|
650
|
-
var _a;
|
651
|
-
const { closeButtonEl } = this;
|
652
|
-
if (focusId === "close-button" && closeButtonEl) {
|
653
|
-
index.forceUpdate(closeButtonEl);
|
654
|
-
closeButtonEl.setFocus();
|
655
|
-
return;
|
656
|
-
}
|
657
|
-
(_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
|
658
|
-
}
|
659
|
-
/**
|
660
|
-
* Toggles the component's open property.
|
661
|
-
*
|
662
|
-
* @param value
|
663
|
-
*/
|
664
|
-
async toggle(value = !this.open) {
|
665
|
-
this.open = value;
|
666
|
-
}
|
667
|
-
getReferenceElement() {
|
668
|
-
const { referenceElement, el } = this;
|
669
|
-
return ((typeof referenceElement === "string"
|
670
|
-
? dom.queryElementRoots(el, { id: referenceElement })
|
671
|
-
: referenceElement) || null);
|
672
|
-
}
|
673
|
-
onBeforeOpen() {
|
674
|
-
this.calcitePopoverBeforeOpen.emit();
|
675
|
-
}
|
676
|
-
onOpen() {
|
677
|
-
this.calcitePopoverOpen.emit();
|
678
|
-
}
|
679
|
-
onBeforeClose() {
|
680
|
-
this.calcitePopoverBeforeClose.emit();
|
681
|
-
}
|
682
|
-
onClose() {
|
683
|
-
this.calcitePopoverClose.emit();
|
684
|
-
}
|
685
|
-
// --------------------------------------------------------------------------
|
686
|
-
//
|
687
|
-
// Render Methods
|
688
|
-
//
|
689
|
-
// --------------------------------------------------------------------------
|
690
|
-
renderCloseButton() {
|
691
|
-
const { closeButton, intlClose, heading, closable } = this;
|
692
|
-
return closable || closeButton ? (index.h("div", { class: CSS.closeButtonContainer }, index.h("calcite-action", { class: CSS.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), scale: heading ? "s" : "m", text: intlClose }, index.h("calcite-icon", { icon: "x", scale: heading ? "s" : "m" })))) : null;
|
693
|
-
}
|
694
|
-
renderHeader() {
|
695
|
-
const { heading, headingLevel } = this;
|
696
|
-
const headingNode = heading ? (index.h(Heading.Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, heading)) : null;
|
697
|
-
return headingNode ? (index.h("div", { class: CSS.header }, headingNode, this.renderCloseButton())) : null;
|
698
|
-
}
|
699
333
|
render() {
|
700
|
-
const {
|
701
|
-
const
|
702
|
-
const
|
703
|
-
const
|
704
|
-
return (index.h(
|
705
|
-
[floatingUi.FloatingCSS.animation]: true,
|
706
|
-
[floatingUi.FloatingCSS.animationActive]: displayed
|
707
|
-
}, ref: this.setTransitionEl }, arrowNode, index.h("div", { class: {
|
708
|
-
[CSS.hasHeader]: !!heading,
|
709
|
-
[CSS.container]: true
|
710
|
-
} }, this.renderHeader(), index.h("div", { class: CSS.content }, index.h("slot", null)), !heading ? this.renderCloseButton() : null))));
|
334
|
+
const { el, loading, intlLoading } = this;
|
335
|
+
const hasContent = el.innerHTML.trim().length > 0;
|
336
|
+
const loaderNode = loading ? index.h("calcite-loader", { active: true, label: intlLoading }) : null;
|
337
|
+
const contentNode = hasContent ? (index.h("div", { class: CSS.content }, index.h("slot", null))) : null;
|
338
|
+
return (index.h("div", { class: CSS.scrim }, loaderNode, contentNode));
|
711
339
|
}
|
712
340
|
get el() { return index.getElement(this); }
|
713
|
-
static get watchers() { return {
|
714
|
-
"dismissible": ["handleDismissible"],
|
715
|
-
"closable": ["handleClosable"],
|
716
|
-
"flipPlacements": ["flipPlacementsHandler"],
|
717
|
-
"offsetDistance": ["offsetDistanceOffsetHandler"],
|
718
|
-
"offsetSkidding": ["offsetSkiddingHandler"],
|
719
|
-
"open": ["openHandler"],
|
720
|
-
"overlayPositioning": ["overlayPositioningHandler"],
|
721
|
-
"placement": ["placementHandler"],
|
722
|
-
"referenceElement": ["referenceElementHandler"]
|
723
|
-
}; }
|
724
341
|
};
|
725
|
-
|
342
|
+
Scrim.style = scrimCss;
|
726
343
|
|
727
344
|
exports.calcite_action_menu = ActionMenu;
|
728
|
-
exports.
|
345
|
+
exports.calcite_scrim = Scrim;
|
729
346
|
|
730
347
|
//# sourceMappingURL=calcite-action-menu_2.cjs.entry.js.map
|