@arcgis/toolkit 5.0.0-next.98 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -4,10 +4,14 @@ COPYRIGHT © Esri
4
4
 
5
5
  All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
6
6
 
7
- This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
7
+ This material is licensed for use under the [Esri Master License Agreement (MLA)](https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf), and is bound by the terms of that agreement.
8
+ You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
8
9
 
9
- See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
10
+ For additional information, contact:
11
+ Environmental Systems Research Institute, Inc.
12
+ Attn: Contracts and Legal Services Department
13
+ 380 New York Street
14
+ Redlands, California, USA 92373
15
+ USA
10
16
 
11
- For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
12
-
13
- email: contracts@esri.com
17
+ email: legal@esri.com
package/README.md CHANGED
@@ -8,6 +8,5 @@ It is not intended to be used directly, but rather used as a dependency by other
8
8
 
9
9
  ## License
10
10
 
11
- COPYRIGHT © Esri
12
-
13
- This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package.
11
+ This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.0/LICENSE.txt.
12
+ For third party notices, see https://js.arcgis.com/5.0/third-party-notices.txt.
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const mappedFind = (array, callback) => {
4
- for (let i = 0; i < array.length; i++) {
4
+ const length = array.length;
5
+ for (let i = 0; i < length; ++i) {
5
6
  const value = callback(array[i], i);
6
7
  if (value != null) {
7
8
  return value ?? void 0;
@@ -1,5 +1,6 @@
1
1
  const mappedFind = (array, callback) => {
2
- for (let i = 0; i < array.length; i++) {
2
+ const length = array.length;
3
+ for (let i = 0; i < length; ++i) {
3
4
  const value = callback(array[i], i);
4
5
  if (value != null) {
5
6
  return value ?? void 0;
@@ -31,7 +31,7 @@ function getSlotAssignedElements(slot, selector) {
31
31
  }
32
32
  const classes = (...classes2) => {
33
33
  const effectiveClasses = [];
34
- for (let i = 0; i < classes2.length; i++) {
34
+ for (let i = 0; i < classes2.length; ++i) {
35
35
  const arg = classes2[i];
36
36
  if (typeof arg === "string") {
37
37
  effectiveClasses.push(arg);
package/dist/dom/index.js CHANGED
@@ -29,7 +29,7 @@ function getSlotAssignedElements(slot, selector) {
29
29
  }
30
30
  const classes = (...classes2) => {
31
31
  const effectiveClasses = [];
32
- for (let i = 0; i < classes2.length; i++) {
32
+ for (let i = 0; i < classes2.length; ++i) {
33
33
  const arg = classes2[i];
34
34
  if (typeof arg === "string") {
35
35
  effectiveClasses.push(arg);
@@ -14,7 +14,7 @@ export declare function slotChangeHasContent(event: Event): boolean;
14
14
  * Returns a string of textContent if the target `slot` element from the `onSlotchange` event has any text content.
15
15
  *
16
16
  * @param event The event.
17
- * @returns {string} The slots text.
17
+ * @returns The slots text.
18
18
  *
19
19
  * @example
20
20
  * ```tsx
@@ -73,9 +73,9 @@ export declare function slotChangeHasAssignedElement(event: Event): boolean;
73
73
  /**
74
74
  * Returns the assigned elements on a `slot` element from the `onSlotchange` event.
75
75
  *
76
- * @param {Event} event The event.
77
- * @param {string} selector The CSS selector string to filter the returned elements by.
78
- * @returns {Element[]} An array of elements.
76
+ * @param event The event.
77
+ * @param selector The CSS selector string to filter the returned elements by.
78
+ * @returns An array of elements.
79
79
  *
80
80
  * @example
81
81
  * ```tsx
@@ -86,8 +86,8 @@ export declare function slotChangeGetAssignedElements<T extends Element>(event:
86
86
  /**
87
87
  * Returns the assigned elements on a `slot` element, filtered by an optional css selector.
88
88
  *
89
- * @param {HTMLSlotElement} slot The slot element.
90
- * @param {string} selector CSS selector string to filter the returned elements by.
91
- * @returns {Element[]} An array of elements.
89
+ * @param slot The slot element.
90
+ * @param selector CSS selector string to filter the returned elements by.
91
+ * @returns An array of elements.
92
92
  */
93
93
  export declare function getSlotAssignedElements<T extends Element>(slot: HTMLSlotElement, selector?: string): T[];
@@ -14,7 +14,7 @@ export declare function slotChangeHasContent(event: Event): boolean;
14
14
  * Returns a string of textContent if the target `slot` element from the `onSlotchange` event has any text content.
15
15
  *
16
16
  * @param event The event.
17
- * @returns {string} The slots text.
17
+ * @returns The slots text.
18
18
  *
19
19
  * @example
20
20
  * ```tsx
@@ -73,9 +73,9 @@ export declare function slotChangeHasAssignedElement(event: Event): boolean;
73
73
  /**
74
74
  * Returns the assigned elements on a `slot` element from the `onSlotchange` event.
75
75
  *
76
- * @param {Event} event The event.
77
- * @param {string} selector The CSS selector string to filter the returned elements by.
78
- * @returns {Element[]} An array of elements.
76
+ * @param event The event.
77
+ * @param selector The CSS selector string to filter the returned elements by.
78
+ * @returns An array of elements.
79
79
  *
80
80
  * @example
81
81
  * ```tsx
@@ -86,8 +86,8 @@ export declare function slotChangeGetAssignedElements<T extends Element>(event:
86
86
  /**
87
87
  * Returns the assigned elements on a `slot` element, filtered by an optional css selector.
88
88
  *
89
- * @param {HTMLSlotElement} slot The slot element.
90
- * @param {string} selector CSS selector string to filter the returned elements by.
91
- * @returns {Element[]} An array of elements.
89
+ * @param slot The slot element.
90
+ * @param selector CSS selector string to filter the returned elements by.
91
+ * @returns An array of elements.
92
92
  */
93
93
  export declare function getSlotAssignedElements<T extends Element>(slot: HTMLSlotElement, selector?: string): T[];
@@ -19,15 +19,15 @@ type LogOptions = {
19
19
  type EsriConfig = {
20
20
  log: {
21
21
  /**
22
- * @link {https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#LogInterceptor}
22
+ * @link {https://developers.arcgis.com/javascript/latest/references/core/config/#LogInterceptor}
23
23
  */
24
24
  interceptors?: ((level: LogLevel | "none", module: string, ...args: any[]) => void)[];
25
25
  };
26
26
  };
27
27
  /**
28
- * Workaround for setting {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#log log interceptors} and maintaining compatibility with {@link https://devtopia.esri.com/WebGIS/arcgis-websceneviewer-app/blob/8f0a1bbcf12d1193134d94589d9e187f0afa72fa/src/js/support/ApiLoggerInstrumentation.ts#L17 js-api's interceptor usage}.
28
+ * Workaround for setting {@link https://developers.arcgis.com/javascript/latest/references/core/config/#log log interceptors} and maintaining compatibility with {@link https://devtopia.esri.com/WebGIS/arcgis-websceneviewer-app/blob/8f0a1bbcf12d1193134d94589d9e187f0afa72fa/src/js/support/ApiLoggerInstrumentation.ts#L17 js-api's interceptor usage}.
29
29
  * @see {@link https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/74935}
30
- * @param config {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html}
30
+ * @param config {@link https://developers.arcgis.com/javascript/latest/references/core/config/}
31
31
  * @example
32
32
  * ```ts
33
33
  * // IMPORTANT: do this only in config.ts or another early-loaded module
@@ -19,15 +19,15 @@ type LogOptions = {
19
19
  type EsriConfig = {
20
20
  log: {
21
21
  /**
22
- * @link {https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#LogInterceptor}
22
+ * @link {https://developers.arcgis.com/javascript/latest/references/core/config/#LogInterceptor}
23
23
  */
24
24
  interceptors?: ((level: LogLevel | "none", module: string, ...args: any[]) => void)[];
25
25
  };
26
26
  };
27
27
  /**
28
- * Workaround for setting {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#log log interceptors} and maintaining compatibility with {@link https://devtopia.esri.com/WebGIS/arcgis-websceneviewer-app/blob/8f0a1bbcf12d1193134d94589d9e187f0afa72fa/src/js/support/ApiLoggerInstrumentation.ts#L17 js-api's interceptor usage}.
28
+ * Workaround for setting {@link https://developers.arcgis.com/javascript/latest/references/core/config/#log log interceptors} and maintaining compatibility with {@link https://devtopia.esri.com/WebGIS/arcgis-websceneviewer-app/blob/8f0a1bbcf12d1193134d94589d9e187f0afa72fa/src/js/support/ApiLoggerInstrumentation.ts#L17 js-api's interceptor usage}.
29
29
  * @see {@link https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/74935}
30
- * @param config {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html}
30
+ * @param config {@link https://developers.arcgis.com/javascript/latest/references/core/config/}
31
31
  * @example
32
32
  * ```ts
33
33
  * // IMPORTANT: do this only in config.ts or another early-loaded module
@@ -72,9 +72,7 @@ const getMinorVersion = (version) => {
72
72
  };
73
73
  const getPreamble = (version) => (
74
74
  //#endregion getPreamble
75
- `All material copyright Esri, All Rights Reserved, unless otherwise specified.
76
- See https://js.arcgis.com/${getMinorVersion(version)}/esri/copyright.txt for details.
77
- v${version}`
75
+ `COPYRIGHT Esri - https://js.arcgis.com/${getMinorVersion(version)}/LICENSE.txt`
78
76
  );
79
77
  const setValuesInString = (message, values = {}) => (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
80
78
  exports.addLtrMark = addLtrMark;
@@ -42,7 +42,7 @@ export declare const quoteString: (value: string) => string;
42
42
  * Create a filter expression from a filter word.
43
43
  *
44
44
  * @remarks Once browser support permits, use `RegExp.escape()` instead.
45
- * @todo DEPRECATE
45
+ * @privateRemarks TODO: DEPRECATE
46
46
  */
47
47
  export declare const createFilterExpression: (filterWord: string) => RegExp;
48
48
  /**
@@ -88,12 +88,12 @@ export declare const getMinorVersion: (version: string) => string;
88
88
  * notice at the top of a file.
89
89
  * The preamble text contains the version number and a link to the license.
90
90
  * The version number should normally come from package.json.
91
+ *
92
+ * @see https://webgis.esri.com/webgis/platform-guidelines/licensing
91
93
  * @example
92
94
  * ```ts
93
- * const preamble = getPreamble("4.34.0-next.123");
94
- * // All material copyright Esri, All Rights Reserved, unless otherwise specified.
95
- * // See https://js.arcgis.com/4.34/esri/copyright.txt for details.
96
- * // v4.34.0-next.123
95
+ * const preamble = getPreamble("5.0.1-next.456");
96
+ * // COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt
97
97
  * ```
98
98
  */
99
99
  export declare const getPreamble: (version: string) => string;
@@ -101,6 +101,6 @@ export declare const getPreamble: (version: string) => string;
101
101
  * Replace values in a string using the format {valueName} with the value from the values object.
102
102
  * If the value is not found in the values object, then the value is not replaced.
103
103
  *
104
- * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/api-reference/esri-intl.html#substitute instead
104
+ * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/references/core/intl/#substitute instead
105
105
  */
106
106
  export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
@@ -42,7 +42,7 @@ export declare const quoteString: (value: string) => string;
42
42
  * Create a filter expression from a filter word.
43
43
  *
44
44
  * @remarks Once browser support permits, use `RegExp.escape()` instead.
45
- * @todo DEPRECATE
45
+ * @privateRemarks TODO: DEPRECATE
46
46
  */
47
47
  export declare const createFilterExpression: (filterWord: string) => RegExp;
48
48
  /**
@@ -88,12 +88,12 @@ export declare const getMinorVersion: (version: string) => string;
88
88
  * notice at the top of a file.
89
89
  * The preamble text contains the version number and a link to the license.
90
90
  * The version number should normally come from package.json.
91
+ *
92
+ * @see https://webgis.esri.com/webgis/platform-guidelines/licensing
91
93
  * @example
92
94
  * ```ts
93
- * const preamble = getPreamble("4.34.0-next.123");
94
- * // All material copyright Esri, All Rights Reserved, unless otherwise specified.
95
- * // See https://js.arcgis.com/4.34/esri/copyright.txt for details.
96
- * // v4.34.0-next.123
95
+ * const preamble = getPreamble("5.0.1-next.456");
96
+ * // COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt
97
97
  * ```
98
98
  */
99
99
  export declare const getPreamble: (version: string) => string;
@@ -101,6 +101,6 @@ export declare const getPreamble: (version: string) => string;
101
101
  * Replace values in a string using the format {valueName} with the value from the values object.
102
102
  * If the value is not found in the values object, then the value is not replaced.
103
103
  *
104
- * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/api-reference/esri-intl.html#substitute instead
104
+ * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/references/core/intl/#substitute instead
105
105
  */
106
106
  export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
@@ -70,9 +70,7 @@ const getMinorVersion = (version) => {
70
70
  };
71
71
  const getPreamble = (version) => (
72
72
  //#endregion getPreamble
73
- `All material copyright Esri, All Rights Reserved, unless otherwise specified.
74
- See https://js.arcgis.com/${getMinorVersion(version)}/esri/copyright.txt for details.
75
- v${version}`
73
+ `COPYRIGHT Esri - https://js.arcgis.com/${getMinorVersion(version)}/LICENSE.txt`
76
74
  );
77
75
  const setValuesInString = (message, values = {}) => (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
78
76
  export {
@@ -13,6 +13,6 @@ export declare const hasSameOrigin: (url1: string | null | undefined, url2: stri
13
13
  * @returns True if the string is a URL.
14
14
  *
15
15
  * @remarks If browser support permits, use https://developer.mozilla.org/en-US/docs/Web/API/URL/parse_static instead
16
- * @todo DEPRECATE
16
+ * @privateRemarks TODO: DEPRECATE
17
17
  */
18
18
  export declare const isURL: (url: string) => boolean;
@@ -13,6 +13,6 @@ export declare const hasSameOrigin: (url1: string | null | undefined, url2: stri
13
13
  * @returns True if the string is a URL.
14
14
  *
15
15
  * @remarks If browser support permits, use https://developer.mozilla.org/en-US/docs/Web/API/URL/parse_static instead
16
- * @todo DEPRECATE
16
+ * @privateRemarks TODO: DEPRECATE
17
17
  */
18
18
  export declare const isURL: (url: string) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/toolkit",
3
- "version": "5.0.0-next.98",
3
+ "version": "5.0.0",
4
4
  "description": "Collection of common internal patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "sideEffects": false,