@esri/solutions-components 0.6.6 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_4.cjs.entry.js +622 -0
- package/dist/cjs/card-manager_4.cjs.entry.js +91 -37
- package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.css +19 -0
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +166 -0
- package/dist/collection/components/basemap-gallery/test/basemap-gallery.e2e.js +29 -0
- package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +37 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +43 -2
- package/dist/collection/components/layer-table/layer-table.js +99 -30
- package/dist/collection/components/map-card/map-card.css +0 -7
- package/dist/collection/components/map-card/map-card.js +12 -7
- package/dist/collection/components/map-search/map-search.css +24 -0
- package/dist/collection/components/map-search/map-search.js +321 -0
- package/dist/collection/components/map-search/test/map-search.e2e.js +29 -0
- package/dist/collection/components/map-search/test/map-search.spec.js +37 -0
- package/dist/collection/components/map-tools/map-tools.js +139 -14
- package/dist/collection/demos/crowdsource-manager.html +3 -3
- package/dist/collection/utils/interfaces.ts +2 -0
- package/dist/components/action-bar.js +1 -0
- package/dist/components/action-group.js +1 -0
- package/dist/components/action-menu.js +1 -0
- package/dist/components/action.js +1 -0
- package/dist/components/alert.js +1 -0
- package/dist/components/avatar.js +1 -0
- package/dist/components/basemap-gallery.d.ts +11 -0
- package/dist/components/basemap-gallery.js +11 -0
- package/dist/components/basemap-gallery2.js +118 -0
- package/dist/components/buffer-tools2.js +1 -0
- package/dist/components/button.js +1 -0
- package/dist/components/calcite-accordion-item.js +1 -0
- package/dist/components/calcite-accordion.js +1 -0
- package/dist/components/calcite-action-pad.js +1 -0
- package/dist/components/calcite-block-section.js +1 -0
- package/dist/components/calcite-block.js +1 -0
- package/dist/components/calcite-card.js +1 -0
- package/dist/components/calcite-chip-group.js +1 -0
- package/dist/components/calcite-color-picker.js +1 -0
- package/dist/components/calcite-combobox-item-group.js +1 -0
- package/dist/components/calcite-fab.js +1 -0
- package/dist/components/calcite-flow-item.js +1 -0
- package/dist/components/calcite-flow.js +1 -0
- package/dist/components/calcite-inline-editable.js +1 -0
- package/dist/components/calcite-input-date-picker.js +1 -0
- package/dist/components/calcite-input-time-picker.js +1 -0
- package/dist/components/calcite-input-time-zone.js +1 -0
- package/dist/components/calcite-list-item-group.js +1 -0
- package/dist/components/calcite-menu-item.js +1 -0
- package/dist/components/calcite-modal.js +1 -0
- package/dist/components/calcite-navigation-logo.js +1 -0
- package/dist/components/calcite-navigation-user.js +1 -0
- package/dist/components/calcite-navigation.js +1 -0
- package/dist/components/calcite-option-group.js +1 -0
- package/dist/components/calcite-pagination.js +1 -0
- package/dist/components/calcite-pick-list-group.js +1 -0
- package/dist/components/calcite-pick-list.js +1 -0
- package/dist/components/calcite-radio-button-group.js +1 -0
- package/dist/components/calcite-radio-button.js +1 -0
- package/dist/components/calcite-rating.js +1 -0
- package/dist/components/calcite-shell-center-row.js +1 -0
- package/dist/components/calcite-sortable-list.js +1 -0
- package/dist/components/calcite-split-button.js +1 -0
- package/dist/components/calcite-stepper-item.js +1 -0
- package/dist/components/calcite-stepper.js +1 -0
- package/dist/components/calcite-text-area.js +1 -0
- package/dist/components/calcite-tile-select-group.js +1 -0
- package/dist/components/calcite-tile-select.js +1 -0
- package/dist/components/calcite-tip-group.js +1 -0
- package/dist/components/calcite-tip-manager.js +1 -0
- package/dist/components/calcite-tip.js +1 -0
- package/dist/components/card-manager2.js +1 -0
- package/dist/components/checkbox.js +1 -0
- package/dist/components/chip.js +1 -0
- package/dist/components/color-picker-hex-input.js +1 -0
- package/dist/components/color-picker-swatch.js +1 -0
- package/dist/components/combobox-item.js +1 -0
- package/dist/components/combobox.js +1 -0
- package/dist/components/crowdsource-manager.js +95 -78
- package/dist/components/crowdsource-reporter.js +1 -0
- package/dist/components/date-picker-day.js +1 -0
- package/dist/components/date-picker-month-header.js +1 -0
- package/dist/components/date-picker-month.js +1 -0
- package/dist/components/date-picker.js +1 -0
- package/dist/components/deduct-calculator2.js +1 -0
- package/dist/components/dropdown-group.js +1 -0
- package/dist/components/dropdown-item.js +1 -0
- package/dist/components/dropdown.js +1 -0
- package/dist/components/edit-card2.js +1 -0
- package/dist/components/esri-loader.js +301 -0
- package/dist/components/filter2.js +1 -0
- package/dist/components/graph.js +1 -0
- package/dist/components/handle.js +1 -0
- package/dist/components/icon.js +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/info-card2.js +1 -0
- package/dist/components/input-message.js +1 -0
- package/dist/components/input-number.js +1 -0
- package/dist/components/input-text.js +1 -0
- package/dist/components/input.js +1 -0
- package/dist/components/json-editor2.js +1 -0
- package/dist/components/label2.js +1 -0
- package/dist/components/layer-table2.js +83 -31
- package/dist/components/layout-manager2.js +1 -0
- package/dist/components/link.js +1 -0
- package/dist/components/list-item.js +1 -0
- package/dist/components/list-item2.js +1 -0
- package/dist/components/list.js +1 -0
- package/dist/components/loadModules.js +1 -1
- package/dist/components/loader.js +1 -0
- package/dist/components/locale.js +2 -295
- package/dist/components/map-card2.js +61 -42
- package/dist/components/map-draw-tools2.js +1 -0
- package/dist/components/map-layer-picker2.js +1 -0
- package/dist/components/map-picker2.js +1 -0
- package/dist/components/map-search.d.ts +11 -0
- package/dist/components/map-search.js +11 -0
- package/dist/components/map-search2.js +201 -0
- package/dist/components/map-select-tools2.js +1 -0
- package/dist/components/map-tools2.js +141 -30
- package/dist/components/menu.js +1 -0
- package/dist/components/notice.js +1 -0
- package/dist/components/option.js +1 -0
- package/dist/components/panel.js +1 -0
- package/dist/components/pci-calculator.js +1 -0
- package/dist/components/pdf-download2.js +1 -0
- package/dist/components/pick-list-item.js +1 -0
- package/dist/components/popover.js +1 -0
- package/dist/components/progress.js +1 -0
- package/dist/components/public-notification.js +1 -0
- package/dist/components/refine-selection2.js +1 -0
- package/dist/components/scrim.js +1 -0
- package/dist/components/segmented-control-item.js +1 -0
- package/dist/components/segmented-control.js +1 -0
- package/dist/components/select.js +1 -0
- package/dist/components/shell-panel.js +1 -0
- package/dist/components/shell.js +1 -0
- package/dist/components/slider.js +1 -0
- package/dist/components/solution-configuration.js +1 -0
- package/dist/components/solution-contents2.js +1 -0
- package/dist/components/solution-item-details2.js +1 -0
- package/dist/components/solution-item-icon2.js +1 -0
- package/dist/components/solution-item-sharing2.js +1 -0
- package/dist/components/solution-item2.js +1 -0
- package/dist/components/solution-organization-variables2.js +1 -0
- package/dist/components/solution-resource-item2.js +1 -0
- package/dist/components/solution-spatial-ref2.js +1 -0
- package/dist/components/solution-template-data2.js +1 -0
- package/dist/components/solution-variables2.js +1 -0
- package/dist/components/stack.js +1 -0
- package/dist/components/store-manager.js +1 -0
- package/dist/components/switch.js +1 -0
- package/dist/components/tab-nav.js +1 -0
- package/dist/components/tab-title.js +1 -0
- package/dist/components/tab.js +1 -0
- package/dist/components/tabs.js +1 -0
- package/dist/components/tile.js +1 -0
- package/dist/components/time-picker.js +1 -0
- package/dist/components/tooltip.js +1 -0
- package/dist/components/tree-item.js +1 -0
- package/dist/components/tree.js +1 -0
- package/dist/components/value-list-item.js +1 -0
- package/dist/components/value-list.js +1 -0
- package/dist/esm/basemap-gallery_4.entry.js +615 -0
- package/dist/esm/card-manager_4.entry.js +91 -37
- package/dist/esm/crowdsource-manager.entry.js +4 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/solutions-components.js +2 -2
- package/dist/solutions-components/demos/crowdsource-manager.html +3 -3
- package/dist/solutions-components/p-55aefaa8.entry.js +6 -0
- package/dist/solutions-components/p-5b5a6ac8.entry.js +6 -0
- package/dist/solutions-components/p-a6c85bd7.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +2 -0
- package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +64 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
- package/dist/types/components/layer-table/layer-table.d.ts +24 -2
- package/dist/types/components/map-card/map-card.d.ts +10 -2
- package/dist/types/components/map-search/map-search.d.ts +107 -0
- package/dist/types/components/map-tools/map-tools.d.ts +68 -5
- package/dist/types/components.d.ts +122 -0
- package/dist/types/preact.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +2 -0
- package/dist/types/utils/interfaces.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/map-picker_2.cjs.entry.js +0 -264
- package/dist/esm/map-picker_2.entry.js +0 -259
- package/dist/solutions-components/p-1990d9c8.entry.js +0 -6
- package/dist/solutions-components/p-40bde8b2.entry.js +0 -6
- package/dist/solutions-components/p-b921aa1a.entry.js +0 -6
@@ -3,302 +3,9 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import
|
6
|
+
import './esri-loader.js';
|
7
7
|
import { getAssetPath } from '@stencil/core/internal/client';
|
8
8
|
|
9
|
-
var esriLoader = createCommonjsModule(function (module, exports) {
|
10
|
-
(function (global, factory) {
|
11
|
-
factory(exports) ;
|
12
|
-
}(commonjsGlobal, (function (exports) {
|
13
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
14
|
-
* Apache-2.0 */
|
15
|
-
var isBrowser = typeof window !== 'undefined';
|
16
|
-
// allow consuming libraries to provide their own Promise implementations
|
17
|
-
var utils = {
|
18
|
-
Promise: isBrowser ? window['Promise'] : undefined
|
19
|
-
};
|
20
|
-
|
21
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
22
|
-
* Apache-2.0 */
|
23
|
-
var DEFAULT_VERSION = '4.22';
|
24
|
-
var NEXT = 'next';
|
25
|
-
function parseVersion(version) {
|
26
|
-
if (version.toLowerCase() === NEXT) {
|
27
|
-
return NEXT;
|
28
|
-
}
|
29
|
-
var match = version && version.match(/^(\d)\.(\d+)/);
|
30
|
-
return match && {
|
31
|
-
major: parseInt(match[1], 10),
|
32
|
-
minor: parseInt(match[2], 10)
|
33
|
-
};
|
34
|
-
}
|
35
|
-
/**
|
36
|
-
* Get the CDN url for a given version
|
37
|
-
*
|
38
|
-
* @param version Ex: '4.22' or '3.39'. Defaults to the latest 4.x version.
|
39
|
-
*/
|
40
|
-
function getCdnUrl(version) {
|
41
|
-
if (version === void 0) { version = DEFAULT_VERSION; }
|
42
|
-
return "https://js.arcgis.com/" + version + "/";
|
43
|
-
}
|
44
|
-
/**
|
45
|
-
* Get the CDN url for a the CSS for a given version and/or theme
|
46
|
-
*
|
47
|
-
* @param version Ex: '4.22', '3.39', or 'next'. Defaults to the latest 4.x version.
|
48
|
-
*/
|
49
|
-
function getCdnCssUrl(version) {
|
50
|
-
if (version === void 0) { version = DEFAULT_VERSION; }
|
51
|
-
var baseUrl = getCdnUrl(version);
|
52
|
-
var parsedVersion = parseVersion(version);
|
53
|
-
if (parsedVersion !== NEXT && parsedVersion.major === 3) {
|
54
|
-
// NOTE: at 3.11 the CSS moved from the /js folder to the root
|
55
|
-
var path = parsedVersion.minor <= 10 ? 'js/' : '';
|
56
|
-
return "" + baseUrl + path + "esri/css/esri.css";
|
57
|
-
}
|
58
|
-
else {
|
59
|
-
// assume 4.x
|
60
|
-
return baseUrl + "esri/themes/light/main.css";
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
65
|
-
* Apache-2.0 */
|
66
|
-
function createStylesheetLink(href) {
|
67
|
-
var link = document.createElement('link');
|
68
|
-
link.rel = 'stylesheet';
|
69
|
-
link.href = href;
|
70
|
-
return link;
|
71
|
-
}
|
72
|
-
function insertLink(link, before) {
|
73
|
-
if (before) {
|
74
|
-
// the link should be inserted before a specific node
|
75
|
-
var beforeNode = document.querySelector(before);
|
76
|
-
beforeNode.parentNode.insertBefore(link, beforeNode);
|
77
|
-
}
|
78
|
-
else {
|
79
|
-
// append the link to then end of the head tag
|
80
|
-
document.head.appendChild(link);
|
81
|
-
}
|
82
|
-
}
|
83
|
-
// check if the css url has been injected or added manually
|
84
|
-
function getCss(url) {
|
85
|
-
return document.querySelector("link[href*=\"" + url + "\"]");
|
86
|
-
}
|
87
|
-
function getCssUrl(urlOrVersion) {
|
88
|
-
return !urlOrVersion || parseVersion(urlOrVersion)
|
89
|
-
// if it's a valid version string return the CDN URL
|
90
|
-
? getCdnCssUrl(urlOrVersion)
|
91
|
-
// otherwise assume it's a URL and return that
|
92
|
-
: urlOrVersion;
|
93
|
-
}
|
94
|
-
// lazy load the CSS needed for the ArcGIS API
|
95
|
-
function loadCss(urlOrVersion, before) {
|
96
|
-
var url = getCssUrl(urlOrVersion);
|
97
|
-
var link = getCss(url);
|
98
|
-
if (!link) {
|
99
|
-
// create & load the css link
|
100
|
-
link = createStylesheetLink(url);
|
101
|
-
insertLink(link, before);
|
102
|
-
}
|
103
|
-
return link;
|
104
|
-
}
|
105
|
-
|
106
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
107
|
-
* Apache-2.0 */
|
108
|
-
var defaultOptions = {};
|
109
|
-
function createScript(url) {
|
110
|
-
var script = document.createElement('script');
|
111
|
-
script.type = 'text/javascript';
|
112
|
-
script.src = url;
|
113
|
-
script.setAttribute('data-esri-loader', 'loading');
|
114
|
-
return script;
|
115
|
-
}
|
116
|
-
// add a one-time load handler to script
|
117
|
-
// and optionally add a one time error handler as well
|
118
|
-
function handleScriptLoad(script, callback, errback) {
|
119
|
-
var onScriptError;
|
120
|
-
if (errback) {
|
121
|
-
// set up an error handler as well
|
122
|
-
onScriptError = handleScriptError(script, errback);
|
123
|
-
}
|
124
|
-
var onScriptLoad = function () {
|
125
|
-
// pass the script to the callback
|
126
|
-
callback(script);
|
127
|
-
// remove this event listener
|
128
|
-
script.removeEventListener('load', onScriptLoad, false);
|
129
|
-
if (onScriptError) {
|
130
|
-
// remove the error listener as well
|
131
|
-
script.removeEventListener('error', onScriptError, false);
|
132
|
-
}
|
133
|
-
};
|
134
|
-
script.addEventListener('load', onScriptLoad, false);
|
135
|
-
}
|
136
|
-
// add a one-time error handler to the script
|
137
|
-
function handleScriptError(script, callback) {
|
138
|
-
var onScriptError = function (e) {
|
139
|
-
// reject the promise and remove this event listener
|
140
|
-
callback(e.error || new Error("There was an error attempting to load " + script.src));
|
141
|
-
// remove this event listener
|
142
|
-
script.removeEventListener('error', onScriptError, false);
|
143
|
-
};
|
144
|
-
script.addEventListener('error', onScriptError, false);
|
145
|
-
return onScriptError;
|
146
|
-
}
|
147
|
-
// allow the user to configure default script options rather than passing options to `loadModules` each time
|
148
|
-
function setDefaultOptions(options) {
|
149
|
-
if (options === void 0) { options = {}; }
|
150
|
-
defaultOptions = options;
|
151
|
-
}
|
152
|
-
// get the script injected by this library
|
153
|
-
function getScript() {
|
154
|
-
return document.querySelector('script[data-esri-loader]');
|
155
|
-
}
|
156
|
-
// has ArcGIS API been loaded on the page yet?
|
157
|
-
function isLoaded() {
|
158
|
-
var globalRequire = window['require'];
|
159
|
-
// .on() ensures that it's Dojo's AMD loader
|
160
|
-
return globalRequire && globalRequire.on;
|
161
|
-
}
|
162
|
-
// load the ArcGIS API on the page
|
163
|
-
function loadScript(options) {
|
164
|
-
if (options === void 0) { options = {}; }
|
165
|
-
// we would have liked to use spread like { ...defaultOptions, ...options }
|
166
|
-
// but TS would inject a polyfill that would require use to configure rollup w content: 'window'
|
167
|
-
// if we have another occasion to use spread, let's do that and replace this for...in
|
168
|
-
var opts = {};
|
169
|
-
[defaultOptions, options].forEach(function (obj) {
|
170
|
-
for (var prop in obj) {
|
171
|
-
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
172
|
-
opts[prop] = obj[prop];
|
173
|
-
}
|
174
|
-
}
|
175
|
-
});
|
176
|
-
// URL to load
|
177
|
-
var version = opts.version;
|
178
|
-
var url = opts.url || getCdnUrl(version);
|
179
|
-
return new utils.Promise(function (resolve, reject) {
|
180
|
-
var script = getScript();
|
181
|
-
if (script) {
|
182
|
-
// the API is already loaded or in the process of loading...
|
183
|
-
// NOTE: have to test against scr attribute value, not script.src
|
184
|
-
// b/c the latter will return the full url for relative paths
|
185
|
-
var src = script.getAttribute('src');
|
186
|
-
if (src !== url) {
|
187
|
-
// potentially trying to load a different version of the API
|
188
|
-
reject(new Error("The ArcGIS API for JavaScript is already loaded (" + src + ")."));
|
189
|
-
}
|
190
|
-
else {
|
191
|
-
if (isLoaded()) {
|
192
|
-
// the script has already successfully loaded
|
193
|
-
resolve(script);
|
194
|
-
}
|
195
|
-
else {
|
196
|
-
// wait for the script to load and then resolve
|
197
|
-
handleScriptLoad(script, resolve, reject);
|
198
|
-
}
|
199
|
-
}
|
200
|
-
}
|
201
|
-
else {
|
202
|
-
if (isLoaded()) {
|
203
|
-
// the API has been loaded by some other means
|
204
|
-
// potentially trying to load a different version of the API
|
205
|
-
reject(new Error("The ArcGIS API for JavaScript is already loaded."));
|
206
|
-
}
|
207
|
-
else {
|
208
|
-
// this is the first time attempting to load the API
|
209
|
-
var css = opts.css;
|
210
|
-
if (css) {
|
211
|
-
var useVersion = css === true;
|
212
|
-
// load the css before loading the script
|
213
|
-
loadCss(useVersion ? version : css, opts.insertCssBefore);
|
214
|
-
}
|
215
|
-
// create a script object whose source points to the API
|
216
|
-
script = createScript(url);
|
217
|
-
// _currentUrl = url;
|
218
|
-
// once the script is loaded...
|
219
|
-
handleScriptLoad(script, function () {
|
220
|
-
// update the status of the script
|
221
|
-
script.setAttribute('data-esri-loader', 'loaded');
|
222
|
-
// return the script
|
223
|
-
resolve(script);
|
224
|
-
}, reject);
|
225
|
-
// load the script
|
226
|
-
document.body.appendChild(script);
|
227
|
-
}
|
228
|
-
}
|
229
|
-
});
|
230
|
-
}
|
231
|
-
|
232
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
233
|
-
* Apache-2.0 */
|
234
|
-
// wrap Dojo's require() in a promise
|
235
|
-
function requireModules(modules) {
|
236
|
-
return new utils.Promise(function (resolve, reject) {
|
237
|
-
// If something goes wrong loading the esri/dojo scripts, reject with the error.
|
238
|
-
var errorHandler = window['require'].on('error', reject);
|
239
|
-
window['require'](modules, function () {
|
240
|
-
var args = [];
|
241
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
242
|
-
args[_i] = arguments[_i];
|
243
|
-
}
|
244
|
-
// remove error handler
|
245
|
-
errorHandler.remove();
|
246
|
-
// Resolve with the parameters from dojo require as an array.
|
247
|
-
resolve(args);
|
248
|
-
});
|
249
|
-
});
|
250
|
-
}
|
251
|
-
// returns a promise that resolves with an array of the required modules
|
252
|
-
// also will attempt to lazy load the ArcGIS API if it has not already been loaded
|
253
|
-
function loadModules(modules, loadScriptOptions) {
|
254
|
-
if (loadScriptOptions === void 0) { loadScriptOptions = {}; }
|
255
|
-
if (!isLoaded()) {
|
256
|
-
// script is not yet loaded, is it in the process of loading?
|
257
|
-
var script = getScript();
|
258
|
-
var src = script && script.getAttribute('src');
|
259
|
-
if (!loadScriptOptions.url && src) {
|
260
|
-
// script is still loading and user did not specify a URL
|
261
|
-
// in this case we want to default to the URL that's being loaded
|
262
|
-
// instead of defaulting to the latest 4.x URL
|
263
|
-
loadScriptOptions.url = src;
|
264
|
-
}
|
265
|
-
// attempt to load the script then load the modules
|
266
|
-
return loadScript(loadScriptOptions).then(function () { return requireModules(modules); });
|
267
|
-
}
|
268
|
-
else {
|
269
|
-
// script is already loaded, just load the modules
|
270
|
-
return requireModules(modules);
|
271
|
-
}
|
272
|
-
}
|
273
|
-
|
274
|
-
/*
|
275
|
-
Copyright (c) 2017 Esri
|
276
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
277
|
-
you may not use this file except in compliance with the License.
|
278
|
-
You may obtain a copy of the License at
|
279
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
280
|
-
Unless required by applicable law or agreed to in writing, software
|
281
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
282
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
283
|
-
See the License for the specific language governing permissions and
|
284
|
-
limitations under the License.
|
285
|
-
*/
|
286
|
-
// re-export the functions that are part of the public API
|
287
|
-
|
288
|
-
exports.utils = utils;
|
289
|
-
exports.loadModules = loadModules;
|
290
|
-
exports.getScript = getScript;
|
291
|
-
exports.isLoaded = isLoaded;
|
292
|
-
exports.loadScript = loadScript;
|
293
|
-
exports.setDefaultOptions = setDefaultOptions;
|
294
|
-
exports.loadCss = loadCss;
|
295
|
-
|
296
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
297
|
-
|
298
|
-
})));
|
299
|
-
//# sourceMappingURL=esri-loader.js.map
|
300
|
-
});
|
301
|
-
|
302
9
|
/*
|
303
10
|
* Copyright (c) 2022 Esri
|
304
11
|
* All rights reserved.
|
@@ -409,4 +116,4 @@ async function getLocaleComponentStrings(element) {
|
|
409
116
|
return [strings, componentLanguage];
|
410
117
|
}
|
411
118
|
|
412
|
-
export { getComponentClosestLanguage as a,
|
119
|
+
export { getComponentClosestLanguage as a, getLocaleComponentStrings as g };
|
@@ -5,27 +5,29 @@
|
|
5
5
|
*/
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
8
|
-
import { d as defineCustomElement$
|
9
|
-
import { d as defineCustomElement$
|
10
|
-
import { d as defineCustomElement$
|
11
|
-
import { d as defineCustomElement$
|
12
|
-
import { d as defineCustomElement$
|
13
|
-
import { d as defineCustomElement$
|
14
|
-
import { d as defineCustomElement$
|
15
|
-
import { d as defineCustomElement$
|
16
|
-
import { d as defineCustomElement$
|
17
|
-
import { d as defineCustomElement$
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$
|
21
|
-
import { d as defineCustomElement$
|
22
|
-
import { d as defineCustomElement$
|
23
|
-
import { d as defineCustomElement$
|
24
|
-
import { d as defineCustomElement$
|
25
|
-
import { d as defineCustomElement$
|
8
|
+
import { d as defineCustomElement$l } from './basemap-gallery2.js';
|
9
|
+
import { d as defineCustomElement$k } from './action.js';
|
10
|
+
import { d as defineCustomElement$j } from './action-bar.js';
|
11
|
+
import { d as defineCustomElement$i } from './action-group.js';
|
12
|
+
import { d as defineCustomElement$h } from './action-menu.js';
|
13
|
+
import { d as defineCustomElement$g } from './button.js';
|
14
|
+
import { d as defineCustomElement$f } from './filter2.js';
|
15
|
+
import { d as defineCustomElement$e } from './handle.js';
|
16
|
+
import { d as defineCustomElement$d } from './icon.js';
|
17
|
+
import { d as defineCustomElement$c } from './input.js';
|
18
|
+
import { d as defineCustomElement$b } from './list.js';
|
19
|
+
import { d as defineCustomElement$a } from './list-item2.js';
|
20
|
+
import { d as defineCustomElement$9 } from './loader.js';
|
21
|
+
import { d as defineCustomElement$8 } from './popover.js';
|
22
|
+
import { d as defineCustomElement$7 } from './progress.js';
|
23
|
+
import { d as defineCustomElement$6 } from './scrim.js';
|
24
|
+
import { d as defineCustomElement$5 } from './stack.js';
|
25
|
+
import { d as defineCustomElement$4 } from './tooltip.js';
|
26
|
+
import { d as defineCustomElement$3 } from './map-picker2.js';
|
27
|
+
import { d as defineCustomElement$2 } from './map-search2.js';
|
26
28
|
import { d as defineCustomElement$1 } from './map-tools2.js';
|
27
29
|
|
28
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}.esri-zoom{display:none !important}
|
30
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}.esri-zoom{display:none !important}";
|
29
31
|
|
30
32
|
const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLElement {
|
31
33
|
constructor() {
|
@@ -38,13 +40,14 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
38
40
|
this._loadedId = "";
|
39
41
|
this.mapInfos = [];
|
40
42
|
this.mapView = undefined;
|
43
|
+
this._searchConfiguration = undefined;
|
41
44
|
this._webMapInfo = undefined;
|
42
45
|
}
|
43
46
|
/**
|
44
47
|
* Listen for changes to map info and load the appropriate map
|
45
48
|
*/
|
46
49
|
async mapInfoChange(evt) {
|
47
|
-
this._loadMap(evt.detail);
|
50
|
+
await this._loadMap(evt.detail);
|
48
51
|
}
|
49
52
|
//--------------------------------------------------------------------------
|
50
53
|
//
|
@@ -61,7 +64,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
61
64
|
* Renders the component.
|
62
65
|
*/
|
63
66
|
render() {
|
64
|
-
return (h(Host, null, h("map-picker", { mapInfos: this.mapInfos }), h("div", { class: "map-height", ref: (el) => (this._mapDiv = el) }), h("map-tools", {
|
67
|
+
return (h(Host, null, h("map-picker", { mapInfos: this.mapInfos }), h("div", { class: "map-height", ref: (el) => (this._mapDiv = el) }), h("map-tools", { mapView: this.mapView, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration })));
|
65
68
|
}
|
66
69
|
//--------------------------------------------------------------------------
|
67
70
|
//
|
@@ -92,7 +95,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
92
95
|
*
|
93
96
|
* @protected
|
94
97
|
*/
|
95
|
-
_loadMap(webMapInfo) {
|
98
|
+
async _loadMap(webMapInfo) {
|
96
99
|
let id = webMapInfo === null || webMapInfo === void 0 ? void 0 : webMapInfo.id;
|
97
100
|
// on the first render use the first child of the provided mapInfos
|
98
101
|
this._webMapInfo = (id === "" || !id) && this.mapInfos.length > 0 ?
|
@@ -107,8 +110,12 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
107
110
|
map: webMap,
|
108
111
|
resizeAlign: "top-left"
|
109
112
|
});
|
110
|
-
this.
|
111
|
-
|
113
|
+
await this.mapView.when(() => {
|
114
|
+
this._loadedId = id;
|
115
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
116
|
+
this.mapChanged.emit(this.mapView);
|
117
|
+
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
118
|
+
});
|
112
119
|
}
|
113
120
|
}
|
114
121
|
get el() { return this; }
|
@@ -116,105 +123,116 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
116
123
|
}, [0, "map-card", {
|
117
124
|
"mapInfos": [16],
|
118
125
|
"mapView": [16],
|
126
|
+
"_searchConfiguration": [32],
|
119
127
|
"_webMapInfo": [32]
|
120
128
|
}, [[8, "mapInfoChange", "mapInfoChange"]]]);
|
121
129
|
function defineCustomElement() {
|
122
130
|
if (typeof customElements === "undefined") {
|
123
131
|
return;
|
124
132
|
}
|
125
|
-
const components = ["map-card", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-filter", "calcite-handle", "calcite-icon", "calcite-input", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-popover", "calcite-progress", "calcite-scrim", "calcite-stack", "calcite-tooltip", "map-picker", "map-tools"];
|
133
|
+
const components = ["map-card", "basemap-gallery", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-filter", "calcite-handle", "calcite-icon", "calcite-input", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-popover", "calcite-progress", "calcite-scrim", "calcite-stack", "calcite-tooltip", "map-picker", "map-search", "map-tools"];
|
126
134
|
components.forEach(tagName => { switch (tagName) {
|
127
135
|
case "map-card":
|
128
136
|
if (!customElements.get(tagName)) {
|
129
137
|
customElements.define(tagName, MapCard);
|
130
138
|
}
|
131
139
|
break;
|
140
|
+
case "basemap-gallery":
|
141
|
+
if (!customElements.get(tagName)) {
|
142
|
+
defineCustomElement$l();
|
143
|
+
}
|
144
|
+
break;
|
132
145
|
case "calcite-action":
|
133
146
|
if (!customElements.get(tagName)) {
|
134
|
-
defineCustomElement$
|
147
|
+
defineCustomElement$k();
|
135
148
|
}
|
136
149
|
break;
|
137
150
|
case "calcite-action-bar":
|
138
151
|
if (!customElements.get(tagName)) {
|
139
|
-
defineCustomElement$
|
152
|
+
defineCustomElement$j();
|
140
153
|
}
|
141
154
|
break;
|
142
155
|
case "calcite-action-group":
|
143
156
|
if (!customElements.get(tagName)) {
|
144
|
-
defineCustomElement$
|
157
|
+
defineCustomElement$i();
|
145
158
|
}
|
146
159
|
break;
|
147
160
|
case "calcite-action-menu":
|
148
161
|
if (!customElements.get(tagName)) {
|
149
|
-
defineCustomElement$
|
162
|
+
defineCustomElement$h();
|
150
163
|
}
|
151
164
|
break;
|
152
165
|
case "calcite-button":
|
153
166
|
if (!customElements.get(tagName)) {
|
154
|
-
defineCustomElement$
|
167
|
+
defineCustomElement$g();
|
155
168
|
}
|
156
169
|
break;
|
157
170
|
case "calcite-filter":
|
158
171
|
if (!customElements.get(tagName)) {
|
159
|
-
defineCustomElement$
|
172
|
+
defineCustomElement$f();
|
160
173
|
}
|
161
174
|
break;
|
162
175
|
case "calcite-handle":
|
163
176
|
if (!customElements.get(tagName)) {
|
164
|
-
defineCustomElement$
|
177
|
+
defineCustomElement$e();
|
165
178
|
}
|
166
179
|
break;
|
167
180
|
case "calcite-icon":
|
168
181
|
if (!customElements.get(tagName)) {
|
169
|
-
defineCustomElement$
|
182
|
+
defineCustomElement$d();
|
170
183
|
}
|
171
184
|
break;
|
172
185
|
case "calcite-input":
|
173
186
|
if (!customElements.get(tagName)) {
|
174
|
-
defineCustomElement$
|
187
|
+
defineCustomElement$c();
|
175
188
|
}
|
176
189
|
break;
|
177
190
|
case "calcite-list":
|
178
191
|
if (!customElements.get(tagName)) {
|
179
|
-
defineCustomElement$
|
192
|
+
defineCustomElement$b();
|
180
193
|
}
|
181
194
|
break;
|
182
195
|
case "calcite-list-item":
|
183
196
|
if (!customElements.get(tagName)) {
|
184
|
-
defineCustomElement$
|
197
|
+
defineCustomElement$a();
|
185
198
|
}
|
186
199
|
break;
|
187
200
|
case "calcite-loader":
|
188
201
|
if (!customElements.get(tagName)) {
|
189
|
-
defineCustomElement$
|
202
|
+
defineCustomElement$9();
|
190
203
|
}
|
191
204
|
break;
|
192
205
|
case "calcite-popover":
|
193
206
|
if (!customElements.get(tagName)) {
|
194
|
-
defineCustomElement$
|
207
|
+
defineCustomElement$8();
|
195
208
|
}
|
196
209
|
break;
|
197
210
|
case "calcite-progress":
|
198
211
|
if (!customElements.get(tagName)) {
|
199
|
-
defineCustomElement$
|
212
|
+
defineCustomElement$7();
|
200
213
|
}
|
201
214
|
break;
|
202
215
|
case "calcite-scrim":
|
203
216
|
if (!customElements.get(tagName)) {
|
204
|
-
defineCustomElement$
|
217
|
+
defineCustomElement$6();
|
205
218
|
}
|
206
219
|
break;
|
207
220
|
case "calcite-stack":
|
208
221
|
if (!customElements.get(tagName)) {
|
209
|
-
defineCustomElement$
|
222
|
+
defineCustomElement$5();
|
210
223
|
}
|
211
224
|
break;
|
212
225
|
case "calcite-tooltip":
|
213
226
|
if (!customElements.get(tagName)) {
|
214
|
-
defineCustomElement$
|
227
|
+
defineCustomElement$4();
|
215
228
|
}
|
216
229
|
break;
|
217
230
|
case "map-picker":
|
231
|
+
if (!customElements.get(tagName)) {
|
232
|
+
defineCustomElement$3();
|
233
|
+
}
|
234
|
+
break;
|
235
|
+
case "map-search":
|
218
236
|
if (!customElements.get(tagName)) {
|
219
237
|
defineCustomElement$2();
|
220
238
|
}
|
@@ -226,5 +244,6 @@ function defineCustomElement() {
|
|
226
244
|
break;
|
227
245
|
} });
|
228
246
|
}
|
247
|
+
defineCustomElement();
|
229
248
|
|
230
249
|
export { MapCard as M, defineCustomElement as d };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface MapSearch extends Components.MapSearch, HTMLElement {}
|
4
|
+
export const MapSearch: {
|
5
|
+
prototype: MapSearch;
|
6
|
+
new (): MapSearch;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { M as MapSearch$1, d as defineCustomElement$1 } from './map-search2.js';
|
7
|
+
|
8
|
+
const MapSearch = MapSearch$1;
|
9
|
+
const defineCustomElement = defineCustomElement$1;
|
10
|
+
|
11
|
+
export { MapSearch, defineCustomElement };
|