@esri/solutions-components 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +4 -1
  2. package/dist/assets/t9n/public-notification/resources_en.json +4 -1
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
  4. package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
  5. package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
  6. package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-search.cjs.entry.js +46 -7
  10. package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
  11. package/dist/cjs/public-notification.cjs.entry.js +101 -18
  12. package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +0 -5
  15. package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
  16. package/dist/collection/components/layer-table/layer-table.js +1 -1
  17. package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
  18. package/dist/collection/components/map-search/map-search.js +66 -7
  19. package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
  20. package/dist/collection/components/pdf-download/pdf-download.js +32 -8
  21. package/dist/collection/components/public-notification/public-notification.css +46 -41
  22. package/dist/collection/components/public-notification/public-notification.js +267 -19
  23. package/dist/collection/components/refine-selection/refine-selection.js +18 -1
  24. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
  25. package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
  26. package/dist/collection/demos/index.html +0 -24
  27. package/dist/collection/demos/map-draw-tools.html +17 -17
  28. package/dist/collection/demos/map-layer-picker.html +2 -0
  29. package/dist/collection/demos/map-search.html +16 -15
  30. package/dist/collection/demos/map-select-tools.html +16 -24
  31. package/dist/collection/demos/new-public-notification.html +46 -35
  32. package/dist/collection/demos/pdf-download.html +8 -1
  33. package/dist/collection/utils/csvUtils.js +4 -4
  34. package/dist/collection/utils/csvUtils.ts +6 -4
  35. package/dist/collection/utils/interfaces.ts +65 -1
  36. package/dist/collection/utils/mapViewUtils.js +36 -22
  37. package/dist/collection/utils/mapViewUtils.ts +50 -27
  38. package/dist/collection/utils/publicNotificationStore.js +3 -1
  39. package/dist/collection/utils/publicNotificationStore.ts +3 -1
  40. package/dist/collection/utils/queryUtils.js +2 -2
  41. package/dist/collection/utils/queryUtils.ts +2 -2
  42. package/dist/components/buffer-tools2.js +1 -1
  43. package/dist/components/csvUtils.js +4 -4
  44. package/dist/components/index.d.ts +0 -5
  45. package/dist/components/index.js +0 -5
  46. package/dist/components/layer-table.js +2 -3
  47. package/dist/components/map-layer-picker2.js +177 -28
  48. package/dist/components/map-search.js +47 -7
  49. package/dist/components/map-select-tools2.js +56 -11
  50. package/dist/components/pdf-download2.js +217 -8
  51. package/dist/components/public-notification.js +154 -55
  52. package/dist/components/publicNotificationStore.js +3 -1
  53. package/dist/components/queryUtils.js +3 -3
  54. package/dist/components/refine-selection-tools2.js +9 -8
  55. package/dist/components/refine-selection2.js +3 -1
  56. package/dist/esm/buffer-tools_6.entry.js +8 -7
  57. package/dist/esm/calcite-combobox_3.entry.js +38 -25
  58. package/dist/esm/calcite-input-message_5.entry.js +271 -20
  59. package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
  60. package/dist/esm/layer-table.entry.js +3 -3
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/map-search.entry.js +46 -7
  63. package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
  64. package/dist/esm/public-notification.entry.js +101 -18
  65. package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
  66. package/dist/esm/solutions-components.js +1 -1
  67. package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
  68. package/dist/solutions-components/demos/index.html +0 -24
  69. package/dist/solutions-components/demos/map-draw-tools.html +17 -17
  70. package/dist/solutions-components/demos/map-layer-picker.html +2 -0
  71. package/dist/solutions-components/demos/map-search.html +16 -15
  72. package/dist/solutions-components/demos/map-select-tools.html +16 -24
  73. package/dist/solutions-components/demos/new-public-notification.html +46 -35
  74. package/dist/solutions-components/demos/pdf-download.html +8 -1
  75. package/dist/solutions-components/p-07593958.entry.js +6 -0
  76. package/dist/solutions-components/p-3fa9b3c8.js +36 -0
  77. package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
  78. package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
  79. package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
  80. package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
  81. package/dist/solutions-components/p-bfa95147.entry.js +17 -0
  82. package/dist/solutions-components/p-d09a168c.entry.js +6 -0
  83. package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
  84. package/dist/solutions-components/solutions-components.esm.js +1 -1
  85. package/dist/solutions-components/utils/csvUtils.ts +6 -4
  86. package/dist/solutions-components/utils/interfaces.ts +65 -1
  87. package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
  88. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
  89. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  90. package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
  91. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
  92. package/dist/types/components/map-search/map-search.d.ts +18 -1
  93. package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
  94. package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
  95. package/dist/types/components/public-notification/public-notification.d.ts +98 -4
  96. package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
  97. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
  98. package/dist/types/components.d.ts +154 -180
  99. package/dist/types/preact.d.ts +0 -10
  100. package/dist/types/utils/csvUtils.d.ts +1 -1
  101. package/dist/types/utils/interfaces.d.ts +56 -1
  102. package/dist/types/utils/mapViewUtils.d.ts +19 -9
  103. package/dist/types/utils/publicNotificationStore.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/dist/cjs/check-list.cjs.entry.js +0 -103
  106. package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
  107. package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
  108. package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
  109. package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
  110. package/dist/cjs/labelFormats-3236d2e0.js +0 -212
  111. package/dist/collection/components/check-list/check-list.css +0 -3
  112. package/dist/collection/components/check-list/check-list.js +0 -179
  113. package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
  114. package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
  115. package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
  116. package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
  117. package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
  118. package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
  119. package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
  120. package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
  121. package/dist/collection/demos/check-list.html +0 -65
  122. package/dist/collection/demos/config-buffer-tools.html +0 -92
  123. package/dist/collection/demos/config-draw-tools.html +0 -58
  124. package/dist/collection/demos/config-layer-picker.html +0 -97
  125. package/dist/components/check-list.d.ts +0 -11
  126. package/dist/components/check-list.js +0 -11
  127. package/dist/components/check-list2.js +0 -131
  128. package/dist/components/config-buffer-tools.d.ts +0 -11
  129. package/dist/components/config-buffer-tools.js +0 -187
  130. package/dist/components/config-draw-tools.d.ts +0 -11
  131. package/dist/components/config-draw-tools.js +0 -121
  132. package/dist/components/config-layer-picker.d.ts +0 -11
  133. package/dist/components/config-layer-picker.js +0 -163
  134. package/dist/components/config-pdf-download.d.ts +0 -11
  135. package/dist/components/config-pdf-download.js +0 -154
  136. package/dist/components/labelFormats.js +0 -210
  137. package/dist/components/mapViewUtils.js +0 -129
  138. package/dist/esm/check-list.entry.js +0 -99
  139. package/dist/esm/config-buffer-tools.entry.js +0 -121
  140. package/dist/esm/config-draw-tools.entry.js +0 -81
  141. package/dist/esm/config-layer-picker.entry.js +0 -109
  142. package/dist/esm/config-pdf-download.entry.js +0 -113
  143. package/dist/esm/labelFormats-b37958c3.js +0 -210
  144. package/dist/solutions-components/demos/check-list.html +0 -65
  145. package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
  146. package/dist/solutions-components/demos/config-draw-tools.html +0 -58
  147. package/dist/solutions-components/demos/config-layer-picker.html +0 -97
  148. package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
  149. package/dist/solutions-components/p-35078393.entry.js +0 -17
  150. package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
  151. package/dist/solutions-components/p-3e444242.entry.js +0 -6
  152. package/dist/solutions-components/p-67afea92.entry.js +0 -12
  153. package/dist/solutions-components/p-7dcab29d.js +0 -36
  154. package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
  155. package/dist/solutions-components/p-906b7b96.entry.js +0 -6
  156. package/dist/solutions-components/p-99c98510.entry.js +0 -6
  157. package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
  158. package/dist/solutions-components/p-e99b1247.js +0 -6
  159. package/dist/types/components/check-list/check-list.d.ts +0 -57
  160. package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
  161. package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
  162. package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
  163. package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -4,13 +4,216 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
- import { p as pdfUtils } from './labelFormats.js';
8
7
  import { g as getLocaleComponentStrings } from './locale.js';
9
8
  import { e as exportCSV } from './csvUtils.js';
10
9
  import { d as defineCustomElement$3 } from './icon.js';
11
10
  import { d as defineCustomElement$2 } from './option.js';
12
11
  import { d as defineCustomElement$1 } from './select.js';
13
12
 
13
+ const labelFormats = [
14
+ {
15
+ descriptionPDF: {
16
+ labelWidthDisplay: "2-5/8",
17
+ labelHeightDisplay: "1",
18
+ labelsPerPageDisplay: "30",
19
+ averyPartNumber: "*60"
20
+ },
21
+ labelSpec: {
22
+ type: "AVERY",
23
+ pageDimensions: {
24
+ width: 8.5,
25
+ height: 11,
26
+ leftMargin: 0.1875,
27
+ rightMargin: 0.1875,
28
+ topMargin: 0.5,
29
+ bottomMargin: 0.5
30
+ },
31
+ numLabelsAcross: 3,
32
+ numLabelsDown: 10,
33
+ labelWidth: 2.625,
34
+ labelHeight: 1,
35
+ horizGapIn: 0.125,
36
+ vertGapIn: 0,
37
+ labelPadding: 0.1,
38
+ fontSizePx: 11,
39
+ maxNumLabelLines: 4
40
+ }
41
+ },
42
+ {
43
+ descriptionPDF: {
44
+ labelWidthDisplay: "4",
45
+ labelHeightDisplay: "1",
46
+ labelsPerPageDisplay: "20",
47
+ averyPartNumber: "*61"
48
+ },
49
+ labelSpec: {
50
+ type: "AVERY",
51
+ pageDimensions: {
52
+ width: 8.5,
53
+ height: 11,
54
+ leftMargin: 0.15625,
55
+ rightMargin: 0.15625,
56
+ topMargin: 0.47637821,
57
+ bottomMargin: 0.5
58
+ },
59
+ numLabelsAcross: 2,
60
+ numLabelsDown: 10,
61
+ labelWidth: 4,
62
+ labelHeight: 1.0025,
63
+ horizGapIn: 0.1875,
64
+ vertGapIn: 0,
65
+ labelPadding: 0.1,
66
+ fontSizePx: 11,
67
+ maxNumLabelLines: 4
68
+ }
69
+ },
70
+ {
71
+ descriptionPDF: {
72
+ labelWidthDisplay: "4",
73
+ labelHeightDisplay: "1-1/3",
74
+ labelsPerPageDisplay: "14",
75
+ averyPartNumber: "*62"
76
+ },
77
+ labelSpec: {
78
+ type: "AVERY",
79
+ pageDimensions: {
80
+ width: 8.5,
81
+ height: 11,
82
+ leftMargin: 0.15625,
83
+ rightMargin: 0.15625,
84
+ topMargin: 0.81889808,
85
+ bottomMargin: 0.83464612
86
+ },
87
+ numLabelsAcross: 2,
88
+ numLabelsDown: 7,
89
+ labelWidth: 4,
90
+ labelHeight: 1.3352,
91
+ horizGapIn: 0.1875,
92
+ vertGapIn: 0,
93
+ labelPadding: 0.1,
94
+ fontSizePx: 11,
95
+ maxNumLabelLines: 6
96
+ }
97
+ },
98
+ {
99
+ descriptionPDF: {
100
+ labelWidthDisplay: "4",
101
+ labelHeightDisplay: "2",
102
+ labelsPerPageDisplay: "10",
103
+ averyPartNumber: "*63"
104
+ },
105
+ labelSpec: {
106
+ type: "AVERY",
107
+ pageDimensions: {
108
+ width: 8.5,
109
+ height: 11,
110
+ leftMargin: 0.15625,
111
+ rightMargin: 0.15625,
112
+ topMargin: 0.5,
113
+ bottomMargin: 0.5
114
+ },
115
+ numLabelsAcross: 2,
116
+ numLabelsDown: 5,
117
+ labelWidth: 4,
118
+ labelHeight: 2,
119
+ horizGapIn: 0.1875,
120
+ vertGapIn: 0,
121
+ labelPadding: 0.1,
122
+ fontSizePx: 12,
123
+ maxNumLabelLines: 10
124
+ }
125
+ },
126
+ {
127
+ descriptionPDF: {
128
+ labelWidthDisplay: "4",
129
+ labelHeightDisplay: "3-1/3",
130
+ labelsPerPageDisplay: "6",
131
+ averyPartNumber: "*64"
132
+ },
133
+ labelSpec: {
134
+ type: "AVERY",
135
+ pageDimensions: {
136
+ width: 8.5,
137
+ height: 11,
138
+ leftMargin: 0.15625,
139
+ rightMargin: 0.15625,
140
+ topMargin: 0.4724412,
141
+ bottomMargin: 0.50000027
142
+ },
143
+ numLabelsAcross: 2,
144
+ numLabelsDown: 3,
145
+ labelWidth: 4,
146
+ labelHeight: 3.342,
147
+ horizGapIn: 0.1875,
148
+ vertGapIn: 0,
149
+ labelPadding: 0.1,
150
+ fontSizePx: 14,
151
+ maxNumLabelLines: 12
152
+ }
153
+ },
154
+ {
155
+ descriptionPDF: {
156
+ labelWidthDisplay: "1-3/4",
157
+ labelHeightDisplay: "1/2",
158
+ labelsPerPageDisplay: "80",
159
+ averyPartNumber: "*67"
160
+ },
161
+ labelSpec: {
162
+ type: "AVERY",
163
+ pageDimensions: {
164
+ width: 8.5,
165
+ height: 11,
166
+ leftMargin: 0.307086375,
167
+ rightMargin: 0.307086375,
168
+ topMargin: 0.4724412,
169
+ bottomMargin: 0.49606326
170
+ },
171
+ numLabelsAcross: 4,
172
+ numLabelsDown: 20,
173
+ labelWidth: 1.75,
174
+ labelHeight: 0.50155,
175
+ horizGapIn: 0.29527575,
176
+ vertGapIn: 0,
177
+ labelPadding: 0.1,
178
+ fontSizePx: 8,
179
+ maxNumLabelLines: 3
180
+ }
181
+ },
182
+ {
183
+ descriptionPDF: {
184
+ labelWidthDisplay: "1-3/4",
185
+ labelHeightDisplay: "2/3",
186
+ labelsPerPageDisplay: "60",
187
+ averyPartNumber: "*95"
188
+ },
189
+ labelSpec: {
190
+ type: "AVERY",
191
+ pageDimensions: {
192
+ width: 8.5,
193
+ height: 11,
194
+ leftMargin: 0.28936983,
195
+ rightMargin: 0.28936983,
196
+ topMargin: 0.53937037,
197
+ bottomMargin: 0.5511814
198
+ },
199
+ numLabelsAcross: 4,
200
+ numLabelsDown: 15,
201
+ labelWidth: 1.75,
202
+ labelHeight: 0.6605,
203
+ horizGapIn: 0.30708678,
204
+ vertGapIn: 0,
205
+ labelPadding: 0.1,
206
+ fontSizePx: 8,
207
+ maxNumLabelLines: 4
208
+ }
209
+ }
210
+ ];
211
+
212
+ const pdfUtils = /*#__PURE__*/Object.freeze({
213
+ __proto__: null,
214
+ 'default': labelFormats
215
+ });
216
+
14
217
  const pdfDownloadCss = ":host{display:block}";
15
218
 
16
219
  const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
@@ -19,6 +222,7 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
19
222
  this.__registerHost();
20
223
  this.__attachShadow();
21
224
  this.disabled = true;
225
+ this.enabledSizeValues = [];
22
226
  this.layerView = undefined;
23
227
  this._translations = undefined;
24
228
  }
@@ -49,8 +253,8 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
49
253
  * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
50
254
  * @returns Promise resolving when function is done
51
255
  */
52
- async downloadCSV(ids, removeDuplicates) {
53
- return this._downloadCSV(ids, removeDuplicates);
256
+ async downloadCSV(ids, removeDuplicates, addColumnTitle) {
257
+ return this._downloadCSV(ids, removeDuplicates, addColumnTitle);
54
258
  }
55
259
  //--------------------------------------------------------------------------
56
260
  //
@@ -93,9 +297,13 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
93
297
  const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
94
298
  return _a < _b ? -1 : _a > _b ? 1 : 0;
95
299
  });
96
- return sortedPdfIndo.map((l) => {
97
- return (h("calcite-option", { value: l }, this._getLabelSizeText(l)));
98
- });
300
+ return sortedPdfIndo.reduce((prev, cur) => {
301
+ if (this.enabledSizeValues.length === 0 ||
302
+ this.enabledSizeValues.indexOf(parseInt(cur.descriptionPDF.labelsPerPageDisplay, 10)) > -1) {
303
+ prev.push((h("calcite-option", { value: cur }, this._getLabelSizeText(cur))));
304
+ }
305
+ return prev;
306
+ }, []);
99
307
  }
100
308
  /**
101
309
  * Downloads pdf of mailing labels for the provided list of ids
@@ -120,10 +328,10 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
120
328
  * @returns Promise that will resolve when the download is complete
121
329
  * @protected
122
330
  */
123
- async _downloadCSV(ids, removeDuplicates) {
331
+ async _downloadCSV(ids, removeDuplicates, addColumnTitle) {
124
332
  // TODO this will be leveraged when we do the real implementation of this
125
333
  console.log(removeDuplicates);
126
- await exportCSV(this.layerView, ids);
334
+ await exportCSV(this.layerView, ids, addColumnTitle);
127
335
  }
128
336
  /**
129
337
  * Gets the formatted pdf export size text
@@ -151,6 +359,7 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
151
359
  static get style() { return pdfDownloadCss; }
152
360
  }, [1, "pdf-download", {
153
361
  "disabled": [4],
362
+ "enabledSizeValues": [16],
154
363
  "layerView": [16],
155
364
  "_translations": [32],
156
365
  "downloadPDF": [64],