@esri/solutions-components 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- 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 +85 -85
- 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} +187 -61
- 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 +283 -283
- 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-b85476e8.js → downloadUtils-9359e9ff.js} +1218 -1127
- package/dist/cjs/{index.es-3ba50626.js → index.es-9c0d0ed6.js} +10682 -10682
- 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 +30 -30
- package/dist/cjs/{mapViewUtils-df63bfa4.js → mapViewUtils-090f4d4d.js} +24 -24
- package/dist/cjs/public-notification.cjs.entry.js +69 -49
- 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 +31 -31
- 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 +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +45 -27
- 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/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 +16 -16
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +38 -38
- package/dist/components/public-notification.js +102 -82
- package/dist/components/queryUtils.js +10 -10
- 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 +76 -76
- 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} +181 -56
- 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 +275 -275
- 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-f278742f.js → downloadUtils-a8f139c5.js} +1214 -1123
- package/dist/esm/{index.es-6f3a1143.js → index.es-a75412ff.js} +10596 -10596
- 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 +26 -26
- package/dist/esm/{mapViewUtils-bd1809f0.js → mapViewUtils-8ffcd36d.js} +12 -12
- package/dist/esm/public-notification.entry.js +65 -45
- 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 +26 -26
- 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-cbac29fb.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-03e2c6fd.js → p-765a27f3.js} +60 -60
- 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-40c12650.js → p-bb64bd47.js} +453 -437
- package/dist/solutions-components/{p-70e1d4d8.entry.js → p-c392dd95.entry.js} +17 -17
- 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-88e5a76d.js → p-dc53c9c1.js} +36 -36
- 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/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/public-notification/public-notification.d.ts +18 -6
- package/dist/types/components.d.ts +1621 -1601
- 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-045d3988.entry.js +0 -12
- 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-6f012424.entry.js +0 -6
- package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
- package/dist/solutions-components/p-a57ef371.entry.js +0 -6
- package/dist/solutions-components/p-bc39f296.entry.js +0 -6
- package/dist/solutions-components/p-c93d8e80.entry.js +0 -6
- package/dist/solutions-components/p-dbc9a5a8.js +0 -21
- package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
- package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -8,217 +8,12 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-c6979cbb.js');
|
11
|
-
const ExpandToggle = require('./ExpandToggle-c990e1d5.js');
|
12
|
-
const dom = require('./dom-4a580af6.js');
|
13
|
-
const observers = require('./observers-5311faf8.js');
|
14
|
-
const conditionalSlot = require('./conditionalSlot-baada7a3.js');
|
15
|
-
const debounce = require('./debounce-69c3bada.js');
|
16
11
|
const guid = require('./guid-84ac4d91.js');
|
17
12
|
const floatingUi = require('./floating-ui-7e3d7775.js');
|
18
|
-
require('./
|
19
|
-
require('./
|
13
|
+
const dom = require('./dom-4a580af6.js');
|
14
|
+
require('./debounce-69c3bada.js');
|
20
15
|
require('./resources-b56bce71.js');
|
21
16
|
|
22
|
-
/*!
|
23
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
24
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
25
|
-
* v1.0.0-beta.97
|
26
|
-
*/
|
27
|
-
const CSS$1 = {
|
28
|
-
actionGroupBottom: "action-group--bottom"
|
29
|
-
};
|
30
|
-
const SLOTS = {
|
31
|
-
bottomActions: "bottom-actions",
|
32
|
-
expandTooltip: "expand-tooltip"
|
33
|
-
};
|
34
|
-
const TEXT = {
|
35
|
-
expand: "Expand",
|
36
|
-
collapse: "Collapse"
|
37
|
-
};
|
38
|
-
|
39
|
-
const actionBarCss = "@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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:inline-flex;align-self:stretch;background:transparent;--calcite-action-bar-expanded-max-width:auto}:host([layout=vertical]){flex-direction:column}:host([layout=horizontal]){flex-direction:row}:host([layout=vertical][overflow-actions-disabled]){overflow-y:auto}:host([layout=horizontal][overflow-actions-disabled]){overflow-x:auto}:host([layout=vertical][expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width)}::slotted(calcite-action-group){border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-width:0px;border-inline-end-width:1px;border-style:solid}::slotted(calcite-action-group:last-child){border-block-end-width:0px;border-inline-end-width:0px}.action-group--bottom{flex-grow:1;justify-content:flex-end;-webkit-padding-after:0px;padding-block-end:0px;-webkit-padding-end:0px;padding-inline-end:0px}";
|
40
|
-
|
41
|
-
const ActionBar = class {
|
42
|
-
constructor(hostRef) {
|
43
|
-
index.registerInstance(this, hostRef);
|
44
|
-
this.calciteActionBarToggle = index.createEvent(this, "calciteActionBarToggle", 6);
|
45
|
-
// --------------------------------------------------------------------------
|
46
|
-
//
|
47
|
-
// Properties
|
48
|
-
//
|
49
|
-
// --------------------------------------------------------------------------
|
50
|
-
/**
|
51
|
-
* When `true`, the expand-toggling behavior is disabled.
|
52
|
-
*/
|
53
|
-
this.expandDisabled = false;
|
54
|
-
/**
|
55
|
-
* When `true`, the component is expanded.
|
56
|
-
*/
|
57
|
-
this.expanded = false;
|
58
|
-
/**
|
59
|
-
* The layout direction of the actions.
|
60
|
-
*/
|
61
|
-
this.layout = "vertical";
|
62
|
-
/**
|
63
|
-
* Disables automatically overflowing `calcite-action`s that won't fit into menus.
|
64
|
-
*/
|
65
|
-
this.overflowActionsDisabled = false;
|
66
|
-
this.mutationObserver = observers.createObserver("mutation", () => {
|
67
|
-
const { el, expanded } = this;
|
68
|
-
ExpandToggle.toggleChildActionText({ parent: el, expanded });
|
69
|
-
this.conditionallyOverflowActions();
|
70
|
-
});
|
71
|
-
this.resizeObserver = observers.createObserver("resize", (entries) => this.resizeHandlerEntries(entries));
|
72
|
-
// --------------------------------------------------------------------------
|
73
|
-
//
|
74
|
-
// Private Methods
|
75
|
-
//
|
76
|
-
// --------------------------------------------------------------------------
|
77
|
-
this.actionMenuOpenChangeHandler = (event) => {
|
78
|
-
if (event.detail) {
|
79
|
-
const composedPath = event.composedPath();
|
80
|
-
Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((group) => {
|
81
|
-
if (!composedPath.includes(group)) {
|
82
|
-
group.menuOpen = false;
|
83
|
-
}
|
84
|
-
});
|
85
|
-
}
|
86
|
-
};
|
87
|
-
this.resizeHandlerEntries = (entries) => {
|
88
|
-
entries.forEach(this.resizeHandler);
|
89
|
-
};
|
90
|
-
this.resizeHandler = (entry) => {
|
91
|
-
const { width, height } = entry.contentRect;
|
92
|
-
this.resize({ width, height });
|
93
|
-
};
|
94
|
-
this.resize = debounce.debounce(({ width, height }) => {
|
95
|
-
const { el, expanded, expandDisabled, layout } = this;
|
96
|
-
if ((layout === "vertical" && !height) || (layout === "horizontal" && !width)) {
|
97
|
-
return;
|
98
|
-
}
|
99
|
-
const actions = ExpandToggle.queryActions(el);
|
100
|
-
const actionCount = expandDisabled ? actions.length : actions.length + 1;
|
101
|
-
const actionGroups = Array.from(el.querySelectorAll("calcite-action-group"));
|
102
|
-
const groupCount = dom.getSlotted(el, SLOTS.bottomActions) || !expandDisabled
|
103
|
-
? actionGroups.length + 1
|
104
|
-
: actionGroups.length;
|
105
|
-
const { actionHeight, actionWidth } = ExpandToggle.geActionDimensions(actions);
|
106
|
-
const overflowCount = ExpandToggle.getOverflowCount({
|
107
|
-
layout,
|
108
|
-
actionCount,
|
109
|
-
actionHeight,
|
110
|
-
actionWidth,
|
111
|
-
height,
|
112
|
-
width,
|
113
|
-
groupCount
|
114
|
-
});
|
115
|
-
ExpandToggle.overflowActions({
|
116
|
-
actionGroups,
|
117
|
-
expanded,
|
118
|
-
overflowCount
|
119
|
-
});
|
120
|
-
}, ExpandToggle.overflowActionsDebounceInMs);
|
121
|
-
this.conditionallyOverflowActions = () => {
|
122
|
-
if (!this.overflowActionsDisabled) {
|
123
|
-
this.overflowActions();
|
124
|
-
}
|
125
|
-
};
|
126
|
-
this.toggleExpand = () => {
|
127
|
-
this.expanded = !this.expanded;
|
128
|
-
this.calciteActionBarToggle.emit();
|
129
|
-
};
|
130
|
-
this.setExpandToggleRef = (el) => {
|
131
|
-
this.expandToggleEl = el;
|
132
|
-
};
|
133
|
-
}
|
134
|
-
expandHandler() {
|
135
|
-
this.conditionallyOverflowActions();
|
136
|
-
}
|
137
|
-
expandedHandler(expanded) {
|
138
|
-
ExpandToggle.toggleChildActionText({ parent: this.el, expanded });
|
139
|
-
this.conditionallyOverflowActions();
|
140
|
-
}
|
141
|
-
overflowDisabledHandler(overflowActionsDisabled) {
|
142
|
-
overflowActionsDisabled
|
143
|
-
? this.resizeObserver.disconnect()
|
144
|
-
: this.resizeObserver.observe(this.el);
|
145
|
-
}
|
146
|
-
// --------------------------------------------------------------------------
|
147
|
-
//
|
148
|
-
// Lifecycle
|
149
|
-
//
|
150
|
-
// --------------------------------------------------------------------------
|
151
|
-
componentDidLoad() {
|
152
|
-
this.conditionallyOverflowActions();
|
153
|
-
}
|
154
|
-
connectedCallback() {
|
155
|
-
var _a, _b;
|
156
|
-
const { el, expanded } = this;
|
157
|
-
ExpandToggle.toggleChildActionText({ parent: el, expanded });
|
158
|
-
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(el, { childList: true, subtree: true });
|
159
|
-
if (!this.overflowActionsDisabled) {
|
160
|
-
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
|
161
|
-
}
|
162
|
-
this.conditionallyOverflowActions();
|
163
|
-
conditionalSlot.connectConditionalSlotComponent(this);
|
164
|
-
}
|
165
|
-
disconnectedCallback() {
|
166
|
-
var _a, _b;
|
167
|
-
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
168
|
-
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
169
|
-
conditionalSlot.disconnectConditionalSlotComponent(this);
|
170
|
-
}
|
171
|
-
// --------------------------------------------------------------------------
|
172
|
-
//
|
173
|
-
// Methods
|
174
|
-
//
|
175
|
-
// --------------------------------------------------------------------------
|
176
|
-
/**
|
177
|
-
* Overflows actions that won't fit into menus.
|
178
|
-
*
|
179
|
-
* @internal
|
180
|
-
*/
|
181
|
-
async overflowActions() {
|
182
|
-
this.resize({ width: this.el.clientWidth, height: this.el.clientHeight });
|
183
|
-
}
|
184
|
-
/**
|
185
|
-
* Sets focus on the component.
|
186
|
-
*
|
187
|
-
* @param focusId
|
188
|
-
*/
|
189
|
-
async setFocus(focusId) {
|
190
|
-
var _a;
|
191
|
-
if (focusId === "expand-toggle") {
|
192
|
-
await dom.focusElement(this.expandToggleEl);
|
193
|
-
return;
|
194
|
-
}
|
195
|
-
(_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
|
196
|
-
}
|
197
|
-
// --------------------------------------------------------------------------
|
198
|
-
//
|
199
|
-
// Render Methods
|
200
|
-
//
|
201
|
-
// --------------------------------------------------------------------------
|
202
|
-
renderBottomActionGroup() {
|
203
|
-
const { expanded, expandDisabled, intlExpand, intlCollapse, el, position, toggleExpand, scale, layout } = this;
|
204
|
-
const tooltip = dom.getSlotted(el, SLOTS.expandTooltip);
|
205
|
-
const expandLabel = intlExpand || TEXT.expand;
|
206
|
-
const collapseLabel = intlCollapse || TEXT.collapse;
|
207
|
-
const expandToggleNode = !expandDisabled ? (index.h(ExpandToggle.ExpandToggle, { el: el, expanded: expanded, intlCollapse: collapseLabel, intlExpand: expandLabel, position: position, ref: this.setExpandToggleRef, scale: scale, toggle: toggleExpand, tooltip: tooltip })) : null;
|
208
|
-
return dom.getSlotted(el, SLOTS.bottomActions) || expandToggleNode ? (index.h("calcite-action-group", { class: CSS$1.actionGroupBottom, layout: layout, scale: scale }, index.h("slot", { name: SLOTS.bottomActions }), index.h("slot", { name: SLOTS.expandTooltip }), expandToggleNode)) : null;
|
209
|
-
}
|
210
|
-
render() {
|
211
|
-
return (index.h(index.Host, { onCalciteActionMenuOpenChange: this.actionMenuOpenChangeHandler }, index.h("slot", null), this.renderBottomActionGroup()));
|
212
|
-
}
|
213
|
-
get el() { return index.getElement(this); }
|
214
|
-
static get watchers() { return {
|
215
|
-
"expandDisabled": ["expandHandler"],
|
216
|
-
"expanded": ["expandedHandler"],
|
217
|
-
"overflowActionsDisabled": ["overflowDisabledHandler"]
|
218
|
-
}; }
|
219
|
-
};
|
220
|
-
ActionBar.style = actionBarCss;
|
221
|
-
|
222
17
|
/*!
|
223
18
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
224
19
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
@@ -580,5 +375,4 @@ const Tooltip = class {
|
|
580
375
|
};
|
581
376
|
Tooltip.style = tooltipCss;
|
582
377
|
|
583
|
-
exports.calcite_action_bar = ActionBar;
|
584
378
|
exports.calcite_tooltip = Tooltip;
|
@@ -8,25 +8,23 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-c6979cbb.js');
|
11
|
+
const locale = require('./locale-04da9a8c.js');
|
12
|
+
const interfaces = require('./interfaces-cac36920.js');
|
13
|
+
require('./_commonjsHelpers-384729db.js');
|
11
14
|
|
12
|
-
const crowdsourceManagerCss = ":host{display:block}";
|
15
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.pad-top-51{padding-top:51px}.header-title{display:flex;float:left}.header-controls-label{display:flex;float:right}.header-controls{height:50px}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.vertical-background{background-image:url('../../assets/data/images/horizontal.png')}.horizontal-background{background-image:url('../../assets/data/images/vertical.png')}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.background-transparent{background-color:transparent}.display-flex{display:flex}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:48px;height:48px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.position-relative{position:relative}";
|
13
16
|
|
14
17
|
const CrowdsourceManager = class {
|
15
18
|
constructor(hostRef) {
|
16
19
|
index.registerInstance(this, hostRef);
|
20
|
+
this.mapInfos = [];
|
21
|
+
this._translations = undefined;
|
22
|
+
this._layoutMode = interfaces.ELayoutMode.GRID;
|
23
|
+
this._mapView = undefined;
|
24
|
+
this._panelOpen = true;
|
17
25
|
}
|
18
26
|
//--------------------------------------------------------------------------
|
19
27
|
//
|
20
|
-
// Properties (public)
|
21
|
-
//
|
22
|
-
//--------------------------------------------------------------------------
|
23
|
-
//--------------------------------------------------------------------------
|
24
|
-
//
|
25
|
-
// State (internal)
|
26
|
-
//
|
27
|
-
//--------------------------------------------------------------------------
|
28
|
-
//--------------------------------------------------------------------------
|
29
|
-
//
|
30
28
|
// Properties (protected)
|
31
29
|
//
|
32
30
|
//--------------------------------------------------------------------------
|
@@ -45,19 +43,95 @@ const CrowdsourceManager = class {
|
|
45
43
|
// Events (public)
|
46
44
|
//
|
47
45
|
//--------------------------------------------------------------------------
|
46
|
+
/**
|
47
|
+
* Handle changes to the buffer distance value
|
48
|
+
*/
|
49
|
+
mapChanged(event) {
|
50
|
+
this._mapView = event.detail;
|
51
|
+
}
|
48
52
|
//--------------------------------------------------------------------------
|
49
53
|
//
|
50
54
|
// Functions (lifecycle)
|
51
55
|
//
|
52
56
|
//--------------------------------------------------------------------------
|
57
|
+
async componentWillLoad() {
|
58
|
+
await this._getTranslations();
|
59
|
+
}
|
53
60
|
render() {
|
54
|
-
return (index.h(index.Host, null, index.h("slot",
|
61
|
+
return (index.h(index.Host, null, index.h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, index.h("div", { class: "display-flex", slot: "header-actions-end" }, index.h("div", { class: "header-text" }, "Layout"), this._getAction("grid-background", interfaces.ELayoutMode.GRID, this._translations.grid), this._getAction("horizontal-background", interfaces.ELayoutMode.VERTICAL, this._translations.horizontal), this._getAction("vertical-background", interfaces.ELayoutMode.HORIZONTAL, this._translations.vertical)), this._getBody(this._layoutMode, this._panelOpen))));
|
55
62
|
}
|
56
63
|
//--------------------------------------------------------------------------
|
57
64
|
//
|
58
65
|
// Functions (protected)
|
59
66
|
//
|
60
67
|
//--------------------------------------------------------------------------
|
68
|
+
_getAction(imgClass, layoutMode, tip) {
|
69
|
+
return (index.h("div", null, index.h("calcite-action", { alignment: "center", appearance: "transparent", compact: false, id: imgClass, indicator: layoutMode === this._layoutMode, onClick: () => { this._setLayoutMode(layoutMode); }, text: "" }, index.h("div", { class: imgClass + " img-background" })), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": imgClass }, index.h("span", null, tip))));
|
70
|
+
}
|
71
|
+
_getDividerIcon(layoutMode, panelOpen) {
|
72
|
+
let icon = "";
|
73
|
+
switch (layoutMode) {
|
74
|
+
case interfaces.ELayoutMode.HORIZONTAL:
|
75
|
+
icon = panelOpen ? "chevrons-up" : "chevrons-down";
|
76
|
+
break;
|
77
|
+
default:
|
78
|
+
icon = panelOpen ? "chevrons-left" : "chevrons-right";
|
79
|
+
break;
|
80
|
+
}
|
81
|
+
return icon;
|
82
|
+
}
|
83
|
+
_getMapSizeClass(layoutMode, panelOpen) {
|
84
|
+
let sizeClass = "";
|
85
|
+
switch (layoutMode) {
|
86
|
+
case interfaces.ELayoutMode.HORIZONTAL:
|
87
|
+
sizeClass = `${panelOpen ? "height-1-2" : "height-0"} width-full position-relative`;
|
88
|
+
break;
|
89
|
+
case interfaces.ELayoutMode.GRID:
|
90
|
+
sizeClass = `height-full position-relative ${panelOpen ? "width-1-3" : "width-0"}`;
|
91
|
+
break;
|
92
|
+
case interfaces.ELayoutMode.VERTICAL:
|
93
|
+
sizeClass = `height-full position-relative ${panelOpen ? "width-1-2" : "width-0"}`;
|
94
|
+
break;
|
95
|
+
}
|
96
|
+
return sizeClass;
|
97
|
+
}
|
98
|
+
_getTableSizeClass(layoutMode, panelOpen) {
|
99
|
+
let sizeClass = "";
|
100
|
+
switch (layoutMode) {
|
101
|
+
case interfaces.ELayoutMode.HORIZONTAL:
|
102
|
+
sizeClass = `${panelOpen ? "height-1-2" : "height-full"} width-full display-flex flex-column`;
|
103
|
+
break;
|
104
|
+
case interfaces.ELayoutMode.GRID:
|
105
|
+
sizeClass = `${panelOpen ? "width-2-3" : "width-full"} height-full display-flex`;
|
106
|
+
break;
|
107
|
+
case interfaces.ELayoutMode.VERTICAL:
|
108
|
+
sizeClass = `${panelOpen ? "width-1-2" : "width-full"} height-full display-flex`;
|
109
|
+
break;
|
110
|
+
}
|
111
|
+
return sizeClass;
|
112
|
+
}
|
113
|
+
_getBody(layoutMode, panelOpen) {
|
114
|
+
const displayFlex = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "" : "display-flex";
|
115
|
+
return (index.h("calcite-shell", { class: "width-full height-full pad-top-51" }, index.h("div", { class: `width-full height-full ${displayFlex}` }, this._getMap(layoutMode, panelOpen), this._getTable(layoutMode, panelOpen))));
|
116
|
+
}
|
117
|
+
_getMap(layoutMode, panelOpen) {
|
118
|
+
const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
|
119
|
+
return (index.h("div", { class: `${mapSizeClass} overflow-hidden` }, index.h("div", { style: { "overflow": "hidden" } }, index.h("map-card", { mapInfos: this.mapInfos }))));
|
120
|
+
}
|
121
|
+
_getTable(layoutMode, panelOpen) {
|
122
|
+
const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
|
123
|
+
const icon = this._getDividerIcon(layoutMode, panelOpen);
|
124
|
+
const tooltip = panelOpen ? this._translations.close : this._translations.open;
|
125
|
+
const id = "toggle-layout";
|
126
|
+
const toggleSizeClass = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "divider-h" : "divider-w";
|
127
|
+
return (index.h("div", { class: tableSizeClass }, index.h("div", { class: `border ${toggleSizeClass}` }, index.h("div", { class: "toggle-node" }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onclick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))), index.h("div", { class: "width-full height-full" }, index.h("layer-table", { mapView: this === null || this === void 0 ? void 0 : this._mapView }))));
|
128
|
+
}
|
129
|
+
_setLayoutMode(layoutMode) {
|
130
|
+
this._layoutMode = layoutMode;
|
131
|
+
}
|
132
|
+
_toggleLayout() {
|
133
|
+
this._panelOpen = !this._panelOpen;
|
134
|
+
}
|
61
135
|
/**
|
62
136
|
* Fetches the component's translations
|
63
137
|
*
|
@@ -65,8 +139,8 @@ const CrowdsourceManager = class {
|
|
65
139
|
* @protected
|
66
140
|
*/
|
67
141
|
async _getTranslations() {
|
68
|
-
|
69
|
-
|
142
|
+
const messages = await locale.getLocaleComponentStrings(this.el);
|
143
|
+
this._translations = messages[0];
|
70
144
|
}
|
71
145
|
get el() { return index.getElement(this); }
|
72
146
|
};
|