@arcgis/coding-components 4.31.0-next.42 → 4.31.0-next.44
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 +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +2 -2
- package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +30 -30
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-f320fedc.js → p-0fbc32d2.js} +2 -2
- package/dist/arcgis-coding-components/{p-0437e32a.js → p-10c8ae32.js} +2 -2
- package/dist/arcgis-coding-components/{p-ca3cb6f1.js → p-1ce71af1.js} +2 -2
- package/dist/arcgis-coding-components/{p-68c0a00c.entry.js → p-32edb73d.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-40f41b6b.js → p-4579dae2.js} +1 -1
- package/dist/arcgis-coding-components/{p-d4ea5f6c.js → p-63baa9d1.js} +2 -2
- package/dist/arcgis-coding-components/{p-548ccdc0.js → p-7a21b868.js} +2 -2
- package/dist/arcgis-coding-components/{p-48e94cb8.js → p-7b6fce33.js} +2 -2
- package/dist/arcgis-coding-components/{p-42eb6740.entry.js → p-8187aea9.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-7f5e7f4d.js → p-8748e511.js} +2 -2
- package/dist/arcgis-coding-components/{p-813d9b8d.js → p-91f66888.js} +2 -2
- package/dist/arcgis-coding-components/{p-00257dcb.js → p-9913b695.js} +1 -1
- package/dist/arcgis-coding-components/{p-46c641f5.js → p-afb89798.js} +2 -2
- package/dist/arcgis-coding-components/{p-a9f90e38.js → p-b5bc4adf.js} +3 -3
- package/dist/arcgis-coding-components/{p-6500bffb.entry.js → p-bdfa1eba.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-65d25b8a.js → p-ce42e542.js} +9 -9
- package/dist/arcgis-coding-components/{p-791699a8.js → p-d1fae0a5.js} +2 -2
- package/dist/arcgis-coding-components/{p-30708ad2.js → p-e45080f2.js} +1 -1
- package/dist/cjs/{app-globals-dd1a4c87.js → app-globals-0cb3c91a.js} +1 -1
- package/dist/cjs/{arcade-defaults-79ea80ff.js → arcade-defaults-c20c8ca9.js} +4 -4
- package/dist/cjs/{arcade-mode-f3f6dd13.js → arcade-mode-6ad96515.js} +2 -2
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +5 -5
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-dbe404fa.js → css-de580380.js} +1 -1
- package/dist/cjs/{cssMode-68ba897c.js → cssMode-7cc60e13.js} +2 -2
- package/dist/cjs/{html-e69a51e0.js → html-aaabd1d0.js} +2 -2
- package/dist/cjs/{htmlMode-96a6aa10.js → htmlMode-08b857a8.js} +2 -2
- package/dist/cjs/{index-ba60f992.js → index-f1e3bda2.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-ead18b15.js → javascript-60ec56ed.js} +3 -3
- package/dist/cjs/{jsonMode-9d11e262.js → jsonMode-8677abde.js} +2 -2
- package/dist/cjs/{language-defaults-base-8c585bae.js → language-defaults-base-f9ce7082.js} +9 -9
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-1fbf01a6.js → sql-expr-defaults-c95f53ab.js} +4 -4
- package/dist/cjs/{sql-expr-mode-9e406810.js → sql-expr-mode-61c7726d.js} +4 -4
- package/dist/cjs/{tsMode-a95062f3.js → tsMode-604a3210.js} +2 -2
- package/dist/cjs/{typescript-1835b209.js → typescript-0ddb117f.js} +2 -2
- package/dist/components/arcade-defaults.js +1 -1
- 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-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/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-ZZIYM65N.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/language-defaults-base.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +1 -1
- package/dist/components/sql-expression-fields.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-b974eb47.js → app-globals-53e8d661.js} +1 -1
- package/dist/esm/{arcade-defaults-b39b8a70.js → arcade-defaults-06e628f0.js} +4 -4
- package/dist/esm/{arcade-mode-cf3d2e01.js → arcade-mode-3a332522.js} +2 -2
- package/dist/esm/arcgis-arcade-editor_6.entry.js +5 -5
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-b835f421.js → css-5f2653da.js} +1 -1
- package/dist/esm/{cssMode-1ad6a28e.js → cssMode-7b9cc3c3.js} +2 -2
- package/dist/esm/{html-2cfc6097.js → html-6bd8edb4.js} +2 -2
- package/dist/esm/{htmlMode-44b94902.js → htmlMode-bf16a7b0.js} +2 -2
- package/dist/esm/{index-1d04de34.js → index-032f5d65.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-de1e9123.js → javascript-4ae5629b.js} +3 -3
- package/dist/esm/{jsonMode-6a43d713.js → jsonMode-d51a96d0.js} +2 -2
- package/dist/esm/{language-defaults-base-dc51d645.js → language-defaults-base-78ee511e.js} +9 -9
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-acc71ee8.js → sql-expr-defaults-daf133e3.js} +4 -4
- package/dist/esm/{sql-expr-mode-1b4cd745.js → sql-expr-mode-bd974d38.js} +4 -4
- package/dist/esm/{tsMode-a57c248b.js → tsMode-13d37083.js} +2 -2
- package/dist/esm/{typescript-c72370d8.js → typescript-48d05f38.js} +2 -2
- 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/package.json +11 -11
|
@@ -77,17 +77,17 @@
|
|
|
77
77
|
"name": "extract",
|
|
78
78
|
"bundle": "date",
|
|
79
79
|
"description": "Returns a single part of a datetime, such as year, month, day, hour, minute, or second.",
|
|
80
|
-
"examples": "\n##### Examples\n\nReturns 12\n\n```sql\nEXTRACT(MONTH FROM '12/21/2016')\n```\n\nReturns 21\n\n```sql\nEXTRACT(DAY FROM '12/21/2016 12:00')\n```\n\nReturns 30\n\n```sql\nEXTRACT(
|
|
80
|
+
"examples": "\n##### Examples\n\nReturns 12\n\n```sql\nEXTRACT(MONTH FROM DATE '12/21/2016')\n```\n\nReturns 21\n\n```sql\nEXTRACT(DAY FROM TIMESTAMP '12/21/2016 12:00')\n```\n\nReturns 30\n\n```sql\nEXTRACT(SECOND FROM TIME '10:50:30')\n```\n\n",
|
|
81
81
|
"completion": {
|
|
82
82
|
"label": "EXTRACT",
|
|
83
83
|
"detail": "EXTRACT(part, datetime) -> Number",
|
|
84
|
-
"insertText": "EXTRACT(${1:part_}
|
|
84
|
+
"insertText": "EXTRACT(${1:part_} FROM ${2:datetime_})$0",
|
|
85
85
|
"insertTextMode": 2,
|
|
86
86
|
"insertTextFormat": 2,
|
|
87
87
|
"kind": 3,
|
|
88
88
|
"documentation": {
|
|
89
89
|
"kind": "markdown",
|
|
90
|
-
"value": "Returns a single part of a datetime, such as year, month, day, hour, minute, or second.\n\n**Parameters**\n\n- **part**: The part to extract from the date. Possible values: `YEAR`, `MONTH`, `DAY`, `HOUR`, `MINUTE`, `SECOND
|
|
90
|
+
"value": "Returns a single part of a datetime, such as year, month, day, hour, minute, or second.\n\n**Parameters**\n\n- **part**: The part to extract from the date. Possible values: `YEAR`, `MONTH`, `DAY`, `HOUR`, `MINUTE`, `SECOND`.\n- **datetime**: The date to extract a part from.\n\n**Return value**:"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"parametersInfo": {
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"type": "function",
|
|
129
129
|
"name": "acos",
|
|
130
130
|
"bundle": "numeric",
|
|
131
|
-
"description": "Returns the arc cosine of a number.
|
|
132
|
-
"examples": "\n##### Example\n\nReturns 1.
|
|
131
|
+
"description": "Returns the arc cosine of a number.",
|
|
132
|
+
"examples": "\n##### Example\n\nReturns 1.26610367\n\n```sql\nACOS(0.3)\n```\n\n",
|
|
133
133
|
"completion": {
|
|
134
134
|
"label": "ACOS",
|
|
135
135
|
"detail": "ACOS(number) -> Number",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"kind": 3,
|
|
140
140
|
"documentation": {
|
|
141
141
|
"kind": "markdown",
|
|
142
|
-
"value": "Returns the arc cosine of a number
|
|
142
|
+
"value": "Returns the arc cosine of a number.\n\n**Parameter**\n\n- **number**: A number between -1 and 1 on which to perform the operation.\n\n**Return value**:"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
"parametersInfo": {
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"type": "function",
|
|
152
152
|
"name": "asin",
|
|
153
153
|
"bundle": "numeric",
|
|
154
|
-
"description": "Returns the arc sine of a number.
|
|
155
|
-
"examples": "\n##### Example\n\nReturns 0.
|
|
154
|
+
"description": "Returns the arc sine of a number.",
|
|
155
|
+
"examples": "\n##### Example\n\nReturns 0.30469265\n\n```sql\nASIN(0.3)\n```\n\n",
|
|
156
156
|
"completion": {
|
|
157
157
|
"label": "ASIN",
|
|
158
158
|
"detail": "ASIN(number) -> Number",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"kind": 3,
|
|
163
163
|
"documentation": {
|
|
164
164
|
"kind": "markdown",
|
|
165
|
-
"value": "Returns the arc sine of a number
|
|
165
|
+
"value": "Returns the arc sine of a number.\n\n**Parameter**\n\n- **number**: A number between -1 and 1 on which to perform the operation.\n\n**Return value**:"
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
"parametersInfo": {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"name": "atan",
|
|
176
176
|
"bundle": "numeric",
|
|
177
177
|
"description": "Returns the arc tangent of a number.",
|
|
178
|
-
"examples": "\n##### Example\n\nReturns 0.
|
|
178
|
+
"examples": "\n##### Example\n\nReturns 0.78539816\n\n```sql\nATAN(1)\n```\n\n",
|
|
179
179
|
"completion": {
|
|
180
180
|
"label": "ATAN",
|
|
181
181
|
"detail": "ATAN(number) -> Number",
|
|
@@ -202,13 +202,13 @@
|
|
|
202
202
|
"completion": {
|
|
203
203
|
"label": "CAST",
|
|
204
204
|
"detail": "CAST(value, dataType) -> Number,Datetime,String",
|
|
205
|
-
"insertText": "CAST(${1:value_}
|
|
205
|
+
"insertText": "CAST(${1:value_} AS ${2:dataType_})$0",
|
|
206
206
|
"insertTextMode": 2,
|
|
207
207
|
"insertTextFormat": 2,
|
|
208
208
|
"kind": 3,
|
|
209
209
|
"documentation": {
|
|
210
210
|
"kind": "markdown",
|
|
211
|
-
"value": "Converts a value from one data type to another. The dataType parameter will determine what type the value is converted to. FLOAT converts the value to a double, INTEGER converts the value to an integer, etc.\n\n**Parameters**\n\n- **value**: The value to convert to another data type.\n- **dataType**: The data type to convert the value to. Possible values: `DATE`, `FLOAT`, `INTEGER`, `REAL`, `SMALLINT`, `TIME`, `TIMESTAMP`, `VARCHAR
|
|
211
|
+
"value": "Converts a value from one data type to another. The dataType parameter will determine what type the value is converted to. FLOAT converts the value to a double, INTEGER converts the value to an integer, etc.\n\n**Parameters**\n\n- **value**: The value to convert to another data type.\n- **dataType**: The data type to convert the value to. Possible values: `DATE`, `FLOAT`, `INTEGER`, `REAL`, `SMALLINT`, `TIME`, `TIMESTAMP`, `VARCHAR`.\n\n**Return value**:"
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
214
|
"parametersInfo": {
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"name": "cos",
|
|
245
245
|
"bundle": "numeric",
|
|
246
246
|
"description": "Returns the trigonometric cosine of the number, which is assumed to be an angle in radians.",
|
|
247
|
-
"examples": "\n##### Example\n\nReturns -0.
|
|
247
|
+
"examples": "\n##### Example\n\nReturns -0.41614684\n\n```sql\nCOS(2)\n```\n\n",
|
|
248
248
|
"completion": {
|
|
249
249
|
"label": "COS",
|
|
250
250
|
"detail": "COS(number) -> Number",
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
"kind": 3,
|
|
301
301
|
"documentation": {
|
|
302
302
|
"kind": "markdown",
|
|
303
|
-
"value": "Returns the natural logarithm (base e) of the number.\n\n**Parameter**\n\n- **number**: A number on which to perform the operation.\n\n**Return value**:"
|
|
303
|
+
"value": "Returns the natural logarithm (base e) of the number.\n\n**Parameter**\n\n- **number**: A number greater than 0 on which to perform the operation.\n\n**Return value**:"
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
306
|
"parametersInfo": {
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
"name": "nullif",
|
|
360
360
|
"bundle": "numeric",
|
|
361
361
|
"description": "Returns `NULL` if expression1 is equal to expression2. NULLIF is commonly used to prevent divide-by-zero errors by setting expression2 to 0.",
|
|
362
|
-
"examples": "\n##### Examples\n\nReturns `null`\n\n```sql\nNULLIF(
|
|
362
|
+
"examples": "\n##### Examples\n\nReturns `null`\n\n```sql\nNULLIF('Monday', 'Monday')\n```\n\nReturns 32\n\n```sql\nNULLIF(32, 0)\n```\n\nReturns `null` if POP18 is equal to 0, otherwise, returns the value of TOTALPOP / POP18.\n\n```sql\nTOTALPOP / NULLIF(POP18, 0)\n```\n\n",
|
|
363
363
|
"completion": {
|
|
364
364
|
"label": "NULLIF",
|
|
365
365
|
"detail": "NULLIF(expression1, expression2) -> Number,String,Datetime",
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
"name": "sin",
|
|
452
452
|
"bundle": "numeric",
|
|
453
453
|
"description": "Returns the trigonometric sine of the number, which is assumed to be an angle in radians.",
|
|
454
|
-
"examples": "\n##### Example\n\nReturns 0.
|
|
454
|
+
"examples": "\n##### Example\n\nReturns 0.84147098\n\n```sql\nSIN(1)\n```\n\n",
|
|
455
455
|
"completion": {
|
|
456
456
|
"label": "SIN",
|
|
457
457
|
"detail": "SIN(number) -> Number",
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
"name": "tan",
|
|
475
475
|
"bundle": "numeric",
|
|
476
476
|
"description": "Returns the tangent of a number, which is assumed to be an angle in radians.",
|
|
477
|
-
"examples": "\n##### Example\n\nReturns 2.
|
|
477
|
+
"examples": "\n##### Example\n\nReturns 2.57215162\n\n```sql\nTAN(1.2)\n```\n\n",
|
|
478
478
|
"completion": {
|
|
479
479
|
"label": "TAN",
|
|
480
480
|
"detail": "TAN(number) -> Number",
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
"name": "truncate",
|
|
498
498
|
"bundle": "numeric",
|
|
499
499
|
"description": "Returns a truncated number.",
|
|
500
|
-
"examples": "\n##### Examples\n\nReturns 91.3\n\n```sql\nTRUNCATE(91.367, 1)\n```\n\nReturns 124\n\n```sql\nTRUNCATE(124.45, 0)\n```\n\nReturns 1900\n\n```sql\nTRUNCATE(1982.83
|
|
500
|
+
"examples": "\n##### Examples\n\nReturns 91.3\n\n```sql\nTRUNCATE(91.367, 1)\n```\n\nReturns 124\n\n```sql\nTRUNCATE(124.45, 0)\n```\n\nReturns 1900\n\n```sql\nTRUNCATE(1982.83, -2)\n```\n\n",
|
|
501
501
|
"completion": {
|
|
502
502
|
"label": "TRUNCATE",
|
|
503
503
|
"detail": "TRUNCATE(number, decimals) -> Number",
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
"name": "coalesce",
|
|
550
550
|
"bundle": "string",
|
|
551
551
|
"description": "Returns the first value in the list that is not `NULL`.",
|
|
552
|
-
"examples": "\n##### Examples\n\nReturns 'Green goldfish'\n\n```sql\nCOALESCE(
|
|
552
|
+
"examples": "\n##### Examples\n\nReturns 'Green goldfish'\n\n```sql\nCOALESCE(null, null, 'Green goldfish', null, 'Purple cow')\n```\n\nReturns -21\n\n```sql\nCOALESCE(null, -21, 33, null)\n```\n\n",
|
|
553
553
|
"completion": {
|
|
554
554
|
"label": "COALESCE",
|
|
555
555
|
"detail": "COALESCE(val_1, val_2, val_n) -> String,Number",
|
|
@@ -618,17 +618,17 @@
|
|
|
618
618
|
"name": "position",
|
|
619
619
|
"bundle": "string",
|
|
620
620
|
"description": "Returns the first occurrence of a substring in another text string. Returns 0 if the substring is not found.",
|
|
621
|
-
"examples": "\n##### Examples\n\nReturns 6\n\n```sql\nPOSITION('com'
|
|
621
|
+
"examples": "\n##### Examples\n\nReturns 6\n\n```sql\nPOSITION('com' IN 'esri.com')\n```\n\nReturns 9\n\n```sql\nPOSITION('sum' IN 'Lorem ipsum')\n```\n\n",
|
|
622
622
|
"completion": {
|
|
623
623
|
"label": "POSITION",
|
|
624
624
|
"detail": "POSITION(substring, string) -> Number",
|
|
625
|
-
"insertText": "POSITION(${1:substring_}
|
|
625
|
+
"insertText": "POSITION(${1:substring_} IN ${2:string_})$0",
|
|
626
626
|
"insertTextMode": 2,
|
|
627
627
|
"insertTextFormat": 2,
|
|
628
628
|
"kind": 3,
|
|
629
629
|
"documentation": {
|
|
630
630
|
"kind": "markdown",
|
|
631
|
-
"value": "Returns the first occurrence of a substring in another text string. Returns 0 if the substring is not found.\n\n**Parameters**\n\n- **substring**: The text string to search for
|
|
631
|
+
"value": "Returns the first occurrence of a substring in another text string. Returns 0 if the substring is not found.\n\n**Parameters**\n\n- **substring**: The text string to search for.\n- **string**: The string that will be searched for the substring.\n\n**Return value**:"
|
|
632
632
|
}
|
|
633
633
|
},
|
|
634
634
|
"parametersInfo": {
|
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
"completion": {
|
|
670
670
|
"label": "SUBSTRING",
|
|
671
671
|
"detail": "SUBSTRING(string, start, length) -> String",
|
|
672
|
-
"insertText": "SUBSTRING(${1:string_}
|
|
672
|
+
"insertText": "SUBSTRING(${1:string_} FROM ${2:start_} FOR ${3:length_})$0",
|
|
673
673
|
"insertTextMode": 2,
|
|
674
674
|
"insertTextFormat": 2,
|
|
675
675
|
"kind": 3,
|
|
@@ -688,23 +688,23 @@
|
|
|
688
688
|
"type": "function",
|
|
689
689
|
"name": "trim",
|
|
690
690
|
"bundle": "string",
|
|
691
|
-
"description": "Returns a text string where all of the leading and/or trailing spaces have been removed. LEADING will trim the leading side of the text string, TRAILING will trim the trailing side of the text string, while BOTH will trim both sides of the text string.",
|
|
692
|
-
"examples": "\n##### Examples\n\nReturns '
|
|
691
|
+
"description": "Returns a text string where all of the leading and/or trailing spaces or other specified characters have been removed. LEADING will trim the leading side of the text string, TRAILING will trim the trailing side of the text string, while BOTH will trim both sides of the text string.",
|
|
692
|
+
"examples": "\n##### Examples\n\nReturns 'myFunc'\n\n```sql\nTRIM(LEADING 't' FROM 'tMyFunc')\n```\n\nReturns ' hello world'\n\n```sql\nTRIM(TRAILING ' ' FROM ' hello world ')\n```\n\nReturns 'hello world'\n\n```sql\nTRIM(BOTH ' ' FROM ' hello world ')\n```\n\n",
|
|
693
693
|
"completion": {
|
|
694
694
|
"label": "TRIM",
|
|
695
|
-
"detail": "TRIM(side, string) -> String",
|
|
696
|
-
"insertText": "TRIM(${1:side_}
|
|
695
|
+
"detail": "TRIM(side, character, string) -> String",
|
|
696
|
+
"insertText": "TRIM(${1:side_} ${2:character_} FROM ${3:string_})$0",
|
|
697
697
|
"insertTextMode": 2,
|
|
698
698
|
"insertTextFormat": 2,
|
|
699
699
|
"kind": 3,
|
|
700
700
|
"documentation": {
|
|
701
701
|
"kind": "markdown",
|
|
702
|
-
"value": "Returns a text string where all of the leading and/or trailing spaces have been removed. LEADING will trim the leading side of the text string, TRAILING will trim the trailing side of the text string, while BOTH will trim both sides of the text string.\n\n**Parameters**\n\n- **side**: The side of the text string where
|
|
702
|
+
"value": "Returns a text string where all of the leading and/or trailing spaces or other specified characters have been removed. LEADING will trim the leading side of the text string, TRAILING will trim the trailing side of the text string, while BOTH will trim both sides of the text string.\n\n**Parameters**\n\n- **side**: The side of the text string where the space(s) or character(s) will be removed. Possible values: `LEADING`, `TRAILING`, `BOTH`.\n- **character**: The character(s) that will be trimmed from the text string.\n- **string**: The text string to trim.\n\n**Return value**:"
|
|
703
703
|
}
|
|
704
704
|
},
|
|
705
705
|
"parametersInfo": {
|
|
706
|
-
"min":
|
|
707
|
-
"max":
|
|
706
|
+
"min": 3,
|
|
707
|
+
"max": 3
|
|
708
708
|
}
|
|
709
709
|
},
|
|
710
710
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
export{a as arcade}from"./p-
|
|
6
|
+
export{a as arcade}from"./p-1ce71af1.js";import"./p-ce42e542.js";import"./p-e45080f2.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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{conf as e,language as t}from"./p-
|
|
6
|
+
import{conf as e,language as t}from"./p-91f66888.js";import"./p-ce42e542.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{M as t}from"./p-
|
|
6
|
+
import{M as t}from"./p-ce42e542.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{m as t,f as e,i as n,a,b as r,c as i,s,L as o,d as c,E as u,U as d}from"./p-
|
|
6
|
+
import{m as t,f as e,i as n,a,b as r,c as i,s,L as o,d as c,E as u,U as d}from"./p-ce42e542.js";import{g as l}from"./p-e45080f2.js";async function p(){return(await f()).getArcadeDiagnosticService()}async function f(){return await import("./p-d1fae0a5.js")}async function y(n,a=t.exports.CompletionItemKind.Variable){return await Promise.all(n.map((async n=>{switch(n.type){case"dictionary":return await async function(e,n){const{name:a,dictionaryVariables:r}=e,i=e.getDescription(),s=r.reduce(((t,e)=>{""!==t&&(t+=" \n \n"),t+=`**${e.name}** \n${e.type}`;const n=e.getDescription();return n&&(t+=` \n${n}`),t}),i);return{name:a,description:i,type:"dictionary",properties:await y(r,t.exports.CompletionItemKind.Field),completion:{label:a,detail:a,insertText:a,insertTextMode:t.exports.InsertTextMode.asIs,insertTextFormat:t.exports.InsertTextFormat.PlainText,kind:n,documentation:{kind:"markdown",value:s}}}}(n,a);case"feature":return await async function(n,a){const r=await n.loadSource(),{name:i}=n,s=n.getDescription(),o={label:i,detail:i,insertText:i,insertTextMode:t.exports.InsertTextMode.asIs,insertTextFormat:t.exports.InsertTextFormat.PlainText,kind:a},c={name:i,description:s,type:"dictionary",properties:[],completion:o};if(!r)return c;const[u,d]=e(r.fields,s,!0);return c.properties=u,o.documentation={kind:"markdown",value:d},c}(n,a);default:return function(e,n){const{name:a,type:r}=e,i=e.getDescription();return{name:a,description:i,type:r,completion:{label:a,detail:a,insertText:a,insertTextMode:t.exports.InsertTextMode.asIs,insertTextFormat:t.exports.InsertTextFormat.PlainText,kind:n,documentation:{kind:"markdown",value:i}}}}(n,a)}})))}async function w(t="en"){const e=m.get(t);if(e)return e;if(!s.has(t))return await w("en");try{const e=await fetch(l(`./assets/arcade-language/profiles/arcade-profiles.t9n.${t}.json`));return e.ok?function(t,e){const n=new Map;return e.forEach((t=>{n.set(t.id,t)})),m.set(t,n),n}(t,await e.json()):"en"===t?null:await w("en")}catch{return null}}const m=new Map;function h(t){switch(t.type){case"dictionary":return{...t,type:t.type,properties:(e=t.properties,e?.map(h))};case"array":return{...t,type:t.type,elementType:{type:"number",name:"number"}};default:return{...t,type:t.type}}var e}async function b(t,e="en"){if(!n(t))return;const s=await async function(t,e="en"){const n=await w(e);return n?.get(t)??null}(t.id,e);if(!s)return;const o={bundles:[...s.bundles],variables:[],hiddenApiItems:t.hiddenApiItems?.map((t=>t.toLowerCase()))};var c;return s.variables.forEach((e=>{if(t.disabledVariables?.includes(e.name))return;const n=t.definitions[e.name];switch(e.type){case"dictionary":return o.variables.push(h({...e,type:e.type,properties:Array.isArray(n)?[...n]:e.properties}));case"feature":if(!i(n))return;return o.variables.push({...e,type:e.type,definition:n});case"featureSet":if(!r(n))return;return o.variables.push({...e,type:e.type,definition:n});case"featureSetCollection":if(!a(n))return;return o.variables.push({...e,type:e.type,definition:n});default:return o.variables.push(h(e))}})),(c=t)&&"object"==typeof c&&"additionalVariables"in c&&Array.isArray(c.additionalVariables)&&o.variables.push(...t.additionalVariables??[]),o}const g=new class extends o{constructor(){super(...arguments),this._languageId="arcade",this._languageOptions={}}async setProfileForModel(t,e,a={locale:"en"}){n(e)&&(e=await b(e,a.locale));const r=await c(a.locale,l("./assets/arcade-language/t9n"),"profile.t9n.");if(!r)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(t);const i=this._getApiKey(t),s=new u(e,r);this._profileMap.set(i,s);const o=await async function(t){const{apiVersion:e,bundles:n,hiddenApiItems:a}=t.toEditorProfileDefinition();return{apiVersion:e,bundles:n,variables:await y(t.dictionaryVariables),hiddenApiItems:a?.map((t=>t.toLowerCase()))}}(s);this.updateApiContextForModel(t,{locale:a.locale,profile:o,snippets:a.snippets})}setLanguageOptions(t={}){this._languageOptions.assetsPath!==t.assetsPath&&(this._languageOptions={...this._languageOptions,...t},this._onDidChange.fire(this))}async getApiLibrary(t){const e=d.parse(t),n=await async function(t){const e=await f();return await e.getArcadeWorker(t)}(e);return await n.getApiLibrary(this.getApiContextForModel(e))}},x={setProfileForModel:g.setProfileForModel.bind(g),getApiLibrary:g.getApiLibrary.bind(g)};export{x as a,g as b,f as c,p as g}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as e,a as s}from"./p-
|
|
6
|
+
import{r as t,c as i,h as e,a as s}from"./p-e45080f2.js";import{u as l,s as c}from"./p-63baa9d1.js";import"./p-ce42e542.js";const a=class{constructor(e){t(this,e),this.arcgisClose=i(this,"arcgisClose",3),this.arcgisFieldSelected=i(this,"arcgisFieldSelected",3),this.manager=l(this),this._handleSelectField=t=>{if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":this.arcgisFieldSelected.emit(t.target.value??"");break;case"calcite-action":t.stopPropagation()}},this._emitClose=()=>{this.arcgisClose.emit()},this._mutationCounter=1,this._flowItemRenderers=[],this._filterValue="",this.loading=!1,this.modelId=void 0}modelIdPropChanged(){this._flowItemRenderers=[]}disconnectedCallback(){this._flowObserver?.disconnect()}render(){const t=c.getFeatureLayerForModel(this.modelId??"");return!this.loading&&this.modelId&&t?e("calcite-flow",null,e("calcite-flow-item",{heading:"Available Fields",closable:!0,description:"Select a field to insert into the expression",onCalciteFlowItemClose:this._emitClose},e("calcite-list",{filterEnabled:!0},t.fields.map((t=>e("calcite-list-item",{key:t.name,onClick:this._handleSelectField,label:t.name,description:t.alias,value:t.name},t.domain&&e("calcite-action",{slot:"actions-end",text:"open",icon:"chevron-right",onClick:()=>{const i=t.domain;"coded-value"===i.type&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>e("calcite-flow-item",{closable:!0,heading:"Domains",description:t.name,onCalciteFlowItemClose:this._emitClose},e("calcite-list",null,i.codedValues.map((t=>e("calcite-list-item",{key:t.code,onClick:this._handleSelectField,label:t.name,description:String(t.code),value:t.code})))))])}})))))),this._flowItemRenderers.map((t=>t()))):e("calcite-block",{heading:"Available Fields"})}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{modelId:["modelIdPropChanged"]}}};a.style=":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";export{a as arcgis_sql_expression_fields}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{F as t,D as i,G as s,H as e,J as o,f as n,i as r,b as c,m as h,L as a,d,E as u,U as f}from"./p-65d25b8a.js";import{g as l}from"./p-30708ad2.js";var p,y=(t,i)=>t.manager.internals.members?.[i]?.[0],v=Symbol.for("controller");function g(t){p!==t&&(p=t,queueMicrotask((()=>{p===t&&(p=void 0)})))}function w(){return p}var b,m=[];function k(t){if(void 0===t)return void(m=[]);const i=m.indexOf(t);m=-1===i?[...m,t]:m.slice(0,i+1),queueMicrotask((()=>{m=[]}))}var L,j=async(t,i)=>{const s=M(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},x=async t=>{const i=M(t);return await i.ready,i},M=t=>{const i=function(){const t=b;return b=void 0,t}();if(void 0!==i)return i;const s=w().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(v in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},U={setter:!1,getter:!1,readOnly:!1},D=new WeakMap;L=v;var S=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[L]=!0,this.ready=this._ready.promise,this._exports=E(this),this._exportWatchers=new Set;const s=t??w();this.component=s,this.component.addController(this),k(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(o),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=E(t),this._exportWatchers.forEach(o)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return g(this.component),j}get useRef(){return g(this.component),x}get useRefSync(){return g(this.component),M}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&o(t.hostConnected,t),this._callbacks.hostConnected.forEach(o),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&o(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(o),this._lifecycleCleanups.forEach(o),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&o(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(o),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&o(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(C,t)}triggerUpdated(t){const i=this;i.hostUpdated&&o(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(C,t)}triggerDestroy(){const t=this;t.hostDestroy&&o(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(o)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){g(this.component);const i=o(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function C(t){o(t,void 0,this)}var O=S;function E(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,e){if(!P.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,e):void 0},set:(t,i,s,e)=>Reflect.set(t,i,s,e)});return i}var P=new Set(["exports","_exports"]),_=void 0;function A(){Array.from(_?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),_=void 0}function T(t,i,s){var e;const n=i,r=t.manager.internals;(e=r.allWatchers)[n]??(e[n]=[]);const c=r.allWatchers[n],h=s,a=(t,i,s)=>o(h,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var q=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var e;2048&s&&((e=t.setters)[i]??(e[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=R,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(U.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=R,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const e=i.el.constructor.prototype;s!==e&&this._getSetProxy(e,t,"html")}_getSetProxy(t,i,s){const e=y(this.component,i);let o;do{o=Object.getOwnPropertyDescriptor(t,i)}while(!o&&(t=Object.getPrototypeOf(t)));if(!o)return;const n=o.get,r=o.set,c=$ in n,h=$ in r;if(c&&h)return;const a=!c,d=!h,u=a?function(){let t=n.call(this);const s=D.get(this);if(void 0===s)return t;const e=s.manager.internals;t=e.accessorGetter[i](t,i);const o=e.getters[i]??F;for(let s=0;s<o.length;s++)t=o[s](t,i);return t}:n,f=d?function(t){const s=n.call(this),o=D.get(this);if(void 0===o)return void r.call(this,t);let c=o.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,e);const h=o.manager.internals;if(c===s)r.call(this,t);else{const t=U.setter?F:h.setters[i]??F;for(let e=0;e<t.length&&(c=t[e](c,s,i),c!==s);e++);c=h.accessorSetter[i](c,s,i),r.call(this,c),c!==s&&h.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}h.keyTrackers.length>0&&h?.firePropTrackers(i,t)}:r;a&&(u[$]=!0),d&&(f[$]=!0),Object.defineProperty(t,i,{...o,get:u,set:f})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},F=[],$=Symbol(),R=Symbol(),I=(t,i)=>new W(t,i),W=class extends O{constructor(s,e){const o="addController"in s,n=new Set,r=s;if(r.addController=function(t){n.add(t),o&&!(v in t)&&s.el.isConnected&&t.hostConnected?.()},r.removeController=function(t){n.delete(t),t.controllerRemoved?.()},!o){const t=e??s.constructor.__forceUpdate;r.requestUpdate=()=>t(s)}super(s),this.internals=new q(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=o,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:i.type===Number?2:i.type===Boolean?4:1)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,o),this._controllers=n,this.exports=void 0,this.hasDestroy=N in this.component&&"function"==typeof this.component.destroy,this.hasDestroy&&T(s,N,(()=>this._setAutoDestroyTimeout())),this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=B,c.accessorSetter[t]=B,c.getSetProxy(t)})),o||Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),k(void 0),g(s),D.set(s.el,s),D.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={connectedCallback:i||s?void 0:t.connectedCallback,disconnectedCallback:i||s?void 0:t.disconnectedCallback,componentWillLoad:i?void 0:t.componentWillLoad,componentDidLoad:i?void 0:t.componentDidLoad,componentWillUpdate:i?void 0:t.componentWillUpdate,componentDidUpdate:i?void 0:t.componentDidUpdate,destroy:t.destroy};const e=this._connectedCallback.bind(this),o=this._disconnectedCallback.bind(this),n=this._update.bind(this),r=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:e,hostDisconnected:o,hostUpdate:n,hostUpdated:r}):(t.connectedCallback=e,t.disconnectedCallback=o,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=n,t.componentDidUpdate=r),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${N} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,A(),t.enableReadonly?.(),this._controllers.forEach(G),this._originalLifecycles.connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(H),this._originalLifecycles.disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,J,t)),await(this._originalLifecycles.componentWillLoad?.call(this.component))}_loaded(){this._controllers.forEach(z),this._originalLifecycles.componentDidLoad?.call(this.component)}_update(){this._controllers.forEach(K,this.component.changedProperties),this._originalLifecycles.componentWillUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(Q,t.changedProperties),this._originalLifecycles.componentDidUpdate?.call(this.component),this.isLit)t.changedProperties=new Map;else{const t=this._updatePromise;this._updatePromise=new i,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(X),this._controllers.clear(),await(this._originalLifecycles.destroy?.call(this.component))}}_setAutoDestroyTimeout(){this.component.el.isConnected||this.component.autoDestroyDisabled||(void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this._autoDestroyTimeout=e((()=>{this.destroy().catch(console.error)}),V))}},N="autoDestroyDisabled",V=1e3,B=t=>t;function G(t){"triggerConnected"in t?t.triggerConnected():o(t.hostConnected,t)}function H(t){"triggerDisconnected"in t?t.triggerDisconnected():o(t.hostDisconnected,t)}async function J(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function z(t){"triggerLoaded"in t?t.triggerLoaded():o(t.hostLoaded,t)}function K(t){"triggerUpdate"in t?t.triggerUpdate(this):o(t.hostUpdate,t,this)}function Q(t){"triggerUpdated"in t?t.triggerUpdated(this):o(t.hostUpdated,t,this)}function X(t){"triggerDestroy"in t?t.triggerDestroy():o(t.hostDestroy,t)}function Y(t,i,s){const e=t.manager.internals;return e.trackedValue!==R&&e.trackedValue!==s&&e.firePropTrackers(void 0,void 0),0===e.keyTrackers.length&&queueMicrotask((()=>e.firePropTrackers(void 0,void 0))),e.trackedValue=s,e.keyTrackers.push(((t,e)=>o(i,void 0,s===e?t:void 0))),s}function Z(t,i){const s=w();return Y(s,(e=>{const o=e,n=s.manager,r=s,c=r[o];if(null!=c&&c!==t&&"function"==typeof i.set&&(i.initialSet??1)){const s=i.set(c,t,o);if(s!==c)if(n.isLit)r[o]=s;else{let t=!0;n.onConnected((()=>{t&&(t=!0,function(){U.setter=!0;try{return void(r[o]=s)}finally{U.setter=!1}}())}))}}!function(t,i,s){var e,o;const n=s,r=t.manager.internals,c="function"==typeof n.get?n.get:void 0;c&&((e=r.getters)[i]??(e[i]=[]),r.getters[i].unshift(c));const h="ignore"===n.set?it:n.set;h&&((o=r.setters)[i]??(o[i]=[]),r.setters[i].unshift(h))}(s,o,i)}),t)}var tt,it=(t,i)=>i,st=t=>et(void 0,t),et=(tt=class extends S{constructor(t,i){super(t);const s=this.exports;try{g(this.component);const t=i(this.component,this),e=this.exports!==s;if(t instanceof Promise){e||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else e&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=m,s=new tt(...t),e=s.exports;k(i.at(-1));const n=s.component.manager.internals;var r;return n.markExports(s,e),s.watchExports((t=>n.markExports(s,t))),b!==(r=s)&&(b=r,queueMicrotask((()=>{b===r&&(b=void 0)}))),function(t,i,s){const e=Array.isArray(t)?t:[t];let n=e.length+1;const r=t=>{n-=1,void 0!==t&&(n=0),0===n&&i(t)};e.forEach((t=>function(t,i,s){const e=Object.keys(t),n=e.length;void 0===_&&queueMicrotask(A),_??(_=new Map);let r=_.get(t);return void 0===r&&(r={callbacks:[],keyCount:n},_.set(t,r)),r.keyCount!==n&&(r.callbacks.forEach((t=>t(e))),r.callbacks=[],r.keyCount=n),r.callbacks.push((e=>{const r=e[n];o(i,null,void 0===r?void 0:t[r]===s?r:void 0)})),s}(t,(i=>r(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=e.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&Y(c,(t=>r(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==y(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:e},o){const n=i,r=n[s]!==o;n[s]!==t.exports&&!r&&o!==t.exports&&(n[s]=t.exports);if(i===t.component){if(e){const i=t.component.manager.internals;r&&i.markExports(t,n[s]),T(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=e?void 0:s}t.watchExports((()=>{if(n[s]===t.exports)return;const i=t.component.manager,e=i.internals.setters[s]?.includes(i.internals.readonlySetter);e?function(){U.readOnly=!0;try{return void(n[s]=t.exports)}finally{U.readOnly=!1}}():n[s]=t.exports}))}(s,t,e)),e)});const ot={en:{id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]}};async function nt(){return await import("./p-48e94cb8.js")}const rt=new class extends a{constructor(){super(...arguments),this._languageId="arcgis-sql-expression",this._languageOptions={},this._layerMap=new Map}updateFeatureLayerForModel(t,i){const s=this._getApiKey(t);this._layerMap.set(s,i)}setLanguageOptions(t){this._languageOptions=t}getFeatureLayerForModel(t){const i=this._getApiKey(t);return this._layerMap.get(i)}async setProfileForModel(t,i,s={locale:"en"}){r(i)&&(i=await async function(t,i="en"){if(!r(t))return;const s=await async function(t="en"){return await Promise.resolve(ot[t])}(i);if(!s)return;const e={variables:[],hiddenApiItems:t.hiddenApiItems?.map((t=>t.toLowerCase()))};return s.variables.forEach((i=>{if(t.disabledVariables?.includes(i.name))return;const s=t.definitions[i.name];if("featureSet"===i.type)return c(s)?e.variables.push({...i,type:i.type,definition:s}):void 0;throw Error(`sdkVariable type not supported (yet) type: ${i.type}`)})),e}(i,s.locale));const e=await d(s.locale,l("./assets/arcade-language/t9n"),"profile.t9n.");if(!e)throw new Error(`Failed to load the language bundle for ${s.locale}`);this.disposeForModel(t);const o=this._getApiKey(t),a=new u(i,e);this._profileMap.set(o,a);const f=(t=>{const{apiVersion:i,bundles:s,hiddenApiItems:e}=t.toEditorProfileDefinition(),o=t.variables[0];if(!o||"featureSet"!==o.type)throw Error("No variable found in the editor profile");const r=function(t){const{name:i}=t,s=t.getDescription(),{definition:e}=t.toProfileVariableDefinition(),o={label:i,detail:i,insertText:i,insertTextMode:h.exports.InsertTextMode.asIs,insertTextFormat:h.exports.InsertTextFormat.PlainText,kind:h.exports.CompletionItemKind.Field},r={name:i,description:s,type:"dictionary",properties:[],completion:o};if(!e||!("fields"in e))return r;const[c,a]=n(e.fields,s);return r.properties=c,o.documentation={kind:"markdown",value:a},r}(o);return{apiVersion:i,bundles:s,variables:[r],hiddenApiItems:e?.map((t=>t.toLowerCase()))}})(a);this.updateApiContextForModel(t,{locale:s.locale,profile:f});const p=i?.variables?.find((t=>"$layer"===t.name));p&&this.updateFeatureLayerForModel(t,p.definition)}async getApiLibrary(t){const i=f.parse(t),s=await async function(t){const i=await nt();return await i.getSqlExprWorker(t)}(i);return await s.getApiLibrary(this.getApiContextForModel(i))}};export{nt as a,Z as g,st as m,rt as s,I as u,T as w}
|
|
6
|
+
import{F as t,D as i,G as s,H as e,J as o,f as n,i as r,b as c,m as h,L as a,d,E as u,U as f}from"./p-ce42e542.js";import{g as l}from"./p-e45080f2.js";var p,y=(t,i)=>t.manager.internals.members?.[i]?.[0],v=Symbol.for("controller");function g(t){p!==t&&(p=t,queueMicrotask((()=>{p===t&&(p=void 0)})))}function w(){return p}var b,m=[];function k(t){if(void 0===t)return void(m=[]);const i=m.indexOf(t);m=-1===i?[...m,t]:m.slice(0,i+1),queueMicrotask((()=>{m=[]}))}var L,j=async(t,i)=>{const s=M(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},x=async t=>{const i=M(t);return await i.ready,i},M=t=>{const i=function(){const t=b;return b=void 0,t}();if(void 0!==i)return i;const s=w().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(v in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},U={setter:!1,getter:!1,readOnly:!1},D=new WeakMap;L=v;var S=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[L]=!0,this.ready=this._ready.promise,this._exports=E(this),this._exportWatchers=new Set;const s=t??w();this.component=s,this.component.addController(this),k(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(o),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=E(t),this._exportWatchers.forEach(o)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return g(this.component),j}get useRef(){return g(this.component),x}get useRefSync(){return g(this.component),M}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&o(t.hostConnected,t),this._callbacks.hostConnected.forEach(o),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&o(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(o),this._lifecycleCleanups.forEach(o),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&o(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(o),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&o(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(C,t)}triggerUpdated(t){const i=this;i.hostUpdated&&o(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(C,t)}triggerDestroy(){const t=this;t.hostDestroy&&o(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(o)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){g(this.component);const i=o(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function C(t){o(t,void 0,this)}var O=S;function E(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,e){if(!P.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,e):void 0},set:(t,i,s,e)=>Reflect.set(t,i,s,e)});return i}var P=new Set(["exports","_exports"]),_=void 0;function A(){Array.from(_?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),_=void 0}function T(t,i,s){var e;const n=i,r=t.manager.internals;(e=r.allWatchers)[n]??(e[n]=[]);const c=r.allWatchers[n],h=s,a=(t,i,s)=>o(h,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var q=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var e;2048&s&&((e=t.setters)[i]??(e[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=R,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(U.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=R,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const e=i.el.constructor.prototype;s!==e&&this._getSetProxy(e,t,"html")}_getSetProxy(t,i,s){const e=y(this.component,i);let o;do{o=Object.getOwnPropertyDescriptor(t,i)}while(!o&&(t=Object.getPrototypeOf(t)));if(!o)return;const n=o.get,r=o.set,c=$ in n,h=$ in r;if(c&&h)return;const a=!c,d=!h,u=a?function(){let t=n.call(this);const s=D.get(this);if(void 0===s)return t;const e=s.manager.internals;t=e.accessorGetter[i](t,i);const o=e.getters[i]??F;for(let s=0;s<o.length;s++)t=o[s](t,i);return t}:n,f=d?function(t){const s=n.call(this),o=D.get(this);if(void 0===o)return void r.call(this,t);let c=o.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,e);const h=o.manager.internals;if(c===s)r.call(this,t);else{const t=U.setter?F:h.setters[i]??F;for(let e=0;e<t.length&&(c=t[e](c,s,i),c!==s);e++);c=h.accessorSetter[i](c,s,i),r.call(this,c),c!==s&&h.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}h.keyTrackers.length>0&&h?.firePropTrackers(i,t)}:r;a&&(u[$]=!0),d&&(f[$]=!0),Object.defineProperty(t,i,{...o,get:u,set:f})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},F=[],$=Symbol(),R=Symbol(),I=(t,i)=>new W(t,i),W=class extends O{constructor(s,e){const o="addController"in s,n=new Set,r=s;if(r.addController=function(t){n.add(t),o&&!(v in t)&&s.el.isConnected&&t.hostConnected?.()},r.removeController=function(t){n.delete(t),t.controllerRemoved?.()},!o){const t=e??s.constructor.__forceUpdate;r.requestUpdate=()=>t(s)}super(s),this.internals=new q(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=o,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:i.type===Number?2:i.type===Boolean?4:1)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,o),this._controllers=n,this.exports=void 0,this.hasDestroy=N in this.component&&"function"==typeof this.component.destroy,this.hasDestroy&&T(s,N,(()=>this._setAutoDestroyTimeout())),this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=B,c.accessorSetter[t]=B,c.getSetProxy(t)})),o||Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),k(void 0),g(s),D.set(s.el,s),D.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={connectedCallback:i||s?void 0:t.connectedCallback,disconnectedCallback:i||s?void 0:t.disconnectedCallback,componentWillLoad:i?void 0:t.componentWillLoad,componentDidLoad:i?void 0:t.componentDidLoad,componentWillUpdate:i?void 0:t.componentWillUpdate,componentDidUpdate:i?void 0:t.componentDidUpdate,destroy:t.destroy};const e=this._connectedCallback.bind(this),o=this._disconnectedCallback.bind(this),n=this._update.bind(this),r=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:e,hostDisconnected:o,hostUpdate:n,hostUpdated:r}):(t.connectedCallback=e,t.disconnectedCallback=o,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=n,t.componentDidUpdate=r),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${N} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,A(),t.enableReadonly?.(),this._controllers.forEach(G),this._originalLifecycles.connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(H),this._originalLifecycles.disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,J,t)),await(this._originalLifecycles.componentWillLoad?.call(this.component))}_loaded(){this._controllers.forEach(z),this._originalLifecycles.componentDidLoad?.call(this.component)}_update(){this._controllers.forEach(K,this.component.changedProperties),this._originalLifecycles.componentWillUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(Q,t.changedProperties),this._originalLifecycles.componentDidUpdate?.call(this.component),this.isLit)t.changedProperties=new Map;else{const t=this._updatePromise;this._updatePromise=new i,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(X),this._controllers.clear(),await(this._originalLifecycles.destroy?.call(this.component))}}_setAutoDestroyTimeout(){this.component.el.isConnected||this.component.autoDestroyDisabled||(void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this._autoDestroyTimeout=e((()=>{this.destroy().catch(console.error)}),V))}},N="autoDestroyDisabled",V=1e3,B=t=>t;function G(t){"triggerConnected"in t?t.triggerConnected():o(t.hostConnected,t)}function H(t){"triggerDisconnected"in t?t.triggerDisconnected():o(t.hostDisconnected,t)}async function J(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function z(t){"triggerLoaded"in t?t.triggerLoaded():o(t.hostLoaded,t)}function K(t){"triggerUpdate"in t?t.triggerUpdate(this):o(t.hostUpdate,t,this)}function Q(t){"triggerUpdated"in t?t.triggerUpdated(this):o(t.hostUpdated,t,this)}function X(t){"triggerDestroy"in t?t.triggerDestroy():o(t.hostDestroy,t)}function Y(t,i,s){const e=t.manager.internals;return e.trackedValue!==R&&e.trackedValue!==s&&e.firePropTrackers(void 0,void 0),0===e.keyTrackers.length&&queueMicrotask((()=>e.firePropTrackers(void 0,void 0))),e.trackedValue=s,e.keyTrackers.push(((t,e)=>o(i,void 0,s===e?t:void 0))),s}function Z(t,i){const s=w();return Y(s,(e=>{const o=e,n=s.manager,r=s,c=r[o];if(null!=c&&c!==t&&"function"==typeof i.set&&(i.initialSet??1)){const s=i.set(c,t,o);if(s!==c)if(n.isLit)r[o]=s;else{let t=!0;n.onConnected((()=>{t&&(t=!0,function(){U.setter=!0;try{return void(r[o]=s)}finally{U.setter=!1}}())}))}}!function(t,i,s){var e,o;const n=s,r=t.manager.internals,c="function"==typeof n.get?n.get:void 0;c&&((e=r.getters)[i]??(e[i]=[]),r.getters[i].unshift(c));const h="ignore"===n.set?it:n.set;h&&((o=r.setters)[i]??(o[i]=[]),r.setters[i].unshift(h))}(s,o,i)}),t)}var tt,it=(t,i)=>i,st=t=>et(void 0,t),et=(tt=class extends S{constructor(t,i){super(t);const s=this.exports;try{g(this.component);const t=i(this.component,this),e=this.exports!==s;if(t instanceof Promise){e||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else e&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=m,s=new tt(...t),e=s.exports;k(i.at(-1));const n=s.component.manager.internals;var r;return n.markExports(s,e),s.watchExports((t=>n.markExports(s,t))),b!==(r=s)&&(b=r,queueMicrotask((()=>{b===r&&(b=void 0)}))),function(t,i,s){const e=Array.isArray(t)?t:[t];let n=e.length+1;const r=t=>{n-=1,void 0!==t&&(n=0),0===n&&i(t)};e.forEach((t=>function(t,i,s){const e=Object.keys(t),n=e.length;void 0===_&&queueMicrotask(A),_??(_=new Map);let r=_.get(t);return void 0===r&&(r={callbacks:[],keyCount:n},_.set(t,r)),r.keyCount!==n&&(r.callbacks.forEach((t=>t(e))),r.callbacks=[],r.keyCount=n),r.callbacks.push((e=>{const r=e[n];o(i,null,void 0===r?void 0:t[r]===s?r:void 0)})),s}(t,(i=>r(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=e.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&Y(c,(t=>r(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==y(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:e},o){const n=i,r=n[s]!==o;n[s]!==t.exports&&!r&&o!==t.exports&&(n[s]=t.exports);if(i===t.component){if(e){const i=t.component.manager.internals;r&&i.markExports(t,n[s]),T(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=e?void 0:s}t.watchExports((()=>{if(n[s]===t.exports)return;const i=t.component.manager,e=i.internals.setters[s]?.includes(i.internals.readonlySetter);e?function(){U.readOnly=!0;try{return void(n[s]=t.exports)}finally{U.readOnly=!1}}():n[s]=t.exports}))}(s,t,e)),e)});const ot={en:{id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]}};async function nt(){return await import("./p-7b6fce33.js")}const rt=new class extends a{constructor(){super(...arguments),this._languageId="arcgis-sql-expression",this._languageOptions={},this._layerMap=new Map}updateFeatureLayerForModel(t,i){const s=this._getApiKey(t);this._layerMap.set(s,i)}setLanguageOptions(t){this._languageOptions=t}getFeatureLayerForModel(t){const i=this._getApiKey(t);return this._layerMap.get(i)}async setProfileForModel(t,i,s={locale:"en"}){r(i)&&(i=await async function(t,i="en"){if(!r(t))return;const s=await async function(t="en"){return await Promise.resolve(ot[t])}(i);if(!s)return;const e={variables:[],hiddenApiItems:t.hiddenApiItems?.map((t=>t.toLowerCase()))};return s.variables.forEach((i=>{if(t.disabledVariables?.includes(i.name))return;const s=t.definitions[i.name];if("featureSet"===i.type)return c(s)?e.variables.push({...i,type:i.type,definition:s}):void 0;throw Error(`sdkVariable type not supported (yet) type: ${i.type}`)})),e}(i,s.locale));const e=await d(s.locale,l("./assets/arcade-language/t9n"),"profile.t9n.");if(!e)throw new Error(`Failed to load the language bundle for ${s.locale}`);this.disposeForModel(t);const o=this._getApiKey(t),a=new u(i,e);this._profileMap.set(o,a);const f=(t=>{const{apiVersion:i,bundles:s,hiddenApiItems:e}=t.toEditorProfileDefinition(),o=t.variables[0];if(!o||"featureSet"!==o.type)throw Error("No variable found in the editor profile");const r=function(t){const{name:i}=t,s=t.getDescription(),{definition:e}=t.toProfileVariableDefinition(),o={label:i,detail:i,insertText:i,insertTextMode:h.exports.InsertTextMode.asIs,insertTextFormat:h.exports.InsertTextFormat.PlainText,kind:h.exports.CompletionItemKind.Field},r={name:i,description:s,type:"dictionary",properties:[],completion:o};if(!e||!("fields"in e))return r;const[c,a]=n(e.fields,s);return r.properties=c,o.documentation={kind:"markdown",value:a},r}(o);return{apiVersion:i,bundles:s,variables:[r],hiddenApiItems:e?.map((t=>t.toLowerCase()))}})(a);this.updateApiContextForModel(t,{locale:s.locale,profile:f});const p=i?.variables?.find((t=>"$layer"===t.name));p&&this.updateFeatureLayerForModel(t,p.definition)}async getApiLibrary(t){const i=f.parse(t),s=await async function(t){const i=await nt();return await i.getSqlExprWorker(t)}(i);return await s.getApiLibrary(this.getApiContextForModel(i))}};export{nt as a,Z as g,st as m,rt as s,I as u,T as w}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{N as t,M as e}from"./p-
|
|
6
|
+
import{N as t,M as e}from"./p-ce42e542.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.44
|
|
5
5
|
*/
|
|
6
|
-
import{g as e,P as t,z as s,Q as i}from"./p-
|
|
6
|
+
import{g as e,P as t,z as s,Q as i}from"./p-ce42e542.js";import{s as n}from"./p-63baa9d1.js";import"./p-e45080f2.js";class o{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _getClientProxy(){if(!this._client){const{languageId:t,languageOptions:s}=this._defaults;this._worker=e.createWebWorker({moduleId:"SqlExprWorker",label:t,createData:{languageId:t,languageOptions:s}}),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}var r,a;!function(e){e.ARGS="args",e.CLAUSES="clauses",e.ELSE="else",e.END="end",e.EXPR="expr",e.LEFT="left",e.OPERAND="operand",e.QUALIFIER="qualifier",e.RIGHT="right",e.START="start",e.VALUE="value"}(r||(r={})),function(e){e.CASE_EXPRESSION="case-expression",e.EXPRESSION_LIST="expression-list",e.FUNCTION="function",e.INTERVAL="interval",e.INTERVAL_QUALIFIER="interval-qualifier",e.WHEN_CLAUSE="when-clause",e.UNARY_EXPRESSION="unary-expression",e.BINARY_EXPRESSION="binary-expression"}(a||(a={})),Object.values({date:"DATE",float:"FLOAT",integer:"INTEGER",real:"REAL",smallint:"SMALLINT",time:"TIME",timestamp:"TIMESTAMP",varchar:"VARCHAR"});const c={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},l={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AND","AS","BETWEEN","BOTH","CASE","CAST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DAY","ELSE","END","ESCAPE","FALSE","FLOAT","FOR","FROM","HOUR","IN","INTEGER","INTERVAL","IS","LEADING","LIKE","MINUTE","MONTH","NOT","NULL","OR","POSITION","REAL","SECOND","SMALLINT","SUBSTRING","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRIM","TRUE","VARCHAR","WHEN","WITH","YEAR","ZONE"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL"],builtinFunctions:["CAST","EXTRACT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","ABS","ACOS","ASIN","ATAN","CEILING","COS","FLOOR","LOG","LOG10","POWER","ROUND","SIGN","SIN","TAN","CHAR_LENGTH","COALESCE","CONCAT","LOWER","POSITION","TRIM","UPPER"],builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}};class u{constructor(e,t){this._worker=e,this._defaults=t}async provideCompletionItems(e,t){try{const s=await this._worker(e.uri),i=e.getWordUntilPosition(t),n={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn},o=this._defaults.getApiContextForModel(e.uri);return await s.doComplete(e.uri.toString(),n,t,o)}catch(e){return console.error(e),{suggestions:[]}}}}class h{constructor(s,i,{defaults:n,diagnosticService:o}){this._languageId=s,this._worker=i,this._disposables=[],this._listener=new Map,this._diagnosticsService=o,this._defaults=n;const r=e=>{const s=e.getLanguageId();if(s!==this._languageId)return;const i=t((()=>{this._doValidate(e,s).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(i)),this._doValidate(e,s).catch(console.error)},a=t=>{const s=t.uri.toString();e.setModelMarkers(t,this._languageId,[]);const i=this._listener.get(s);i&&(i.dispose(),this._listener.delete(s))};this._disposables.push(e.onDidCreateModel(r)),this._disposables.push(e.onWillDisposeModel((e=>a(e)))),this._disposables.push(e.onDidChangeModelLanguage((e=>{a(e.model),r(e.model)}))),this._disposables.push(n.onDidChange((()=>{e.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(a(e),r(e))}))}))),this._disposables.push(n.onModelContextDidChange((t=>{e.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&e.uri.toString()===t&&this._doValidate(e,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),e.getModels().forEach(r)}async _doValidate(t,s){if(t.isAttachedToEditor())try{const i=await this._worker(t.uri),n=this._defaults.getApiContextForModel(t.uri),o=await i.doValidation(t.uri.toString(),n);this._diagnosticsService.fireDiagnosticsChange(t.uri,o),e.setModelMarkers(t,s,o)}catch(e){console.error(e)}}}let E;async function d(...e){return await new Promise(((t,s)=>{E?t(E(...e)):s(new Error("sql expression worker not registered!"))}))}const T=new class{constructor(){this._onDiagnosticsChange=new i}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function p(){return T}function N(e){const t=new o(e),i=async(...e)=>await t.getLanguageServiceWorker(...e);E=i,s.setMonarchTokensProvider(n.languageId,l),s.setLanguageConfiguration(n.languageId,c);const r=new u(i,n);s.registerCompletionItemProvider(n.languageId,r),new h(e.languageId,i,{defaults:e,diagnosticService:T})}export{p as getSqlExprDiagnosticService,d as getSqlExprWorker,N as setupMode}
|