@arcgis/coding-components 4.29.0-beta.62 → 4.29.0-beta.63
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-061e6138.js → p-2a665136.js} +1 -1
- package/dist/arcgis-coding-components/{p-6ab0494e.js → p-3ba4deea.js} +1 -1
- package/dist/arcgis-coding-components/{p-0d7b2c4b.js → p-595d9a06.js} +1 -1
- package/dist/arcgis-coding-components/{p-d685a671.js → p-7b6af57c.js} +1 -1
- package/dist/arcgis-coding-components/{p-3e855f9c.js → p-7d5fcf2e.js} +8 -8
- package/dist/arcgis-coding-components/{p-faae9e50.js → p-989439a0.js} +1 -1
- package/dist/arcgis-coding-components/{p-9016dc94.js → p-9b4a0643.js} +1 -1
- package/dist/arcgis-coding-components/{p-dbf0130c.js → p-d7ca1083.js} +1 -1
- package/dist/arcgis-coding-components/{p-f6e12d5f.entry.js → p-e4efcbd0.entry.js} +1 -1
- package/dist/arcgis-coding-components/{p-93252bb5.js → p-fcdd0366.js} +1 -1
- package/dist/cjs/{arcade-defaults-a23c6057.js → arcade-defaults-5c2ff166.js} +251 -251
- package/dist/cjs/{arcade-mode-917ca23f.js → arcade-mode-23925c8d.js} +1 -1
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +33 -33
- package/dist/cjs/{cssMode-d02be328.js → cssMode-2e878b70.js} +1 -1
- package/dist/cjs/{html-4a4537a9.js → html-847c7e39.js} +1 -1
- package/dist/cjs/{htmlMode-ce2c81dc.js → htmlMode-7a36db6d.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{javascript-3119740d.js → javascript-f5ca9a1a.js} +2 -2
- package/dist/cjs/{jsonMode-f9250e13.js → jsonMode-0d326a6e.js} +1 -1
- package/dist/cjs/{tsMode-9c22cf93.js → tsMode-e4abe99d.js} +1 -1
- package/dist/cjs/{typescript-2faa236a.js → typescript-c43b7258.js} +1 -1
- package/dist/components/arcade-api.js +6 -6
- package/dist/components/arcade-contribution.js +2 -2
- package/dist/components/arcade-defaults.js +8 -8
- package/dist/components/arcade-results.js +12 -12
- package/dist/components/arcade-suggestions.js +4 -4
- package/dist/components/arcade-variables.js +5 -5
- package/dist/components/arcgis-arcade-editor.js +15 -15
- package/dist/components/code-editor.js +5 -5
- package/dist/components/index2.js +2 -2
- package/dist/components/utilities.js +2 -2
- package/dist/esm/{arcade-defaults-7b495156.js → arcade-defaults-7525fe7a.js} +243 -243
- package/dist/esm/{arcade-mode-de60b33c.js → arcade-mode-312bbd22.js} +1 -1
- package/dist/esm/arcgis-arcade-api_6.entry.js +33 -33
- package/dist/esm/{cssMode-b54550d7.js → cssMode-71ce0374.js} +1 -1
- package/dist/esm/{html-5268964a.js → html-37ae4460.js} +1 -1
- package/dist/esm/{htmlMode-b54c7ef1.js → htmlMode-ae5b0f39.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{javascript-8f4cabbd.js → javascript-ad435a4b.js} +2 -2
- package/dist/esm/{jsonMode-94061c51.js → jsonMode-b8bb4df0.js} +1 -1
- package/dist/esm/{tsMode-928e55fb.js → tsMode-b967128d.js} +1 -1
- package/dist/esm/{typescript-44036302.js → typescript-a9a22ab3.js} +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.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}));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ac186201.js');
|
|
6
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
6
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
7
7
|
|
|
8
8
|
async function colorizeCode(code) {
|
|
9
9
|
return await arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
|
|
@@ -2972,7 +2972,7 @@ function setupMonacoEnvironment(assetsPath) {
|
|
|
2972
2972
|
break;
|
|
2973
2973
|
}
|
|
2974
2974
|
// If we have a relative path or we are on same orgin, we can use the default js implementation
|
|
2975
|
-
if (!arcadeDefaults.
|
|
2975
|
+
if (!arcadeDefaults.ne(url) || arcadeDefaults.te(url, globalThis.location.href, true)) {
|
|
2976
2976
|
return new Worker(url, { name: languageId });
|
|
2977
2977
|
}
|
|
2978
2978
|
// For cross orgin, we will load the worker code as a string and manufacture a blob
|
|
@@ -3019,7 +3019,7 @@ async function getArcadeWorker(uri) {
|
|
|
3019
3019
|
* @returns mode for arcade
|
|
3020
3020
|
*/
|
|
3021
3021
|
async function getMode() {
|
|
3022
|
-
return await Promise.resolve().then(function () { return require('./arcade-mode-
|
|
3022
|
+
return await Promise.resolve().then(function () { return require('./arcade-mode-23925c8d.js'); });
|
|
3023
3023
|
}
|
|
3024
3024
|
// Register the language in Monaco
|
|
3025
3025
|
arcadeDefaults.languages.register({
|
|
@@ -3098,7 +3098,7 @@ const ArcgisArcadeApi = class {
|
|
|
3098
3098
|
async componentWillLoad() {
|
|
3099
3099
|
this._colorizeStyle = generateColorizeStyles();
|
|
3100
3100
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
3101
|
-
await arcadeDefaults.
|
|
3101
|
+
await arcadeDefaults.W(this, index.getAssetPath("./assets"));
|
|
3102
3102
|
arcadeDefaults.arcadeDefaults.onModelContextDidChange((key) => {
|
|
3103
3103
|
if (!this.modelId || key !== arcadeDefaults.Uri.parse(this.modelId).toString()) {
|
|
3104
3104
|
return;
|
|
@@ -3108,7 +3108,7 @@ const ArcgisArcadeApi = class {
|
|
|
3108
3108
|
this._updateApiLibrary();
|
|
3109
3109
|
}
|
|
3110
3110
|
disconnectedCallback() {
|
|
3111
|
-
arcadeDefaults.
|
|
3111
|
+
arcadeDefaults.B(this);
|
|
3112
3112
|
this._flowObserver?.disconnect();
|
|
3113
3113
|
this._themeChangedListner?.dispose();
|
|
3114
3114
|
}
|
|
@@ -3153,7 +3153,7 @@ const ArcgisArcadeApi = class {
|
|
|
3153
3153
|
// When switching between flow the same reference is reused
|
|
3154
3154
|
this._flowObserver = new MutationObserver(() => {
|
|
3155
3155
|
// Get the last panel and try to set focus on the input element
|
|
3156
|
-
arcadeDefaults.
|
|
3156
|
+
arcadeDefaults.j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
3157
3157
|
});
|
|
3158
3158
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
3159
3159
|
}
|
|
@@ -3164,14 +3164,14 @@ const ArcgisArcadeApi = class {
|
|
|
3164
3164
|
if (!filteredApiItems.length) {
|
|
3165
3165
|
return null;
|
|
3166
3166
|
}
|
|
3167
|
-
return (index.h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3167
|
+
return (index.h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (index.h("calcite-list-item", { label: arcadeDefaults.G(apiItem.completion.detail), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": apiItem }, index.h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "Expand", icon: "chevron-right", iconFlipRtl: true, scale: "s", onClick: this._selectItem, "data-item": apiItem }))))));
|
|
3168
3168
|
}
|
|
3169
3169
|
renderApiItemFlowItem() {
|
|
3170
3170
|
const apiItem = this._selectedApiItem;
|
|
3171
3171
|
if (!apiItem) {
|
|
3172
3172
|
return null;
|
|
3173
3173
|
}
|
|
3174
|
-
return (index.h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (index.h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), index.h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => void e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), index.h("calcite-block", { open: true, heading: arcadeDefaults.
|
|
3174
|
+
return (index.h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (index.h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), index.h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => void e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), index.h("calcite-block", { open: true, heading: arcadeDefaults.G(apiItem.completion.detail) }, index.h("div", { innerHTML: convertMarkdownString(apiItem.completion.documentation) }), apiItem.examples ? (index.h("div", { ref: (e) => {
|
|
3175
3175
|
if (!e) {
|
|
3176
3176
|
return;
|
|
3177
3177
|
}
|
|
@@ -3434,8 +3434,8 @@ const ArcgisArcadeEditor = class {
|
|
|
3434
3434
|
index.registerInstance(this, hostRef);
|
|
3435
3435
|
this.scriptChange = index.createEvent(this, "scriptChange", 3);
|
|
3436
3436
|
this.diagnosticsChange = index.createEvent(this, "diagnosticsChange", 3);
|
|
3437
|
-
this._componentReadyDefer = new arcadeDefaults.
|
|
3438
|
-
this._modelId = arcadeDefaults.
|
|
3437
|
+
this._componentReadyDefer = new arcadeDefaults.h();
|
|
3438
|
+
this._modelId = arcadeDefaults.F();
|
|
3439
3439
|
this._editorProfilePromise = Promise.resolve(undefined);
|
|
3440
3440
|
this._disposables = [];
|
|
3441
3441
|
this._executeScript = async () => {
|
|
@@ -3576,7 +3576,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3576
3576
|
* @internal
|
|
3577
3577
|
*/
|
|
3578
3578
|
async updateThemeColors(colorRules) {
|
|
3579
|
-
const theme = arcadeDefaults
|
|
3579
|
+
const theme = arcadeDefaults.$(this._hostElement);
|
|
3580
3580
|
updateThemeColors(theme, colorRules);
|
|
3581
3581
|
if (colorRules === undefined) {
|
|
3582
3582
|
["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
|
|
@@ -3605,7 +3605,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3605
3605
|
// Starts a locale observer. It will load the correct t9n strings for the component
|
|
3606
3606
|
// when the locale changes. We also pass updateEditorProfile. It will be invoked the first
|
|
3607
3607
|
// and on each locale change. The profile has to be refreshed on locale change as well.
|
|
3608
|
-
await arcadeDefaults.
|
|
3608
|
+
await arcadeDefaults.W(this, assetsPath, async () => await this._updateEditorProfile());
|
|
3609
3609
|
}
|
|
3610
3610
|
async componentDidLoad() {
|
|
3611
3611
|
// Mark on component as ready.
|
|
@@ -3633,7 +3633,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3633
3633
|
await this._codeEditorElt?.setFocus();
|
|
3634
3634
|
}
|
|
3635
3635
|
disconnectedCallback() {
|
|
3636
|
-
arcadeDefaults.
|
|
3636
|
+
arcadeDefaults.B(this);
|
|
3637
3637
|
arcadeDefaults.arcadeDefaults.disposeApiContextForModel(this._modelId);
|
|
3638
3638
|
arcadeDefaults.arcadeDefaults.disposeEditorProfileForModel(this._modelId);
|
|
3639
3639
|
while (this._disposables.length) {
|
|
@@ -3837,10 +3837,10 @@ const ArcgisArcadeResults = class {
|
|
|
3837
3837
|
//#endregion
|
|
3838
3838
|
// #region Component lifecycle events
|
|
3839
3839
|
async componentWillLoad() {
|
|
3840
|
-
await arcadeDefaults.
|
|
3840
|
+
await arcadeDefaults.W(this, index.getAssetPath("./assets"));
|
|
3841
3841
|
}
|
|
3842
3842
|
disconnectedCallback() {
|
|
3843
|
-
arcadeDefaults.
|
|
3843
|
+
arcadeDefaults.B(this);
|
|
3844
3844
|
}
|
|
3845
3845
|
// #endregion
|
|
3846
3846
|
//#region Private Methods
|
|
@@ -3867,18 +3867,18 @@ const ArcgisArcadeResults = class {
|
|
|
3867
3867
|
return index.h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
|
|
3868
3868
|
}
|
|
3869
3869
|
const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
|
|
3870
|
-
return (index.h("calcite-list", null, this.result ? (index.h(index.Fragment, null, index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3870
|
+
return (index.h("calcite-list", null, this.result ? (index.h(index.Fragment, null, index.h("calcite-list-item", { label: arcadeDefaults.D(this._t9nStrings?.lastexecutionformat, {
|
|
3871
3871
|
timeStamp: new Intl.DateTimeFormat(this._t9nLocale, {
|
|
3872
3872
|
dateStyle: "medium",
|
|
3873
3873
|
timeStyle: "medium"
|
|
3874
3874
|
}).format(this.result.timeStamp)
|
|
3875
|
-
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3875
|
+
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.D(this._t9nStrings?.compilationtimeformat, {
|
|
3876
3876
|
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
3877
3877
|
style: "unit",
|
|
3878
3878
|
unit: "millisecond",
|
|
3879
3879
|
maximumFractionDigits: 2
|
|
3880
3880
|
}).format(this.result.compilationTime ?? 0)
|
|
3881
|
-
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3881
|
+
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.D(this._t9nStrings?.executiontimeformat, {
|
|
3882
3882
|
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
3883
3883
|
style: "unit",
|
|
3884
3884
|
unit: "millisecond",
|
|
@@ -3895,7 +3895,7 @@ const ArcgisArcadeResults = class {
|
|
|
3895
3895
|
}
|
|
3896
3896
|
switch (this.result?.type) {
|
|
3897
3897
|
case "error":
|
|
3898
|
-
return (index.h("div", { class: "result-value-simple flex-adjustable" }, arcadeDefaults.
|
|
3898
|
+
return (index.h("div", { class: "result-value-simple flex-adjustable" }, arcadeDefaults.D(this._t9nStrings?.executionerrorformat, {
|
|
3899
3899
|
message: this.result.value
|
|
3900
3900
|
})));
|
|
3901
3901
|
case "null":
|
|
@@ -3936,7 +3936,7 @@ const ArcgisArcadeResults = class {
|
|
|
3936
3936
|
case "null":
|
|
3937
3937
|
return index.h("span", { class: "constant-value" }, arcadeResult.type);
|
|
3938
3938
|
case "text":
|
|
3939
|
-
return index.h("span", { class: "string-value" }, arcadeDefaults.
|
|
3939
|
+
return index.h("span", { class: "string-value" }, arcadeDefaults.q(arcadeResult.value));
|
|
3940
3940
|
case "number":
|
|
3941
3941
|
return index.h("span", { class: "number-value" }, arcadeResult.value.toString());
|
|
3942
3942
|
case "boolean":
|
|
@@ -3944,9 +3944,9 @@ const ArcgisArcadeResults = class {
|
|
|
3944
3944
|
case "date":
|
|
3945
3945
|
return index.h("span", { class: "date-value" }, formatArcadeResultDate(arcadeResult));
|
|
3946
3946
|
case "dateOnly":
|
|
3947
|
-
return index.h("span", { class: "string-value" }, arcadeDefaults.
|
|
3947
|
+
return index.h("span", { class: "string-value" }, arcadeDefaults.q(formatArcadeResultDateOnly(arcadeResult)));
|
|
3948
3948
|
case "time":
|
|
3949
|
-
return index.h("span", { class: "string-value" }, arcadeDefaults.
|
|
3949
|
+
return index.h("span", { class: "string-value" }, arcadeDefaults.q(formatArcadeResultTimeOnly(arcadeResult)));
|
|
3950
3950
|
default:
|
|
3951
3951
|
return null;
|
|
3952
3952
|
}
|
|
@@ -3954,7 +3954,7 @@ const ArcgisArcadeResults = class {
|
|
|
3954
3954
|
renderArrayHeader(arcadeResult) {
|
|
3955
3955
|
const items = arcadeResult.value ?? [];
|
|
3956
3956
|
const leftoverCount = Math.max(items.length - MaxArrayItems, 0);
|
|
3957
|
-
return (index.h(index.Fragment, null, index.h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (index.h("span", null, "\u00A0", arcadeDefaults.
|
|
3957
|
+
return (index.h(index.Fragment, null, index.h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (index.h("span", null, "\u00A0", arcadeDefaults.D(this._t9nStrings?.showingfirstitemsformat, {
|
|
3958
3958
|
count: MaxArrayItems.toString()
|
|
3959
3959
|
}))) : null));
|
|
3960
3960
|
}
|
|
@@ -4006,7 +4006,7 @@ const ArcgisArcadeResults = class {
|
|
|
4006
4006
|
}
|
|
4007
4007
|
}
|
|
4008
4008
|
renderFeatureSetLabel(arcadeResult) {
|
|
4009
|
-
return (index.h("div", { class: "value-type" }, index.h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (index.h("span", null, "\u00A0", arcadeDefaults.
|
|
4009
|
+
return (index.h("div", { class: "value-type" }, index.h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (index.h("span", null, "\u00A0", arcadeDefaults.D(this._t9nStrings?.showingfirstitemsformat, {
|
|
4010
4010
|
count: BatchSize.toString()
|
|
4011
4011
|
}))) : null));
|
|
4012
4012
|
}
|
|
@@ -4088,12 +4088,12 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4088
4088
|
async componentWillLoad() {
|
|
4089
4089
|
this._colorizeStyle = generateColorizeStyles();
|
|
4090
4090
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
4091
|
-
await arcadeDefaults.
|
|
4091
|
+
await arcadeDefaults.W(this, index.getAssetPath("./assets"));
|
|
4092
4092
|
}
|
|
4093
4093
|
disconnectedCallback() {
|
|
4094
4094
|
this._flowObserver?.disconnect();
|
|
4095
4095
|
this._themeChangedListner?.dispose();
|
|
4096
|
-
arcadeDefaults.
|
|
4096
|
+
arcadeDefaults.B(this);
|
|
4097
4097
|
}
|
|
4098
4098
|
// #endregion
|
|
4099
4099
|
//#region Private Methods
|
|
@@ -4111,7 +4111,7 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4111
4111
|
// When switching between flow the same reference is reused
|
|
4112
4112
|
this._flowObserver = new MutationObserver(() => {
|
|
4113
4113
|
// Get the last panel and try to set focus on the input element
|
|
4114
|
-
arcadeDefaults.
|
|
4114
|
+
arcadeDefaults.j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4115
4115
|
});
|
|
4116
4116
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4117
4117
|
}
|
|
@@ -4207,10 +4207,10 @@ const ArcgisArcadeVariables = class {
|
|
|
4207
4207
|
//#endregion
|
|
4208
4208
|
// #region Component lifecycle events
|
|
4209
4209
|
async componentWillLoad() {
|
|
4210
|
-
await arcadeDefaults.
|
|
4210
|
+
await arcadeDefaults.W(this, index.getAssetPath("./assets"));
|
|
4211
4211
|
}
|
|
4212
4212
|
disconnectedCallback() {
|
|
4213
|
-
arcadeDefaults.
|
|
4213
|
+
arcadeDefaults.B(this);
|
|
4214
4214
|
this._flowObserver?.disconnect();
|
|
4215
4215
|
}
|
|
4216
4216
|
// #endregion
|
|
@@ -4235,7 +4235,7 @@ const ArcgisArcadeVariables = class {
|
|
|
4235
4235
|
// When switching between flow the same reference is reused
|
|
4236
4236
|
this._flowObserver = new MutationObserver(() => {
|
|
4237
4237
|
// Get the last panel and try to set focus on the input element
|
|
4238
|
-
arcadeDefaults.
|
|
4238
|
+
arcadeDefaults.j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4239
4239
|
});
|
|
4240
4240
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4241
4241
|
}
|
|
@@ -4263,7 +4263,7 @@ const ArcgisArcadeVariables = class {
|
|
|
4263
4263
|
}
|
|
4264
4264
|
renderEditorVariables(collection) {
|
|
4265
4265
|
// Filter the variables. Skip group, we will filter the children later on.
|
|
4266
|
-
const filterExpression = arcadeDefaults.
|
|
4266
|
+
const filterExpression = arcadeDefaults.Q(this._filterValue);
|
|
4267
4267
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
4268
4268
|
if (!filteredVariables.length) {
|
|
4269
4269
|
return index.h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
|
|
@@ -4314,7 +4314,7 @@ const ArcgisCodeEditor = class {
|
|
|
4314
4314
|
constructor(hostRef) {
|
|
4315
4315
|
index.registerInstance(this, hostRef);
|
|
4316
4316
|
this.valueChange = index.createEvent(this, "valueChange", 3);
|
|
4317
|
-
this._componentReadyDefer = new arcadeDefaults.
|
|
4317
|
+
this._componentReadyDefer = new arcadeDefaults.h();
|
|
4318
4318
|
this._disposables = [];
|
|
4319
4319
|
this.value = undefined;
|
|
4320
4320
|
this.language = undefined;
|
|
@@ -4483,7 +4483,7 @@ const ArcgisCodeEditor = class {
|
|
|
4483
4483
|
// This is called the first time and subsequently by the Mutation Observer
|
|
4484
4484
|
// Figure out the theme by walking the ancestor path.
|
|
4485
4485
|
// If no theme is found then default to light.
|
|
4486
|
-
const theme = arcadeDefaults
|
|
4486
|
+
const theme = arcadeDefaults.$(this._hostElt) === "light" ? "vs" : "vs-dark";
|
|
4487
4487
|
if (theme === this._currentTheme) {
|
|
4488
4488
|
return;
|
|
4489
4489
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const typescript = require('./typescript-
|
|
4
|
-
require('./arcade-defaults-
|
|
3
|
+
const typescript = require('./typescript-c43b7258.js');
|
|
4
|
+
require('./arcade-defaults-5c2ff166.js');
|
|
5
5
|
require('./index-ac186201.js');
|
|
6
6
|
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-5c2ff166.js');
|
|
4
4
|
require('./index-ac186201.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -3,7 +3,7 @@ import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertM
|
|
|
3
3
|
import { S as StickyFilterInput } from './functional-components.js';
|
|
4
4
|
import { f as filterCollection } from './utilities.js';
|
|
5
5
|
import { Uri } from 'monaco-editor';
|
|
6
|
-
import {
|
|
6
|
+
import { W, B, j, G } from './index2.js';
|
|
7
7
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
8
8
|
import { g as getArcadeWorker } from './arcade-contribution.js';
|
|
9
9
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
@@ -78,7 +78,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
|
|
|
78
78
|
async componentWillLoad() {
|
|
79
79
|
this._colorizeStyle = generateColorizeStyles();
|
|
80
80
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
81
|
-
await
|
|
81
|
+
await W(this, getAssetPath("./assets"));
|
|
82
82
|
arcadeDefaults.onModelContextDidChange((key) => {
|
|
83
83
|
if (!this.modelId || key !== Uri.parse(this.modelId).toString()) {
|
|
84
84
|
return;
|
|
@@ -88,7 +88,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
|
|
|
88
88
|
this._updateApiLibrary();
|
|
89
89
|
}
|
|
90
90
|
disconnectedCallback() {
|
|
91
|
-
|
|
91
|
+
B(this);
|
|
92
92
|
this._flowObserver?.disconnect();
|
|
93
93
|
this._themeChangedListner?.dispose();
|
|
94
94
|
}
|
|
@@ -133,7 +133,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
|
|
|
133
133
|
// When switching between flow the same reference is reused
|
|
134
134
|
this._flowObserver = new MutationObserver(() => {
|
|
135
135
|
// Get the last panel and try to set focus on the input element
|
|
136
|
-
|
|
136
|
+
j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
137
137
|
});
|
|
138
138
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
139
139
|
}
|
|
@@ -144,14 +144,14 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
|
|
|
144
144
|
if (!filteredApiItems.length) {
|
|
145
145
|
return null;
|
|
146
146
|
}
|
|
147
|
-
return (h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (h("calcite-list-item", { label:
|
|
147
|
+
return (h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (h("calcite-list-item", { label: G(apiItem.completion.detail), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": apiItem }, h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "Expand", icon: "chevron-right", iconFlipRtl: true, scale: "s", onClick: this._selectItem, "data-item": apiItem }))))));
|
|
148
148
|
}
|
|
149
149
|
renderApiItemFlowItem() {
|
|
150
150
|
const apiItem = this._selectedApiItem;
|
|
151
151
|
if (!apiItem) {
|
|
152
152
|
return null;
|
|
153
153
|
}
|
|
154
|
-
return (h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => void e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), h("calcite-block", { open: true, heading:
|
|
154
|
+
return (h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => void e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), h("calcite-block", { open: true, heading: G(apiItem.completion.detail) }, h("div", { innerHTML: convertMarkdownString(apiItem.completion.documentation) }), apiItem.examples ? (h("div", { ref: (e) => {
|
|
155
155
|
if (!e) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { languages } from 'monaco-editor';
|
|
2
2
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
3
3
|
import { c as importRequest } from './fields.js';
|
|
4
|
-
import {
|
|
4
|
+
import { n as ne, t as te } from './index2.js';
|
|
5
5
|
|
|
6
6
|
function isMonacoEnvironmentSetup() {
|
|
7
7
|
return !!globalThis.MonacoEnvironment?.getWorkerUrl;
|
|
@@ -42,7 +42,7 @@ function setupMonacoEnvironment(assetsPath) {
|
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
// If we have a relative path or we are on same orgin, we can use the default js implementation
|
|
45
|
-
if (!
|
|
45
|
+
if (!ne(url) || te(url, globalThis.location.href, true)) {
|
|
46
46
|
return new Worker(url, { name: languageId });
|
|
47
47
|
}
|
|
48
48
|
// For cross orgin, we will load the worker code as a string and manufacture a blob
|
|
@@ -2,7 +2,7 @@ import { Emitter, Uri } from 'monaco-editor';
|
|
|
2
2
|
import { CompletionItemKind, InsertTextMode, InsertTextFormat } from 'vscode-languageserver-types';
|
|
3
3
|
import { i as importPortalPortalItem, a as importLayersFeatureLayer, b as importWebMap, s as supportedFields, c as importRequest, f as fieldTypeToIconName, d as fieldTypeToArcadeType } from './fields.js';
|
|
4
4
|
import { p as portalItemPageUrl } from './utilities.js';
|
|
5
|
-
import {
|
|
5
|
+
import { V, X, G, D, E, N } from './index2.js';
|
|
6
6
|
import { getAssetPath } from '@stencil/core/internal/client';
|
|
7
7
|
|
|
8
8
|
async function newPortalItem(definition) {
|
|
@@ -418,9 +418,9 @@ class ProfileItemBase {
|
|
|
418
418
|
// If the component is under RTL, the string is messed up.
|
|
419
419
|
// It is converted from $feature to feature$, This is not acceptable since the label
|
|
420
420
|
// represents a variable name. We are adding in front of the $ sign a right to left mark.
|
|
421
|
-
return
|
|
421
|
+
return G(this._label);
|
|
422
422
|
}
|
|
423
|
-
return
|
|
423
|
+
return D(this._profile?.intlStrings[this._label.code], this._label.formatValues);
|
|
424
424
|
}
|
|
425
425
|
/**
|
|
426
426
|
* Returns the description string.
|
|
@@ -432,7 +432,7 @@ class ProfileItemBase {
|
|
|
432
432
|
if (typeof this.description === "string") {
|
|
433
433
|
return this.description;
|
|
434
434
|
}
|
|
435
|
-
return
|
|
435
|
+
return D(this._profile?.intlStrings[this.description.code ?? ""], this.description.formatValues);
|
|
436
436
|
}
|
|
437
437
|
/**
|
|
438
438
|
* Returns true if the item pass the filter test
|
|
@@ -666,7 +666,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
666
666
|
return this._profile?.intlStrings.layer ?? "layer";
|
|
667
667
|
}
|
|
668
668
|
async loadSource() {
|
|
669
|
-
if (
|
|
669
|
+
if (V(this._loadPromise) && X(this._loadPromise)) {
|
|
670
670
|
return await this._loadPromise;
|
|
671
671
|
}
|
|
672
672
|
this._loadPromise = this._loadSource();
|
|
@@ -783,7 +783,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
783
783
|
nonInteractive: true
|
|
784
784
|
}, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
|
|
785
785
|
}));
|
|
786
|
-
relationshipsGroup.variables = relationshipItems.filter(
|
|
786
|
+
relationshipsGroup.variables = relationshipItems.filter(V);
|
|
787
787
|
if (!relationshipsGroup.variables.length) {
|
|
788
788
|
return null;
|
|
789
789
|
}
|
|
@@ -941,7 +941,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
941
941
|
return this._profile?.intlStrings.featureservice ?? "featureservice";
|
|
942
942
|
}
|
|
943
943
|
async loadSource() {
|
|
944
|
-
if (
|
|
944
|
+
if (V(this._loadPromise) && X(this._loadPromise)) {
|
|
945
945
|
return await this._loadPromise;
|
|
946
946
|
}
|
|
947
947
|
this._loadPromise = this._loadSource();
|
|
@@ -1177,7 +1177,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
|
|
|
1177
1177
|
if (profiles) {
|
|
1178
1178
|
return profiles;
|
|
1179
1179
|
}
|
|
1180
|
-
if (!
|
|
1180
|
+
if (!E.has(locale)) {
|
|
1181
1181
|
return await getSdkPredefinedProfiles("en");
|
|
1182
1182
|
}
|
|
1183
1183
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { e as importArcade, s as supportedFields } from './fields.js';
|
|
3
|
-
import {
|
|
3
|
+
import { W, B, D, q } from './index2.js';
|
|
4
4
|
import '@esri/calcite-components/dist/components/calcite-loader.js';
|
|
5
5
|
import '@esri/calcite-components/dist/components/calcite-list.js';
|
|
6
6
|
import '@esri/calcite-components/dist/components/calcite-list-item.js';
|
|
@@ -288,10 +288,10 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
288
288
|
//#endregion
|
|
289
289
|
// #region Component lifecycle events
|
|
290
290
|
async componentWillLoad() {
|
|
291
|
-
await
|
|
291
|
+
await W(this, getAssetPath("./assets"));
|
|
292
292
|
}
|
|
293
293
|
disconnectedCallback() {
|
|
294
|
-
|
|
294
|
+
B(this);
|
|
295
295
|
}
|
|
296
296
|
// #endregion
|
|
297
297
|
//#region Private Methods
|
|
@@ -318,18 +318,18 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
318
318
|
return h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
|
|
319
319
|
}
|
|
320
320
|
const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
|
|
321
|
-
return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label:
|
|
321
|
+
return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label: D(this._t9nStrings?.lastexecutionformat, {
|
|
322
322
|
timeStamp: new Intl.DateTimeFormat(this._t9nLocale, {
|
|
323
323
|
dateStyle: "medium",
|
|
324
324
|
timeStyle: "medium"
|
|
325
325
|
}).format(this.result.timeStamp)
|
|
326
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label:
|
|
326
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: D(this._t9nStrings?.compilationtimeformat, {
|
|
327
327
|
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
328
328
|
style: "unit",
|
|
329
329
|
unit: "millisecond",
|
|
330
330
|
maximumFractionDigits: 2
|
|
331
331
|
}).format(this.result.compilationTime ?? 0)
|
|
332
|
-
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label:
|
|
332
|
+
}) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: D(this._t9nStrings?.executiontimeformat, {
|
|
333
333
|
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
334
334
|
style: "unit",
|
|
335
335
|
unit: "millisecond",
|
|
@@ -346,7 +346,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
346
346
|
}
|
|
347
347
|
switch (this.result?.type) {
|
|
348
348
|
case "error":
|
|
349
|
-
return (h("div", { class: "result-value-simple flex-adjustable" },
|
|
349
|
+
return (h("div", { class: "result-value-simple flex-adjustable" }, D(this._t9nStrings?.executionerrorformat, {
|
|
350
350
|
message: this.result.value
|
|
351
351
|
})));
|
|
352
352
|
case "null":
|
|
@@ -387,7 +387,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
387
387
|
case "null":
|
|
388
388
|
return h("span", { class: "constant-value" }, arcadeResult.type);
|
|
389
389
|
case "text":
|
|
390
|
-
return h("span", { class: "string-value" },
|
|
390
|
+
return h("span", { class: "string-value" }, q(arcadeResult.value));
|
|
391
391
|
case "number":
|
|
392
392
|
return h("span", { class: "number-value" }, arcadeResult.value.toString());
|
|
393
393
|
case "boolean":
|
|
@@ -395,9 +395,9 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
395
395
|
case "date":
|
|
396
396
|
return h("span", { class: "date-value" }, formatArcadeResultDate(arcadeResult));
|
|
397
397
|
case "dateOnly":
|
|
398
|
-
return h("span", { class: "string-value" },
|
|
398
|
+
return h("span", { class: "string-value" }, q(formatArcadeResultDateOnly(arcadeResult)));
|
|
399
399
|
case "time":
|
|
400
|
-
return h("span", { class: "string-value" },
|
|
400
|
+
return h("span", { class: "string-value" }, q(formatArcadeResultTimeOnly(arcadeResult)));
|
|
401
401
|
default:
|
|
402
402
|
return null;
|
|
403
403
|
}
|
|
@@ -405,7 +405,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
405
405
|
renderArrayHeader(arcadeResult) {
|
|
406
406
|
const items = arcadeResult.value ?? [];
|
|
407
407
|
const leftoverCount = Math.max(items.length - MaxArrayItems, 0);
|
|
408
|
-
return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0",
|
|
408
|
+
return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0", D(this._t9nStrings?.showingfirstitemsformat, {
|
|
409
409
|
count: MaxArrayItems.toString()
|
|
410
410
|
}))) : null));
|
|
411
411
|
}
|
|
@@ -457,7 +457,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
renderFeatureSetLabel(arcadeResult) {
|
|
460
|
-
return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0",
|
|
460
|
+
return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0", D(this._t9nStrings?.showingfirstitemsformat, {
|
|
461
461
|
count: BatchSize.toString()
|
|
462
462
|
}))) : null));
|
|
463
463
|
}
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Host } f
|
|
|
2
2
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
|
|
3
3
|
import { S as StickyFilterInput } from './functional-components.js';
|
|
4
4
|
import { f as filterCollection } from './utilities.js';
|
|
5
|
-
import {
|
|
5
|
+
import { W, B, j } from './index2.js';
|
|
6
6
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
7
7
|
import '@esri/calcite-components/dist/components/calcite-list-item.js';
|
|
8
8
|
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
@@ -72,12 +72,12 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
72
72
|
async componentWillLoad() {
|
|
73
73
|
this._colorizeStyle = generateColorizeStyles();
|
|
74
74
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
75
|
-
await
|
|
75
|
+
await W(this, getAssetPath("./assets"));
|
|
76
76
|
}
|
|
77
77
|
disconnectedCallback() {
|
|
78
78
|
this._flowObserver?.disconnect();
|
|
79
79
|
this._themeChangedListner?.dispose();
|
|
80
|
-
|
|
80
|
+
B(this);
|
|
81
81
|
}
|
|
82
82
|
// #endregion
|
|
83
83
|
//#region Private Methods
|
|
@@ -95,7 +95,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
95
95
|
// When switching between flow the same reference is reused
|
|
96
96
|
this._flowObserver = new MutationObserver(() => {
|
|
97
97
|
// Get the last panel and try to set focus on the input element
|
|
98
|
-
|
|
98
|
+
j(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
99
99
|
});
|
|
100
100
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
101
101
|
}
|