@grafana/scenes 5.5.2--canary.830.10005065313.0 → 5.6.1--canary.840.10038144895.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/dist/esm/core/SceneTimeRange.js +13 -9
- package/dist/esm/core/SceneTimeRange.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/querying/SceneQueryRunner.js +2 -1
- package/dist/esm/querying/SceneQueryRunner.js.map +1 -1
- package/dist/esm/querying/layers/annotations/AnnotationsDataLayer.js +4 -1
- package/dist/esm/querying/layers/annotations/AnnotationsDataLayer.js.map +1 -1
- package/dist/esm/querying/layers/annotations/standardAnnotationQuery.js +2 -1
- package/dist/esm/querying/layers/annotations/standardAnnotationQuery.js.map +1 -1
- package/dist/esm/utils/SafeSerializableSceneObject.js +39 -0
- package/dist/esm/utils/SafeSerializableSceneObject.js.map +1 -0
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js +4 -1
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js +6 -13
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js.map +1 -1
- package/dist/esm/variables/groupby/GroupByVariable.js +8 -5
- package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
- package/dist/esm/variables/variants/query/QueryVariable.js +3 -2
- package/dist/esm/variables/variants/query/QueryVariable.js.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.js +288 -806
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js +0 -406
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js.map +0 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxEditSwitch.js +0 -113
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxEditSwitch.js.map +0 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxRenderer.js +0 -63
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxRenderer.js.map +0 -1
@@ -1,63 +0,0 @@
|
|
1
|
-
import { css } from '@emotion/css';
|
2
|
-
import { useStyles2, Icon } from '@grafana/ui';
|
3
|
-
import React, { memo, useRef } from 'react';
|
4
|
-
import { AdHocCombobox } from './AdHocFiltersCombobox.js';
|
5
|
-
import { AdHocFiltersComboboxEditSwitch } from './AdHocFiltersComboboxEditSwitch.js';
|
6
|
-
|
7
|
-
const AdHocFiltersComboboxRenderer = memo(function AdHocFiltersComboboxRenderer2({
|
8
|
-
model
|
9
|
-
}) {
|
10
|
-
const { filters } = model.useState();
|
11
|
-
const styles = useStyles2(getStyles);
|
12
|
-
const focusOnInputRef = useRef();
|
13
|
-
return /* @__PURE__ */ React.createElement("div", {
|
14
|
-
className: styles.comboboxWrapper,
|
15
|
-
onClick: () => {
|
16
|
-
var _a;
|
17
|
-
(_a = focusOnInputRef.current) == null ? void 0 : _a.call(focusOnInputRef);
|
18
|
-
}
|
19
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
20
|
-
name: "filter",
|
21
|
-
className: styles.filterIcon,
|
22
|
-
size: "lg"
|
23
|
-
}), filters.map((filter, index) => /* @__PURE__ */ React.createElement(AdHocFiltersComboboxEditSwitch, {
|
24
|
-
key: index,
|
25
|
-
filter,
|
26
|
-
model
|
27
|
-
})), /* @__PURE__ */ React.createElement(AdHocCombobox, {
|
28
|
-
model,
|
29
|
-
wip: true,
|
30
|
-
ref: focusOnInputRef
|
31
|
-
}));
|
32
|
-
});
|
33
|
-
const getStyles = (theme) => ({
|
34
|
-
comboboxWrapper: css({
|
35
|
-
display: "flex",
|
36
|
-
flexWrap: "wrap",
|
37
|
-
alignItems: "center",
|
38
|
-
columnGap: theme.spacing(1),
|
39
|
-
rowGap: theme.spacing(0.5),
|
40
|
-
minHeight: theme.spacing(4),
|
41
|
-
backgroundColor: theme.components.input.background,
|
42
|
-
border: `1px solid ${theme.colors.border.strong}`,
|
43
|
-
borderRadius: theme.shape.radius.default,
|
44
|
-
paddingInline: theme.spacing(1),
|
45
|
-
paddingBlock: theme.spacing(0.5),
|
46
|
-
flexGrow: 1,
|
47
|
-
"&:focus-within": {
|
48
|
-
outline: "2px dotted transparent",
|
49
|
-
outlineOffset: "2px",
|
50
|
-
boxShadow: `0 0 0 2px ${theme.colors.background.canvas}, 0 0 0px 4px ${theme.colors.primary.main}`,
|
51
|
-
transitionTimingFunction: `cubic-bezier(0.19, 1, 0.22, 1)`,
|
52
|
-
transitionDuration: "0.2s",
|
53
|
-
transitionProperty: "outline, outline-offset, box-shadow"
|
54
|
-
}
|
55
|
-
}),
|
56
|
-
filterIcon: css({
|
57
|
-
color: theme.colors.text.secondary,
|
58
|
-
alignSelf: "center"
|
59
|
-
})
|
60
|
-
});
|
61
|
-
|
62
|
-
export { AdHocFiltersComboboxRenderer };
|
63
|
-
//# sourceMappingURL=AdHocFiltersComboboxRenderer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"AdHocFiltersComboboxRenderer.js","sources":["../../../../../src/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxRenderer.tsx"],"sourcesContent":["import { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Icon, useStyles2 } from '@grafana/ui';\nimport React, { memo, useRef } from 'react';\nimport { AdHocCombobox } from './AdHocFiltersCombobox';\nimport { AdHocFiltersVariable } from '../AdHocFiltersVariable';\nimport { AdHocFiltersComboboxEditSwitch } from './AdHocFiltersComboboxEditSwitch';\n\nexport const AdHocFiltersComboboxRenderer = memo(function AdHocFiltersComboboxRenderer({\n model,\n}: {\n model: AdHocFiltersVariable;\n}) {\n const { filters } = model.useState();\n const styles = useStyles2(getStyles);\n const focusOnInputRef = useRef<() => void>();\n\n return (\n <div\n className={styles.comboboxWrapper}\n onClick={() => {\n focusOnInputRef.current?.();\n }}\n >\n <Icon name=\"filter\" className={styles.filterIcon} size=\"lg\" />\n\n {filters.map((filter, index) => (\n <AdHocFiltersComboboxEditSwitch key={index} filter={filter} model={model} />\n ))}\n\n <AdHocCombobox model={model} wip ref={focusOnInputRef} />\n </div>\n );\n});\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n comboboxWrapper: css({\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n columnGap: theme.spacing(1),\n rowGap: theme.spacing(0.5),\n minHeight: theme.spacing(4),\n backgroundColor: theme.components.input.background,\n border: `1px solid ${theme.colors.border.strong}`,\n borderRadius: theme.shape.radius.default,\n paddingInline: theme.spacing(1),\n paddingBlock: theme.spacing(0.5),\n flexGrow: 1,\n\n '&:focus-within': {\n outline: '2px dotted transparent',\n outlineOffset: '2px',\n boxShadow: `0 0 0 2px ${theme.colors.background.canvas}, 0 0 0px 4px ${theme.colors.primary.main}`,\n transitionTimingFunction: `cubic-bezier(0.19, 1, 0.22, 1)`,\n transitionDuration: '0.2s',\n transitionProperty: 'outline, outline-offset, box-shadow',\n },\n }),\n filterIcon: css({\n color: theme.colors.text.secondary,\n alignSelf: 'center',\n }),\n});\n"],"names":["AdHocFiltersComboboxRenderer"],"mappings":";;;;;;AAQa,MAAA,4BAAA,GAA+B,IAAK,CAAA,SAASA,6BAA6B,CAAA;AAAA,EACrF,KAAA;AACF,CAEG,EAAA;AACD,EAAA,MAAM,EAAE,OAAA,EAAY,GAAA,KAAA,CAAM,QAAS,EAAA,CAAA;AACnC,EAAM,MAAA,MAAA,GAAS,WAAW,SAAS,CAAA,CAAA;AACnC,EAAA,MAAM,kBAAkB,MAAmB,EAAA,CAAA;AAE3C,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IACC,WAAW,MAAO,CAAA,eAAA;AAAA,IAClB,SAAS,MAAM;AApBrB,MAAA,IAAA,EAAA,CAAA;AAqBQ,MAAA,CAAA,EAAA,GAAA,eAAA,CAAgB,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