@itwin/core-i18n 5.9.0-dev.9 → 5.10.0-dev.3
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/CHANGELOG.md +16 -1
- package/lib/cjs/ITwinLocalization.js.map +1 -1
- package/lib/cjs/core-i18n.js.map +1 -1
- package/lib/cjs/test/ITwinLocalization.test.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +196 -27
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +193 -24
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/lib/esm/ITwinLocalization.js.map +1 -1
- package/lib/esm/core-i18n.js.map +1 -1
- package/lib/esm/test/ITwinLocalization.test.js.map +1 -1
- package/package.json +6 -6
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
function cov_ogldeftyv() {
|
|
21
21
|
var path = "C:\\agent\\_work\\1\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
|
|
22
|
-
var hash = "
|
|
22
|
+
var hash = "113751a8262a3149163a15d970bf9098e64926ce";
|
|
23
23
|
var global = new Function("return this")();
|
|
24
24
|
var gcv = "__coverage__";
|
|
25
25
|
var coverageData = {
|
|
@@ -2123,10 +2123,10 @@ function cov_ogldeftyv() {
|
|
|
2123
2123
|
sources: ["C:\\agent\\_work\\1\\s\\core\\i18n\\src\\ITwinLocalization.ts"],
|
|
2124
2124
|
names: [],
|
|
2125
2125
|
mappings: ";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAA2E;AAC3E,wGAAmG;AACnG,gFAAqF;AACrF,sDAA6C;AAG7C,MAAM,mBAAmB,GAAW,CAAC,CAAC,CAAC,8GAA8G;AAcrJ;;;GAGG;AACH,MAAa,iBAAiB;IACrB,OAAO,CAAO;IACJ,YAAY,CAAc;IAC1B,eAAe,CAAiB;IAChC,iBAAiB,CAAkB;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,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC,IAAc,IAAI,qBAAM,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,KAAK,CAAC,IAAc,IAAI,qBAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,gBAAgB,CAAC,IAAc;QACrC,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;gBAC7B,OAAO,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC",
|
|
2126
|
-
sourcesContent: ["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Localization\n */\n\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\n\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\n\n/** Options for ITwinLocalization\n * @public\n */\nexport interface LocalizationOptions {\n urlTemplate?: string;\n backendPlugin?: Module;\n detectorPlugin?: Module;\n initOptions?: InitOptions;\n backendHttpOptions?: BackendOptions;\n detectorOptions?: DetectorOptions;\n}\n\n/** Supplies localizations for iTwin.js\n * @note this class uses the [i18next](https://www.i18next.com/) package.\n * @public\n */\nexport class ITwinLocalization implements Localization {\n public i18next: i18n;\n private readonly _initOptions: InitOptions;\n private readonly _backendOptions: BackendOptions;\n private readonly _detectionOptions: DetectorOptions;\n private readonly _namespaces = new Map<string, Promise<void>>();\n\n public constructor(options?: LocalizationOptions) {\n this.i18next = i18next.createInstance();\n\n this._backendOptions = {\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\n crossDomain: true,\n ...options?.backendHttpOptions,\n };\n\n this._detectionOptions = {\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\n lookupQuerystring: \"lng\",\n caches: [],\n ...options?.detectorOptions,\n };\n\n this._initOptions = {\n interpolation: { escapeValue: true },\n fallbackLng: \"en\",\n maxRetries: DEFAULT_MAX_RETRIES,\n backend: this._backendOptions,\n detection: this._detectionOptions,\n ...options?.initOptions,\n };\n\n this.i18next\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\n .use(options?.backendPlugin ?? Backend)\n .use(TranslationLogger);\n }\n\n public async initialize(namespaces: string[]): Promise<void> {\n\n // Also consider namespaces passed into constructor\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\n\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\n if (defaultNamespace)\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\n\n const initOptions: InitOptions = {\n ...this._initOptions,\n defaultNS: defaultNamespace,\n ns: [...combinedNamespaces],\n };\n\n // if in a development environment, set debugging\n if (process.env.NODE_ENV === \"development\")\n initOptions.debug = true;\n\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\n\n for (const ns of namespaces)\n this._namespaces.set(ns, initPromise);\n\n return initPromise;\n }\n\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\n * For example:\n * ``` ts\n * \"MyKeys\": {\n * \"Key1\": \"First value\",\n * \"Key2\": \"Second value\"\n * }\n * ```\n *\n * ``` ts\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\n * ```\n * @param line The input line, potentially containing %{keys}.\n * @returns The line with all %{keys} translated\n * @public\n */\n public getLocalizedKeys(line: string): string {\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\n }\n\n /** Return the translated value of a key.\n * @param key - the key that matches a property in the JSON localization file.\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\n * followed by a colon, followed by the property in the JSON file.\n * For example:\n * ``` ts\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\n * ```\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\n * @returns The string corresponding to the first key that resolves.\n * @throws Error if no keys resolve to a string.\n * @public\n */\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\n if (options?.returnDetails || options?.returnObjects) {\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\n }\n\n const value = this.i18next.t(key, options);\n\n if (typeof value !== \"string\") {\n throw new Error(\"Translation key(s) string not found\");\n }\n\n return value;\n }\n\n /** Gets the English translation.\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\n * @param key - the key that matches a property in the JSON localization file.\n * @returns The string corresponding to the first key that resolves.\n * @throws Error if no keys resolve to a string.\n * @internal\n */\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\n if (options?.returnDetails || options?.returnObjects) {\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\n }\n\n options = {\n ...options,\n ns: namespace, // ensure namespace argument is used\n };\n\n const en = this.i18next.getFixedT(\"en\", namespace);\n const str = en(key, options);\n if (typeof str !== \"string\")\n throw new Error(\"Translation key(s) not found\");\n\n return str;\n }\n\n /** Get the promise for an already registered Namespace.\n * @param name - the name of the namespace\n * @public\n */\n public getNamespacePromise(name: string): Promise<void> | undefined {\n return this._namespaces.get(name);\n }\n\n /** @internal */\n public getLanguageList(): readonly string[] {\n return this.i18next.languages;\n }\n\n /** override the language detected in the browser */\n public async changeLanguage(language: string) {\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\n }\n\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\n * @public\n */\n public async registerNamespace(name: string): Promise<void> {\n const existing = this._namespaces.get(name);\n if (existing !== undefined)\n return existing;\n\n const theReadPromise = new Promise<void>((resolve) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.i18next.loadNamespaces(name, (err) => {\n if (!err)\n return resolve();\n\n // Here we got a non-null err object.\n // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.\n // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.\n // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.\n // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.\n let locales = this.getLanguageList().map((thisLocale: any) => `/${thisLocale}/`);\n\n try {\n for (const thisError of err) {\n if (typeof thisError === \"string\")\n locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));\n }\n } catch {\n locales = [];\n }\n // if we removed every locale from the array, it wasn't loaded.\n if (locales.length === 0)\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\n\n resolve();\n });\n });\n this._namespaces.set(name, theReadPromise);\n return theReadPromise;\n }\n\n /** @internal */\n public unregisterNamespace(name: string): void {\n this._namespaces.delete(name);\n }\n}\n\nclass TranslationLogger {\n public static readonly type = \"logger\";\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\n private createLogMessage(args: string[]) {\n let message = args[0];\n for (let i = 1; i < args.length; ++i) {\n if (typeof args[i] === \"string\")\n message += `\\n ${args[i]}`;\n }\n return message;\n }\n}\n"]
|
|
2126
|
+
sourcesContent: ["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\r\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\r\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\n\r\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\r\n\r\n/** Options for ITwinLocalization\r\n * @public\r\n */\r\nexport interface LocalizationOptions {\r\n urlTemplate?: string;\r\n backendPlugin?: Module;\r\n detectorPlugin?: Module;\r\n initOptions?: InitOptions;\r\n backendHttpOptions?: BackendOptions;\r\n detectorOptions?: DetectorOptions;\r\n}\r\n\r\n/** Supplies localizations for iTwin.js\r\n * @note this class uses the [i18next](https://www.i18next.com/) package.\r\n * @public\r\n */\r\nexport class ITwinLocalization implements Localization {\r\n public i18next: i18n;\r\n private readonly _initOptions: InitOptions;\r\n private readonly _backendOptions: BackendOptions;\r\n private readonly _detectionOptions: DetectorOptions;\r\n private readonly _namespaces = new Map<string, Promise<void>>();\r\n\r\n public constructor(options?: LocalizationOptions) {\r\n this.i18next = i18next.createInstance();\r\n\r\n this._backendOptions = {\r\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\r\n crossDomain: true,\r\n ...options?.backendHttpOptions,\r\n };\r\n\r\n this._detectionOptions = {\r\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\r\n lookupQuerystring: \"lng\",\r\n caches: [],\r\n ...options?.detectorOptions,\r\n };\r\n\r\n this._initOptions = {\r\n interpolation: { escapeValue: true },\r\n fallbackLng: \"en\",\r\n maxRetries: DEFAULT_MAX_RETRIES,\r\n backend: this._backendOptions,\r\n detection: this._detectionOptions,\r\n ...options?.initOptions,\r\n };\r\n\r\n this.i18next\r\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\r\n .use(options?.backendPlugin ?? Backend)\r\n .use(TranslationLogger);\r\n }\r\n\r\n public async initialize(namespaces: string[]): Promise<void> {\r\n\r\n // Also consider namespaces passed into constructor\r\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\r\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\r\n\r\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\r\n if (defaultNamespace)\r\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\r\n\r\n const initOptions: InitOptions = {\r\n ...this._initOptions,\r\n defaultNS: defaultNamespace,\r\n ns: [...combinedNamespaces],\r\n };\r\n\r\n // if in a development environment, set debugging\r\n if (process.env.NODE_ENV === \"development\")\r\n initOptions.debug = true;\r\n\r\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\r\n\r\n for (const ns of namespaces)\r\n this._namespaces.set(ns, initPromise);\r\n\r\n return initPromise;\r\n }\r\n\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n * @param line The input line, potentially containing %{keys}.\r\n * @returns The line with all %{keys} translated\r\n * @public\r\n */\r\n public getLocalizedKeys(line: string): string {\r\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\r\n }\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @public\r\n */\r\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n const value = this.i18next.t(key, options);\r\n\r\n if (typeof value !== \"string\") {\r\n throw new Error(\"Translation key(s) string not found\");\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /** Gets the English translation.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @internal\r\n */\r\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n options = {\r\n ...options,\r\n ns: namespace, // ensure namespace argument is used\r\n };\r\n\r\n const en = this.i18next.getFixedT(\"en\", namespace);\r\n const str = en(key, options);\r\n if (typeof str !== \"string\")\r\n throw new Error(\"Translation key(s) not found\");\r\n\r\n return str;\r\n }\r\n\r\n /** Get the promise for an already registered Namespace.\r\n * @param name - the name of the namespace\r\n * @public\r\n */\r\n public getNamespacePromise(name: string): Promise<void> | undefined {\r\n return this._namespaces.get(name);\r\n }\r\n\r\n /** @internal */\r\n public getLanguageList(): readonly string[] {\r\n return this.i18next.languages;\r\n }\r\n\r\n /** override the language detected in the browser */\r\n public async changeLanguage(language: string) {\r\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\r\n }\r\n\r\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\r\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n * @public\r\n */\r\n public async registerNamespace(name: string): Promise<void> {\r\n const existing = this._namespaces.get(name);\r\n if (existing !== undefined)\r\n return existing;\r\n\r\n const theReadPromise = new Promise<void>((resolve) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.i18next.loadNamespaces(name, (err) => {\r\n if (!err)\r\n return resolve();\r\n\r\n // Here we got a non-null err object.\r\n // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.\r\n // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.\r\n // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.\r\n // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.\r\n let locales = this.getLanguageList().map((thisLocale: any) => `/${thisLocale}/`);\r\n\r\n try {\r\n for (const thisError of err) {\r\n if (typeof thisError === \"string\")\r\n locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));\r\n }\r\n } catch {\r\n locales = [];\r\n }\r\n // if we removed every locale from the array, it wasn't loaded.\r\n if (locales.length === 0)\r\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\r\n\r\n resolve();\r\n });\r\n });\r\n this._namespaces.set(name, theReadPromise);\r\n return theReadPromise;\r\n }\r\n\r\n /** @internal */\r\n public unregisterNamespace(name: string): void {\r\n this._namespaces.delete(name);\r\n }\r\n}\r\n\r\nclass TranslationLogger {\r\n public static readonly type = \"logger\";\r\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\r\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\r\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\r\n private createLogMessage(args: string[]) {\r\n let message = args[0];\r\n for (let i = 1; i < args.length; ++i) {\r\n if (typeof args[i] === \"string\")\r\n message += `\\n ${args[i]}`;\r\n }\r\n return message;\r\n }\r\n}\r\n"]
|
|
2127
2127
|
},
|
|
2128
2128
|
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
2129
|
-
hash: "
|
|
2129
|
+
hash: "113751a8262a3149163a15d970bf9098e64926ce"
|
|
2130
2130
|
};
|
|
2131
2131
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
2132
2132
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
@@ -17411,7 +17411,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17411
17411
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17412
17412
|
/* harmony export */ BeEvent: () => (/* binding */ BeEvent),
|
|
17413
17413
|
/* harmony export */ BeEventList: () => (/* binding */ BeEventList),
|
|
17414
|
-
/* harmony export */ BeUiEvent: () => (/* binding */ BeUiEvent)
|
|
17414
|
+
/* harmony export */ BeUiEvent: () => (/* binding */ BeUiEvent),
|
|
17415
|
+
/* harmony export */ BeUnorderedEvent: () => (/* binding */ BeUnorderedEvent),
|
|
17416
|
+
/* harmony export */ BeUnorderedUiEvent: () => (/* binding */ BeUnorderedUiEvent)
|
|
17415
17417
|
/* harmony export */ });
|
|
17416
17418
|
/* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
|
|
17417
17419
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -17430,7 +17432,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17430
17432
|
*/
|
|
17431
17433
|
class BeEvent {
|
|
17432
17434
|
_listeners = [];
|
|
17433
|
-
|
|
17435
|
+
_emitDepth = 0;
|
|
17434
17436
|
/** The number of listeners currently subscribed to the event. */
|
|
17435
17437
|
get numberOfListeners() { return this._listeners.length; }
|
|
17436
17438
|
/**
|
|
@@ -17467,7 +17469,7 @@ class BeEvent {
|
|
|
17467
17469
|
for (let i = 0; i < listeners.length; ++i) {
|
|
17468
17470
|
const context = listeners[i];
|
|
17469
17471
|
if (context.listener === listener && context.scope === scope) {
|
|
17470
|
-
if (this.
|
|
17472
|
+
if (this._emitDepth > 0) {
|
|
17471
17473
|
context.listener = undefined;
|
|
17472
17474
|
}
|
|
17473
17475
|
else {
|
|
@@ -17484,7 +17486,7 @@ class BeEvent {
|
|
|
17484
17486
|
* @see [[BeEvent.removeListener]], [[BeEvent.addListener]]
|
|
17485
17487
|
*/
|
|
17486
17488
|
raiseEvent(...args) {
|
|
17487
|
-
this.
|
|
17489
|
+
this._emitDepth++;
|
|
17488
17490
|
const listeners = this._listeners;
|
|
17489
17491
|
const length = listeners.length;
|
|
17490
17492
|
let dropped = false;
|
|
@@ -17500,16 +17502,21 @@ class BeEvent {
|
|
|
17500
17502
|
catch (e) {
|
|
17501
17503
|
_UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
|
|
17502
17504
|
}
|
|
17503
|
-
if (context.
|
|
17505
|
+
if (!context.listener) {
|
|
17506
|
+
// listener was removed during its own callback
|
|
17507
|
+
dropped = true;
|
|
17508
|
+
}
|
|
17509
|
+
else if (context.once) {
|
|
17504
17510
|
context.listener = undefined;
|
|
17505
17511
|
dropped = true;
|
|
17506
17512
|
}
|
|
17507
17513
|
}
|
|
17508
17514
|
}
|
|
17509
|
-
|
|
17510
|
-
|
|
17515
|
+
this._emitDepth--;
|
|
17516
|
+
// Only sweep tombstoned entries when the outermost emit completes,
|
|
17517
|
+
// so nested raiseEvent calls never mutate the array mid-iteration.
|
|
17518
|
+
if (dropped && this._emitDepth === 0)
|
|
17511
17519
|
this._listeners = this._listeners.filter((ctx) => ctx.listener !== undefined);
|
|
17512
|
-
this._insideRaiseEvent = false;
|
|
17513
17520
|
}
|
|
17514
17521
|
/** Determine whether this BeEvent has a specified listener registered.
|
|
17515
17522
|
* @param listener The listener to check.
|
|
@@ -17533,6 +17540,102 @@ class BeUiEvent extends BeEvent {
|
|
|
17533
17540
|
/** Raises event with single strongly typed argument. */
|
|
17534
17541
|
emit(args) { this.raiseEvent(args); }
|
|
17535
17542
|
}
|
|
17543
|
+
/**
|
|
17544
|
+
* Manages a set of *listeners* for a particular event and notifies them when the event is raised.
|
|
17545
|
+
* Unlike [[BeEvent]], this class uses a `Set` internally to support safe concurrent modification
|
|
17546
|
+
* during emit. When a listener is removed during emit, it is marked for deferred removal instead
|
|
17547
|
+
* of mutating the set immediately.
|
|
17548
|
+
*
|
|
17549
|
+
* Listeners are managed exclusively through the disposal closure returned by [[addListener]] and
|
|
17550
|
+
* [[addOnce]]. There is no `removeListener` or `has` method — callers must capture the returned
|
|
17551
|
+
* closure to unsubscribe.
|
|
17552
|
+
* @beta
|
|
17553
|
+
*/
|
|
17554
|
+
class BeUnorderedEvent {
|
|
17555
|
+
_listeners = new Set();
|
|
17556
|
+
_emitDepth = 0;
|
|
17557
|
+
_hasTombstones = false;
|
|
17558
|
+
/** The number of listeners currently subscribed to the event.
|
|
17559
|
+
* @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
|
|
17560
|
+
* but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
|
|
17561
|
+
*/
|
|
17562
|
+
get numberOfListeners() { return this._listeners.size; }
|
|
17563
|
+
/**
|
|
17564
|
+
* Registers a Listener to be executed whenever this event is raised.
|
|
17565
|
+
* @param listener The function to be executed when the event is raised.
|
|
17566
|
+
* @param scope An optional object scope to serve as the 'this' pointer when listener is invoked.
|
|
17567
|
+
* @returns A function that will remove this event listener in O(1).
|
|
17568
|
+
*/
|
|
17569
|
+
addListener(listener, scope) {
|
|
17570
|
+
const ctx = { listener, scope, once: false };
|
|
17571
|
+
this._listeners.add(ctx);
|
|
17572
|
+
return () => this._removeCtx(ctx);
|
|
17573
|
+
}
|
|
17574
|
+
/**
|
|
17575
|
+
* Registers a callback function to be executed *only once* when the event is raised.
|
|
17576
|
+
* @param listener The function to be executed once when the event is raised.
|
|
17577
|
+
* @param scope An optional object scope to serve as the `this` pointer in which the listener function will execute.
|
|
17578
|
+
* @returns A function that will remove this event listener in O(1).
|
|
17579
|
+
*/
|
|
17580
|
+
addOnce(listener, scope) {
|
|
17581
|
+
const ctx = { listener, scope, once: true };
|
|
17582
|
+
this._listeners.add(ctx);
|
|
17583
|
+
return () => this._removeCtx(ctx);
|
|
17584
|
+
}
|
|
17585
|
+
/** Remove a specific context entry, deferring during emit. */
|
|
17586
|
+
_removeCtx(ctx) {
|
|
17587
|
+
if (this._emitDepth > 0) {
|
|
17588
|
+
ctx.listener = undefined; // tombstone for deferred cleanup
|
|
17589
|
+
this._hasTombstones = true;
|
|
17590
|
+
}
|
|
17591
|
+
else {
|
|
17592
|
+
this._listeners.delete(ctx);
|
|
17593
|
+
}
|
|
17594
|
+
}
|
|
17595
|
+
/**
|
|
17596
|
+
* Raises the event by calling each registered listener with the supplied arguments.
|
|
17597
|
+
* @param args This method takes any number of parameters and passes them through to the listeners.
|
|
17598
|
+
*/
|
|
17599
|
+
raiseEvent(...args) {
|
|
17600
|
+
this._emitDepth++;
|
|
17601
|
+
for (const ctx of this._listeners) {
|
|
17602
|
+
if (!ctx.listener) {
|
|
17603
|
+
continue;
|
|
17604
|
+
}
|
|
17605
|
+
try {
|
|
17606
|
+
ctx.listener.apply(ctx.scope, args);
|
|
17607
|
+
}
|
|
17608
|
+
catch (e) {
|
|
17609
|
+
_UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
|
|
17610
|
+
}
|
|
17611
|
+
if (ctx.listener && ctx.once) {
|
|
17612
|
+
ctx.listener = undefined;
|
|
17613
|
+
this._hasTombstones = true;
|
|
17614
|
+
}
|
|
17615
|
+
}
|
|
17616
|
+
this._emitDepth--;
|
|
17617
|
+
// Only clean up tombstoned entries when we're back at the outermost emit
|
|
17618
|
+
if (this._hasTombstones && this._emitDepth === 0) {
|
|
17619
|
+
this._hasTombstones = false;
|
|
17620
|
+
for (const ctx of this._listeners) {
|
|
17621
|
+
if (ctx.listener === undefined)
|
|
17622
|
+
this._listeners.delete(ctx);
|
|
17623
|
+
}
|
|
17624
|
+
}
|
|
17625
|
+
}
|
|
17626
|
+
/** Clear all listeners from this BeUnorderedEvent.
|
|
17627
|
+
* @note If called during `raiseEvent`, remaining listeners in the current iteration are skipped
|
|
17628
|
+
* immediately rather than being tombstoned.
|
|
17629
|
+
*/
|
|
17630
|
+
clear() { this._listeners.clear(); }
|
|
17631
|
+
}
|
|
17632
|
+
/** Specialization of BeUnorderedEvent for events that take a single strongly typed argument, primarily used for UI events.
|
|
17633
|
+
* @beta
|
|
17634
|
+
*/
|
|
17635
|
+
class BeUnorderedUiEvent extends BeUnorderedEvent {
|
|
17636
|
+
/** Raises event with single strongly typed argument. */
|
|
17637
|
+
emit(args) { this.raiseEvent(args); }
|
|
17638
|
+
}
|
|
17536
17639
|
/**
|
|
17537
17640
|
* A list of BeEvent objects, accessible by an event name.
|
|
17538
17641
|
* This class may be used instead of explicitly declaring each BeEvent as a member of a containing class.
|
|
@@ -20063,9 +20166,7 @@ var Id64;
|
|
|
20063
20166
|
* ```
|
|
20064
20167
|
*/
|
|
20065
20168
|
function iterable(ids) {
|
|
20066
|
-
return
|
|
20067
|
-
[Symbol.iterator]: () => iterator(ids),
|
|
20068
|
-
};
|
|
20169
|
+
return typeof ids === "string" ? [ids] : ids;
|
|
20069
20170
|
}
|
|
20070
20171
|
Id64.iterable = iterable;
|
|
20071
20172
|
/** Return the first [[Id64String]] of an [[Id64Arg]]. */
|
|
@@ -23821,6 +23922,69 @@ class UnexpectedErrors {
|
|
|
23821
23922
|
}
|
|
23822
23923
|
|
|
23823
23924
|
|
|
23925
|
+
/***/ }),
|
|
23926
|
+
|
|
23927
|
+
/***/ "../bentley/lib/esm/UtilityFunctions.js":
|
|
23928
|
+
/*!**********************************************!*\
|
|
23929
|
+
!*** ../bentley/lib/esm/UtilityFunctions.js ***!
|
|
23930
|
+
\**********************************************/
|
|
23931
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23932
|
+
|
|
23933
|
+
"use strict";
|
|
23934
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23935
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23936
|
+
/* harmony export */ wrapTimerCallback: () => (/* binding */ wrapTimerCallback)
|
|
23937
|
+
/* harmony export */ });
|
|
23938
|
+
/*---------------------------------------------------------------------------------------------
|
|
23939
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
23940
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
23941
|
+
*--------------------------------------------------------------------------------------------*/
|
|
23942
|
+
/** @packageDocumentation
|
|
23943
|
+
* @module Utils
|
|
23944
|
+
*/
|
|
23945
|
+
/**
|
|
23946
|
+
* Wrapper function designed to be used for callbacks called by setInterval or setTimeout in order to propagate any
|
|
23947
|
+
* exceptions thrown in the callback to the main promise chain. It does this by creating a new promise for the callback
|
|
23948
|
+
* invocation and adding it to the timerPromises set. The main promise chain can then await
|
|
23949
|
+
* Promise.all(timerPromises) to catch any exceptions thrown in any of the callbacks. Note that if the callback
|
|
23950
|
+
* completes successfully, the promise is resolved and removed from the set. If it throws an exception, the promise is
|
|
23951
|
+
* rejected but not removed from the set, so that the main promise chain can detect that an error occurred and handle
|
|
23952
|
+
* it appropriately.
|
|
23953
|
+
* @param timerPromises A set of promises representing the currently active timer callbacks.
|
|
23954
|
+
* @param callback The async callback to be executed within the timer.
|
|
23955
|
+
* @beta
|
|
23956
|
+
*/
|
|
23957
|
+
async function wrapTimerCallback(timerPromises, callback) {
|
|
23958
|
+
let resolvePromise;
|
|
23959
|
+
let rejectPromise;
|
|
23960
|
+
// The callback of the Promise constructor does not have access to the promise itself, so all we do there is
|
|
23961
|
+
// capture the resolve and reject functions for use in the async callback that would have otherwise been
|
|
23962
|
+
// placed in the setInterval or setTimeout callback.
|
|
23963
|
+
const timerPromise = new Promise((resolve, reject) => {
|
|
23964
|
+
resolvePromise = resolve;
|
|
23965
|
+
rejectPromise = reject;
|
|
23966
|
+
});
|
|
23967
|
+
// Note: when we get here, resolvePromise and rejectPromise will always be defined, but there is no way to
|
|
23968
|
+
// convince TS of that fact without extra unnecessary checks, so we use ?. when accessing them.
|
|
23969
|
+
// Prevent unhandled rejection warnings. The rejection is still observable
|
|
23970
|
+
// when the consumer awaits Promise.all(promises).
|
|
23971
|
+
timerPromise.catch(() => { });
|
|
23972
|
+
timerPromises.add(timerPromise);
|
|
23973
|
+
const cleanupAndResolve = () => {
|
|
23974
|
+
resolvePromise?.();
|
|
23975
|
+
// No need to keep track of this promise anymore since it's resolved.
|
|
23976
|
+
timerPromises.delete(timerPromise);
|
|
23977
|
+
};
|
|
23978
|
+
try {
|
|
23979
|
+
await callback();
|
|
23980
|
+
cleanupAndResolve();
|
|
23981
|
+
}
|
|
23982
|
+
catch (err) {
|
|
23983
|
+
rejectPromise?.(err);
|
|
23984
|
+
}
|
|
23985
|
+
}
|
|
23986
|
+
|
|
23987
|
+
|
|
23824
23988
|
/***/ }),
|
|
23825
23989
|
|
|
23826
23990
|
/***/ "../bentley/lib/esm/UtilityTypes.js":
|
|
@@ -23943,6 +24107,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23943
24107
|
/* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
|
|
23944
24108
|
/* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeTimePoint),
|
|
23945
24109
|
/* harmony export */ BeUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUiEvent),
|
|
24110
|
+
/* harmony export */ BeUnorderedEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedEvent),
|
|
24111
|
+
/* harmony export */ BeUnorderedUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedUiEvent),
|
|
23946
24112
|
/* harmony export */ BentleyError: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.BentleyError),
|
|
23947
24113
|
/* harmony export */ BentleyLoggerCategory: () => (/* reexport safe */ _BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_4__.BentleyLoggerCategory),
|
|
23948
24114
|
/* harmony export */ BentleyStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.BentleyStatus),
|
|
@@ -23950,12 +24116,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23950
24116
|
/* harmony export */ ByteStream: () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
|
|
23951
24117
|
/* harmony export */ ChangeSetStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
|
|
23952
24118
|
/* harmony export */ CompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
|
|
23953
|
-
/* harmony export */ DbChangeStage: () => (/* reexport safe */
|
|
23954
|
-
/* harmony export */ DbConflictCause: () => (/* reexport safe */
|
|
23955
|
-
/* harmony export */ DbConflictResolution: () => (/* reexport safe */
|
|
24119
|
+
/* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbChangeStage),
|
|
24120
|
+
/* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictCause),
|
|
24121
|
+
/* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictResolution),
|
|
23956
24122
|
/* harmony export */ DbOpcode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
|
|
23957
24123
|
/* harmony export */ DbResult: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
|
|
23958
|
-
/* harmony export */ DbValueType: () => (/* reexport safe */
|
|
24124
|
+
/* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbValueType),
|
|
23959
24125
|
/* harmony export */ Dictionary: () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
|
|
23960
24126
|
/* harmony export */ DisposableList: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
|
|
23961
24127
|
/* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.DuplicatePolicy),
|
|
@@ -23989,7 +24155,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23989
24155
|
/* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.ReadonlyOrderedSet),
|
|
23990
24156
|
/* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.ReadonlySortedArray),
|
|
23991
24157
|
/* harmony export */ RealityDataStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
|
|
23992
|
-
/* harmony export */ RepositoryStatus: () => (/* reexport safe */
|
|
24158
|
+
/* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.RepositoryStatus),
|
|
23993
24159
|
/* harmony export */ RpcInterfaceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
|
|
23994
24160
|
/* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.SortedArray),
|
|
23995
24161
|
/* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.SpanKind),
|
|
@@ -24005,9 +24171,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24005
24171
|
/* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint8ArrayBuilder),
|
|
24006
24172
|
/* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.UintArrayBuilder),
|
|
24007
24173
|
/* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__.UnexpectedErrors),
|
|
24008
|
-
/* harmony export */ YieldManager: () => (/* reexport safe */
|
|
24174
|
+
/* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_36__.YieldManager),
|
|
24009
24175
|
/* harmony export */ areEqualPossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.areEqualPossiblyUndefined),
|
|
24010
|
-
/* harmony export */ asInstanceOf: () => (/* reexport safe */
|
|
24176
|
+
/* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.asInstanceOf),
|
|
24011
24177
|
/* harmony export */ assert: () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
|
|
24012
24178
|
/* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.base64StringToUint8Array),
|
|
24013
24179
|
/* harmony export */ compareArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareArrays),
|
|
@@ -24027,15 +24193,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24027
24193
|
/* harmony export */ expectNotNull: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectNotNull),
|
|
24028
24194
|
/* harmony export */ isDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isDisposable),
|
|
24029
24195
|
/* harmony export */ isIDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isIDisposable),
|
|
24030
|
-
/* harmony export */ isInstanceOf: () => (/* reexport safe */
|
|
24196
|
+
/* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.isInstanceOf),
|
|
24031
24197
|
/* harmony export */ isProperSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isProperSubclassOf),
|
|
24032
24198
|
/* harmony export */ isSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isSubclassOf),
|
|
24033
24199
|
/* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.lowerBound),
|
|
24034
|
-
/* harmony export */ omit: () => (/* reexport safe */
|
|
24200
|
+
/* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.omit),
|
|
24035
24201
|
/* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_24__.partitionArray),
|
|
24036
24202
|
/* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.shallowClone),
|
|
24037
24203
|
/* harmony export */ using: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
|
|
24038
|
-
/* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.utf8ToString)
|
|
24204
|
+
/* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.utf8ToString),
|
|
24205
|
+
/* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__.wrapTimerCallback)
|
|
24039
24206
|
/* harmony export */ });
|
|
24040
24207
|
/* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../bentley/lib/esm/AccessToken.js");
|
|
24041
24208
|
/* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../bentley/lib/esm/Assert.js");
|
|
@@ -24071,9 +24238,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24071
24238
|
/* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TupleKeyedMap */ "../bentley/lib/esm/TupleKeyedMap.js");
|
|
24072
24239
|
/* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
|
|
24073
24240
|
/* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
|
|
24074
|
-
/* harmony import */ var
|
|
24075
|
-
/* harmony import */ var
|
|
24076
|
-
/* harmony import */ var
|
|
24241
|
+
/* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UtilityFunctions */ "../bentley/lib/esm/UtilityFunctions.js");
|
|
24242
|
+
/* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
|
|
24243
|
+
/* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
|
|
24244
|
+
/* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/cross-package */ "../bentley/lib/esm/internal/cross-package.js");
|
|
24077
24245
|
/*---------------------------------------------------------------------------------------------
|
|
24078
24246
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
24079
24247
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -24112,6 +24280,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24112
24280
|
|
|
24113
24281
|
|
|
24114
24282
|
|
|
24283
|
+
|
|
24115
24284
|
|
|
24116
24285
|
|
|
24117
24286
|
// Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.
|