@esri/solutions-components 0.5.0 → 0.5.2
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/arcgis-pdf-creator/PDFCreator.js +6 -3
- package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
- package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
- package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
- package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
- package/dist/assets/data/images/grid.png +0 -0
- package/dist/assets/data/images/horizontal.png +0 -0
- package/dist/assets/data/images/vertical.png +0 -0
- package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
- package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +88 -92
- package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
- package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
- package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +131 -5
- package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +19 -17
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
- package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
- package/dist/cjs/{downloadUtils-415ab342.js → downloadUtils-9359e9ff.js} +135 -44
- package/dist/cjs/{index.es-98008aa0.js → index.es-9c0d0ed6.js} +3 -3
- package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
- package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapViewUtils-f617ae9a.js → mapViewUtils-090f4d4d.js} +3 -3
- package/dist/cjs/public-notification.cjs.entry.js +173 -48
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
- package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
- package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
- package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
- package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
- package/dist/collection/components/layer-table/layer-table.css +2 -70
- package/dist/collection/components/layer-table/layer-table.js +66 -106
- package/dist/collection/components/map-card/map-card.css +4 -7
- package/dist/collection/components/map-card/map-card.js +44 -10
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +4 -8
- package/dist/collection/components/map-select-tools/map-select-tools.js +75 -15
- package/dist/collection/components/public-notification/public-notification.js +217 -25
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +14 -41
- package/dist/collection/utils/csvDownload.js +41 -0
- package/dist/collection/utils/csvDownload.ts +42 -0
- package/dist/collection/utils/csvUtils.js +6 -23
- package/dist/collection/utils/csvUtils.ts +8 -27
- package/dist/collection/utils/downloadUtils.js +30 -14
- package/dist/collection/utils/downloadUtils.ts +36 -14
- package/dist/collection/utils/interfaces.js +6 -0
- package/dist/collection/utils/interfaces.ts +6 -0
- package/dist/collection/utils/pdfUtils.js +9 -6
- package/dist/collection/utils/pdfUtils.ts +13 -8
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
- package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
- package/dist/components/crowdsource-manager.js +293 -17
- package/dist/components/downloadUtils.js +133 -42
- package/dist/components/interfaces3.js +7 -1
- package/dist/components/layer-table.js +1 -443
- package/dist/components/layer-table2.js +429 -0
- package/dist/components/map-card.js +1 -339
- package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
- package/dist/components/map-draw-tools2.js +19 -23
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +21 -16
- package/dist/components/public-notification.js +209 -81
- package/dist/components/queryUtils.js +2 -2
- package/dist/components/refine-selection-tools2.js +3 -3
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-store.js +1 -1
- package/dist/esm/buffer-tools_6.entry.js +79 -83
- package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
- package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
- package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +134 -9
- package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
- package/dist/esm/calcite-input-message_5.entry.js +19 -17
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
- package/dist/esm/crowdsource-manager.entry.js +88 -14
- package/dist/esm/{downloadUtils-606b0f0e.js → downloadUtils-a8f139c5.js} +135 -44
- package/dist/esm/{index.es-c736c805.js → index.es-a75412ff.js} +3 -3
- package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
- package/dist/esm/layer-table_2.entry.js +507 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-4e945e07.js → mapViewUtils-8ffcd36d.js} +4 -4
- package/dist/esm/public-notification.entry.js +169 -44
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
- package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
- package/dist/solutions-components/{p-4f5641b4.entry.js → p-1affd711.entry.js} +18 -18
- package/dist/solutions-components/p-30de8da1.entry.js +17 -0
- package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
- package/dist/solutions-components/{p-72117a18.js → p-765a27f3.js} +1 -1
- package/dist/solutions-components/p-813a04c3.entry.js +6 -0
- package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
- package/dist/solutions-components/p-8cece97f.js +21 -0
- package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
- package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
- package/dist/solutions-components/{p-6a657ff6.js → p-bb64bd47.js} +25 -9
- package/dist/solutions-components/p-c392dd95.entry.js +17 -0
- package/dist/solutions-components/p-ca386a72.entry.js +6 -0
- package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
- package/dist/solutions-components/p-db846ee2.entry.js +11 -0
- package/dist/solutions-components/p-dc53c9c1.js +36 -0
- package/dist/solutions-components/p-e1c93241.entry.js +6 -0
- package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +6 -6
- package/dist/solutions-components/utils/csvDownload.ts +42 -0
- package/dist/solutions-components/utils/csvUtils.ts +8 -27
- package/dist/solutions-components/utils/downloadUtils.ts +36 -14
- package/dist/solutions-components/utils/interfaces.ts +6 -0
- package/dist/solutions-components/utils/pdfUtils.ts +13 -8
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
- package/dist/types/components/layer-table/layer-table.d.ts +35 -48
- package/dist/types/components/map-card/map-card.d.ts +10 -6
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +16 -1
- package/dist/types/components/public-notification/public-notification.d.ts +86 -4
- package/dist/types/components.d.ts +68 -0
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/csvDownload.d.ts +24 -0
- package/dist/types/utils/csvUtils.d.ts +2 -1
- package/dist/types/utils/downloadUtils.d.ts +25 -0
- package/dist/types/utils/interfaces.d.ts +5 -0
- package/dist/types/utils/pdfUtils.d.ts +2 -1
- package/package.json +4 -4
- package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
- package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
- package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
- package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
- package/dist/cjs/layer-table.cjs.entry.js +0 -317
- package/dist/cjs/map-card.cjs.entry.js +0 -252
- package/dist/esm/calcite-chip.entry.js +0 -138
- package/dist/esm/calcite-dropdown.entry.js +0 -477
- package/dist/esm/calcite-handle.entry.js +0 -95
- package/dist/esm/calcite-loader.entry.js +0 -91
- package/dist/esm/layer-table.entry.js +0 -313
- package/dist/solutions-components/p-11132485.entry.js +0 -11
- package/dist/solutions-components/p-15b43c29.entry.js +0 -11
- package/dist/solutions-components/p-5034aabc.entry.js +0 -11
- package/dist/solutions-components/p-5ee7b022.entry.js +0 -12
- package/dist/solutions-components/p-6f012424.entry.js +0 -6
- package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
- package/dist/solutions-components/p-84bbaebf.entry.js +0 -6
- package/dist/solutions-components/p-88e28de2.js +0 -36
- package/dist/solutions-components/p-a57ef371.entry.js +0 -6
- package/dist/solutions-components/p-ac76d270.entry.js +0 -17
- package/dist/solutions-components/p-dbc9a5a8.js +0 -21
- package/dist/solutions-components/p-e162304e.entry.js +0 -6
- package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
- package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c246d90e.js';
|
|
7
|
-
import { t as toAriaBoolean } from './dom-3bdc69ee.js';
|
|
8
|
-
import './resources-436ae282.js';
|
|
9
|
-
import './guid-15fce7c0.js';
|
|
10
|
-
|
|
11
|
-
/*!
|
|
12
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
13
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
14
|
-
* v1.0.0-beta.97
|
|
15
|
-
*/
|
|
16
|
-
const CSS = {
|
|
17
|
-
handle: "handle",
|
|
18
|
-
handleActivated: "handle--activated"
|
|
19
|
-
};
|
|
20
|
-
const ICONS = {
|
|
21
|
-
drag: "drag"
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const handleCss = "@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:flex}.handle{display:flex;cursor:move;align-items:center;justify-content:center;align-self:stretch;border-style:none;background-color:transparent;outline-color:transparent;color:var(--calcite-ui-border-input);padding-block:0.75rem;padding-inline:0.25rem;line-height:0}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}";
|
|
25
|
-
|
|
26
|
-
const Handle = class {
|
|
27
|
-
constructor(hostRef) {
|
|
28
|
-
registerInstance(this, hostRef);
|
|
29
|
-
this.calciteHandleNudge = createEvent(this, "calciteHandleNudge", 6);
|
|
30
|
-
// --------------------------------------------------------------------------
|
|
31
|
-
//
|
|
32
|
-
// Properties
|
|
33
|
-
//
|
|
34
|
-
// --------------------------------------------------------------------------
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
this.activated = false;
|
|
39
|
-
/**
|
|
40
|
-
* Value for the button title attribute
|
|
41
|
-
*/
|
|
42
|
-
this.textTitle = "handle";
|
|
43
|
-
// --------------------------------------------------------------------------
|
|
44
|
-
//
|
|
45
|
-
// Private Methods
|
|
46
|
-
//
|
|
47
|
-
// --------------------------------------------------------------------------
|
|
48
|
-
this.handleKeyDown = (event) => {
|
|
49
|
-
switch (event.key) {
|
|
50
|
-
case " ":
|
|
51
|
-
this.activated = !this.activated;
|
|
52
|
-
event.preventDefault();
|
|
53
|
-
break;
|
|
54
|
-
case "ArrowUp":
|
|
55
|
-
case "ArrowDown":
|
|
56
|
-
if (!this.activated) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
const direction = event.key.toLowerCase().replace("arrow", "");
|
|
61
|
-
this.calciteHandleNudge.emit({ handle: this.el, direction });
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
this.handleBlur = () => {
|
|
66
|
-
this.activated = false;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
// --------------------------------------------------------------------------
|
|
70
|
-
//
|
|
71
|
-
// Methods
|
|
72
|
-
//
|
|
73
|
-
// --------------------------------------------------------------------------
|
|
74
|
-
/** Sets focus on the component. */
|
|
75
|
-
async setFocus() {
|
|
76
|
-
var _a;
|
|
77
|
-
(_a = this.handleButton) === null || _a === void 0 ? void 0 : _a.focus();
|
|
78
|
-
}
|
|
79
|
-
// --------------------------------------------------------------------------
|
|
80
|
-
//
|
|
81
|
-
// Render Methods
|
|
82
|
-
//
|
|
83
|
-
// --------------------------------------------------------------------------
|
|
84
|
-
render() {
|
|
85
|
-
return (
|
|
86
|
-
// Needs to be a span because of https://github.com/SortableJS/Sortable/issues/1486
|
|
87
|
-
h("span", { "aria-pressed": toAriaBoolean(this.activated), class: { [CSS.handle]: true, [CSS.handleActivated]: this.activated }, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
|
|
88
|
-
this.handleButton = el;
|
|
89
|
-
}, role: "button", tabindex: "0", title: this.textTitle }, h("calcite-icon", { icon: ICONS.drag, scale: "s" })));
|
|
90
|
-
}
|
|
91
|
-
get el() { return getElement(this); }
|
|
92
|
-
};
|
|
93
|
-
Handle.style = handleCss;
|
|
94
|
-
|
|
95
|
-
export { Handle as calcite_handle };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
|
-
import { g as guid } from './guid-15fce7c0.js';
|
|
8
|
-
|
|
9
|
-
const loaderCss = "@charset \"UTF-8\";@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:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) * 2) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem)}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--2);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem}:host([no-padding]){padding-block:0px}:host{display:none}:host([active]){display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-ui-text-1);-webkit-margin-before:calc(var(--calcite-loader-size) + 1.5rem);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{position:absolute;display:block;text-align:center;color:var(--calcite-ui-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);line-height:0.25;transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);transform:scale(1, 1)}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear;animation-name:loader-clockwise}@supports (display: grid){.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}}:host([type=determinate]){animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svg--3{animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);-webkit-margin-end:calc(var(--calcite-loader-size-inline) * 0.5);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([active][inline]){display:inline-block}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 2.4)}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}.loader__svg--2{stroke-dasharray:55.8504888889% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.2)}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}.loader__svg--3{stroke-dasharray:13.9626222222% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.867)}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-clockwise{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
10
|
-
|
|
11
|
-
const Loader = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
//--------------------------------------------------------------------------
|
|
15
|
-
//
|
|
16
|
-
// Properties
|
|
17
|
-
//
|
|
18
|
-
//--------------------------------------------------------------------------
|
|
19
|
-
/** When `true`, the component is active. */
|
|
20
|
-
this.active = false;
|
|
21
|
-
/** When `true`, displays smaller and appears to the left of the text. */
|
|
22
|
-
this.inline = false;
|
|
23
|
-
/** Specifies the size of the component. */
|
|
24
|
-
this.scale = "m";
|
|
25
|
-
/** The component's value. Valid only for `"determinate"` indicators. Percent complete of 100. */
|
|
26
|
-
this.value = 0;
|
|
27
|
-
/** Text that displays under the component's indicator. */
|
|
28
|
-
this.text = "";
|
|
29
|
-
/**
|
|
30
|
-
* Disables spacing around the component.
|
|
31
|
-
*
|
|
32
|
-
* @deprecated Use `--calcite-loader-padding` CSS variable instead.
|
|
33
|
-
*/
|
|
34
|
-
this.noPadding = false;
|
|
35
|
-
}
|
|
36
|
-
//--------------------------------------------------------------------------
|
|
37
|
-
//
|
|
38
|
-
// Lifecycle
|
|
39
|
-
//
|
|
40
|
-
//--------------------------------------------------------------------------
|
|
41
|
-
render() {
|
|
42
|
-
const { el, inline, label, scale, text, type, value } = this;
|
|
43
|
-
const id = el.id || guid();
|
|
44
|
-
const radiusRatio = 0.45;
|
|
45
|
-
const size = inline ? this.getInlineSize(scale) : this.getSize(scale);
|
|
46
|
-
const radius = size * radiusRatio;
|
|
47
|
-
const viewbox = `0 0 ${size} ${size}`;
|
|
48
|
-
const isDeterminate = type === "determinate";
|
|
49
|
-
const circumference = 2 * radius * Math.PI;
|
|
50
|
-
const progress = (value / 100) * circumference;
|
|
51
|
-
const remaining = circumference - progress;
|
|
52
|
-
const valueNow = Math.floor(value);
|
|
53
|
-
const hostAttributes = {
|
|
54
|
-
"aria-valuenow": valueNow,
|
|
55
|
-
"aria-valuemin": 0,
|
|
56
|
-
"aria-valuemax": 100,
|
|
57
|
-
complete: valueNow === 100
|
|
58
|
-
};
|
|
59
|
-
const svgAttributes = { r: radius, cx: size / 2, cy: size / 2 };
|
|
60
|
-
const determinateStyle = { "stroke-dasharray": `${progress} ${remaining}` };
|
|
61
|
-
return (h(Host, Object.assign({ "aria-label": label, id: id, role: "progressbar" }, (isDeterminate ? hostAttributes : {})), h("div", { class: "loader__svgs" }, h("svg", { class: "loader__svg loader__svg--1", viewBox: viewbox }, h("circle", Object.assign({}, svgAttributes))), h("svg", { class: "loader__svg loader__svg--2", viewBox: viewbox }, h("circle", Object.assign({}, svgAttributes))), h("svg", Object.assign({ class: "loader__svg loader__svg--3", viewBox: viewbox }, (isDeterminate ? { style: determinateStyle } : {})), h("circle", Object.assign({}, svgAttributes)))), text && h("div", { class: "loader__text" }, text), isDeterminate && h("div", { class: "loader__percentage" }, value)));
|
|
62
|
-
}
|
|
63
|
-
//--------------------------------------------------------------------------
|
|
64
|
-
//
|
|
65
|
-
// Private Methods
|
|
66
|
-
//
|
|
67
|
-
//--------------------------------------------------------------------------
|
|
68
|
-
/**
|
|
69
|
-
* Return the proper sizes based on the scale property
|
|
70
|
-
*
|
|
71
|
-
* @param scale
|
|
72
|
-
*/
|
|
73
|
-
getSize(scale) {
|
|
74
|
-
return {
|
|
75
|
-
s: 32,
|
|
76
|
-
m: 56,
|
|
77
|
-
l: 80
|
|
78
|
-
}[scale];
|
|
79
|
-
}
|
|
80
|
-
getInlineSize(scale) {
|
|
81
|
-
return {
|
|
82
|
-
s: 12,
|
|
83
|
-
m: 16,
|
|
84
|
-
l: 20
|
|
85
|
-
}[scale];
|
|
86
|
-
}
|
|
87
|
-
get el() { return getElement(this); }
|
|
88
|
-
};
|
|
89
|
-
Loader.style = loaderCss;
|
|
90
|
-
|
|
91
|
-
export { Loader as calcite_loader };
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
8
|
-
import { g as goToSelection, a as getMapLayerView, q as queryAllFeatures } from './mapViewUtils-4e945e07.js';
|
|
9
|
-
import { d as downloadCSV } from './downloadUtils-606b0f0e.js';
|
|
10
|
-
import './_commonjsHelpers-d5f9d613.js';
|
|
11
|
-
import './interfaces-d0d83efa.js';
|
|
12
|
-
import './loadModules-b299cd43.js';
|
|
13
|
-
|
|
14
|
-
const layerTableCss = ":host{display:block}.table{display:table;width:100%}.header{display:table-header-group;background-color:#757575;font-weight:500;font-size:var(--calcite-font-size-0);color:var(--calcite-ui-text-inverse);position:sticky;top:0;z-index:1}.table-header-cell{display:table-cell;text-align:justify;border-right:1px solid var(--calcite-ui-border-2);padding:0.5rem}.table-body{display:table-row-group}.row{display:table-row}.table-cell{display:table-cell;padding:0.5rem}.display-table-header{display:table-header-group}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.justify-center{justify-content:center}.table-container{width:100%}.overflow-auto{overflow:auto}.data-container{overflow:auto;height:calc(100% - 35px)}.row:nth-child(odd){background:var(--calcite-ui-foreground-3)}.padding-3-4{padding:0.75rem}.field-width{white-space:nowrap;min-width:300px;max-width:300px;overflow:hidden}";
|
|
15
|
-
|
|
16
|
-
const LayerTable = class {
|
|
17
|
-
constructor(hostRef) {
|
|
18
|
-
registerInstance(this, hostRef);
|
|
19
|
-
/**
|
|
20
|
-
* esri/Graphic[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html
|
|
21
|
-
*/
|
|
22
|
-
this._graphics = [];
|
|
23
|
-
/**
|
|
24
|
-
* string[]: List of field names to display
|
|
25
|
-
*/
|
|
26
|
-
this._fieldNames = [];
|
|
27
|
-
this.mapView = undefined;
|
|
28
|
-
this._translations = undefined;
|
|
29
|
-
this._selectedIndexes = [];
|
|
30
|
-
}
|
|
31
|
-
//--------------------------------------------------------------------------
|
|
32
|
-
//
|
|
33
|
-
// Watch handlers
|
|
34
|
-
//
|
|
35
|
-
//--------------------------------------------------------------------------
|
|
36
|
-
//--------------------------------------------------------------------------
|
|
37
|
-
//
|
|
38
|
-
// Methods (public)
|
|
39
|
-
//
|
|
40
|
-
//--------------------------------------------------------------------------
|
|
41
|
-
//--------------------------------------------------------------------------
|
|
42
|
-
//
|
|
43
|
-
// Events (public)
|
|
44
|
-
//
|
|
45
|
-
//--------------------------------------------------------------------------
|
|
46
|
-
//--------------------------------------------------------------------------
|
|
47
|
-
//
|
|
48
|
-
// Functions (lifecycle)
|
|
49
|
-
//
|
|
50
|
-
//--------------------------------------------------------------------------
|
|
51
|
-
/**
|
|
52
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
53
|
-
*
|
|
54
|
-
* @returns Promise when complete
|
|
55
|
-
*/
|
|
56
|
-
async componentWillLoad() {
|
|
57
|
-
await this._getTranslations();
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Renders the component.
|
|
61
|
-
*/
|
|
62
|
-
render() {
|
|
63
|
-
return (h(Host, null, this._getTableControlRow(), h("div", { class: "data-container" }, h("div", { class: "table-container" }, h("div", { class: "table" }, this._getTableHeader(), this._getTableRows()))), h("edit-record-modal", { ref: (el) => this._editMultipleMpdal = el })));
|
|
64
|
-
}
|
|
65
|
-
//--------------------------------------------------------------------------
|
|
66
|
-
//
|
|
67
|
-
// Functions (protected)
|
|
68
|
-
//
|
|
69
|
-
//--------------------------------------------------------------------------
|
|
70
|
-
/**
|
|
71
|
-
* Gets a row of controls that can be used for various interactions with the table
|
|
72
|
-
*
|
|
73
|
-
* @returns The dom node that contains the controls
|
|
74
|
-
*/
|
|
75
|
-
_getTableControlRow() {
|
|
76
|
-
const featuresSelected = this._selectedIndexes.length > 0;
|
|
77
|
-
const multiFeaturesSelected = this._selectedIndexes.length > 1;
|
|
78
|
-
return (h("div", { class: "display-flex table-border" }, h("map-layer-picker", { mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt) }), h("div", null, h("calcite-button", { appearance: 'transparent', color: 'neutral', disabled: !featuresSelected, iconStart: 'magnifying-glass', onClick: () => this._zoom() }, this._translations.zoom), h("calcite-button", { appearance: 'transparent', color: 'neutral', disabled: !multiFeaturesSelected, iconStart: 'pencil', onClick: () => this._editMultiple() }, this._translations.editMultiple), h("calcite-button", { appearance: 'transparent', color: 'neutral', disabled: !featuresSelected, iconStart: 'trash', onClick: () => this._delete() }, this._translations.delete), h("calcite-split-button", { appearance: "transparent", color: "neutral", "primary-text": this._translations.more }, h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: 'list-check-all', onClick: () => this._selectAll(true) }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: 'selected-items-filter', onClick: () => this._showSelected() }, this._translations.showSelected), h("calcite-dropdown-item", { iconStart: 'erase', onClick: () => this._clearSelection() }, this._translations.clearSelection), h("calcite-dropdown-item", { iconStart: 'refresh', onClick: () => this._switchSelected() }, this._translations.switchSelected), h("calcite-dropdown-item", { iconStart: 'export', onClick: () => this._exportToCSV() }, this._translations.exportCSV))))));
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Gets the table header with a select all control and column headers for each field
|
|
82
|
-
*
|
|
83
|
-
* @returns The dom node that contains the header
|
|
84
|
-
*/
|
|
85
|
-
_getTableHeader() {
|
|
86
|
-
return (h("div", { class: "header" }, h("div", { class: "table-header-cell padding-3-4" }, h("calcite-checkbox", { class: "display-flex justify-center", onClick: () => this._selectAll(this._selectAllElement.checked), ref: (el) => this._selectAllElement = el })), this._fieldNames.map(name => this._getTableHeaderCell(name))));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Gets a header cell for the table header
|
|
90
|
-
*
|
|
91
|
-
* @param name the string to display in the cell
|
|
92
|
-
*
|
|
93
|
-
* @returns The dom node that contains the header cell
|
|
94
|
-
*/
|
|
95
|
-
_getTableHeaderCell(name) {
|
|
96
|
-
return (h("div", { class: "table-header-cell field-width" }, name));
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Gets the table rows for all features
|
|
100
|
-
*
|
|
101
|
-
* @returns The dom node that contains the body of the table
|
|
102
|
-
*/
|
|
103
|
-
_getTableRows() {
|
|
104
|
-
return (h("div", { class: "table-body" }, this._graphics.map((g, i) => this._getTableRow(g, i))));
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Gets the individual table row for a feature
|
|
108
|
-
*
|
|
109
|
-
* @param g the graphic the row is based on
|
|
110
|
-
* @param index the index location of the row within the table
|
|
111
|
-
*
|
|
112
|
-
* @returns The dom node that contains the row
|
|
113
|
-
*/
|
|
114
|
-
_getTableRow(g, index) {
|
|
115
|
-
// TODO think through this more...should build the fieldType info once up front rather
|
|
116
|
-
// than on every single value...
|
|
117
|
-
const checked = this._selectedIndexes.indexOf(index) > -1;
|
|
118
|
-
return (h("div", { class: "row" }, h("div", { class: "table-cell table-border padding-3-4" }, h("calcite-checkbox", { checked: checked, class: "display-flex justify-center", onClick: () => this._rowSelected(index), value: index })), this._fieldNames.map(name => {
|
|
119
|
-
const field = this._layerView.layer.fieldsIndex.get(name);
|
|
120
|
-
return this._getTableRowCell(g.attributes[name], field, checked);
|
|
121
|
-
})));
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Gets the individual table cell for the provided field
|
|
125
|
-
*
|
|
126
|
-
* @param v the value to display
|
|
127
|
-
* @param field the field the row is based on
|
|
128
|
-
* @param rowSelected when true editable fields will render a control that will allow the value to be updated
|
|
129
|
-
*
|
|
130
|
-
* @returns The dom node that contains the table cell
|
|
131
|
-
*/
|
|
132
|
-
_getTableRowCell(v, field, rowSelected) {
|
|
133
|
-
const editable = field.editable && rowSelected;
|
|
134
|
-
const inputType = this._getInputType(field.type);
|
|
135
|
-
// TODO find some domain data to test with..this has not been tested
|
|
136
|
-
let domainInput;
|
|
137
|
-
const domain = field.domain;
|
|
138
|
-
if (domain) {
|
|
139
|
-
if (domain.type === "coded-value") {
|
|
140
|
-
domainInput = (h("calcite-select", { label: '' }, domain.codedValues.map(cv => {
|
|
141
|
-
return (h("calcite-option", { label: cv.name, selected: v === cv.code.toString(), value: cv.code }));
|
|
142
|
-
})));
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// range domain
|
|
146
|
-
const range = domain;
|
|
147
|
-
domainInput = (h("calcite-input", { max: range.maxValue, min: range.minValue, type: "number", value: v }));
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return (h("div", { class: "table-cell table-border field-width" }, editable && domainInput ? domainInput : editable ? (h("calcite-input", { type: inputType, value: v })) : v));
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Simple lookup that will get the appropriate edit control for the value type
|
|
154
|
-
*
|
|
155
|
-
* @param type the Esri field type
|
|
156
|
-
*
|
|
157
|
-
* @returns A string for the type of control to create based on the provided field type
|
|
158
|
-
*/
|
|
159
|
-
_getInputType(type) {
|
|
160
|
-
// JS API field types
|
|
161
|
-
// "string" | "small-integer" | "integer" | "single" | "double" | "long" | "date" | "oid" | "geometry" | "blob" | "raster" | "guid" | "global-id" | "xml"
|
|
162
|
-
// not sure about these: "geometry" | "blob" | "raster" | | "xml"
|
|
163
|
-
// Calcite input types
|
|
164
|
-
// color date datetime-local email file image month number password search tel text(default) textarea time url week
|
|
165
|
-
const inputTypes = {
|
|
166
|
-
"string": 'text',
|
|
167
|
-
"small-integer": "number",
|
|
168
|
-
"integer": "number",
|
|
169
|
-
"single": "number",
|
|
170
|
-
"double": "number",
|
|
171
|
-
"long": "number",
|
|
172
|
-
"date": "datetime-local",
|
|
173
|
-
"oid": "number",
|
|
174
|
-
"guid": "text",
|
|
175
|
-
"global-id": "text"
|
|
176
|
-
};
|
|
177
|
-
return Object.keys(inputTypes).indexOf(type) > -1 ? inputTypes[type] : "text";
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Select or deselect all rows
|
|
181
|
-
*
|
|
182
|
-
* @param checked When true all rows will be selected
|
|
183
|
-
*
|
|
184
|
-
* @returns void
|
|
185
|
-
*/
|
|
186
|
-
_selectAll(checked) {
|
|
187
|
-
this._selectedIndexes = checked ? this._graphics.map((_g, i) => i) : [];
|
|
188
|
-
}
|
|
189
|
-
// need to discuss with team
|
|
190
|
-
_showSelected() {
|
|
191
|
-
console.log("_showSelected");
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Clears the selected indexes
|
|
195
|
-
*
|
|
196
|
-
* @returns void
|
|
197
|
-
*/
|
|
198
|
-
_clearSelection() {
|
|
199
|
-
this._selectedIndexes = [];
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Select all rows that are not currently selectd
|
|
203
|
-
*
|
|
204
|
-
* @returns void
|
|
205
|
-
*/
|
|
206
|
-
_switchSelected() {
|
|
207
|
-
const currentIndexes = [...this._selectedIndexes];
|
|
208
|
-
this._selectedIndexes = this._graphics.reduce((prev, _cur, i) => {
|
|
209
|
-
if (currentIndexes.indexOf(i) < 0) {
|
|
210
|
-
prev.push(i);
|
|
211
|
-
}
|
|
212
|
-
return prev;
|
|
213
|
-
}, []);
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Export all selected rows as CSV
|
|
217
|
-
*
|
|
218
|
-
* @returns a promise that will resolve when the operation is complete
|
|
219
|
-
*/
|
|
220
|
-
async _exportToCSV() {
|
|
221
|
-
return downloadCSV([], this._layerView.layer, this._getSelectedIds(), false, // formatUsingLayerPopup
|
|
222
|
-
false, // removeDuplicates
|
|
223
|
-
true);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Zoom to all selected features
|
|
227
|
-
*
|
|
228
|
-
* @returns a promise that will resolve when the operation is complete
|
|
229
|
-
*/
|
|
230
|
-
_zoom() {
|
|
231
|
-
const ids = this._getSelectedIds();
|
|
232
|
-
void goToSelection(ids, this._layerView, this.mapView, true);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Open the edit multiple modal
|
|
236
|
-
*
|
|
237
|
-
* @returns void
|
|
238
|
-
*/
|
|
239
|
-
_editMultiple() {
|
|
240
|
-
this._editMultipleMpdal.open = true;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Delete all selected records
|
|
244
|
-
*
|
|
245
|
-
* @returns a promise that will resolve when the operation is complete
|
|
246
|
-
*/
|
|
247
|
-
_delete() {
|
|
248
|
-
console.log("delete");
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Get the graphics for all selected indexes
|
|
252
|
-
*
|
|
253
|
-
* @param indexes the indexes for the graphics to fetch
|
|
254
|
-
*
|
|
255
|
-
* @returns An array of selected graphics
|
|
256
|
-
*/
|
|
257
|
-
_getGraphics(indexes) {
|
|
258
|
-
return this._graphics.filter((_g, i) => indexes.indexOf(i) > -1);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Gets the object ids for all selected rows
|
|
262
|
-
*
|
|
263
|
-
* @returns An array of object ids
|
|
264
|
-
*/
|
|
265
|
-
_getSelectedIds() {
|
|
266
|
-
const graphics = this._getGraphics(this._selectedIndexes);
|
|
267
|
-
return graphics.map(g => g.getObjectId());
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Update the selected indexes based on the current row
|
|
271
|
-
*
|
|
272
|
-
* @param index the index of the selected row
|
|
273
|
-
*
|
|
274
|
-
* @returns void
|
|
275
|
-
*/
|
|
276
|
-
_rowSelected(index) {
|
|
277
|
-
const indexOfSelected = this._selectedIndexes.indexOf(index);
|
|
278
|
-
if (indexOfSelected > -1) {
|
|
279
|
-
this._selectedIndexes.splice(indexOfSelected, 1);
|
|
280
|
-
this._selectedIndexes = [...this._selectedIndexes];
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
this._selectedIndexes = [...this._selectedIndexes, index];
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Handles layer selection change to show new table
|
|
288
|
-
*
|
|
289
|
-
* @returns a promise that will resolve when the operation is complete
|
|
290
|
-
*/
|
|
291
|
-
async _layerSelectionChanged(evt) {
|
|
292
|
-
const layerName = evt.detail[0];
|
|
293
|
-
this._layerView = await getMapLayerView(this.mapView, layerName);
|
|
294
|
-
// TODO rethink this...when we use later we need to be able to lookup with name
|
|
295
|
-
this._fieldNames = this._layerView.layer.fields.map(f => f.alias || f.name);
|
|
296
|
-
this._graphics = await queryAllFeatures(0, this._layerView.layer, []);
|
|
297
|
-
this._selectedIndexes = [];
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Fetches the component's translations
|
|
301
|
-
*
|
|
302
|
-
* @returns Promise when complete
|
|
303
|
-
* @protected
|
|
304
|
-
*/
|
|
305
|
-
async _getTranslations() {
|
|
306
|
-
const messages = await getLocaleComponentStrings(this.el);
|
|
307
|
-
this._translations = messages[0];
|
|
308
|
-
}
|
|
309
|
-
get el() { return getElement(this); }
|
|
310
|
-
};
|
|
311
|
-
LayerTable.style = layerTableCss;
|
|
312
|
-
|
|
313
|
-
export { LayerTable as layer_table };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{r as a,c as t,h as i,g as n}from"./p-c2f00d41.js";import{t as e}from"./p-83166522.js";import"./p-729708a3.js";import"./p-a80b3880.js";
|
|
7
|
-
/*!
|
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
10
|
-
* v1.0.0-beta.97
|
|
11
|
-
*/const r=class{constructor(i){a(this,i),this.calciteHandleNudge=t(this,"calciteHandleNudge",6),this.activated=!1,this.textTitle="handle",this.handleKeyDown=a=>{switch(a.key){case" ":this.activated=!this.activated,a.preventDefault();break;case"ArrowUp":case"ArrowDown":if(!this.activated)return;a.preventDefault();const t=a.key.toLowerCase().replace("arrow","");this.calciteHandleNudge.emit({handle:this.el,direction:t})}},this.handleBlur=()=>{this.activated=!1}}async setFocus(){var a;null===(a=this.handleButton)||void 0===a||a.focus()}render(){return i("span",{"aria-pressed":e(this.activated),class:{handle:!0,"handle--activated":this.activated},onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,ref:a=>{this.handleButton=a},role:"button",tabindex:"0",title:this.textTitle},i("calcite-icon",{icon:"drag",scale:"s"}))}get el(){return n(this)}};r.style="@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:flex}.handle{display:flex;cursor:move;align-items:center;justify-content:center;align-self:stretch;border-style:none;background-color:transparent;outline-color:transparent;color:var(--calcite-ui-border-input);padding-block:0.75rem;padding-inline:0.25rem;line-height:0}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}";export{r as calcite_handle}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as i,h as e,H as a,g as s}from"./p-c2f00d41.js";import{t as n,i as o,f as r}from"./p-83166522.js";import{d as c,f as l,c as h,u as d,a as p,F as m,r as f}from"./p-a9cefd9c.js";import{c as u}from"./p-9a9955db.js";import{u as w}from"./p-7daea1df.js";import{c as v,d as b}from"./p-2e9ed892.js";import{g as y}from"./p-a80b3880.js";import{i as g}from"./p-73e23995.js";import"./p-729708a3.js";import"./p-4e32bf8c.js";
|
|
7
|
-
/*!
|
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
10
|
-
* v1.0.0-beta.97
|
|
11
|
-
*/const x=class{constructor(e){t(this,e),this.calciteDropdownSelect=i(this,"calciteDropdownSelect",6),this.calciteDropdownBeforeClose=i(this,"calciteDropdownBeforeClose",6),this.calciteDropdownClose=i(this,"calciteDropdownClose",6),this.calciteDropdownBeforeOpen=i(this,"calciteDropdownBeforeOpen",6),this.calciteDropdownOpen=i(this,"calciteDropdownOpen",6),this.active=!1,this.open=!1,this.disableCloseOnSelect=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.placement=c,this.scale="m",this.selectedItems=[],this.type="click",this.items=[],this.groups=[],this.mutationObserver=u("mutation",(()=>this.updateItems())),this.resizeObserver=u("resize",(t=>this.resizeObserverCallback(t))),this.openTransitionProp="visibility",this.guid=`calcite-dropdown-${y()}`,this.defaultAssignedElements=[],this.slotChangeHandler=t=>{this.defaultAssignedElements=t.target.assignedElements({flatten:!0}),this.updateItems()},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?l(i,t):null},this.updateTriggers=t=>{this.triggers=t.target.assignedElements({flatten:!0}),this.reposition(!0)},this.updateItems=()=>{this.items=this.groups.map((t=>Array.from(null==t?void 0:t.querySelectorAll("calcite-dropdown-item")))).reduce(((t,i)=>[...t,...i]),[]),this.updateSelectedItems(),this.reposition(!0)},this.updateGroups=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-dropdown-group")));this.groups=i,this.updateItems()},this.resizeObserverCallback=t=>{t.forEach((t=>{const{target:i}=t;i===this.referenceEl?this.setDropdownWidth():i===this.scrollerEl&&this.setMaxScrollerHeight()}))},this.setDropdownWidth=()=>{const{referenceEl:t,scrollerEl:i}=this,e=null==t?void 0:t.clientWidth;e&&i&&(i.style.minWidth=`${e}px`)},this.setMaxScrollerHeight=()=>{const{scrollerEl:t}=this;if(!t)return;this.reposition(!0);const i=this.getMaxScrollerHeight();t.style.maxHeight=i>0?`${i}px`:"",this.reposition(!0)},this.setScrollerAndTransitionEl=t=>{this.resizeObserver.observe(t),this.scrollerEl=t,this.transitionEl=t,v(this)},this.setReferenceEl=t=>{this.referenceEl=t,h(this,this.referenceEl,this.floatingEl),this.resizeObserver.observe(t)},this.setFloatingEl=t=>{this.floatingEl=t,h(this,this.referenceEl,this.floatingEl)},this.keyDownHandler=t=>{if(t.target!==this.referenceEl)return;const{defaultPrevented:i,key:e}=t;if(!i){if(this.open){if("Escape"===e)return this.closeCalciteDropdown(),void t.preventDefault();if(t.shiftKey&&"Tab"===e)return this.closeCalciteDropdown(),void t.preventDefault()}g(e)?(this.openCalciteDropdown(),t.preventDefault()):"Escape"===e&&(this.closeCalciteDropdown(),t.preventDefault())}},this.focusOnFirstActiveOrFirstItem=()=>{this.getFocusableElement(this.items.find((t=>t.selected))||this.items[0])},this.toggleOpenEnd=()=>{this.focusOnFirstActiveOrFirstItem(),this.el.removeEventListener("calciteDropdownOpen",this.toggleOpenEnd)},this.openCalciteDropdown=()=>{this.open=!this.open,this.open&&this.el.addEventListener("calciteDropdownOpen",this.toggleOpenEnd)}}activeHandler(t){this.open=t}openHandler(t){if(!this.disabled)return t?this.reposition(!0):d(this.floatingEl),void(this.active=t);t||d(this.floatingEl),this.open=!1}handleDisabledChange(t){t||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}connectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.reposition(!0),this.open&&this.openHandler(this.open),this.active&&this.activeHandler(this.active),v(this)}componentDidLoad(){this.reposition(!0)}componentDidRender(){w(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),p(this,this.referenceEl,this.floatingEl),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),b(this)}render(){const{open:t,guid:i}=this;return e(a,null,e("div",{class:"calcite-dropdown-trigger-container",id:`${i}-menubutton`,onClick:this.openCalciteDropdown,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},e("slot",{"aria-controls":`${i}-menu`,"aria-expanded":n(t),"aria-haspopup":"menu",name:"dropdown-trigger",onSlotchange:this.updateTriggers})),e("div",{"aria-hidden":n(!t),class:"calcite-dropdown-wrapper",ref:this.setFloatingEl},e("div",{"aria-labelledby":`${i}-menubutton`,class:{"calcite-dropdown-content":!0,[m.animation]:!0,[m.animationActive]:t},id:`${i}-menu`,ref:this.setScrollerAndTransitionEl,role:"menu"},e("slot",{onSlotchange:this.updateGroups}))))}async reposition(t=!1){const{floatingEl:i,referenceEl:e,placement:a,overlayPositioning:s,filteredFlipPlacements:n}=this;return f(this,{floatingEl:i,referenceEl:e,overlayPositioning:s,placement:a,flipPlacements:n,type:"menu"},t)}closeCalciteDropdownOnClick(t){o(t)&&this.open&&!t.composedPath().includes(this.el)&&this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(t){this.closeCalciteDropdown(),t.stopPropagation()}closeCalciteDropdownOnOpenEvent(t){t.composedPath().includes(this.el)||(this.open=!1)}mouseEnterHandler(){"hover"===this.type&&this.openCalciteDropdown()}mouseLeaveHandler(){"hover"===this.type&&this.closeCalciteDropdown()}calciteInternalDropdownItemKeyEvent(t){const{keyboardEvent:i}=t.detail,e=i.target,a="A"!==e.nodeName?e:e.parentNode,s=0===this.itemIndex(a),n=this.itemIndex(a)===this.items.length-1;switch(i.key){case"Tab":n&&!i.shiftKey||s&&i.shiftKey?this.closeCalciteDropdown():i.shiftKey?this.focusPrevItem(a):this.focusNextItem(a);break;case"ArrowDown":this.focusNextItem(a);break;case"ArrowUp":this.focusPrevItem(a);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}t.stopPropagation()}handleItemSelect(t){this.updateSelectedItems(),t.stopPropagation(),this.calciteDropdownSelect.emit({item:t.detail.requestedDropdownItem}),this.disableCloseOnSelect&&"none"!==t.detail.requestedDropdownGroup.selectionMode||this.closeCalciteDropdown(),t.stopPropagation()}onBeforeOpen(){this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit()}updateSelectedItems(){this.selectedItems=this.items.filter((t=>t.selected))}getMaxScrollerHeight(){const{maxItems:t,items:i}=this;let e,a=0,s=0;return this.groups.forEach((i=>{t>0&&a<t&&Array.from(i.children).forEach(((i,n)=>{0===n&&(isNaN(e)&&(e=i.offsetTop),s+=e),a<t&&(s+=i.offsetHeight,a+=1)}))})),i.length>t?s:0}closeCalciteDropdown(t=!0){this.open=!1,t&&r(this.triggers[0])}focusFirstItem(){this.getFocusableElement(this.items[0])}focusLastItem(){this.getFocusableElement(this.items[this.items.length-1])}focusNextItem(t){const i=this.itemIndex(t);this.getFocusableElement(this.items[i+1]||this.items[0])}focusPrevItem(t){const i=this.itemIndex(t);this.getFocusableElement(this.items[i-1]||this.items[this.items.length-1])}itemIndex(t){return this.items.indexOf(t)}getFocusableElement(t){if(!t)return;const i=t.attributes.isLink?t.shadowRoot.querySelector("a"):t;r(i)}get el(){return s(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],flipPlacements:["flipPlacementsHandler"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"]}}};x.style="@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-flex;flex:0 1 auto}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host .calcite-dropdown-wrapper{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.calcite-dropdown-wrapper .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}.calcite-dropdown-wrapper[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.calcite-dropdown-wrapper[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.calcite-dropdown-wrapper[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.calcite-dropdown-wrapper[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.calcite-dropdown-wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([open]) .calcite-dropdown-wrapper{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}:host .calcite-dropdown-content{max-block-size:45vh;inline-size:auto;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.calcite-dropdown-trigger-container{position:relative;display:flex;flex:1 1 auto}@media (forced-colors: active){:host([open]) .calcite-dropdown-wrapper{border:1px solid canvasText}}:host([width=s]){--calcite-dropdown-width:12rem}:host([width=m]){--calcite-dropdown-width:14rem}:host([width=l]){--calcite-dropdown-width:16rem}";export{x as calcite_dropdown}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{r as a,c as i,h as e,g as r}from"./p-c2f00d41.js";import{a as t}from"./p-83166522.js";import{g as c}from"./p-a80b3880.js";import{c as o,d as n}from"./p-1c247f54.js";import"./p-729708a3.js";import"./p-9a9955db.js";
|
|
7
|
-
/*!
|
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
10
|
-
* v1.0.0-beta.97
|
|
11
|
-
*/const l="image",s=class{constructor(e){a(this,e),this.calciteChipDismiss=i(this,"calciteChipDismiss",6),this.appearance="solid",this.color="grey",this.dismissible=!1,this.closable=!1,this.dismissLabel="Close",this.iconFlipRtl=!1,this.scale="m",this.closed=!1,this.closeClickHandler=a=>{a.preventDefault(),this.calciteChipDismiss.emit(this.el),this.closed=!0},this.guid=c()}handleDismissible(a){this.closable=a}handleClosable(a){this.dismissible=a}connectedCallback(){o(this),this.dismissible&&this.handleDismissible(this.dismissible),this.closable&&this.handleClosable(this.closable)}disconnectedCallback(){n(this)}async setFocus(){var a;null===(a=this.closeButton)||void 0===a||a.focus()}renderChipImage(){const{el:a}=this;return t(a,l)?e("div",{class:"image-container",key:"image"},e("slot",{name:l})):null}render(){const a=e("calcite-icon",{class:"chip-icon",flipRtl:this.iconFlipRtl,icon:this.icon,scale:"s"}),i=e("button",{"aria-describedby":this.guid,"aria-label":this.dismissLabel,class:"close",onClick:this.closeClickHandler,ref:a=>this.closeButton=a},e("calcite-icon",{class:"close-icon",icon:"x",scale:"s"}));return e("div",{class:"container"},this.renderChipImage(),this.icon?a:null,e("span",{class:"title",id:this.guid},e("slot",null)),this.closable?i:null)}get el(){return r(this)}static get watchers(){return{dismissible:["handleDismissible"],closable:["handleClosable"]}}};s.style="@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([scale=s]){block-size:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-unit-l:0.5rem;--calcite-chip-spacing-unit-s:0.25rem}:host([scale=s]) .image-container{block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-unit-l:0.75rem;--calcite-chip-spacing-unit-s:6px}:host([scale=m]) .image-container{block-size:1.5rem;inline-size:1.5rem;-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host([scale=l]){block-size:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-unit-l:1rem;--calcite-chip-spacing-unit-s:0.5rem}:host([scale=l]) .image-container{block-size:2rem;inline-size:2rem;-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host{box-sizing:border-box;display:inline-flex;cursor:default;align-items:center;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container{display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center}.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host span{padding-block:0;padding-inline:var(--calcite-chip-spacing-unit-l)}:host([closable]) span{padding-inline:var(--calcite-chip-spacing-unit-l) var(--calcite-chip-spacing-unit-s)}:host([icon]:not([closable])) span{padding-block:0;padding-inline:var(--calcite-chip-spacing-unit-l)}:host button{margin:0px;display:inline-flex;max-block-size:100%;min-block-size:100%;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-appearance:none;border-start-start-radius:0;border-start-end-radius:50px;border-end-end-radius:50px;border-end-start-radius:0;padding-block:0;padding-inline:var(--calcite-chip-spacing-unit-s);color:inherit;--calcite-chip-transparent-hover:var(--calcite-button-transparent-hover);--calcite-chip-transparent-press:var(--calcite-button-transparent-press)}:host button:hover{background-color:var(--calcite-chip-transparent-hover)}:host button:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host button:active{background-color:var(--calcite-chip-transparent-press)}.image-container{display:inline-flex;overflow:hidden;border-radius:50%}:host slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:var(--calcite-chip-spacing-unit-l);margin-inline-start:var(--calcite-chip-spacing-unit-l);border-start-start-radius:0;border-start-end-radius:50px;border-end-end-radius:50px;border-end-start-radius:0}:host([color=blue]){border-color:transparent;background-color:var(--calcite-ui-info);color:var(--calcite-ui-text-inverse)}:host([color=red]){border-color:transparent;background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=yellow]){border-color:transparent;background-color:var(--calcite-ui-warning);color:#151515}:host([color=green]){border-color:transparent;background-color:var(--calcite-ui-success);color:#151515}:host([color=grey]){border-color:transparent;background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host([color=grey]) button,:host([color=grey]) .close-icon{color:var(--calcite-ui-text-3)}:host([color=grey]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-3))}:host([appearance=clear]),:host([appearance=transparent]){background-color:transparent;color:var(--calcite-ui-text-1)}:host([color=blue][appearance=clear]),:host([color=blue][appearance=transparent]){border-color:var(--calcite-ui-info)}:host([color=blue][appearance=clear]) .chip-icon,:host([color=blue][appearance=transparent]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-info))}:host([color=red][appearance=clear]),:host([color=red][appearance=transparent]){border-color:var(--calcite-ui-danger)}:host([color=red][appearance=clear]) .chip-icon,:host([color=red][appearance=transparent]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-danger))}:host([color=yellow][appearance=clear]),:host([color=yellow][appearance=transparent]){border-color:var(--calcite-ui-warning)}:host([color=yellow][appearance=clear]) .chip-icon,:host([color=yellow][appearance=transparent]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-warning))}:host([color=green][appearance=clear]),:host([color=green][appearance=transparent]){border-color:var(--calcite-ui-success)}:host([color=green][appearance=clear]) .chip-icon,:host([color=green][appearance=transparent]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-success))}:host([color=grey][appearance=clear]),:host([color=grey][appearance=transparent]){border-color:var(--calcite-ui-border-1)}:host([color=grey][appearance=clear]) .chip-icon,:host([color=grey][appearance=transparent]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-3))}:host([closed]){display:none}";export{s as calcite_chip}
|