@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.
Files changed (156) hide show
  1. package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  2. package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  3. package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  4. package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  5. package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
  6. package/dist/assets/data/images/grid.png +0 -0
  7. package/dist/assets/data/images/horizontal.png +0 -0
  8. package/dist/assets/data/images/vertical.png +0 -0
  9. package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
  10. package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
  11. package/dist/cjs/buffer-tools_6.cjs.entry.js +85 -85
  12. package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
  13. package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
  14. package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +187 -61
  15. package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
  16. package/dist/cjs/calcite-input-message_5.cjs.entry.js +283 -283
  17. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  18. package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
  19. package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
  20. package/dist/cjs/{downloadUtils-b85476e8.js → downloadUtils-9359e9ff.js} +1218 -1127
  21. package/dist/cjs/{index.es-3ba50626.js → index.es-9c0d0ed6.js} +10682 -10682
  22. package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
  23. package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
  24. package/dist/cjs/loader.cjs.js +30 -30
  25. package/dist/cjs/{mapViewUtils-df63bfa4.js → mapViewUtils-090f4d4d.js} +24 -24
  26. package/dist/cjs/public-notification.cjs.entry.js +69 -49
  27. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  28. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  29. package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +31 -31
  31. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  32. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  33. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  34. package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  35. package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
  37. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
  38. package/dist/collection/components/layer-table/layer-table.css +2 -70
  39. package/dist/collection/components/layer-table/layer-table.js +66 -106
  40. package/dist/collection/components/map-card/map-card.css +4 -7
  41. package/dist/collection/components/map-card/map-card.js +44 -10
  42. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  43. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  44. package/dist/collection/components/public-notification/public-notification.js +45 -27
  45. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
  46. package/dist/collection/demos/crowdsource-manager.html +14 -41
  47. package/dist/collection/utils/csvDownload.js +41 -0
  48. package/dist/collection/utils/csvDownload.ts +42 -0
  49. package/dist/collection/utils/csvUtils.js +6 -23
  50. package/dist/collection/utils/csvUtils.ts +8 -27
  51. package/dist/collection/utils/downloadUtils.js +30 -14
  52. package/dist/collection/utils/downloadUtils.ts +36 -14
  53. package/dist/collection/utils/interfaces.js +6 -0
  54. package/dist/collection/utils/interfaces.ts +6 -0
  55. package/dist/collection/utils/pdfUtils.js +9 -6
  56. package/dist/collection/utils/pdfUtils.ts +13 -8
  57. package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
  58. package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
  59. package/dist/components/crowdsource-manager.js +293 -17
  60. package/dist/components/downloadUtils.js +133 -42
  61. package/dist/components/interfaces3.js +7 -1
  62. package/dist/components/layer-table.js +1 -443
  63. package/dist/components/layer-table2.js +429 -0
  64. package/dist/components/map-card.js +1 -339
  65. package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
  66. package/dist/components/map-draw-tools2.js +16 -16
  67. package/dist/components/map-layer-picker2.js +1 -1
  68. package/dist/components/map-select-tools2.js +38 -38
  69. package/dist/components/public-notification.js +102 -82
  70. package/dist/components/queryUtils.js +10 -10
  71. package/dist/components/refine-selection-tools2.js +3 -3
  72. package/dist/components/refine-selection2.js +1 -1
  73. package/dist/components/solution-resource-item2.js +1 -1
  74. package/dist/components/solution-store.js +1 -1
  75. package/dist/esm/buffer-tools_6.entry.js +76 -76
  76. package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
  77. package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
  78. package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +181 -56
  79. package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
  80. package/dist/esm/calcite-input-message_5.entry.js +275 -275
  81. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  82. package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
  83. package/dist/esm/crowdsource-manager.entry.js +88 -14
  84. package/dist/esm/{downloadUtils-f278742f.js → downloadUtils-a8f139c5.js} +1214 -1123
  85. package/dist/esm/{index.es-6f3a1143.js → index.es-a75412ff.js} +10596 -10596
  86. package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
  87. package/dist/esm/layer-table_2.entry.js +507 -0
  88. package/dist/esm/loader.js +26 -26
  89. package/dist/esm/{mapViewUtils-bd1809f0.js → mapViewUtils-8ffcd36d.js} +12 -12
  90. package/dist/esm/public-notification.entry.js +65 -45
  91. package/dist/esm/solution-configuration.entry.js +2 -2
  92. package/dist/esm/solution-contents_3.entry.js +2 -2
  93. package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
  94. package/dist/esm/solutions-components.js +26 -26
  95. package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
  96. package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
  97. package/dist/solutions-components/{p-cbac29fb.entry.js → p-1affd711.entry.js} +18 -18
  98. package/dist/solutions-components/p-30de8da1.entry.js +17 -0
  99. package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
  100. package/dist/solutions-components/{p-03e2c6fd.js → p-765a27f3.js} +60 -60
  101. package/dist/solutions-components/p-813a04c3.entry.js +6 -0
  102. package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
  103. package/dist/solutions-components/p-8cece97f.js +21 -0
  104. package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
  105. package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
  106. package/dist/solutions-components/{p-40c12650.js → p-bb64bd47.js} +453 -437
  107. package/dist/solutions-components/{p-70e1d4d8.entry.js → p-c392dd95.entry.js} +17 -17
  108. package/dist/solutions-components/p-ca386a72.entry.js +6 -0
  109. package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
  110. package/dist/solutions-components/p-db846ee2.entry.js +11 -0
  111. package/dist/solutions-components/{p-88e5a76d.js → p-dc53c9c1.js} +36 -36
  112. package/dist/solutions-components/p-e1c93241.entry.js +6 -0
  113. package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
  114. package/dist/solutions-components/solutions-components.esm.js +6 -6
  115. package/dist/solutions-components/utils/csvDownload.ts +42 -0
  116. package/dist/solutions-components/utils/csvUtils.ts +8 -27
  117. package/dist/solutions-components/utils/downloadUtils.ts +36 -14
  118. package/dist/solutions-components/utils/interfaces.ts +6 -0
  119. package/dist/solutions-components/utils/pdfUtils.ts +13 -8
  120. package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
  121. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
  122. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
  123. package/dist/types/components/layer-table/layer-table.d.ts +35 -48
  124. package/dist/types/components/map-card/map-card.d.ts +10 -6
  125. package/dist/types/components/public-notification/public-notification.d.ts +18 -6
  126. package/dist/types/components.d.ts +1621 -1601
  127. package/dist/types/preact.d.ts +2 -1
  128. package/dist/types/utils/csvDownload.d.ts +24 -0
  129. package/dist/types/utils/csvUtils.d.ts +2 -1
  130. package/dist/types/utils/downloadUtils.d.ts +25 -0
  131. package/dist/types/utils/interfaces.d.ts +5 -0
  132. package/dist/types/utils/pdfUtils.d.ts +2 -1
  133. package/package.json +4 -4
  134. package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
  135. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
  136. package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
  137. package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
  138. package/dist/cjs/layer-table.cjs.entry.js +0 -317
  139. package/dist/cjs/map-card.cjs.entry.js +0 -252
  140. package/dist/esm/calcite-chip.entry.js +0 -138
  141. package/dist/esm/calcite-dropdown.entry.js +0 -477
  142. package/dist/esm/calcite-handle.entry.js +0 -95
  143. package/dist/esm/calcite-loader.entry.js +0 -91
  144. package/dist/esm/layer-table.entry.js +0 -313
  145. package/dist/solutions-components/p-045d3988.entry.js +0 -12
  146. package/dist/solutions-components/p-11132485.entry.js +0 -11
  147. package/dist/solutions-components/p-15b43c29.entry.js +0 -11
  148. package/dist/solutions-components/p-5034aabc.entry.js +0 -11
  149. package/dist/solutions-components/p-6f012424.entry.js +0 -6
  150. package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
  151. package/dist/solutions-components/p-a57ef371.entry.js +0 -6
  152. package/dist/solutions-components/p-bc39f296.entry.js +0 -6
  153. package/dist/solutions-components/p-c93d8e80.entry.js +0 -6
  154. package/dist/solutions-components/p-dbc9a5a8.js +0 -21
  155. package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
  156. package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -3,218 +3,13 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
7
- import { t as toggleChildActionText, o as overflowActionsDebounceInMs, q as queryActions, g as geActionDimensions, a as overflowActions, E as ExpandToggle, b as getOverflowCount } from './ExpandToggle-5f4b222f.js';
8
- import { f as focusElement, a as getSlotted, i as isPrimaryPointerButton, q as queryElementRoots, t as toAriaBoolean } from './dom-3bdc69ee.js';
9
- import { c as createObserver } from './observers-31601001.js';
10
- import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
11
- import { d as debounce } from './debounce-4c884e5c.js';
6
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
12
7
  import { g as guid } from './guid-15fce7c0.js';
13
8
  import { b as defaultOffsetDistance, c as connectFloatingUI, u as updateAfterClose, a as disconnectFloatingUI, r as reposition, F as FloatingCSS } from './floating-ui-63460291.js';
14
- import './resources-d60362c3.js';
15
- import './resources-3d641588.js';
9
+ import { i as isPrimaryPointerButton, q as queryElementRoots, t as toAriaBoolean } from './dom-3bdc69ee.js';
10
+ import './debounce-4c884e5c.js';
16
11
  import './resources-436ae282.js';
17
12
 
18
- /*!
19
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
20
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
21
- * v1.0.0-beta.97
22
- */
23
- const CSS$1 = {
24
- actionGroupBottom: "action-group--bottom"
25
- };
26
- const SLOTS = {
27
- bottomActions: "bottom-actions",
28
- expandTooltip: "expand-tooltip"
29
- };
30
- const TEXT = {
31
- expand: "Expand",
32
- collapse: "Collapse"
33
- };
34
-
35
- 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}";
36
-
37
- const ActionBar = class {
38
- constructor(hostRef) {
39
- registerInstance(this, hostRef);
40
- this.calciteActionBarToggle = createEvent(this, "calciteActionBarToggle", 6);
41
- // --------------------------------------------------------------------------
42
- //
43
- // Properties
44
- //
45
- // --------------------------------------------------------------------------
46
- /**
47
- * When `true`, the expand-toggling behavior is disabled.
48
- */
49
- this.expandDisabled = false;
50
- /**
51
- * When `true`, the component is expanded.
52
- */
53
- this.expanded = false;
54
- /**
55
- * The layout direction of the actions.
56
- */
57
- this.layout = "vertical";
58
- /**
59
- * Disables automatically overflowing `calcite-action`s that won't fit into menus.
60
- */
61
- this.overflowActionsDisabled = false;
62
- this.mutationObserver = createObserver("mutation", () => {
63
- const { el, expanded } = this;
64
- toggleChildActionText({ parent: el, expanded });
65
- this.conditionallyOverflowActions();
66
- });
67
- this.resizeObserver = createObserver("resize", (entries) => this.resizeHandlerEntries(entries));
68
- // --------------------------------------------------------------------------
69
- //
70
- // Private Methods
71
- //
72
- // --------------------------------------------------------------------------
73
- this.actionMenuOpenChangeHandler = (event) => {
74
- if (event.detail) {
75
- const composedPath = event.composedPath();
76
- Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((group) => {
77
- if (!composedPath.includes(group)) {
78
- group.menuOpen = false;
79
- }
80
- });
81
- }
82
- };
83
- this.resizeHandlerEntries = (entries) => {
84
- entries.forEach(this.resizeHandler);
85
- };
86
- this.resizeHandler = (entry) => {
87
- const { width, height } = entry.contentRect;
88
- this.resize({ width, height });
89
- };
90
- this.resize = debounce(({ width, height }) => {
91
- const { el, expanded, expandDisabled, layout } = this;
92
- if ((layout === "vertical" && !height) || (layout === "horizontal" && !width)) {
93
- return;
94
- }
95
- const actions = queryActions(el);
96
- const actionCount = expandDisabled ? actions.length : actions.length + 1;
97
- const actionGroups = Array.from(el.querySelectorAll("calcite-action-group"));
98
- const groupCount = getSlotted(el, SLOTS.bottomActions) || !expandDisabled
99
- ? actionGroups.length + 1
100
- : actionGroups.length;
101
- const { actionHeight, actionWidth } = geActionDimensions(actions);
102
- const overflowCount = getOverflowCount({
103
- layout,
104
- actionCount,
105
- actionHeight,
106
- actionWidth,
107
- height,
108
- width,
109
- groupCount
110
- });
111
- overflowActions({
112
- actionGroups,
113
- expanded,
114
- overflowCount
115
- });
116
- }, overflowActionsDebounceInMs);
117
- this.conditionallyOverflowActions = () => {
118
- if (!this.overflowActionsDisabled) {
119
- this.overflowActions();
120
- }
121
- };
122
- this.toggleExpand = () => {
123
- this.expanded = !this.expanded;
124
- this.calciteActionBarToggle.emit();
125
- };
126
- this.setExpandToggleRef = (el) => {
127
- this.expandToggleEl = el;
128
- };
129
- }
130
- expandHandler() {
131
- this.conditionallyOverflowActions();
132
- }
133
- expandedHandler(expanded) {
134
- toggleChildActionText({ parent: this.el, expanded });
135
- this.conditionallyOverflowActions();
136
- }
137
- overflowDisabledHandler(overflowActionsDisabled) {
138
- overflowActionsDisabled
139
- ? this.resizeObserver.disconnect()
140
- : this.resizeObserver.observe(this.el);
141
- }
142
- // --------------------------------------------------------------------------
143
- //
144
- // Lifecycle
145
- //
146
- // --------------------------------------------------------------------------
147
- componentDidLoad() {
148
- this.conditionallyOverflowActions();
149
- }
150
- connectedCallback() {
151
- var _a, _b;
152
- const { el, expanded } = this;
153
- toggleChildActionText({ parent: el, expanded });
154
- (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(el, { childList: true, subtree: true });
155
- if (!this.overflowActionsDisabled) {
156
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
157
- }
158
- this.conditionallyOverflowActions();
159
- connectConditionalSlotComponent(this);
160
- }
161
- disconnectedCallback() {
162
- var _a, _b;
163
- (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
164
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
165
- disconnectConditionalSlotComponent(this);
166
- }
167
- // --------------------------------------------------------------------------
168
- //
169
- // Methods
170
- //
171
- // --------------------------------------------------------------------------
172
- /**
173
- * Overflows actions that won't fit into menus.
174
- *
175
- * @internal
176
- */
177
- async overflowActions() {
178
- this.resize({ width: this.el.clientWidth, height: this.el.clientHeight });
179
- }
180
- /**
181
- * Sets focus on the component.
182
- *
183
- * @param focusId
184
- */
185
- async setFocus(focusId) {
186
- var _a;
187
- if (focusId === "expand-toggle") {
188
- await focusElement(this.expandToggleEl);
189
- return;
190
- }
191
- (_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
192
- }
193
- // --------------------------------------------------------------------------
194
- //
195
- // Render Methods
196
- //
197
- // --------------------------------------------------------------------------
198
- renderBottomActionGroup() {
199
- const { expanded, expandDisabled, intlExpand, intlCollapse, el, position, toggleExpand, scale, layout } = this;
200
- const tooltip = getSlotted(el, SLOTS.expandTooltip);
201
- const expandLabel = intlExpand || TEXT.expand;
202
- const collapseLabel = intlCollapse || TEXT.collapse;
203
- const expandToggleNode = !expandDisabled ? (h(ExpandToggle, { el: el, expanded: expanded, intlCollapse: collapseLabel, intlExpand: expandLabel, position: position, ref: this.setExpandToggleRef, scale: scale, toggle: toggleExpand, tooltip: tooltip })) : null;
204
- return getSlotted(el, SLOTS.bottomActions) || expandToggleNode ? (h("calcite-action-group", { class: CSS$1.actionGroupBottom, layout: layout, scale: scale }, h("slot", { name: SLOTS.bottomActions }), h("slot", { name: SLOTS.expandTooltip }), expandToggleNode)) : null;
205
- }
206
- render() {
207
- return (h(Host, { onCalciteActionMenuOpenChange: this.actionMenuOpenChangeHandler }, h("slot", null), this.renderBottomActionGroup()));
208
- }
209
- get el() { return getElement(this); }
210
- static get watchers() { return {
211
- "expandDisabled": ["expandHandler"],
212
- "expanded": ["expandedHandler"],
213
- "overflowActionsDisabled": ["overflowDisabledHandler"]
214
- }; }
215
- };
216
- ActionBar.style = actionBarCss;
217
-
218
13
  /*!
219
14
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
220
15
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
@@ -576,4 +371,4 @@ const Tooltip = class {
576
371
  };
577
372
  Tooltip.style = tooltipCss;
578
373
 
579
- export { ActionBar as calcite_action_bar, Tooltip as calcite_tooltip };
374
+ export { Tooltip as calcite_tooltip };
@@ -4,25 +4,23 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
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 { E as ELayoutMode } from './interfaces-cd4054e5.js';
9
+ import './_commonjsHelpers-d5f9d613.js';
7
10
 
8
- const crowdsourceManagerCss = ":host{display:block}";
11
+ 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}";
9
12
 
10
13
  const CrowdsourceManager = class {
11
14
  constructor(hostRef) {
12
15
  registerInstance(this, hostRef);
16
+ this.mapInfos = [];
17
+ this._translations = undefined;
18
+ this._layoutMode = ELayoutMode.GRID;
19
+ this._mapView = undefined;
20
+ this._panelOpen = true;
13
21
  }
14
22
  //--------------------------------------------------------------------------
15
23
  //
16
- // Properties (public)
17
- //
18
- //--------------------------------------------------------------------------
19
- //--------------------------------------------------------------------------
20
- //
21
- // State (internal)
22
- //
23
- //--------------------------------------------------------------------------
24
- //--------------------------------------------------------------------------
25
- //
26
24
  // Properties (protected)
27
25
  //
28
26
  //--------------------------------------------------------------------------
@@ -41,19 +39,95 @@ const CrowdsourceManager = class {
41
39
  // Events (public)
42
40
  //
43
41
  //--------------------------------------------------------------------------
42
+ /**
43
+ * Handle changes to the buffer distance value
44
+ */
45
+ mapChanged(event) {
46
+ this._mapView = event.detail;
47
+ }
44
48
  //--------------------------------------------------------------------------
45
49
  //
46
50
  // Functions (lifecycle)
47
51
  //
48
52
  //--------------------------------------------------------------------------
53
+ async componentWillLoad() {
54
+ await this._getTranslations();
55
+ }
49
56
  render() {
50
- return (h(Host, null, h("slot", null)));
57
+ return (h(Host, null, h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, h("div", { class: "display-flex", slot: "header-actions-end" }, h("div", { class: "header-text" }, "Layout"), this._getAction("grid-background", ELayoutMode.GRID, this._translations.grid), this._getAction("horizontal-background", ELayoutMode.VERTICAL, this._translations.horizontal), this._getAction("vertical-background", ELayoutMode.HORIZONTAL, this._translations.vertical)), this._getBody(this._layoutMode, this._panelOpen))));
51
58
  }
52
59
  //--------------------------------------------------------------------------
53
60
  //
54
61
  // Functions (protected)
55
62
  //
56
63
  //--------------------------------------------------------------------------
64
+ _getAction(imgClass, layoutMode, tip) {
65
+ return (h("div", null, h("calcite-action", { alignment: "center", appearance: "transparent", compact: false, id: imgClass, indicator: layoutMode === this._layoutMode, onClick: () => { this._setLayoutMode(layoutMode); }, text: "" }, h("div", { class: imgClass + " img-background" })), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": imgClass }, h("span", null, tip))));
66
+ }
67
+ _getDividerIcon(layoutMode, panelOpen) {
68
+ let icon = "";
69
+ switch (layoutMode) {
70
+ case ELayoutMode.HORIZONTAL:
71
+ icon = panelOpen ? "chevrons-up" : "chevrons-down";
72
+ break;
73
+ default:
74
+ icon = panelOpen ? "chevrons-left" : "chevrons-right";
75
+ break;
76
+ }
77
+ return icon;
78
+ }
79
+ _getMapSizeClass(layoutMode, panelOpen) {
80
+ let sizeClass = "";
81
+ switch (layoutMode) {
82
+ case ELayoutMode.HORIZONTAL:
83
+ sizeClass = `${panelOpen ? "height-1-2" : "height-0"} width-full position-relative`;
84
+ break;
85
+ case ELayoutMode.GRID:
86
+ sizeClass = `height-full position-relative ${panelOpen ? "width-1-3" : "width-0"}`;
87
+ break;
88
+ case ELayoutMode.VERTICAL:
89
+ sizeClass = `height-full position-relative ${panelOpen ? "width-1-2" : "width-0"}`;
90
+ break;
91
+ }
92
+ return sizeClass;
93
+ }
94
+ _getTableSizeClass(layoutMode, panelOpen) {
95
+ let sizeClass = "";
96
+ switch (layoutMode) {
97
+ case ELayoutMode.HORIZONTAL:
98
+ sizeClass = `${panelOpen ? "height-1-2" : "height-full"} width-full display-flex flex-column`;
99
+ break;
100
+ case ELayoutMode.GRID:
101
+ sizeClass = `${panelOpen ? "width-2-3" : "width-full"} height-full display-flex`;
102
+ break;
103
+ case ELayoutMode.VERTICAL:
104
+ sizeClass = `${panelOpen ? "width-1-2" : "width-full"} height-full display-flex`;
105
+ break;
106
+ }
107
+ return sizeClass;
108
+ }
109
+ _getBody(layoutMode, panelOpen) {
110
+ const displayFlex = layoutMode === ELayoutMode.HORIZONTAL ? "" : "display-flex";
111
+ return (h("calcite-shell", { class: "width-full height-full pad-top-51" }, h("div", { class: `width-full height-full ${displayFlex}` }, this._getMap(layoutMode, panelOpen), this._getTable(layoutMode, panelOpen))));
112
+ }
113
+ _getMap(layoutMode, panelOpen) {
114
+ const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
115
+ return (h("div", { class: `${mapSizeClass} overflow-hidden` }, h("div", { style: { "overflow": "hidden" } }, h("map-card", { mapInfos: this.mapInfos }))));
116
+ }
117
+ _getTable(layoutMode, panelOpen) {
118
+ const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
119
+ const icon = this._getDividerIcon(layoutMode, panelOpen);
120
+ const tooltip = panelOpen ? this._translations.close : this._translations.open;
121
+ const id = "toggle-layout";
122
+ const toggleSizeClass = layoutMode === ELayoutMode.HORIZONTAL ? "divider-h" : "divider-w";
123
+ return (h("div", { class: tableSizeClass }, h("div", { class: `border ${toggleSizeClass}` }, h("div", { class: "toggle-node" }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onclick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))), h("div", { class: "width-full height-full" }, h("layer-table", { mapView: this === null || this === void 0 ? void 0 : this._mapView }))));
124
+ }
125
+ _setLayoutMode(layoutMode) {
126
+ this._layoutMode = layoutMode;
127
+ }
128
+ _toggleLayout() {
129
+ this._panelOpen = !this._panelOpen;
130
+ }
57
131
  /**
58
132
  * Fetches the component's translations
59
133
  *
@@ -61,8 +135,8 @@ const CrowdsourceManager = class {
61
135
  * @protected
62
136
  */
63
137
  async _getTranslations() {
64
- // const messages = await getLocaleComponentStrings(this.el);
65
- // this._translations = messages[0] as typeof BufferTools_T9n;
138
+ const messages = await getLocaleComponentStrings(this.el);
139
+ this._translations = messages[0];
66
140
  }
67
141
  get el() { return getElement(this); }
68
142
  };