@grafana/scenes 5.3.6 → 5.4.0--canary.813.9776503756.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/scenes",
3
- "version": "5.3.6",
3
+ "version": "5.4.0--canary.813.9776503756.0",
4
4
  "description": "Grafana framework for building dynamic dashboards",
5
5
  "author": "Grafana Labs",
6
6
  "license": "AGPL-3.0-only",
@@ -113,5 +113,5 @@
113
113
  "prettier --write"
114
114
  ]
115
115
  },
116
- "gitHead": "0271814d32818f0c9bdad2350789c912ebab27fb"
116
+ "gitHead": "9d75996f79f3ba18e69815c30df5f7753a4c56a7"
117
117
  }
@@ -1,40 +0,0 @@
1
- import uFuzzy from '@leeoniya/ufuzzy';
2
-
3
- function getAdhocOptionSearcher(options) {
4
- const ufuzzy = new uFuzzy();
5
- const haystack = [];
6
- const limit = 1e4;
7
- return (search) => {
8
- var _a;
9
- if (search === "") {
10
- if (options.length > limit) {
11
- return options.slice(0, limit);
12
- } else {
13
- return options;
14
- }
15
- }
16
- if (haystack.length === 0) {
17
- for (let i = 0; i < options.length; i++) {
18
- haystack.push((_a = options[i].label) != null ? _a : String(options[i].value));
19
- }
20
- }
21
- const idxs = ufuzzy.filter(haystack, search);
22
- const filteredOptions = [];
23
- if (idxs) {
24
- for (let i = 0; i < idxs.length; i++) {
25
- filteredOptions.push(options[idxs[i]]);
26
- if (filteredOptions.length > limit) {
27
- return filteredOptions;
28
- }
29
- }
30
- return filteredOptions;
31
- }
32
- if (options.length > limit) {
33
- return options.slice(0, limit);
34
- }
35
- return options;
36
- };
37
- }
38
-
39
- export { getAdhocOptionSearcher };
40
- //# sourceMappingURL=getAdhocOptionSearcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAdhocOptionSearcher.js","sources":["../../../../src/variables/adhoc/getAdhocOptionSearcher.ts"],"sourcesContent":["import uFuzzy from '@leeoniya/ufuzzy';\nimport { SelectableValue } from '@grafana/data';\n\nexport function getAdhocOptionSearcher(\n options: SelectableValue[],\n) {\n const ufuzzy = new uFuzzy();\n const haystack: string[] = [];\n const limit = 10000;\n\n return (search: string) => {\n if (search === '') {\n if (options.length > limit) {\n return options.slice(0, limit);\n } else {\n return options;\n }\n }\n\n if (haystack.length === 0) {\n for (let i = 0; i < options.length; i++) {\n haystack.push(options[i].label ?? String(options[i].value));\n }\n }\n\n const idxs = ufuzzy.filter(haystack, search);\n const filteredOptions: SelectableValue[] = [];\n\n if (idxs) {\n for (let i = 0; i < idxs.length; i++) {\n filteredOptions.push(options[idxs[i]]);\n\n if (filteredOptions.length > limit) {\n return filteredOptions;\n }\n }\n\n return filteredOptions;\n }\n\n if (options.length > limit) {\n return options.slice(0, limit);\n }\n\n return options;\n };\n}\n"],"names":[],"mappings":";;AAGO,SAAS,uBACd,OACA,EAAA;AACA,EAAM,MAAA,MAAA,GAAS,IAAI,MAAO,EAAA,CAAA;AAC1B,EAAA,MAAM,WAAqB,EAAC,CAAA;AAC5B,EAAA,MAAM,KAAQ,GAAA,GAAA,CAAA;AAEd,EAAA,OAAO,CAAC,MAAmB,KAAA;AAV7B,IAAA,IAAA,EAAA,CAAA;AAWI,IAAA,IAAI,WAAW,EAAI,EAAA;AACjB,MAAI,IAAA,OAAA,CAAQ,SAAS,KAAO,EAAA;AAC1B,QAAO,OAAA,OAAA,CAAQ,KAAM,CAAA,CAAA,EAAG,KAAK,CAAA,CAAA;AAAA,OACxB,MAAA;AACL,QAAO,OAAA,OAAA,CAAA;AAAA,OACT;AAAA,KACF;AAEA,IAAI,IAAA,QAAA,CAAS,WAAW,CAAG,EAAA;AACzB,MAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,OAAA,CAAQ,QAAQ,CAAK,EAAA,EAAA;AACvC,QAAS,QAAA,CAAA,IAAA,CAAA,CAAK,aAAQ,CAAG,CAAA,CAAA,KAAA,KAAX,YAAoB,MAAO,CAAA,OAAA,CAAQ,CAAG,CAAA,CAAA,KAAK,CAAC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