@itwin/appui-abstract 4.1.0-dev.7 → 4.1.0-dev.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js +2 -4
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +1 -1
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
- package/lib/esm/appui-abstract/backstage/BackstageItem.js +2 -4
- package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
- package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +1 -1
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
- package/package.json +10 -32
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,80 @@
|
|
1
1
|
# Change Log - @itwin/appui-abstract
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 24 Jul 2023 12:35:20 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 4.0.6
|
6
|
+
Mon, 24 Jul 2023 05:07:33 GMT
|
7
|
+
|
8
|
+
_Version update only_
|
9
|
+
|
10
|
+
## 4.0.5
|
11
|
+
Tue, 18 Jul 2023 12:21:56 GMT
|
12
|
+
|
13
|
+
_Version update only_
|
14
|
+
|
15
|
+
## 4.0.4
|
16
|
+
Wed, 12 Jul 2023 15:50:01 GMT
|
17
|
+
|
18
|
+
_Version update only_
|
19
|
+
|
20
|
+
## 4.0.3
|
21
|
+
Mon, 03 Jul 2023 15:28:41 GMT
|
22
|
+
|
23
|
+
_Version update only_
|
24
|
+
|
25
|
+
## 4.0.2
|
26
|
+
Wed, 21 Jun 2023 22:04:43 GMT
|
27
|
+
|
28
|
+
_Version update only_
|
29
|
+
|
30
|
+
## 4.0.1
|
31
|
+
Wed, 21 Jun 2023 20:29:13 GMT
|
32
|
+
|
33
|
+
_Version update only_
|
34
|
+
|
35
|
+
## 4.0.0
|
36
|
+
Mon, 22 May 2023 15:34:14 GMT
|
37
|
+
|
38
|
+
### Updates
|
39
|
+
|
40
|
+
- Update to eslint@8
|
41
|
+
- Promote `PropertyDescription.hideCompositePropertyLabel` to `@public`
|
42
|
+
- Update @deprecated comments.
|
43
|
+
|
44
|
+
## 3.7.11
|
45
|
+
Tue, 11 Jul 2023 17:17:21 GMT
|
46
|
+
|
47
|
+
_Version update only_
|
48
|
+
|
49
|
+
## 3.7.10
|
50
|
+
Wed, 05 Jul 2023 13:41:21 GMT
|
51
|
+
|
52
|
+
_Version update only_
|
53
|
+
|
54
|
+
## 3.7.9
|
55
|
+
Tue, 20 Jun 2023 12:51:02 GMT
|
56
|
+
|
57
|
+
_Version update only_
|
58
|
+
|
59
|
+
## 3.7.8
|
60
|
+
Thu, 01 Jun 2023 17:00:39 GMT
|
61
|
+
|
62
|
+
_Version update only_
|
63
|
+
|
64
|
+
## 3.7.7
|
65
|
+
Wed, 24 May 2023 17:27:09 GMT
|
66
|
+
|
67
|
+
_Version update only_
|
68
|
+
|
69
|
+
## 3.7.6
|
70
|
+
Mon, 15 May 2023 18:23:40 GMT
|
71
|
+
|
72
|
+
_Version update only_
|
73
|
+
|
74
|
+
## 3.7.5
|
75
|
+
Thu, 04 May 2023 19:43:18 GMT
|
76
|
+
|
77
|
+
_Version update only_
|
4
78
|
|
5
79
|
## 3.7.4
|
6
80
|
Tue, 25 Apr 2023 17:50:35 GMT
|
@@ -42,8 +42,7 @@ exports.isStageLauncher = isStageLauncher;
|
|
42
42
|
class BackstageItemUtilities {
|
43
43
|
}
|
44
44
|
/** Creates a stage launcher backstage item */
|
45
|
-
BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides
|
46
|
-
) => ({
|
45
|
+
BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides) => ({
|
47
46
|
groupPriority,
|
48
47
|
icon,
|
49
48
|
internalData: overrides?.internalData,
|
@@ -55,8 +54,7 @@ BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemP
|
|
55
54
|
...overrides,
|
56
55
|
});
|
57
56
|
/** Creates an action backstage item */
|
58
|
-
BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides
|
59
|
-
) => ({
|
57
|
+
BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides) => ({
|
60
58
|
execute,
|
61
59
|
groupPriority,
|
62
60
|
icon,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B;AA4DD;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC5G,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC/G,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB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IAAsC,EAAE,SAAwC,EACvG,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AA/BQ,wDAAsB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Backstage\r\n */\r\n\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\n\r\n/** Used to specify the item type added to the backstage menu.\r\n * @deprecated in 3.6. Use type guards instead.\r\n * @public\r\n */\r\nexport enum BackstageItemType {\r\n /** Item that executes an action function */\r\n ActionItem = 1,\r\n /** Item that activate a stage. */\r\n StageLauncher = 2,\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\r\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\r\n * allows extensions enough gaps to insert their own groups.\r\n */\r\n readonly groupPriority: number;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\r\n readonly id: string;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\r\n readonly isHidden?: boolean | ConditionalBooleanValue;\r\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\r\n readonly isDisabled?: boolean | ConditionalBooleanValue;\r\n /** Priority within a group (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Subtitle. */\r\n readonly subtitle?: string | ConditionalStringValue;\r\n /** Tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\r\n readonly isActive?: boolean | ConditionalBooleanValue;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly stageId: string;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line deprecation/deprecation\r\n\r\n/** BackstageActionItem type guard.\r\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** BackstageStageLauncher type guard.\r\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item */\r\n public static createStageLauncher = (\r\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>, // eslint-disable-line deprecation/deprecation\r\n ): BackstageStageLauncher => ({ // eslint-disable-line deprecation/deprecation\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n });\r\n\r\n /** Creates an action backstage item */\r\n public static createActionItem = (\r\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>, // eslint-disable-line deprecation/deprecation\r\n ): BackstageActionItem => ({ // eslint-disable-line deprecation/deprecation\r\n execute,\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n });\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AASH,+BAAiC;AACjC,qCAAqC;AAkBrC,mBAAmB;AAEnB;;;;;;GAMG;AACH,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AAmB,CAAC,OAAe,EAAE,UAAkB;IAE9D,uBAAuB;IACvB,IAAI,UAAU,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;QACpC,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAEtC,uBAAuB;IACvB,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;UAC/B,KAAK;UACL,KAAK;UACL,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,aAAa","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\r\n\r\n/* eslint-disable no-console */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\nimport { CharCode } from \"./charCode\";\r\nimport { LRUCache } from \"./map\";\r\nimport * as strings from \"./strings\";\r\n\r\n/** Interface that returns indices of matches\r\n * @public\r\n */\r\nexport interface IMatch {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/**\r\n * IFilter defines filter function type\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to search for matches\r\n * @internal\r\n */\r\nexport type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;\r\n\r\n// Combined filters\r\n\r\n/**\r\n * @returns A filter which combines the provided set\r\n * of filters with an or. The *first* filters that\r\n * matches defined the return value of the returned\r\n * filter.\r\n * @internal\r\n */\r\nexport function or(...filter: IFilter[]): IFilter {\r\n return function (word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n for (let i = 0, len = filter.length; i < len; i++) {\r\n const match = filter[i](word, wordToMatchAgainst);\r\n if (match) {\r\n return match;\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n// Prefix\r\n\r\n/** @internal */\r\nexport const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);\r\n/** @internal */\r\nexport const matchesPrefix: IFilter = _matchesPrefix.bind(undefined, true);\r\n\r\nfunction _matchesPrefix(ignoreCase: boolean, word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\r\n return null;\r\n }\r\n\r\n let matches: boolean;\r\n if (ignoreCase) {\r\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\r\n } else {\r\n matches = wordToMatchAgainst.indexOf(word) === 0;\r\n }\r\n\r\n if (!matches) {\r\n return null;\r\n }\r\n\r\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\r\n}\r\n\r\n// Contiguous Substring\r\n\r\n/** @internal */\r\nexport function matchesContiguousSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\r\n if (index === -1) {\r\n return null;\r\n }\r\n\r\n return [{ start: index, end: index + word.length }];\r\n}\r\n\r\n// Substring\r\n\r\n/**\r\n * Return case insensitive substring matches\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\r\n}\r\n\r\nfunction _matchesSubString(word: string, wordToMatchAgainst: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === wordToMatchAgainst.length) {\r\n return null;\r\n } else {\r\n if (word[i] === wordToMatchAgainst[j]) {\r\n let result: IMatch[] | null = null;\r\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\r\n return join({ start: j, end: j + 1 }, result);\r\n }\r\n return null;\r\n }\r\n\r\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\r\n }\r\n}\r\n\r\n// CamelCase\r\n\r\nfunction isLower(code: number): boolean {\r\n return CharCode.a <= code && code <= CharCode.z;\r\n}\r\n\r\nfunction isUpper(code: number): boolean {\r\n return CharCode.A <= code && code <= CharCode.Z;\r\n}\r\n\r\nfunction isNumber(code: number): boolean {\r\n return CharCode.Digit0 <= code && code <= CharCode.Digit9;\r\n}\r\n\r\nfunction isWhitespace(code: number): boolean {\r\n return (\r\n code === CharCode.Space\r\n || code === CharCode.Tab\r\n || code === CharCode.LineFeed\r\n || code === CharCode.CarriageReturn\r\n );\r\n}\r\n\r\nconst wordSeparators = new Set<number>();\r\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\r\n .split(\"\")\r\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\r\n\r\nfunction isWordSeparator(code: number): boolean {\r\n return isWhitespace(code) || wordSeparators.has(code);\r\n}\r\n\r\nfunction charactersMatch(codeA: number, codeB: number): boolean {\r\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\r\n}\r\n\r\nfunction isAlphanumeric(code: number): boolean {\r\n return isLower(code) || isUpper(code) || isNumber(code);\r\n}\r\n\r\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\r\n if (tail.length === 0) {\r\n tail = [head];\r\n } else if (head.end === tail[0].start) {\r\n tail[0].start = head.start;\r\n } else {\r\n tail.unshift(head);\r\n }\r\n return tail;\r\n}\r\n\r\nfunction nextAnchor(camelCaseWord: string, start: number): number {\r\n for (let i = start; i < camelCaseWord.length; i++) {\r\n const c = camelCaseWord.charCodeAt(i);\r\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return camelCaseWord.length;\r\n}\r\n\r\nfunction _matchesCamelCase(word: string, camelCaseWord: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === camelCaseWord.length) {\r\n return null;\r\n } else if (word[i] !== camelCaseWord[j].toLowerCase()) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextUpperIndex = j + 1;\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\r\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\r\n nextUpperIndex++;\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\ninterface ICamelCaseAnalysis {\r\n upperPercent: number;\r\n lowerPercent: number;\r\n alphaPercent: number;\r\n numericPercent: number;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camelCaseWords.\r\nfunction analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {\r\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isAlphanumeric(code)) { alpha++; }\r\n if (isNumber(code)) { numeric++; }\r\n }\r\n\r\n const upperPercent = upper / word.length;\r\n const lowerPercent = lower / word.length;\r\n const alphaPercent = alpha / word.length;\r\n const numericPercent = numeric / word.length;\r\n\r\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\r\n}\r\n\r\nfunction isUpperCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent } = analysis;\r\n return lowerPercent === 0 && upperPercent > 0.6;\r\n}\r\n\r\nfunction isCamelCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\r\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camel case patterns.\r\nfunction isCamelCasePattern(word: string): boolean {\r\n let upper = 0, lower = 0, code = 0, whitespace = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isWhitespace(code)) { whitespace++; }\r\n }\r\n\r\n if ((upper === 0 || lower === 0) && whitespace === 0) {\r\n return word.length <= 30;\r\n } else {\r\n return upper <= 5;\r\n }\r\n}\r\n\r\n/**\r\n * Return matches treating \"camelCase\" words separately. For example the filter string \"gp\" would return two matches in string \"Git Pull\".\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesCamelCase(word: string, camelCaseWord: string): IMatch[] | null {\r\n if (!camelCaseWord) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.trim();\r\n\r\n if (camelCaseWord.length === 0) {\r\n return null;\r\n }\r\n\r\n if (!isCamelCasePattern(camelCaseWord)) {\r\n return null;\r\n }\r\n\r\n if (camelCaseWord.length > 60) {\r\n return null;\r\n }\r\n\r\n const analysis = analyzeCamelCaseWord(camelCaseWord);\r\n\r\n if (!isCamelCaseWord(analysis)) {\r\n // istanbul ignore next\r\n if (!isUpperCaseWord(analysis)) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.toLowerCase();\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\r\n i = nextAnchor(camelCaseWord, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Matches beginning of words supporting non-ASCII languages.\r\n * @param word Filter string\r\n * @param target String being searched\r\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\r\n * 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\").\r\n * Useful in cases where the target is words (e.g. command labels)\r\n * @internal\r\n */\r\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\r\n if (!target || target.length === 0) {\r\n return null;\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n target = target.toLowerCase();\r\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\r\n i = nextWord(target, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === target.length) {\r\n return null;\r\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextWordIndex = j + 1;\r\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\r\n // istanbul ignore else\r\n if (!contiguous) {\r\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\r\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\r\n nextWordIndex++;\r\n }\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\nfunction nextWord(word: string, start: number): number {\r\n for (let i = start; i < word.length; i++) {\r\n if (isWordSeparator(word.charCodeAt(i)) ||\r\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return word.length;\r\n}\r\n\r\n// Fuzzy\r\n\r\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\r\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\r\nconst fuzzyRegExpCache = new LRUCache<string, RegExp>(10000); // bounded to 10000 elements\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] | null {\r\n // istanbul ignore next\r\n if (typeof word !== \"string\" || typeof wordToMatchAgainst !== \"string\") {\r\n return null; // return early for invalid input\r\n }\r\n\r\n // Form RegExp for wildcard matches\r\n let regexp = fuzzyRegExpCache.get(word);\r\n if (!regexp) {\r\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), \"i\");\r\n fuzzyRegExpCache.set(word, regexp);\r\n }\r\n\r\n // RegExp Filter\r\n const match = regexp.exec(wordToMatchAgainst);\r\n if (match) {\r\n return [{ start: match.index, end: match.index + match[0].length }];\r\n }\r\n\r\n // Default Filter\r\n return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\r\n}\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more\r\n * powerful than `matchesFuzzy`. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy2(pattern: string, word: string): IMatch[] | null {\r\n const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);\r\n return score ? createMatches(score) : null;\r\n}\r\n\r\n// #region --- fuzzyScore ---\r\n/**\r\n * @internal\r\n */\r\nexport function createMatches(score: undefined | FuzzyScore): IMatch[] {\r\n // istanbul ignore next\r\n if (typeof score === \"undefined\") {\r\n return [];\r\n }\r\n\r\n const matches = score[1].toString(2);\r\n const wordStart = score[2];\r\n const res: IMatch[] = [];\r\n\r\n for (let pos = wordStart; pos < _maxLen; pos++) {\r\n if (matches[matches.length - (pos + 1)] === \"1\") {\r\n const last = res[res.length - 1];\r\n if (last && last.end === pos) {\r\n last.end = pos + 1;\r\n } else {\r\n res.push({ start: pos, end: pos + 1 });\r\n }\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nconst _maxLen = 128;\r\n\r\nfunction initTable() {\r\n const table: number[][] = [];\r\n const row: number[] = [0];\r\n for (let i = 1; i <= _maxLen; i++) {\r\n row.push(-i);\r\n }\r\n for (let i = 0; i <= _maxLen; i++) {\r\n const thisRow = row.slice(0);\r\n thisRow[0] = -i;\r\n table.push(thisRow);\r\n }\r\n return table;\r\n}\r\n\r\nconst _table = initTable();\r\nconst _scores = initTable();\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\nconst _arrows = <Arrow[][]>initTable();\r\nconst _debug = false;\r\n\r\nfunction isSeparatorAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n case CharCode.Underline:\r\n case CharCode.Dash:\r\n case CharCode.Period:\r\n case CharCode.Space:\r\n case CharCode.Slash:\r\n case CharCode.Backslash:\r\n case CharCode.SingleQuote:\r\n case CharCode.DoubleQuote:\r\n case CharCode.Colon:\r\n case CharCode.DollarSign:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isWhitespaceAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n // istanbul ignore next\r\n case CharCode.Space:\r\n case CharCode.Tab:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isUpperCaseAtPos(pos: number, word: string, wordLow: string): boolean {\r\n return word[pos] !== wordLow[pos];\r\n}\r\n\r\n/** @internal */\r\nexport function isPatternInWord(patternLow: string, patternPos: number, patternLen: number, wordLow: string, wordPos: number, wordLen: number): boolean {\r\n while (patternPos < patternLen && wordPos < wordLen) {\r\n if (patternLow[patternPos] === wordLow[wordPos]) {\r\n patternPos += 1;\r\n }\r\n wordPos += 1;\r\n }\r\n return patternPos === patternLen; // pattern must be exhausted\r\n}\r\n\r\nconst enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 }\r\n\r\n/**\r\n * A tuple of three values.\r\n * 0. the score\r\n * 1. the matches encoded as bitmask (2^53)\r\n * 2. the offset at which matching started\r\n * @internal\r\n */\r\nexport type FuzzyScore = [number, number, number];\r\n\r\n/** @internal */\r\nexport namespace FuzzyScore { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * No matches and value `-100`\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\n export const Default: [-100, 0, 0] = <[-100, 0, 0]>Object.freeze([-100, 0, 0]);\r\n\r\n // istanbul ignore next\r\n /** @internal */\r\n export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] {\r\n return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;\r\n\r\n/** @internal */\r\nexport function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n // istanbul ignore next\r\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\r\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\r\n\r\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\r\n return undefined;\r\n }\r\n\r\n // Run a simple check if the characters of pattern occur\r\n // (in order) at all in word. If that isn't the case we\r\n // stop because no match will be possible\r\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {\r\n return undefined;\r\n }\r\n\r\n let row: number = 1;\r\n let column: number = 1;\r\n let patternPos = patternStart;\r\n let wordPos = wordStart;\r\n\r\n let hasStrongFirstMatch = false;\r\n\r\n // There will be a match, fill in tables\r\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\r\n\r\n for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {\r\n\r\n const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);\r\n\r\n if (patternPos === patternStart && score > 1) {\r\n hasStrongFirstMatch = true;\r\n }\r\n\r\n _scores[row][column] = score;\r\n\r\n const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);\r\n const top = _table[row - 1][column] + -1;\r\n const left = _table[row][column - 1] + -1;\r\n\r\n if (left >= top) {\r\n // left or diag\r\n if (left > diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left;\r\n } else if (left === diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n } else {\r\n // top or diag\r\n if (top > diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top;\r\n } else if (top === diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {\r\n return undefined;\r\n }\r\n\r\n _matchesCount = 0;\r\n _topScore = -100;\r\n _wordStart = wordStart;\r\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\r\n\r\n _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);\r\n if (_matchesCount === 0) {\r\n return undefined;\r\n }\r\n\r\n return [_topScore, _topMatch2, wordStart];\r\n}\r\n\r\nfunction _doScore(pattern: string, patternLow: string, patternPos: number, patternStart: number, word: string, wordLow: string, wordPos: number) {\r\n if (patternLow[patternPos] !== wordLow[wordPos]) {\r\n return -1;\r\n }\r\n if (wordPos === (patternPos - patternStart)) {\r\n // common prefix: `foobar <-> foobaz`\r\n // ^^^^^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\r\n // hitting upper-case: `foo <-> forOthers`\r\n // ^^ ^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\r\n // hitting a separator: `. <-> foo.bar`\r\n // ^\r\n return 5;\r\n\r\n } else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\r\n // post separator: `foo <-> bar_foo`\r\n // ^^^\r\n return 5;\r\n\r\n } else {\r\n return 1;\r\n }\r\n}\r\n\r\nlet _matchesCount: number = 0;\r\nlet _topMatch2: number = 0;\r\nlet _topScore: number = 0;\r\nlet _wordStart: number = 0;\r\nlet _firstMatchCanBeWeak: boolean = false;\r\n\r\nfunction _findAllMatches2(row: number, column: number, total: number, matches: number, lastMatched: boolean): void {\r\n\r\n if (_matchesCount >= 10 || total < -25) {\r\n // stop when having already 10 results, or\r\n // when a potential alignment as already 5 gaps\r\n return;\r\n }\r\n\r\n let simpleMatchCount = 0;\r\n\r\n while (row > 0 && column > 0) {\r\n\r\n const score = _scores[row][column];\r\n const arrow = _arrows[row][column];\r\n\r\n if (arrow === Arrow.Left) {\r\n // left -> no match, skip a word character\r\n column -= 1;\r\n if (lastMatched) {\r\n total -= 5; // new gap penalty\r\n } else if (matches !== 0) {\r\n total -= 1; // gap penalty after first match\r\n }\r\n lastMatched = false;\r\n simpleMatchCount = 0;\r\n } else {\r\n /* istanbul ignore else */\r\n if (arrow & Arrow.Diag) {\r\n if (arrow & Arrow.Left) {\r\n // left\r\n _findAllMatches2(\r\n row,\r\n column - 1,\r\n matches !== 0 ? total - 1 : total, // gap penalty after first match\r\n matches,\r\n lastMatched\r\n );\r\n }\r\n\r\n // diag\r\n total += score;\r\n row -= 1;\r\n column -= 1;\r\n lastMatched = true;\r\n\r\n // match -> set a 1 at the word pos\r\n matches += 2 ** (column + _wordStart);\r\n\r\n // count simple matches and boost a row of\r\n // simple matches when they yield in a\r\n // strong match.\r\n if (score === 1) {\r\n simpleMatchCount += 1;\r\n\r\n if (row === 0 && !_firstMatchCanBeWeak) {\r\n // when the first match is a weak\r\n // match we discard it\r\n return undefined;\r\n }\r\n\r\n } else {\r\n // boost\r\n total += 1 + (simpleMatchCount * (score - 1));\r\n simpleMatchCount = 0;\r\n }\r\n\r\n } else {\r\n // istanbul ignore next\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n total -= column >= 3 ? 9 : column * 3; // late start penalty\r\n\r\n // dynamically keep track of the current top score\r\n // and insert the current best score at head, the rest at tail\r\n _matchesCount += 1;\r\n if (total > _topScore) {\r\n _topScore = total;\r\n _topMatch2 = matches;\r\n }\r\n}\r\n\r\n// #endregion\r\n\r\n// #region --- graceful ---\r\n/** @internal */\r\nexport function fuzzyScoreGracefulAggressive(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\r\n}\r\n\r\n/** @internal */\r\nexport function fuzzyScoreGraceful(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);\r\n}\r\n\r\nfunction fuzzyScoreWithPermutations(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, aggressive: boolean, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n\r\n if (top && !aggressive) {\r\n // when using the original pattern yield a result we`\r\n // return it unless we are aggressive and try to find\r\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\r\n return top;\r\n }\r\n\r\n // istanbul ignore else\r\n if (pattern.length >= 3) {\r\n // When the pattern is long enough then try a few (max 7)\r\n // permutations of the pattern to find a better match. The\r\n // permutations only swap neighbouring characters, e.g\r\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\r\n const tries = Math.min(7, pattern.length - 1);\r\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\r\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\r\n // istanbul ignore else\r\n if (newPattern) {\r\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n if (candidate) {\r\n candidate[0] -= 3; // permutation penalty\r\n // istanbul ignore else\r\n if (!top || candidate[0] > top[0]) {\r\n top = candidate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return top;\r\n}\r\n\r\nfunction nextTypoPermutation(pattern: string, patternPos: number): string | undefined {\r\n\r\n // istanbul ignore next\r\n if (patternPos + 1 >= pattern.length) {\r\n return undefined;\r\n }\r\n\r\n const swap1 = pattern[patternPos];\r\n const swap2 = pattern[patternPos + 1];\r\n\r\n // istanbul ignore next\r\n if (swap1 === swap2) {\r\n return undefined;\r\n }\r\n\r\n return pattern.slice(0, patternPos)\r\n + swap2\r\n + swap1\r\n + pattern.slice(patternPos + 2);\r\n}\r\n\r\n// #endregion\r\n"]}
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AASH,+BAAiC;AACjC,qCAAqC;AAkBrC,mBAAmB;AAEnB;;;;;;GAMG;AACH,SAAgB,EAAE,CAAC,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AAE,UAAkB;IAE9D,uBAAuB;IACvB,IAAI,UAAU,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;QACpC,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAEtC,uBAAuB;IACvB,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;UAC/B,KAAK;UACL,KAAK;UACL,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,aAAa","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\r\n\r\n/* eslint-disable no-console */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\nimport { CharCode } from \"./charCode\";\r\nimport { LRUCache } from \"./map\";\r\nimport * as strings from \"./strings\";\r\n\r\n/** Interface that returns indices of matches\r\n * @public\r\n */\r\nexport interface IMatch {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/**\r\n * IFilter defines filter function type\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to search for matches\r\n * @internal\r\n */\r\nexport type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;\r\n\r\n// Combined filters\r\n\r\n/**\r\n * @returns A filter which combines the provided set\r\n * of filters with an or. The *first* filters that\r\n * matches defined the return value of the returned\r\n * filter.\r\n * @internal\r\n */\r\nexport function or(...filter: IFilter[]): IFilter {\r\n return function (word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n for (let i = 0, len = filter.length; i < len; i++) {\r\n const match = filter[i](word, wordToMatchAgainst);\r\n if (match) {\r\n return match;\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n// Prefix\r\n\r\n/** @internal */\r\nexport const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);\r\n/** @internal */\r\nexport const matchesPrefix: IFilter = _matchesPrefix.bind(undefined, true);\r\n\r\nfunction _matchesPrefix(ignoreCase: boolean, word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\r\n return null;\r\n }\r\n\r\n let matches: boolean;\r\n if (ignoreCase) {\r\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\r\n } else {\r\n matches = wordToMatchAgainst.indexOf(word) === 0;\r\n }\r\n\r\n if (!matches) {\r\n return null;\r\n }\r\n\r\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\r\n}\r\n\r\n// Contiguous Substring\r\n\r\n/** @internal */\r\nexport function matchesContiguousSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\r\n if (index === -1) {\r\n return null;\r\n }\r\n\r\n return [{ start: index, end: index + word.length }];\r\n}\r\n\r\n// Substring\r\n\r\n/**\r\n * Return case insensitive substring matches\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\r\n}\r\n\r\nfunction _matchesSubString(word: string, wordToMatchAgainst: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === wordToMatchAgainst.length) {\r\n return null;\r\n } else {\r\n if (word[i] === wordToMatchAgainst[j]) {\r\n let result: IMatch[] | null = null;\r\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\r\n return join({ start: j, end: j + 1 }, result);\r\n }\r\n return null;\r\n }\r\n\r\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\r\n }\r\n}\r\n\r\n// CamelCase\r\n\r\nfunction isLower(code: number): boolean {\r\n return CharCode.a <= code && code <= CharCode.z;\r\n}\r\n\r\nfunction isUpper(code: number): boolean {\r\n return CharCode.A <= code && code <= CharCode.Z;\r\n}\r\n\r\nfunction isNumber(code: number): boolean {\r\n return CharCode.Digit0 <= code && code <= CharCode.Digit9;\r\n}\r\n\r\nfunction isWhitespace(code: number): boolean {\r\n return (\r\n code === CharCode.Space\r\n || code === CharCode.Tab\r\n || code === CharCode.LineFeed\r\n || code === CharCode.CarriageReturn\r\n );\r\n}\r\n\r\nconst wordSeparators = new Set<number>();\r\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\r\n .split(\"\")\r\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\r\n\r\nfunction isWordSeparator(code: number): boolean {\r\n return isWhitespace(code) || wordSeparators.has(code);\r\n}\r\n\r\nfunction charactersMatch(codeA: number, codeB: number): boolean {\r\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\r\n}\r\n\r\nfunction isAlphanumeric(code: number): boolean {\r\n return isLower(code) || isUpper(code) || isNumber(code);\r\n}\r\n\r\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\r\n if (tail.length === 0) {\r\n tail = [head];\r\n } else if (head.end === tail[0].start) {\r\n tail[0].start = head.start;\r\n } else {\r\n tail.unshift(head);\r\n }\r\n return tail;\r\n}\r\n\r\nfunction nextAnchor(camelCaseWord: string, start: number): number {\r\n for (let i = start; i < camelCaseWord.length; i++) {\r\n const c = camelCaseWord.charCodeAt(i);\r\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return camelCaseWord.length;\r\n}\r\n\r\nfunction _matchesCamelCase(word: string, camelCaseWord: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === camelCaseWord.length) {\r\n return null;\r\n } else if (word[i] !== camelCaseWord[j].toLowerCase()) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextUpperIndex = j + 1;\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\r\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\r\n nextUpperIndex++;\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\ninterface ICamelCaseAnalysis {\r\n upperPercent: number;\r\n lowerPercent: number;\r\n alphaPercent: number;\r\n numericPercent: number;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camelCaseWords.\r\nfunction analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {\r\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isAlphanumeric(code)) { alpha++; }\r\n if (isNumber(code)) { numeric++; }\r\n }\r\n\r\n const upperPercent = upper / word.length;\r\n const lowerPercent = lower / word.length;\r\n const alphaPercent = alpha / word.length;\r\n const numericPercent = numeric / word.length;\r\n\r\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\r\n}\r\n\r\nfunction isUpperCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent } = analysis;\r\n return lowerPercent === 0 && upperPercent > 0.6;\r\n}\r\n\r\nfunction isCamelCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\r\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camel case patterns.\r\nfunction isCamelCasePattern(word: string): boolean {\r\n let upper = 0, lower = 0, code = 0, whitespace = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isWhitespace(code)) { whitespace++; }\r\n }\r\n\r\n if ((upper === 0 || lower === 0) && whitespace === 0) {\r\n return word.length <= 30;\r\n } else {\r\n return upper <= 5;\r\n }\r\n}\r\n\r\n/**\r\n * Return matches treating \"camelCase\" words separately. For example the filter string \"gp\" would return two matches in string \"Git Pull\".\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesCamelCase(word: string, camelCaseWord: string): IMatch[] | null {\r\n if (!camelCaseWord) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.trim();\r\n\r\n if (camelCaseWord.length === 0) {\r\n return null;\r\n }\r\n\r\n if (!isCamelCasePattern(camelCaseWord)) {\r\n return null;\r\n }\r\n\r\n if (camelCaseWord.length > 60) {\r\n return null;\r\n }\r\n\r\n const analysis = analyzeCamelCaseWord(camelCaseWord);\r\n\r\n if (!isCamelCaseWord(analysis)) {\r\n // istanbul ignore next\r\n if (!isUpperCaseWord(analysis)) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.toLowerCase();\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\r\n i = nextAnchor(camelCaseWord, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Matches beginning of words supporting non-ASCII languages.\r\n * @param word Filter string\r\n * @param target String being searched\r\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\r\n * 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\").\r\n * Useful in cases where the target is words (e.g. command labels)\r\n * @internal\r\n */\r\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\r\n if (!target || target.length === 0) {\r\n return null;\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n target = target.toLowerCase();\r\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\r\n i = nextWord(target, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === target.length) {\r\n return null;\r\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextWordIndex = j + 1;\r\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\r\n // istanbul ignore else\r\n if (!contiguous) {\r\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\r\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\r\n nextWordIndex++;\r\n }\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\nfunction nextWord(word: string, start: number): number {\r\n for (let i = start; i < word.length; i++) {\r\n if (isWordSeparator(word.charCodeAt(i)) ||\r\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return word.length;\r\n}\r\n\r\n// Fuzzy\r\n\r\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\r\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\r\nconst fuzzyRegExpCache = new LRUCache<string, RegExp>(10000); // bounded to 10000 elements\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] | null {\r\n // istanbul ignore next\r\n if (typeof word !== \"string\" || typeof wordToMatchAgainst !== \"string\") {\r\n return null; // return early for invalid input\r\n }\r\n\r\n // Form RegExp for wildcard matches\r\n let regexp = fuzzyRegExpCache.get(word);\r\n if (!regexp) {\r\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), \"i\");\r\n fuzzyRegExpCache.set(word, regexp);\r\n }\r\n\r\n // RegExp Filter\r\n const match = regexp.exec(wordToMatchAgainst);\r\n if (match) {\r\n return [{ start: match.index, end: match.index + match[0].length }];\r\n }\r\n\r\n // Default Filter\r\n return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\r\n}\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more\r\n * powerful than `matchesFuzzy`. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy2(pattern: string, word: string): IMatch[] | null {\r\n const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);\r\n return score ? createMatches(score) : null;\r\n}\r\n\r\n// #region --- fuzzyScore ---\r\n/**\r\n * @internal\r\n */\r\nexport function createMatches(score: undefined | FuzzyScore): IMatch[] {\r\n // istanbul ignore next\r\n if (typeof score === \"undefined\") {\r\n return [];\r\n }\r\n\r\n const matches = score[1].toString(2);\r\n const wordStart = score[2];\r\n const res: IMatch[] = [];\r\n\r\n for (let pos = wordStart; pos < _maxLen; pos++) {\r\n if (matches[matches.length - (pos + 1)] === \"1\") {\r\n const last = res[res.length - 1];\r\n if (last && last.end === pos) {\r\n last.end = pos + 1;\r\n } else {\r\n res.push({ start: pos, end: pos + 1 });\r\n }\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nconst _maxLen = 128;\r\n\r\nfunction initTable() {\r\n const table: number[][] = [];\r\n const row: number[] = [0];\r\n for (let i = 1; i <= _maxLen; i++) {\r\n row.push(-i);\r\n }\r\n for (let i = 0; i <= _maxLen; i++) {\r\n const thisRow = row.slice(0);\r\n thisRow[0] = -i;\r\n table.push(thisRow);\r\n }\r\n return table;\r\n}\r\n\r\nconst _table = initTable();\r\nconst _scores = initTable();\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\nconst _arrows = <Arrow[][]>initTable();\r\nconst _debug = false;\r\n\r\nfunction isSeparatorAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n case CharCode.Underline:\r\n case CharCode.Dash:\r\n case CharCode.Period:\r\n case CharCode.Space:\r\n case CharCode.Slash:\r\n case CharCode.Backslash:\r\n case CharCode.SingleQuote:\r\n case CharCode.DoubleQuote:\r\n case CharCode.Colon:\r\n case CharCode.DollarSign:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isWhitespaceAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n // istanbul ignore next\r\n case CharCode.Space:\r\n case CharCode.Tab:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isUpperCaseAtPos(pos: number, word: string, wordLow: string): boolean {\r\n return word[pos] !== wordLow[pos];\r\n}\r\n\r\n/** @internal */\r\nexport function isPatternInWord(patternLow: string, patternPos: number, patternLen: number, wordLow: string, wordPos: number, wordLen: number): boolean {\r\n while (patternPos < patternLen && wordPos < wordLen) {\r\n if (patternLow[patternPos] === wordLow[wordPos]) {\r\n patternPos += 1;\r\n }\r\n wordPos += 1;\r\n }\r\n return patternPos === patternLen; // pattern must be exhausted\r\n}\r\n\r\nconst enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 }\r\n\r\n/**\r\n * A tuple of three values.\r\n * 0. the score\r\n * 1. the matches encoded as bitmask (2^53)\r\n * 2. the offset at which matching started\r\n * @internal\r\n */\r\nexport type FuzzyScore = [number, number, number];\r\n\r\n/** @internal */\r\nexport namespace FuzzyScore { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * No matches and value `-100`\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\n export const Default: [-100, 0, 0] = <[-100, 0, 0]>Object.freeze([-100, 0, 0]);\r\n\r\n // istanbul ignore next\r\n /** @internal */\r\n export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] {\r\n return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;\r\n\r\n/** @internal */\r\nexport function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n // istanbul ignore next\r\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\r\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\r\n\r\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\r\n return undefined;\r\n }\r\n\r\n // Run a simple check if the characters of pattern occur\r\n // (in order) at all in word. If that isn't the case we\r\n // stop because no match will be possible\r\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {\r\n return undefined;\r\n }\r\n\r\n let row: number = 1;\r\n let column: number = 1;\r\n let patternPos = patternStart;\r\n let wordPos = wordStart;\r\n\r\n let hasStrongFirstMatch = false;\r\n\r\n // There will be a match, fill in tables\r\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\r\n\r\n for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {\r\n\r\n const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);\r\n\r\n if (patternPos === patternStart && score > 1) {\r\n hasStrongFirstMatch = true;\r\n }\r\n\r\n _scores[row][column] = score;\r\n\r\n const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);\r\n const top = _table[row - 1][column] + -1;\r\n const left = _table[row][column - 1] + -1;\r\n\r\n if (left >= top) {\r\n // left or diag\r\n if (left > diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left;\r\n } else if (left === diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n } else {\r\n // top or diag\r\n if (top > diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top;\r\n } else if (top === diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {\r\n return undefined;\r\n }\r\n\r\n _matchesCount = 0;\r\n _topScore = -100;\r\n _wordStart = wordStart;\r\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\r\n\r\n _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);\r\n if (_matchesCount === 0) {\r\n return undefined;\r\n }\r\n\r\n return [_topScore, _topMatch2, wordStart];\r\n}\r\n\r\nfunction _doScore(pattern: string, patternLow: string, patternPos: number, patternStart: number, word: string, wordLow: string, wordPos: number) {\r\n if (patternLow[patternPos] !== wordLow[wordPos]) {\r\n return -1;\r\n }\r\n if (wordPos === (patternPos - patternStart)) {\r\n // common prefix: `foobar <-> foobaz`\r\n // ^^^^^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\r\n // hitting upper-case: `foo <-> forOthers`\r\n // ^^ ^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\r\n // hitting a separator: `. <-> foo.bar`\r\n // ^\r\n return 5;\r\n\r\n } else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\r\n // post separator: `foo <-> bar_foo`\r\n // ^^^\r\n return 5;\r\n\r\n } else {\r\n return 1;\r\n }\r\n}\r\n\r\nlet _matchesCount: number = 0;\r\nlet _topMatch2: number = 0;\r\nlet _topScore: number = 0;\r\nlet _wordStart: number = 0;\r\nlet _firstMatchCanBeWeak: boolean = false;\r\n\r\nfunction _findAllMatches2(row: number, column: number, total: number, matches: number, lastMatched: boolean): void {\r\n\r\n if (_matchesCount >= 10 || total < -25) {\r\n // stop when having already 10 results, or\r\n // when a potential alignment as already 5 gaps\r\n return;\r\n }\r\n\r\n let simpleMatchCount = 0;\r\n\r\n while (row > 0 && column > 0) {\r\n\r\n const score = _scores[row][column];\r\n const arrow = _arrows[row][column];\r\n\r\n if (arrow === Arrow.Left) {\r\n // left -> no match, skip a word character\r\n column -= 1;\r\n if (lastMatched) {\r\n total -= 5; // new gap penalty\r\n } else if (matches !== 0) {\r\n total -= 1; // gap penalty after first match\r\n }\r\n lastMatched = false;\r\n simpleMatchCount = 0;\r\n } else {\r\n /* istanbul ignore else */\r\n if (arrow & Arrow.Diag) {\r\n if (arrow & Arrow.Left) {\r\n // left\r\n _findAllMatches2(\r\n row,\r\n column - 1,\r\n matches !== 0 ? total - 1 : total, // gap penalty after first match\r\n matches,\r\n lastMatched,\r\n );\r\n }\r\n\r\n // diag\r\n total += score;\r\n row -= 1;\r\n column -= 1;\r\n lastMatched = true;\r\n\r\n // match -> set a 1 at the word pos\r\n matches += 2 ** (column + _wordStart);\r\n\r\n // count simple matches and boost a row of\r\n // simple matches when they yield in a\r\n // strong match.\r\n if (score === 1) {\r\n simpleMatchCount += 1;\r\n\r\n if (row === 0 && !_firstMatchCanBeWeak) {\r\n // when the first match is a weak\r\n // match we discard it\r\n return undefined;\r\n }\r\n\r\n } else {\r\n // boost\r\n total += 1 + (simpleMatchCount * (score - 1));\r\n simpleMatchCount = 0;\r\n }\r\n\r\n } else {\r\n // istanbul ignore next\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n total -= column >= 3 ? 9 : column * 3; // late start penalty\r\n\r\n // dynamically keep track of the current top score\r\n // and insert the current best score at head, the rest at tail\r\n _matchesCount += 1;\r\n if (total > _topScore) {\r\n _topScore = total;\r\n _topMatch2 = matches;\r\n }\r\n}\r\n\r\n// #endregion\r\n\r\n// #region --- graceful ---\r\n/** @internal */\r\nexport function fuzzyScoreGracefulAggressive(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\r\n}\r\n\r\n/** @internal */\r\nexport function fuzzyScoreGraceful(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);\r\n}\r\n\r\nfunction fuzzyScoreWithPermutations(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, aggressive: boolean, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n\r\n if (top && !aggressive) {\r\n // when using the original pattern yield a result we`\r\n // return it unless we are aggressive and try to find\r\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\r\n return top;\r\n }\r\n\r\n // istanbul ignore else\r\n if (pattern.length >= 3) {\r\n // When the pattern is long enough then try a few (max 7)\r\n // permutations of the pattern to find a better match. The\r\n // permutations only swap neighbouring characters, e.g\r\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\r\n const tries = Math.min(7, pattern.length - 1);\r\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\r\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\r\n // istanbul ignore else\r\n if (newPattern) {\r\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n if (candidate) {\r\n candidate[0] -= 3; // permutation penalty\r\n // istanbul ignore else\r\n if (!top || candidate[0] > top[0]) {\r\n top = candidate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return top;\r\n}\r\n\r\nfunction nextTypoPermutation(pattern: string, patternPos: number): string | undefined {\r\n\r\n // istanbul ignore next\r\n if (patternPos + 1 >= pattern.length) {\r\n return undefined;\r\n }\r\n\r\n const swap1 = pattern[patternPos];\r\n const swap2 = pattern[patternPos + 1];\r\n\r\n // istanbul ignore next\r\n if (swap1 === swap2) {\r\n return undefined;\r\n }\r\n\r\n return pattern.slice(0, patternPos)\r\n + swap2\r\n + swap1\r\n + pattern.slice(patternPos + 2);\r\n}\r\n\r\n// #endregion\r\n"]}
|
@@ -6,7 +6,7 @@ import { BadgeType } from "../items/BadgeType";
|
|
6
6
|
import { ProvidedItem } from "../items/ProvidedItem";
|
7
7
|
import { WidgetState } from "./WidgetState";
|
8
8
|
/** Properties for a Widget.
|
9
|
-
* @deprecated in 3.6. Use [
|
9
|
+
* @deprecated in 3.6. Use [Widget]($appui-react) instead.
|
10
10
|
* @public
|
11
11
|
*/
|
12
12
|
export interface AbstractWidgetProps extends ProvidedItem {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @deprecated in 3.6. Use [
|
1
|
+
{"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @deprecated in 3.6. Use [Widget]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractWidgetProps extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** Gets the widget content. */\r\n readonly getWidgetContent: () => any;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Id used to uniquely identify the widget.\r\n * @note It is recommended to provide unique widget id to correctly save/restore App layout.\r\n */\r\n readonly id?: string;\r\n /** Default Widget state. Controls how the Widget is initially displayed. Defaults to WidgetState.Unloaded. */\r\n readonly defaultState?: WidgetState; // eslint-disable-line deprecation/deprecation\r\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false.\r\n * @deprecated in 3.0. Free-form widgets are obsolete.\r\n * */\r\n readonly isFreeform?: boolean;\r\n /** Application data attached to the Widget. */\r\n readonly applicationData?: any;\r\n /** optional data to used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Indicates whether this Widget is for the Tool Settings. */\r\n readonly isToolSettings?: boolean;\r\n /** Indicates whether this Widget is for the Status Bar. */\r\n readonly isStatusBar?: boolean;\r\n /** Indicates whether this Widget should fill the available space in the Zone. */\r\n readonly fillZone?: boolean;\r\n /** Indicates if widget can be popped out to a child window. Defaults to false. */\r\n readonly canPopout?: boolean;\r\n /** If the widget state is changed to `floating` and the floatingContainerId is defined, the widget will be added to a\r\n * floating panel by that name. If no name is specified, a GUID is used. */\r\n readonly floatingContainerId?: string;\r\n /** Indicates if widget can be in floating state, default to true. */\r\n readonly isFloatingStateSupported?: boolean;\r\n /** Indicates if floating widget is resizable, defaults to false which caused the widget to be auto-sized.. */\r\n readonly isFloatingStateWindowResizable?: boolean;\r\n /** Defines that default Top Left position when widget is floated via API calls */\r\n readonly defaultFloatingPosition?: { x: number, y: number };\r\n /** Widget priority */\r\n readonly priority?: number;\r\n /** Defines the SyncUi event Ids that will trigger the stateFunc to run to determine the state of the widget. */\r\n readonly syncEventIds?: string[];\r\n /** Function executed to determine the state of the widget.\r\n * Used by UI 1.0 widgets ONLY.\r\n * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.\r\n */\r\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState; // eslint-disable-line deprecation/deprecation\r\n /** Badge to be overlaid on the widget tab. */\r\n readonly badgeType?: BadgeType;\r\n /** Handler for widget state changed event */\r\n readonly onWidgetStateChanged?: () => void;\r\n /** Save transient DOM state (i.e. scroll offset). */\r\n readonly saveTransientState?: () => void;\r\n /** Restore transient DOM state.\r\n * @note Return true if the state is restored or the Widget will remount.\r\n */\r\n readonly restoreTransientState?: () => boolean;\r\n /** Optional default size to use when floating a widget. If not specified then the default is to size to content if possible.\r\n * Certain widget can't be intrinsically sized and must specify a content. These are typically ones that use a canvas element\r\n * internally. */\r\n defaultFloatingSize?: { width: number, height: number };\r\n /** Optional prop that tells the widget system to fade this widget out with the rest of the UI when it is in floating state */\r\n hideWithUiWhenFloating?: boolean;\r\n /** Optional prop specifying which Panel sides can be docking targets for this widget. If this prop is not specified, all sides are allowed.\r\n * An empty array is treated the same as an undefined prop, allowing all targets. */\r\n readonly allowedPanelTargets?: ReadonlyArray<\"left\"|\"right\"|\"bottom\"|\"top\">;\r\n}\r\n"]}
|
@@ -37,8 +37,7 @@ export const isStageLauncher = (item) => {
|
|
37
37
|
class BackstageItemUtilities {
|
38
38
|
}
|
39
39
|
/** Creates a stage launcher backstage item */
|
40
|
-
BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides
|
41
|
-
) => ({
|
40
|
+
BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides) => ({
|
42
41
|
groupPriority,
|
43
42
|
icon,
|
44
43
|
internalData: overrides?.internalData,
|
@@ -50,8 +49,7 @@ BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemP
|
|
50
49
|
...overrides,
|
51
50
|
});
|
52
51
|
/** Creates an action backstage item */
|
53
|
-
BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides
|
54
|
-
) => ({
|
52
|
+
BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides) => ({
|
55
53
|
execute,
|
56
54
|
groupPriority,
|
57
55
|
icon,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4DD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC5G,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC/G,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,
|
1
|
+
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4DD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC5G,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC/G,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,EACvG,EAAE,CAAC,CAAC;IAC5B,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,YAAY;IAChB,YAAY;IACZ,KAAK;IACL,OAAO,EAAE,YAAY;IACrB,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,uCAAuC;AACzB,uCAAgB,GAAG,CAC/B,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAsC,EACxH,QAA0C,EAAE,IAAsC,EAAE,SAAwC,EACvG,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;SA/BQ,sBAAsB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Backstage\r\n */\r\n\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\n\r\n/** Used to specify the item type added to the backstage menu.\r\n * @deprecated in 3.6. Use type guards instead.\r\n * @public\r\n */\r\nexport enum BackstageItemType {\r\n /** Item that executes an action function */\r\n ActionItem = 1,\r\n /** Item that activate a stage. */\r\n StageLauncher = 2,\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\r\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\r\n * allows extensions enough gaps to insert their own groups.\r\n */\r\n readonly groupPriority: number;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\r\n readonly id: string;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\r\n readonly isHidden?: boolean | ConditionalBooleanValue;\r\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\r\n readonly isDisabled?: boolean | ConditionalBooleanValue;\r\n /** Priority within a group (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Subtitle. */\r\n readonly subtitle?: string | ConditionalStringValue;\r\n /** Tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\r\n readonly isActive?: boolean | ConditionalBooleanValue;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly stageId: string;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line deprecation/deprecation\r\n\r\n/** BackstageActionItem type guard.\r\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** BackstageStageLauncher type guard.\r\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item */\r\n public static createStageLauncher = (\r\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>, // eslint-disable-line deprecation/deprecation\r\n ): BackstageStageLauncher => ({ // eslint-disable-line deprecation/deprecation\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n });\r\n\r\n /** Creates an action backstage item */\r\n public static createActionItem = (\r\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>, // eslint-disable-line deprecation/deprecation\r\n ): BackstageActionItem => ({ // eslint-disable-line deprecation/deprecation\r\n execute,\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n });\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AASH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAkBrC,mBAAmB;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAiB;IACrC,OAAO,UAAU,IAAY,EAAE,kBAA0B;QACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,C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C,CAAC,EAAE,UAAU,CAAC;UAC/B,KAAK;UACL,KAAK;UACL,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,aAAa","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\r\n\r\n/* eslint-disable no-console */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\nimport { CharCode } from \"./charCode\";\r\nimport { LRUCache } from \"./map\";\r\nimport * as strings from \"./strings\";\r\n\r\n/** Interface that returns indices of matches\r\n * @public\r\n */\r\nexport interface IMatch {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/**\r\n * IFilter defines filter function type\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to search for matches\r\n * @internal\r\n */\r\nexport type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;\r\n\r\n// Combined filters\r\n\r\n/**\r\n * @returns A filter which combines the provided set\r\n * of filters with an or. The *first* filters that\r\n * matches defined the return value of the returned\r\n * filter.\r\n * @internal\r\n */\r\nexport function or(...filter: IFilter[]): IFilter {\r\n return function (word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n for (let i = 0, len = filter.length; i < len; i++) {\r\n const match = filter[i](word, wordToMatchAgainst);\r\n if (match) {\r\n return match;\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n// Prefix\r\n\r\n/** @internal */\r\nexport const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);\r\n/** @internal */\r\nexport const matchesPrefix: IFilter = _matchesPrefix.bind(undefined, true);\r\n\r\nfunction _matchesPrefix(ignoreCase: boolean, word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\r\n return null;\r\n }\r\n\r\n let matches: boolean;\r\n if (ignoreCase) {\r\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\r\n } else {\r\n matches = wordToMatchAgainst.indexOf(word) === 0;\r\n }\r\n\r\n if (!matches) {\r\n return null;\r\n }\r\n\r\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\r\n}\r\n\r\n// Contiguous Substring\r\n\r\n/** @internal */\r\nexport function matchesContiguousSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\r\n if (index === -1) {\r\n return null;\r\n }\r\n\r\n return [{ start: index, end: index + word.length }];\r\n}\r\n\r\n// Substring\r\n\r\n/**\r\n * Return case insensitive substring matches\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\r\n}\r\n\r\nfunction _matchesSubString(word: string, wordToMatchAgainst: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === wordToMatchAgainst.length) {\r\n return null;\r\n } else {\r\n if (word[i] === wordToMatchAgainst[j]) {\r\n let result: IMatch[] | null = null;\r\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\r\n return join({ start: j, end: j + 1 }, result);\r\n }\r\n return null;\r\n }\r\n\r\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\r\n }\r\n}\r\n\r\n// CamelCase\r\n\r\nfunction isLower(code: number): boolean {\r\n return CharCode.a <= code && code <= CharCode.z;\r\n}\r\n\r\nfunction isUpper(code: number): boolean {\r\n return CharCode.A <= code && code <= CharCode.Z;\r\n}\r\n\r\nfunction isNumber(code: number): boolean {\r\n return CharCode.Digit0 <= code && code <= CharCode.Digit9;\r\n}\r\n\r\nfunction isWhitespace(code: number): boolean {\r\n return (\r\n code === CharCode.Space\r\n || code === CharCode.Tab\r\n || code === CharCode.LineFeed\r\n || code === CharCode.CarriageReturn\r\n );\r\n}\r\n\r\nconst wordSeparators = new Set<number>();\r\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\r\n .split(\"\")\r\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\r\n\r\nfunction isWordSeparator(code: number): boolean {\r\n return isWhitespace(code) || wordSeparators.has(code);\r\n}\r\n\r\nfunction charactersMatch(codeA: number, codeB: number): boolean {\r\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\r\n}\r\n\r\nfunction isAlphanumeric(code: number): boolean {\r\n return isLower(code) || isUpper(code) || isNumber(code);\r\n}\r\n\r\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\r\n if (tail.length === 0) {\r\n tail = [head];\r\n } else if (head.end === tail[0].start) {\r\n tail[0].start = head.start;\r\n } else {\r\n tail.unshift(head);\r\n }\r\n return tail;\r\n}\r\n\r\nfunction nextAnchor(camelCaseWord: string, start: number): number {\r\n for (let i = start; i < camelCaseWord.length; i++) {\r\n const c = camelCaseWord.charCodeAt(i);\r\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return camelCaseWord.length;\r\n}\r\n\r\nfunction _matchesCamelCase(word: string, camelCaseWord: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === camelCaseWord.length) {\r\n return null;\r\n } else if (word[i] !== camelCaseWord[j].toLowerCase()) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextUpperIndex = j + 1;\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\r\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\r\n nextUpperIndex++;\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\ninterface ICamelCaseAnalysis {\r\n upperPercent: number;\r\n lowerPercent: number;\r\n alphaPercent: number;\r\n numericPercent: number;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camelCaseWords.\r\nfunction analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {\r\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isAlphanumeric(code)) { alpha++; }\r\n if (isNumber(code)) { numeric++; }\r\n }\r\n\r\n const upperPercent = upper / word.length;\r\n const lowerPercent = lower / word.length;\r\n const alphaPercent = alpha / word.length;\r\n const numericPercent = numeric / word.length;\r\n\r\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\r\n}\r\n\r\nfunction isUpperCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent } = analysis;\r\n return lowerPercent === 0 && upperPercent > 0.6;\r\n}\r\n\r\nfunction isCamelCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\r\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camel case patterns.\r\nfunction isCamelCasePattern(word: string): boolean {\r\n let upper = 0, lower = 0, code = 0, whitespace = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isWhitespace(code)) { whitespace++; }\r\n }\r\n\r\n if ((upper === 0 || lower === 0) && whitespace === 0) {\r\n return word.length <= 30;\r\n } else {\r\n return upper <= 5;\r\n }\r\n}\r\n\r\n/**\r\n * Return matches treating \"camelCase\" words separately. For example the filter string \"gp\" would return two matches in string \"Git Pull\".\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesCamelCase(word: string, camelCaseWord: string): IMatch[] | null {\r\n if (!camelCaseWord) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.trim();\r\n\r\n if (camelCaseWord.length === 0) {\r\n return null;\r\n }\r\n\r\n if (!isCamelCasePattern(camelCaseWord)) {\r\n return null;\r\n }\r\n\r\n if (camelCaseWord.length > 60) {\r\n return null;\r\n }\r\n\r\n const analysis = analyzeCamelCaseWord(camelCaseWord);\r\n\r\n if (!isCamelCaseWord(analysis)) {\r\n // istanbul ignore next\r\n if (!isUpperCaseWord(analysis)) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.toLowerCase();\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\r\n i = nextAnchor(camelCaseWord, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Matches beginning of words supporting non-ASCII languages.\r\n * @param word Filter string\r\n * @param target String being searched\r\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\r\n * 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\").\r\n * Useful in cases where the target is words (e.g. command labels)\r\n * @internal\r\n */\r\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\r\n if (!target || target.length === 0) {\r\n return null;\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n target = target.toLowerCase();\r\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\r\n i = nextWord(target, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === target.length) {\r\n return null;\r\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextWordIndex = j + 1;\r\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\r\n // istanbul ignore else\r\n if (!contiguous) {\r\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\r\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\r\n nextWordIndex++;\r\n }\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\nfunction nextWord(word: string, start: number): number {\r\n for (let i = start; i < word.length; i++) {\r\n if (isWordSeparator(word.charCodeAt(i)) ||\r\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return word.length;\r\n}\r\n\r\n// Fuzzy\r\n\r\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\r\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\r\nconst fuzzyRegExpCache = new LRUCache<string, RegExp>(10000); // bounded to 10000 elements\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] | null {\r\n // istanbul ignore next\r\n if (typeof word !== \"string\" || typeof wordToMatchAgainst !== \"string\") {\r\n return null; // return early for invalid input\r\n }\r\n\r\n // Form RegExp for wildcard matches\r\n let regexp = fuzzyRegExpCache.get(word);\r\n if (!regexp) {\r\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), \"i\");\r\n fuzzyRegExpCache.set(word, regexp);\r\n }\r\n\r\n // RegExp Filter\r\n const match = regexp.exec(wordToMatchAgainst);\r\n if (match) {\r\n return [{ start: match.index, end: match.index + match[0].length }];\r\n }\r\n\r\n // Default Filter\r\n return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\r\n}\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more\r\n * powerful than `matchesFuzzy`. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy2(pattern: string, word: string): IMatch[] | null {\r\n const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);\r\n return score ? createMatches(score) : null;\r\n}\r\n\r\n// #region --- fuzzyScore ---\r\n/**\r\n * @internal\r\n */\r\nexport function createMatches(score: undefined | FuzzyScore): IMatch[] {\r\n // istanbul ignore next\r\n if (typeof score === \"undefined\") {\r\n return [];\r\n }\r\n\r\n const matches = score[1].toString(2);\r\n const wordStart = score[2];\r\n const res: IMatch[] = [];\r\n\r\n for (let pos = wordStart; pos < _maxLen; pos++) {\r\n if (matches[matches.length - (pos + 1)] === \"1\") {\r\n const last = res[res.length - 1];\r\n if (last && last.end === pos) {\r\n last.end = pos + 1;\r\n } else {\r\n res.push({ start: pos, end: pos + 1 });\r\n }\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nconst _maxLen = 128;\r\n\r\nfunction initTable() {\r\n const table: number[][] = [];\r\n const row: number[] = [0];\r\n for (let i = 1; i <= _maxLen; i++) {\r\n row.push(-i);\r\n }\r\n for (let i = 0; i <= _maxLen; i++) {\r\n const thisRow = row.slice(0);\r\n thisRow[0] = -i;\r\n table.push(thisRow);\r\n }\r\n return table;\r\n}\r\n\r\nconst _table = initTable();\r\nconst _scores = initTable();\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\nconst _arrows = <Arrow[][]>initTable();\r\nconst _debug = false;\r\n\r\nfunction isSeparatorAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n case CharCode.Underline:\r\n case CharCode.Dash:\r\n case CharCode.Period:\r\n case CharCode.Space:\r\n case CharCode.Slash:\r\n case CharCode.Backslash:\r\n case CharCode.SingleQuote:\r\n case CharCode.DoubleQuote:\r\n case CharCode.Colon:\r\n case CharCode.DollarSign:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isWhitespaceAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n // istanbul ignore next\r\n case CharCode.Space:\r\n case CharCode.Tab:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isUpperCaseAtPos(pos: number, word: string, wordLow: string): boolean {\r\n return word[pos] !== wordLow[pos];\r\n}\r\n\r\n/** @internal */\r\nexport function isPatternInWord(patternLow: string, patternPos: number, patternLen: number, wordLow: string, wordPos: number, wordLen: number): boolean {\r\n while (patternPos < patternLen && wordPos < wordLen) {\r\n if (patternLow[patternPos] === wordLow[wordPos]) {\r\n patternPos += 1;\r\n }\r\n wordPos += 1;\r\n }\r\n return patternPos === patternLen; // pattern must be exhausted\r\n}\r\n\r\nconst enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 }\r\n\r\n/**\r\n * A tuple of three values.\r\n * 0. the score\r\n * 1. the matches encoded as bitmask (2^53)\r\n * 2. the offset at which matching started\r\n * @internal\r\n */\r\nexport type FuzzyScore = [number, number, number];\r\n\r\n/** @internal */\r\nexport namespace FuzzyScore { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * No matches and value `-100`\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\n export const Default: [-100, 0, 0] = <[-100, 0, 0]>Object.freeze([-100, 0, 0]);\r\n\r\n // istanbul ignore next\r\n /** @internal */\r\n export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] {\r\n return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;\r\n\r\n/** @internal */\r\nexport function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n // istanbul ignore next\r\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\r\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\r\n\r\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\r\n return undefined;\r\n }\r\n\r\n // Run a simple check if the characters of pattern occur\r\n // (in order) at all in word. If that isn't the case we\r\n // stop because no match will be possible\r\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {\r\n return undefined;\r\n }\r\n\r\n let row: number = 1;\r\n let column: number = 1;\r\n let patternPos = patternStart;\r\n let wordPos = wordStart;\r\n\r\n let hasStrongFirstMatch = false;\r\n\r\n // There will be a match, fill in tables\r\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\r\n\r\n for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {\r\n\r\n const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);\r\n\r\n if (patternPos === patternStart && score > 1) {\r\n hasStrongFirstMatch = true;\r\n }\r\n\r\n _scores[row][column] = score;\r\n\r\n const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);\r\n const top = _table[row - 1][column] + -1;\r\n const left = _table[row][column - 1] + -1;\r\n\r\n if (left >= top) {\r\n // left or diag\r\n if (left > diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left;\r\n } else if (left === diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n } else {\r\n // top or diag\r\n if (top > diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top;\r\n } else if (top === diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {\r\n return undefined;\r\n }\r\n\r\n _matchesCount = 0;\r\n _topScore = -100;\r\n _wordStart = wordStart;\r\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\r\n\r\n _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);\r\n if (_matchesCount === 0) {\r\n return undefined;\r\n }\r\n\r\n return [_topScore, _topMatch2, wordStart];\r\n}\r\n\r\nfunction _doScore(pattern: string, patternLow: string, patternPos: number, patternStart: number, word: string, wordLow: string, wordPos: number) {\r\n if (patternLow[patternPos] !== wordLow[wordPos]) {\r\n return -1;\r\n }\r\n if (wordPos === (patternPos - patternStart)) {\r\n // common prefix: `foobar <-> foobaz`\r\n // ^^^^^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\r\n // hitting upper-case: `foo <-> forOthers`\r\n // ^^ ^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\r\n // hitting a separator: `. <-> foo.bar`\r\n // ^\r\n return 5;\r\n\r\n } else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\r\n // post separator: `foo <-> bar_foo`\r\n // ^^^\r\n return 5;\r\n\r\n } else {\r\n return 1;\r\n }\r\n}\r\n\r\nlet _matchesCount: number = 0;\r\nlet _topMatch2: number = 0;\r\nlet _topScore: number = 0;\r\nlet _wordStart: number = 0;\r\nlet _firstMatchCanBeWeak: boolean = false;\r\n\r\nfunction _findAllMatches2(row: number, column: number, total: number, matches: number, lastMatched: boolean): void {\r\n\r\n if (_matchesCount >= 10 || total < -25) {\r\n // stop when having already 10 results, or\r\n // when a potential alignment as already 5 gaps\r\n return;\r\n }\r\n\r\n let simpleMatchCount = 0;\r\n\r\n while (row > 0 && column > 0) {\r\n\r\n const score = _scores[row][column];\r\n const arrow = _arrows[row][column];\r\n\r\n if (arrow === Arrow.Left) {\r\n // left -> no match, skip a word character\r\n column -= 1;\r\n if (lastMatched) {\r\n total -= 5; // new gap penalty\r\n } else if (matches !== 0) {\r\n total -= 1; // gap penalty after first match\r\n }\r\n lastMatched = false;\r\n simpleMatchCount = 0;\r\n } else {\r\n /* istanbul ignore else */\r\n if (arrow & Arrow.Diag) {\r\n if (arrow & Arrow.Left) {\r\n // left\r\n _findAllMatches2(\r\n row,\r\n column - 1,\r\n matches !== 0 ? total - 1 : total, // gap penalty after first match\r\n matches,\r\n lastMatched\r\n );\r\n }\r\n\r\n // diag\r\n total += score;\r\n row -= 1;\r\n column -= 1;\r\n lastMatched = true;\r\n\r\n // match -> set a 1 at the word pos\r\n matches += 2 ** (column + _wordStart);\r\n\r\n // count simple matches and boost a row of\r\n // simple matches when they yield in a\r\n // strong match.\r\n if (score === 1) {\r\n simpleMatchCount += 1;\r\n\r\n if (row === 0 && !_firstMatchCanBeWeak) {\r\n // when the first match is a weak\r\n // match we discard it\r\n return undefined;\r\n }\r\n\r\n } else {\r\n // boost\r\n total += 1 + (simpleMatchCount * (score - 1));\r\n simpleMatchCount = 0;\r\n }\r\n\r\n } else {\r\n // istanbul ignore next\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n total -= column >= 3 ? 9 : column * 3; // late start penalty\r\n\r\n // dynamically keep track of the current top score\r\n // and insert the current best score at head, the rest at tail\r\n _matchesCount += 1;\r\n if (total > _topScore) {\r\n _topScore = total;\r\n _topMatch2 = matches;\r\n }\r\n}\r\n\r\n// #endregion\r\n\r\n// #region --- graceful ---\r\n/** @internal */\r\nexport function fuzzyScoreGracefulAggressive(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\r\n}\r\n\r\n/** @internal */\r\nexport function fuzzyScoreGraceful(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);\r\n}\r\n\r\nfunction fuzzyScoreWithPermutations(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, aggressive: boolean, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n\r\n if (top && !aggressive) {\r\n // when using the original pattern yield a result we`\r\n // return it unless we are aggressive and try to find\r\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\r\n return top;\r\n }\r\n\r\n // istanbul ignore else\r\n if (pattern.length >= 3) {\r\n // When the pattern is long enough then try a few (max 7)\r\n // permutations of the pattern to find a better match. The\r\n // permutations only swap neighbouring characters, e.g\r\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\r\n const tries = Math.min(7, pattern.length - 1);\r\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\r\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\r\n // istanbul ignore else\r\n if (newPattern) {\r\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n if (candidate) {\r\n candidate[0] -= 3; // permutation penalty\r\n // istanbul ignore else\r\n if (!top || candidate[0] > top[0]) {\r\n top = candidate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return top;\r\n}\r\n\r\nfunction nextTypoPermutation(pattern: string, patternPos: number): string | undefined {\r\n\r\n // istanbul ignore next\r\n if (patternPos + 1 >= pattern.length) {\r\n return undefined;\r\n }\r\n\r\n const swap1 = pattern[patternPos];\r\n const swap2 = pattern[patternPos + 1];\r\n\r\n // istanbul ignore next\r\n if (swap1 === swap2) {\r\n return undefined;\r\n }\r\n\r\n return pattern.slice(0, patternPos)\r\n + swap2\r\n + swap1\r\n + pattern.slice(patternPos + 2);\r\n}\r\n\r\n// #endregion\r\n"]}
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AASH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAkBrC,mBAAmB;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAiB;IACrC,OAAO,UAAU,IAAY,EAAE,kBAA0B;QACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;YAClD,IAAI,KAAK,EAAE;gBACT,OAAO,KAAK,CAAC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ACL,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,aAAa","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\r\n\r\n/* eslint-disable no-console */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\nimport { CharCode } from \"./charCode\";\r\nimport { LRUCache } from \"./map\";\r\nimport * as strings from \"./strings\";\r\n\r\n/** Interface that returns indices of matches\r\n * @public\r\n */\r\nexport interface IMatch {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/**\r\n * IFilter defines filter function type\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to search for matches\r\n * @internal\r\n */\r\nexport type IFilter = (word: string, wordToMatchAgainst: string) => IMatch[] | null;\r\n\r\n// Combined filters\r\n\r\n/**\r\n * @returns A filter which combines the provided set\r\n * of filters with an or. The *first* filters that\r\n * matches defined the return value of the returned\r\n * filter.\r\n * @internal\r\n */\r\nexport function or(...filter: IFilter[]): IFilter {\r\n return function (word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n for (let i = 0, len = filter.length; i < len; i++) {\r\n const match = filter[i](word, wordToMatchAgainst);\r\n if (match) {\r\n return match;\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n// Prefix\r\n\r\n/** @internal */\r\nexport const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);\r\n/** @internal */\r\nexport const matchesPrefix: IFilter = _matchesPrefix.bind(undefined, true);\r\n\r\nfunction _matchesPrefix(ignoreCase: boolean, word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\r\n return null;\r\n }\r\n\r\n let matches: boolean;\r\n if (ignoreCase) {\r\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\r\n } else {\r\n matches = wordToMatchAgainst.indexOf(word) === 0;\r\n }\r\n\r\n if (!matches) {\r\n return null;\r\n }\r\n\r\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\r\n}\r\n\r\n// Contiguous Substring\r\n\r\n/** @internal */\r\nexport function matchesContiguousSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\r\n if (index === -1) {\r\n return null;\r\n }\r\n\r\n return [{ start: index, end: index + word.length }];\r\n}\r\n\r\n// Substring\r\n\r\n/**\r\n * Return case insensitive substring matches\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesSubString(word: string, wordToMatchAgainst: string): IMatch[] | null {\r\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\r\n}\r\n\r\nfunction _matchesSubString(word: string, wordToMatchAgainst: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === wordToMatchAgainst.length) {\r\n return null;\r\n } else {\r\n if (word[i] === wordToMatchAgainst[j]) {\r\n let result: IMatch[] | null = null;\r\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\r\n return join({ start: j, end: j + 1 }, result);\r\n }\r\n return null;\r\n }\r\n\r\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\r\n }\r\n}\r\n\r\n// CamelCase\r\n\r\nfunction isLower(code: number): boolean {\r\n return CharCode.a <= code && code <= CharCode.z;\r\n}\r\n\r\nfunction isUpper(code: number): boolean {\r\n return CharCode.A <= code && code <= CharCode.Z;\r\n}\r\n\r\nfunction isNumber(code: number): boolean {\r\n return CharCode.Digit0 <= code && code <= CharCode.Digit9;\r\n}\r\n\r\nfunction isWhitespace(code: number): boolean {\r\n return (\r\n code === CharCode.Space\r\n || code === CharCode.Tab\r\n || code === CharCode.LineFeed\r\n || code === CharCode.CarriageReturn\r\n );\r\n}\r\n\r\nconst wordSeparators = new Set<number>();\r\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\r\n .split(\"\")\r\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\r\n\r\nfunction isWordSeparator(code: number): boolean {\r\n return isWhitespace(code) || wordSeparators.has(code);\r\n}\r\n\r\nfunction charactersMatch(codeA: number, codeB: number): boolean {\r\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\r\n}\r\n\r\nfunction isAlphanumeric(code: number): boolean {\r\n return isLower(code) || isUpper(code) || isNumber(code);\r\n}\r\n\r\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\r\n if (tail.length === 0) {\r\n tail = [head];\r\n } else if (head.end === tail[0].start) {\r\n tail[0].start = head.start;\r\n } else {\r\n tail.unshift(head);\r\n }\r\n return tail;\r\n}\r\n\r\nfunction nextAnchor(camelCaseWord: string, start: number): number {\r\n for (let i = start; i < camelCaseWord.length; i++) {\r\n const c = camelCaseWord.charCodeAt(i);\r\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return camelCaseWord.length;\r\n}\r\n\r\nfunction _matchesCamelCase(word: string, camelCaseWord: string, i: number, j: number): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === camelCaseWord.length) {\r\n return null;\r\n } else if (word[i] !== camelCaseWord[j].toLowerCase()) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextUpperIndex = j + 1;\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\r\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\r\n nextUpperIndex++;\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\ninterface ICamelCaseAnalysis {\r\n upperPercent: number;\r\n lowerPercent: number;\r\n alphaPercent: number;\r\n numericPercent: number;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camelCaseWords.\r\nfunction analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {\r\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isAlphanumeric(code)) { alpha++; }\r\n if (isNumber(code)) { numeric++; }\r\n }\r\n\r\n const upperPercent = upper / word.length;\r\n const lowerPercent = lower / word.length;\r\n const alphaPercent = alpha / word.length;\r\n const numericPercent = numeric / word.length;\r\n\r\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\r\n}\r\n\r\nfunction isUpperCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent } = analysis;\r\n return lowerPercent === 0 && upperPercent > 0.6;\r\n}\r\n\r\nfunction isCamelCaseWord(analysis: ICamelCaseAnalysis): boolean {\r\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\r\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\r\n}\r\n\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camel case patterns.\r\nfunction isCamelCasePattern(word: string): boolean {\r\n let upper = 0, lower = 0, code = 0, whitespace = 0;\r\n\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n\r\n if (isUpper(code)) { upper++; }\r\n if (isLower(code)) { lower++; }\r\n if (isWhitespace(code)) { whitespace++; }\r\n }\r\n\r\n if ((upper === 0 || lower === 0) && whitespace === 0) {\r\n return word.length <= 30;\r\n } else {\r\n return upper <= 5;\r\n }\r\n}\r\n\r\n/**\r\n * Return matches treating \"camelCase\" words separately. For example the filter string \"gp\" would return two matches in string \"Git Pull\".\r\n * @param word filter string\r\n * @param wordToMatchAgainst string to test\r\n * @internal\r\n */\r\nexport function matchesCamelCase(word: string, camelCaseWord: string): IMatch[] | null {\r\n if (!camelCaseWord) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.trim();\r\n\r\n if (camelCaseWord.length === 0) {\r\n return null;\r\n }\r\n\r\n if (!isCamelCasePattern(camelCaseWord)) {\r\n return null;\r\n }\r\n\r\n if (camelCaseWord.length > 60) {\r\n return null;\r\n }\r\n\r\n const analysis = analyzeCamelCaseWord(camelCaseWord);\r\n\r\n if (!isCamelCaseWord(analysis)) {\r\n // istanbul ignore next\r\n if (!isUpperCaseWord(analysis)) {\r\n return null;\r\n }\r\n\r\n camelCaseWord = camelCaseWord.toLowerCase();\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\r\n i = nextAnchor(camelCaseWord, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Matches beginning of words supporting non-ASCII languages.\r\n * @param word Filter string\r\n * @param target String being searched\r\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\r\n * 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\").\r\n * Useful in cases where the target is words (e.g. command labels)\r\n * @internal\r\n */\r\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\r\n if (!target || target.length === 0) {\r\n return null;\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n target = target.toLowerCase();\r\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\r\n i = nextWord(target, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === target.length) {\r\n return null;\r\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextWordIndex = j + 1;\r\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\r\n // istanbul ignore else\r\n if (!contiguous) {\r\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\r\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\r\n nextWordIndex++;\r\n }\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\nfunction nextWord(word: string, start: number): number {\r\n for (let i = start; i < word.length; i++) {\r\n if (isWordSeparator(word.charCodeAt(i)) ||\r\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return word.length;\r\n}\r\n\r\n// Fuzzy\r\n\r\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\r\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\r\nconst fuzzyRegExpCache = new LRUCache<string, RegExp>(10000); // bounded to 10000 elements\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] | null {\r\n // istanbul ignore next\r\n if (typeof word !== \"string\" || typeof wordToMatchAgainst !== \"string\") {\r\n return null; // return early for invalid input\r\n }\r\n\r\n // Form RegExp for wildcard matches\r\n let regexp = fuzzyRegExpCache.get(word);\r\n if (!regexp) {\r\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), \"i\");\r\n fuzzyRegExpCache.set(word, regexp);\r\n }\r\n\r\n // RegExp Filter\r\n const match = regexp.exec(wordToMatchAgainst);\r\n if (match) {\r\n return [{ start: match.index, end: match.index + match[0].length }];\r\n }\r\n\r\n // Default Filter\r\n return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\r\n}\r\n\r\n/**\r\n * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more\r\n * powerful than `matchesFuzzy`. This will only return a single match.\r\n * @internal\r\n */\r\nexport function matchesFuzzy2(pattern: string, word: string): IMatch[] | null {\r\n const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);\r\n return score ? createMatches(score) : null;\r\n}\r\n\r\n// #region --- fuzzyScore ---\r\n/**\r\n * @internal\r\n */\r\nexport function createMatches(score: undefined | FuzzyScore): IMatch[] {\r\n // istanbul ignore next\r\n if (typeof score === \"undefined\") {\r\n return [];\r\n }\r\n\r\n const matches = score[1].toString(2);\r\n const wordStart = score[2];\r\n const res: IMatch[] = [];\r\n\r\n for (let pos = wordStart; pos < _maxLen; pos++) {\r\n if (matches[matches.length - (pos + 1)] === \"1\") {\r\n const last = res[res.length - 1];\r\n if (last && last.end === pos) {\r\n last.end = pos + 1;\r\n } else {\r\n res.push({ start: pos, end: pos + 1 });\r\n }\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nconst _maxLen = 128;\r\n\r\nfunction initTable() {\r\n const table: number[][] = [];\r\n const row: number[] = [0];\r\n for (let i = 1; i <= _maxLen; i++) {\r\n row.push(-i);\r\n }\r\n for (let i = 0; i <= _maxLen; i++) {\r\n const thisRow = row.slice(0);\r\n thisRow[0] = -i;\r\n table.push(thisRow);\r\n }\r\n return table;\r\n}\r\n\r\nconst _table = initTable();\r\nconst _scores = initTable();\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\nconst _arrows = <Arrow[][]>initTable();\r\nconst _debug = false;\r\n\r\nfunction isSeparatorAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n case CharCode.Underline:\r\n case CharCode.Dash:\r\n case CharCode.Period:\r\n case CharCode.Space:\r\n case CharCode.Slash:\r\n case CharCode.Backslash:\r\n case CharCode.SingleQuote:\r\n case CharCode.DoubleQuote:\r\n case CharCode.Colon:\r\n case CharCode.DollarSign:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isWhitespaceAtPos(value: string, index: number): boolean {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n // istanbul ignore next\r\n case CharCode.Space:\r\n case CharCode.Tab:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isUpperCaseAtPos(pos: number, word: string, wordLow: string): boolean {\r\n return word[pos] !== wordLow[pos];\r\n}\r\n\r\n/** @internal */\r\nexport function isPatternInWord(patternLow: string, patternPos: number, patternLen: number, wordLow: string, wordPos: number, wordLen: number): boolean {\r\n while (patternPos < patternLen && wordPos < wordLen) {\r\n if (patternLow[patternPos] === wordLow[wordPos]) {\r\n patternPos += 1;\r\n }\r\n wordPos += 1;\r\n }\r\n return patternPos === patternLen; // pattern must be exhausted\r\n}\r\n\r\nconst enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 }\r\n\r\n/**\r\n * A tuple of three values.\r\n * 0. the score\r\n * 1. the matches encoded as bitmask (2^53)\r\n * 2. the offset at which matching started\r\n * @internal\r\n */\r\nexport type FuzzyScore = [number, number, number];\r\n\r\n/** @internal */\r\nexport namespace FuzzyScore { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * No matches and value `-100`\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\r\n export const Default: [-100, 0, 0] = <[-100, 0, 0]>Object.freeze([-100, 0, 0]);\r\n\r\n // istanbul ignore next\r\n /** @internal */\r\n export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] {\r\n return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type FuzzyScorer = (pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean) => FuzzyScore | undefined;\r\n\r\n/** @internal */\r\nexport function fuzzyScore(pattern: string, patternLow: string, patternStart: number, word: string, wordLow: string, wordStart: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n // istanbul ignore next\r\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\r\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\r\n\r\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\r\n return undefined;\r\n }\r\n\r\n // Run a simple check if the characters of pattern occur\r\n // (in order) at all in word. If that isn't the case we\r\n // stop because no match will be possible\r\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {\r\n return undefined;\r\n }\r\n\r\n let row: number = 1;\r\n let column: number = 1;\r\n let patternPos = patternStart;\r\n let wordPos = wordStart;\r\n\r\n let hasStrongFirstMatch = false;\r\n\r\n // There will be a match, fill in tables\r\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\r\n\r\n for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {\r\n\r\n const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);\r\n\r\n if (patternPos === patternStart && score > 1) {\r\n hasStrongFirstMatch = true;\r\n }\r\n\r\n _scores[row][column] = score;\r\n\r\n const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);\r\n const top = _table[row - 1][column] + -1;\r\n const left = _table[row][column - 1] + -1;\r\n\r\n if (left >= top) {\r\n // left or diag\r\n if (left > diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left;\r\n } else if (left === diag) {\r\n _table[row][column] = left;\r\n _arrows[row][column] = Arrow.Left | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n } else {\r\n // top or diag\r\n if (top > diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top;\r\n } else if (top === diag) {\r\n _table[row][column] = top;\r\n _arrows[row][column] = Arrow.Top | Arrow.Diag;\r\n } else {\r\n _table[row][column] = diag;\r\n _arrows[row][column] = Arrow.Diag;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {\r\n return undefined;\r\n }\r\n\r\n _matchesCount = 0;\r\n _topScore = -100;\r\n _wordStart = wordStart;\r\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\r\n\r\n _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);\r\n if (_matchesCount === 0) {\r\n return undefined;\r\n }\r\n\r\n return [_topScore, _topMatch2, wordStart];\r\n}\r\n\r\nfunction _doScore(pattern: string, patternLow: string, patternPos: number, patternStart: number, word: string, wordLow: string, wordPos: number) {\r\n if (patternLow[patternPos] !== wordLow[wordPos]) {\r\n return -1;\r\n }\r\n if (wordPos === (patternPos - patternStart)) {\r\n // common prefix: `foobar <-> foobaz`\r\n // ^^^^^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\r\n // hitting upper-case: `foo <-> forOthers`\r\n // ^^ ^\r\n if (pattern[patternPos] === word[wordPos]) {\r\n return 7;\r\n } else {\r\n return 5;\r\n }\r\n } else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\r\n // hitting a separator: `. <-> foo.bar`\r\n // ^\r\n return 5;\r\n\r\n } else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\r\n // post separator: `foo <-> bar_foo`\r\n // ^^^\r\n return 5;\r\n\r\n } else {\r\n return 1;\r\n }\r\n}\r\n\r\nlet _matchesCount: number = 0;\r\nlet _topMatch2: number = 0;\r\nlet _topScore: number = 0;\r\nlet _wordStart: number = 0;\r\nlet _firstMatchCanBeWeak: boolean = false;\r\n\r\nfunction _findAllMatches2(row: number, column: number, total: number, matches: number, lastMatched: boolean): void {\r\n\r\n if (_matchesCount >= 10 || total < -25) {\r\n // stop when having already 10 results, or\r\n // when a potential alignment as already 5 gaps\r\n return;\r\n }\r\n\r\n let simpleMatchCount = 0;\r\n\r\n while (row > 0 && column > 0) {\r\n\r\n const score = _scores[row][column];\r\n const arrow = _arrows[row][column];\r\n\r\n if (arrow === Arrow.Left) {\r\n // left -> no match, skip a word character\r\n column -= 1;\r\n if (lastMatched) {\r\n total -= 5; // new gap penalty\r\n } else if (matches !== 0) {\r\n total -= 1; // gap penalty after first match\r\n }\r\n lastMatched = false;\r\n simpleMatchCount = 0;\r\n } else {\r\n /* istanbul ignore else */\r\n if (arrow & Arrow.Diag) {\r\n if (arrow & Arrow.Left) {\r\n // left\r\n _findAllMatches2(\r\n row,\r\n column - 1,\r\n matches !== 0 ? total - 1 : total, // gap penalty after first match\r\n matches,\r\n lastMatched,\r\n );\r\n }\r\n\r\n // diag\r\n total += score;\r\n row -= 1;\r\n column -= 1;\r\n lastMatched = true;\r\n\r\n // match -> set a 1 at the word pos\r\n matches += 2 ** (column + _wordStart);\r\n\r\n // count simple matches and boost a row of\r\n // simple matches when they yield in a\r\n // strong match.\r\n if (score === 1) {\r\n simpleMatchCount += 1;\r\n\r\n if (row === 0 && !_firstMatchCanBeWeak) {\r\n // when the first match is a weak\r\n // match we discard it\r\n return undefined;\r\n }\r\n\r\n } else {\r\n // boost\r\n total += 1 + (simpleMatchCount * (score - 1));\r\n simpleMatchCount = 0;\r\n }\r\n\r\n } else {\r\n // istanbul ignore next\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n total -= column >= 3 ? 9 : column * 3; // late start penalty\r\n\r\n // dynamically keep track of the current top score\r\n // and insert the current best score at head, the rest at tail\r\n _matchesCount += 1;\r\n if (total > _topScore) {\r\n _topScore = total;\r\n _topMatch2 = matches;\r\n }\r\n}\r\n\r\n// #endregion\r\n\r\n// #region --- graceful ---\r\n/** @internal */\r\nexport function fuzzyScoreGracefulAggressive(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\r\n}\r\n\r\n/** @internal */\r\nexport function fuzzyScoreGraceful(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);\r\n}\r\n\r\nfunction fuzzyScoreWithPermutations(pattern: string, lowPattern: string, patternPos: number, word: string, lowWord: string, wordPos: number, aggressive: boolean, firstMatchCanBeWeak: boolean): FuzzyScore | undefined {\r\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n\r\n if (top && !aggressive) {\r\n // when using the original pattern yield a result we`\r\n // return it unless we are aggressive and try to find\r\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\r\n return top;\r\n }\r\n\r\n // istanbul ignore else\r\n if (pattern.length >= 3) {\r\n // When the pattern is long enough then try a few (max 7)\r\n // permutations of the pattern to find a better match. The\r\n // permutations only swap neighbouring characters, e.g\r\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\r\n const tries = Math.min(7, pattern.length - 1);\r\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\r\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\r\n // istanbul ignore else\r\n if (newPattern) {\r\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n if (candidate) {\r\n candidate[0] -= 3; // permutation penalty\r\n // istanbul ignore else\r\n if (!top || candidate[0] > top[0]) {\r\n top = candidate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return top;\r\n}\r\n\r\nfunction nextTypoPermutation(pattern: string, patternPos: number): string | undefined {\r\n\r\n // istanbul ignore next\r\n if (patternPos + 1 >= pattern.length) {\r\n return undefined;\r\n }\r\n\r\n const swap1 = pattern[patternPos];\r\n const swap2 = pattern[patternPos + 1];\r\n\r\n // istanbul ignore next\r\n if (swap1 === swap2) {\r\n return undefined;\r\n }\r\n\r\n return pattern.slice(0, patternPos)\r\n + swap2\r\n + swap1\r\n + pattern.slice(patternPos + 2);\r\n}\r\n\r\n// #endregion\r\n"]}
|
@@ -6,7 +6,7 @@ import { BadgeType } from "../items/BadgeType";
|
|
6
6
|
import { ProvidedItem } from "../items/ProvidedItem";
|
7
7
|
import { WidgetState } from "./WidgetState";
|
8
8
|
/** Properties for a Widget.
|
9
|
-
* @deprecated in 3.6. Use [
|
9
|
+
* @deprecated in 3.6. Use [Widget]($appui-react) instead.
|
10
10
|
* @public
|
11
11
|
*/
|
12
12
|
export interface AbstractWidgetProps extends ProvidedItem {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @deprecated in 3.6. Use [
|
1
|
+
{"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @deprecated in 3.6. Use [Widget]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractWidgetProps extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** Gets the widget content. */\r\n readonly getWidgetContent: () => any;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Id used to uniquely identify the widget.\r\n * @note It is recommended to provide unique widget id to correctly save/restore App layout.\r\n */\r\n readonly id?: string;\r\n /** Default Widget state. Controls how the Widget is initially displayed. Defaults to WidgetState.Unloaded. */\r\n readonly defaultState?: WidgetState; // eslint-disable-line deprecation/deprecation\r\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false.\r\n * @deprecated in 3.0. Free-form widgets are obsolete.\r\n * */\r\n readonly isFreeform?: boolean;\r\n /** Application data attached to the Widget. */\r\n readonly applicationData?: any;\r\n /** optional data to used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Indicates whether this Widget is for the Tool Settings. */\r\n readonly isToolSettings?: boolean;\r\n /** Indicates whether this Widget is for the Status Bar. */\r\n readonly isStatusBar?: boolean;\r\n /** Indicates whether this Widget should fill the available space in the Zone. */\r\n readonly fillZone?: boolean;\r\n /** Indicates if widget can be popped out to a child window. Defaults to false. */\r\n readonly canPopout?: boolean;\r\n /** If the widget state is changed to `floating` and the floatingContainerId is defined, the widget will be added to a\r\n * floating panel by that name. If no name is specified, a GUID is used. */\r\n readonly floatingContainerId?: string;\r\n /** Indicates if widget can be in floating state, default to true. */\r\n readonly isFloatingStateSupported?: boolean;\r\n /** Indicates if floating widget is resizable, defaults to false which caused the widget to be auto-sized.. */\r\n readonly isFloatingStateWindowResizable?: boolean;\r\n /** Defines that default Top Left position when widget is floated via API calls */\r\n readonly defaultFloatingPosition?: { x: number, y: number };\r\n /** Widget priority */\r\n readonly priority?: number;\r\n /** Defines the SyncUi event Ids that will trigger the stateFunc to run to determine the state of the widget. */\r\n readonly syncEventIds?: string[];\r\n /** Function executed to determine the state of the widget.\r\n * Used by UI 1.0 widgets ONLY.\r\n * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.\r\n */\r\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState; // eslint-disable-line deprecation/deprecation\r\n /** Badge to be overlaid on the widget tab. */\r\n readonly badgeType?: BadgeType;\r\n /** Handler for widget state changed event */\r\n readonly onWidgetStateChanged?: () => void;\r\n /** Save transient DOM state (i.e. scroll offset). */\r\n readonly saveTransientState?: () => void;\r\n /** Restore transient DOM state.\r\n * @note Return true if the state is restored or the Widget will remount.\r\n */\r\n readonly restoreTransientState?: () => boolean;\r\n /** Optional default size to use when floating a widget. If not specified then the default is to size to content if possible.\r\n * Certain widget can't be intrinsically sized and must specify a content. These are typically ones that use a canvas element\r\n * internally. */\r\n defaultFloatingSize?: { width: number, height: number };\r\n /** Optional prop that tells the widget system to fade this widget out with the rest of the UI when it is in floating state */\r\n hideWithUiWhenFloating?: boolean;\r\n /** Optional prop specifying which Panel sides can be docking targets for this widget. If this prop is not specified, all sides are allowed.\r\n * An empty array is treated the same as an undefined prop, allowing all targets. */\r\n readonly allowedPanelTargets?: ReadonlyArray<\"left\"|\"right\"|\"bottom\"|\"top\">;\r\n}\r\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@itwin/appui-abstract",
|
3
|
-
"version": "4.1.0-dev.
|
3
|
+
"version": "4.1.0-dev.71",
|
4
4
|
"description": "iTwin.js UI abstractions",
|
5
5
|
"main": "lib/cjs/appui-abstract.js",
|
6
6
|
"module": "lib/esm/appui-abstract.js",
|
@@ -22,64 +22,42 @@
|
|
22
22
|
"url": "http://www.bentley.com"
|
23
23
|
},
|
24
24
|
"peerDependencies": {
|
25
|
-
"@itwin/core-bentley": "^4.1.0-dev.
|
25
|
+
"@itwin/core-bentley": "^4.1.0-dev.71"
|
26
26
|
},
|
27
27
|
"//devDependencies": [
|
28
28
|
"NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
|
29
29
|
"NOTE: All tools used by scripts in this package must be listed as devDependencies"
|
30
30
|
],
|
31
31
|
"devDependencies": {
|
32
|
-
"@itwin/eslint-plugin": "
|
32
|
+
"@itwin/eslint-plugin": "4.0.0-dev.44",
|
33
33
|
"@types/chai": "4.3.1",
|
34
34
|
"@types/mocha": "^8.2.2",
|
35
|
-
"@types/node": "
|
36
|
-
"@types/sinon": "^
|
35
|
+
"@types/node": "18.16.1",
|
36
|
+
"@types/sinon": "^10.0.15",
|
37
37
|
"@types/sinon-chai": "^3.2.0",
|
38
38
|
"babel-loader": "~8.2.5",
|
39
39
|
"babel-plugin-istanbul": "~6.1.1",
|
40
40
|
"chai": "^4.1.2",
|
41
41
|
"cpx2": "^3.0.0",
|
42
|
-
"eslint": "^8.
|
42
|
+
"eslint": "^8.44.0",
|
43
43
|
"glob": "^7.1.2",
|
44
44
|
"ignore-styles": "^5.0.1",
|
45
45
|
"mocha": "^10.0.0",
|
46
46
|
"raf": "^3.4.0",
|
47
47
|
"rimraf": "^3.0.2",
|
48
|
-
"sinon": "^
|
48
|
+
"sinon": "^15.0.4",
|
49
49
|
"sinon-chai": "^3.2.0",
|
50
50
|
"source-map-loader": "^4.0.0",
|
51
51
|
"typescript": "~5.0.2",
|
52
52
|
"webpack": "^5.76.0",
|
53
|
-
"@itwin/build-tools": "4.1.0-dev.
|
54
|
-
"@itwin/
|
55
|
-
"@itwin/
|
53
|
+
"@itwin/build-tools": "4.1.0-dev.71",
|
54
|
+
"@itwin/core-bentley": "4.1.0-dev.71",
|
55
|
+
"@itwin/certa": "4.1.0-dev.71"
|
56
56
|
},
|
57
57
|
"//dependencies": [
|
58
58
|
"NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API",
|
59
59
|
"NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"
|
60
60
|
],
|
61
|
-
"eslintConfig": {
|
62
|
-
"plugins": [
|
63
|
-
"@itwin"
|
64
|
-
],
|
65
|
-
"extends": [
|
66
|
-
"plugin:@itwin/itwinjs-recommended",
|
67
|
-
"plugin:@itwin/jsdoc"
|
68
|
-
],
|
69
|
-
"rules": {
|
70
|
-
"max-statements-per-line": "off"
|
71
|
-
},
|
72
|
-
"overrides": [
|
73
|
-
{
|
74
|
-
"files": [
|
75
|
-
"src/test/**/*"
|
76
|
-
],
|
77
|
-
"rules": {
|
78
|
-
"deprecation/deprecation": "off"
|
79
|
-
}
|
80
|
-
}
|
81
|
-
]
|
82
|
-
},
|
83
61
|
"scripts": {
|
84
62
|
"build": "npm run -s build:cjs && npm run -s build:esm",
|
85
63
|
"build:cjs": "tsc 1>&2 --outDir lib/cjs",
|