@perses-dev/dashboards 0.16.0 → 0.18.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.
Files changed (98) hide show
  1. package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +52 -41
  2. package/dist/cjs/components/GridLayout/GridContainer.js +2 -2
  3. package/dist/cjs/components/GridLayout/GridLayout.js +13 -2
  4. package/dist/cjs/components/GridLayout/GridTitle.js +4 -6
  5. package/dist/cjs/components/Panel/PanelHeader.js +1 -1
  6. package/dist/cjs/components/PanelDrawer/PanelDrawer.js +3 -4
  7. package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +28 -5
  8. package/dist/cjs/components/TimeRangeControls/TimeRangeControls.test.js +11 -5
  9. package/dist/cjs/components/Variables/Variable.js +2 -46
  10. package/dist/cjs/components/Variables/VariableEditor.js +142 -130
  11. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +318 -167
  12. package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +5 -4
  13. package/dist/cjs/components/Variables/VariableList.js +13 -8
  14. package/dist/cjs/components/Variables/variable-model.js +106 -0
  15. package/dist/cjs/components/Variables/variable-model.test.js +106 -0
  16. package/dist/cjs/context/TemplateVariableProvider/query-params.js +3 -1
  17. package/dist/cjs/context/index.js +0 -1
  18. package/dist/cjs/views/ViewDashboard/DashboardApp.js +2 -1
  19. package/dist/cjs/views/ViewDashboard/ViewDashboard.js +6 -4
  20. package/dist/cjs/views/ViewDashboard/tests/panelGroups.test.js +4 -2
  21. package/dist/components/DashboardToolbar/DashboardToolbar.d.ts +1 -0
  22. package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
  23. package/dist/components/DashboardToolbar/DashboardToolbar.js +53 -42
  24. package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
  25. package/dist/components/GridLayout/GridContainer.js +2 -2
  26. package/dist/components/GridLayout/GridContainer.js.map +1 -1
  27. package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
  28. package/dist/components/GridLayout/GridLayout.js +13 -2
  29. package/dist/components/GridLayout/GridLayout.js.map +1 -1
  30. package/dist/components/GridLayout/GridTitle.d.ts.map +1 -1
  31. package/dist/components/GridLayout/GridTitle.js +4 -6
  32. package/dist/components/GridLayout/GridTitle.js.map +1 -1
  33. package/dist/components/Panel/PanelHeader.js +1 -1
  34. package/dist/components/Panel/PanelHeader.js.map +1 -1
  35. package/dist/components/PanelDrawer/PanelDrawer.js +3 -4
  36. package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
  37. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
  38. package/dist/components/TimeRangeControls/TimeRangeControls.js +24 -7
  39. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
  40. package/dist/components/TimeRangeControls/TimeRangeControls.test.js +11 -5
  41. package/dist/components/TimeRangeControls/TimeRangeControls.test.js.map +1 -1
  42. package/dist/components/Variables/Variable.d.ts.map +1 -1
  43. package/dist/components/Variables/Variable.js +3 -47
  44. package/dist/components/Variables/Variable.js.map +1 -1
  45. package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
  46. package/dist/components/Variables/VariableEditor.js +142 -130
  47. package/dist/components/Variables/VariableEditor.js.map +1 -1
  48. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  49. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +315 -169
  50. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  51. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +1 -0
  52. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
  53. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +5 -4
  54. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  55. package/dist/components/Variables/VariableList.d.ts +2 -0
  56. package/dist/components/Variables/VariableList.d.ts.map +1 -1
  57. package/dist/components/Variables/VariableList.js +13 -8
  58. package/dist/components/Variables/VariableList.js.map +1 -1
  59. package/dist/components/Variables/variable-model.d.ts +9 -0
  60. package/dist/components/Variables/variable-model.d.ts.map +1 -0
  61. package/dist/components/Variables/variable-model.js +95 -0
  62. package/dist/components/Variables/variable-model.js.map +1 -0
  63. package/dist/components/Variables/variable-model.test.d.ts +2 -0
  64. package/dist/components/Variables/variable-model.test.d.ts.map +1 -0
  65. package/dist/components/Variables/variable-model.test.js +104 -0
  66. package/dist/components/Variables/variable-model.test.js.map +1 -0
  67. package/dist/context/TemplateVariableProvider/query-params.js +3 -1
  68. package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
  69. package/dist/context/index.d.ts +0 -1
  70. package/dist/context/index.d.ts.map +1 -1
  71. package/dist/context/index.js +0 -1
  72. package/dist/context/index.js.map +1 -1
  73. package/dist/views/ViewDashboard/DashboardApp.d.ts +1 -0
  74. package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
  75. package/dist/views/ViewDashboard/DashboardApp.js +2 -1
  76. package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
  77. package/dist/views/ViewDashboard/ViewDashboard.d.ts +1 -0
  78. package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
  79. package/dist/views/ViewDashboard/ViewDashboard.js +5 -3
  80. package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
  81. package/dist/views/ViewDashboard/tests/panelGroups.test.js +4 -2
  82. package/dist/views/ViewDashboard/tests/panelGroups.test.js.map +1 -1
  83. package/package.json +5 -5
  84. package/dist/cjs/context/TimeRangeProvider/TimeRangeProvider.js +0 -91
  85. package/dist/cjs/context/TimeRangeProvider/index.js +0 -29
  86. package/dist/cjs/context/TimeRangeProvider/query-params.js +0 -157
  87. package/dist/context/TimeRangeProvider/TimeRangeProvider.d.ts +0 -19
  88. package/dist/context/TimeRangeProvider/TimeRangeProvider.d.ts.map +0 -1
  89. package/dist/context/TimeRangeProvider/TimeRangeProvider.js +0 -44
  90. package/dist/context/TimeRangeProvider/TimeRangeProvider.js.map +0 -1
  91. package/dist/context/TimeRangeProvider/index.d.ts +0 -3
  92. package/dist/context/TimeRangeProvider/index.d.ts.map +0 -1
  93. package/dist/context/TimeRangeProvider/index.js +0 -16
  94. package/dist/context/TimeRangeProvider/index.js.map +0 -1
  95. package/dist/context/TimeRangeProvider/query-params.d.ts +0 -25
  96. package/dist/context/TimeRangeProvider/query-params.d.ts.map +0 -1
  97. package/dist/context/TimeRangeProvider/query-params.js +0 -149
  98. package/dist/context/TimeRangeProvider/query-params.js.map +0 -1
@@ -1,149 +0,0 @@
1
- // Copyright 2022 The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- import { useMemo, useCallback, useEffect, useState } from 'react';
14
- import { useQueryParams } from 'use-query-params';
15
- import { getUnixTime, isDate } from 'date-fns';
16
- import { isRelativeTimeRange, isDurationString } from '@perses-dev/core';
17
- /* Interprets an encoded string and returns either the string or null/undefined if not available */ function getEncodedValue(input, allowEmptyString) {
18
- if (input == null) {
19
- return input;
20
- }
21
- // '' or []
22
- if (input.length === 0 && (!allowEmptyString || allowEmptyString && input !== '')) {
23
- return null;
24
- }
25
- const str = input instanceof Array ? input[0] : input;
26
- if (str == null) {
27
- return str;
28
- }
29
- if (!allowEmptyString && str === '') {
30
- return null;
31
- }
32
- return str;
33
- }
34
- /* Encodes individual TimeRangeValue as a string, depends on whether start is relative or absolute */ export function encodeTimeRangeValue(timeOptionValue) {
35
- if (!timeOptionValue) {
36
- return timeOptionValue;
37
- }
38
- if (typeof timeOptionValue === 'string') {
39
- if (isDurationString(timeOptionValue)) {
40
- return timeOptionValue;
41
- }
42
- }
43
- return (getUnixTime(timeOptionValue) * 1000).toString();
44
- }
45
- /* Converts param input to supported relative or absolute time range format */ export function decodeTimeRangeValue(input) {
46
- const paramString = getEncodedValue(input);
47
- if (paramString == null) return paramString;
48
- return isDurationString(paramString) ? paramString : new Date(Number(paramString));
49
- }
50
- /**
51
- * Custom TimeRangeValue param type
52
- * See: https://github.com/pbeshai/use-query-params/tree/master/packages/serialize-query-params#param-types
53
- */ export const TimeRangeParam = {
54
- encode: encodeTimeRangeValue,
55
- decode: decodeTimeRangeValue,
56
- equals: (valueA, valueB)=>{
57
- if (valueA === valueB) return true;
58
- if (valueA == null || valueB == null) return valueA === valueB;
59
- return valueA.valueOf() === valueB.valueOf();
60
- }
61
- };
62
- export const timeRangeQueryConfig = {
63
- start: TimeRangeParam,
64
- end: TimeRangeParam
65
- };
66
- /**
67
- * Gets the initial time range taking into account URL params and dashboard JSON duration
68
- * Sets start query param if it is empty on page load
69
- */ export function useInitialTimeRange(dashboardDuration) {
70
- const [query] = useQueryParams(timeRangeQueryConfig);
71
- const { start , end } = query;
72
- return useMemo(()=>{
73
- let initialTimeRange = {
74
- pastDuration: dashboardDuration
75
- };
76
- if (!start) {
77
- return initialTimeRange;
78
- }
79
- const startStr = start.toString();
80
- if (isDurationString(startStr)) {
81
- initialTimeRange = {
82
- pastDuration: startStr
83
- };
84
- } else if (isDate(start) && isDate(end)) {
85
- initialTimeRange = {
86
- start: start,
87
- end: end
88
- };
89
- }
90
- return initialTimeRange;
91
- }, [
92
- start,
93
- end,
94
- dashboardDuration
95
- ]);
96
- }
97
- /**
98
- * Returns time range getter and setter, set enabledURLParams to false to disable query string serialization
99
- */ export function useSetTimeRangeParams(initialTimeRange, enabledURLParams = true) {
100
- const [query, setQuery] = useQueryParams(timeRangeQueryConfig);
101
- // determine whether initial param had previously been populated to fix back btn
102
- const [paramsLoaded, setParamsLoaded] = useState(false);
103
- // optional fallback when app does not want query string as source of truth
104
- // this occurs when enabledURLParams is set to false on TimeRangeProvider
105
- const [timeRangeState, setTimeRangeState] = useState(initialTimeRange);
106
- const { start } = query;
107
- useEffect(()=>{
108
- // when dashboard loaded with no params, default to dashboard duration
109
- if (enabledURLParams && !paramsLoaded && !start) {
110
- if (isRelativeTimeRange(initialTimeRange)) {
111
- setQuery({
112
- start: initialTimeRange.pastDuration,
113
- end: undefined
114
- });
115
- setParamsLoaded(true);
116
- }
117
- }
118
- }, [
119
- initialTimeRange,
120
- enabledURLParams,
121
- paramsLoaded,
122
- start,
123
- setQuery
124
- ]);
125
- const setTimeRange = useCallback((value)=>{
126
- if (isRelativeTimeRange(value)) {
127
- setQuery({
128
- start: value.pastDuration,
129
- end: undefined
130
- });
131
- } else {
132
- setQuery(value);
133
- }
134
- }, [
135
- setQuery
136
- ]);
137
- if (!enabledURLParams) {
138
- return {
139
- timeRange: timeRangeState,
140
- setTimeRange: setTimeRangeState
141
- };
142
- }
143
- return {
144
- timeRange: initialTimeRange,
145
- setTimeRange: setTimeRange
146
- };
147
- }
148
-
149
- //# sourceMappingURL=query-params.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/context/TimeRangeProvider/query-params.ts"],"sourcesContent":["// Copyright 2022 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useMemo, useCallback, useEffect, useState } from 'react';\nimport { useQueryParams, QueryParamConfig } from 'use-query-params';\nimport { getUnixTime, isDate } from 'date-fns';\nimport {\n TimeRangeValue,\n isRelativeTimeRange,\n isDurationString,\n DurationString,\n AbsoluteTimeRange,\n} from '@perses-dev/core';\nimport { TimeRange } from '@perses-dev/plugin-system';\n\nexport type TimeOptionValue = Date | DurationString | null | undefined;\n\n/* Interprets an encoded string and returns either the string or null/undefined if not available */\nfunction getEncodedValue(\n input: string | Array<string | null> | null | undefined,\n allowEmptyString?: boolean\n): string | null | undefined {\n if (input == null) {\n return input;\n }\n // '' or []\n if (input.length === 0 && (!allowEmptyString || (allowEmptyString && input !== ''))) {\n return null;\n }\n\n const str = input instanceof Array ? input[0] : input;\n if (str == null) {\n return str;\n }\n if (!allowEmptyString && str === '') {\n return null;\n }\n\n return str;\n}\n\n/* Encodes individual TimeRangeValue as a string, depends on whether start is relative or absolute */\nexport function encodeTimeRangeValue(timeOptionValue: TimeOptionValue): string | null | undefined {\n if (!timeOptionValue) {\n return timeOptionValue;\n }\n\n if (typeof timeOptionValue === 'string') {\n if (isDurationString(timeOptionValue)) {\n return timeOptionValue;\n }\n }\n return (getUnixTime(timeOptionValue) * 1000).toString();\n}\n\n/* Converts param input to supported relative or absolute time range format */\nexport function decodeTimeRangeValue(\n input: string | Array<string | null> | null | undefined\n): Date | DurationString | null | undefined {\n const paramString = getEncodedValue(input);\n if (paramString == null) return paramString;\n return isDurationString(paramString) ? paramString : new Date(Number(paramString));\n}\n\n/**\n * Custom TimeRangeValue param type\n * See: https://github.com/pbeshai/use-query-params/tree/master/packages/serialize-query-params#param-types\n */\nexport const TimeRangeParam: QueryParamConfig<TimeOptionValue, TimeOptionValue> = {\n encode: encodeTimeRangeValue,\n decode: decodeTimeRangeValue,\n equals: (valueA: TimeOptionValue, valueB: TimeOptionValue) => {\n if (valueA === valueB) return true;\n if (valueA == null || valueB == null) return valueA === valueB;\n return valueA.valueOf() === valueB.valueOf();\n },\n};\n\nexport const timeRangeQueryConfig = {\n start: TimeRangeParam,\n end: TimeRangeParam,\n};\n\n/**\n * Gets the initial time range taking into account URL params and dashboard JSON duration\n * Sets start query param if it is empty on page load\n */\nexport function useInitialTimeRange(dashboardDuration: DurationString): TimeRangeValue {\n const [query] = useQueryParams(timeRangeQueryConfig);\n const { start, end } = query;\n return useMemo(() => {\n let initialTimeRange: TimeRangeValue = { pastDuration: dashboardDuration };\n if (!start) {\n return initialTimeRange;\n }\n const startStr = start.toString();\n if (isDurationString(startStr)) {\n initialTimeRange = { pastDuration: startStr };\n } else if (isDate(start) && isDate(end)) {\n initialTimeRange = { start: start, end: end } as AbsoluteTimeRange;\n }\n return initialTimeRange;\n }, [start, end, dashboardDuration]);\n}\n\n/**\n * Returns time range getter and setter, set enabledURLParams to false to disable query string serialization\n */\nexport function useSetTimeRangeParams(initialTimeRange: TimeRangeValue, enabledURLParams = true): TimeRange {\n const [query, setQuery] = useQueryParams(timeRangeQueryConfig);\n\n // determine whether initial param had previously been populated to fix back btn\n const [paramsLoaded, setParamsLoaded] = useState<boolean>(false);\n\n // optional fallback when app does not want query string as source of truth\n // this occurs when enabledURLParams is set to false on TimeRangeProvider\n const [timeRangeState, setTimeRangeState] = useState<TimeRangeValue>(initialTimeRange);\n\n const { start } = query;\n\n useEffect(() => {\n // when dashboard loaded with no params, default to dashboard duration\n if (enabledURLParams && !paramsLoaded && !start) {\n if (isRelativeTimeRange(initialTimeRange)) {\n setQuery({ start: initialTimeRange.pastDuration, end: undefined });\n setParamsLoaded(true);\n }\n }\n }, [initialTimeRange, enabledURLParams, paramsLoaded, start, setQuery]);\n\n const setTimeRange: TimeRange['setTimeRange'] = useCallback(\n (value: TimeRangeValue) => {\n if (isRelativeTimeRange(value)) {\n setQuery({ start: value.pastDuration, end: undefined });\n } else {\n setQuery(value);\n }\n },\n [setQuery]\n );\n\n if (!enabledURLParams) {\n return { timeRange: timeRangeState, setTimeRange: setTimeRangeState };\n }\n return { timeRange: initialTimeRange, setTimeRange: setTimeRange };\n}\n"],"names":["useMemo","useCallback","useEffect","useState","useQueryParams","getUnixTime","isDate","isRelativeTimeRange","isDurationString","getEncodedValue","input","allowEmptyString","length","str","Array","encodeTimeRangeValue","timeOptionValue","toString","decodeTimeRangeValue","paramString","Date","Number","TimeRangeParam","encode","decode","equals","valueA","valueB","valueOf","timeRangeQueryConfig","start","end","useInitialTimeRange","dashboardDuration","query","initialTimeRange","pastDuration","startStr","useSetTimeRangeParams","enabledURLParams","setQuery","paramsLoaded","setParamsLoaded","timeRangeState","setTimeRangeState","undefined","setTimeRange","value","timeRange"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,OAAO,EAAEC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO,CAAC;AAClE,SAASC,cAAc,QAA0B,kBAAkB,CAAC;AACpE,SAASC,WAAW,EAAEC,MAAM,QAAQ,UAAU,CAAC;AAC/C,SAEEC,mBAAmB,EACnBC,gBAAgB,QAGX,kBAAkB,CAAC;AAK1B,iGAAiG,GACjG,SAASC,eAAe,CACtBC,KAAuD,EACvDC,gBAA0B,EACC;IAC3B,IAAID,KAAK,IAAI,IAAI,EAAE;QACjB,OAAOA,KAAK,CAAC;IACf,CAAC;IACD,WAAW;IACX,IAAIA,KAAK,CAACE,MAAM,KAAK,CAAC,IAAK,CAAA,CAACD,gBAAgB,IAAKA,gBAAgB,IAAID,KAAK,KAAK,EAAE,AAAC,CAAA,AAAC,EAAE;QACnF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAMG,GAAG,GAAGH,KAAK,YAAYI,KAAK,GAAGJ,KAAK,CAAC,CAAC,CAAC,GAAGA,KAAK,AAAC;IACtD,IAAIG,GAAG,IAAI,IAAI,EAAE;QACf,OAAOA,GAAG,CAAC;IACb,CAAC;IACD,IAAI,CAACF,gBAAgB,IAAIE,GAAG,KAAK,EAAE,EAAE;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAOA,GAAG,CAAC;AACb,CAAC;AAED,mGAAmG,GAC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