@itwin/rpcinterface-full-stack-tests 4.3.0-dev.30 → 4.3.0-dev.33
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/lib/dist/bundled-tests.js +57 -1211
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_4_14_node_modules_loaders_gl_draco_d-aa4ff5.bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -114497,8 +114497,16 @@ class BranchState {
|
|
|
114497
114497
|
return overrides.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);
|
|
114498
114498
|
}
|
|
114499
114499
|
static createForDecorations() {
|
|
114500
|
-
const
|
|
114501
|
-
|
|
114500
|
+
const viewFlags = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ViewFlags({ renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SmoothShade, lighting: false, whiteOnWhiteReversal: false });
|
|
114501
|
+
const symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_2__.FeatureSymbology.Overrides();
|
|
114502
|
+
symbologyOverrides.ignoreSubCategory = true;
|
|
114503
|
+
return new BranchState({
|
|
114504
|
+
viewFlags,
|
|
114505
|
+
transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity(),
|
|
114506
|
+
symbologyOverrides,
|
|
114507
|
+
edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_3__.EdgeSettings.create(undefined),
|
|
114508
|
+
is3d: true,
|
|
114509
|
+
});
|
|
114502
114510
|
}
|
|
114503
114511
|
withViewCoords() {
|
|
114504
114512
|
return new BranchState({ ...this._opts, forceViewCoords: true });
|
|
@@ -118950,6 +118958,8 @@ class WorldDecorations extends Branch {
|
|
|
118950
118958
|
super(new _GraphicBranch__WEBPACK_IMPORTED_MODULE_4__.GraphicBranch(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.identity, viewFlags);
|
|
118951
118959
|
// World decorations ignore all the symbology overrides for the "scene" geometry...
|
|
118952
118960
|
this.branch.symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.FeatureSymbology.Overrides();
|
|
118961
|
+
// Make all subcategories visible.
|
|
118962
|
+
this.branch.symbologyOverrides.ignoreSubCategory = true;
|
|
118953
118963
|
}
|
|
118954
118964
|
init(decs) {
|
|
118955
118965
|
this.branch.clear();
|
|
@@ -140489,7 +140499,7 @@ const computeBaseColor = `
|
|
|
140489
140499
|
// set to black if almost white and reverse white-on-white is on
|
|
140490
140500
|
bvec3 isAlmostWhite = greaterThan(surfaceColor.rgb, almostWhite);
|
|
140491
140501
|
surfaceColor.rgb = (u_reverseWhiteOnWhite && isAlmostWhite.r && isAlmostWhite.g && isAlmostWhite.b ? vec3(0.0, 0.0, 0.0) : surfaceColor.rgb);
|
|
140492
|
-
return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a);
|
|
140502
|
+
return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a * surfaceColor.a);
|
|
140493
140503
|
`;
|
|
140494
140504
|
const surfaceFlagArray = new Int32Array(12 /* SurfaceBitIndex.Count */);
|
|
140495
140505
|
/** @internal */
|
|
@@ -284659,7 +284669,7 @@ class TestContext {
|
|
|
284659
284669
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
284660
284670
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
284661
284671
|
await core_frontend_1.NoRenderApp.startup({
|
|
284662
|
-
applicationVersion: "4.3.0-dev.
|
|
284672
|
+
applicationVersion: "4.3.0-dev.33",
|
|
284663
284673
|
applicationId: this.settings.gprid,
|
|
284664
284674
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
284665
284675
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -293890,7 +293900,7 @@ exports.executeBackendCallback = executeBackendCallback;
|
|
|
293890
293900
|
__webpack_require__.r(__webpack_exports__);
|
|
293891
293901
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
293892
293902
|
/* harmony export */ AbstractStatusBarItemUtilities: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.AbstractStatusBarItemUtilities),
|
|
293893
|
-
/* harmony export */ AbstractZoneLocation: () => (/* reexport safe */
|
|
293903
|
+
/* harmony export */ AbstractZoneLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.AbstractZoneLocation),
|
|
293894
293904
|
/* harmony export */ AlternateDateFormats: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.AlternateDateFormats),
|
|
293895
293905
|
/* harmony export */ BackstageItemType: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemType),
|
|
293896
293906
|
/* harmony export */ BackstageItemUtilities: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemUtilities),
|
|
@@ -293906,7 +293916,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293906
293916
|
/* harmony export */ DialogProperty: () => (/* reexport safe */ _appui_abstract_dialogs_DialogItem__WEBPACK_IMPORTED_MODULE_9__.DialogProperty),
|
|
293907
293917
|
/* harmony export */ DisplayMessageType: () => (/* reexport safe */ _appui_abstract_notification_MessagePresenter__WEBPACK_IMPORTED_MODULE_21__.DisplayMessageType),
|
|
293908
293918
|
/* harmony export */ FunctionKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.FunctionKey),
|
|
293909
|
-
/* harmony export */ FuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.FuzzyScore),
|
|
293910
293919
|
/* harmony export */ GenericUiEvent: () => (/* reexport safe */ _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__.GenericUiEvent),
|
|
293911
293920
|
/* harmony export */ IconSpecUtilities: () => (/* reexport safe */ _appui_abstract_utils_IconSpecUtilities__WEBPACK_IMPORTED_MODULE_37__.IconSpecUtilities),
|
|
293912
293921
|
/* harmony export */ MessageSeverity: () => (/* reexport safe */ _appui_abstract_notification_MessageSeverity__WEBPACK_IMPORTED_MODULE_22__.MessageSeverity),
|
|
@@ -293917,8 +293926,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293917
293926
|
/* harmony export */ PropertyValueFormat: () => (/* reexport safe */ _appui_abstract_properties_Value__WEBPACK_IMPORTED_MODULE_29__.PropertyValueFormat),
|
|
293918
293927
|
/* harmony export */ RelativePosition: () => (/* reexport safe */ _appui_abstract_items_RelativePosition__WEBPACK_IMPORTED_MODULE_19__.RelativePosition),
|
|
293919
293928
|
/* harmony export */ SpecialKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.SpecialKey),
|
|
293920
|
-
/* harmony export */ StagePanelLocation: () => (/* reexport safe */
|
|
293921
|
-
/* harmony export */ StagePanelSection: () => (/* reexport safe */
|
|
293929
|
+
/* harmony export */ StagePanelLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelLocation),
|
|
293930
|
+
/* harmony export */ StagePanelSection: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelSection),
|
|
293922
293931
|
/* harmony export */ StageUsage: () => (/* reexport safe */ _appui_abstract_items_StageUsage__WEBPACK_IMPORTED_MODULE_20__.StageUsage),
|
|
293923
293932
|
/* harmony export */ StandardContentLayouts: () => (/* reexport safe */ _appui_abstract_content_StandardContentLayouts__WEBPACK_IMPORTED_MODULE_8__.StandardContentLayouts),
|
|
293924
293933
|
/* harmony export */ StandardEditorNames: () => (/* reexport safe */ _appui_abstract_properties_StandardEditorNames__WEBPACK_IMPORTED_MODULE_27__.StandardEditorNames),
|
|
@@ -293941,13 +293950,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293941
293950
|
/* harmony export */ UiItemsManager: () => (/* reexport safe */ _appui_abstract_UiItemsManager__WEBPACK_IMPORTED_MODULE_2__.UiItemsManager),
|
|
293942
293951
|
/* harmony export */ UiLayoutDataProvider: () => (/* reexport safe */ _appui_abstract_dialogs_UiLayoutDataProvider__WEBPACK_IMPORTED_MODULE_10__.UiLayoutDataProvider),
|
|
293943
293952
|
/* harmony export */ UiSyncEvent: () => (/* reexport safe */ _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_40__.UiSyncEvent),
|
|
293944
|
-
/* harmony export */ WidgetState: () => (/* reexport safe */
|
|
293945
|
-
/* harmony export */ convertSimple2RegExpPattern: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.convertSimple2RegExpPattern),
|
|
293946
|
-
/* harmony export */ createMatches: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.createMatches),
|
|
293947
|
-
/* harmony export */ equalsIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.equalsIgnoreCase),
|
|
293948
|
-
/* harmony export */ fuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScore),
|
|
293949
|
-
/* harmony export */ fuzzyScoreGraceful: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGraceful),
|
|
293950
|
-
/* harmony export */ fuzzyScoreGracefulAggressive: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGracefulAggressive),
|
|
293953
|
+
/* harmony export */ WidgetState: () => (/* reexport safe */ _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_45__.WidgetState),
|
|
293951
293954
|
/* harmony export */ getClassName: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.getClassName),
|
|
293952
293955
|
/* harmony export */ isAbstractStatusBarActionItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarActionItem),
|
|
293953
293956
|
/* harmony export */ isAbstractStatusBarCustomItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarCustomItem),
|
|
@@ -293959,22 +293962,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293959
293962
|
/* harmony export */ isCustomFormattedNumberParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isCustomFormattedNumberParams),
|
|
293960
293963
|
/* harmony export */ isIconListEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isIconListEditorParams),
|
|
293961
293964
|
/* harmony export */ isInputEditorSizeParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isInputEditorSizeParams),
|
|
293962
|
-
/* harmony export */ isLowerAsciiLetter: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.isLowerAsciiLetter),
|
|
293963
|
-
/* harmony export */ isPatternInWord: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.isPatternInWord),
|
|
293964
293965
|
/* harmony export */ isStageLauncher: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.isStageLauncher),
|
|
293965
293966
|
/* harmony export */ isSuppressLabelEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isSuppressLabelEditorParams),
|
|
293966
|
-
/* harmony export */
|
|
293967
|
-
/* harmony export */ loggerCategory: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.loggerCategory),
|
|
293968
|
-
/* harmony export */ matchesCamelCase: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesCamelCase),
|
|
293969
|
-
/* harmony export */ matchesContiguousSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesContiguousSubString),
|
|
293970
|
-
/* harmony export */ matchesFuzzy: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy),
|
|
293971
|
-
/* harmony export */ matchesFuzzy2: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy2),
|
|
293972
|
-
/* harmony export */ matchesPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesPrefix),
|
|
293973
|
-
/* harmony export */ matchesStrictPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesStrictPrefix),
|
|
293974
|
-
/* harmony export */ matchesSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesSubString),
|
|
293975
|
-
/* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesWords),
|
|
293976
|
-
/* harmony export */ or: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.or),
|
|
293977
|
-
/* harmony export */ startsWithIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.startsWithIgnoreCase)
|
|
293967
|
+
/* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_42__.matchesWords)
|
|
293978
293968
|
/* harmony export */ });
|
|
293979
293969
|
/* harmony import */ var _appui_abstract_BaseUiItemsProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appui-abstract/BaseUiItemsProvider */ "../../ui/appui-abstract/lib/esm/appui-abstract/BaseUiItemsProvider.js");
|
|
293980
293970
|
/* harmony import */ var _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appui-abstract/UiAdmin */ "../../ui/appui-abstract/lib/esm/appui-abstract/UiAdmin.js");
|
|
@@ -294018,12 +294008,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294018
294008
|
/* harmony import */ var _appui_abstract_utils_UiError__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./appui-abstract/utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
|
|
294019
294009
|
/* harmony import */ var _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./appui-abstract/utils/UiEventDispatcher */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiEventDispatcher.js");
|
|
294020
294010
|
/* harmony import */ var _appui_abstract_utils_UiEvent__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./appui-abstract/utils/UiEvent */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiEvent.js");
|
|
294021
|
-
/* harmony import */ var
|
|
294022
|
-
/* harmony import */ var
|
|
294023
|
-
/* harmony import */ var
|
|
294024
|
-
/* harmony import */ var
|
|
294025
|
-
/* harmony import */ var _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./appui-abstract/widget/StagePanel */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/StagePanel.js");
|
|
294026
|
-
/* harmony import */ var _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./appui-abstract/widget/WidgetState */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/WidgetState.js");
|
|
294011
|
+
/* harmony import */ var _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./appui-abstract/utils/filter/filters */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js");
|
|
294012
|
+
/* harmony import */ var _appui_abstract_widget_AbstractWidgetProps__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./appui-abstract/widget/AbstractWidgetProps */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/AbstractWidgetProps.js");
|
|
294013
|
+
/* harmony import */ var _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./appui-abstract/widget/StagePanel */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/StagePanel.js");
|
|
294014
|
+
/* harmony import */ var _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./appui-abstract/widget/WidgetState */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/WidgetState.js");
|
|
294027
294015
|
/*---------------------------------------------------------------------------------------------
|
|
294028
294016
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
294029
294017
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -294073,8 +294061,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294073
294061
|
|
|
294074
294062
|
|
|
294075
294063
|
|
|
294076
|
-
|
|
294077
|
-
|
|
294078
294064
|
|
|
294079
294065
|
|
|
294080
294066
|
|
|
@@ -294239,8 +294225,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294239
294225
|
/* harmony export */ UiAdmin: () => (/* binding */ UiAdmin)
|
|
294240
294226
|
/* harmony export */ });
|
|
294241
294227
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
294242
|
-
/* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
|
|
294243
|
-
/* harmony import */ var _utils_UiError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
|
|
294244
294228
|
/*---------------------------------------------------------------------------------------------
|
|
294245
294229
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
294246
294230
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -294249,8 +294233,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294249
294233
|
* @module UiAdmin
|
|
294250
294234
|
*/
|
|
294251
294235
|
|
|
294252
|
-
|
|
294253
|
-
|
|
294254
294236
|
/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.
|
|
294255
294237
|
* @public
|
|
294256
294238
|
*/
|
|
@@ -294265,8 +294247,11 @@ class UiAdmin {
|
|
|
294265
294247
|
}
|
|
294266
294248
|
/** The MessagePresenter used to display messages. */
|
|
294267
294249
|
static get messagePresenter() {
|
|
294268
|
-
if (!UiAdmin._messagePresenter)
|
|
294269
|
-
|
|
294250
|
+
if (!UiAdmin._messagePresenter) {
|
|
294251
|
+
const error = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, "UiAdmin.messagePresenter not set");
|
|
294252
|
+
error.category = "messagePresenter";
|
|
294253
|
+
throw error;
|
|
294254
|
+
}
|
|
294270
294255
|
return UiAdmin._messagePresenter;
|
|
294271
294256
|
}
|
|
294272
294257
|
static set messagePresenter(mp) {
|
|
@@ -294480,7 +294465,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294480
294465
|
/* harmony export */ UiItemsManager: () => (/* binding */ UiItemsManager)
|
|
294481
294466
|
/* harmony export */ });
|
|
294482
294467
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
294483
|
-
/* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
|
|
294484
294468
|
/*---------------------------------------------------------------------------------------------
|
|
294485
294469
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
294486
294470
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -294490,7 +294474,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294490
294474
|
* @module UiItemsProvider
|
|
294491
294475
|
*/
|
|
294492
294476
|
|
|
294493
|
-
|
|
294477
|
+
const loggerCategory = "appui-abstract.UiItemsManager";
|
|
294494
294478
|
/** Action taken by the application on item provided by a UiItemsProvider
|
|
294495
294479
|
* @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.
|
|
294496
294480
|
*/
|
|
@@ -294539,11 +294523,11 @@ class UiItemsManager {
|
|
|
294539
294523
|
static register(uiProvider, overrides) {
|
|
294540
294524
|
const providerId = overrides?.providerId ?? uiProvider.id;
|
|
294541
294525
|
if (UiItemsManager.getUiItemsProvider(providerId)) {
|
|
294542
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(
|
|
294526
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${providerId}) is already loaded`);
|
|
294543
294527
|
}
|
|
294544
294528
|
else {
|
|
294545
294529
|
UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });
|
|
294546
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(
|
|
294530
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);
|
|
294547
294531
|
UiItemsManager.sendRegisteredEvent({ providerId });
|
|
294548
294532
|
}
|
|
294549
294533
|
}
|
|
@@ -294554,7 +294538,7 @@ class UiItemsManager {
|
|
|
294554
294538
|
return;
|
|
294555
294539
|
provider.onUnregister && provider.onUnregister();
|
|
294556
294540
|
UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);
|
|
294557
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(
|
|
294541
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${uiProviderId}) unloaded`);
|
|
294558
294542
|
// trigger a refresh of the ui
|
|
294559
294543
|
UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId });
|
|
294560
294544
|
}
|
|
@@ -294944,7 +294928,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294944
294928
|
* @module Utilities
|
|
294945
294929
|
*/
|
|
294946
294930
|
/** Enumeration for Function Keys
|
|
294947
|
-
* @public
|
|
294931
|
+
* @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
|
|
294948
294932
|
*/
|
|
294949
294933
|
var FunctionKey;
|
|
294950
294934
|
(function (FunctionKey) {
|
|
@@ -294962,7 +294946,7 @@ var FunctionKey;
|
|
|
294962
294946
|
FunctionKey["F12"] = "F12";
|
|
294963
294947
|
})(FunctionKey || (FunctionKey = {}));
|
|
294964
294948
|
/** Enumeration for Special Keys
|
|
294965
|
-
* @public
|
|
294949
|
+
* @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
|
|
294966
294950
|
*/
|
|
294967
294951
|
var SpecialKey;
|
|
294968
294952
|
(function (SpecialKey) {
|
|
@@ -294990,9 +294974,10 @@ var SpecialKey;
|
|
|
294990
294974
|
SpecialKey["Decimal"] = "Decimal";
|
|
294991
294975
|
})(SpecialKey || (SpecialKey = {}));
|
|
294992
294976
|
/** Determines if a KeyboardEvent.key is an Arrow key
|
|
294993
|
-
* @public
|
|
294977
|
+
* @public @deprecated in 4.3. Please use a custom implementation moving forward.
|
|
294994
294978
|
*/
|
|
294995
294979
|
function isArrowKey(key) {
|
|
294980
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
294996
294981
|
return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);
|
|
294997
294982
|
}
|
|
294998
294983
|
|
|
@@ -297117,8 +297102,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
297117
297102
|
/** @packageDocumentation
|
|
297118
297103
|
* @module Utilities
|
|
297119
297104
|
*/
|
|
297105
|
+
/* eslint-disable deprecation/deprecation */
|
|
297120
297106
|
/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.
|
|
297121
|
-
* @public
|
|
297107
|
+
* @public @deprecated in 4.3. AppUI libraries >= 4.7.x support loading SVGs sources without prefixes, eliminating the need for these utilities.
|
|
297122
297108
|
*/
|
|
297123
297109
|
class IconSpecUtilities {
|
|
297124
297110
|
/** Create an IconSpec for an SVG loaded into web component with sprite loader
|
|
@@ -297129,7 +297115,7 @@ class IconSpecUtilities {
|
|
|
297129
297115
|
return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;
|
|
297130
297116
|
}
|
|
297131
297117
|
/** Create an IconSpec for an SVG loaded into web component with svg-loader
|
|
297132
|
-
* @public
|
|
297118
|
+
* @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
|
|
297133
297119
|
*/
|
|
297134
297120
|
static createWebComponentIconSpec(srcString) {
|
|
297135
297121
|
return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;
|
|
@@ -297145,7 +297131,7 @@ class IconSpecUtilities {
|
|
|
297145
297131
|
return undefined;
|
|
297146
297132
|
}
|
|
297147
297133
|
/** Get the SVG Source from an svg-loader IconSpec
|
|
297148
|
-
* @public
|
|
297134
|
+
* @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
|
|
297149
297135
|
*/
|
|
297150
297136
|
static getWebComponentSource(iconSpec) {
|
|
297151
297137
|
if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {
|
|
@@ -297203,7 +297189,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
297203
297189
|
*/
|
|
297204
297190
|
|
|
297205
297191
|
/** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.
|
|
297206
|
-
* @public
|
|
297192
|
+
* @public @deprecated in 4.3. Use [[Bentley.BentleyError]] instead.
|
|
297207
297193
|
*/
|
|
297208
297194
|
class UiError extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError {
|
|
297209
297195
|
/** Constructs UiError using BentleyError. */
|
|
@@ -297411,23 +297397,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
297411
297397
|
|
|
297412
297398
|
|
|
297413
297399
|
|
|
297414
|
-
/***/ }),
|
|
297415
|
-
|
|
297416
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js":
|
|
297417
|
-
/*!*******************************************************************************!*\
|
|
297418
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js ***!
|
|
297419
|
-
\*******************************************************************************/
|
|
297420
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
297421
|
-
|
|
297422
|
-
"use strict";
|
|
297423
|
-
__webpack_require__.r(__webpack_exports__);
|
|
297424
|
-
/*---------------------------------------------------------------------------------------------
|
|
297425
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
297426
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
297427
|
-
*--------------------------------------------------------------------------------------------*/
|
|
297428
|
-
|
|
297429
|
-
|
|
297430
|
-
|
|
297431
297400
|
/***/ }),
|
|
297432
297401
|
|
|
297433
297402
|
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js":
|
|
@@ -297439,24 +297408,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
297439
297408
|
"use strict";
|
|
297440
297409
|
__webpack_require__.r(__webpack_exports__);
|
|
297441
297410
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
297442
|
-
/* harmony export */
|
|
297443
|
-
/* harmony export */ createMatches: () => (/* binding */ createMatches),
|
|
297444
|
-
/* harmony export */ fuzzyScore: () => (/* binding */ fuzzyScore),
|
|
297445
|
-
/* harmony export */ fuzzyScoreGraceful: () => (/* binding */ fuzzyScoreGraceful),
|
|
297446
|
-
/* harmony export */ fuzzyScoreGracefulAggressive: () => (/* binding */ fuzzyScoreGracefulAggressive),
|
|
297447
|
-
/* harmony export */ isPatternInWord: () => (/* binding */ isPatternInWord),
|
|
297448
|
-
/* harmony export */ matchesCamelCase: () => (/* binding */ matchesCamelCase),
|
|
297449
|
-
/* harmony export */ matchesContiguousSubString: () => (/* binding */ matchesContiguousSubString),
|
|
297450
|
-
/* harmony export */ matchesFuzzy: () => (/* binding */ matchesFuzzy),
|
|
297451
|
-
/* harmony export */ matchesFuzzy2: () => (/* binding */ matchesFuzzy2),
|
|
297452
|
-
/* harmony export */ matchesPrefix: () => (/* binding */ matchesPrefix),
|
|
297453
|
-
/* harmony export */ matchesStrictPrefix: () => (/* binding */ matchesStrictPrefix),
|
|
297454
|
-
/* harmony export */ matchesSubString: () => (/* binding */ matchesSubString),
|
|
297455
|
-
/* harmony export */ matchesWords: () => (/* binding */ matchesWords),
|
|
297456
|
-
/* harmony export */ or: () => (/* binding */ or)
|
|
297411
|
+
/* harmony export */ matchesWords: () => (/* binding */ matchesWords)
|
|
297457
297412
|
/* harmony export */ });
|
|
297458
|
-
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js");
|
|
297459
|
-
/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
|
|
297460
297413
|
/*---------------------------------------------------------------------------------------------
|
|
297461
297414
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
297462
297415
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -297464,100 +297417,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
297464
297417
|
/** @packageDocumentation
|
|
297465
297418
|
* @module Utilities
|
|
297466
297419
|
*/
|
|
297467
|
-
|
|
297468
|
-
|
|
297469
|
-
|
|
297470
|
-
|
|
297471
|
-
|
|
297472
|
-
|
|
297473
|
-
|
|
297474
|
-
* filter.
|
|
297475
|
-
* @internal
|
|
297476
|
-
*/
|
|
297477
|
-
function or(...filter) {
|
|
297478
|
-
return function (word, wordToMatchAgainst) {
|
|
297479
|
-
for (let i = 0, len = filter.length; i < len; i++) {
|
|
297480
|
-
const match = filter[i](word, wordToMatchAgainst);
|
|
297481
|
-
if (match) {
|
|
297482
|
-
return match;
|
|
297483
|
-
}
|
|
297484
|
-
}
|
|
297485
|
-
return null;
|
|
297486
|
-
};
|
|
297487
|
-
}
|
|
297488
|
-
// Prefix
|
|
297489
|
-
/** @internal */
|
|
297490
|
-
const matchesStrictPrefix = _matchesPrefix.bind(undefined, false);
|
|
297491
|
-
/** @internal */
|
|
297492
|
-
const matchesPrefix = _matchesPrefix.bind(undefined, true);
|
|
297493
|
-
function _matchesPrefix(ignoreCase, word, wordToMatchAgainst) {
|
|
297494
|
-
if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {
|
|
297495
|
-
return null;
|
|
297496
|
-
}
|
|
297497
|
-
let matches;
|
|
297498
|
-
if (ignoreCase) {
|
|
297499
|
-
matches = _strings__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase(wordToMatchAgainst, word);
|
|
297500
|
-
}
|
|
297501
|
-
else {
|
|
297502
|
-
matches = wordToMatchAgainst.indexOf(word) === 0;
|
|
297503
|
-
}
|
|
297504
|
-
if (!matches) {
|
|
297505
|
-
return null;
|
|
297506
|
-
}
|
|
297507
|
-
return word.length > 0 ? [{ start: 0, end: word.length }] : [];
|
|
297508
|
-
}
|
|
297509
|
-
// Contiguous Substring
|
|
297510
|
-
/** @internal */
|
|
297511
|
-
function matchesContiguousSubString(word, wordToMatchAgainst) {
|
|
297512
|
-
const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());
|
|
297513
|
-
if (index === -1) {
|
|
297514
|
-
return null;
|
|
297515
|
-
}
|
|
297516
|
-
return [{ start: index, end: index + word.length }];
|
|
297517
|
-
}
|
|
297518
|
-
// Substring
|
|
297519
|
-
/**
|
|
297520
|
-
* Return case insensitive substring matches
|
|
297521
|
-
* @param word filter string
|
|
297522
|
-
* @param wordToMatchAgainst string to test
|
|
297523
|
-
* @internal
|
|
297524
|
-
*/
|
|
297525
|
-
function matchesSubString(word, wordToMatchAgainst) {
|
|
297526
|
-
return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);
|
|
297527
|
-
}
|
|
297528
|
-
function _matchesSubString(word, wordToMatchAgainst, i, j) {
|
|
297529
|
-
if (i === word.length) {
|
|
297530
|
-
return [];
|
|
297531
|
-
}
|
|
297532
|
-
else if (j === wordToMatchAgainst.length) {
|
|
297533
|
-
return null;
|
|
297534
|
-
}
|
|
297535
|
-
else {
|
|
297536
|
-
if (word[i] === wordToMatchAgainst[j]) {
|
|
297537
|
-
let result = null;
|
|
297538
|
-
if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {
|
|
297539
|
-
return join({ start: j, end: j + 1 }, result);
|
|
297540
|
-
}
|
|
297541
|
-
return null;
|
|
297542
|
-
}
|
|
297543
|
-
return _matchesSubString(word, wordToMatchAgainst, i, j + 1);
|
|
297544
|
-
}
|
|
297545
|
-
}
|
|
297546
|
-
// CamelCase
|
|
297547
|
-
function isLower(code) {
|
|
297548
|
-
return 97 /* CharCode.a */ <= code && code <= 122 /* CharCode.z */;
|
|
297549
|
-
}
|
|
297550
|
-
function isUpper(code) {
|
|
297551
|
-
return 65 /* CharCode.A */ <= code && code <= 90 /* CharCode.Z */;
|
|
297552
|
-
}
|
|
297553
|
-
function isNumber(code) {
|
|
297554
|
-
return 48 /* CharCode.Digit0 */ <= code && code <= 57 /* CharCode.Digit9 */;
|
|
297555
|
-
}
|
|
297420
|
+
var CharCode;
|
|
297421
|
+
(function (CharCode) {
|
|
297422
|
+
CharCode[CharCode["Space"] = 32] = "Space";
|
|
297423
|
+
CharCode[CharCode["Tab"] = 9] = "Tab";
|
|
297424
|
+
CharCode[CharCode["LineFeed"] = 10] = "LineFeed";
|
|
297425
|
+
CharCode[CharCode["CarriageReturn"] = 13] = "CarriageReturn";
|
|
297426
|
+
})(CharCode || (CharCode = {}));
|
|
297556
297427
|
function isWhitespace(code) {
|
|
297557
|
-
return (code ===
|
|
297558
|
-
|| code ===
|
|
297559
|
-
|| code ===
|
|
297560
|
-
|| code ===
|
|
297428
|
+
return (code === CharCode.Space
|
|
297429
|
+
|| code === CharCode.Tab
|
|
297430
|
+
|| code === CharCode.LineFeed
|
|
297431
|
+
|| code === CharCode.CarriageReturn);
|
|
297561
297432
|
}
|
|
297562
297433
|
const wordSeparators = new Set();
|
|
297563
297434
|
'`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'
|
|
@@ -297569,9 +297440,6 @@ function isWordSeparator(code) {
|
|
|
297569
297440
|
function charactersMatch(codeA, codeB) {
|
|
297570
297441
|
return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));
|
|
297571
297442
|
}
|
|
297572
|
-
function isAlphanumeric(code) {
|
|
297573
|
-
return isLower(code) || isUpper(code) || isNumber(code);
|
|
297574
|
-
}
|
|
297575
297443
|
function join(head, tail) {
|
|
297576
297444
|
if (tail.length === 0) {
|
|
297577
297445
|
tail = [head];
|
|
@@ -297584,128 +297452,6 @@ function join(head, tail) {
|
|
|
297584
297452
|
}
|
|
297585
297453
|
return tail;
|
|
297586
297454
|
}
|
|
297587
|
-
function nextAnchor(camelCaseWord, start) {
|
|
297588
|
-
for (let i = start; i < camelCaseWord.length; i++) {
|
|
297589
|
-
const c = camelCaseWord.charCodeAt(i);
|
|
297590
|
-
if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {
|
|
297591
|
-
return i;
|
|
297592
|
-
}
|
|
297593
|
-
}
|
|
297594
|
-
return camelCaseWord.length;
|
|
297595
|
-
}
|
|
297596
|
-
function _matchesCamelCase(word, camelCaseWord, i, j) {
|
|
297597
|
-
if (i === word.length) {
|
|
297598
|
-
return [];
|
|
297599
|
-
}
|
|
297600
|
-
else if (j === camelCaseWord.length) {
|
|
297601
|
-
return null;
|
|
297602
|
-
}
|
|
297603
|
-
else if (word[i] !== camelCaseWord[j].toLowerCase()) {
|
|
297604
|
-
return null;
|
|
297605
|
-
}
|
|
297606
|
-
else {
|
|
297607
|
-
let result = null;
|
|
297608
|
-
let nextUpperIndex = j + 1;
|
|
297609
|
-
result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);
|
|
297610
|
-
while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {
|
|
297611
|
-
result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);
|
|
297612
|
-
nextUpperIndex++;
|
|
297613
|
-
}
|
|
297614
|
-
return result === null ? null : join({ start: j, end: j + 1 }, result);
|
|
297615
|
-
}
|
|
297616
|
-
}
|
|
297617
|
-
// Heuristic to avoid computing camel case matcher for words that don't
|
|
297618
|
-
// look like camelCaseWords.
|
|
297619
|
-
function analyzeCamelCaseWord(word) {
|
|
297620
|
-
let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;
|
|
297621
|
-
for (let i = 0; i < word.length; i++) {
|
|
297622
|
-
code = word.charCodeAt(i);
|
|
297623
|
-
if (isUpper(code)) {
|
|
297624
|
-
upper++;
|
|
297625
|
-
}
|
|
297626
|
-
if (isLower(code)) {
|
|
297627
|
-
lower++;
|
|
297628
|
-
}
|
|
297629
|
-
if (isAlphanumeric(code)) {
|
|
297630
|
-
alpha++;
|
|
297631
|
-
}
|
|
297632
|
-
if (isNumber(code)) {
|
|
297633
|
-
numeric++;
|
|
297634
|
-
}
|
|
297635
|
-
}
|
|
297636
|
-
const upperPercent = upper / word.length;
|
|
297637
|
-
const lowerPercent = lower / word.length;
|
|
297638
|
-
const alphaPercent = alpha / word.length;
|
|
297639
|
-
const numericPercent = numeric / word.length;
|
|
297640
|
-
return { upperPercent, lowerPercent, alphaPercent, numericPercent };
|
|
297641
|
-
}
|
|
297642
|
-
function isUpperCaseWord(analysis) {
|
|
297643
|
-
const { upperPercent, lowerPercent } = analysis;
|
|
297644
|
-
return lowerPercent === 0 && upperPercent > 0.6;
|
|
297645
|
-
}
|
|
297646
|
-
function isCamelCaseWord(analysis) {
|
|
297647
|
-
const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;
|
|
297648
|
-
return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;
|
|
297649
|
-
}
|
|
297650
|
-
// Heuristic to avoid computing camel case matcher for words that don't
|
|
297651
|
-
// look like camel case patterns.
|
|
297652
|
-
function isCamelCasePattern(word) {
|
|
297653
|
-
let upper = 0, lower = 0, code = 0, whitespace = 0;
|
|
297654
|
-
for (let i = 0; i < word.length; i++) {
|
|
297655
|
-
code = word.charCodeAt(i);
|
|
297656
|
-
if (isUpper(code)) {
|
|
297657
|
-
upper++;
|
|
297658
|
-
}
|
|
297659
|
-
if (isLower(code)) {
|
|
297660
|
-
lower++;
|
|
297661
|
-
}
|
|
297662
|
-
if (isWhitespace(code)) {
|
|
297663
|
-
whitespace++;
|
|
297664
|
-
}
|
|
297665
|
-
}
|
|
297666
|
-
if ((upper === 0 || lower === 0) && whitespace === 0) {
|
|
297667
|
-
return word.length <= 30;
|
|
297668
|
-
}
|
|
297669
|
-
else {
|
|
297670
|
-
return upper <= 5;
|
|
297671
|
-
}
|
|
297672
|
-
}
|
|
297673
|
-
/**
|
|
297674
|
-
* Return matches treating "camelCase" words separately. For example the filter string "gp" would return two matches in string "Git Pull".
|
|
297675
|
-
* @param word filter string
|
|
297676
|
-
* @param wordToMatchAgainst string to test
|
|
297677
|
-
* @internal
|
|
297678
|
-
*/
|
|
297679
|
-
function matchesCamelCase(word, camelCaseWord) {
|
|
297680
|
-
if (!camelCaseWord) {
|
|
297681
|
-
return null;
|
|
297682
|
-
}
|
|
297683
|
-
camelCaseWord = camelCaseWord.trim();
|
|
297684
|
-
if (camelCaseWord.length === 0) {
|
|
297685
|
-
return null;
|
|
297686
|
-
}
|
|
297687
|
-
if (!isCamelCasePattern(camelCaseWord)) {
|
|
297688
|
-
return null;
|
|
297689
|
-
}
|
|
297690
|
-
if (camelCaseWord.length > 60) {
|
|
297691
|
-
return null;
|
|
297692
|
-
}
|
|
297693
|
-
const analysis = analyzeCamelCaseWord(camelCaseWord);
|
|
297694
|
-
if (!isCamelCaseWord(analysis)) {
|
|
297695
|
-
// istanbul ignore next
|
|
297696
|
-
if (!isUpperCaseWord(analysis)) {
|
|
297697
|
-
return null;
|
|
297698
|
-
}
|
|
297699
|
-
camelCaseWord = camelCaseWord.toLowerCase();
|
|
297700
|
-
}
|
|
297701
|
-
let result = null;
|
|
297702
|
-
let i = 0;
|
|
297703
|
-
word = word.toLowerCase();
|
|
297704
|
-
while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {
|
|
297705
|
-
i = nextAnchor(camelCaseWord, i + 1);
|
|
297706
|
-
}
|
|
297707
|
-
return result;
|
|
297708
|
-
}
|
|
297709
297455
|
/**
|
|
297710
297456
|
* Matches beginning of words supporting non-ASCII languages.
|
|
297711
297457
|
* @param word Filter string
|
|
@@ -297713,7 +297459,7 @@ function matchesCamelCase(word, camelCaseWord) {
|
|
|
297713
297459
|
* @param contiguous - If true the filter string must be found "contiguous" in the searched string (E.g. "pul" will match "Git: Pull").
|
|
297714
297460
|
* Otherwise also matches sub string of the word with beginnings of the words in the target (e.g. "gp" or "g p" will match "Git: Pull").
|
|
297715
297461
|
* Useful in cases where the target is words (e.g. command labels)
|
|
297716
|
-
* @internal
|
|
297462
|
+
* @internal @deprecated in 4.3. Use `matchesWords` from @itwin/core-react instead. Though internal, this requires deprecation due to known public usage in @itwin/core-react.
|
|
297717
297463
|
*/
|
|
297718
297464
|
function matchesWords(word, target, contiguous = false) {
|
|
297719
297465
|
if (!target || target.length === 0) {
|
|
@@ -297761,898 +297507,6 @@ function nextWord(word, start) {
|
|
|
297761
297507
|
}
|
|
297762
297508
|
return word.length;
|
|
297763
297509
|
}
|
|
297764
|
-
// Fuzzy
|
|
297765
|
-
const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);
|
|
297766
|
-
const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);
|
|
297767
|
-
const fuzzyRegExpCache = new _map__WEBPACK_IMPORTED_MODULE_0__.LRUCache(10000); // bounded to 10000 elements
|
|
297768
|
-
/**
|
|
297769
|
-
* Match pattern against word in a fuzzy way. This will only return a single match.
|
|
297770
|
-
* @internal
|
|
297771
|
-
*/
|
|
297772
|
-
function matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching = false) {
|
|
297773
|
-
// istanbul ignore next
|
|
297774
|
-
if (typeof word !== "string" || typeof wordToMatchAgainst !== "string") {
|
|
297775
|
-
return null; // return early for invalid input
|
|
297776
|
-
}
|
|
297777
|
-
// Form RegExp for wildcard matches
|
|
297778
|
-
let regexp = fuzzyRegExpCache.get(word);
|
|
297779
|
-
if (!regexp) {
|
|
297780
|
-
regexp = new RegExp(_strings__WEBPACK_IMPORTED_MODULE_1__.convertSimple2RegExpPattern(word), "i");
|
|
297781
|
-
fuzzyRegExpCache.set(word, regexp);
|
|
297782
|
-
}
|
|
297783
|
-
// RegExp Filter
|
|
297784
|
-
const match = regexp.exec(wordToMatchAgainst);
|
|
297785
|
-
if (match) {
|
|
297786
|
-
return [{ start: match.index, end: match.index + match[0].length }];
|
|
297787
|
-
}
|
|
297788
|
-
// Default Filter
|
|
297789
|
-
return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);
|
|
297790
|
-
}
|
|
297791
|
-
/**
|
|
297792
|
-
* Match pattern against word in a fuzzy way. As in IntelliSense and faster and more
|
|
297793
|
-
* powerful than `matchesFuzzy`. This will only return a single match.
|
|
297794
|
-
* @internal
|
|
297795
|
-
*/
|
|
297796
|
-
function matchesFuzzy2(pattern, word) {
|
|
297797
|
-
const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);
|
|
297798
|
-
return score ? createMatches(score) : null;
|
|
297799
|
-
}
|
|
297800
|
-
// #region --- fuzzyScore ---
|
|
297801
|
-
/**
|
|
297802
|
-
* @internal
|
|
297803
|
-
*/
|
|
297804
|
-
function createMatches(score) {
|
|
297805
|
-
// istanbul ignore next
|
|
297806
|
-
if (typeof score === "undefined") {
|
|
297807
|
-
return [];
|
|
297808
|
-
}
|
|
297809
|
-
const matches = score[1].toString(2);
|
|
297810
|
-
const wordStart = score[2];
|
|
297811
|
-
const res = [];
|
|
297812
|
-
for (let pos = wordStart; pos < _maxLen; pos++) {
|
|
297813
|
-
if (matches[matches.length - (pos + 1)] === "1") {
|
|
297814
|
-
const last = res[res.length - 1];
|
|
297815
|
-
if (last && last.end === pos) {
|
|
297816
|
-
last.end = pos + 1;
|
|
297817
|
-
}
|
|
297818
|
-
else {
|
|
297819
|
-
res.push({ start: pos, end: pos + 1 });
|
|
297820
|
-
}
|
|
297821
|
-
}
|
|
297822
|
-
}
|
|
297823
|
-
return res;
|
|
297824
|
-
}
|
|
297825
|
-
const _maxLen = 128;
|
|
297826
|
-
function initTable() {
|
|
297827
|
-
const table = [];
|
|
297828
|
-
const row = [0];
|
|
297829
|
-
for (let i = 1; i <= _maxLen; i++) {
|
|
297830
|
-
row.push(-i);
|
|
297831
|
-
}
|
|
297832
|
-
for (let i = 0; i <= _maxLen; i++) {
|
|
297833
|
-
const thisRow = row.slice(0);
|
|
297834
|
-
thisRow[0] = -i;
|
|
297835
|
-
table.push(thisRow);
|
|
297836
|
-
}
|
|
297837
|
-
return table;
|
|
297838
|
-
}
|
|
297839
|
-
const _table = initTable();
|
|
297840
|
-
const _scores = initTable();
|
|
297841
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
297842
|
-
const _arrows = initTable();
|
|
297843
|
-
const _debug = false;
|
|
297844
|
-
function isSeparatorAtPos(value, index) {
|
|
297845
|
-
if (index < 0 || index >= value.length) {
|
|
297846
|
-
return false;
|
|
297847
|
-
}
|
|
297848
|
-
const code = value.charCodeAt(index);
|
|
297849
|
-
switch (code) {
|
|
297850
|
-
case 95 /* CharCode.Underline */:
|
|
297851
|
-
case 45 /* CharCode.Dash */:
|
|
297852
|
-
case 46 /* CharCode.Period */:
|
|
297853
|
-
case 32 /* CharCode.Space */:
|
|
297854
|
-
case 47 /* CharCode.Slash */:
|
|
297855
|
-
case 92 /* CharCode.Backslash */:
|
|
297856
|
-
case 39 /* CharCode.SingleQuote */:
|
|
297857
|
-
case 34 /* CharCode.DoubleQuote */:
|
|
297858
|
-
case 58 /* CharCode.Colon */:
|
|
297859
|
-
case 36 /* CharCode.DollarSign */:
|
|
297860
|
-
return true;
|
|
297861
|
-
default:
|
|
297862
|
-
return false;
|
|
297863
|
-
}
|
|
297864
|
-
}
|
|
297865
|
-
function isWhitespaceAtPos(value, index) {
|
|
297866
|
-
if (index < 0 || index >= value.length) {
|
|
297867
|
-
return false;
|
|
297868
|
-
}
|
|
297869
|
-
const code = value.charCodeAt(index);
|
|
297870
|
-
switch (code) {
|
|
297871
|
-
// istanbul ignore next
|
|
297872
|
-
case 32 /* CharCode.Space */:
|
|
297873
|
-
case 9 /* CharCode.Tab */:
|
|
297874
|
-
return true;
|
|
297875
|
-
default:
|
|
297876
|
-
return false;
|
|
297877
|
-
}
|
|
297878
|
-
}
|
|
297879
|
-
function isUpperCaseAtPos(pos, word, wordLow) {
|
|
297880
|
-
return word[pos] !== wordLow[pos];
|
|
297881
|
-
}
|
|
297882
|
-
/** @internal */
|
|
297883
|
-
function isPatternInWord(patternLow, patternPos, patternLen, wordLow, wordPos, wordLen) {
|
|
297884
|
-
while (patternPos < patternLen && wordPos < wordLen) {
|
|
297885
|
-
if (patternLow[patternPos] === wordLow[wordPos]) {
|
|
297886
|
-
patternPos += 1;
|
|
297887
|
-
}
|
|
297888
|
-
wordPos += 1;
|
|
297889
|
-
}
|
|
297890
|
-
return patternPos === patternLen; // pattern must be exhausted
|
|
297891
|
-
}
|
|
297892
|
-
/** @internal */
|
|
297893
|
-
var FuzzyScore;
|
|
297894
|
-
(function (FuzzyScore) {
|
|
297895
|
-
/**
|
|
297896
|
-
* No matches and value `-100`
|
|
297897
|
-
* @internal
|
|
297898
|
-
*/
|
|
297899
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
297900
|
-
FuzzyScore.Default = Object.freeze([-100, 0, 0]);
|
|
297901
|
-
// istanbul ignore next
|
|
297902
|
-
/** @internal */
|
|
297903
|
-
function isDefault(score) {
|
|
297904
|
-
return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);
|
|
297905
|
-
}
|
|
297906
|
-
FuzzyScore.isDefault = isDefault;
|
|
297907
|
-
})(FuzzyScore || (FuzzyScore = {}));
|
|
297908
|
-
/** @internal */
|
|
297909
|
-
function fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wordStart, firstMatchCanBeWeak) {
|
|
297910
|
-
// istanbul ignore next
|
|
297911
|
-
const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;
|
|
297912
|
-
const wordLen = word.length > _maxLen ? _maxLen : word.length;
|
|
297913
|
-
if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {
|
|
297914
|
-
return undefined;
|
|
297915
|
-
}
|
|
297916
|
-
// Run a simple check if the characters of pattern occur
|
|
297917
|
-
// (in order) at all in word. If that isn't the case we
|
|
297918
|
-
// stop because no match will be possible
|
|
297919
|
-
if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {
|
|
297920
|
-
return undefined;
|
|
297921
|
-
}
|
|
297922
|
-
let row = 1;
|
|
297923
|
-
let column = 1;
|
|
297924
|
-
let patternPos = patternStart;
|
|
297925
|
-
let wordPos = wordStart;
|
|
297926
|
-
let hasStrongFirstMatch = false;
|
|
297927
|
-
// There will be a match, fill in tables
|
|
297928
|
-
for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {
|
|
297929
|
-
for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {
|
|
297930
|
-
const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);
|
|
297931
|
-
if (patternPos === patternStart && score > 1) {
|
|
297932
|
-
hasStrongFirstMatch = true;
|
|
297933
|
-
}
|
|
297934
|
-
_scores[row][column] = score;
|
|
297935
|
-
const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);
|
|
297936
|
-
const top = _table[row - 1][column] + -1;
|
|
297937
|
-
const left = _table[row][column - 1] + -1;
|
|
297938
|
-
if (left >= top) {
|
|
297939
|
-
// left or diag
|
|
297940
|
-
if (left > diag) {
|
|
297941
|
-
_table[row][column] = left;
|
|
297942
|
-
_arrows[row][column] = 4 /* Arrow.Left */;
|
|
297943
|
-
}
|
|
297944
|
-
else if (left === diag) {
|
|
297945
|
-
_table[row][column] = left;
|
|
297946
|
-
_arrows[row][column] = 4 /* Arrow.Left */ | 2 /* Arrow.Diag */;
|
|
297947
|
-
}
|
|
297948
|
-
else {
|
|
297949
|
-
_table[row][column] = diag;
|
|
297950
|
-
_arrows[row][column] = 2 /* Arrow.Diag */;
|
|
297951
|
-
}
|
|
297952
|
-
}
|
|
297953
|
-
else {
|
|
297954
|
-
// top or diag
|
|
297955
|
-
if (top > diag) {
|
|
297956
|
-
_table[row][column] = top;
|
|
297957
|
-
_arrows[row][column] = 1 /* Arrow.Top */;
|
|
297958
|
-
}
|
|
297959
|
-
else if (top === diag) {
|
|
297960
|
-
_table[row][column] = top;
|
|
297961
|
-
_arrows[row][column] = 1 /* Arrow.Top */ | 2 /* Arrow.Diag */;
|
|
297962
|
-
}
|
|
297963
|
-
else {
|
|
297964
|
-
_table[row][column] = diag;
|
|
297965
|
-
_arrows[row][column] = 2 /* Arrow.Diag */;
|
|
297966
|
-
}
|
|
297967
|
-
}
|
|
297968
|
-
}
|
|
297969
|
-
}
|
|
297970
|
-
if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {
|
|
297971
|
-
return undefined;
|
|
297972
|
-
}
|
|
297973
|
-
_matchesCount = 0;
|
|
297974
|
-
_topScore = -100;
|
|
297975
|
-
_wordStart = wordStart;
|
|
297976
|
-
_firstMatchCanBeWeak = firstMatchCanBeWeak;
|
|
297977
|
-
_findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);
|
|
297978
|
-
if (_matchesCount === 0) {
|
|
297979
|
-
return undefined;
|
|
297980
|
-
}
|
|
297981
|
-
return [_topScore, _topMatch2, wordStart];
|
|
297982
|
-
}
|
|
297983
|
-
function _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos) {
|
|
297984
|
-
if (patternLow[patternPos] !== wordLow[wordPos]) {
|
|
297985
|
-
return -1;
|
|
297986
|
-
}
|
|
297987
|
-
if (wordPos === (patternPos - patternStart)) {
|
|
297988
|
-
// common prefix: `foobar <-> foobaz`
|
|
297989
|
-
// ^^^^^
|
|
297990
|
-
if (pattern[patternPos] === word[wordPos]) {
|
|
297991
|
-
return 7;
|
|
297992
|
-
}
|
|
297993
|
-
else {
|
|
297994
|
-
return 5;
|
|
297995
|
-
}
|
|
297996
|
-
}
|
|
297997
|
-
else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {
|
|
297998
|
-
// hitting upper-case: `foo <-> forOthers`
|
|
297999
|
-
// ^^ ^
|
|
298000
|
-
if (pattern[patternPos] === word[wordPos]) {
|
|
298001
|
-
return 7;
|
|
298002
|
-
}
|
|
298003
|
-
else {
|
|
298004
|
-
return 5;
|
|
298005
|
-
}
|
|
298006
|
-
}
|
|
298007
|
-
else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {
|
|
298008
|
-
// hitting a separator: `. <-> foo.bar`
|
|
298009
|
-
// ^
|
|
298010
|
-
return 5;
|
|
298011
|
-
}
|
|
298012
|
-
else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {
|
|
298013
|
-
// post separator: `foo <-> bar_foo`
|
|
298014
|
-
// ^^^
|
|
298015
|
-
return 5;
|
|
298016
|
-
}
|
|
298017
|
-
else {
|
|
298018
|
-
return 1;
|
|
298019
|
-
}
|
|
298020
|
-
}
|
|
298021
|
-
let _matchesCount = 0;
|
|
298022
|
-
let _topMatch2 = 0;
|
|
298023
|
-
let _topScore = 0;
|
|
298024
|
-
let _wordStart = 0;
|
|
298025
|
-
let _firstMatchCanBeWeak = false;
|
|
298026
|
-
function _findAllMatches2(row, column, total, matches, lastMatched) {
|
|
298027
|
-
if (_matchesCount >= 10 || total < -25) {
|
|
298028
|
-
// stop when having already 10 results, or
|
|
298029
|
-
// when a potential alignment as already 5 gaps
|
|
298030
|
-
return;
|
|
298031
|
-
}
|
|
298032
|
-
let simpleMatchCount = 0;
|
|
298033
|
-
while (row > 0 && column > 0) {
|
|
298034
|
-
const score = _scores[row][column];
|
|
298035
|
-
const arrow = _arrows[row][column];
|
|
298036
|
-
if (arrow === 4 /* Arrow.Left */) {
|
|
298037
|
-
// left -> no match, skip a word character
|
|
298038
|
-
column -= 1;
|
|
298039
|
-
if (lastMatched) {
|
|
298040
|
-
total -= 5; // new gap penalty
|
|
298041
|
-
}
|
|
298042
|
-
else if (matches !== 0) {
|
|
298043
|
-
total -= 1; // gap penalty after first match
|
|
298044
|
-
}
|
|
298045
|
-
lastMatched = false;
|
|
298046
|
-
simpleMatchCount = 0;
|
|
298047
|
-
}
|
|
298048
|
-
else {
|
|
298049
|
-
/* istanbul ignore else */
|
|
298050
|
-
if (arrow & 2 /* Arrow.Diag */) {
|
|
298051
|
-
if (arrow & 4 /* Arrow.Left */) {
|
|
298052
|
-
// left
|
|
298053
|
-
_findAllMatches2(row, column - 1, matches !== 0 ? total - 1 : total, // gap penalty after first match
|
|
298054
|
-
matches, lastMatched);
|
|
298055
|
-
}
|
|
298056
|
-
// diag
|
|
298057
|
-
total += score;
|
|
298058
|
-
row -= 1;
|
|
298059
|
-
column -= 1;
|
|
298060
|
-
lastMatched = true;
|
|
298061
|
-
// match -> set a 1 at the word pos
|
|
298062
|
-
matches += 2 ** (column + _wordStart);
|
|
298063
|
-
// count simple matches and boost a row of
|
|
298064
|
-
// simple matches when they yield in a
|
|
298065
|
-
// strong match.
|
|
298066
|
-
if (score === 1) {
|
|
298067
|
-
simpleMatchCount += 1;
|
|
298068
|
-
if (row === 0 && !_firstMatchCanBeWeak) {
|
|
298069
|
-
// when the first match is a weak
|
|
298070
|
-
// match we discard it
|
|
298071
|
-
return undefined;
|
|
298072
|
-
}
|
|
298073
|
-
}
|
|
298074
|
-
else {
|
|
298075
|
-
// boost
|
|
298076
|
-
total += 1 + (simpleMatchCount * (score - 1));
|
|
298077
|
-
simpleMatchCount = 0;
|
|
298078
|
-
}
|
|
298079
|
-
}
|
|
298080
|
-
else {
|
|
298081
|
-
// istanbul ignore next
|
|
298082
|
-
return undefined;
|
|
298083
|
-
}
|
|
298084
|
-
}
|
|
298085
|
-
}
|
|
298086
|
-
total -= column >= 3 ? 9 : column * 3; // late start penalty
|
|
298087
|
-
// dynamically keep track of the current top score
|
|
298088
|
-
// and insert the current best score at head, the rest at tail
|
|
298089
|
-
_matchesCount += 1;
|
|
298090
|
-
if (total > _topScore) {
|
|
298091
|
-
_topScore = total;
|
|
298092
|
-
_topMatch2 = matches;
|
|
298093
|
-
}
|
|
298094
|
-
}
|
|
298095
|
-
// #endregion
|
|
298096
|
-
// #region --- graceful ---
|
|
298097
|
-
/** @internal */
|
|
298098
|
-
function fuzzyScoreGracefulAggressive(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
|
|
298099
|
-
return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);
|
|
298100
|
-
}
|
|
298101
|
-
/** @internal */
|
|
298102
|
-
function fuzzyScoreGraceful(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
|
|
298103
|
-
return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);
|
|
298104
|
-
}
|
|
298105
|
-
function fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, aggressive, firstMatchCanBeWeak) {
|
|
298106
|
-
let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
|
|
298107
|
-
if (top && !aggressive) {
|
|
298108
|
-
// when using the original pattern yield a result we`
|
|
298109
|
-
// return it unless we are aggressive and try to find
|
|
298110
|
-
// a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.
|
|
298111
|
-
return top;
|
|
298112
|
-
}
|
|
298113
|
-
// istanbul ignore else
|
|
298114
|
-
if (pattern.length >= 3) {
|
|
298115
|
-
// When the pattern is long enough then try a few (max 7)
|
|
298116
|
-
// permutations of the pattern to find a better match. The
|
|
298117
|
-
// permutations only swap neighbouring characters, e.g
|
|
298118
|
-
// `cnoso` becomes `conso`, `cnsoo`, `cnoos`.
|
|
298119
|
-
const tries = Math.min(7, pattern.length - 1);
|
|
298120
|
-
for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {
|
|
298121
|
-
const newPattern = nextTypoPermutation(pattern, movingPatternPos);
|
|
298122
|
-
// istanbul ignore else
|
|
298123
|
-
if (newPattern) {
|
|
298124
|
-
const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
|
|
298125
|
-
if (candidate) {
|
|
298126
|
-
candidate[0] -= 3; // permutation penalty
|
|
298127
|
-
// istanbul ignore else
|
|
298128
|
-
if (!top || candidate[0] > top[0]) {
|
|
298129
|
-
top = candidate;
|
|
298130
|
-
}
|
|
298131
|
-
}
|
|
298132
|
-
}
|
|
298133
|
-
}
|
|
298134
|
-
}
|
|
298135
|
-
return top;
|
|
298136
|
-
}
|
|
298137
|
-
function nextTypoPermutation(pattern, patternPos) {
|
|
298138
|
-
// istanbul ignore next
|
|
298139
|
-
if (patternPos + 1 >= pattern.length) {
|
|
298140
|
-
return undefined;
|
|
298141
|
-
}
|
|
298142
|
-
const swap1 = pattern[patternPos];
|
|
298143
|
-
const swap2 = pattern[patternPos + 1];
|
|
298144
|
-
// istanbul ignore next
|
|
298145
|
-
if (swap1 === swap2) {
|
|
298146
|
-
return undefined;
|
|
298147
|
-
}
|
|
298148
|
-
return pattern.slice(0, patternPos)
|
|
298149
|
-
+ swap2
|
|
298150
|
-
+ swap1
|
|
298151
|
-
+ pattern.slice(patternPos + 2);
|
|
298152
|
-
}
|
|
298153
|
-
// #endregion
|
|
298154
|
-
|
|
298155
|
-
|
|
298156
|
-
/***/ }),
|
|
298157
|
-
|
|
298158
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js":
|
|
298159
|
-
/*!**************************************************************************!*\
|
|
298160
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js ***!
|
|
298161
|
-
\**************************************************************************/
|
|
298162
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
298163
|
-
|
|
298164
|
-
"use strict";
|
|
298165
|
-
__webpack_require__.r(__webpack_exports__);
|
|
298166
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
298167
|
-
/* harmony export */ LRUCache: () => (/* binding */ LRUCache),
|
|
298168
|
-
/* harmony export */ LinkedMap: () => (/* binding */ LinkedMap)
|
|
298169
|
-
/* harmony export */ });
|
|
298170
|
-
/*---------------------------------------------------------------------------------------------
|
|
298171
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
298172
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
298173
|
-
*--------------------------------------------------------------------------------------------*/
|
|
298174
|
-
var _a;
|
|
298175
|
-
/**
|
|
298176
|
-
* @internal
|
|
298177
|
-
*/
|
|
298178
|
-
// istanbul ignore next
|
|
298179
|
-
class LinkedMap {
|
|
298180
|
-
constructor() {
|
|
298181
|
-
this[_a] = "LinkedMap";
|
|
298182
|
-
this._map = new Map();
|
|
298183
|
-
this._head = undefined;
|
|
298184
|
-
this._tail = undefined;
|
|
298185
|
-
this._size = 0;
|
|
298186
|
-
this._state = 0;
|
|
298187
|
-
}
|
|
298188
|
-
clear() {
|
|
298189
|
-
this._map.clear();
|
|
298190
|
-
this._head = undefined;
|
|
298191
|
-
this._tail = undefined;
|
|
298192
|
-
this._size = 0;
|
|
298193
|
-
this._state++;
|
|
298194
|
-
}
|
|
298195
|
-
isEmpty() {
|
|
298196
|
-
return !this._head && !this._tail;
|
|
298197
|
-
}
|
|
298198
|
-
get size() {
|
|
298199
|
-
return this._size;
|
|
298200
|
-
}
|
|
298201
|
-
get first() {
|
|
298202
|
-
return this._head?.value;
|
|
298203
|
-
}
|
|
298204
|
-
get last() {
|
|
298205
|
-
return this._tail?.value;
|
|
298206
|
-
}
|
|
298207
|
-
has(key) {
|
|
298208
|
-
return this._map.has(key);
|
|
298209
|
-
}
|
|
298210
|
-
get(key, touch = 0 /* Touch.None */) {
|
|
298211
|
-
const item = this._map.get(key);
|
|
298212
|
-
if (!item) {
|
|
298213
|
-
return undefined;
|
|
298214
|
-
}
|
|
298215
|
-
if (touch !== 0 /* Touch.None */) {
|
|
298216
|
-
this.touch(item, touch);
|
|
298217
|
-
}
|
|
298218
|
-
return item.value;
|
|
298219
|
-
}
|
|
298220
|
-
set(key, value, touch = 0 /* Touch.None */) {
|
|
298221
|
-
let item = this._map.get(key);
|
|
298222
|
-
if (item) {
|
|
298223
|
-
item.value = value;
|
|
298224
|
-
if (touch !== 0 /* Touch.None */) {
|
|
298225
|
-
this.touch(item, touch);
|
|
298226
|
-
}
|
|
298227
|
-
}
|
|
298228
|
-
else {
|
|
298229
|
-
item = { key, value, next: undefined, previous: undefined };
|
|
298230
|
-
switch (touch) {
|
|
298231
|
-
case 0 /* Touch.None */:
|
|
298232
|
-
this.addItemLast(item);
|
|
298233
|
-
break;
|
|
298234
|
-
case 1 /* Touch.AsOld */:
|
|
298235
|
-
this.addItemFirst(item);
|
|
298236
|
-
break;
|
|
298237
|
-
case 2 /* Touch.AsNew */:
|
|
298238
|
-
this.addItemLast(item);
|
|
298239
|
-
break;
|
|
298240
|
-
default:
|
|
298241
|
-
this.addItemLast(item);
|
|
298242
|
-
break;
|
|
298243
|
-
}
|
|
298244
|
-
this._map.set(key, item);
|
|
298245
|
-
this._size++;
|
|
298246
|
-
}
|
|
298247
|
-
return this;
|
|
298248
|
-
}
|
|
298249
|
-
delete(key) {
|
|
298250
|
-
return !!this.remove(key);
|
|
298251
|
-
}
|
|
298252
|
-
remove(key) {
|
|
298253
|
-
const item = this._map.get(key);
|
|
298254
|
-
if (!item) {
|
|
298255
|
-
return undefined;
|
|
298256
|
-
}
|
|
298257
|
-
this._map.delete(key);
|
|
298258
|
-
this.removeItem(item);
|
|
298259
|
-
this._size--;
|
|
298260
|
-
return item.value;
|
|
298261
|
-
}
|
|
298262
|
-
shift() {
|
|
298263
|
-
if (!this._head && !this._tail) {
|
|
298264
|
-
return undefined;
|
|
298265
|
-
}
|
|
298266
|
-
if (!this._head || !this._tail) {
|
|
298267
|
-
throw new Error("Invalid list");
|
|
298268
|
-
}
|
|
298269
|
-
const item = this._head;
|
|
298270
|
-
this._map.delete(item.key);
|
|
298271
|
-
this.removeItem(item);
|
|
298272
|
-
this._size--;
|
|
298273
|
-
return item.value;
|
|
298274
|
-
}
|
|
298275
|
-
forEach(callbackfn, thisArg) {
|
|
298276
|
-
const state = this._state;
|
|
298277
|
-
let current = this._head;
|
|
298278
|
-
while (current) {
|
|
298279
|
-
if (thisArg) {
|
|
298280
|
-
callbackfn.bind(thisArg)(current.value, current.key, this);
|
|
298281
|
-
}
|
|
298282
|
-
else {
|
|
298283
|
-
callbackfn(current.value, current.key, this);
|
|
298284
|
-
}
|
|
298285
|
-
if (this._state !== state) {
|
|
298286
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
298287
|
-
}
|
|
298288
|
-
current = current.next;
|
|
298289
|
-
}
|
|
298290
|
-
}
|
|
298291
|
-
keys() {
|
|
298292
|
-
const map = this;
|
|
298293
|
-
const state = this._state;
|
|
298294
|
-
let current = this._head;
|
|
298295
|
-
const iterator = {
|
|
298296
|
-
[Symbol.iterator]() {
|
|
298297
|
-
return iterator;
|
|
298298
|
-
},
|
|
298299
|
-
next() {
|
|
298300
|
-
if (map._state !== state) {
|
|
298301
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
298302
|
-
}
|
|
298303
|
-
if (current) {
|
|
298304
|
-
const result = { value: current.key, done: false };
|
|
298305
|
-
current = current.next;
|
|
298306
|
-
return result;
|
|
298307
|
-
}
|
|
298308
|
-
else {
|
|
298309
|
-
return { value: undefined, done: true };
|
|
298310
|
-
}
|
|
298311
|
-
},
|
|
298312
|
-
};
|
|
298313
|
-
return iterator;
|
|
298314
|
-
}
|
|
298315
|
-
values() {
|
|
298316
|
-
const map = this;
|
|
298317
|
-
const state = this._state;
|
|
298318
|
-
let current = this._head;
|
|
298319
|
-
const iterator = {
|
|
298320
|
-
[Symbol.iterator]() {
|
|
298321
|
-
return iterator;
|
|
298322
|
-
},
|
|
298323
|
-
next() {
|
|
298324
|
-
if (map._state !== state) {
|
|
298325
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
298326
|
-
}
|
|
298327
|
-
if (current) {
|
|
298328
|
-
const result = { value: current.value, done: false };
|
|
298329
|
-
current = current.next;
|
|
298330
|
-
return result;
|
|
298331
|
-
}
|
|
298332
|
-
else {
|
|
298333
|
-
return { value: undefined, done: true };
|
|
298334
|
-
}
|
|
298335
|
-
},
|
|
298336
|
-
};
|
|
298337
|
-
return iterator;
|
|
298338
|
-
}
|
|
298339
|
-
entries() {
|
|
298340
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
298341
|
-
const map = this;
|
|
298342
|
-
const state = this._state;
|
|
298343
|
-
let current = this._head;
|
|
298344
|
-
const iterator = {
|
|
298345
|
-
[Symbol.iterator]() {
|
|
298346
|
-
return iterator;
|
|
298347
|
-
},
|
|
298348
|
-
next() {
|
|
298349
|
-
if (map._state !== state) {
|
|
298350
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
298351
|
-
}
|
|
298352
|
-
if (current) {
|
|
298353
|
-
const result = { value: [current.key, current.value], done: false };
|
|
298354
|
-
current = current.next;
|
|
298355
|
-
return result;
|
|
298356
|
-
}
|
|
298357
|
-
else {
|
|
298358
|
-
return { value: undefined, done: true };
|
|
298359
|
-
}
|
|
298360
|
-
},
|
|
298361
|
-
};
|
|
298362
|
-
return iterator;
|
|
298363
|
-
}
|
|
298364
|
-
[(_a = Symbol.toStringTag, Symbol.iterator)]() {
|
|
298365
|
-
return this.entries();
|
|
298366
|
-
}
|
|
298367
|
-
trimOld(newSize) {
|
|
298368
|
-
if (newSize >= this.size) {
|
|
298369
|
-
return;
|
|
298370
|
-
}
|
|
298371
|
-
if (newSize === 0) {
|
|
298372
|
-
this.clear();
|
|
298373
|
-
return;
|
|
298374
|
-
}
|
|
298375
|
-
let current = this._head;
|
|
298376
|
-
let currentSize = this.size;
|
|
298377
|
-
while (current && currentSize > newSize) {
|
|
298378
|
-
this._map.delete(current.key);
|
|
298379
|
-
current = current.next;
|
|
298380
|
-
currentSize--;
|
|
298381
|
-
}
|
|
298382
|
-
this._head = current;
|
|
298383
|
-
this._size = currentSize;
|
|
298384
|
-
if (current) {
|
|
298385
|
-
current.previous = undefined;
|
|
298386
|
-
}
|
|
298387
|
-
this._state++;
|
|
298388
|
-
}
|
|
298389
|
-
addItemFirst(item) {
|
|
298390
|
-
// First time Insert
|
|
298391
|
-
if (!this._head && !this._tail) {
|
|
298392
|
-
this._tail = item;
|
|
298393
|
-
}
|
|
298394
|
-
else if (!this._head) {
|
|
298395
|
-
throw new Error("Invalid list");
|
|
298396
|
-
}
|
|
298397
|
-
else {
|
|
298398
|
-
item.next = this._head;
|
|
298399
|
-
this._head.previous = item;
|
|
298400
|
-
}
|
|
298401
|
-
this._head = item;
|
|
298402
|
-
this._state++;
|
|
298403
|
-
}
|
|
298404
|
-
addItemLast(item) {
|
|
298405
|
-
// First time Insert
|
|
298406
|
-
if (!this._head && !this._tail) {
|
|
298407
|
-
this._head = item;
|
|
298408
|
-
}
|
|
298409
|
-
else if (!this._tail) {
|
|
298410
|
-
throw new Error("Invalid list");
|
|
298411
|
-
}
|
|
298412
|
-
else {
|
|
298413
|
-
item.previous = this._tail;
|
|
298414
|
-
this._tail.next = item;
|
|
298415
|
-
}
|
|
298416
|
-
this._tail = item;
|
|
298417
|
-
this._state++;
|
|
298418
|
-
}
|
|
298419
|
-
removeItem(item) {
|
|
298420
|
-
if (item === this._head && item === this._tail) {
|
|
298421
|
-
this._head = undefined;
|
|
298422
|
-
this._tail = undefined;
|
|
298423
|
-
}
|
|
298424
|
-
else if (item === this._head) {
|
|
298425
|
-
// This can only happend if size === 1 which is handle
|
|
298426
|
-
// by the case above.
|
|
298427
|
-
if (!item.next) {
|
|
298428
|
-
throw new Error("Invalid list");
|
|
298429
|
-
}
|
|
298430
|
-
item.next.previous = undefined;
|
|
298431
|
-
this._head = item.next;
|
|
298432
|
-
}
|
|
298433
|
-
else if (item === this._tail) {
|
|
298434
|
-
// This can only happend if size === 1 which is handle
|
|
298435
|
-
// by the case above.
|
|
298436
|
-
if (!item.previous) {
|
|
298437
|
-
throw new Error("Invalid list");
|
|
298438
|
-
}
|
|
298439
|
-
item.previous.next = undefined;
|
|
298440
|
-
this._tail = item.previous;
|
|
298441
|
-
}
|
|
298442
|
-
else {
|
|
298443
|
-
const next = item.next;
|
|
298444
|
-
const previous = item.previous;
|
|
298445
|
-
if (!next || !previous) {
|
|
298446
|
-
throw new Error("Invalid list");
|
|
298447
|
-
}
|
|
298448
|
-
next.previous = previous;
|
|
298449
|
-
previous.next = next;
|
|
298450
|
-
}
|
|
298451
|
-
item.next = undefined;
|
|
298452
|
-
item.previous = undefined;
|
|
298453
|
-
this._state++;
|
|
298454
|
-
}
|
|
298455
|
-
touch(item, touch) {
|
|
298456
|
-
if (!this._head || !this._tail) {
|
|
298457
|
-
throw new Error("Invalid list");
|
|
298458
|
-
}
|
|
298459
|
-
if ((touch !== 1 /* Touch.AsOld */ && touch !== 2 /* Touch.AsNew */)) {
|
|
298460
|
-
return;
|
|
298461
|
-
}
|
|
298462
|
-
if (touch === 1 /* Touch.AsOld */) {
|
|
298463
|
-
if (item === this._head) {
|
|
298464
|
-
return;
|
|
298465
|
-
}
|
|
298466
|
-
const next = item.next;
|
|
298467
|
-
const previous = item.previous;
|
|
298468
|
-
// Unlink the item
|
|
298469
|
-
if (item === this._tail) {
|
|
298470
|
-
// previous must be defined since item was not head but is tail
|
|
298471
|
-
// So there are more than on item in the map
|
|
298472
|
-
previous.next = undefined;
|
|
298473
|
-
this._tail = previous;
|
|
298474
|
-
}
|
|
298475
|
-
else {
|
|
298476
|
-
// Both next and previous are not undefined since item was neither head nor tail.
|
|
298477
|
-
next.previous = previous;
|
|
298478
|
-
previous.next = next;
|
|
298479
|
-
}
|
|
298480
|
-
// Insert the node at head
|
|
298481
|
-
item.previous = undefined;
|
|
298482
|
-
item.next = this._head;
|
|
298483
|
-
this._head.previous = item;
|
|
298484
|
-
this._head = item;
|
|
298485
|
-
this._state++;
|
|
298486
|
-
}
|
|
298487
|
-
else if (touch === 2 /* Touch.AsNew */) {
|
|
298488
|
-
if (item === this._tail) {
|
|
298489
|
-
return;
|
|
298490
|
-
}
|
|
298491
|
-
const next = item.next;
|
|
298492
|
-
const previous = item.previous;
|
|
298493
|
-
// Unlink the item.
|
|
298494
|
-
if (item === this._head) {
|
|
298495
|
-
// next must be defined since item was not tail but is head
|
|
298496
|
-
// So there are more than on item in the map
|
|
298497
|
-
next.previous = undefined;
|
|
298498
|
-
this._head = next;
|
|
298499
|
-
}
|
|
298500
|
-
else {
|
|
298501
|
-
// Both next and previous are not undefined since item was neither head nor tail.
|
|
298502
|
-
next.previous = previous;
|
|
298503
|
-
previous.next = next;
|
|
298504
|
-
}
|
|
298505
|
-
item.next = undefined;
|
|
298506
|
-
item.previous = this._tail;
|
|
298507
|
-
this._tail.next = item;
|
|
298508
|
-
this._tail = item;
|
|
298509
|
-
this._state++;
|
|
298510
|
-
}
|
|
298511
|
-
}
|
|
298512
|
-
toJSON() {
|
|
298513
|
-
const data = [];
|
|
298514
|
-
this.forEach((value, key) => {
|
|
298515
|
-
data.push([key, value]);
|
|
298516
|
-
});
|
|
298517
|
-
return data;
|
|
298518
|
-
}
|
|
298519
|
-
fromJSON(data) {
|
|
298520
|
-
this.clear();
|
|
298521
|
-
for (const [key, value] of data) {
|
|
298522
|
-
this.set(key, value);
|
|
298523
|
-
}
|
|
298524
|
-
}
|
|
298525
|
-
}
|
|
298526
|
-
/**
|
|
298527
|
-
* @internal
|
|
298528
|
-
*/
|
|
298529
|
-
// istanbul ignore next
|
|
298530
|
-
class LRUCache extends LinkedMap {
|
|
298531
|
-
constructor(limit, ratio = 1) {
|
|
298532
|
-
super();
|
|
298533
|
-
this._limit = limit;
|
|
298534
|
-
this._ratio = Math.min(Math.max(0, ratio), 1);
|
|
298535
|
-
}
|
|
298536
|
-
get limit() {
|
|
298537
|
-
return this._limit;
|
|
298538
|
-
}
|
|
298539
|
-
set limit(limit) {
|
|
298540
|
-
this._limit = limit;
|
|
298541
|
-
this.checkTrim();
|
|
298542
|
-
}
|
|
298543
|
-
get ratio() {
|
|
298544
|
-
return this._ratio;
|
|
298545
|
-
}
|
|
298546
|
-
set ratio(ratio) {
|
|
298547
|
-
this._ratio = Math.min(Math.max(0, ratio), 1);
|
|
298548
|
-
this.checkTrim();
|
|
298549
|
-
}
|
|
298550
|
-
get(key, touch = 2 /* Touch.AsNew */) {
|
|
298551
|
-
return super.get(key, touch);
|
|
298552
|
-
}
|
|
298553
|
-
peek(key) {
|
|
298554
|
-
return super.get(key, 0 /* Touch.None */);
|
|
298555
|
-
}
|
|
298556
|
-
set(key, value) {
|
|
298557
|
-
super.set(key, value, 2 /* Touch.AsNew */);
|
|
298558
|
-
this.checkTrim();
|
|
298559
|
-
return this;
|
|
298560
|
-
}
|
|
298561
|
-
checkTrim() {
|
|
298562
|
-
if (this.size > this._limit) {
|
|
298563
|
-
this.trimOld(Math.round(this._limit * this._ratio));
|
|
298564
|
-
}
|
|
298565
|
-
}
|
|
298566
|
-
}
|
|
298567
|
-
|
|
298568
|
-
|
|
298569
|
-
/***/ }),
|
|
298570
|
-
|
|
298571
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js":
|
|
298572
|
-
/*!******************************************************************************!*\
|
|
298573
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js ***!
|
|
298574
|
-
\******************************************************************************/
|
|
298575
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
298576
|
-
|
|
298577
|
-
"use strict";
|
|
298578
|
-
__webpack_require__.r(__webpack_exports__);
|
|
298579
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
298580
|
-
/* harmony export */ convertSimple2RegExpPattern: () => (/* binding */ convertSimple2RegExpPattern),
|
|
298581
|
-
/* harmony export */ equalsIgnoreCase: () => (/* binding */ equalsIgnoreCase),
|
|
298582
|
-
/* harmony export */ isLowerAsciiLetter: () => (/* binding */ isLowerAsciiLetter),
|
|
298583
|
-
/* harmony export */ isUpperAsciiLetter: () => (/* binding */ isUpperAsciiLetter),
|
|
298584
|
-
/* harmony export */ startsWithIgnoreCase: () => (/* binding */ startsWithIgnoreCase)
|
|
298585
|
-
/* harmony export */ });
|
|
298586
|
-
/*---------------------------------------------------------------------------------------------
|
|
298587
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
298588
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
298589
|
-
*--------------------------------------------------------------------------------------------*/
|
|
298590
|
-
/**
|
|
298591
|
-
* @internal
|
|
298592
|
-
*/
|
|
298593
|
-
function convertSimple2RegExpPattern(pattern) {
|
|
298594
|
-
return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*");
|
|
298595
|
-
}
|
|
298596
|
-
/**
|
|
298597
|
-
* @internal
|
|
298598
|
-
*/
|
|
298599
|
-
function isLowerAsciiLetter(code) {
|
|
298600
|
-
return code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */;
|
|
298601
|
-
}
|
|
298602
|
-
/**
|
|
298603
|
-
* @internal
|
|
298604
|
-
*/
|
|
298605
|
-
function isUpperAsciiLetter(code) {
|
|
298606
|
-
return code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */;
|
|
298607
|
-
}
|
|
298608
|
-
/**
|
|
298609
|
-
* @internal
|
|
298610
|
-
*/
|
|
298611
|
-
function isAsciiLetter(code) {
|
|
298612
|
-
return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
|
|
298613
|
-
}
|
|
298614
|
-
/**
|
|
298615
|
-
* @internal
|
|
298616
|
-
*/
|
|
298617
|
-
function equalsIgnoreCase(a, b) {
|
|
298618
|
-
return a.length === b.length && doEqualsIgnoreCase(a, b);
|
|
298619
|
-
}
|
|
298620
|
-
/**
|
|
298621
|
-
* @internal
|
|
298622
|
-
*/
|
|
298623
|
-
function doEqualsIgnoreCase(a, b, stopAt = a.length) {
|
|
298624
|
-
for (let i = 0; i < stopAt; i++) {
|
|
298625
|
-
const codeA = a.charCodeAt(i);
|
|
298626
|
-
const codeB = b.charCodeAt(i);
|
|
298627
|
-
if (codeA === codeB) {
|
|
298628
|
-
continue;
|
|
298629
|
-
}
|
|
298630
|
-
// a-z A-Z
|
|
298631
|
-
if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {
|
|
298632
|
-
const diff = Math.abs(codeA - codeB);
|
|
298633
|
-
if (diff !== 0 && diff !== 32) {
|
|
298634
|
-
return false;
|
|
298635
|
-
}
|
|
298636
|
-
}
|
|
298637
|
-
else {
|
|
298638
|
-
// Any other char code
|
|
298639
|
-
if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {
|
|
298640
|
-
return false;
|
|
298641
|
-
}
|
|
298642
|
-
}
|
|
298643
|
-
}
|
|
298644
|
-
return true;
|
|
298645
|
-
}
|
|
298646
|
-
/**
|
|
298647
|
-
* @internal
|
|
298648
|
-
*/
|
|
298649
|
-
function startsWithIgnoreCase(str, candidate) {
|
|
298650
|
-
const candidateLength = candidate.length;
|
|
298651
|
-
if (candidate.length > str.length) {
|
|
298652
|
-
return false;
|
|
298653
|
-
}
|
|
298654
|
-
return doEqualsIgnoreCase(str, candidate, candidateLength);
|
|
298655
|
-
}
|
|
298656
297510
|
|
|
298657
297511
|
|
|
298658
297512
|
/***/ }),
|
|
@@ -298666,8 +297520,7 @@ function startsWithIgnoreCase(str, candidate) {
|
|
|
298666
297520
|
"use strict";
|
|
298667
297521
|
__webpack_require__.r(__webpack_exports__);
|
|
298668
297522
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
298669
|
-
/* harmony export */ getClassName: () => (/* binding */ getClassName)
|
|
298670
|
-
/* harmony export */ loggerCategory: () => (/* binding */ loggerCategory)
|
|
297523
|
+
/* harmony export */ getClassName: () => (/* binding */ getClassName)
|
|
298671
297524
|
/* harmony export */ });
|
|
298672
297525
|
/*---------------------------------------------------------------------------------------------
|
|
298673
297526
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -298678,6 +297531,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
298678
297531
|
*/
|
|
298679
297532
|
/** Gets the class name for an object.
|
|
298680
297533
|
* @internal
|
|
297534
|
+
* @deprecated in 4.3. Please use your own implementation in the future. Though internal, this requires deprecation due to known public usage in @itwin/core-react.
|
|
298681
297535
|
*/
|
|
298682
297536
|
const getClassName = (obj) => {
|
|
298683
297537
|
let className = "";
|
|
@@ -298692,14 +297546,6 @@ const getClassName = (obj) => {
|
|
|
298692
297546
|
}
|
|
298693
297547
|
return className;
|
|
298694
297548
|
};
|
|
298695
|
-
/** Gets category to use for adding Log entries
|
|
298696
|
-
* @internal
|
|
298697
|
-
*/
|
|
298698
|
-
const loggerCategory = (obj) => {
|
|
298699
|
-
const className = getClassName(obj);
|
|
298700
|
-
const category = `appui-abstract${(className ? `.${className}` : "")}`;
|
|
298701
|
-
return category;
|
|
298702
|
-
};
|
|
298703
297549
|
|
|
298704
297550
|
|
|
298705
297551
|
/***/ }),
|
|
@@ -304581,7 +303427,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
304581
303427
|
/***/ ((module) => {
|
|
304582
303428
|
|
|
304583
303429
|
"use strict";
|
|
304584
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
303430
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.33","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.3.0-dev.33","@itwin/core-bentley":"workspace:^4.3.0-dev.33","@itwin/core-common":"workspace:^4.3.0-dev.33","@itwin/core-geometry":"workspace:^4.3.0-dev.33","@itwin/core-orbitgt":"workspace:^4.3.0-dev.33","@itwin/core-quantity":"workspace:^4.3.0-dev.33"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
304585
303431
|
|
|
304586
303432
|
/***/ }),
|
|
304587
303433
|
|