@arcgis/components-utils 4.34.0-next.8 → 4.34.0-next.81

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.
@@ -1,29 +0,0 @@
1
- /**
2
- * Add quotes to a string for display purposes.
3
- * If the string contains a double quote, then single quotes will be used.
4
- * If the string contains a single quote, then double quotes will be used.
5
- * If the string contains both, then double quotes will be used and the single quotes will be escaped.
6
- * @param value The string to quote
7
- * @returns The quoted string
8
- */
9
- export declare const quoteString: (value: string) => string;
10
- /**
11
- * Create a filter expression from a filter word.
12
- * @param filterWord The filter word to create the expression from.
13
- * @returns The filter expression.
14
- */
15
- export declare const createFilterExpression: (filterWord: string) => RegExp;
16
- /**
17
- * Replace values in a string using the format {valueName} with the value from the values object.
18
- * If the value is not found in the values object, then the value is not replaced.
19
- * @param message The string to replace values in.
20
- * @param values The values to replace in the string.
21
- * @returns The string with the values replaced.
22
- */
23
- export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
24
- /**
25
- * Add LTR marks to a string to ensure it is displayed as LTR.
26
- * @param value The string to add LTR marks to.
27
- * @returns The string with LTR marks.
28
- */
29
- export declare const addLTRMark: (value: string | undefined) => string;
package/dist/strings.d.ts DELETED
@@ -1,29 +0,0 @@
1
- /**
2
- * Add quotes to a string for display purposes.
3
- * If the string contains a double quote, then single quotes will be used.
4
- * If the string contains a single quote, then double quotes will be used.
5
- * If the string contains both, then double quotes will be used and the single quotes will be escaped.
6
- * @param value The string to quote
7
- * @returns The quoted string
8
- */
9
- export declare const quoteString: (value: string) => string;
10
- /**
11
- * Create a filter expression from a filter word.
12
- * @param filterWord The filter word to create the expression from.
13
- * @returns The filter expression.
14
- */
15
- export declare const createFilterExpression: (filterWord: string) => RegExp;
16
- /**
17
- * Replace values in a string using the format {valueName} with the value from the values object.
18
- * If the value is not found in the values object, then the value is not replaced.
19
- * @param message The string to replace values in.
20
- * @param values The values to replace in the string.
21
- * @returns The string with the values replaced.
22
- */
23
- export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
24
- /**
25
- * Add LTR marks to a string to ensure it is displayed as LTR.
26
- * @param value The string to add LTR marks to.
27
- * @returns The string with LTR marks.
28
- */
29
- export declare const addLTRMark: (value: string | undefined) => string;
@@ -1 +0,0 @@
1
- export declare function captureConsoleErrors(): unknown[][];
@@ -1 +0,0 @@
1
- export declare function captureConsoleErrors(): unknown[][];
package/dist/text.d.cts DELETED
@@ -1,7 +0,0 @@
1
- /** Convert kebab-case string to PascalCase */
2
- export declare const kebabToPascal: (string: string) => string;
3
- /** Convert camelCase string to kebab-case */
4
- export declare const camelToKebab: (string: string) => string;
5
- export declare const capitalize: <T extends string>(string: T) => Capitalize<T>;
6
- export declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
7
- export declare const camelToHuman: (string: string) => string;
package/dist/text.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /** Convert kebab-case string to PascalCase */
2
- export declare const kebabToPascal: (string: string) => string;
3
- /** Convert camelCase string to kebab-case */
4
- export declare const camelToKebab: (string: string) => string;
5
- export declare const capitalize: <T extends string>(string: T) => Capitalize<T>;
6
- export declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
7
- export declare const camelToHuman: (string: string) => string;
@@ -1,7 +0,0 @@
1
- /**
2
- * Like setTimeout(), but does not advance the clock if the program is
3
- * stopped on a debugger breakpoint.
4
- *
5
- * @see https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/60405
6
- */
7
- export declare const devToolsAwareTimeout: (callback: () => void, timeout: number) => ReturnType<typeof setInterval>;
@@ -1,7 +0,0 @@
1
- /**
2
- * Like setTimeout(), but does not advance the clock if the program is
3
- * stopped on a debugger breakpoint.
4
- *
5
- * @see https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/60405
6
- */
7
- export declare const devToolsAwareTimeout: (callback: () => void, timeout: number) => ReturnType<typeof setInterval>;
@@ -1,12 +0,0 @@
1
- /**
2
- * Safeguard to ensure that an item is not null.
3
- * @param item The item to check.
4
- * @returns Returns true if the item is not null.
5
- */
6
- export declare const isNotNull: <T>(item: T | null) => item is T;
7
- /**
8
- * Safe guard to ensure that an item is not undefined.
9
- * @param item The item to check.
10
- * @returns Returns true if the item is not undefined.
11
- */
12
- export declare const isNotUndefined: <T>(item: T | undefined) => item is T;
@@ -1,12 +0,0 @@
1
- /**
2
- * Safeguard to ensure that an item is not null.
3
- * @param item The item to check.
4
- * @returns Returns true if the item is not null.
5
- */
6
- export declare const isNotNull: <T>(item: T | null) => item is T;
7
- /**
8
- * Safe guard to ensure that an item is not undefined.
9
- * @param item The item to check.
10
- * @returns Returns true if the item is not undefined.
11
- */
12
- export declare const isNotUndefined: <T>(item: T | undefined) => item is T;
package/dist/types.d.cts DELETED
@@ -1,30 +0,0 @@
1
- export type Nil = null | undefined;
2
- export type IHandle = {
3
- remove: () => void;
4
- };
5
- /**
6
- * Identity function - returns back the first parameter
7
- *
8
- * Useful when providing a "mapping function" is required, but you have no need
9
- * to change the value
10
- */
11
- export declare const identity: <T>(value: T) => T;
12
- /**
13
- * Get back a type whose keys are all marked as mutable (no longer "readonly")
14
- *
15
- * It's a best practice to mark all keys as readonly by default in all the
16
- * interfaces and types you create. Benefits:
17
- * - Explicitly documents that a given key won't be modified/should not be
18
- * modified
19
- * - Favors more declarative and functional style programming
20
- * - Helps prevent bugs related to mutation unexpectedly affecting other places
21
- * that held a reference to the same object
22
- *
23
- * Your function could return a type like "ResolvedConfig", that has all keys
24
- * marked as readonly. But inside the function you may wish to modify some of
25
- * the keys while creating the object - casting the object to
26
- * `Writable<ResolvedConfig>` helps with that
27
- */
28
- export type Writable<T> = {
29
- -readonly [k in keyof T]: T[k];
30
- };
package/dist/types.d.ts DELETED
@@ -1,30 +0,0 @@
1
- export type Nil = null | undefined;
2
- export type IHandle = {
3
- remove: () => void;
4
- };
5
- /**
6
- * Identity function - returns back the first parameter
7
- *
8
- * Useful when providing a "mapping function" is required, but you have no need
9
- * to change the value
10
- */
11
- export declare const identity: <T>(value: T) => T;
12
- /**
13
- * Get back a type whose keys are all marked as mutable (no longer "readonly")
14
- *
15
- * It's a best practice to mark all keys as readonly by default in all the
16
- * interfaces and types you create. Benefits:
17
- * - Explicitly documents that a given key won't be modified/should not be
18
- * modified
19
- * - Favors more declarative and functional style programming
20
- * - Helps prevent bugs related to mutation unexpectedly affecting other places
21
- * that held a reference to the same object
22
- *
23
- * Your function could return a type like "ResolvedConfig", that has all keys
24
- * marked as readonly. But inside the function you may wish to modify some of
25
- * the keys while creating the object - casting the object to
26
- * `Writable<ResolvedConfig>` helps with that
27
- */
28
- export type Writable<T> = {
29
- -readonly [k in keyof T]: T[k];
30
- };
package/dist/ui.d.cts DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Allows to debounce a function.
3
- * @template F Function type that should extend a function with any parameters and a return type.
4
- * @param func Function to be debounced
5
- * @param waitFor Debounce time in milliseconds
6
- * @returns Returns a function that can be called to debounce the given function.
7
- */
8
- export declare const debounce: <F extends (...args: Parameters<F>) => ReturnType<F>>(func: F, waitFor?: number) => ((...args: Parameters<F>) => void);
package/dist/ui.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Allows to debounce a function.
3
- * @template F Function type that should extend a function with any parameters and a return type.
4
- * @param func Function to be debounced
5
- * @param waitFor Debounce time in milliseconds
6
- * @returns Returns a function that can be called to debounce the given function.
7
- */
8
- export declare const debounce: <F extends (...args: Parameters<F>) => ReturnType<F>>(func: F, waitFor?: number) => ((...args: Parameters<F>) => void);
package/dist/url.d.cts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * Compares two url strings for their origin and returns true if they have the same origin.
3
- * @param url1 First url string
4
- * @param url2 Second url string
5
- * @param ignoreProtocol Indicates if protocol comparison should be ignored
6
- * @returns True if the two url strings have the same origin
7
- */
8
- export declare const hasSameOrigin: (url1: string | null | undefined, url2: string | null | undefined, ignoreProtocol?: boolean) => boolean;
9
- /**
10
- * Tests if a url string is a URL or not.
11
- * @param url The url string to test
12
- * @returns True if the string is a URL.
13
- */
14
- export declare const isURL: (url: string) => boolean;
package/dist/url.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * Compares two url strings for their origin and returns true if they have the same origin.
3
- * @param url1 First url string
4
- * @param url2 Second url string
5
- * @param ignoreProtocol Indicates if protocol comparison should be ignored
6
- * @returns True if the two url strings have the same origin
7
- */
8
- export declare const hasSameOrigin: (url1: string | null | undefined, url2: string | null | undefined, ignoreProtocol?: boolean) => boolean;
9
- /**
10
- * Tests if a url string is a URL or not.
11
- * @param url The url string to test
12
- * @returns True if the string is a URL.
13
- */
14
- export declare const isURL: (url: string) => boolean;