@esri/solutions-components 0.5.0 → 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 +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
@@ -68,6 +68,21 @@ export declare class MapSelectTools {
|
|
68
68
|
* boolean: When true the buffer tools will be available for use
|
69
69
|
*/
|
70
70
|
showBufferTools: boolean;
|
71
|
+
/**
|
72
|
+
* esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html
|
73
|
+
*
|
74
|
+
*/
|
75
|
+
sketchLineSymbol: __esri.SimpleLineSymbol;
|
76
|
+
/**
|
77
|
+
* esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html
|
78
|
+
*
|
79
|
+
*/
|
80
|
+
sketchPointSymbol: __esri.SimpleMarkerSymbol;
|
81
|
+
/**
|
82
|
+
* esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html
|
83
|
+
*
|
84
|
+
*/
|
85
|
+
sketchPolygonSymbol: __esri.SimpleFillSymbol;
|
71
86
|
_layerSelectChecked: boolean;
|
72
87
|
/**
|
73
88
|
* string: Text entered by the end user.
|
@@ -256,7 +271,7 @@ export declare class MapSelectTools {
|
|
256
271
|
*
|
257
272
|
* @protected
|
258
273
|
*/
|
259
|
-
protected _initSelectionSet(): void
|
274
|
+
protected _initSelectionSet(): Promise<void>;
|
260
275
|
/**
|
261
276
|
* Get the default label base when the user has not provided a value
|
262
277
|
*
|
@@ -80,6 +80,30 @@ export declare class PublicNotification {
|
|
80
80
|
* boolean: When false no buffer distance or unit controls will be exposed
|
81
81
|
*/
|
82
82
|
showSearchSettings: boolean;
|
83
|
+
/**
|
84
|
+
* esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html
|
85
|
+
*
|
86
|
+
* A JSON representation of the instance in the ArcGIS format.
|
87
|
+
* See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
|
88
|
+
* https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
89
|
+
*/
|
90
|
+
sketchLineSymbol: __esri.SimpleLineSymbol | any;
|
91
|
+
/**
|
92
|
+
* esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html
|
93
|
+
*
|
94
|
+
* A JSON representation of the instance in the ArcGIS format.
|
95
|
+
* See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
|
96
|
+
* https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
97
|
+
*/
|
98
|
+
sketchPointSymbol: __esri.SimpleMarkerSymbol | any;
|
99
|
+
/**
|
100
|
+
* esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html
|
101
|
+
*
|
102
|
+
* A JSON representation of the instance in the ArcGIS format.
|
103
|
+
* See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
|
104
|
+
* https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
105
|
+
*/
|
106
|
+
sketchPolygonSymbol: __esri.SimpleFillSymbol | any;
|
83
107
|
/**
|
84
108
|
* esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html
|
85
109
|
*/
|
@@ -147,6 +171,10 @@ export declare class PublicNotification {
|
|
147
171
|
* esri/geometry/geometryEngine: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html
|
148
172
|
*/
|
149
173
|
protected _geometryEngine: __esri.geometryEngine;
|
174
|
+
/**
|
175
|
+
* esri/symbols/support/jsonUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-jsonUtils.html
|
176
|
+
*/
|
177
|
+
protected _jsonUtils: __esri.symbolsSupportJsonUtils;
|
150
178
|
/**
|
151
179
|
* CustomEvent: Used to prevent default behavior of layer selection change
|
152
180
|
*/
|
@@ -190,9 +218,17 @@ export declare class PublicNotification {
|
|
190
218
|
*/
|
191
219
|
watchSearchConfigurationHandler(newValue: ISearchConfiguration, oldValue: ISearchConfiguration): Promise<void>;
|
192
220
|
/**
|
193
|
-
* Called each time the
|
221
|
+
* Called each time the sketchLineSymbol prop is changed.
|
194
222
|
*/
|
195
|
-
|
223
|
+
sketchLineSymbolWatchHandler(v: __esri.SimpleLineSymbol | any, oldV: __esri.SimpleLineSymbol): Promise<void>;
|
224
|
+
/**
|
225
|
+
* Called each time the sketchPointSymbol prop is changed.
|
226
|
+
*/
|
227
|
+
sketchPointSymbolWatchHandler(v: __esri.SimpleMarkerSymbol | any, oldV: __esri.SimpleMarkerSymbol): Promise<void>;
|
228
|
+
/**
|
229
|
+
* Called each time the sketchPolygonSymbol prop is changed.
|
230
|
+
*/
|
231
|
+
sketchPolygonSymbolWatchHandler(v: __esri.SimpleFillSymbol | any, oldV: __esri.SimpleFillSymbol): Promise<void>;
|
196
232
|
/**
|
197
233
|
* Called each time the pageType prop is changed.
|
198
234
|
*/
|
@@ -241,6 +277,36 @@ export declare class PublicNotification {
|
|
241
277
|
* @protected
|
242
278
|
*/
|
243
279
|
protected _initModules(): Promise<void>;
|
280
|
+
/**
|
281
|
+
* Initialize the default symbols that will be used when creating new graphics
|
282
|
+
*
|
283
|
+
* @protected
|
284
|
+
*/
|
285
|
+
protected _initSymbols(): void;
|
286
|
+
/**
|
287
|
+
* Convert a JSON representation of a line symbol and/or set the line symbol
|
288
|
+
*
|
289
|
+
* @param v SimpleLineSymbol or a JSON representation of a line symbol
|
290
|
+
*
|
291
|
+
* @protected
|
292
|
+
*/
|
293
|
+
protected _setLineSymbol(v: __esri.SimpleLineSymbol | any): void;
|
294
|
+
/**
|
295
|
+
* Convert a JSON representation of a point symbol and/or set the point symbol
|
296
|
+
*
|
297
|
+
* @param v SimpleMarkerSymbol or a JSON representation of a point symbol
|
298
|
+
*
|
299
|
+
* @protected
|
300
|
+
*/
|
301
|
+
protected _setPointSymbol(v: __esri.SimpleMarkerSymbol | any): void;
|
302
|
+
/**
|
303
|
+
* Convert a JSON representation of a polygon symbol and/or set the polygon symbol
|
304
|
+
*
|
305
|
+
* @param v SimpleFillSymbol or a JSON representation of a polygon symbol
|
306
|
+
*
|
307
|
+
* @protected
|
308
|
+
*/
|
309
|
+
protected _setPolygonSymbol(v: __esri.SimpleFillSymbol | any): void;
|
244
310
|
/**
|
245
311
|
* Get a calcite action group for the current action
|
246
312
|
*
|
@@ -313,13 +379,29 @@ export declare class PublicNotification {
|
|
313
379
|
*/
|
314
380
|
protected _handleLayerChange(): Promise<void>;
|
315
381
|
/**
|
316
|
-
* Check if any selection sets exist.
|
382
|
+
* Check if any valid selection sets exist.
|
317
383
|
*
|
318
|
-
* @returns true if selection sets exist
|
384
|
+
* @returns true if valid selection sets exist
|
319
385
|
*
|
320
386
|
* @protected
|
321
387
|
*/
|
322
388
|
protected _hasSelections(): boolean;
|
389
|
+
/**
|
390
|
+
* Check if any duplicates exist
|
391
|
+
*
|
392
|
+
* @returns true if duplicates are found
|
393
|
+
*
|
394
|
+
* @protected
|
395
|
+
*/
|
396
|
+
protected _hasDuplicates(): boolean;
|
397
|
+
/**
|
398
|
+
* Check if a selection set is valid (exists or has at least one added if its a refine set)
|
399
|
+
*
|
400
|
+
* @returns true if selection set is valid
|
401
|
+
*
|
402
|
+
* @protected
|
403
|
+
*/
|
404
|
+
protected _isValidSet(ss: ISelectionSet): boolean;
|
323
405
|
/**
|
324
406
|
* Create the Select page that shows the selection workflows
|
325
407
|
*
|
@@ -53,6 +53,10 @@ export namespace Components {
|
|
53
53
|
interface CommentCard {
|
54
54
|
}
|
55
55
|
interface CrowdsourceManager {
|
56
|
+
/**
|
57
|
+
* IMapInfo[]: array of map infos (name and id)
|
58
|
+
*/
|
59
|
+
"mapInfos": IMapInfo[];
|
56
60
|
}
|
57
61
|
interface CrowdsourceReporter {
|
58
62
|
}
|
@@ -125,6 +129,10 @@ export namespace Components {
|
|
125
129
|
* IMapInfo[]: array of map infos (name and id)
|
126
130
|
*/
|
127
131
|
"mapInfos": IMapInfo[];
|
132
|
+
/**
|
133
|
+
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
134
|
+
*/
|
135
|
+
"mapView": __esri.MapView;
|
128
136
|
}
|
129
137
|
interface MapDrawTools {
|
130
138
|
/**
|
@@ -253,6 +261,18 @@ export namespace Components {
|
|
253
261
|
* boolean: When true the buffer tools will be available for use
|
254
262
|
*/
|
255
263
|
"showBufferTools": boolean;
|
264
|
+
/**
|
265
|
+
* esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html
|
266
|
+
*/
|
267
|
+
"sketchLineSymbol": __esri.SimpleLineSymbol;
|
268
|
+
/**
|
269
|
+
* esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html
|
270
|
+
*/
|
271
|
+
"sketchPointSymbol": __esri.SimpleMarkerSymbol;
|
272
|
+
/**
|
273
|
+
* esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html
|
274
|
+
*/
|
275
|
+
"sketchPolygonSymbol": __esri.SimpleFillSymbol;
|
256
276
|
}
|
257
277
|
interface MediaCard {
|
258
278
|
/**
|
@@ -346,6 +366,18 @@ export namespace Components {
|
|
346
366
|
* boolean: When false no buffer distance or unit controls will be exposed
|
347
367
|
*/
|
348
368
|
"showSearchSettings": boolean;
|
369
|
+
/**
|
370
|
+
* esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
371
|
+
*/
|
372
|
+
"sketchLineSymbol": __esri.SimpleLineSymbol | any;
|
373
|
+
/**
|
374
|
+
* esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
375
|
+
*/
|
376
|
+
"sketchPointSymbol": __esri.SimpleMarkerSymbol | any;
|
377
|
+
/**
|
378
|
+
* esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
379
|
+
*/
|
380
|
+
"sketchPolygonSymbol": __esri.SimpleFillSymbol | any;
|
349
381
|
}
|
350
382
|
interface RefineSelection {
|
351
383
|
"GraphicsLayer": any;
|
@@ -957,6 +989,10 @@ declare namespace LocalJSX {
|
|
957
989
|
interface CommentCard {
|
958
990
|
}
|
959
991
|
interface CrowdsourceManager {
|
992
|
+
/**
|
993
|
+
* IMapInfo[]: array of map infos (name and id)
|
994
|
+
*/
|
995
|
+
"mapInfos"?: IMapInfo[];
|
960
996
|
}
|
961
997
|
interface CrowdsourceReporter {
|
962
998
|
}
|
@@ -1013,10 +1049,18 @@ declare namespace LocalJSX {
|
|
1013
1049
|
* IMapInfo[]: array of map infos (name and id)
|
1014
1050
|
*/
|
1015
1051
|
"mapInfos"?: IMapInfo[];
|
1052
|
+
/**
|
1053
|
+
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
1054
|
+
*/
|
1055
|
+
"mapView"?: __esri.MapView;
|
1016
1056
|
/**
|
1017
1057
|
* Emitted when the expand button is clicked
|
1018
1058
|
*/
|
1019
1059
|
"onExpandMap"?: (event: MapCardCustomEvent<EExpandType>) => void;
|
1060
|
+
/**
|
1061
|
+
* Emitted when a new map is loaded
|
1062
|
+
*/
|
1063
|
+
"onMapChanged"?: (event: MapCardCustomEvent<__esri.MapView>) => void;
|
1020
1064
|
}
|
1021
1065
|
interface MapDrawTools {
|
1022
1066
|
/**
|
@@ -1153,6 +1197,18 @@ declare namespace LocalJSX {
|
|
1153
1197
|
* boolean: When true the buffer tools will be available for use
|
1154
1198
|
*/
|
1155
1199
|
"showBufferTools"?: boolean;
|
1200
|
+
/**
|
1201
|
+
* esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html
|
1202
|
+
*/
|
1203
|
+
"sketchLineSymbol"?: __esri.SimpleLineSymbol;
|
1204
|
+
/**
|
1205
|
+
* esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html
|
1206
|
+
*/
|
1207
|
+
"sketchPointSymbol"?: __esri.SimpleMarkerSymbol;
|
1208
|
+
/**
|
1209
|
+
* esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html
|
1210
|
+
*/
|
1211
|
+
"sketchPolygonSymbol"?: __esri.SimpleFillSymbol;
|
1156
1212
|
}
|
1157
1213
|
interface MediaCard {
|
1158
1214
|
/**
|
@@ -1237,6 +1293,18 @@ declare namespace LocalJSX {
|
|
1237
1293
|
* boolean: When false no buffer distance or unit controls will be exposed
|
1238
1294
|
*/
|
1239
1295
|
"showSearchSettings"?: boolean;
|
1296
|
+
/**
|
1297
|
+
* esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
1298
|
+
*/
|
1299
|
+
"sketchLineSymbol"?: __esri.SimpleLineSymbol | any;
|
1300
|
+
/**
|
1301
|
+
* esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
1302
|
+
*/
|
1303
|
+
"sketchPointSymbol"?: __esri.SimpleMarkerSymbol | any;
|
1304
|
+
/**
|
1305
|
+
* esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
|
1306
|
+
*/
|
1307
|
+
"sketchPolygonSymbol"?: __esri.SimpleFillSymbol | any;
|
1240
1308
|
}
|
1241
1309
|
interface RefineSelection {
|
1242
1310
|
"GraphicsLayer"?: any;
|
package/dist/types/preact.d.ts
CHANGED
@@ -438,8 +438,9 @@ declare module "preact/src/jsx" {
|
|
438
438
|
|
439
439
|
"list-item": JSX.SolutionsListItem & JSXInternal.HTMLAttributes<HTMLSolutionsListItemElement>
|
440
440
|
|
441
|
-
"map-card": Omit<JSX.SolutionsMapCard, "onExpandMap"> & JSXInternal.HTMLAttributes<HTMLSolutionsMapCardElement> & {
|
441
|
+
"map-card": Omit<JSX.SolutionsMapCard, "onExpandMap" | "onMapChanged"> & JSXInternal.HTMLAttributes<HTMLSolutionsMapCardElement> & {
|
442
442
|
"onexpandMap"?: (event: CustomEvent<any>) => void;
|
443
|
+
"onmapChanged"?: (event: CustomEvent<any>) => void;
|
443
444
|
}
|
444
445
|
|
445
446
|
"map-draw-tools": Omit<JSX.SolutionsMapDrawTools, "onSketchGraphicsChange"> & JSXInternal.HTMLAttributes<HTMLSolutionsMapDrawToolsElement> & {
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/** @license
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
/**
|
17
|
+
* Download the CSV file
|
18
|
+
*
|
19
|
+
* @param title Title (without file extension) to use for file; defaults to "export"
|
20
|
+
* @param outputLines Lines of output to write to file
|
21
|
+
*
|
22
|
+
* @see {@link https://medium.com/@danny.pule/export-json-to-csv-file-using-javascript-a0b7bc5b00d2}
|
23
|
+
*/
|
24
|
+
export declare function downloadCSVFile(title: string, outputLines: string[]): void;
|
@@ -16,6 +16,7 @@
|
|
16
16
|
/**
|
17
17
|
* Export a csv of the attributes from the features that match the provided ids
|
18
18
|
*
|
19
|
+
* @param title Title to use for file
|
19
20
|
* @param labels Labels to write
|
20
21
|
*/
|
21
|
-
export declare function exportCSV(labels: string[][]): void;
|
22
|
+
export declare function exportCSV(title: string, labels: string[][]): void;
|
@@ -40,3 +40,28 @@ export declare function downloadCSV(selectionSetNames: string[], layer: __esri.F
|
|
40
40
|
* @returns Promise resolving when function is done
|
41
41
|
*/
|
42
42
|
export declare function downloadPDF(selectionSetNames: string[], layer: __esri.FeatureLayer, ids: number[], removeDuplicates: boolean, labelPageDescription: ILabel): Promise<void>;
|
43
|
+
/**
|
44
|
+
* Converts a set of fieldInfos into template lines.
|
45
|
+
*
|
46
|
+
* @param fieldInfos Layer's fieldInfos structure
|
47
|
+
* @param bypassFieldVisiblity Indicates if the configured fieldInfo visibility property should be ignored
|
48
|
+
* @return Label spec with lines separated by `lineSeparatorChar`
|
49
|
+
*/
|
50
|
+
export declare function _convertPopupFieldsToLabelSpec(fieldInfos: __esri.FieldInfo[], bypassFieldVisiblity?: boolean): string;
|
51
|
+
/**
|
52
|
+
* Converts the text of a custom popup into a multiline label specification; conversion splits text into
|
53
|
+
* lines on <br>s, and removes HTML tags. It does not handle Arcade and related records.
|
54
|
+
*
|
55
|
+
* @param popupInfo Layer's popupInfo structure containing description, fieldInfos, and expressionInfos, e.g.,
|
56
|
+
* "<div style='text-align: left;'>{NAME}<br />{STREET}<br />{CITY}, {STATE} {ZIP} <br /></div>"
|
57
|
+
* @return Label spec with lines separated by `lineSeparatorChar`
|
58
|
+
*/
|
59
|
+
export declare function _convertPopupTextToLabelSpec(popupInfo: string): string;
|
60
|
+
/**
|
61
|
+
* Creates a title from a list of selection set names.
|
62
|
+
*
|
63
|
+
* @param selectionSetNames Names to use in title
|
64
|
+
* @return Title composed of the selectionSetNames separated by commas; if there are no
|
65
|
+
* selection set names supplied, "download" is returned
|
66
|
+
*/
|
67
|
+
export declare function _createTitle(selectionSetNames: string[]): string;
|
@@ -15,6 +15,11 @@
|
|
15
15
|
*/
|
16
16
|
/// <reference types="arcgis-js-api" />
|
17
17
|
import { IDeployFileCopyPath, IItemTemplate } from '@esri/solution-common';
|
18
|
+
export declare enum ELayoutMode {
|
19
|
+
GRID = "GRID",
|
20
|
+
HORIZONTAL = "HORIZONTAL",
|
21
|
+
VERTICAL = "VERTICAL"
|
22
|
+
}
|
18
23
|
/**
|
19
24
|
* Resource update types
|
20
25
|
*/
|
@@ -18,7 +18,8 @@ export { ILabel } from "../assets/arcgis-pdf-creator/PDFLabels";
|
|
18
18
|
/**
|
19
19
|
* Exports a PDF of labels.
|
20
20
|
*
|
21
|
+
* @param title Title to use for file
|
21
22
|
* @param labels Labels to write
|
22
23
|
* @param labelPageDescription Page format to use for labels
|
23
24
|
*/
|
24
|
-
export declare function exportPDF(labels: string[][], labelPageDescription: PDFLabels.ILabel): void;
|
25
|
+
export declare function exportPDF(title: string, labels: string[][], labelPageDescription: PDFLabels.ILabel): void;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@esri/solutions-components",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.2",
|
4
4
|
"description": "Web Components for Esri's Solutions Applications",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"@stencil/sass": "^2.0.0",
|
37
37
|
"@stencil/store": "^2.0.1",
|
38
38
|
"@types/arcgis-js-api": "^4.25.0-next.20221031",
|
39
|
-
"@types/jest": "^27.
|
39
|
+
"@types/jest": "^27.5.2",
|
40
40
|
"@types/node": "^16.11.11",
|
41
41
|
"@types/puppeteer": "^5.4.2",
|
42
42
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
@@ -53,8 +53,8 @@
|
|
53
53
|
"esri-loader": "3.4.0",
|
54
54
|
"form-request-submit-polyfill": "^2.0.0",
|
55
55
|
"gh-release": "^6.0.3",
|
56
|
-
"jest": "^
|
57
|
-
"jest-cli": "^
|
56
|
+
"jest": "^27.5.1",
|
57
|
+
"jest-cli": "^27.5.1",
|
58
58
|
"pify": "^5.0.0",
|
59
59
|
"prettier": "2.4.1",
|
60
60
|
"puppeteer": "^13.5.1",
|
@@ -1,142 +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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-c6979cbb.js');
|
11
|
-
const dom = require('./dom-4a580af6.js');
|
12
|
-
const guid = require('./guid-84ac4d91.js');
|
13
|
-
const conditionalSlot = require('./conditionalSlot-baada7a3.js');
|
14
|
-
require('./resources-b56bce71.js');
|
15
|
-
require('./observers-5311faf8.js');
|
16
|
-
|
17
|
-
/*!
|
18
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
19
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
20
|
-
* v1.0.0-beta.97
|
21
|
-
*/
|
22
|
-
const CSS = {
|
23
|
-
title: "title",
|
24
|
-
close: "close",
|
25
|
-
imageContainer: "image-container",
|
26
|
-
chipIcon: "chip-icon",
|
27
|
-
closeIcon: "close-icon"
|
28
|
-
};
|
29
|
-
const TEXT = {
|
30
|
-
close: "Close"
|
31
|
-
};
|
32
|
-
const SLOTS = {
|
33
|
-
image: "image"
|
34
|
-
};
|
35
|
-
const ICONS = {
|
36
|
-
close: "x"
|
37
|
-
};
|
38
|
-
|
39
|
-
const chipCss = "@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}";
|
40
|
-
|
41
|
-
const Chip = class {
|
42
|
-
constructor(hostRef) {
|
43
|
-
index.registerInstance(this, hostRef);
|
44
|
-
this.calciteChipDismiss = index.createEvent(this, "calciteChipDismiss", 6);
|
45
|
-
//--------------------------------------------------------------------------
|
46
|
-
//
|
47
|
-
// Public Properties
|
48
|
-
//
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
/** Specifies the appearance style of the component. */
|
51
|
-
this.appearance = "solid";
|
52
|
-
/** Specifies the color for the component. */
|
53
|
-
this.color = "grey";
|
54
|
-
/**
|
55
|
-
* When `true`, a close button is added to the component.
|
56
|
-
*
|
57
|
-
* @deprecated use `closable` instead.
|
58
|
-
*/
|
59
|
-
this.dismissible = false;
|
60
|
-
/** When `true`, a close button is added to the component. */
|
61
|
-
this.closable = false;
|
62
|
-
/**
|
63
|
-
* Accessible name for the component's close button.
|
64
|
-
*
|
65
|
-
* @default "Close"
|
66
|
-
*/
|
67
|
-
this.dismissLabel = TEXT.close;
|
68
|
-
/** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */
|
69
|
-
this.iconFlipRtl = false;
|
70
|
-
/** Specifies the size of the component. */
|
71
|
-
this.scale = "m";
|
72
|
-
/** When `true`, hides the component. */
|
73
|
-
this.closed = false;
|
74
|
-
// --------------------------------------------------------------------------
|
75
|
-
//
|
76
|
-
// Private Methods
|
77
|
-
//
|
78
|
-
// --------------------------------------------------------------------------
|
79
|
-
this.closeClickHandler = (event) => {
|
80
|
-
event.preventDefault();
|
81
|
-
this.calciteChipDismiss.emit(this.el);
|
82
|
-
this.closed = true;
|
83
|
-
};
|
84
|
-
this.guid = guid.guid();
|
85
|
-
}
|
86
|
-
handleDismissible(value) {
|
87
|
-
this.closable = value;
|
88
|
-
}
|
89
|
-
handleClosable(value) {
|
90
|
-
this.dismissible = value;
|
91
|
-
}
|
92
|
-
// --------------------------------------------------------------------------
|
93
|
-
//
|
94
|
-
// Lifecycle
|
95
|
-
//
|
96
|
-
// --------------------------------------------------------------------------
|
97
|
-
connectedCallback() {
|
98
|
-
conditionalSlot.connectConditionalSlotComponent(this);
|
99
|
-
if (this.dismissible) {
|
100
|
-
this.handleDismissible(this.dismissible);
|
101
|
-
}
|
102
|
-
if (this.closable) {
|
103
|
-
this.handleClosable(this.closable);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
disconnectedCallback() {
|
107
|
-
conditionalSlot.disconnectConditionalSlotComponent(this);
|
108
|
-
}
|
109
|
-
//--------------------------------------------------------------------------
|
110
|
-
//
|
111
|
-
// Public Methods
|
112
|
-
//
|
113
|
-
//--------------------------------------------------------------------------
|
114
|
-
/** Sets focus on the component. */
|
115
|
-
async setFocus() {
|
116
|
-
var _a;
|
117
|
-
(_a = this.closeButton) === null || _a === void 0 ? void 0 : _a.focus();
|
118
|
-
}
|
119
|
-
//--------------------------------------------------------------------------
|
120
|
-
//
|
121
|
-
// Render Methods
|
122
|
-
//
|
123
|
-
//--------------------------------------------------------------------------
|
124
|
-
renderChipImage() {
|
125
|
-
const { el } = this;
|
126
|
-
const hasChipImage = dom.getSlotted(el, SLOTS.image);
|
127
|
-
return hasChipImage ? (index.h("div", { class: CSS.imageContainer, key: "image" }, index.h("slot", { name: SLOTS.image }))) : null;
|
128
|
-
}
|
129
|
-
render() {
|
130
|
-
const iconEl = (index.h("calcite-icon", { class: CSS.chipIcon, flipRtl: this.iconFlipRtl, icon: this.icon, scale: "s" }));
|
131
|
-
const closeButton = (index.h("button", { "aria-describedby": this.guid, "aria-label": this.dismissLabel, class: CSS.close, onClick: this.closeClickHandler, ref: (el) => (this.closeButton = el) }, index.h("calcite-icon", { class: CSS.closeIcon, icon: ICONS.close, scale: "s" })));
|
132
|
-
return (index.h("div", { class: "container" }, this.renderChipImage(), this.icon ? iconEl : null, index.h("span", { class: CSS.title, id: this.guid }, index.h("slot", null)), this.closable ? closeButton : null));
|
133
|
-
}
|
134
|
-
get el() { return index.getElement(this); }
|
135
|
-
static get watchers() { return {
|
136
|
-
"dismissible": ["handleDismissible"],
|
137
|
-
"closable": ["handleClosable"]
|
138
|
-
}; }
|
139
|
-
};
|
140
|
-
Chip.style = chipCss;
|
141
|
-
|
142
|
-
exports.calcite_chip = Chip;
|