@arcgis/coding-components 4.30.0-next.62 → 4.30.0-next.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +2 -4
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-c51ea67a.js → p-12896101.js} +2 -2
- package/dist/arcgis-coding-components/{p-981cd353.js → p-3d8318d7.js} +1 -1
- package/dist/arcgis-coding-components/{p-3b6e229e.entry.js → p-572e3764.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-318fb418.js → p-57930dd8.js} +3 -3
- package/dist/arcgis-coding-components/{p-4823505e.js → p-5d07205f.js} +10 -10
- package/dist/arcgis-coding-components/{p-92bd8457.js → p-613a1d1a.js} +2 -2
- package/dist/arcgis-coding-components/{p-cd56cf49.js → p-626bc8f0.js} +2 -2
- package/dist/arcgis-coding-components/{p-38edc354.js → p-6a9d4b9b.js} +1 -1
- package/dist/arcgis-coding-components/{p-705469d1.js → p-8522d273.js} +2 -2
- package/dist/arcgis-coding-components/{p-f661a8d3.js → p-c2df69a6.js} +2 -2
- package/dist/arcgis-coding-components/{p-cfc6adab.js → p-cda742f8.js} +2 -2
- package/dist/arcgis-coding-components/{p-c0ae53b1.js → p-d72d1cd1.js} +2 -2
- package/dist/cjs/{arcade-defaults-5c1c0ecb.js → arcade-defaults-fa164cfd.js} +28 -28
- package/dist/cjs/{arcade-mode-6fa9d9f6.js → arcade-mode-fc196676.js} +3 -3
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
- package/dist/cjs/{css-0dd4f61e.js → css-c8cdfb9d.js} +1 -1
- package/dist/cjs/{cssMode-b840c8b5.js → cssMode-64a062b2.js} +3 -3
- package/dist/cjs/{html-009b9fcc.js → html-9f9adab2.js} +3 -3
- package/dist/cjs/{htmlMode-7acf57eb.js → htmlMode-fcfd6194.js} +3 -3
- package/dist/cjs/{index-1e515ac1.js → index-41fb25c0.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-e87b1198.js → javascript-4d91b2f1.js} +4 -4
- package/dist/cjs/{jsonMode-3be3c50a.js → jsonMode-59b3cd13.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tsMode-c2c38c3a.js → tsMode-e0af9a99.js} +3 -3
- package/dist/cjs/{typescript-ebffaab1.js → typescript-0918cbbf.js} +3 -3
- package/dist/components/arcade-api.js +1 -1
- package/dist/components/arcade-contribution.js +2 -2
- package/dist/components/arcade-defaults.js +16 -20
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcade-variables.js +1 -1
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/chunk-A2KF2X73.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +6 -2
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{arcade-defaults-ac123ced.js → arcade-defaults-b09ed410.js} +28 -28
- package/dist/esm/{arcade-mode-957a60b5.js → arcade-mode-4f5c97fa.js} +3 -3
- package/dist/esm/arcgis-arcade-api_6.entry.js +4 -4
- package/dist/esm/arcgis-coding-components.js +3 -3
- package/dist/esm/{css-9f99ae66.js → css-f175069e.js} +1 -1
- package/dist/esm/{cssMode-b89fc46f.js → cssMode-0996f9a7.js} +3 -3
- package/dist/esm/{html-645adbbc.js → html-89c183e8.js} +3 -3
- package/dist/esm/{htmlMode-fc416dae.js → htmlMode-d1e2fa18.js} +3 -3
- package/dist/esm/{index-d4c5ac07.js → index-eb5e73d7.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-830b5438.js → javascript-f811eea7.js} +4 -4
- package/dist/esm/{jsonMode-aed4f2cc.js → jsonMode-3266841c.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{tsMode-4b3dff8e.js → tsMode-8dc2659e.js} +3 -3
- package/dist/esm/{typescript-1ea81da5.js → typescript-b4c0b590.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
- package/dist/types/utils/profile/utils.d.ts +0 -1
- package/package.json +9 -10
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -0
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { Emitter, Uri } from 'monaco-editor';
|
|
7
7
|
import { InsertTextMode, InsertTextFormat, CompletionItemKind } from 'vscode-languageserver-types';
|
|
8
|
-
import {
|
|
8
|
+
import { n as newLayersFeatureLayer, i as importRequest, s as supportedFields, a as newPortalPortalItem, b as newWebScene, c as newWebMap, f as fieldAlias, d as fieldTypeToIconName, e as fieldTypeToArcadeType } from './fields.js';
|
|
9
9
|
import { p as portalItemPageUrl } from './utilities.js';
|
|
10
10
|
import { i as isNotNull, a as isNotUndefined, b as addLTRMark, s as setValuesInString, c as supportedLocales, f as fetchT9NStringsBundle } from './index2.js';
|
|
11
11
|
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
12
12
|
|
|
13
|
-
//#region core adapter fix
|
|
14
|
-
async function newFeatureLayer(definition) {
|
|
15
|
-
const FeatureLayer = await importLayersFeatureLayer();
|
|
16
|
-
// Fix title for the layer. Instead of defaulting to the map viewer style.
|
|
17
|
-
return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
13
|
//#region Type Guards
|
|
21
14
|
function isQueryableLayerInstance(item) {
|
|
22
15
|
return (!!item &&
|
|
@@ -147,7 +140,7 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
147
140
|
source = definition;
|
|
148
141
|
}
|
|
149
142
|
else {
|
|
150
|
-
source = await
|
|
143
|
+
source = await newLayersFeatureLayer(definition);
|
|
151
144
|
}
|
|
152
145
|
if (isLoadableSource(source)) {
|
|
153
146
|
await source.load();
|
|
@@ -158,20 +151,20 @@ async function serviceMetaData(url) {
|
|
|
158
151
|
url += "/layers";
|
|
159
152
|
const request = await importRequest();
|
|
160
153
|
const response = await request(url, { responseType: "json", query: { f: "json" } });
|
|
161
|
-
const data = {
|
|
162
|
-
layers: response.data?.layers ?? [],
|
|
163
|
-
tables: response.data?.tables ?? [],
|
|
164
|
-
};
|
|
165
154
|
const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
|
|
166
|
-
const layers = getSupportedLayerInfos(data
|
|
167
|
-
const tables = getSupportedLayerInfos(data
|
|
155
|
+
const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
|
|
156
|
+
const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
|
|
168
157
|
return { layers, tables };
|
|
169
158
|
}
|
|
170
159
|
function getSupportedLayerInfos(layers, queryCapability) {
|
|
160
|
+
if (!layers) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
171
163
|
return layers.filter((layer) => {
|
|
172
164
|
switch (layer.type) {
|
|
173
165
|
case "Feature Layer":
|
|
174
166
|
case "Oriented Imagery Layer":
|
|
167
|
+
case "Catalog Layer":
|
|
175
168
|
case "Table": {
|
|
176
169
|
const capabilities = layer.capabilities
|
|
177
170
|
? layer.capabilities
|
|
@@ -191,7 +184,7 @@ function getSupportedLayerInfos(layers, queryCapability) {
|
|
|
191
184
|
//#endregion
|
|
192
185
|
//#region Support functions
|
|
193
186
|
async function getRelatedFeatureLayer(layer, relationship) {
|
|
194
|
-
const relatedFeatureLayer = await
|
|
187
|
+
const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
|
|
195
188
|
await relatedFeatureLayer.load();
|
|
196
189
|
return relatedFeatureLayer;
|
|
197
190
|
}
|
|
@@ -754,6 +747,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
754
747
|
// Sepcial case for the subtype field
|
|
755
748
|
if (field.name === this._source.subtypeField) {
|
|
756
749
|
const domainDictionary = this._createDomainDictionary(field);
|
|
750
|
+
domainDictionary.icon = "subtype";
|
|
757
751
|
domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
|
|
758
752
|
return domainDictionary;
|
|
759
753
|
}
|
|
@@ -1216,12 +1210,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
1216
1210
|
}
|
|
1217
1211
|
const metadata = await serviceMetaData(processedUrl);
|
|
1218
1212
|
const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
|
|
1219
|
-
const featureLayer = await
|
|
1213
|
+
const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
1220
1214
|
await featureLayer.load();
|
|
1221
1215
|
return this._createFeatureSetVariable(featureLayer);
|
|
1222
1216
|
}));
|
|
1223
1217
|
const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
|
|
1224
|
-
const table = await
|
|
1218
|
+
const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
1225
1219
|
await table.load();
|
|
1226
1220
|
return this._createFeatureSetVariable(table);
|
|
1227
1221
|
}));
|
|
@@ -1251,7 +1245,9 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
1251
1245
|
return new FeatureSetVariable(this, {
|
|
1252
1246
|
profile: this._profile,
|
|
1253
1247
|
declaration: { name: featureLayer.title, definition: featureLayer },
|
|
1254
|
-
label:
|
|
1248
|
+
label: isFromWebMap
|
|
1249
|
+
? featureLayer.title
|
|
1250
|
+
: featureLayer.sourceJSON.name ?? featureLayer.title,
|
|
1255
1251
|
description: "",
|
|
1256
1252
|
nonInteractive: true,
|
|
1257
1253
|
}, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { editor, MarkerSeverity, Range, languages, Emitter } from 'monaco-editor';
|
|
7
7
|
import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat } from 'vscode-languageserver-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as importArcade, s as supportedFields } from './fields.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
|
|
7
7
|
import { u as useControllerManager } from './chunk-A2KF2X73.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { KeyCode } from 'monaco-editor';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeResults$1, d as defineCustomElement$1 } from './arcade-results.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeSuggestions$1, d as defineCustomElement$1 } from './arcade-suggestions.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeVariables$1, d as defineCustomElement$1 } from './arcade-variables.js';
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
5
|
-
* v4.30.0-next.
|
|
5
|
+
* v4.30.0-next.64
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* Get the base path to where the package assets can be found.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
5
|
-
* v4.30.0-next.
|
|
5
|
+
* v4.30.0-next.64
|
|
6
6
|
*/
|
|
7
7
|
let resourceUrl = "https://js.arcgis.com/coding-components/next/";
|
|
8
8
|
export const getArcgisAssetPath = (path) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisCodeEditor$1, d as defineCustomElement$1 } from './code-editor.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { D as Deferred, g as camelToKebab, h as safeCall, j as safeAsyncCall } from './index2.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { Range, editor, Uri, KeyMod, KeyCode } from 'monaco-editor';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
// src/index.ts
|
|
7
7
|
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
@@ -15,6 +15,10 @@ async function importLayersFeatureLayer() {
|
|
|
15
15
|
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
16
16
|
return isDefaultModule(module) ? module.default : module;
|
|
17
17
|
}
|
|
18
|
+
async function newLayersFeatureLayer(properties) {
|
|
19
|
+
const ModConstructor = await importLayersFeatureLayer();
|
|
20
|
+
return new ModConstructor(properties);
|
|
21
|
+
}
|
|
18
22
|
async function importPortalPortalItem() {
|
|
19
23
|
if (isAMD) {
|
|
20
24
|
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
@@ -148,4 +152,4 @@ function fieldAlias(field) {
|
|
|
148
152
|
return field.alias || field.name;
|
|
149
153
|
}
|
|
150
154
|
|
|
151
|
-
export {
|
|
155
|
+
export { newPortalPortalItem as a, newWebScene as b, newWebMap as c, fieldTypeToIconName as d, fieldTypeToArcadeType as e, fieldAlias as f, importArcade as g, importRequest as i, newLayersFeatureLayer as n, supportedFields as s };
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
export { setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { editor } from 'monaco-editor';
|
|
7
7
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
import { m as makeController } from './chunk-A2KF2X73.js';
|
|
7
7
|
import { m as startLocaleObserver, n as getElementLocales } from './index2.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { g as getAssetPath } from './index-eb5e73d7.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns the last element of an array.
|
|
@@ -120522,7 +120522,7 @@ registerLanguage({
|
|
|
120522
120522
|
mimetypes: ["text/css"],
|
|
120523
120523
|
loader: () => {
|
|
120524
120524
|
{
|
|
120525
|
-
return import('./css-
|
|
120525
|
+
return import('./css-f175069e.js');
|
|
120526
120526
|
}
|
|
120527
120527
|
}
|
|
120528
120528
|
});
|
|
@@ -120540,7 +120540,7 @@ registerLanguage({
|
|
|
120540
120540
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120541
120541
|
loader: () => {
|
|
120542
120542
|
{
|
|
120543
|
-
return import('./html-
|
|
120543
|
+
return import('./html-89c183e8.js');
|
|
120544
120544
|
}
|
|
120545
120545
|
}
|
|
120546
120546
|
});
|
|
@@ -120560,7 +120560,7 @@ registerLanguage({
|
|
|
120560
120560
|
mimetypes: ["text/javascript"],
|
|
120561
120561
|
loader: () => {
|
|
120562
120562
|
{
|
|
120563
|
-
return import('./javascript-
|
|
120563
|
+
return import('./javascript-f811eea7.js');
|
|
120564
120564
|
}
|
|
120565
120565
|
}
|
|
120566
120566
|
});
|
|
@@ -120578,7 +120578,7 @@ registerLanguage({
|
|
|
120578
120578
|
mimetypes: ["text/typescript"],
|
|
120579
120579
|
loader: () => {
|
|
120580
120580
|
{
|
|
120581
|
-
return import('./typescript-
|
|
120581
|
+
return import('./typescript-b4c0b590.js');
|
|
120582
120582
|
}
|
|
120583
120583
|
}
|
|
120584
120584
|
});
|
|
@@ -120699,7 +120699,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120699
120699
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120700
120700
|
function getMode$3() {
|
|
120701
120701
|
{
|
|
120702
|
-
return import('./cssMode-
|
|
120702
|
+
return import('./cssMode-0996f9a7.js');
|
|
120703
120703
|
}
|
|
120704
120704
|
}
|
|
120705
120705
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120824,7 +120824,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120824
120824
|
};
|
|
120825
120825
|
function getMode$2() {
|
|
120826
120826
|
{
|
|
120827
|
-
return import('./htmlMode-
|
|
120827
|
+
return import('./htmlMode-d1e2fa18.js');
|
|
120828
120828
|
}
|
|
120829
120829
|
}
|
|
120830
120830
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120926,7 +120926,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120926
120926
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120927
120927
|
function getMode$1() {
|
|
120928
120928
|
{
|
|
120929
|
-
return import('./jsonMode-
|
|
120929
|
+
return import('./jsonMode-3266841c.js');
|
|
120930
120930
|
}
|
|
120931
120931
|
}
|
|
120932
120932
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121195,7 +121195,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121195
121195
|
};
|
|
121196
121196
|
function getMode() {
|
|
121197
121197
|
{
|
|
121198
|
-
return import('./tsMode-
|
|
121198
|
+
return import('./tsMode-8dc2659e.js');
|
|
121199
121199
|
}
|
|
121200
121200
|
}
|
|
121201
121201
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -168937,6 +168937,10 @@ async function importLayersFeatureLayer() {
|
|
|
168937
168937
|
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
168938
168938
|
return isDefaultModule(module) ? module.default : module;
|
|
168939
168939
|
}
|
|
168940
|
+
async function newLayersFeatureLayer(properties) {
|
|
168941
|
+
const ModConstructor = await importLayersFeatureLayer();
|
|
168942
|
+
return new ModConstructor(properties);
|
|
168943
|
+
}
|
|
168940
168944
|
async function importPortalPortalItem() {
|
|
168941
168945
|
if (isAMD) {
|
|
168942
168946
|
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
@@ -168985,13 +168989,6 @@ async function importRequest() {
|
|
|
168985
168989
|
return isDefaultModule(module) ? module.default : module;
|
|
168986
168990
|
}
|
|
168987
168991
|
|
|
168988
|
-
//#region core adapter fix
|
|
168989
|
-
async function newFeatureLayer(definition) {
|
|
168990
|
-
const FeatureLayer = await importLayersFeatureLayer();
|
|
168991
|
-
// Fix title for the layer. Instead of defaulting to the map viewer style.
|
|
168992
|
-
return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
|
|
168993
|
-
}
|
|
168994
|
-
//#endregion
|
|
168995
168992
|
//#region Type Guards
|
|
168996
168993
|
function isQueryableLayerInstance(item) {
|
|
168997
168994
|
return (!!item &&
|
|
@@ -169122,7 +169119,7 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
169122
169119
|
source = definition;
|
|
169123
169120
|
}
|
|
169124
169121
|
else {
|
|
169125
|
-
source = await
|
|
169122
|
+
source = await newLayersFeatureLayer(definition);
|
|
169126
169123
|
}
|
|
169127
169124
|
if (isLoadableSource(source)) {
|
|
169128
169125
|
await source.load();
|
|
@@ -169133,20 +169130,20 @@ async function serviceMetaData(url) {
|
|
|
169133
169130
|
url += "/layers";
|
|
169134
169131
|
const request = await importRequest();
|
|
169135
169132
|
const response = await request(url, { responseType: "json", query: { f: "json" } });
|
|
169136
|
-
const data = {
|
|
169137
|
-
layers: response.data?.layers ?? [],
|
|
169138
|
-
tables: response.data?.tables ?? [],
|
|
169139
|
-
};
|
|
169140
169133
|
const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
|
|
169141
|
-
const layers = getSupportedLayerInfos(data
|
|
169142
|
-
const tables = getSupportedLayerInfos(data
|
|
169134
|
+
const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
|
|
169135
|
+
const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
|
|
169143
169136
|
return { layers, tables };
|
|
169144
169137
|
}
|
|
169145
169138
|
function getSupportedLayerInfos(layers, queryCapability) {
|
|
169139
|
+
if (!layers) {
|
|
169140
|
+
return [];
|
|
169141
|
+
}
|
|
169146
169142
|
return layers.filter((layer) => {
|
|
169147
169143
|
switch (layer.type) {
|
|
169148
169144
|
case "Feature Layer":
|
|
169149
169145
|
case "Oriented Imagery Layer":
|
|
169146
|
+
case "Catalog Layer":
|
|
169150
169147
|
case "Table": {
|
|
169151
169148
|
const capabilities = layer.capabilities
|
|
169152
169149
|
? layer.capabilities
|
|
@@ -169655,7 +169652,7 @@ function fieldAlias(field) {
|
|
|
169655
169652
|
//#endregion
|
|
169656
169653
|
//#region Support functions
|
|
169657
169654
|
async function getRelatedFeatureLayer(layer, relationship) {
|
|
169658
|
-
const relatedFeatureLayer = await
|
|
169655
|
+
const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
|
|
169659
169656
|
await relatedFeatureLayer.load();
|
|
169660
169657
|
return relatedFeatureLayer;
|
|
169661
169658
|
}
|
|
@@ -170218,6 +170215,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170218
170215
|
// Sepcial case for the subtype field
|
|
170219
170216
|
if (field.name === this._source.subtypeField) {
|
|
170220
170217
|
const domainDictionary = this._createDomainDictionary(field);
|
|
170218
|
+
domainDictionary.icon = "subtype";
|
|
170221
170219
|
domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
|
|
170222
170220
|
return domainDictionary;
|
|
170223
170221
|
}
|
|
@@ -170680,12 +170678,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170680
170678
|
}
|
|
170681
170679
|
const metadata = await serviceMetaData(processedUrl);
|
|
170682
170680
|
const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
|
|
170683
|
-
const featureLayer = await
|
|
170681
|
+
const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170684
170682
|
await featureLayer.load();
|
|
170685
170683
|
return this._createFeatureSetVariable(featureLayer);
|
|
170686
170684
|
}));
|
|
170687
170685
|
const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
|
|
170688
|
-
const table = await
|
|
170686
|
+
const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170689
170687
|
await table.load();
|
|
170690
170688
|
return this._createFeatureSetVariable(table);
|
|
170691
170689
|
}));
|
|
@@ -170715,7 +170713,9 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170715
170713
|
return new FeatureSetVariable(this, {
|
|
170716
170714
|
profile: this._profile,
|
|
170717
170715
|
declaration: { name: featureLayer.title, definition: featureLayer },
|
|
170718
|
-
label:
|
|
170716
|
+
label: isFromWebMap
|
|
170717
|
+
? featureLayer.title
|
|
170718
|
+
: featureLayer.sourceJSON.name ?? featureLayer.title,
|
|
170719
170719
|
description: "",
|
|
170720
170720
|
nonInteractive: true,
|
|
170721
170721
|
}, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { E as main, e as editor, M as MarkerSeverity, R as Range, m as languages, F as debounce, G as Emitter } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { E as main, e as editor, M as MarkerSeverity, R as Range, m as languages, F as debounce, G as Emitter } from './arcade-defaults-b09ed410.js';
|
|
7
|
+
import './index-eb5e73d7.js';
|
|
8
8
|
|
|
9
9
|
var j={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Fe=["++","--"],Qe=["-","+","!","~"],Ze=["=","/=","*=","%=","+=","-="],Xe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Fe.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Xe.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ht=Object.values(f),dt=Object.values(j);dt.map(t=>({label:t,kind:main.CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:main.CompletionItemKind.Keyword}));
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-
|
|
7
|
-
import { g as generateTokensCSSForColorMap, e as editor, S as StandaloneServices, I as IStandaloneThemeService, c as createCommonjsModule, b as commonjsGlobal, D as Deferred, d as camelToKebab, s as safeCall, f as safeAsyncCall, h as startLocaleObserver, i as getElementLocales, j as isURL, k as hasSameOrigin, l as importRequest, m as languages, n as arcadeDefaults, U as Uri, o as setFocusOnElement, p as filterCollection, q as addLTRMark, r as importArcade, t as generateGuid, u as getElementTheme, K as KeyCode, v as setValuesInString, w as quoteString, x as supportedFields, y as createFilterExpression, R as Range, z as observeAncestorsMutation, A as KeyMod } from './arcade-defaults-
|
|
6
|
+
import { g as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-eb5e73d7.js';
|
|
7
|
+
import { g as generateTokensCSSForColorMap, e as editor, S as StandaloneServices, I as IStandaloneThemeService, c as createCommonjsModule, b as commonjsGlobal, D as Deferred, d as camelToKebab, s as safeCall, f as safeAsyncCall, h as startLocaleObserver, i as getElementLocales, j as isURL, k as hasSameOrigin, l as importRequest, m as languages, n as arcadeDefaults, U as Uri, o as setFocusOnElement, p as filterCollection, q as addLTRMark, r as importArcade, t as generateGuid, u as getElementTheme, K as KeyCode, v as setValuesInString, w as quoteString, x as supportedFields, y as createFilterExpression, R as Range, z as observeAncestorsMutation, A as KeyMod } from './arcade-defaults-b09ed410.js';
|
|
8
8
|
|
|
9
9
|
async function colorizeCode(code) {
|
|
10
10
|
return await editor.colorize(code, "arcade", { tabSize: 2 });
|
|
@@ -4370,7 +4370,7 @@ async function getArcadeWorker(uri) {
|
|
|
4370
4370
|
* @returns arcade mode module
|
|
4371
4371
|
*/
|
|
4372
4372
|
async function getMode() {
|
|
4373
|
-
return await import('./arcade-mode-
|
|
4373
|
+
return await import('./arcade-mode-4f5c97fa.js');
|
|
4374
4374
|
}
|
|
4375
4375
|
// Register the language in Monaco
|
|
4376
4376
|
languages.register({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
7
|
-
export { s as setNonce } from './index-
|
|
6
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-eb5e73d7.js';
|
|
7
|
+
export { s as setNonce } from './index-eb5e73d7.js';
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { B as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { B as monaco_editor_core_star } from './arcade-defaults-b09ed410.js';
|
|
7
|
+
import './index-eb5e73d7.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { B as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { B as monaco_editor_core_star } from './arcade-defaults-b09ed410.js';
|
|
7
|
+
import './index-eb5e73d7.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
import { B as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { B as monaco_editor_core_star } from './arcade-defaults-b09ed410.js';
|
|
7
|
+
import './index-eb5e73d7.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.64
|
|
5
5
|
*/
|
|
6
|
-
export { a as arcade } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
export { a as arcade } from './arcade-defaults-b09ed410.js';
|
|
7
|
+
import './index-eb5e73d7.js';
|