@grafana/scenes 6.50.0--canary.1312.20168385420.0 → 6.50.0--canary.1312.20168396589.0
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/dist/esm/packages/scenes/src/locales/en-US/grafana-scenes.json.js +1 -1
- package/dist/esm/packages/scenes/src/variables/components/DrilldownRecommendations.js +1 -1
- package/dist/esm/packages/scenes/src/variables/components/DrilldownRecommendations.js.map +1 -1
- package/dist/{grafana-scenes-UNv1YXap.js → grafana-scenes-C9F_2hih.js} +2 -2
- package/dist/{grafana-scenes-UNv1YXap.js.map → grafana-scenes-C9F_2hih.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ var grafanaScenes = {
|
|
|
15
15
|
recent: "Recent",
|
|
16
16
|
"recent-empty": "No recent values",
|
|
17
17
|
recommended: "Recommended",
|
|
18
|
-
"recommended-empty": "No
|
|
18
|
+
"recommended-empty": "No recommended values",
|
|
19
19
|
tooltip: "Show recommendations"
|
|
20
20
|
},
|
|
21
21
|
"fallback-page": {
|
|
@@ -30,7 +30,7 @@ function DrilldownRecommendations({ recentDrilldowns, recommendedDrilldowns }) {
|
|
|
30
30
|
onClick: () => onClickAction(drilldown.onClick)
|
|
31
31
|
},
|
|
32
32
|
drilldown.label
|
|
33
|
-
)) : /* @__PURE__ */ React.createElement("div", { className: styles.emptyMessage }, /* @__PURE__ */ React.createElement(Trans, { i18nKey: "grafana-scenes.components.drilldown-recommendations.recommended-empty" }, "No
|
|
33
|
+
)) : /* @__PURE__ */ React.createElement("div", { className: styles.emptyMessage }, /* @__PURE__ */ React.createElement(Trans, { i18nKey: "grafana-scenes.components.drilldown-recommendations.recommended-empty" }, "No recommended values")))));
|
|
34
34
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
35
35
|
IconButton,
|
|
36
36
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrilldownRecommendations.js","sources":["../../../../../../../src/variables/components/DrilldownRecommendations.tsx"],"sourcesContent":["import { ClickOutsideWrapper, IconButton, Popover, Stack, Text, useStyles2 } from '@grafana/ui';\nimport React, { useRef, useState } from 'react';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { css, cx } from '@emotion/css';\nimport { Trans, t } from '@grafana/i18n';\n\nexport interface DrilldownPill {\n label: string;\n onClick: () => void;\n}\n\ninterface Props {\n recentDrilldowns?: DrilldownPill[];\n recommendedDrilldowns?: DrilldownPill[];\n}\n\nexport function DrilldownRecommendations({ recentDrilldowns, recommendedDrilldowns }: Props) {\n const styles = useStyles2(getStyles);\n\n const [isPopoverVisible, setPopoverVisible] = useState<boolean>(false);\n const ref = useRef<HTMLButtonElement>(null);\n\n const openPopover = () => {\n setPopoverVisible(true);\n };\n\n const onClickAction = (action: () => void) => {\n action();\n setPopoverVisible(false);\n };\n\n const content = (\n <ClickOutsideWrapper onClick={() => setPopoverVisible(false)} useCapture={true}>\n <div className={styles.menuContainer} onClick={(ev) => ev.stopPropagation()}>\n <Stack direction=\"column\">\n <Text weight=\"bold\" variant=\"bodySmall\" color=\"secondary\">\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recent\">Recent</Trans>\n </Text>\n {recentDrilldowns && recentDrilldowns.length > 0 ? (\n recentDrilldowns.map((drilldown) => (\n <div\n key={drilldown.label}\n className={cx(styles.combinedFilterPill)}\n onClick={() => onClickAction(drilldown.onClick)}\n >\n {drilldown.label}\n </div>\n ))\n ) : (\n <div className={styles.emptyMessage}>\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recent-empty\">No recent values</Trans>\n </div>\n )}\n <Text weight=\"bold\" variant=\"bodySmall\" color=\"secondary\">\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recommended\">Recommended</Trans>\n </Text>\n {recommendedDrilldowns && recommendedDrilldowns.length > 0 ? (\n recommendedDrilldowns.map((drilldown) => (\n <div\n key={drilldown.label}\n className={cx(styles.combinedFilterPill)}\n onClick={() => onClickAction(drilldown.onClick)}\n >\n {drilldown.label}\n </div>\n ))\n ) : (\n <div className={styles.emptyMessage}>\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recommended-empty\">\n No
|
|
1
|
+
{"version":3,"file":"DrilldownRecommendations.js","sources":["../../../../../../../src/variables/components/DrilldownRecommendations.tsx"],"sourcesContent":["import { ClickOutsideWrapper, IconButton, Popover, Stack, Text, useStyles2 } from '@grafana/ui';\nimport React, { useRef, useState } from 'react';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { css, cx } from '@emotion/css';\nimport { Trans, t } from '@grafana/i18n';\n\nexport interface DrilldownPill {\n label: string;\n onClick: () => void;\n}\n\ninterface Props {\n recentDrilldowns?: DrilldownPill[];\n recommendedDrilldowns?: DrilldownPill[];\n}\n\nexport function DrilldownRecommendations({ recentDrilldowns, recommendedDrilldowns }: Props) {\n const styles = useStyles2(getStyles);\n\n const [isPopoverVisible, setPopoverVisible] = useState<boolean>(false);\n const ref = useRef<HTMLButtonElement>(null);\n\n const openPopover = () => {\n setPopoverVisible(true);\n };\n\n const onClickAction = (action: () => void) => {\n action();\n setPopoverVisible(false);\n };\n\n const content = (\n <ClickOutsideWrapper onClick={() => setPopoverVisible(false)} useCapture={true}>\n <div className={styles.menuContainer} onClick={(ev) => ev.stopPropagation()}>\n <Stack direction=\"column\">\n <Text weight=\"bold\" variant=\"bodySmall\" color=\"secondary\">\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recent\">Recent</Trans>\n </Text>\n {recentDrilldowns && recentDrilldowns.length > 0 ? (\n recentDrilldowns.map((drilldown) => (\n <div\n key={drilldown.label}\n className={cx(styles.combinedFilterPill)}\n onClick={() => onClickAction(drilldown.onClick)}\n >\n {drilldown.label}\n </div>\n ))\n ) : (\n <div className={styles.emptyMessage}>\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recent-empty\">No recent values</Trans>\n </div>\n )}\n <Text weight=\"bold\" variant=\"bodySmall\" color=\"secondary\">\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recommended\">Recommended</Trans>\n </Text>\n {recommendedDrilldowns && recommendedDrilldowns.length > 0 ? (\n recommendedDrilldowns.map((drilldown) => (\n <div\n key={drilldown.label}\n className={cx(styles.combinedFilterPill)}\n onClick={() => onClickAction(drilldown.onClick)}\n >\n {drilldown.label}\n </div>\n ))\n ) : (\n <div className={styles.emptyMessage}>\n <Trans i18nKey=\"grafana-scenes.components.drilldown-recommendations.recommended-empty\">\n No recommended values\n </Trans>\n </div>\n )}\n </Stack>\n </div>\n </ClickOutsideWrapper>\n );\n\n return (\n <>\n <IconButton\n name=\"plus\"\n tooltip={t('grafana-scenes.components.drilldown-recommendations.tooltip', 'Show recommendations')}\n ref={ref}\n className={cx(isPopoverVisible && styles.iconActive)}\n onClick={(ev) => {\n openPopover();\n ev.stopPropagation();\n }}\n />\n\n {isPopoverVisible && ref.current && (\n <Popover\n content={content}\n onKeyDown={(event) => {\n if (event.key === ' ') {\n event.stopPropagation();\n }\n }}\n placement=\"bottom-start\"\n referenceElement={ref.current}\n show\n />\n )}\n </>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n menuContainer: css({\n display: 'flex',\n flexDirection: 'column',\n background: theme.colors.background.elevated,\n border: `1px solid ${theme.colors.border.weak}`,\n borderRadius: theme.shape.radius.default,\n boxShadow: theme.shadows.z3,\n padding: theme.spacing(2),\n }),\n combinedFilterPill: css({\n alignItems: 'center',\n background: theme.colors.action.selected,\n borderRadius: theme.shape.radius.default,\n border: `1px solid ${theme.colors.border.weak}`,\n padding: theme.spacing(0.2, 1),\n color: theme.colors.text.primary,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n minHeight: theme.spacing(2.75),\n ...theme.typography.bodySmall,\n fontWeight: theme.typography.fontWeightBold,\n cursor: 'pointer',\n\n '&:hover': {\n background: theme.colors.action.hover,\n },\n }),\n iconActive: css({\n '&:before': {\n backgroundColor: theme.colors.action.hover,\n opacity: 1,\n },\n }),\n emptyMessage: css({\n padding: theme.spacing(2),\n textAlign: 'center',\n color: theme.colors.text.secondary,\n }),\n});\n"],"names":[],"mappings":";;;;;AAgBO,SAAS,wBAAyB,CAAA,EAAE,gBAAkB,EAAA,qBAAA,EAAgC,EAAA;AAC3F,EAAM,MAAA,MAAA,GAAS,WAAW,SAAS,CAAA;AAEnC,EAAA,MAAM,CAAC,gBAAA,EAAkB,iBAAiB,CAAA,GAAI,SAAkB,KAAK,CAAA;AACrE,EAAM,MAAA,GAAA,GAAM,OAA0B,IAAI,CAAA;AAE1C,EAAA,MAAM,cAAc,MAAM;AACxB,IAAA,iBAAA,CAAkB,IAAI,CAAA;AAAA,GACxB;AAEA,EAAM,MAAA,aAAA,GAAgB,CAAC,MAAuB,KAAA;AAC5C,IAAO,MAAA,EAAA;AACP,IAAA,iBAAA,CAAkB,KAAK,CAAA;AAAA,GACzB;AAEA,EAAM,MAAA,OAAA,uCACH,mBAAoB,EAAA,EAAA,OAAA,EAAS,MAAM,iBAAkB,CAAA,KAAK,GAAG,UAAY,EAAA,IAAA,EAAA,sCACvE,KAAI,EAAA,EAAA,SAAA,EAAW,OAAO,aAAe,EAAA,OAAA,EAAS,CAAC,EAAO,KAAA,EAAA,CAAG,eAAgB,EAAA,EAAA,kBACvE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAM,WAAU,QACf,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,MAAO,EAAA,MAAA,EAAO,SAAQ,WAAY,EAAA,KAAA,EAAM,WAC5C,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,EAAA,EAAA,OAAA,EAAQ,gEAA6D,QAAM,CACpF,GACC,gBAAoB,IAAA,gBAAA,CAAiB,SAAS,CAC7C,GAAA,gBAAA,CAAiB,GAAI,CAAA,CAAC,SACpB,qBAAA,KAAA,CAAA,aAAA;AAAA,IA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19
19
|
recommended: "Recommended",
|
|
20
|
-
"recommended-empty": "No
|
|
20
|
+
"recommended-empty": "No recommended values",
|
|
21
21
|
tooltip: "Show recommendations"
|
|
22
22
|
},
|
|
23
23
|
"fallback-page": {
|
|
@@ -171,4 +171,4 @@ var grafanaScenes = {
|
|
|
171
171
|
};
|
|
172
172
|
|
|
173
173
|
exports.default = grafanaScenes;
|
|
174
|
-
//# sourceMappingURL=grafana-scenes-
|
|
174
|
+
//# sourceMappingURL=grafana-scenes-C9F_2hih.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grafana-scenes-
|
|
1
|
+
{"version":3,"file":"grafana-scenes-C9F_2hih.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -5600,7 +5600,7 @@ function DrilldownRecommendations({ recentDrilldowns, recommendedDrilldowns }) {
|
|
|
5600
5600
|
onClick: () => onClickAction(drilldown.onClick)
|
|
5601
5601
|
},
|
|
5602
5602
|
drilldown.label
|
|
5603
|
-
)) : /* @__PURE__ */ React__default.default.createElement("div", { className: styles.emptyMessage }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.drilldown-recommendations.recommended-empty" }, "No
|
|
5603
|
+
)) : /* @__PURE__ */ React__default.default.createElement("div", { className: styles.emptyMessage }, /* @__PURE__ */ React__default.default.createElement(i18n.Trans, { i18nKey: "grafana-scenes.components.drilldown-recommendations.recommended-empty" }, "No recommended values")))));
|
|
5604
5604
|
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
|
|
5605
5605
|
ui.IconButton,
|
|
5606
5606
|
{
|
|
@@ -16693,7 +16693,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
16693
16693
|
switch (path) {
|
|
16694
16694
|
case '../locales/cs-CZ/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-DPdlSPjz.js'); });
|
|
16695
16695
|
case '../locales/de-DE/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-BHIE4ld0.js'); });
|
|
16696
|
-
case '../locales/en-US/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-
|
|
16696
|
+
case '../locales/en-US/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-C9F_2hih.js'); });
|
|
16697
16697
|
case '../locales/es-ES/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-D4tq59Dc.js'); });
|
|
16698
16698
|
case '../locales/fr-FR/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-Ce77KCbO.js'); });
|
|
16699
16699
|
case '../locales/hu-HU/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-DMYCnFop.js'); });
|