@itwin/ecschema-rpcinterface-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 +56 -1210
- 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 +16 -16
|
@@ -109408,8 +109408,16 @@ class BranchState {
|
|
|
109408
109408
|
return overrides.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);
|
|
109409
109409
|
}
|
|
109410
109410
|
static createForDecorations() {
|
|
109411
|
-
const
|
|
109412
|
-
|
|
109411
|
+
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 });
|
|
109412
|
+
const symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_2__.FeatureSymbology.Overrides();
|
|
109413
|
+
symbologyOverrides.ignoreSubCategory = true;
|
|
109414
|
+
return new BranchState({
|
|
109415
|
+
viewFlags,
|
|
109416
|
+
transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity(),
|
|
109417
|
+
symbologyOverrides,
|
|
109418
|
+
edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_3__.EdgeSettings.create(undefined),
|
|
109419
|
+
is3d: true,
|
|
109420
|
+
});
|
|
109413
109421
|
}
|
|
109414
109422
|
withViewCoords() {
|
|
109415
109423
|
return new BranchState({ ...this._opts, forceViewCoords: true });
|
|
@@ -113861,6 +113869,8 @@ class WorldDecorations extends Branch {
|
|
|
113861
113869
|
super(new _GraphicBranch__WEBPACK_IMPORTED_MODULE_4__.GraphicBranch(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.identity, viewFlags);
|
|
113862
113870
|
// World decorations ignore all the symbology overrides for the "scene" geometry...
|
|
113863
113871
|
this.branch.symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.FeatureSymbology.Overrides();
|
|
113872
|
+
// Make all subcategories visible.
|
|
113873
|
+
this.branch.symbologyOverrides.ignoreSubCategory = true;
|
|
113864
113874
|
}
|
|
113865
113875
|
init(decs) {
|
|
113866
113876
|
this.branch.clear();
|
|
@@ -135400,7 +135410,7 @@ const computeBaseColor = `
|
|
|
135400
135410
|
// set to black if almost white and reverse white-on-white is on
|
|
135401
135411
|
bvec3 isAlmostWhite = greaterThan(surfaceColor.rgb, almostWhite);
|
|
135402
135412
|
surfaceColor.rgb = (u_reverseWhiteOnWhite && isAlmostWhite.r && isAlmostWhite.g && isAlmostWhite.b ? vec3(0.0, 0.0, 0.0) : surfaceColor.rgb);
|
|
135403
|
-
return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a);
|
|
135413
|
+
return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a * surfaceColor.a);
|
|
135404
135414
|
`;
|
|
135405
135415
|
const surfaceFlagArray = new Int32Array(12 /* SurfaceBitIndex.Count */);
|
|
135406
135416
|
/** @internal */
|
|
@@ -279575,7 +279585,7 @@ exports.executeBackendCallback = executeBackendCallback;
|
|
|
279575
279585
|
__webpack_require__.r(__webpack_exports__);
|
|
279576
279586
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
279577
279587
|
/* harmony export */ AbstractStatusBarItemUtilities: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.AbstractStatusBarItemUtilities),
|
|
279578
|
-
/* harmony export */ AbstractZoneLocation: () => (/* reexport safe */
|
|
279588
|
+
/* harmony export */ AbstractZoneLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.AbstractZoneLocation),
|
|
279579
279589
|
/* harmony export */ AlternateDateFormats: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.AlternateDateFormats),
|
|
279580
279590
|
/* harmony export */ BackstageItemType: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemType),
|
|
279581
279591
|
/* harmony export */ BackstageItemUtilities: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemUtilities),
|
|
@@ -279591,7 +279601,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279591
279601
|
/* harmony export */ DialogProperty: () => (/* reexport safe */ _appui_abstract_dialogs_DialogItem__WEBPACK_IMPORTED_MODULE_9__.DialogProperty),
|
|
279592
279602
|
/* harmony export */ DisplayMessageType: () => (/* reexport safe */ _appui_abstract_notification_MessagePresenter__WEBPACK_IMPORTED_MODULE_21__.DisplayMessageType),
|
|
279593
279603
|
/* harmony export */ FunctionKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.FunctionKey),
|
|
279594
|
-
/* harmony export */ FuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.FuzzyScore),
|
|
279595
279604
|
/* harmony export */ GenericUiEvent: () => (/* reexport safe */ _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__.GenericUiEvent),
|
|
279596
279605
|
/* harmony export */ IconSpecUtilities: () => (/* reexport safe */ _appui_abstract_utils_IconSpecUtilities__WEBPACK_IMPORTED_MODULE_37__.IconSpecUtilities),
|
|
279597
279606
|
/* harmony export */ MessageSeverity: () => (/* reexport safe */ _appui_abstract_notification_MessageSeverity__WEBPACK_IMPORTED_MODULE_22__.MessageSeverity),
|
|
@@ -279602,8 +279611,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279602
279611
|
/* harmony export */ PropertyValueFormat: () => (/* reexport safe */ _appui_abstract_properties_Value__WEBPACK_IMPORTED_MODULE_29__.PropertyValueFormat),
|
|
279603
279612
|
/* harmony export */ RelativePosition: () => (/* reexport safe */ _appui_abstract_items_RelativePosition__WEBPACK_IMPORTED_MODULE_19__.RelativePosition),
|
|
279604
279613
|
/* harmony export */ SpecialKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.SpecialKey),
|
|
279605
|
-
/* harmony export */ StagePanelLocation: () => (/* reexport safe */
|
|
279606
|
-
/* harmony export */ StagePanelSection: () => (/* reexport safe */
|
|
279614
|
+
/* harmony export */ StagePanelLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelLocation),
|
|
279615
|
+
/* harmony export */ StagePanelSection: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelSection),
|
|
279607
279616
|
/* harmony export */ StageUsage: () => (/* reexport safe */ _appui_abstract_items_StageUsage__WEBPACK_IMPORTED_MODULE_20__.StageUsage),
|
|
279608
279617
|
/* harmony export */ StandardContentLayouts: () => (/* reexport safe */ _appui_abstract_content_StandardContentLayouts__WEBPACK_IMPORTED_MODULE_8__.StandardContentLayouts),
|
|
279609
279618
|
/* harmony export */ StandardEditorNames: () => (/* reexport safe */ _appui_abstract_properties_StandardEditorNames__WEBPACK_IMPORTED_MODULE_27__.StandardEditorNames),
|
|
@@ -279626,13 +279635,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279626
279635
|
/* harmony export */ UiItemsManager: () => (/* reexport safe */ _appui_abstract_UiItemsManager__WEBPACK_IMPORTED_MODULE_2__.UiItemsManager),
|
|
279627
279636
|
/* harmony export */ UiLayoutDataProvider: () => (/* reexport safe */ _appui_abstract_dialogs_UiLayoutDataProvider__WEBPACK_IMPORTED_MODULE_10__.UiLayoutDataProvider),
|
|
279628
279637
|
/* harmony export */ UiSyncEvent: () => (/* reexport safe */ _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_40__.UiSyncEvent),
|
|
279629
|
-
/* harmony export */ WidgetState: () => (/* reexport safe */
|
|
279630
|
-
/* harmony export */ convertSimple2RegExpPattern: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.convertSimple2RegExpPattern),
|
|
279631
|
-
/* harmony export */ createMatches: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.createMatches),
|
|
279632
|
-
/* harmony export */ equalsIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.equalsIgnoreCase),
|
|
279633
|
-
/* harmony export */ fuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScore),
|
|
279634
|
-
/* harmony export */ fuzzyScoreGraceful: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGraceful),
|
|
279635
|
-
/* harmony export */ fuzzyScoreGracefulAggressive: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGracefulAggressive),
|
|
279638
|
+
/* harmony export */ WidgetState: () => (/* reexport safe */ _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_45__.WidgetState),
|
|
279636
279639
|
/* harmony export */ getClassName: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.getClassName),
|
|
279637
279640
|
/* harmony export */ isAbstractStatusBarActionItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarActionItem),
|
|
279638
279641
|
/* harmony export */ isAbstractStatusBarCustomItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarCustomItem),
|
|
@@ -279644,22 +279647,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279644
279647
|
/* harmony export */ isCustomFormattedNumberParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isCustomFormattedNumberParams),
|
|
279645
279648
|
/* harmony export */ isIconListEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isIconListEditorParams),
|
|
279646
279649
|
/* harmony export */ isInputEditorSizeParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isInputEditorSizeParams),
|
|
279647
|
-
/* harmony export */ isLowerAsciiLetter: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.isLowerAsciiLetter),
|
|
279648
|
-
/* harmony export */ isPatternInWord: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.isPatternInWord),
|
|
279649
279650
|
/* harmony export */ isStageLauncher: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.isStageLauncher),
|
|
279650
279651
|
/* harmony export */ isSuppressLabelEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isSuppressLabelEditorParams),
|
|
279651
|
-
/* harmony export */
|
|
279652
|
-
/* harmony export */ loggerCategory: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.loggerCategory),
|
|
279653
|
-
/* harmony export */ matchesCamelCase: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesCamelCase),
|
|
279654
|
-
/* harmony export */ matchesContiguousSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesContiguousSubString),
|
|
279655
|
-
/* harmony export */ matchesFuzzy: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy),
|
|
279656
|
-
/* harmony export */ matchesFuzzy2: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy2),
|
|
279657
|
-
/* harmony export */ matchesPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesPrefix),
|
|
279658
|
-
/* harmony export */ matchesStrictPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesStrictPrefix),
|
|
279659
|
-
/* harmony export */ matchesSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesSubString),
|
|
279660
|
-
/* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesWords),
|
|
279661
|
-
/* harmony export */ or: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.or),
|
|
279662
|
-
/* harmony export */ startsWithIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.startsWithIgnoreCase)
|
|
279652
|
+
/* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_42__.matchesWords)
|
|
279663
279653
|
/* harmony export */ });
|
|
279664
279654
|
/* harmony import */ var _appui_abstract_BaseUiItemsProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appui-abstract/BaseUiItemsProvider */ "../../ui/appui-abstract/lib/esm/appui-abstract/BaseUiItemsProvider.js");
|
|
279665
279655
|
/* harmony import */ var _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appui-abstract/UiAdmin */ "../../ui/appui-abstract/lib/esm/appui-abstract/UiAdmin.js");
|
|
@@ -279703,12 +279693,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279703
279693
|
/* 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");
|
|
279704
279694
|
/* 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");
|
|
279705
279695
|
/* 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");
|
|
279706
|
-
/* harmony import */ var
|
|
279707
|
-
/* harmony import */ var
|
|
279708
|
-
/* harmony import */ var
|
|
279709
|
-
/* harmony import */ var
|
|
279710
|
-
/* 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");
|
|
279711
|
-
/* 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");
|
|
279696
|
+
/* 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");
|
|
279697
|
+
/* 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");
|
|
279698
|
+
/* 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");
|
|
279699
|
+
/* 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");
|
|
279712
279700
|
/*---------------------------------------------------------------------------------------------
|
|
279713
279701
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
279714
279702
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -279758,8 +279746,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279758
279746
|
|
|
279759
279747
|
|
|
279760
279748
|
|
|
279761
|
-
|
|
279762
|
-
|
|
279763
279749
|
|
|
279764
279750
|
|
|
279765
279751
|
|
|
@@ -279924,8 +279910,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279924
279910
|
/* harmony export */ UiAdmin: () => (/* binding */ UiAdmin)
|
|
279925
279911
|
/* harmony export */ });
|
|
279926
279912
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
279927
|
-
/* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
|
|
279928
|
-
/* harmony import */ var _utils_UiError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
|
|
279929
279913
|
/*---------------------------------------------------------------------------------------------
|
|
279930
279914
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
279931
279915
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -279934,8 +279918,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
279934
279918
|
* @module UiAdmin
|
|
279935
279919
|
*/
|
|
279936
279920
|
|
|
279937
|
-
|
|
279938
|
-
|
|
279939
279921
|
/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.
|
|
279940
279922
|
* @public
|
|
279941
279923
|
*/
|
|
@@ -279950,8 +279932,11 @@ class UiAdmin {
|
|
|
279950
279932
|
}
|
|
279951
279933
|
/** The MessagePresenter used to display messages. */
|
|
279952
279934
|
static get messagePresenter() {
|
|
279953
|
-
if (!UiAdmin._messagePresenter)
|
|
279954
|
-
|
|
279935
|
+
if (!UiAdmin._messagePresenter) {
|
|
279936
|
+
const error = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, "UiAdmin.messagePresenter not set");
|
|
279937
|
+
error.category = "messagePresenter";
|
|
279938
|
+
throw error;
|
|
279939
|
+
}
|
|
279955
279940
|
return UiAdmin._messagePresenter;
|
|
279956
279941
|
}
|
|
279957
279942
|
static set messagePresenter(mp) {
|
|
@@ -280165,7 +280150,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
280165
280150
|
/* harmony export */ UiItemsManager: () => (/* binding */ UiItemsManager)
|
|
280166
280151
|
/* harmony export */ });
|
|
280167
280152
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
280168
|
-
/* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
|
|
280169
280153
|
/*---------------------------------------------------------------------------------------------
|
|
280170
280154
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
280171
280155
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -280175,7 +280159,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
280175
280159
|
* @module UiItemsProvider
|
|
280176
280160
|
*/
|
|
280177
280161
|
|
|
280178
|
-
|
|
280162
|
+
const loggerCategory = "appui-abstract.UiItemsManager";
|
|
280179
280163
|
/** Action taken by the application on item provided by a UiItemsProvider
|
|
280180
280164
|
* @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.
|
|
280181
280165
|
*/
|
|
@@ -280224,11 +280208,11 @@ class UiItemsManager {
|
|
|
280224
280208
|
static register(uiProvider, overrides) {
|
|
280225
280209
|
const providerId = overrides?.providerId ?? uiProvider.id;
|
|
280226
280210
|
if (UiItemsManager.getUiItemsProvider(providerId)) {
|
|
280227
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(
|
|
280211
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${providerId}) is already loaded`);
|
|
280228
280212
|
}
|
|
280229
280213
|
else {
|
|
280230
280214
|
UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });
|
|
280231
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(
|
|
280215
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);
|
|
280232
280216
|
UiItemsManager.sendRegisteredEvent({ providerId });
|
|
280233
280217
|
}
|
|
280234
280218
|
}
|
|
@@ -280239,7 +280223,7 @@ class UiItemsManager {
|
|
|
280239
280223
|
return;
|
|
280240
280224
|
provider.onUnregister && provider.onUnregister();
|
|
280241
280225
|
UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);
|
|
280242
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(
|
|
280226
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${uiProviderId}) unloaded`);
|
|
280243
280227
|
// trigger a refresh of the ui
|
|
280244
280228
|
UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId });
|
|
280245
280229
|
}
|
|
@@ -280629,7 +280613,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
280629
280613
|
* @module Utilities
|
|
280630
280614
|
*/
|
|
280631
280615
|
/** Enumeration for Function Keys
|
|
280632
|
-
* @public
|
|
280616
|
+
* @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
|
|
280633
280617
|
*/
|
|
280634
280618
|
var FunctionKey;
|
|
280635
280619
|
(function (FunctionKey) {
|
|
@@ -280647,7 +280631,7 @@ var FunctionKey;
|
|
|
280647
280631
|
FunctionKey["F12"] = "F12";
|
|
280648
280632
|
})(FunctionKey || (FunctionKey = {}));
|
|
280649
280633
|
/** Enumeration for Special Keys
|
|
280650
|
-
* @public
|
|
280634
|
+
* @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
|
|
280651
280635
|
*/
|
|
280652
280636
|
var SpecialKey;
|
|
280653
280637
|
(function (SpecialKey) {
|
|
@@ -280675,9 +280659,10 @@ var SpecialKey;
|
|
|
280675
280659
|
SpecialKey["Decimal"] = "Decimal";
|
|
280676
280660
|
})(SpecialKey || (SpecialKey = {}));
|
|
280677
280661
|
/** Determines if a KeyboardEvent.key is an Arrow key
|
|
280678
|
-
* @public
|
|
280662
|
+
* @public @deprecated in 4.3. Please use a custom implementation moving forward.
|
|
280679
280663
|
*/
|
|
280680
280664
|
function isArrowKey(key) {
|
|
280665
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
280681
280666
|
return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);
|
|
280682
280667
|
}
|
|
280683
280668
|
|
|
@@ -282802,8 +282787,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
282802
282787
|
/** @packageDocumentation
|
|
282803
282788
|
* @module Utilities
|
|
282804
282789
|
*/
|
|
282790
|
+
/* eslint-disable deprecation/deprecation */
|
|
282805
282791
|
/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.
|
|
282806
|
-
* @public
|
|
282792
|
+
* @public @deprecated in 4.3. AppUI libraries >= 4.7.x support loading SVGs sources without prefixes, eliminating the need for these utilities.
|
|
282807
282793
|
*/
|
|
282808
282794
|
class IconSpecUtilities {
|
|
282809
282795
|
/** Create an IconSpec for an SVG loaded into web component with sprite loader
|
|
@@ -282814,7 +282800,7 @@ class IconSpecUtilities {
|
|
|
282814
282800
|
return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;
|
|
282815
282801
|
}
|
|
282816
282802
|
/** Create an IconSpec for an SVG loaded into web component with svg-loader
|
|
282817
|
-
* @public
|
|
282803
|
+
* @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
|
|
282818
282804
|
*/
|
|
282819
282805
|
static createWebComponentIconSpec(srcString) {
|
|
282820
282806
|
return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;
|
|
@@ -282830,7 +282816,7 @@ class IconSpecUtilities {
|
|
|
282830
282816
|
return undefined;
|
|
282831
282817
|
}
|
|
282832
282818
|
/** Get the SVG Source from an svg-loader IconSpec
|
|
282833
|
-
* @public
|
|
282819
|
+
* @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
|
|
282834
282820
|
*/
|
|
282835
282821
|
static getWebComponentSource(iconSpec) {
|
|
282836
282822
|
if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {
|
|
@@ -282888,7 +282874,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
282888
282874
|
*/
|
|
282889
282875
|
|
|
282890
282876
|
/** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.
|
|
282891
|
-
* @public
|
|
282877
|
+
* @public @deprecated in 4.3. Use [[Bentley.BentleyError]] instead.
|
|
282892
282878
|
*/
|
|
282893
282879
|
class UiError extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError {
|
|
282894
282880
|
/** Constructs UiError using BentleyError. */
|
|
@@ -283096,23 +283082,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283096
283082
|
|
|
283097
283083
|
|
|
283098
283084
|
|
|
283099
|
-
/***/ }),
|
|
283100
|
-
|
|
283101
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js":
|
|
283102
|
-
/*!*******************************************************************************!*\
|
|
283103
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js ***!
|
|
283104
|
-
\*******************************************************************************/
|
|
283105
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
283106
|
-
|
|
283107
|
-
"use strict";
|
|
283108
|
-
__webpack_require__.r(__webpack_exports__);
|
|
283109
|
-
/*---------------------------------------------------------------------------------------------
|
|
283110
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
283111
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
283112
|
-
*--------------------------------------------------------------------------------------------*/
|
|
283113
|
-
|
|
283114
|
-
|
|
283115
|
-
|
|
283116
283085
|
/***/ }),
|
|
283117
283086
|
|
|
283118
283087
|
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js":
|
|
@@ -283124,24 +283093,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283124
283093
|
"use strict";
|
|
283125
283094
|
__webpack_require__.r(__webpack_exports__);
|
|
283126
283095
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
283127
|
-
/* harmony export */
|
|
283128
|
-
/* harmony export */ createMatches: () => (/* binding */ createMatches),
|
|
283129
|
-
/* harmony export */ fuzzyScore: () => (/* binding */ fuzzyScore),
|
|
283130
|
-
/* harmony export */ fuzzyScoreGraceful: () => (/* binding */ fuzzyScoreGraceful),
|
|
283131
|
-
/* harmony export */ fuzzyScoreGracefulAggressive: () => (/* binding */ fuzzyScoreGracefulAggressive),
|
|
283132
|
-
/* harmony export */ isPatternInWord: () => (/* binding */ isPatternInWord),
|
|
283133
|
-
/* harmony export */ matchesCamelCase: () => (/* binding */ matchesCamelCase),
|
|
283134
|
-
/* harmony export */ matchesContiguousSubString: () => (/* binding */ matchesContiguousSubString),
|
|
283135
|
-
/* harmony export */ matchesFuzzy: () => (/* binding */ matchesFuzzy),
|
|
283136
|
-
/* harmony export */ matchesFuzzy2: () => (/* binding */ matchesFuzzy2),
|
|
283137
|
-
/* harmony export */ matchesPrefix: () => (/* binding */ matchesPrefix),
|
|
283138
|
-
/* harmony export */ matchesStrictPrefix: () => (/* binding */ matchesStrictPrefix),
|
|
283139
|
-
/* harmony export */ matchesSubString: () => (/* binding */ matchesSubString),
|
|
283140
|
-
/* harmony export */ matchesWords: () => (/* binding */ matchesWords),
|
|
283141
|
-
/* harmony export */ or: () => (/* binding */ or)
|
|
283096
|
+
/* harmony export */ matchesWords: () => (/* binding */ matchesWords)
|
|
283142
283097
|
/* harmony export */ });
|
|
283143
|
-
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js");
|
|
283144
|
-
/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
|
|
283145
283098
|
/*---------------------------------------------------------------------------------------------
|
|
283146
283099
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
283147
283100
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -283149,100 +283102,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283149
283102
|
/** @packageDocumentation
|
|
283150
283103
|
* @module Utilities
|
|
283151
283104
|
*/
|
|
283152
|
-
|
|
283153
|
-
|
|
283154
|
-
|
|
283155
|
-
|
|
283156
|
-
|
|
283157
|
-
|
|
283158
|
-
|
|
283159
|
-
* filter.
|
|
283160
|
-
* @internal
|
|
283161
|
-
*/
|
|
283162
|
-
function or(...filter) {
|
|
283163
|
-
return function (word, wordToMatchAgainst) {
|
|
283164
|
-
for (let i = 0, len = filter.length; i < len; i++) {
|
|
283165
|
-
const match = filter[i](word, wordToMatchAgainst);
|
|
283166
|
-
if (match) {
|
|
283167
|
-
return match;
|
|
283168
|
-
}
|
|
283169
|
-
}
|
|
283170
|
-
return null;
|
|
283171
|
-
};
|
|
283172
|
-
}
|
|
283173
|
-
// Prefix
|
|
283174
|
-
/** @internal */
|
|
283175
|
-
const matchesStrictPrefix = _matchesPrefix.bind(undefined, false);
|
|
283176
|
-
/** @internal */
|
|
283177
|
-
const matchesPrefix = _matchesPrefix.bind(undefined, true);
|
|
283178
|
-
function _matchesPrefix(ignoreCase, word, wordToMatchAgainst) {
|
|
283179
|
-
if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {
|
|
283180
|
-
return null;
|
|
283181
|
-
}
|
|
283182
|
-
let matches;
|
|
283183
|
-
if (ignoreCase) {
|
|
283184
|
-
matches = _strings__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase(wordToMatchAgainst, word);
|
|
283185
|
-
}
|
|
283186
|
-
else {
|
|
283187
|
-
matches = wordToMatchAgainst.indexOf(word) === 0;
|
|
283188
|
-
}
|
|
283189
|
-
if (!matches) {
|
|
283190
|
-
return null;
|
|
283191
|
-
}
|
|
283192
|
-
return word.length > 0 ? [{ start: 0, end: word.length }] : [];
|
|
283193
|
-
}
|
|
283194
|
-
// Contiguous Substring
|
|
283195
|
-
/** @internal */
|
|
283196
|
-
function matchesContiguousSubString(word, wordToMatchAgainst) {
|
|
283197
|
-
const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());
|
|
283198
|
-
if (index === -1) {
|
|
283199
|
-
return null;
|
|
283200
|
-
}
|
|
283201
|
-
return [{ start: index, end: index + word.length }];
|
|
283202
|
-
}
|
|
283203
|
-
// Substring
|
|
283204
|
-
/**
|
|
283205
|
-
* Return case insensitive substring matches
|
|
283206
|
-
* @param word filter string
|
|
283207
|
-
* @param wordToMatchAgainst string to test
|
|
283208
|
-
* @internal
|
|
283209
|
-
*/
|
|
283210
|
-
function matchesSubString(word, wordToMatchAgainst) {
|
|
283211
|
-
return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);
|
|
283212
|
-
}
|
|
283213
|
-
function _matchesSubString(word, wordToMatchAgainst, i, j) {
|
|
283214
|
-
if (i === word.length) {
|
|
283215
|
-
return [];
|
|
283216
|
-
}
|
|
283217
|
-
else if (j === wordToMatchAgainst.length) {
|
|
283218
|
-
return null;
|
|
283219
|
-
}
|
|
283220
|
-
else {
|
|
283221
|
-
if (word[i] === wordToMatchAgainst[j]) {
|
|
283222
|
-
let result = null;
|
|
283223
|
-
if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {
|
|
283224
|
-
return join({ start: j, end: j + 1 }, result);
|
|
283225
|
-
}
|
|
283226
|
-
return null;
|
|
283227
|
-
}
|
|
283228
|
-
return _matchesSubString(word, wordToMatchAgainst, i, j + 1);
|
|
283229
|
-
}
|
|
283230
|
-
}
|
|
283231
|
-
// CamelCase
|
|
283232
|
-
function isLower(code) {
|
|
283233
|
-
return 97 /* CharCode.a */ <= code && code <= 122 /* CharCode.z */;
|
|
283234
|
-
}
|
|
283235
|
-
function isUpper(code) {
|
|
283236
|
-
return 65 /* CharCode.A */ <= code && code <= 90 /* CharCode.Z */;
|
|
283237
|
-
}
|
|
283238
|
-
function isNumber(code) {
|
|
283239
|
-
return 48 /* CharCode.Digit0 */ <= code && code <= 57 /* CharCode.Digit9 */;
|
|
283240
|
-
}
|
|
283105
|
+
var CharCode;
|
|
283106
|
+
(function (CharCode) {
|
|
283107
|
+
CharCode[CharCode["Space"] = 32] = "Space";
|
|
283108
|
+
CharCode[CharCode["Tab"] = 9] = "Tab";
|
|
283109
|
+
CharCode[CharCode["LineFeed"] = 10] = "LineFeed";
|
|
283110
|
+
CharCode[CharCode["CarriageReturn"] = 13] = "CarriageReturn";
|
|
283111
|
+
})(CharCode || (CharCode = {}));
|
|
283241
283112
|
function isWhitespace(code) {
|
|
283242
|
-
return (code ===
|
|
283243
|
-
|| code ===
|
|
283244
|
-
|| code ===
|
|
283245
|
-
|| code ===
|
|
283113
|
+
return (code === CharCode.Space
|
|
283114
|
+
|| code === CharCode.Tab
|
|
283115
|
+
|| code === CharCode.LineFeed
|
|
283116
|
+
|| code === CharCode.CarriageReturn);
|
|
283246
283117
|
}
|
|
283247
283118
|
const wordSeparators = new Set();
|
|
283248
283119
|
'`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'
|
|
@@ -283254,9 +283125,6 @@ function isWordSeparator(code) {
|
|
|
283254
283125
|
function charactersMatch(codeA, codeB) {
|
|
283255
283126
|
return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));
|
|
283256
283127
|
}
|
|
283257
|
-
function isAlphanumeric(code) {
|
|
283258
|
-
return isLower(code) || isUpper(code) || isNumber(code);
|
|
283259
|
-
}
|
|
283260
283128
|
function join(head, tail) {
|
|
283261
283129
|
if (tail.length === 0) {
|
|
283262
283130
|
tail = [head];
|
|
@@ -283269,128 +283137,6 @@ function join(head, tail) {
|
|
|
283269
283137
|
}
|
|
283270
283138
|
return tail;
|
|
283271
283139
|
}
|
|
283272
|
-
function nextAnchor(camelCaseWord, start) {
|
|
283273
|
-
for (let i = start; i < camelCaseWord.length; i++) {
|
|
283274
|
-
const c = camelCaseWord.charCodeAt(i);
|
|
283275
|
-
if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {
|
|
283276
|
-
return i;
|
|
283277
|
-
}
|
|
283278
|
-
}
|
|
283279
|
-
return camelCaseWord.length;
|
|
283280
|
-
}
|
|
283281
|
-
function _matchesCamelCase(word, camelCaseWord, i, j) {
|
|
283282
|
-
if (i === word.length) {
|
|
283283
|
-
return [];
|
|
283284
|
-
}
|
|
283285
|
-
else if (j === camelCaseWord.length) {
|
|
283286
|
-
return null;
|
|
283287
|
-
}
|
|
283288
|
-
else if (word[i] !== camelCaseWord[j].toLowerCase()) {
|
|
283289
|
-
return null;
|
|
283290
|
-
}
|
|
283291
|
-
else {
|
|
283292
|
-
let result = null;
|
|
283293
|
-
let nextUpperIndex = j + 1;
|
|
283294
|
-
result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);
|
|
283295
|
-
while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {
|
|
283296
|
-
result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);
|
|
283297
|
-
nextUpperIndex++;
|
|
283298
|
-
}
|
|
283299
|
-
return result === null ? null : join({ start: j, end: j + 1 }, result);
|
|
283300
|
-
}
|
|
283301
|
-
}
|
|
283302
|
-
// Heuristic to avoid computing camel case matcher for words that don't
|
|
283303
|
-
// look like camelCaseWords.
|
|
283304
|
-
function analyzeCamelCaseWord(word) {
|
|
283305
|
-
let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;
|
|
283306
|
-
for (let i = 0; i < word.length; i++) {
|
|
283307
|
-
code = word.charCodeAt(i);
|
|
283308
|
-
if (isUpper(code)) {
|
|
283309
|
-
upper++;
|
|
283310
|
-
}
|
|
283311
|
-
if (isLower(code)) {
|
|
283312
|
-
lower++;
|
|
283313
|
-
}
|
|
283314
|
-
if (isAlphanumeric(code)) {
|
|
283315
|
-
alpha++;
|
|
283316
|
-
}
|
|
283317
|
-
if (isNumber(code)) {
|
|
283318
|
-
numeric++;
|
|
283319
|
-
}
|
|
283320
|
-
}
|
|
283321
|
-
const upperPercent = upper / word.length;
|
|
283322
|
-
const lowerPercent = lower / word.length;
|
|
283323
|
-
const alphaPercent = alpha / word.length;
|
|
283324
|
-
const numericPercent = numeric / word.length;
|
|
283325
|
-
return { upperPercent, lowerPercent, alphaPercent, numericPercent };
|
|
283326
|
-
}
|
|
283327
|
-
function isUpperCaseWord(analysis) {
|
|
283328
|
-
const { upperPercent, lowerPercent } = analysis;
|
|
283329
|
-
return lowerPercent === 0 && upperPercent > 0.6;
|
|
283330
|
-
}
|
|
283331
|
-
function isCamelCaseWord(analysis) {
|
|
283332
|
-
const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;
|
|
283333
|
-
return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;
|
|
283334
|
-
}
|
|
283335
|
-
// Heuristic to avoid computing camel case matcher for words that don't
|
|
283336
|
-
// look like camel case patterns.
|
|
283337
|
-
function isCamelCasePattern(word) {
|
|
283338
|
-
let upper = 0, lower = 0, code = 0, whitespace = 0;
|
|
283339
|
-
for (let i = 0; i < word.length; i++) {
|
|
283340
|
-
code = word.charCodeAt(i);
|
|
283341
|
-
if (isUpper(code)) {
|
|
283342
|
-
upper++;
|
|
283343
|
-
}
|
|
283344
|
-
if (isLower(code)) {
|
|
283345
|
-
lower++;
|
|
283346
|
-
}
|
|
283347
|
-
if (isWhitespace(code)) {
|
|
283348
|
-
whitespace++;
|
|
283349
|
-
}
|
|
283350
|
-
}
|
|
283351
|
-
if ((upper === 0 || lower === 0) && whitespace === 0) {
|
|
283352
|
-
return word.length <= 30;
|
|
283353
|
-
}
|
|
283354
|
-
else {
|
|
283355
|
-
return upper <= 5;
|
|
283356
|
-
}
|
|
283357
|
-
}
|
|
283358
|
-
/**
|
|
283359
|
-
* Return matches treating "camelCase" words separately. For example the filter string "gp" would return two matches in string "Git Pull".
|
|
283360
|
-
* @param word filter string
|
|
283361
|
-
* @param wordToMatchAgainst string to test
|
|
283362
|
-
* @internal
|
|
283363
|
-
*/
|
|
283364
|
-
function matchesCamelCase(word, camelCaseWord) {
|
|
283365
|
-
if (!camelCaseWord) {
|
|
283366
|
-
return null;
|
|
283367
|
-
}
|
|
283368
|
-
camelCaseWord = camelCaseWord.trim();
|
|
283369
|
-
if (camelCaseWord.length === 0) {
|
|
283370
|
-
return null;
|
|
283371
|
-
}
|
|
283372
|
-
if (!isCamelCasePattern(camelCaseWord)) {
|
|
283373
|
-
return null;
|
|
283374
|
-
}
|
|
283375
|
-
if (camelCaseWord.length > 60) {
|
|
283376
|
-
return null;
|
|
283377
|
-
}
|
|
283378
|
-
const analysis = analyzeCamelCaseWord(camelCaseWord);
|
|
283379
|
-
if (!isCamelCaseWord(analysis)) {
|
|
283380
|
-
// istanbul ignore next
|
|
283381
|
-
if (!isUpperCaseWord(analysis)) {
|
|
283382
|
-
return null;
|
|
283383
|
-
}
|
|
283384
|
-
camelCaseWord = camelCaseWord.toLowerCase();
|
|
283385
|
-
}
|
|
283386
|
-
let result = null;
|
|
283387
|
-
let i = 0;
|
|
283388
|
-
word = word.toLowerCase();
|
|
283389
|
-
while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {
|
|
283390
|
-
i = nextAnchor(camelCaseWord, i + 1);
|
|
283391
|
-
}
|
|
283392
|
-
return result;
|
|
283393
|
-
}
|
|
283394
283140
|
/**
|
|
283395
283141
|
* Matches beginning of words supporting non-ASCII languages.
|
|
283396
283142
|
* @param word Filter string
|
|
@@ -283398,7 +283144,7 @@ function matchesCamelCase(word, camelCaseWord) {
|
|
|
283398
283144
|
* @param contiguous - If true the filter string must be found "contiguous" in the searched string (E.g. "pul" will match "Git: Pull").
|
|
283399
283145
|
* 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").
|
|
283400
283146
|
* Useful in cases where the target is words (e.g. command labels)
|
|
283401
|
-
* @internal
|
|
283147
|
+
* @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.
|
|
283402
283148
|
*/
|
|
283403
283149
|
function matchesWords(word, target, contiguous = false) {
|
|
283404
283150
|
if (!target || target.length === 0) {
|
|
@@ -283446,898 +283192,6 @@ function nextWord(word, start) {
|
|
|
283446
283192
|
}
|
|
283447
283193
|
return word.length;
|
|
283448
283194
|
}
|
|
283449
|
-
// Fuzzy
|
|
283450
|
-
const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);
|
|
283451
|
-
const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);
|
|
283452
|
-
const fuzzyRegExpCache = new _map__WEBPACK_IMPORTED_MODULE_0__.LRUCache(10000); // bounded to 10000 elements
|
|
283453
|
-
/**
|
|
283454
|
-
* Match pattern against word in a fuzzy way. This will only return a single match.
|
|
283455
|
-
* @internal
|
|
283456
|
-
*/
|
|
283457
|
-
function matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching = false) {
|
|
283458
|
-
// istanbul ignore next
|
|
283459
|
-
if (typeof word !== "string" || typeof wordToMatchAgainst !== "string") {
|
|
283460
|
-
return null; // return early for invalid input
|
|
283461
|
-
}
|
|
283462
|
-
// Form RegExp for wildcard matches
|
|
283463
|
-
let regexp = fuzzyRegExpCache.get(word);
|
|
283464
|
-
if (!regexp) {
|
|
283465
|
-
regexp = new RegExp(_strings__WEBPACK_IMPORTED_MODULE_1__.convertSimple2RegExpPattern(word), "i");
|
|
283466
|
-
fuzzyRegExpCache.set(word, regexp);
|
|
283467
|
-
}
|
|
283468
|
-
// RegExp Filter
|
|
283469
|
-
const match = regexp.exec(wordToMatchAgainst);
|
|
283470
|
-
if (match) {
|
|
283471
|
-
return [{ start: match.index, end: match.index + match[0].length }];
|
|
283472
|
-
}
|
|
283473
|
-
// Default Filter
|
|
283474
|
-
return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);
|
|
283475
|
-
}
|
|
283476
|
-
/**
|
|
283477
|
-
* Match pattern against word in a fuzzy way. As in IntelliSense and faster and more
|
|
283478
|
-
* powerful than `matchesFuzzy`. This will only return a single match.
|
|
283479
|
-
* @internal
|
|
283480
|
-
*/
|
|
283481
|
-
function matchesFuzzy2(pattern, word) {
|
|
283482
|
-
const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);
|
|
283483
|
-
return score ? createMatches(score) : null;
|
|
283484
|
-
}
|
|
283485
|
-
// #region --- fuzzyScore ---
|
|
283486
|
-
/**
|
|
283487
|
-
* @internal
|
|
283488
|
-
*/
|
|
283489
|
-
function createMatches(score) {
|
|
283490
|
-
// istanbul ignore next
|
|
283491
|
-
if (typeof score === "undefined") {
|
|
283492
|
-
return [];
|
|
283493
|
-
}
|
|
283494
|
-
const matches = score[1].toString(2);
|
|
283495
|
-
const wordStart = score[2];
|
|
283496
|
-
const res = [];
|
|
283497
|
-
for (let pos = wordStart; pos < _maxLen; pos++) {
|
|
283498
|
-
if (matches[matches.length - (pos + 1)] === "1") {
|
|
283499
|
-
const last = res[res.length - 1];
|
|
283500
|
-
if (last && last.end === pos) {
|
|
283501
|
-
last.end = pos + 1;
|
|
283502
|
-
}
|
|
283503
|
-
else {
|
|
283504
|
-
res.push({ start: pos, end: pos + 1 });
|
|
283505
|
-
}
|
|
283506
|
-
}
|
|
283507
|
-
}
|
|
283508
|
-
return res;
|
|
283509
|
-
}
|
|
283510
|
-
const _maxLen = 128;
|
|
283511
|
-
function initTable() {
|
|
283512
|
-
const table = [];
|
|
283513
|
-
const row = [0];
|
|
283514
|
-
for (let i = 1; i <= _maxLen; i++) {
|
|
283515
|
-
row.push(-i);
|
|
283516
|
-
}
|
|
283517
|
-
for (let i = 0; i <= _maxLen; i++) {
|
|
283518
|
-
const thisRow = row.slice(0);
|
|
283519
|
-
thisRow[0] = -i;
|
|
283520
|
-
table.push(thisRow);
|
|
283521
|
-
}
|
|
283522
|
-
return table;
|
|
283523
|
-
}
|
|
283524
|
-
const _table = initTable();
|
|
283525
|
-
const _scores = initTable();
|
|
283526
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
283527
|
-
const _arrows = initTable();
|
|
283528
|
-
const _debug = false;
|
|
283529
|
-
function isSeparatorAtPos(value, index) {
|
|
283530
|
-
if (index < 0 || index >= value.length) {
|
|
283531
|
-
return false;
|
|
283532
|
-
}
|
|
283533
|
-
const code = value.charCodeAt(index);
|
|
283534
|
-
switch (code) {
|
|
283535
|
-
case 95 /* CharCode.Underline */:
|
|
283536
|
-
case 45 /* CharCode.Dash */:
|
|
283537
|
-
case 46 /* CharCode.Period */:
|
|
283538
|
-
case 32 /* CharCode.Space */:
|
|
283539
|
-
case 47 /* CharCode.Slash */:
|
|
283540
|
-
case 92 /* CharCode.Backslash */:
|
|
283541
|
-
case 39 /* CharCode.SingleQuote */:
|
|
283542
|
-
case 34 /* CharCode.DoubleQuote */:
|
|
283543
|
-
case 58 /* CharCode.Colon */:
|
|
283544
|
-
case 36 /* CharCode.DollarSign */:
|
|
283545
|
-
return true;
|
|
283546
|
-
default:
|
|
283547
|
-
return false;
|
|
283548
|
-
}
|
|
283549
|
-
}
|
|
283550
|
-
function isWhitespaceAtPos(value, index) {
|
|
283551
|
-
if (index < 0 || index >= value.length) {
|
|
283552
|
-
return false;
|
|
283553
|
-
}
|
|
283554
|
-
const code = value.charCodeAt(index);
|
|
283555
|
-
switch (code) {
|
|
283556
|
-
// istanbul ignore next
|
|
283557
|
-
case 32 /* CharCode.Space */:
|
|
283558
|
-
case 9 /* CharCode.Tab */:
|
|
283559
|
-
return true;
|
|
283560
|
-
default:
|
|
283561
|
-
return false;
|
|
283562
|
-
}
|
|
283563
|
-
}
|
|
283564
|
-
function isUpperCaseAtPos(pos, word, wordLow) {
|
|
283565
|
-
return word[pos] !== wordLow[pos];
|
|
283566
|
-
}
|
|
283567
|
-
/** @internal */
|
|
283568
|
-
function isPatternInWord(patternLow, patternPos, patternLen, wordLow, wordPos, wordLen) {
|
|
283569
|
-
while (patternPos < patternLen && wordPos < wordLen) {
|
|
283570
|
-
if (patternLow[patternPos] === wordLow[wordPos]) {
|
|
283571
|
-
patternPos += 1;
|
|
283572
|
-
}
|
|
283573
|
-
wordPos += 1;
|
|
283574
|
-
}
|
|
283575
|
-
return patternPos === patternLen; // pattern must be exhausted
|
|
283576
|
-
}
|
|
283577
|
-
/** @internal */
|
|
283578
|
-
var FuzzyScore;
|
|
283579
|
-
(function (FuzzyScore) {
|
|
283580
|
-
/**
|
|
283581
|
-
* No matches and value `-100`
|
|
283582
|
-
* @internal
|
|
283583
|
-
*/
|
|
283584
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
283585
|
-
FuzzyScore.Default = Object.freeze([-100, 0, 0]);
|
|
283586
|
-
// istanbul ignore next
|
|
283587
|
-
/** @internal */
|
|
283588
|
-
function isDefault(score) {
|
|
283589
|
-
return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);
|
|
283590
|
-
}
|
|
283591
|
-
FuzzyScore.isDefault = isDefault;
|
|
283592
|
-
})(FuzzyScore || (FuzzyScore = {}));
|
|
283593
|
-
/** @internal */
|
|
283594
|
-
function fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wordStart, firstMatchCanBeWeak) {
|
|
283595
|
-
// istanbul ignore next
|
|
283596
|
-
const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;
|
|
283597
|
-
const wordLen = word.length > _maxLen ? _maxLen : word.length;
|
|
283598
|
-
if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {
|
|
283599
|
-
return undefined;
|
|
283600
|
-
}
|
|
283601
|
-
// Run a simple check if the characters of pattern occur
|
|
283602
|
-
// (in order) at all in word. If that isn't the case we
|
|
283603
|
-
// stop because no match will be possible
|
|
283604
|
-
if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {
|
|
283605
|
-
return undefined;
|
|
283606
|
-
}
|
|
283607
|
-
let row = 1;
|
|
283608
|
-
let column = 1;
|
|
283609
|
-
let patternPos = patternStart;
|
|
283610
|
-
let wordPos = wordStart;
|
|
283611
|
-
let hasStrongFirstMatch = false;
|
|
283612
|
-
// There will be a match, fill in tables
|
|
283613
|
-
for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {
|
|
283614
|
-
for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {
|
|
283615
|
-
const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);
|
|
283616
|
-
if (patternPos === patternStart && score > 1) {
|
|
283617
|
-
hasStrongFirstMatch = true;
|
|
283618
|
-
}
|
|
283619
|
-
_scores[row][column] = score;
|
|
283620
|
-
const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);
|
|
283621
|
-
const top = _table[row - 1][column] + -1;
|
|
283622
|
-
const left = _table[row][column - 1] + -1;
|
|
283623
|
-
if (left >= top) {
|
|
283624
|
-
// left or diag
|
|
283625
|
-
if (left > diag) {
|
|
283626
|
-
_table[row][column] = left;
|
|
283627
|
-
_arrows[row][column] = 4 /* Arrow.Left */;
|
|
283628
|
-
}
|
|
283629
|
-
else if (left === diag) {
|
|
283630
|
-
_table[row][column] = left;
|
|
283631
|
-
_arrows[row][column] = 4 /* Arrow.Left */ | 2 /* Arrow.Diag */;
|
|
283632
|
-
}
|
|
283633
|
-
else {
|
|
283634
|
-
_table[row][column] = diag;
|
|
283635
|
-
_arrows[row][column] = 2 /* Arrow.Diag */;
|
|
283636
|
-
}
|
|
283637
|
-
}
|
|
283638
|
-
else {
|
|
283639
|
-
// top or diag
|
|
283640
|
-
if (top > diag) {
|
|
283641
|
-
_table[row][column] = top;
|
|
283642
|
-
_arrows[row][column] = 1 /* Arrow.Top */;
|
|
283643
|
-
}
|
|
283644
|
-
else if (top === diag) {
|
|
283645
|
-
_table[row][column] = top;
|
|
283646
|
-
_arrows[row][column] = 1 /* Arrow.Top */ | 2 /* Arrow.Diag */;
|
|
283647
|
-
}
|
|
283648
|
-
else {
|
|
283649
|
-
_table[row][column] = diag;
|
|
283650
|
-
_arrows[row][column] = 2 /* Arrow.Diag */;
|
|
283651
|
-
}
|
|
283652
|
-
}
|
|
283653
|
-
}
|
|
283654
|
-
}
|
|
283655
|
-
if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {
|
|
283656
|
-
return undefined;
|
|
283657
|
-
}
|
|
283658
|
-
_matchesCount = 0;
|
|
283659
|
-
_topScore = -100;
|
|
283660
|
-
_wordStart = wordStart;
|
|
283661
|
-
_firstMatchCanBeWeak = firstMatchCanBeWeak;
|
|
283662
|
-
_findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);
|
|
283663
|
-
if (_matchesCount === 0) {
|
|
283664
|
-
return undefined;
|
|
283665
|
-
}
|
|
283666
|
-
return [_topScore, _topMatch2, wordStart];
|
|
283667
|
-
}
|
|
283668
|
-
function _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos) {
|
|
283669
|
-
if (patternLow[patternPos] !== wordLow[wordPos]) {
|
|
283670
|
-
return -1;
|
|
283671
|
-
}
|
|
283672
|
-
if (wordPos === (patternPos - patternStart)) {
|
|
283673
|
-
// common prefix: `foobar <-> foobaz`
|
|
283674
|
-
// ^^^^^
|
|
283675
|
-
if (pattern[patternPos] === word[wordPos]) {
|
|
283676
|
-
return 7;
|
|
283677
|
-
}
|
|
283678
|
-
else {
|
|
283679
|
-
return 5;
|
|
283680
|
-
}
|
|
283681
|
-
}
|
|
283682
|
-
else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {
|
|
283683
|
-
// hitting upper-case: `foo <-> forOthers`
|
|
283684
|
-
// ^^ ^
|
|
283685
|
-
if (pattern[patternPos] === word[wordPos]) {
|
|
283686
|
-
return 7;
|
|
283687
|
-
}
|
|
283688
|
-
else {
|
|
283689
|
-
return 5;
|
|
283690
|
-
}
|
|
283691
|
-
}
|
|
283692
|
-
else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {
|
|
283693
|
-
// hitting a separator: `. <-> foo.bar`
|
|
283694
|
-
// ^
|
|
283695
|
-
return 5;
|
|
283696
|
-
}
|
|
283697
|
-
else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {
|
|
283698
|
-
// post separator: `foo <-> bar_foo`
|
|
283699
|
-
// ^^^
|
|
283700
|
-
return 5;
|
|
283701
|
-
}
|
|
283702
|
-
else {
|
|
283703
|
-
return 1;
|
|
283704
|
-
}
|
|
283705
|
-
}
|
|
283706
|
-
let _matchesCount = 0;
|
|
283707
|
-
let _topMatch2 = 0;
|
|
283708
|
-
let _topScore = 0;
|
|
283709
|
-
let _wordStart = 0;
|
|
283710
|
-
let _firstMatchCanBeWeak = false;
|
|
283711
|
-
function _findAllMatches2(row, column, total, matches, lastMatched) {
|
|
283712
|
-
if (_matchesCount >= 10 || total < -25) {
|
|
283713
|
-
// stop when having already 10 results, or
|
|
283714
|
-
// when a potential alignment as already 5 gaps
|
|
283715
|
-
return;
|
|
283716
|
-
}
|
|
283717
|
-
let simpleMatchCount = 0;
|
|
283718
|
-
while (row > 0 && column > 0) {
|
|
283719
|
-
const score = _scores[row][column];
|
|
283720
|
-
const arrow = _arrows[row][column];
|
|
283721
|
-
if (arrow === 4 /* Arrow.Left */) {
|
|
283722
|
-
// left -> no match, skip a word character
|
|
283723
|
-
column -= 1;
|
|
283724
|
-
if (lastMatched) {
|
|
283725
|
-
total -= 5; // new gap penalty
|
|
283726
|
-
}
|
|
283727
|
-
else if (matches !== 0) {
|
|
283728
|
-
total -= 1; // gap penalty after first match
|
|
283729
|
-
}
|
|
283730
|
-
lastMatched = false;
|
|
283731
|
-
simpleMatchCount = 0;
|
|
283732
|
-
}
|
|
283733
|
-
else {
|
|
283734
|
-
/* istanbul ignore else */
|
|
283735
|
-
if (arrow & 2 /* Arrow.Diag */) {
|
|
283736
|
-
if (arrow & 4 /* Arrow.Left */) {
|
|
283737
|
-
// left
|
|
283738
|
-
_findAllMatches2(row, column - 1, matches !== 0 ? total - 1 : total, // gap penalty after first match
|
|
283739
|
-
matches, lastMatched);
|
|
283740
|
-
}
|
|
283741
|
-
// diag
|
|
283742
|
-
total += score;
|
|
283743
|
-
row -= 1;
|
|
283744
|
-
column -= 1;
|
|
283745
|
-
lastMatched = true;
|
|
283746
|
-
// match -> set a 1 at the word pos
|
|
283747
|
-
matches += 2 ** (column + _wordStart);
|
|
283748
|
-
// count simple matches and boost a row of
|
|
283749
|
-
// simple matches when they yield in a
|
|
283750
|
-
// strong match.
|
|
283751
|
-
if (score === 1) {
|
|
283752
|
-
simpleMatchCount += 1;
|
|
283753
|
-
if (row === 0 && !_firstMatchCanBeWeak) {
|
|
283754
|
-
// when the first match is a weak
|
|
283755
|
-
// match we discard it
|
|
283756
|
-
return undefined;
|
|
283757
|
-
}
|
|
283758
|
-
}
|
|
283759
|
-
else {
|
|
283760
|
-
// boost
|
|
283761
|
-
total += 1 + (simpleMatchCount * (score - 1));
|
|
283762
|
-
simpleMatchCount = 0;
|
|
283763
|
-
}
|
|
283764
|
-
}
|
|
283765
|
-
else {
|
|
283766
|
-
// istanbul ignore next
|
|
283767
|
-
return undefined;
|
|
283768
|
-
}
|
|
283769
|
-
}
|
|
283770
|
-
}
|
|
283771
|
-
total -= column >= 3 ? 9 : column * 3; // late start penalty
|
|
283772
|
-
// dynamically keep track of the current top score
|
|
283773
|
-
// and insert the current best score at head, the rest at tail
|
|
283774
|
-
_matchesCount += 1;
|
|
283775
|
-
if (total > _topScore) {
|
|
283776
|
-
_topScore = total;
|
|
283777
|
-
_topMatch2 = matches;
|
|
283778
|
-
}
|
|
283779
|
-
}
|
|
283780
|
-
// #endregion
|
|
283781
|
-
// #region --- graceful ---
|
|
283782
|
-
/** @internal */
|
|
283783
|
-
function fuzzyScoreGracefulAggressive(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
|
|
283784
|
-
return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);
|
|
283785
|
-
}
|
|
283786
|
-
/** @internal */
|
|
283787
|
-
function fuzzyScoreGraceful(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
|
|
283788
|
-
return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);
|
|
283789
|
-
}
|
|
283790
|
-
function fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, aggressive, firstMatchCanBeWeak) {
|
|
283791
|
-
let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
|
|
283792
|
-
if (top && !aggressive) {
|
|
283793
|
-
// when using the original pattern yield a result we`
|
|
283794
|
-
// return it unless we are aggressive and try to find
|
|
283795
|
-
// a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.
|
|
283796
|
-
return top;
|
|
283797
|
-
}
|
|
283798
|
-
// istanbul ignore else
|
|
283799
|
-
if (pattern.length >= 3) {
|
|
283800
|
-
// When the pattern is long enough then try a few (max 7)
|
|
283801
|
-
// permutations of the pattern to find a better match. The
|
|
283802
|
-
// permutations only swap neighbouring characters, e.g
|
|
283803
|
-
// `cnoso` becomes `conso`, `cnsoo`, `cnoos`.
|
|
283804
|
-
const tries = Math.min(7, pattern.length - 1);
|
|
283805
|
-
for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {
|
|
283806
|
-
const newPattern = nextTypoPermutation(pattern, movingPatternPos);
|
|
283807
|
-
// istanbul ignore else
|
|
283808
|
-
if (newPattern) {
|
|
283809
|
-
const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
|
|
283810
|
-
if (candidate) {
|
|
283811
|
-
candidate[0] -= 3; // permutation penalty
|
|
283812
|
-
// istanbul ignore else
|
|
283813
|
-
if (!top || candidate[0] > top[0]) {
|
|
283814
|
-
top = candidate;
|
|
283815
|
-
}
|
|
283816
|
-
}
|
|
283817
|
-
}
|
|
283818
|
-
}
|
|
283819
|
-
}
|
|
283820
|
-
return top;
|
|
283821
|
-
}
|
|
283822
|
-
function nextTypoPermutation(pattern, patternPos) {
|
|
283823
|
-
// istanbul ignore next
|
|
283824
|
-
if (patternPos + 1 >= pattern.length) {
|
|
283825
|
-
return undefined;
|
|
283826
|
-
}
|
|
283827
|
-
const swap1 = pattern[patternPos];
|
|
283828
|
-
const swap2 = pattern[patternPos + 1];
|
|
283829
|
-
// istanbul ignore next
|
|
283830
|
-
if (swap1 === swap2) {
|
|
283831
|
-
return undefined;
|
|
283832
|
-
}
|
|
283833
|
-
return pattern.slice(0, patternPos)
|
|
283834
|
-
+ swap2
|
|
283835
|
-
+ swap1
|
|
283836
|
-
+ pattern.slice(patternPos + 2);
|
|
283837
|
-
}
|
|
283838
|
-
// #endregion
|
|
283839
|
-
|
|
283840
|
-
|
|
283841
|
-
/***/ }),
|
|
283842
|
-
|
|
283843
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js":
|
|
283844
|
-
/*!**************************************************************************!*\
|
|
283845
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js ***!
|
|
283846
|
-
\**************************************************************************/
|
|
283847
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
283848
|
-
|
|
283849
|
-
"use strict";
|
|
283850
|
-
__webpack_require__.r(__webpack_exports__);
|
|
283851
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
283852
|
-
/* harmony export */ LRUCache: () => (/* binding */ LRUCache),
|
|
283853
|
-
/* harmony export */ LinkedMap: () => (/* binding */ LinkedMap)
|
|
283854
|
-
/* harmony export */ });
|
|
283855
|
-
/*---------------------------------------------------------------------------------------------
|
|
283856
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
283857
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
283858
|
-
*--------------------------------------------------------------------------------------------*/
|
|
283859
|
-
var _a;
|
|
283860
|
-
/**
|
|
283861
|
-
* @internal
|
|
283862
|
-
*/
|
|
283863
|
-
// istanbul ignore next
|
|
283864
|
-
class LinkedMap {
|
|
283865
|
-
constructor() {
|
|
283866
|
-
this[_a] = "LinkedMap";
|
|
283867
|
-
this._map = new Map();
|
|
283868
|
-
this._head = undefined;
|
|
283869
|
-
this._tail = undefined;
|
|
283870
|
-
this._size = 0;
|
|
283871
|
-
this._state = 0;
|
|
283872
|
-
}
|
|
283873
|
-
clear() {
|
|
283874
|
-
this._map.clear();
|
|
283875
|
-
this._head = undefined;
|
|
283876
|
-
this._tail = undefined;
|
|
283877
|
-
this._size = 0;
|
|
283878
|
-
this._state++;
|
|
283879
|
-
}
|
|
283880
|
-
isEmpty() {
|
|
283881
|
-
return !this._head && !this._tail;
|
|
283882
|
-
}
|
|
283883
|
-
get size() {
|
|
283884
|
-
return this._size;
|
|
283885
|
-
}
|
|
283886
|
-
get first() {
|
|
283887
|
-
return this._head?.value;
|
|
283888
|
-
}
|
|
283889
|
-
get last() {
|
|
283890
|
-
return this._tail?.value;
|
|
283891
|
-
}
|
|
283892
|
-
has(key) {
|
|
283893
|
-
return this._map.has(key);
|
|
283894
|
-
}
|
|
283895
|
-
get(key, touch = 0 /* Touch.None */) {
|
|
283896
|
-
const item = this._map.get(key);
|
|
283897
|
-
if (!item) {
|
|
283898
|
-
return undefined;
|
|
283899
|
-
}
|
|
283900
|
-
if (touch !== 0 /* Touch.None */) {
|
|
283901
|
-
this.touch(item, touch);
|
|
283902
|
-
}
|
|
283903
|
-
return item.value;
|
|
283904
|
-
}
|
|
283905
|
-
set(key, value, touch = 0 /* Touch.None */) {
|
|
283906
|
-
let item = this._map.get(key);
|
|
283907
|
-
if (item) {
|
|
283908
|
-
item.value = value;
|
|
283909
|
-
if (touch !== 0 /* Touch.None */) {
|
|
283910
|
-
this.touch(item, touch);
|
|
283911
|
-
}
|
|
283912
|
-
}
|
|
283913
|
-
else {
|
|
283914
|
-
item = { key, value, next: undefined, previous: undefined };
|
|
283915
|
-
switch (touch) {
|
|
283916
|
-
case 0 /* Touch.None */:
|
|
283917
|
-
this.addItemLast(item);
|
|
283918
|
-
break;
|
|
283919
|
-
case 1 /* Touch.AsOld */:
|
|
283920
|
-
this.addItemFirst(item);
|
|
283921
|
-
break;
|
|
283922
|
-
case 2 /* Touch.AsNew */:
|
|
283923
|
-
this.addItemLast(item);
|
|
283924
|
-
break;
|
|
283925
|
-
default:
|
|
283926
|
-
this.addItemLast(item);
|
|
283927
|
-
break;
|
|
283928
|
-
}
|
|
283929
|
-
this._map.set(key, item);
|
|
283930
|
-
this._size++;
|
|
283931
|
-
}
|
|
283932
|
-
return this;
|
|
283933
|
-
}
|
|
283934
|
-
delete(key) {
|
|
283935
|
-
return !!this.remove(key);
|
|
283936
|
-
}
|
|
283937
|
-
remove(key) {
|
|
283938
|
-
const item = this._map.get(key);
|
|
283939
|
-
if (!item) {
|
|
283940
|
-
return undefined;
|
|
283941
|
-
}
|
|
283942
|
-
this._map.delete(key);
|
|
283943
|
-
this.removeItem(item);
|
|
283944
|
-
this._size--;
|
|
283945
|
-
return item.value;
|
|
283946
|
-
}
|
|
283947
|
-
shift() {
|
|
283948
|
-
if (!this._head && !this._tail) {
|
|
283949
|
-
return undefined;
|
|
283950
|
-
}
|
|
283951
|
-
if (!this._head || !this._tail) {
|
|
283952
|
-
throw new Error("Invalid list");
|
|
283953
|
-
}
|
|
283954
|
-
const item = this._head;
|
|
283955
|
-
this._map.delete(item.key);
|
|
283956
|
-
this.removeItem(item);
|
|
283957
|
-
this._size--;
|
|
283958
|
-
return item.value;
|
|
283959
|
-
}
|
|
283960
|
-
forEach(callbackfn, thisArg) {
|
|
283961
|
-
const state = this._state;
|
|
283962
|
-
let current = this._head;
|
|
283963
|
-
while (current) {
|
|
283964
|
-
if (thisArg) {
|
|
283965
|
-
callbackfn.bind(thisArg)(current.value, current.key, this);
|
|
283966
|
-
}
|
|
283967
|
-
else {
|
|
283968
|
-
callbackfn(current.value, current.key, this);
|
|
283969
|
-
}
|
|
283970
|
-
if (this._state !== state) {
|
|
283971
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
283972
|
-
}
|
|
283973
|
-
current = current.next;
|
|
283974
|
-
}
|
|
283975
|
-
}
|
|
283976
|
-
keys() {
|
|
283977
|
-
const map = this;
|
|
283978
|
-
const state = this._state;
|
|
283979
|
-
let current = this._head;
|
|
283980
|
-
const iterator = {
|
|
283981
|
-
[Symbol.iterator]() {
|
|
283982
|
-
return iterator;
|
|
283983
|
-
},
|
|
283984
|
-
next() {
|
|
283985
|
-
if (map._state !== state) {
|
|
283986
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
283987
|
-
}
|
|
283988
|
-
if (current) {
|
|
283989
|
-
const result = { value: current.key, done: false };
|
|
283990
|
-
current = current.next;
|
|
283991
|
-
return result;
|
|
283992
|
-
}
|
|
283993
|
-
else {
|
|
283994
|
-
return { value: undefined, done: true };
|
|
283995
|
-
}
|
|
283996
|
-
},
|
|
283997
|
-
};
|
|
283998
|
-
return iterator;
|
|
283999
|
-
}
|
|
284000
|
-
values() {
|
|
284001
|
-
const map = this;
|
|
284002
|
-
const state = this._state;
|
|
284003
|
-
let current = this._head;
|
|
284004
|
-
const iterator = {
|
|
284005
|
-
[Symbol.iterator]() {
|
|
284006
|
-
return iterator;
|
|
284007
|
-
},
|
|
284008
|
-
next() {
|
|
284009
|
-
if (map._state !== state) {
|
|
284010
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
284011
|
-
}
|
|
284012
|
-
if (current) {
|
|
284013
|
-
const result = { value: current.value, done: false };
|
|
284014
|
-
current = current.next;
|
|
284015
|
-
return result;
|
|
284016
|
-
}
|
|
284017
|
-
else {
|
|
284018
|
-
return { value: undefined, done: true };
|
|
284019
|
-
}
|
|
284020
|
-
},
|
|
284021
|
-
};
|
|
284022
|
-
return iterator;
|
|
284023
|
-
}
|
|
284024
|
-
entries() {
|
|
284025
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
284026
|
-
const map = this;
|
|
284027
|
-
const state = this._state;
|
|
284028
|
-
let current = this._head;
|
|
284029
|
-
const iterator = {
|
|
284030
|
-
[Symbol.iterator]() {
|
|
284031
|
-
return iterator;
|
|
284032
|
-
},
|
|
284033
|
-
next() {
|
|
284034
|
-
if (map._state !== state) {
|
|
284035
|
-
throw new Error(`LinkedMap got modified during iteration.`);
|
|
284036
|
-
}
|
|
284037
|
-
if (current) {
|
|
284038
|
-
const result = { value: [current.key, current.value], done: false };
|
|
284039
|
-
current = current.next;
|
|
284040
|
-
return result;
|
|
284041
|
-
}
|
|
284042
|
-
else {
|
|
284043
|
-
return { value: undefined, done: true };
|
|
284044
|
-
}
|
|
284045
|
-
},
|
|
284046
|
-
};
|
|
284047
|
-
return iterator;
|
|
284048
|
-
}
|
|
284049
|
-
[(_a = Symbol.toStringTag, Symbol.iterator)]() {
|
|
284050
|
-
return this.entries();
|
|
284051
|
-
}
|
|
284052
|
-
trimOld(newSize) {
|
|
284053
|
-
if (newSize >= this.size) {
|
|
284054
|
-
return;
|
|
284055
|
-
}
|
|
284056
|
-
if (newSize === 0) {
|
|
284057
|
-
this.clear();
|
|
284058
|
-
return;
|
|
284059
|
-
}
|
|
284060
|
-
let current = this._head;
|
|
284061
|
-
let currentSize = this.size;
|
|
284062
|
-
while (current && currentSize > newSize) {
|
|
284063
|
-
this._map.delete(current.key);
|
|
284064
|
-
current = current.next;
|
|
284065
|
-
currentSize--;
|
|
284066
|
-
}
|
|
284067
|
-
this._head = current;
|
|
284068
|
-
this._size = currentSize;
|
|
284069
|
-
if (current) {
|
|
284070
|
-
current.previous = undefined;
|
|
284071
|
-
}
|
|
284072
|
-
this._state++;
|
|
284073
|
-
}
|
|
284074
|
-
addItemFirst(item) {
|
|
284075
|
-
// First time Insert
|
|
284076
|
-
if (!this._head && !this._tail) {
|
|
284077
|
-
this._tail = item;
|
|
284078
|
-
}
|
|
284079
|
-
else if (!this._head) {
|
|
284080
|
-
throw new Error("Invalid list");
|
|
284081
|
-
}
|
|
284082
|
-
else {
|
|
284083
|
-
item.next = this._head;
|
|
284084
|
-
this._head.previous = item;
|
|
284085
|
-
}
|
|
284086
|
-
this._head = item;
|
|
284087
|
-
this._state++;
|
|
284088
|
-
}
|
|
284089
|
-
addItemLast(item) {
|
|
284090
|
-
// First time Insert
|
|
284091
|
-
if (!this._head && !this._tail) {
|
|
284092
|
-
this._head = item;
|
|
284093
|
-
}
|
|
284094
|
-
else if (!this._tail) {
|
|
284095
|
-
throw new Error("Invalid list");
|
|
284096
|
-
}
|
|
284097
|
-
else {
|
|
284098
|
-
item.previous = this._tail;
|
|
284099
|
-
this._tail.next = item;
|
|
284100
|
-
}
|
|
284101
|
-
this._tail = item;
|
|
284102
|
-
this._state++;
|
|
284103
|
-
}
|
|
284104
|
-
removeItem(item) {
|
|
284105
|
-
if (item === this._head && item === this._tail) {
|
|
284106
|
-
this._head = undefined;
|
|
284107
|
-
this._tail = undefined;
|
|
284108
|
-
}
|
|
284109
|
-
else if (item === this._head) {
|
|
284110
|
-
// This can only happend if size === 1 which is handle
|
|
284111
|
-
// by the case above.
|
|
284112
|
-
if (!item.next) {
|
|
284113
|
-
throw new Error("Invalid list");
|
|
284114
|
-
}
|
|
284115
|
-
item.next.previous = undefined;
|
|
284116
|
-
this._head = item.next;
|
|
284117
|
-
}
|
|
284118
|
-
else if (item === this._tail) {
|
|
284119
|
-
// This can only happend if size === 1 which is handle
|
|
284120
|
-
// by the case above.
|
|
284121
|
-
if (!item.previous) {
|
|
284122
|
-
throw new Error("Invalid list");
|
|
284123
|
-
}
|
|
284124
|
-
item.previous.next = undefined;
|
|
284125
|
-
this._tail = item.previous;
|
|
284126
|
-
}
|
|
284127
|
-
else {
|
|
284128
|
-
const next = item.next;
|
|
284129
|
-
const previous = item.previous;
|
|
284130
|
-
if (!next || !previous) {
|
|
284131
|
-
throw new Error("Invalid list");
|
|
284132
|
-
}
|
|
284133
|
-
next.previous = previous;
|
|
284134
|
-
previous.next = next;
|
|
284135
|
-
}
|
|
284136
|
-
item.next = undefined;
|
|
284137
|
-
item.previous = undefined;
|
|
284138
|
-
this._state++;
|
|
284139
|
-
}
|
|
284140
|
-
touch(item, touch) {
|
|
284141
|
-
if (!this._head || !this._tail) {
|
|
284142
|
-
throw new Error("Invalid list");
|
|
284143
|
-
}
|
|
284144
|
-
if ((touch !== 1 /* Touch.AsOld */ && touch !== 2 /* Touch.AsNew */)) {
|
|
284145
|
-
return;
|
|
284146
|
-
}
|
|
284147
|
-
if (touch === 1 /* Touch.AsOld */) {
|
|
284148
|
-
if (item === this._head) {
|
|
284149
|
-
return;
|
|
284150
|
-
}
|
|
284151
|
-
const next = item.next;
|
|
284152
|
-
const previous = item.previous;
|
|
284153
|
-
// Unlink the item
|
|
284154
|
-
if (item === this._tail) {
|
|
284155
|
-
// previous must be defined since item was not head but is tail
|
|
284156
|
-
// So there are more than on item in the map
|
|
284157
|
-
previous.next = undefined;
|
|
284158
|
-
this._tail = previous;
|
|
284159
|
-
}
|
|
284160
|
-
else {
|
|
284161
|
-
// Both next and previous are not undefined since item was neither head nor tail.
|
|
284162
|
-
next.previous = previous;
|
|
284163
|
-
previous.next = next;
|
|
284164
|
-
}
|
|
284165
|
-
// Insert the node at head
|
|
284166
|
-
item.previous = undefined;
|
|
284167
|
-
item.next = this._head;
|
|
284168
|
-
this._head.previous = item;
|
|
284169
|
-
this._head = item;
|
|
284170
|
-
this._state++;
|
|
284171
|
-
}
|
|
284172
|
-
else if (touch === 2 /* Touch.AsNew */) {
|
|
284173
|
-
if (item === this._tail) {
|
|
284174
|
-
return;
|
|
284175
|
-
}
|
|
284176
|
-
const next = item.next;
|
|
284177
|
-
const previous = item.previous;
|
|
284178
|
-
// Unlink the item.
|
|
284179
|
-
if (item === this._head) {
|
|
284180
|
-
// next must be defined since item was not tail but is head
|
|
284181
|
-
// So there are more than on item in the map
|
|
284182
|
-
next.previous = undefined;
|
|
284183
|
-
this._head = next;
|
|
284184
|
-
}
|
|
284185
|
-
else {
|
|
284186
|
-
// Both next and previous are not undefined since item was neither head nor tail.
|
|
284187
|
-
next.previous = previous;
|
|
284188
|
-
previous.next = next;
|
|
284189
|
-
}
|
|
284190
|
-
item.next = undefined;
|
|
284191
|
-
item.previous = this._tail;
|
|
284192
|
-
this._tail.next = item;
|
|
284193
|
-
this._tail = item;
|
|
284194
|
-
this._state++;
|
|
284195
|
-
}
|
|
284196
|
-
}
|
|
284197
|
-
toJSON() {
|
|
284198
|
-
const data = [];
|
|
284199
|
-
this.forEach((value, key) => {
|
|
284200
|
-
data.push([key, value]);
|
|
284201
|
-
});
|
|
284202
|
-
return data;
|
|
284203
|
-
}
|
|
284204
|
-
fromJSON(data) {
|
|
284205
|
-
this.clear();
|
|
284206
|
-
for (const [key, value] of data) {
|
|
284207
|
-
this.set(key, value);
|
|
284208
|
-
}
|
|
284209
|
-
}
|
|
284210
|
-
}
|
|
284211
|
-
/**
|
|
284212
|
-
* @internal
|
|
284213
|
-
*/
|
|
284214
|
-
// istanbul ignore next
|
|
284215
|
-
class LRUCache extends LinkedMap {
|
|
284216
|
-
constructor(limit, ratio = 1) {
|
|
284217
|
-
super();
|
|
284218
|
-
this._limit = limit;
|
|
284219
|
-
this._ratio = Math.min(Math.max(0, ratio), 1);
|
|
284220
|
-
}
|
|
284221
|
-
get limit() {
|
|
284222
|
-
return this._limit;
|
|
284223
|
-
}
|
|
284224
|
-
set limit(limit) {
|
|
284225
|
-
this._limit = limit;
|
|
284226
|
-
this.checkTrim();
|
|
284227
|
-
}
|
|
284228
|
-
get ratio() {
|
|
284229
|
-
return this._ratio;
|
|
284230
|
-
}
|
|
284231
|
-
set ratio(ratio) {
|
|
284232
|
-
this._ratio = Math.min(Math.max(0, ratio), 1);
|
|
284233
|
-
this.checkTrim();
|
|
284234
|
-
}
|
|
284235
|
-
get(key, touch = 2 /* Touch.AsNew */) {
|
|
284236
|
-
return super.get(key, touch);
|
|
284237
|
-
}
|
|
284238
|
-
peek(key) {
|
|
284239
|
-
return super.get(key, 0 /* Touch.None */);
|
|
284240
|
-
}
|
|
284241
|
-
set(key, value) {
|
|
284242
|
-
super.set(key, value, 2 /* Touch.AsNew */);
|
|
284243
|
-
this.checkTrim();
|
|
284244
|
-
return this;
|
|
284245
|
-
}
|
|
284246
|
-
checkTrim() {
|
|
284247
|
-
if (this.size > this._limit) {
|
|
284248
|
-
this.trimOld(Math.round(this._limit * this._ratio));
|
|
284249
|
-
}
|
|
284250
|
-
}
|
|
284251
|
-
}
|
|
284252
|
-
|
|
284253
|
-
|
|
284254
|
-
/***/ }),
|
|
284255
|
-
|
|
284256
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js":
|
|
284257
|
-
/*!******************************************************************************!*\
|
|
284258
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js ***!
|
|
284259
|
-
\******************************************************************************/
|
|
284260
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
284261
|
-
|
|
284262
|
-
"use strict";
|
|
284263
|
-
__webpack_require__.r(__webpack_exports__);
|
|
284264
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
284265
|
-
/* harmony export */ convertSimple2RegExpPattern: () => (/* binding */ convertSimple2RegExpPattern),
|
|
284266
|
-
/* harmony export */ equalsIgnoreCase: () => (/* binding */ equalsIgnoreCase),
|
|
284267
|
-
/* harmony export */ isLowerAsciiLetter: () => (/* binding */ isLowerAsciiLetter),
|
|
284268
|
-
/* harmony export */ isUpperAsciiLetter: () => (/* binding */ isUpperAsciiLetter),
|
|
284269
|
-
/* harmony export */ startsWithIgnoreCase: () => (/* binding */ startsWithIgnoreCase)
|
|
284270
|
-
/* harmony export */ });
|
|
284271
|
-
/*---------------------------------------------------------------------------------------------
|
|
284272
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
284273
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
284274
|
-
*--------------------------------------------------------------------------------------------*/
|
|
284275
|
-
/**
|
|
284276
|
-
* @internal
|
|
284277
|
-
*/
|
|
284278
|
-
function convertSimple2RegExpPattern(pattern) {
|
|
284279
|
-
return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*");
|
|
284280
|
-
}
|
|
284281
|
-
/**
|
|
284282
|
-
* @internal
|
|
284283
|
-
*/
|
|
284284
|
-
function isLowerAsciiLetter(code) {
|
|
284285
|
-
return code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */;
|
|
284286
|
-
}
|
|
284287
|
-
/**
|
|
284288
|
-
* @internal
|
|
284289
|
-
*/
|
|
284290
|
-
function isUpperAsciiLetter(code) {
|
|
284291
|
-
return code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */;
|
|
284292
|
-
}
|
|
284293
|
-
/**
|
|
284294
|
-
* @internal
|
|
284295
|
-
*/
|
|
284296
|
-
function isAsciiLetter(code) {
|
|
284297
|
-
return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
|
|
284298
|
-
}
|
|
284299
|
-
/**
|
|
284300
|
-
* @internal
|
|
284301
|
-
*/
|
|
284302
|
-
function equalsIgnoreCase(a, b) {
|
|
284303
|
-
return a.length === b.length && doEqualsIgnoreCase(a, b);
|
|
284304
|
-
}
|
|
284305
|
-
/**
|
|
284306
|
-
* @internal
|
|
284307
|
-
*/
|
|
284308
|
-
function doEqualsIgnoreCase(a, b, stopAt = a.length) {
|
|
284309
|
-
for (let i = 0; i < stopAt; i++) {
|
|
284310
|
-
const codeA = a.charCodeAt(i);
|
|
284311
|
-
const codeB = b.charCodeAt(i);
|
|
284312
|
-
if (codeA === codeB) {
|
|
284313
|
-
continue;
|
|
284314
|
-
}
|
|
284315
|
-
// a-z A-Z
|
|
284316
|
-
if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {
|
|
284317
|
-
const diff = Math.abs(codeA - codeB);
|
|
284318
|
-
if (diff !== 0 && diff !== 32) {
|
|
284319
|
-
return false;
|
|
284320
|
-
}
|
|
284321
|
-
}
|
|
284322
|
-
else {
|
|
284323
|
-
// Any other char code
|
|
284324
|
-
if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {
|
|
284325
|
-
return false;
|
|
284326
|
-
}
|
|
284327
|
-
}
|
|
284328
|
-
}
|
|
284329
|
-
return true;
|
|
284330
|
-
}
|
|
284331
|
-
/**
|
|
284332
|
-
* @internal
|
|
284333
|
-
*/
|
|
284334
|
-
function startsWithIgnoreCase(str, candidate) {
|
|
284335
|
-
const candidateLength = candidate.length;
|
|
284336
|
-
if (candidate.length > str.length) {
|
|
284337
|
-
return false;
|
|
284338
|
-
}
|
|
284339
|
-
return doEqualsIgnoreCase(str, candidate, candidateLength);
|
|
284340
|
-
}
|
|
284341
283195
|
|
|
284342
283196
|
|
|
284343
283197
|
/***/ }),
|
|
@@ -284351,8 +283205,7 @@ function startsWithIgnoreCase(str, candidate) {
|
|
|
284351
283205
|
"use strict";
|
|
284352
283206
|
__webpack_require__.r(__webpack_exports__);
|
|
284353
283207
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
284354
|
-
/* harmony export */ getClassName: () => (/* binding */ getClassName)
|
|
284355
|
-
/* harmony export */ loggerCategory: () => (/* binding */ loggerCategory)
|
|
283208
|
+
/* harmony export */ getClassName: () => (/* binding */ getClassName)
|
|
284356
283209
|
/* harmony export */ });
|
|
284357
283210
|
/*---------------------------------------------------------------------------------------------
|
|
284358
283211
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -284363,6 +283216,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
284363
283216
|
*/
|
|
284364
283217
|
/** Gets the class name for an object.
|
|
284365
283218
|
* @internal
|
|
283219
|
+
* @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.
|
|
284366
283220
|
*/
|
|
284367
283221
|
const getClassName = (obj) => {
|
|
284368
283222
|
let className = "";
|
|
@@ -284377,14 +283231,6 @@ const getClassName = (obj) => {
|
|
|
284377
283231
|
}
|
|
284378
283232
|
return className;
|
|
284379
283233
|
};
|
|
284380
|
-
/** Gets category to use for adding Log entries
|
|
284381
|
-
* @internal
|
|
284382
|
-
*/
|
|
284383
|
-
const loggerCategory = (obj) => {
|
|
284384
|
-
const className = getClassName(obj);
|
|
284385
|
-
const category = `appui-abstract${(className ? `.${className}` : "")}`;
|
|
284386
|
-
return category;
|
|
284387
|
-
};
|
|
284388
283234
|
|
|
284389
283235
|
|
|
284390
283236
|
/***/ }),
|
|
@@ -289850,7 +288696,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
289850
288696
|
/***/ ((module) => {
|
|
289851
288697
|
|
|
289852
288698
|
"use strict";
|
|
289853
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
288699
|
+
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"}}');
|
|
289854
288700
|
|
|
289855
288701
|
/***/ })
|
|
289856
288702
|
|