@arcgis/toolkit 5.1.0-next.5 → 5.1.0-next.50

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.
@@ -117,7 +117,7 @@ const getClosestElement = (base, selector) => {
117
117
  if (rootElement === globalThis.document) {
118
118
  return;
119
119
  }
120
- currentElement = rootElement.host;
120
+ currentElement = rootElement?.host;
121
121
  }
122
122
  return;
123
123
  };
package/dist/dom/index.js CHANGED
@@ -115,7 +115,7 @@ const getClosestElement = (base, selector) => {
115
115
  if (rootElement === globalThis.document) {
116
116
  return;
117
117
  }
118
- currentElement = rootElement.host;
118
+ currentElement = rootElement?.host;
119
119
  }
120
120
  return;
121
121
  };
@@ -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
@@ -62,15 +62,18 @@ export declare const addLtrMark: (value: string | undefined) => string;
62
62
  export type UUID = ReturnType<typeof crypto.randomUUID>;
63
63
  /**
64
64
  * Generate a GUID string.
65
+ *
66
+ * If your component is using shadow root, the DOM element IDs do not need
67
+ * to be globally unique - IDs are scoped to the shadow root.
68
+ *
69
+ * Avoid using GUID and other non-deterministic output in render() as they
70
+ * cause SSR hydration issues and snapshot test instability.
71
+ *
65
72
  * @example
66
73
  * ```ts
67
74
  * const id = generateGuid();
68
75
  * // 00000000-0000-0000-0000-000000000000.
69
76
  * ```
70
- *
71
- * @remarks
72
- * If your component is using shadow root, the DOM element IDs do not need
73
- * to be globally unique.
74
77
  */
75
78
  export declare const generateGuid: () => UUID;
76
79
  /**
@@ -101,6 +104,6 @@ export declare const getPreamble: (version: string) => string;
101
104
  * Replace values in a string using the format {valueName} with the value from the values object.
102
105
  * If the value is not found in the values object, then the value is not replaced.
103
106
  *
104
- * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/api-reference/esri-intl.html#substitute instead
107
+ * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/references/core/intl/#substitute instead
105
108
  */
106
109
  export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
@@ -62,15 +62,18 @@ export declare const addLtrMark: (value: string | undefined) => string;
62
62
  export type UUID = ReturnType<typeof crypto.randomUUID>;
63
63
  /**
64
64
  * Generate a GUID string.
65
+ *
66
+ * If your component is using shadow root, the DOM element IDs do not need
67
+ * to be globally unique - IDs are scoped to the shadow root.
68
+ *
69
+ * Avoid using GUID and other non-deterministic output in render() as they
70
+ * cause SSR hydration issues and snapshot test instability.
71
+ *
65
72
  * @example
66
73
  * ```ts
67
74
  * const id = generateGuid();
68
75
  * // 00000000-0000-0000-0000-000000000000.
69
76
  * ```
70
- *
71
- * @remarks
72
- * If your component is using shadow root, the DOM element IDs do not need
73
- * to be globally unique.
74
77
  */
75
78
  export declare const generateGuid: () => UUID;
76
79
  /**
@@ -101,6 +104,6 @@ export declare const getPreamble: (version: string) => string;
101
104
  * Replace values in a string using the format {valueName} with the value from the values object.
102
105
  * If the value is not found in the values object, then the value is not replaced.
103
106
  *
104
- * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/api-reference/esri-intl.html#substitute instead
107
+ * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/references/core/intl/#substitute instead
105
108
  */
106
109
  export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/toolkit",
3
- "version": "5.1.0-next.5",
3
+ "version": "5.1.0-next.50",
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,