@arcgis/coding-components 4.29.0-beta.46 → 4.29.0-beta.48

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.
Files changed (90) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +1 -1
  2. package/dist/arcgis-coding-components/index.esm.js +1 -1
  3. package/dist/arcgis-coding-components/{p-e475e6cd.js → p-0823fa31.js} +1 -1
  4. package/dist/arcgis-coding-components/p-2c0d6f15.js +2 -0
  5. package/dist/arcgis-coding-components/{p-e6ede32d.js → p-2e99b56e.js} +1 -1
  6. package/dist/arcgis-coding-components/{p-9eabda86.js → p-30618728.js} +1 -1
  7. package/dist/arcgis-coding-components/{p-9e242e76.js → p-3dd452e0.js} +1 -1
  8. package/dist/arcgis-coding-components/{p-ccdf0ac1.entry.js → p-8f729db2.entry.js} +1 -1
  9. package/dist/arcgis-coding-components/{p-f7d7d78d.js → p-a8d30530.js} +1 -1
  10. package/dist/arcgis-coding-components/{p-c084ada8.js → p-ae129dfa.js} +1 -1
  11. package/dist/arcgis-coding-components/{p-71faf9a4.js → p-af7d25aa.js} +1 -1
  12. package/dist/arcgis-coding-components/{p-10a322ec.js → p-b5479fc4.js} +8 -8
  13. package/dist/arcgis-coding-components/{p-ce586a8c.js → p-d78367ff.js} +1 -1
  14. package/dist/cjs/{arcade-defaults-8445d852.js → arcade-defaults-6fa4acb9.js} +1305 -1305
  15. package/dist/cjs/arcade-mode-15687545.js +598 -0
  16. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1408 -1408
  17. package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
  18. package/dist/cjs/{cssMode-e63287bb.js → cssMode-644e4ecf.js} +2 -2
  19. package/dist/cjs/{html-c0d4db3b.js → html-567706f3.js} +2 -2
  20. package/dist/cjs/{htmlMode-fdc44d57.js → htmlMode-14c95ab8.js} +2 -2
  21. package/dist/cjs/{index-6a382a34.js → index-ac186201.js} +67 -24
  22. package/dist/cjs/index.cjs.js +2 -2
  23. package/dist/cjs/{javascript-a419d064.js → javascript-69c3523c.js} +3 -3
  24. package/dist/cjs/{jsonMode-73aee5d2.js → jsonMode-da8803e7.js} +2 -2
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/cjs/{tsMode-37d1b053.js → tsMode-eddf280e.js} +2 -2
  27. package/dist/cjs/{typescript-53f9f36a.js → typescript-114292ed.js} +2 -2
  28. package/dist/components/arcade-api.js +160 -160
  29. package/dist/components/arcade-contribution.js +60 -60
  30. package/dist/components/arcade-defaults.js +1239 -1239
  31. package/dist/components/arcade-mode.js +513 -513
  32. package/dist/components/arcade-results.js +430 -430
  33. package/dist/components/arcade-suggestions.js +132 -132
  34. package/dist/components/arcade-variables.js +155 -155
  35. package/dist/components/arcgis-arcade-api.d.ts +2 -2
  36. package/dist/components/arcgis-arcade-editor.d.ts +2 -2
  37. package/dist/components/arcgis-arcade-editor.js +390 -390
  38. package/dist/components/arcgis-arcade-results.d.ts +2 -2
  39. package/dist/components/arcgis-arcade-suggestions.d.ts +2 -2
  40. package/dist/components/arcgis-arcade-variables.d.ts +2 -2
  41. package/dist/components/arcgis-code-editor.d.ts +2 -2
  42. package/dist/components/code-editor.js +251 -251
  43. package/dist/components/fields.js +69 -69
  44. package/dist/components/functional-components.js +1 -1
  45. package/dist/components/markdown.js +28 -28
  46. package/dist/components/utilities.js +20 -20
  47. package/dist/esm/{arcade-defaults-d7893362.js → arcade-defaults-3a952c7e.js} +1305 -1305
  48. package/dist/esm/arcade-mode-619b0989.js +594 -0
  49. package/dist/esm/arcgis-arcade-api_6.entry.js +1408 -1408
  50. package/dist/esm/arcgis-coding-components.js +3 -3
  51. package/dist/esm/{cssMode-b1771f92.js → cssMode-4100a9c5.js} +2 -2
  52. package/dist/esm/{html-af635d52.js → html-fbb4fdec.js} +2 -2
  53. package/dist/esm/{htmlMode-3021c301.js → htmlMode-a896869e.js} +2 -2
  54. package/dist/esm/{index-fd6b2fd8.js → index-022fb97b.js} +67 -24
  55. package/dist/esm/index.js +2 -2
  56. package/dist/esm/{javascript-70589186.js → javascript-a0bd70ad.js} +3 -3
  57. package/dist/esm/{jsonMode-cb509b79.js → jsonMode-76fe6af1.js} +2 -2
  58. package/dist/esm/loader.js +2 -2
  59. package/dist/esm/{tsMode-ed90c9aa.js → tsMode-277700f6.js} +2 -2
  60. package/dist/esm/{typescript-db8a0b18.js → typescript-c9f880aa.js} +2 -2
  61. package/dist/types/components/arcade-api/arcade-api.d.ts +40 -40
  62. package/dist/types/components/arcade-api/t9n-types.d.ts +6 -6
  63. package/dist/types/components/arcade-editor/arcade-editor.d.ts +127 -127
  64. package/dist/types/components/arcade-editor/t9n-types.d.ts +6 -6
  65. package/dist/types/components/arcade-results/arcade-results.d.ts +47 -47
  66. package/dist/types/components/arcade-results/t9n-types.d.ts +11 -11
  67. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +34 -34
  68. package/dist/types/components/arcade-suggestions/t9n-types.d.ts +4 -4
  69. package/dist/types/components/arcade-variables/arcade-variables.d.ts +41 -41
  70. package/dist/types/components/arcade-variables/t9n-types.d.ts +6 -6
  71. package/dist/types/components/code-editor/code-editor.d.ts +73 -73
  72. package/dist/types/stencil-public-runtime.d.ts +8 -0
  73. package/dist/types/utils/arcade-executor.d.ts +79 -79
  74. package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +66 -66
  75. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +23 -23
  76. package/dist/types/utils/arcade-monaco/arcade-mode.d.ts +9 -9
  77. package/dist/types/utils/arcade-monaco/arcade-theme.d.ts +7 -7
  78. package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +9 -9
  79. package/dist/types/utils/arcade-monaco/arcade.worker.d.ts +12 -12
  80. package/dist/types/utils/arcade-monaco/types.d.ts +29 -29
  81. package/dist/types/utils/editor-suggestions.d.ts +24 -24
  82. package/dist/types/utils/functional-components.d.ts +1 -1
  83. package/dist/types/utils/markdown.d.ts +1 -1
  84. package/dist/types/utils/profile/editor-profile.d.ts +185 -185
  85. package/dist/types/utils/profile/types.d.ts +101 -101
  86. package/dist/types/utils/utilities.d.ts +1 -1
  87. package/package.json +7 -7
  88. package/dist/arcgis-coding-components/p-5d670bd2.js +0 -2
  89. package/dist/cjs/arcade-mode-b77afcc9.js +0 -598
  90. package/dist/esm/arcade-mode-70e22d22.js +0 -594
@@ -44,82 +44,82 @@ async function importRequest() {
44
44
  * Returns an icon name for the field type
45
45
  */
46
46
  function fieldTypeToIconName(field) {
47
- switch (field?.type) {
48
- case "oid":
49
- return "key";
50
- case "small-integer":
51
- case "big-integer":
52
- case "integer":
53
- case "single":
54
- case "double":
55
- case "long":
56
- return "number";
57
- case "global-id":
58
- case "guid":
59
- return "key";
60
- case "string":
61
- return "string";
62
- case "date":
63
- return "date-time";
64
- case "date-only":
65
- return "calendar";
66
- case "time-only":
67
- return "clock";
68
- case "timestamp-offset":
69
- return "time-zone";
70
- default:
71
- return "cube";
72
- }
47
+ switch (field?.type) {
48
+ case "oid":
49
+ return "key";
50
+ case "small-integer":
51
+ case "big-integer":
52
+ case "integer":
53
+ case "single":
54
+ case "double":
55
+ case "long":
56
+ return "number";
57
+ case "global-id":
58
+ case "guid":
59
+ return "key";
60
+ case "string":
61
+ return "string";
62
+ case "date":
63
+ return "date-time";
64
+ case "date-only":
65
+ return "calendar";
66
+ case "time-only":
67
+ return "clock";
68
+ case "timestamp-offset":
69
+ return "time-zone";
70
+ default:
71
+ return "cube";
72
+ }
73
73
  }
74
74
  /**
75
75
  * Returns the Arcade type for the given field.
76
76
  */
77
77
  function fieldTypeToArcadeType(field) {
78
- switch (field?.type) {
79
- case "small-integer":
80
- case "integer":
81
- case "big-integer":
82
- case "single":
83
- case "double":
84
- case "long":
85
- case "oid":
86
- return "number";
87
- case "global-id":
88
- case "guid":
89
- case "string":
90
- return "text";
91
- case "date":
92
- return "date";
93
- case "date-only":
94
- return "dateOnly";
95
- case "time-only":
96
- return "time";
97
- default:
98
- return "text";
99
- }
78
+ switch (field?.type) {
79
+ case "small-integer":
80
+ case "integer":
81
+ case "big-integer":
82
+ case "single":
83
+ case "double":
84
+ case "long":
85
+ case "oid":
86
+ return "number";
87
+ case "global-id":
88
+ case "guid":
89
+ case "string":
90
+ return "text";
91
+ case "date":
92
+ return "date";
93
+ case "date-only":
94
+ return "dateOnly";
95
+ case "time-only":
96
+ return "time";
97
+ default:
98
+ return "text";
99
+ }
100
100
  }
101
101
  function supportedFields(fields) {
102
- return (fields ?? []).filter((field) => {
103
- switch (field.type) {
104
- case "string":
105
- case "small-integer":
106
- case "integer":
107
- case "big-integer":
108
- case "single":
109
- case "double":
110
- case "long":
111
- case "date":
112
- case "date-only":
113
- case "time-only":
114
- case "timestamp-offset":
115
- case "oid":
116
- case "guid":
117
- case "global-id":
118
- return true;
119
- default:
120
- return false;
121
- }
122
- });
102
+ return (fields ?? []).filter((field) => {
103
+ switch (field.type) {
104
+ case "string":
105
+ case "small-integer":
106
+ case "integer":
107
+ case "big-integer":
108
+ case "single":
109
+ case "double":
110
+ case "long":
111
+ case "date":
112
+ case "date-only":
113
+ case "time-only":
114
+ case "timestamp-offset":
115
+ case "oid":
116
+ case "guid":
117
+ case "global-id":
118
+ return true;
119
+ default:
120
+ return false;
121
+ }
122
+ });
123
123
  }
124
124
 
125
125
  export { importLayersFeatureLayer as a, importWebMap as b, importRequest as c, fieldTypeToArcadeType as d, importArcade as e, fieldTypeToIconName as f, importPortalPortalItem as i, supportedFields as s };
@@ -5,6 +5,6 @@ const StickyFilterInput = ({ filterValue, ...rest }) => (
5
5
  // TODO: Remove when calcite-input bug with scale is fixed
6
6
  // @ts-expect-error
7
7
  h("div", { class: "sticky", scale: "m" },
8
- h("calcite-input", { value: filterValue, icon: "magnifying-glass", clearable: true, ...rest })));
8
+ h("calcite-input", { value: filterValue, icon: "magnifying-glass", clearable: true, ...rest })));
9
9
 
10
10
  export { StickyFilterInput as S };
@@ -4,29 +4,29 @@ import { IStandaloneThemeService } from 'monaco-editor/esm/vs/editor/standalone/
4
4
  import { generateTokensCSSForColorMap } from 'monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js';
5
5
 
6
6
  async function colorizeCode(code) {
7
- return editor.colorize(code, "arcade", { tabSize: 2 });
7
+ return editor.colorize(code, "arcade", { tabSize: 2 });
8
8
  }
9
9
  async function colorizedAllCodeElements(e) {
10
- if (!e) {
11
- return;
12
- }
13
- const codeElements = Array.from(e.querySelectorAll("code.language-arcade"));
14
- await Promise.all(codeElements.map(async (codeElement) => await colorizeCodeElement(codeElement, codeElement.textContent)));
10
+ if (!e) {
11
+ return;
12
+ }
13
+ const codeElements = Array.from(e.querySelectorAll("code.language-arcade"));
14
+ await Promise.all(codeElements.map(async (codeElement) => await colorizeCodeElement(codeElement, codeElement.textContent)));
15
15
  }
16
16
  async function colorizeCodeElement(e, text) {
17
- if (!e || e.tagName !== "CODE") {
18
- return;
19
- }
20
- e.innerHTML = await colorizeCode(text ?? "");
17
+ if (!e || e.tagName !== "CODE") {
18
+ return;
19
+ }
20
+ e.innerHTML = await colorizeCode(text ?? "");
21
21
  }
22
22
  function generateColorizeStyles() {
23
- const themeService = StandaloneServices.get(IStandaloneThemeService);
24
- const theme = themeService.getColorTheme();
25
- return generateTokensCSSForColorMap(theme.tokenTheme.getColorMap());
23
+ const themeService = StandaloneServices.get(IStandaloneThemeService);
24
+ const theme = themeService.getColorTheme();
25
+ return generateTokensCSSForColorMap(theme.tokenTheme.getColorMap());
26
26
  }
27
27
  function onColorizeThemeChanged(func) {
28
- const themeService = StandaloneServices.get(IStandaloneThemeService);
29
- return themeService.onDidColorThemeChange(() => func());
28
+ const themeService = StandaloneServices.get(IStandaloneThemeService);
29
+ return themeService.onDidColorThemeChange(() => func());
30
30
  }
31
31
 
32
32
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -2923,22 +2923,22 @@ var marked_umd = createCommonjsModule(function (module, exports) {
2923
2923
  });
2924
2924
 
2925
2925
  marked_umd.marked.use({
2926
- gfm: true,
2927
- renderer: {
2928
- link(href, title, text) {
2929
- return `<calcite-link href="${href}" title="${title ?? text}" target="Arcade Help">${text}</calcite-link>`;
2926
+ gfm: true,
2927
+ renderer: {
2928
+ link(href, title, text) {
2929
+ return `<calcite-link href="${href}" title="${title ?? text}" target="Arcade Help">${text}</calcite-link>`;
2930
+ }
2930
2931
  }
2931
- }
2932
2932
  });
2933
2933
  function convertMarkdownString(value) {
2934
- value = value ?? "";
2935
- const result = marked_umd.marked(typeof value === "string" ? value : value.value, {
2936
- gfm: true,
2937
- breaks: true,
2938
- headerIds: false,
2939
- mangle: false
2940
- });
2941
- return result;
2934
+ value = value ?? "";
2935
+ const result = marked_umd.marked(typeof value === "string" ? value : value.value, {
2936
+ gfm: true,
2937
+ breaks: true,
2938
+ headerIds: false,
2939
+ mangle: false
2940
+ });
2941
+ return result;
2942
2942
  }
2943
2943
 
2944
2944
  export { colorizedAllCodeElements as a, colorizeCodeElement as b, convertMarkdownString as c, generateColorizeStyles as g, onColorizeThemeChanged as o };
@@ -4,32 +4,32 @@ import { B } from './index2.js';
4
4
  * Filters a collection of items by the given keys and filter word.
5
5
  */
6
6
  function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
7
- if (!keys) {
8
- return [];
9
- }
10
- const _keys = !Array.isArray(keys) ? [keys] : keys;
11
- if (!_keys.length) {
12
- return [];
13
- }
14
- const filterExpression = B(filterWord);
15
- return collection.filter((item) => {
16
- if (beforeFilteringFn) {
17
- const res = beforeFilteringFn(item);
18
- if (res !== null || res !== undefined) {
19
- return res;
20
- }
7
+ if (!keys) {
8
+ return [];
21
9
  }
22
- return _keys.some((key) => filterExpression.test(`${item[key] ?? ""}`));
23
- });
10
+ const _keys = !Array.isArray(keys) ? [keys] : keys;
11
+ if (!_keys.length) {
12
+ return [];
13
+ }
14
+ const filterExpression = B(filterWord);
15
+ return collection.filter((item) => {
16
+ if (beforeFilteringFn) {
17
+ const res = beforeFilteringFn(item);
18
+ if (res !== null || res !== undefined) {
19
+ return res;
20
+ }
21
+ }
22
+ return _keys.some((key) => filterExpression.test(`${item[key] ?? ""}`));
23
+ });
24
24
  }
25
25
  /**
26
26
  * Returns the url to the portal item.
27
27
  */
28
28
  function portalItemPageUrl(portalItem) {
29
- if (!portalItem) {
30
- return "";
31
- }
32
- return `${portalItem.portal.url}/home/item.html?id=${portalItem.id}`;
29
+ if (!portalItem) {
30
+ return "";
31
+ }
32
+ return `${portalItem.portal.url}/home/item.html?id=${portalItem.id}`;
33
33
  }
34
34
  //#endregion
35
35