@arcgis/coding-components 4.29.0-beta.69 → 4.29.0-beta.70
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/dist/arcgis-coding-components/arcgis-coding-components.esm.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +1 -1
- package/dist/arcgis-coding-components/{p-ef6982d2.js → p-21871ede.js} +1 -1
- package/dist/arcgis-coding-components/{p-0c2f4384.js → p-3b2457f7.js} +7 -7
- package/dist/arcgis-coding-components/{p-d07b6214.js → p-45b5bca3.js} +1 -1
- package/dist/arcgis-coding-components/{p-723fc69e.js → p-59247049.js} +1 -1
- package/dist/arcgis-coding-components/{p-a73841b8.js → p-6e1f1ee0.js} +1 -1
- package/dist/arcgis-coding-components/{p-0f636dd2.js → p-8010edc0.js} +1 -1
- package/dist/arcgis-coding-components/{p-03b0ec9a.js → p-9301388a.js} +1 -1
- package/dist/arcgis-coding-components/{p-8fb41167.entry.js → p-be5ec0c4.entry.js} +1 -1
- package/dist/arcgis-coding-components/{p-4f5314f5.js → p-c0bf49ad.js} +1 -1
- package/dist/arcgis-coding-components/{p-7416105e.js → p-ec3e9c42.js} +1 -1
- package/dist/cjs/{arcade-defaults-51a9667c.js → arcade-defaults-82737060.js} +114 -236
- package/dist/cjs/{arcade-mode-7705211c.js → arcade-mode-b21b24cc.js} +1 -1
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +2 -2
- package/dist/cjs/{cssMode-1569c17b.js → cssMode-bc43621f.js} +1 -1
- package/dist/cjs/{html-198d0fbe.js → html-4a747b36.js} +1 -1
- package/dist/cjs/{htmlMode-cb94b682.js → htmlMode-c11513d8.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{javascript-c39cbb25.js → javascript-51f1b49d.js} +2 -2
- package/dist/cjs/{jsonMode-23c556fc.js → jsonMode-3985bbe9.js} +1 -1
- package/dist/cjs/{tsMode-f2bafe49.js → tsMode-b2b3fb82.js} +1 -1
- package/dist/cjs/{typescript-ee8ec13b.js → typescript-795a538e.js} +1 -1
- package/dist/components/arcade-defaults.js +108 -230
- package/dist/esm/{arcade-defaults-501b9076.js → arcade-defaults-375c8393.js} +114 -236
- package/dist/esm/{arcade-mode-f97a9a16.js → arcade-mode-2b1c4c38.js} +1 -1
- package/dist/esm/arcgis-arcade-api_6.entry.js +2 -2
- package/dist/esm/{cssMode-df00f38e.js → cssMode-2d3bbf6d.js} +1 -1
- package/dist/esm/{html-c506d52b.js → html-ba801b93.js} +1 -1
- package/dist/esm/{htmlMode-01fe416c.js → htmlMode-790fcdc3.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{javascript-2d3d5417.js → javascript-10081345.js} +2 -2
- package/dist/esm/{jsonMode-a5223892.js → jsonMode-d6de3d90.js} +1 -1
- package/dist/esm/{tsMode-019f7ae9.js → tsMode-2efadb1a.js} +1 -1
- package/dist/esm/{typescript-dd5fb7df.js → typescript-534a4558.js} +1 -1
- package/dist/types/utils/profile/editor-profile.d.ts +5 -19
- package/dist/types/utils/profile/utils.d.ts +11 -15
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{conf as e,language as t}from"./p-
|
|
1
|
+
import{conf as e,language as t}from"./p-59247049.js";import"./p-3b2457f7.js";import"./p-2c0d6f15.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as t,o as e}from"./p-
|
|
1
|
+
import{p as t,o as e}from"./p-3b2457f7.js";import"./p-2c0d6f15.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -120557,7 +120557,7 @@ registerLanguage({
|
|
|
120557
120557
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120558
120558
|
loader: () => {
|
|
120559
120559
|
{
|
|
120560
|
-
return Promise.resolve().then(function () { return require('./html-
|
|
120560
|
+
return Promise.resolve().then(function () { return require('./html-4a747b36.js'); });
|
|
120561
120561
|
}
|
|
120562
120562
|
}
|
|
120563
120563
|
});
|
|
@@ -120577,7 +120577,7 @@ registerLanguage({
|
|
|
120577
120577
|
mimetypes: ["text/javascript"],
|
|
120578
120578
|
loader: () => {
|
|
120579
120579
|
{
|
|
120580
|
-
return Promise.resolve().then(function () { return require('./javascript-
|
|
120580
|
+
return Promise.resolve().then(function () { return require('./javascript-51f1b49d.js'); });
|
|
120581
120581
|
}
|
|
120582
120582
|
}
|
|
120583
120583
|
});
|
|
@@ -120595,7 +120595,7 @@ registerLanguage({
|
|
|
120595
120595
|
mimetypes: ["text/typescript"],
|
|
120596
120596
|
loader: () => {
|
|
120597
120597
|
{
|
|
120598
|
-
return Promise.resolve().then(function () { return require('./typescript-
|
|
120598
|
+
return Promise.resolve().then(function () { return require('./typescript-795a538e.js'); });
|
|
120599
120599
|
}
|
|
120600
120600
|
}
|
|
120601
120601
|
});
|
|
@@ -120716,7 +120716,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120716
120716
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120717
120717
|
function getMode$3() {
|
|
120718
120718
|
{
|
|
120719
|
-
return Promise.resolve().then(function () { return require('./cssMode-
|
|
120719
|
+
return Promise.resolve().then(function () { return require('./cssMode-bc43621f.js'); });
|
|
120720
120720
|
}
|
|
120721
120721
|
}
|
|
120722
120722
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120841,7 +120841,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120841
120841
|
};
|
|
120842
120842
|
function getMode$2() {
|
|
120843
120843
|
{
|
|
120844
|
-
return Promise.resolve().then(function () { return require('./htmlMode-
|
|
120844
|
+
return Promise.resolve().then(function () { return require('./htmlMode-c11513d8.js'); });
|
|
120845
120845
|
}
|
|
120846
120846
|
}
|
|
120847
120847
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120943,7 +120943,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120943
120943
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120944
120944
|
function getMode$1() {
|
|
120945
120945
|
{
|
|
120946
|
-
return Promise.resolve().then(function () { return require('./jsonMode-
|
|
120946
|
+
return Promise.resolve().then(function () { return require('./jsonMode-3985bbe9.js'); });
|
|
120947
120947
|
}
|
|
120948
120948
|
}
|
|
120949
120949
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121212,7 +121212,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121212
121212
|
};
|
|
121213
121213
|
function getMode() {
|
|
121214
121214
|
{
|
|
121215
|
-
return Promise.resolve().then(function () { return require('./tsMode-
|
|
121215
|
+
return Promise.resolve().then(function () { return require('./tsMode-b2b3fb82.js'); });
|
|
121216
121216
|
}
|
|
121217
121217
|
}
|
|
121218
121218
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -169000,83 +169000,47 @@ async function newWebMap(definition) {
|
|
|
169000
169000
|
function isSupportedLayerInstance(item) {
|
|
169001
169001
|
return (!!item &&
|
|
169002
169002
|
typeof item === "object" &&
|
|
169003
|
-
"declaredClass" in item &&
|
|
169004
169003
|
typeof item.declaredClass === "string" &&
|
|
169005
169004
|
item.declaredClass.startsWith("esri.layers."));
|
|
169006
169005
|
}
|
|
169007
169006
|
function isFeatureSetInstance(item) {
|
|
169008
169007
|
return (!!item &&
|
|
169009
169008
|
typeof item === "object" &&
|
|
169010
|
-
"declaredClass" in item &&
|
|
169011
169009
|
typeof item.declaredClass === "string" &&
|
|
169012
169010
|
item.declaredClass === "esri.rest.support.FeatureSet");
|
|
169013
169011
|
}
|
|
169014
169012
|
function isQueryableLayerInstance(item) {
|
|
169015
169013
|
return (!!item &&
|
|
169016
169014
|
typeof item === "object" &&
|
|
169017
|
-
"declaredClass" in item &&
|
|
169018
169015
|
typeof item.declaredClass === "string" &&
|
|
169019
169016
|
item.declaredClass.startsWith("esri.layers.") &&
|
|
169020
169017
|
"fields" in item &&
|
|
169021
|
-
"queryFeatures" in item &&
|
|
169022
169018
|
typeof item.queryFeatures === "function");
|
|
169023
169019
|
}
|
|
169024
|
-
function isSubtypeSublayerInstance(item) {
|
|
169025
|
-
return (!!item &&
|
|
169026
|
-
typeof item === "object" &&
|
|
169027
|
-
"declaredClass" in item &&
|
|
169028
|
-
typeof item.declaredClass === "string" &&
|
|
169029
|
-
item.declaredClass === "esri.layers.support.SubtypeSublayer");
|
|
169030
|
-
}
|
|
169031
169020
|
function isGroupLayerInstance(item) {
|
|
169032
169021
|
return (!!item &&
|
|
169033
169022
|
typeof item === "object" &&
|
|
169034
|
-
"declaredClass" in item &&
|
|
169035
169023
|
typeof item.declaredClass === "string" &&
|
|
169036
169024
|
item.declaredClass === "esri.layers.GroupLayer");
|
|
169037
169025
|
}
|
|
169038
169026
|
function isWebMapInstance(item) {
|
|
169039
|
-
return (!!item &&
|
|
169040
|
-
typeof item === "object" &&
|
|
169041
|
-
"declaredClass" in item &&
|
|
169042
|
-
typeof item.declaredClass === "string" &&
|
|
169043
|
-
item.declaredClass === "esri.WebMap");
|
|
169027
|
+
return (!!item && typeof item === "object" && typeof item.declaredClass === "string" && item.declaredClass === "esri.WebMap");
|
|
169044
169028
|
}
|
|
169045
169029
|
function isPortalItemDefinition(item) {
|
|
169046
|
-
return !!item && typeof item === "object" &&
|
|
169030
|
+
return !!item && typeof item === "object" && item.portalItem != null;
|
|
169047
169031
|
}
|
|
169048
169032
|
function isFeatureLayerItemDefinition(item) {
|
|
169049
|
-
return !!item && typeof item === "object" &&
|
|
169033
|
+
return !!item && typeof item === "object" && item.portalItem != null;
|
|
169050
169034
|
}
|
|
169051
169035
|
function isFieldsDefinition(item) {
|
|
169052
|
-
return
|
|
169036
|
+
return !!item && typeof item === "object" && Array.isArray(item.fields) && !("declaredClass" in item);
|
|
169053
169037
|
}
|
|
169054
169038
|
function isUrlDefinition(item) {
|
|
169055
|
-
return
|
|
169056
|
-
}
|
|
169057
|
-
function isSubtypeInstance(item) {
|
|
169058
|
-
return (!!item &&
|
|
169059
|
-
typeof item === "object" &&
|
|
169060
|
-
"declaredClass" in item &&
|
|
169061
|
-
item.declaredClass === "esri.layers.support.Subtype");
|
|
169062
|
-
}
|
|
169063
|
-
function isCodedValueDomainInstance(item) {
|
|
169064
|
-
return (!!item &&
|
|
169065
|
-
typeof item === "object" &&
|
|
169066
|
-
"declaredClass" in item &&
|
|
169067
|
-
item.declaredClass === "esri.layers.support.CodedValueDomain");
|
|
169068
|
-
}
|
|
169069
|
-
function isInheritedDomainInstance(item) {
|
|
169070
|
-
return (!!item &&
|
|
169071
|
-
typeof item === "object" &&
|
|
169072
|
-
"declaredClass" in item &&
|
|
169073
|
-
item.declaredClass === "esri.layers.support.InheritedDomain");
|
|
169039
|
+
return !!item && typeof item === "object" && typeof item.url === "string" && !("declaredClass" in item);
|
|
169074
169040
|
}
|
|
169075
169041
|
function isPredefinedProfile(item) {
|
|
169076
169042
|
return (!!item &&
|
|
169077
169043
|
typeof item === "object" &&
|
|
169078
|
-
"id" in item &&
|
|
169079
|
-
"definitions" in item &&
|
|
169080
169044
|
typeof item.id === "string" &&
|
|
169081
169045
|
typeof item.definitions === "object" &&
|
|
169082
169046
|
!Array.isArray(item.definitions));
|
|
@@ -169199,40 +169163,41 @@ function supportedFields(fields) {
|
|
|
169199
169163
|
});
|
|
169200
169164
|
}
|
|
169201
169165
|
|
|
169202
|
-
function
|
|
169203
|
-
|
|
169204
|
-
|
|
169205
|
-
|
|
169206
|
-
|
|
169207
|
-
|
|
169208
|
-
|
|
169209
|
-
|
|
169210
|
-
|
|
169211
|
-
|
|
169212
|
-
|
|
169166
|
+
function resolveIntlPath(dictionary, path) {
|
|
169167
|
+
if (!dictionary) {
|
|
169168
|
+
return "";
|
|
169169
|
+
}
|
|
169170
|
+
const pathSegments = path.split(".");
|
|
169171
|
+
let pathSegment = pathSegments.shift();
|
|
169172
|
+
let entry = dictionary;
|
|
169173
|
+
while (entry && pathSegment) {
|
|
169174
|
+
// @ts-expect-error
|
|
169175
|
+
entry = entry[pathSegment];
|
|
169176
|
+
pathSegment = pathSegments.shift();
|
|
169177
|
+
}
|
|
169178
|
+
return typeof entry === "string" ? entry : path;
|
|
169213
169179
|
}
|
|
169214
|
-
function
|
|
169215
|
-
return !!item
|
|
169180
|
+
function isTypesCapabaleLayer(item) {
|
|
169181
|
+
return !!item?.typeIdField;
|
|
169216
169182
|
}
|
|
169217
169183
|
function isDomainsCapableLayer(item) {
|
|
169218
|
-
return
|
|
169184
|
+
return typeof item?.getFieldDomain === "function";
|
|
169219
169185
|
}
|
|
169220
169186
|
function isRelationshipsCapableLayer(item) {
|
|
169221
|
-
return (
|
|
169222
|
-
"relationships" in item &&
|
|
169223
|
-
"url" in item &&
|
|
169224
|
-
Array.isArray(item.relationships) &&
|
|
169225
|
-
typeof item.url === "string");
|
|
169187
|
+
return Array.isArray(item?.relationships) && typeof item?.url === "string";
|
|
169226
169188
|
}
|
|
169227
169189
|
function isTableCapableLayer(item) {
|
|
169228
|
-
return
|
|
169190
|
+
return typeof item?.isTable === "boolean";
|
|
169229
169191
|
}
|
|
169230
169192
|
function isLoadableSource(item) {
|
|
169231
|
-
return
|
|
169193
|
+
return typeof item?.load === "function";
|
|
169232
169194
|
}
|
|
169233
169195
|
//#endregion
|
|
169234
169196
|
//#region Support Functions
|
|
169235
169197
|
async function getRelatedFeatureLayer(layer, relationship) {
|
|
169198
|
+
if (!relationship) {
|
|
169199
|
+
return null;
|
|
169200
|
+
}
|
|
169236
169201
|
const relatedFeatureLayer = await newFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
|
|
169237
169202
|
await relatedFeatureLayer.load();
|
|
169238
169203
|
return relatedFeatureLayer;
|
|
@@ -169245,23 +169210,7 @@ function sortFields(layer) {
|
|
|
169245
169210
|
if (secondField.type === "oid") {
|
|
169246
169211
|
return 1;
|
|
169247
169212
|
}
|
|
169248
|
-
if (
|
|
169249
|
-
if (firstField.name === layer.parent.subtypeField) {
|
|
169250
|
-
return -1;
|
|
169251
|
-
}
|
|
169252
|
-
if (secondField.name === layer.parent.subtypeField) {
|
|
169253
|
-
return 1;
|
|
169254
|
-
}
|
|
169255
|
-
}
|
|
169256
|
-
if (isSubtypesCapableLayer(layer)) {
|
|
169257
|
-
if (firstField.name === layer.subtypeField) {
|
|
169258
|
-
return -1;
|
|
169259
|
-
}
|
|
169260
|
-
if (secondField.name === layer.subtypeField) {
|
|
169261
|
-
return 1;
|
|
169262
|
-
}
|
|
169263
|
-
}
|
|
169264
|
-
if (isFeatureTypesCapableLayer(layer)) {
|
|
169213
|
+
if (isTypesCapabaleLayer(layer)) {
|
|
169265
169214
|
if (firstField.name === layer.typeIdField) {
|
|
169266
169215
|
return -1;
|
|
169267
169216
|
}
|
|
@@ -169272,19 +169221,20 @@ function sortFields(layer) {
|
|
|
169272
169221
|
return firstField.name.localeCompare(secondField.name, "en", { sensitivity: "base" });
|
|
169273
169222
|
};
|
|
169274
169223
|
}
|
|
169275
|
-
function
|
|
169224
|
+
function getSubtypesProperties(profile, types, field) {
|
|
169276
169225
|
// Try the coded domain first
|
|
169277
|
-
|
|
169278
|
-
|
|
169226
|
+
const group = getDomainValuesProperties(profile, field.domain, { code: "subtypes" });
|
|
169227
|
+
if (group) {
|
|
169228
|
+
return group;
|
|
169279
169229
|
}
|
|
169280
|
-
// No coded domain, we will manufacture it
|
|
169281
|
-
const values = types.map((t) => {
|
|
169282
|
-
const label = isSubtypeInstance(t) ? t.code : t.id;
|
|
169283
|
-
return new ValueVariable({ profile, label: `${label}`, description: t.name, snippet: `"${label}"` });
|
|
169284
|
-
});
|
|
169230
|
+
// No coded domain for the subtypes, we will manufacture it
|
|
169231
|
+
const values = types.map((t) => new ValueVariable({ profile, label: `${t.id}`, description: t.name, snippet: `"${t.id}"` }));
|
|
169285
169232
|
return new GroupOfVariables(profile, { code: "subtypes" }, values);
|
|
169286
169233
|
}
|
|
169287
|
-
function
|
|
169234
|
+
function getDomainValuesProperties(profile, domain, label) {
|
|
169235
|
+
if (!domain || domain.type !== "coded-value") {
|
|
169236
|
+
return null;
|
|
169237
|
+
}
|
|
169288
169238
|
const values = domain.codedValues.map((v) => new ValueVariable({
|
|
169289
169239
|
profile,
|
|
169290
169240
|
label: `${v.code}`,
|
|
@@ -169294,33 +169244,29 @@ function getCodedValueDomainGroup(profile, domain, label) {
|
|
|
169294
169244
|
}));
|
|
169295
169245
|
return new GroupOfVariables(profile, label, values);
|
|
169296
169246
|
}
|
|
169297
|
-
function
|
|
169247
|
+
function getDomainValuesBySubtypeGroup(profile, types, field) {
|
|
169298
169248
|
const variables = [];
|
|
169299
|
-
|
|
169300
|
-
|
|
169301
|
-
}
|
|
169302
|
-
types.forEach((type) => {
|
|
169303
|
-
let domain = type.domains[field.name];
|
|
169249
|
+
types.forEach((t) => {
|
|
169250
|
+
let domain = t.domains[field.name];
|
|
169304
169251
|
if (!domain) {
|
|
169305
169252
|
return;
|
|
169306
169253
|
}
|
|
169307
|
-
if (
|
|
169254
|
+
if (domain.type === "inherited") {
|
|
169308
169255
|
domain = field.domain;
|
|
169309
169256
|
return;
|
|
169310
169257
|
}
|
|
169311
|
-
|
|
169312
|
-
return;
|
|
169313
|
-
}
|
|
169314
|
-
const domainValuesGroup = getCodedValueDomainGroup(profile, domain, {
|
|
169258
|
+
const domainValuesGroup = getDomainValuesProperties(profile, domain, {
|
|
169315
169259
|
code: "domainvaluesfortypeformat",
|
|
169316
169260
|
formatValues: {
|
|
169317
169261
|
fieldName: field.alias ?? field.name,
|
|
169318
|
-
typeName:
|
|
169262
|
+
typeName: t.name
|
|
169319
169263
|
}
|
|
169320
169264
|
});
|
|
169321
|
-
|
|
169322
|
-
|
|
169323
|
-
|
|
169265
|
+
if (!domainValuesGroup) {
|
|
169266
|
+
return;
|
|
169267
|
+
}
|
|
169268
|
+
const label = `${t.id}`;
|
|
169269
|
+
const snippet = `"${t.id}""`;
|
|
169324
169270
|
const subtypeDictionary = new DictionaryVariable({ profile, label, snippet });
|
|
169325
169271
|
subtypeDictionary.variables = [domainValuesGroup];
|
|
169326
169272
|
variables.push(subtypeDictionary);
|
|
@@ -169330,9 +169276,6 @@ function getDomainValuesGroup(profile, types, field) {
|
|
|
169330
169276
|
}
|
|
169331
169277
|
return new GroupOfVariables(profile, { code: "domainvaluesbysubtypes" }, variables);
|
|
169332
169278
|
}
|
|
169333
|
-
function areAllDomainsInherited(types, field) {
|
|
169334
|
-
return types.every((type) => type.domains[field.name].type === "inherited");
|
|
169335
|
-
}
|
|
169336
169279
|
// const validIdentifierExpr = new RegExp(/^[a-z_$][\w$]*$/gi);
|
|
169337
169280
|
const validIdentifierExpr = /^[a-z_$][a-z0-9_$]*$/giu;
|
|
169338
169281
|
function getMemberExpressionProperty(prop, includeDot = true) {
|
|
@@ -169360,6 +169303,10 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
169360
169303
|
else {
|
|
169361
169304
|
source = await newFeatureLayer(definition);
|
|
169362
169305
|
}
|
|
169306
|
+
if (!source) {
|
|
169307
|
+
console.error("Invalid FeatureSetDefinition", definition);
|
|
169308
|
+
return null;
|
|
169309
|
+
}
|
|
169363
169310
|
if (isLoadableSource(source)) {
|
|
169364
169311
|
await source.load();
|
|
169365
169312
|
}
|
|
@@ -169395,7 +169342,10 @@ function filterFeatureLayerInfos(layers, queryCapability) {
|
|
|
169395
169342
|
//#endregion
|
|
169396
169343
|
//#region Functions to Editor Variables to a language service variables
|
|
169397
169344
|
async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
|
|
169398
|
-
|
|
169345
|
+
if (!editorVariables) {
|
|
169346
|
+
return [];
|
|
169347
|
+
}
|
|
169348
|
+
const properties = await Promise.all(editorVariables.map(async (editorVariable) => {
|
|
169399
169349
|
switch (editorVariable.type) {
|
|
169400
169350
|
case "dictionary":
|
|
169401
169351
|
return await dictionaryToLSDictionary(editorVariable, kind);
|
|
@@ -169405,6 +169355,7 @@ async function variablesToLSVariable(editorVariables, kind = main.CompletionItem
|
|
|
169405
169355
|
return variableToLSVariable(editorVariable, kind);
|
|
169406
169356
|
}
|
|
169407
169357
|
}));
|
|
169358
|
+
return properties.filter((p) => p);
|
|
169408
169359
|
}
|
|
169409
169360
|
function variableToLSVariable(editorVariable, kind) {
|
|
169410
169361
|
const { name, type } = editorVariable;
|
|
@@ -169522,7 +169473,7 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
|
|
|
169522
169473
|
previous += ` \n${description}`;
|
|
169523
169474
|
}
|
|
169524
169475
|
return previous;
|
|
169525
|
-
}, description);
|
|
169476
|
+
}, description ?? "");
|
|
169526
169477
|
return {
|
|
169527
169478
|
name,
|
|
169528
169479
|
description,
|
|
@@ -169577,7 +169528,7 @@ class ProfileItemBase {
|
|
|
169577
169528
|
if (typeof this.description === "string") {
|
|
169578
169529
|
return this.description;
|
|
169579
169530
|
}
|
|
169580
|
-
return D(this._profile?.intlStrings[this.description.code], this.description.formatValues);
|
|
169531
|
+
return D(this._profile?.intlStrings[this.description.code ?? ""], this.description.formatValues);
|
|
169581
169532
|
}
|
|
169582
169533
|
/**
|
|
169583
169534
|
* Returns true if the item pass the filter test
|
|
@@ -169600,7 +169551,7 @@ class VariableBase extends ProfileItemBase {
|
|
|
169600
169551
|
super(props.profile, props.label, props.description ?? props.declaration?.description);
|
|
169601
169552
|
this.declaration = props.declaration ?? {};
|
|
169602
169553
|
this.name = props.declaration?.name ?? "";
|
|
169603
|
-
this.snippet = props.snippet
|
|
169554
|
+
this.snippet = props.snippet || "";
|
|
169604
169555
|
this.nonInteractive = props.nonInteractive ?? false;
|
|
169605
169556
|
this.filterDescription = props.filterDescription ?? false;
|
|
169606
169557
|
this.icon = props.icon;
|
|
@@ -169618,7 +169569,7 @@ class ValueVariable extends VariableBase {
|
|
|
169618
169569
|
}
|
|
169619
169570
|
getDescription() {
|
|
169620
169571
|
if (this.description == null) {
|
|
169621
|
-
return this._profile?.intlStrings
|
|
169572
|
+
return resolveIntlPath(this._profile?.intlStrings, this.type.toLowerCase()) ?? "";
|
|
169622
169573
|
}
|
|
169623
169574
|
return super.getDescription();
|
|
169624
169575
|
}
|
|
@@ -169639,7 +169590,7 @@ class ArrayVariable extends VariableBase {
|
|
|
169639
169590
|
}
|
|
169640
169591
|
getDescription() {
|
|
169641
169592
|
if (this.description == null) {
|
|
169642
|
-
return this._profile?.intlStrings
|
|
169593
|
+
return resolveIntlPath(this._profile?.intlStrings, this.type.toLowerCase()) ?? "";
|
|
169643
169594
|
}
|
|
169644
169595
|
return super.getDescription();
|
|
169645
169596
|
}
|
|
@@ -169654,8 +169605,8 @@ class ArrayVariable extends VariableBase {
|
|
|
169654
169605
|
* collection is ready or not.
|
|
169655
169606
|
*/
|
|
169656
169607
|
class CollectionBasedVariable extends VariableBase {
|
|
169657
|
-
constructor() {
|
|
169658
|
-
super(
|
|
169608
|
+
constructor(props) {
|
|
169609
|
+
super(props);
|
|
169659
169610
|
this.isCollection = true;
|
|
169660
169611
|
this._loaded = true;
|
|
169661
169612
|
/**
|
|
@@ -169791,19 +169742,21 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169791
169742
|
this._definition = props.declaration?.definition;
|
|
169792
169743
|
}
|
|
169793
169744
|
get title() {
|
|
169794
|
-
return
|
|
169745
|
+
return this._source?.title ?? "";
|
|
169795
169746
|
}
|
|
169796
169747
|
get url() {
|
|
169797
|
-
return
|
|
169748
|
+
return this._definition?.url ?? "";
|
|
169798
169749
|
}
|
|
169799
169750
|
get informationUrl() {
|
|
169800
169751
|
if (!this.loaded) {
|
|
169801
169752
|
return null;
|
|
169802
169753
|
}
|
|
169803
|
-
|
|
169754
|
+
const url = this._source?.url;
|
|
169755
|
+
if (!url) {
|
|
169804
169756
|
return null;
|
|
169805
169757
|
}
|
|
169806
|
-
|
|
169758
|
+
const layerId = this._source?.layerId ?? "";
|
|
169759
|
+
return `${url}/${layerId}`;
|
|
169807
169760
|
}
|
|
169808
169761
|
get informationType() {
|
|
169809
169762
|
return this._profile?.intlStrings.layer ?? "layer";
|
|
@@ -169815,19 +169768,16 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169815
169768
|
this._loadPromise = this._loadSource();
|
|
169816
169769
|
return await this._loadPromise;
|
|
169817
169770
|
}
|
|
169818
|
-
_getValueSnippet(field) {
|
|
169819
|
-
return this.type === "feature" ? assembleMemberExpression(this.snippet, field.name) : field.name;
|
|
169820
|
-
}
|
|
169821
169771
|
_getFieldProperty(field) {
|
|
169822
169772
|
// Check if the field is the type id field or of the field has a coded domain.
|
|
169823
169773
|
// If it has then the property will be an exanpdable property (dictionary).
|
|
169824
169774
|
// Otherwise just return a simple value property.
|
|
169825
|
-
const subtypesOrDomainValuesDictionary = this.
|
|
169775
|
+
const subtypesOrDomainValuesDictionary = this._getSubtypesOrDomainValuesDictionary(field);
|
|
169826
169776
|
if (subtypesOrDomainValuesDictionary) {
|
|
169827
169777
|
return subtypesOrDomainValuesDictionary;
|
|
169828
169778
|
}
|
|
169829
169779
|
// Create the value property
|
|
169830
|
-
const valueSnippet = this.
|
|
169780
|
+
const valueSnippet = this.type === "feature" ? assembleMemberExpression(this.snippet, field.name) : field.name;
|
|
169831
169781
|
return new ValueVariable({
|
|
169832
169782
|
profile: this._profile,
|
|
169833
169783
|
label: valueSnippet,
|
|
@@ -169837,113 +169787,12 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169837
169787
|
filterDescription: true
|
|
169838
169788
|
});
|
|
169839
169789
|
}
|
|
169840
|
-
|
|
169841
|
-
if (isSubtypeSublayerInstance(this._source)) {
|
|
169842
|
-
return this._source.parent;
|
|
169843
|
-
}
|
|
169844
|
-
return isDomainsCapableLayer(this._source) ? this._source : null;
|
|
169845
|
-
}
|
|
169846
|
-
_getDomainDictionary(field) {
|
|
169847
|
-
if (!isDomainsCapableLayer(this._domainSource)) {
|
|
169848
|
-
return null;
|
|
169849
|
-
}
|
|
169850
|
-
// Note we have multiple scenarios:
|
|
169851
|
-
// - Layers without subtypes or feature types: We will check if the field has a domain
|
|
169852
|
-
// - Layers with only subtypes: We will parse the subtypes metadata and create a dictionary
|
|
169853
|
-
// - Layers with only feature types: We will parse the feature types metadata
|
|
169854
|
-
// - Layers with both subtypes and feature types: we will actually use the subtypes metadata
|
|
169855
|
-
// Summary, we will always use the subtypes metadata if available.
|
|
169856
|
-
if (isSubtypesCapableLayer(this._domainSource)) {
|
|
169857
|
-
return this._getSubtypeDomainDictionary(field);
|
|
169858
|
-
}
|
|
169859
|
-
if (isFeatureTypesCapableLayer(this._domainSource)) {
|
|
169860
|
-
return this._getFeatureTypeDomainDictionary(field);
|
|
169861
|
-
}
|
|
169862
|
-
return this._getFieldDomainDictionary(field);
|
|
169863
|
-
}
|
|
169864
|
-
_getSubtypeDomainDictionary(field) {
|
|
169865
|
-
// SHould be tested before calling this function
|
|
169866
|
-
if (!isSubtypesCapableLayer(this._domainSource)) {
|
|
169867
|
-
return null;
|
|
169868
|
-
}
|
|
169869
|
-
// If the source is the subtype sublayer then the subtype value is already set.
|
|
169870
|
-
// It doesn't make sense to show the subtypes for the subtype field.
|
|
169871
|
-
// For the other field, the getFieldDomain will return the domain for the subtype.
|
|
169872
|
-
if (isSubtypeSublayerInstance(this._source)) {
|
|
169873
|
-
if (field.name === this._domainSource.subtypeField) {
|
|
169874
|
-
return null;
|
|
169875
|
-
}
|
|
169876
|
-
return this._getFieldDomainDictionary(field);
|
|
169877
|
-
}
|
|
169878
|
-
// The code here shoud be executed for layers that have subtypes but are not subtype sublayers.
|
|
169879
|
-
// Sepcial case for the subtype field
|
|
169880
|
-
if (field.name === this._domainSource.subtypeField) {
|
|
169881
|
-
const domainDictionary = this._createDomainDictionary(field);
|
|
169882
|
-
domainDictionary.variables.push(getTypeOrSubtypeDomainGroup(this._profile, this._domainSource.subtypes, field));
|
|
169883
|
-
return domainDictionary;
|
|
169884
|
-
}
|
|
169885
|
-
// Check if all the domains for the field in the types are inherited.
|
|
169886
|
-
// If it is we can simplify the structure by avoiding splitting in subtypes
|
|
169887
|
-
if (areAllDomainsInherited(this._domainSource.subtypes, field)) {
|
|
169888
|
-
return this._getFieldDomainDictionary(field);
|
|
169889
|
-
}
|
|
169890
|
-
// We have domains per subtype
|
|
169891
|
-
// We need to go thru each types and create a dictionary.
|
|
169892
|
-
const domainValuesBySubtypeGroup = getDomainValuesGroup(this._profile, this._domainSource.subtypes, field);
|
|
169893
|
-
if (!domainValuesBySubtypeGroup) {
|
|
169894
|
-
return null;
|
|
169895
|
-
}
|
|
169896
|
-
const domainDictionary = this._createDomainDictionary(field);
|
|
169897
|
-
domainDictionary.variables.push(domainValuesBySubtypeGroup);
|
|
169898
|
-
return domainDictionary;
|
|
169899
|
-
}
|
|
169900
|
-
_getFeatureTypeDomainDictionary(field) {
|
|
169901
|
-
// SHould be tested before calling this function
|
|
169902
|
-
if (!isFeatureTypesCapableLayer(this._domainSource)) {
|
|
169903
|
-
return null;
|
|
169904
|
-
}
|
|
169905
|
-
// Special case for the type id field
|
|
169906
|
-
if (field.name === this._domainSource.typeIdField) {
|
|
169907
|
-
const domainDictionary = this._createDomainDictionary(field);
|
|
169908
|
-
domainDictionary.variables.push(getTypeOrSubtypeDomainGroup(this._profile, this._domainSource.types, field));
|
|
169909
|
-
return domainDictionary;
|
|
169910
|
-
}
|
|
169911
|
-
// Check if all the domains for the field in the types are inherited.
|
|
169912
|
-
// If it is we can simplify the structure by avoiding splitting in subtypes
|
|
169913
|
-
if (areAllDomainsInherited(this._domainSource.types, field)) {
|
|
169914
|
-
return this._getFieldDomainDictionary(field);
|
|
169915
|
-
}
|
|
169916
|
-
// We have domains per feature type
|
|
169917
|
-
// We need to go thru each types and create a dictionary.
|
|
169918
|
-
const domainValuesByFeatureTypeGroup = getDomainValuesGroup(this._profile, this._domainSource.types, field);
|
|
169919
|
-
if (!domainValuesByFeatureTypeGroup) {
|
|
169920
|
-
return null;
|
|
169921
|
-
}
|
|
169922
|
-
const domainDictionary = this._createDomainDictionary(field);
|
|
169923
|
-
domainDictionary.variables.push(domainValuesByFeatureTypeGroup);
|
|
169924
|
-
return domainDictionary;
|
|
169925
|
-
}
|
|
169926
|
-
_getFieldDomainDictionary(field) {
|
|
169927
|
-
// SHould be tested before calling this function
|
|
169790
|
+
_getSubtypesOrDomainValuesDictionary(field) {
|
|
169928
169791
|
if (!isDomainsCapableLayer(this._source)) {
|
|
169929
169792
|
return null;
|
|
169930
169793
|
}
|
|
169931
|
-
|
|
169932
|
-
|
|
169933
|
-
return null;
|
|
169934
|
-
}
|
|
169935
|
-
const domainValuesGroup = getCodedValueDomainGroup(this._profile, fieldDomain, {
|
|
169936
|
-
code: "domainvalues"
|
|
169937
|
-
});
|
|
169938
|
-
const domainDictionary = this._createDomainDictionary(field);
|
|
169939
|
-
domainDictionary.variables.push(domainValuesGroup);
|
|
169940
|
-
return domainDictionary;
|
|
169941
|
-
}
|
|
169942
|
-
_createDomainDictionary(field) {
|
|
169943
|
-
// Create the domain dictionary.
|
|
169944
|
-
// The dictionary will have a header group and a value group.
|
|
169945
|
-
// At this point we are only creating the header group in the dictionary.
|
|
169946
|
-
const valueSnippet = this._getValueSnippet(field);
|
|
169794
|
+
// Create the domain dictionary, we may not use it
|
|
169795
|
+
const valueSnippet = this.type === "feature" ? assembleMemberExpression(this.snippet, field.name) : field.name;
|
|
169947
169796
|
const domainDictionary = new DictionaryVariable({
|
|
169948
169797
|
profile: this._profile,
|
|
169949
169798
|
label: valueSnippet,
|
|
@@ -169961,7 +169810,13 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169961
169810
|
})
|
|
169962
169811
|
]);
|
|
169963
169812
|
domainDictionary.variables = [headerGroup];
|
|
169964
|
-
//
|
|
169813
|
+
// If it is the subtype field then get its coded domain values
|
|
169814
|
+
if (isTypesCapabaleLayer(this._source) && field.name === this._source.typeIdField) {
|
|
169815
|
+
const subtypesGroup = getSubtypesProperties(this._profile, this._source.types, field);
|
|
169816
|
+
domainDictionary.variables.push(subtypesGroup);
|
|
169817
|
+
return domainDictionary;
|
|
169818
|
+
}
|
|
169819
|
+
// Since its' not the subtype field then add the snippet for the domain name
|
|
169965
169820
|
if (this.type === "feature") {
|
|
169966
169821
|
const domainNameSnippet = `DomainName(${this.snippet}, "${field.name}")`;
|
|
169967
169822
|
headerGroup.variables.push(new ValueVariable({
|
|
@@ -169971,6 +169826,29 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169971
169826
|
snippet: domainNameSnippet
|
|
169972
169827
|
}));
|
|
169973
169828
|
}
|
|
169829
|
+
if (isTypesCapabaleLayer(this._source)) {
|
|
169830
|
+
// Check if all the domains for the field in the types are inherited.
|
|
169831
|
+
// If it is we can simplify the structure by avoiding splitting in subtypes
|
|
169832
|
+
const allInherited = this._source.types.every((t) => t.domains[field.name].type === "inherited");
|
|
169833
|
+
if (!allInherited) {
|
|
169834
|
+
// We have domains per subtype
|
|
169835
|
+
// We need to go thru each types and create a dictionary.
|
|
169836
|
+
const domainValuesBySubtypeGroup = getDomainValuesBySubtypeGroup(this._profile, this._source.types, field);
|
|
169837
|
+
if (!domainValuesBySubtypeGroup) {
|
|
169838
|
+
return null;
|
|
169839
|
+
}
|
|
169840
|
+
domainDictionary.variables.push(domainValuesBySubtypeGroup);
|
|
169841
|
+
return domainDictionary;
|
|
169842
|
+
}
|
|
169843
|
+
}
|
|
169844
|
+
// Either we have types but all the domains are inherited or we don't have types
|
|
169845
|
+
const domainValuesGroup = getDomainValuesProperties(this._profile, this._source.getFieldDomain(field.name), {
|
|
169846
|
+
code: "domainvalues"
|
|
169847
|
+
});
|
|
169848
|
+
if (!domainValuesGroup) {
|
|
169849
|
+
return null;
|
|
169850
|
+
}
|
|
169851
|
+
domainDictionary.variables.push(domainValuesGroup);
|
|
169974
169852
|
return domainDictionary;
|
|
169975
169853
|
}
|
|
169976
169854
|
async _getRelationshipsProperty() {
|
|
@@ -170180,7 +170058,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170180
170058
|
: {
|
|
170181
170059
|
code: "webmapformat",
|
|
170182
170060
|
formatValues: {
|
|
170183
|
-
webMapTitle: this._featureSetCollections.source.portalItem.title
|
|
170061
|
+
webMapTitle: this._featureSetCollections.source.portalItem.title ?? "Untitled map"
|
|
170184
170062
|
}
|
|
170185
170063
|
};
|
|
170186
170064
|
const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-82737060.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
var fe=(e=>(e.False="false",e.Null="null",e.True="true",e))(fe||{}),ge=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(ge||{}),c=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(c||{}),me=["++","--"],We=["-","+","!","~"],qe=["=","/=","*=","%=","+=","-="],He=["||","&&"],Pt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],bt=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(bt||{}),It=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(It||{});var L=[[],[],[]];me.forEach(e=>L[e.length-1].push(e));We.forEach(e=>L[e.length-1].push(e));He.forEach(e=>L[e.length-1].push(e));qe.forEach(e=>L[e.length-1].push(e));Pt.forEach(e=>L[e.length-1].push(e));var nt=Object.values(ge),st=Object.values(fe);st.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Constant}));nt.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Keyword}));
|