@perses-dev/plugin-system 0.55.0-beta.8 → 0.55.0-rc.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 (130) hide show
  1. package/dist/components/DatasourceSelect/DatasourceSelect.d.ts.map +1 -1
  2. package/dist/components/DatasourceSelect/DatasourceSelect.js +0 -1
  3. package/dist/components/DatasourceSelect/DatasourceSelect.js.map +1 -1
  4. package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.d.ts.map +1 -1
  5. package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.js +2 -7
  6. package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.js.map +1 -1
  7. package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.d.ts +11 -0
  8. package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.d.ts.map +1 -0
  9. package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.js +62 -0
  10. package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.js.map +1 -0
  11. package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.d.ts +11 -0
  12. package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.d.ts.map +1 -0
  13. package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.js +58 -0
  14. package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.js.map +1 -0
  15. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts +1 -1
  16. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts.map +1 -1
  17. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +44 -15
  18. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -1
  19. package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.d.ts.map +1 -1
  20. package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +7 -1
  21. package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js.map +1 -1
  22. package/dist/components/LinksEditor/LinksEditor.js +5 -0
  23. package/dist/components/LinksEditor/LinksEditor.js.map +1 -1
  24. package/dist/components/MultiQueryEditor/MultiQueryEditor.d.ts.map +1 -1
  25. package/dist/components/MultiQueryEditor/MultiQueryEditor.js +16 -1
  26. package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -1
  27. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
  28. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +4 -1
  29. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  30. package/dist/components/PluginEditor/plugin-editor-api.d.ts +7 -1
  31. package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
  32. package/dist/components/PluginEditor/plugin-editor-api.js +54 -41
  33. package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
  34. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +14 -0
  35. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
  36. package/dist/components/PluginKindSelect/PluginKindSelect.js +187 -23
  37. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  38. package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
  39. package/dist/components/PluginRegistry/PluginRegistry.js +72 -7
  40. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  41. package/dist/components/PluginRegistry/plugin-indexes.d.ts +1 -0
  42. package/dist/components/PluginRegistry/plugin-indexes.d.ts.map +1 -1
  43. package/dist/components/PluginRegistry/plugin-indexes.js +6 -1
  44. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  45. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
  46. package/dist/components/PluginSpecEditor/PluginSpecEditor.js +6 -2
  47. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  48. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
  49. package/dist/components/TimeRangeControls/TimeRangeControls.js +0 -2
  50. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
  51. package/dist/components/Variables/VariableEditorForm/VariablePreview.js +1 -1
  52. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  53. package/dist/components/Variables/variable-model.d.ts.map +1 -1
  54. package/dist/components/Variables/variable-model.js +7 -2
  55. package/dist/components/Variables/variable-model.js.map +1 -1
  56. package/dist/model/datasource.d.ts +3 -0
  57. package/dist/model/datasource.d.ts.map +1 -1
  58. package/dist/model/datasource.js.map +1 -1
  59. package/dist/model/plugin-loading.d.ts +1 -0
  60. package/dist/model/plugin-loading.d.ts.map +1 -1
  61. package/dist/model/plugin-loading.js.map +1 -1
  62. package/dist/model/plugins.d.ts +11 -0
  63. package/dist/model/plugins.d.ts.map +1 -1
  64. package/dist/model/plugins.js.map +1 -1
  65. package/dist/remote/PluginLoaderComponent.d.ts.map +1 -1
  66. package/dist/remote/PluginLoaderComponent.js +28 -15
  67. package/dist/remote/PluginLoaderComponent.js.map +1 -1
  68. package/dist/remote/PluginRuntime.d.ts.map +1 -1
  69. package/dist/remote/PluginRuntime.js +32 -24
  70. package/dist/remote/PluginRuntime.js.map +1 -1
  71. package/dist/remote/remotePluginLoader.d.ts.map +1 -1
  72. package/dist/remote/remotePluginLoader.js +1 -0
  73. package/dist/remote/remotePluginLoader.js.map +1 -1
  74. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +21 -15
  75. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  76. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
  77. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +23 -1
  78. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  79. package/dist/runtime/TimeRangeProvider/TimeRangeProviders.d.ts +3 -1
  80. package/dist/runtime/TimeRangeProvider/TimeRangeProviders.d.ts.map +1 -1
  81. package/dist/runtime/TimeRangeProvider/TimeRangeProviders.js +2 -2
  82. package/dist/runtime/TimeRangeProvider/TimeRangeProviders.js.map +1 -1
  83. package/dist/runtime/TimeRangeProvider/query-params.js +7 -9
  84. package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
  85. package/dist/runtime/UsageMetricsProvider.d.ts.map +1 -1
  86. package/dist/runtime/UsageMetricsProvider.js +24 -20
  87. package/dist/runtime/UsageMetricsProvider.js.map +1 -1
  88. package/dist/runtime/alerts-queries.d.ts.map +1 -1
  89. package/dist/runtime/alerts-queries.js +6 -2
  90. package/dist/runtime/alerts-queries.js.map +1 -1
  91. package/dist/runtime/annotations.d.ts +8 -0
  92. package/dist/runtime/annotations.d.ts.map +1 -1
  93. package/dist/runtime/annotations.js +47 -83
  94. package/dist/runtime/annotations.js.map +1 -1
  95. package/dist/runtime/datasources.d.ts +4 -0
  96. package/dist/runtime/datasources.d.ts.map +1 -1
  97. package/dist/runtime/datasources.js +4 -3
  98. package/dist/runtime/datasources.js.map +1 -1
  99. package/dist/runtime/log-queries.d.ts.map +1 -1
  100. package/dist/runtime/log-queries.js +3 -1
  101. package/dist/runtime/log-queries.js.map +1 -1
  102. package/dist/runtime/plugin-registry.d.ts +23 -8
  103. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  104. package/dist/runtime/plugin-registry.js +52 -16
  105. package/dist/runtime/plugin-registry.js.map +1 -1
  106. package/dist/runtime/profile-queries.d.ts.map +1 -1
  107. package/dist/runtime/profile-queries.js +3 -1
  108. package/dist/runtime/profile-queries.js.map +1 -1
  109. package/dist/runtime/silences-queries.d.ts.map +1 -1
  110. package/dist/runtime/silences-queries.js +6 -2
  111. package/dist/runtime/silences-queries.js.map +1 -1
  112. package/dist/runtime/time-series-queries.d.ts.map +1 -1
  113. package/dist/runtime/time-series-queries.js +10 -3
  114. package/dist/runtime/time-series-queries.js.map +1 -1
  115. package/dist/runtime/trace-queries.d.ts.map +1 -1
  116. package/dist/runtime/trace-queries.js +6 -2
  117. package/dist/runtime/trace-queries.js.map +1 -1
  118. package/dist/runtime/variables.d.ts +6 -0
  119. package/dist/runtime/variables.d.ts.map +1 -1
  120. package/dist/runtime/variables.js +17 -1
  121. package/dist/runtime/variables.js.map +1 -1
  122. package/dist/utils/index.d.ts +1 -0
  123. package/dist/utils/index.d.ts.map +1 -1
  124. package/dist/utils/index.js +1 -0
  125. package/dist/utils/index.js.map +1 -1
  126. package/dist/utils/plugin-versions.d.ts +18 -0
  127. package/dist/utils/plugin-versions.d.ts.map +1 -0
  128. package/dist/utils/plugin-versions.js +52 -0
  129. package/dist/utils/plugin-versions.js.map +1 -0
  130. package/package.json +6 -5
@@ -10,7 +10,7 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { parseVariables, replaceVariables } from "@perses-dev/components";
13
+ import { parseVariables, replaceVariables, replaceVariablesInUrl } from "@perses-dev/components";
14
14
  import { immerable } from "immer";
15
15
  import { createContext, useContext, useMemo } from "react";
16
16
  import { useBuiltinVariableValues } from "./builtin-variables.js";
@@ -133,5 +133,21 @@ export function useReplaceVariablesInString(str) {
133
133
  if (!str) return undefined;
134
134
  return replaceVariables(str, variableValues);
135
135
  }
136
+ /**
137
+ * Convenience hook for replacing variables in a URL, including those nested
138
+ * inside percent-encoded query parameters (e.g. Explore `data=%24var`).
139
+ * Prefer this over {@link useReplaceVariablesInString} for link hrefs.
140
+ */ export function useReplaceVariablesInUrl(url) {
141
+ const variableValues = useAllVariableValues();
142
+ return useMemo(()=>{
143
+ if (url === undefined || url === '') {
144
+ return url;
145
+ }
146
+ return replaceVariablesInUrl(url, variableValues);
147
+ }, [
148
+ url,
149
+ variableValues
150
+ ]);
151
+ }
136
152
 
137
153
  //# sourceMappingURL=variables.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/runtime/variables.ts"],"sourcesContent":["// Copyright 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 type { VariableOption, VariableState, VariableStateMap } from '@perses-dev/components';\nimport { parseVariables, replaceVariables } from '@perses-dev/components';\nimport { immerable } from 'immer';\nimport { createContext, useContext, useMemo } from 'react';\n\nimport { useBuiltinVariableValues } from './builtin-variables';\n\n// Re-export types from @perses-dev/components for backwards compatibility\nexport type { VariableOption, VariableState, VariableStateMap };\n\n/**\n * Structure used as key in the {@link VariableStoreStateMap}.\n */\nexport type VariableStateKey = {\n /**\n * name of the variable we want to access in the state.\n */\n name: string;\n /**\n * source of the variable we want to access in the state.\n * Defined only for external variables.\n */\n source?: string;\n};\n\n/**\n * A state map with two entry keys, materialized by {@link VariableStateKey} structure.\n */\nexport class VariableStoreStateMap {\n /**\n * \"Immerable\" is mandatory to be able to use this class in an immer context.\n * Ref: https://docs.pmnd.rs/zustand/integrations/immer-middleware#gotchas\n */\n [immerable] = true;\n\n private readonly DEFAULT_LOCAL_SOURCE_NAME = '';\n private readonly _state: Record<string, Record<string, VariableState>> = {};\n\n /**\n * Get variable state by key.\n * @param key\n */\n get(key: VariableStateKey): VariableState | undefined {\n return this._sourceStatesOrEmpty(key.source)[key.name];\n }\n\n /**\n * Set variable state by key.\n * @param key\n * @param value\n */\n set(key: VariableStateKey, value: VariableState): VariableState | undefined {\n const sourceName = this._sourceName(key.source);\n if (!this._state[sourceName]) {\n this._state[sourceName] = {};\n }\n this._sourceStatesOrEmpty(key.source)[key.name] = value;\n return value;\n }\n\n /**\n * Check presence of variable state by key.\n * @param key\n */\n has(key: VariableStateKey): boolean {\n return this._sourceStatesOrEmpty(key.source)[key.name] !== undefined;\n }\n\n /**\n * Delete variable state by key.\n * @param key\n */\n delete(key: VariableStateKey): boolean {\n const result = this.has(key);\n const sourceName = this._sourceName(key.source);\n const sourceStates = this._state[sourceName];\n\n // Delete var from source state\n if (sourceStates) {\n delete sourceStates[key.name];\n }\n\n // Delete source state from state if empty\n if (Object.keys(sourceStates ?? {})?.length === 0) {\n delete this._state[sourceName];\n }\n return result;\n }\n\n private _sourceName(source: string | undefined): string {\n return source ?? this.DEFAULT_LOCAL_SOURCE_NAME;\n }\n\n private _sourceStatesOrEmpty(source: string | undefined): Record<string, VariableState> {\n return this._state[this._sourceName(source)] ?? {};\n }\n}\n\nexport type VariableSrv = {\n state: VariableStateMap;\n};\n\nexport const VariableContext = createContext<VariableSrv | undefined>(undefined);\n\nfunction useVariableContext(): VariableSrv {\n const ctx = useContext(VariableContext);\n if (ctx === undefined) {\n throw new Error('No VariableContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useVariableValues(names?: string[]): VariableStateMap {\n const { state } = useVariableContext();\n\n const values = useMemo(() => {\n const values: VariableStateMap = {};\n names?.forEach((name) => {\n const s = state[name];\n if (s) {\n values[name] = s;\n }\n });\n return values;\n }, [state, names]);\n\n if (names === undefined) {\n return state;\n }\n\n return values;\n}\n\n// useAllVariableValues wraps user-defined variables with built-in variables\nexport function useAllVariableValues(names?: string[]): VariableStateMap {\n const variableValues = useVariableValues(names);\n const builtinVariableValues = useBuiltinVariableValues(names);\n\n return useMemo(() => {\n return { ...variableValues, ...builtinVariableValues } as VariableStateMap;\n }, [variableValues, builtinVariableValues]);\n}\n\n// Simple wrapper around replaceVariables() with support for extra string variables.\nexport function replaceVariablesInString(\n text: string,\n variableValues: VariableStateMap,\n extraVariables?: Record<string, string>,\n): string {\n const vars = { ...variableValues }; // shallow clone to avoid modifying the original object\n for (const [key, value] of Object.entries(extraVariables ?? {})) {\n vars[key] = { value, loading: false };\n }\n return replaceVariables(text, vars);\n}\n\n// Convenience hook for replacing variables in a string\nexport function useReplaceVariablesInString(str: string | undefined): string | undefined {\n const variablesInString = str ? parseVariables(str) : [];\n const variableValues = useAllVariableValues(variablesInString);\n if (!str) return undefined;\n return replaceVariables(str, variableValues);\n}\n"],"names":["parseVariables","replaceVariables","immerable","createContext","useContext","useMemo","useBuiltinVariableValues","VariableStoreStateMap","DEFAULT_LOCAL_SOURCE_NAME","_state","get","key","_sourceStatesOrEmpty","source","name","set","value","sourceName","_sourceName","has","undefined","delete","result","sourceStates","Object","keys","length","VariableContext","useVariableContext","ctx","Error","useVariableValues","names","state","values","forEach","s","useAllVariableValues","variableValues","builtinVariableValues","replaceVariablesInString","text","extraVariables","vars","entries","loading","useReplaceVariablesInString","str","variablesInString"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,cAAc,EAAEC,gBAAgB,QAAQ,yBAAyB;AAC1E,SAASC,SAAS,QAAQ,QAAQ;AAClC,SAASC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAE3D,SAASC,wBAAwB,QAAQ,yBAAsB;AAoB/D;;CAEC,GACD,OAAO,MAAMC;IACX;;;GAGC,GACD,CAACL,UAAU,GAAG,KAAK;IAEFM,4BAA4B,GAAG;IAC/BC,SAAwD,CAAC,EAAE;IAE5E;;;GAGC,GACDC,IAAIC,GAAqB,EAA6B;QACpD,OAAO,IAAI,CAACC,oBAAoB,CAACD,IAAIE,MAAM,CAAC,CAACF,IAAIG,IAAI,CAAC;IACxD;IAEA;;;;GAIC,GACDC,IAAIJ,GAAqB,EAAEK,KAAoB,EAA6B;QAC1E,MAAMC,aAAa,IAAI,CAACC,WAAW,CAACP,IAAIE,MAAM;QAC9C,IAA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AAQ;QACrB,MAAM6B,SAA2B,CAAC;QAClCF,OAAOG,QAAQ,CAACrB;YACd,MAAMsB,IAAIH,KAAK,CAACnB,KAAK;YACrB,IAAIsB,GAAG;gBACLF,MAAM,CAACpB,KAAK,GAAGsB;YACjB;QACF;QACA,OAAOF;IACT,GAAG;QAACD;QAAOD;KAAM;IAEjB,IAAIA,UAAUZ,WAAW;QACvB,OAAOa;IACT;IAEA,OAAOC;AACT;AAEA,4EAA4E;AAC5E,OAAO,SAASG,qBAAqBL,KAAgB;IACnD,MAAMM,iBAAiBP,kBAAkBC;IACzC,MAAMO,wBAAwBjC,yBAAyB0B;IAEvD,OAAO3B,QAAQ;QACb,OAAO;YAAE,GAAGiC,cAAc;YAAE,GAAGC,qBAAqB;QAAC;IACvD,GAAG;QAACD;QAAgBC;KAAsB;AAC5C;AAEA,oFAAoF;AACpF,OAAO,SAASC,yBACdC,IAAY,EACZH,cAAgC,EAChCI,cAAuC;IAEvC,MAAMC,OAAO;QAAE,GAAGL,cAAc;IAAC,GAAG,uDAAuD;IAC3F,KAAK,MAAM,CAAC3B,KAAKK,MAAM,IAAIQ,OAAOoB,OAAO,CAACF,kBAAkB,CAAC,GAAI;QAC/DC,IAAI,CAAChC,IAAI,GAAG;YAAEK;YAAO6B,SAAS;QAAM;IACtC;IACA,OAAO5C,iBAAiBwC,MAAME;AAChC;AAEA,uDAAuD;AACvD,OAAO,SAASG,4BAA4BC,GAAuB;IACjE,MAAMC,oBAAoBD,MAAM/C,eAAe+C,OAAO,EAAE;IACxD,MAAMT,iBAAiBD,qBAAqBW;IAC5C,IAAI,CAACD,KAAK,OAAO3B;IACjB,OAAOnB,iBAAiB8C,KAAKT;AAC/B"}
1
+ {"version":3,"sources":["../../src/runtime/variables.ts"],"sourcesContent":["// Copyright 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 type { VariableOption, VariableState, VariableStateMap } from '@perses-dev/components';\nimport { parseVariables, replaceVariables, replaceVariablesInUrl } from '@perses-dev/components';\nimport { immerable } from 'immer';\nimport { createContext, useContext, useMemo } from 'react';\n\nimport { useBuiltinVariableValues } from './builtin-variables';\n\n// Re-export types from @perses-dev/components for backwards compatibility\nexport type { VariableOption, VariableState, VariableStateMap };\n\n/**\n * Structure used as key in the {@link VariableStoreStateMap}.\n */\nexport type VariableStateKey = {\n /**\n * name of the variable we want to access in the state.\n */\n name: string;\n /**\n * source of the variable we want to access in the state.\n * Defined only for external variables.\n */\n source?: string;\n};\n\n/**\n * A state map with two entry keys, materialized by {@link VariableStateKey} structure.\n */\nexport class VariableStoreStateMap {\n /**\n * \"Immerable\" is mandatory to be able to use this class in an immer context.\n * Ref: https://docs.pmnd.rs/zustand/integrations/immer-middleware#gotchas\n */\n [immerable] = true;\n\n private readonly DEFAULT_LOCAL_SOURCE_NAME = '';\n private readonly _state: Record<string, Record<string, VariableState>> = {};\n\n /**\n * Get variable state by key.\n * @param key\n */\n get(key: VariableStateKey): VariableState | undefined {\n return this._sourceStatesOrEmpty(key.source)[key.name];\n }\n\n /**\n * Set variable state by key.\n * @param key\n * @param value\n */\n set(key: VariableStateKey, value: VariableState): VariableState | undefined {\n const sourceName = this._sourceName(key.source);\n if (!this._state[sourceName]) {\n this._state[sourceName] = {};\n }\n this._sourceStatesOrEmpty(key.source)[key.name] = value;\n return value;\n }\n\n /**\n * Check presence of variable state by key.\n * @param key\n */\n has(key: VariableStateKey): boolean {\n return this._sourceStatesOrEmpty(key.source)[key.name] !== undefined;\n }\n\n /**\n * Delete variable state by key.\n * @param key\n */\n delete(key: VariableStateKey): boolean {\n const result = this.has(key);\n const sourceName = this._sourceName(key.source);\n const sourceStates = this._state[sourceName];\n\n // Delete var from source state\n if (sourceStates) {\n delete sourceStates[key.name];\n }\n\n // Delete source state from state if empty\n if (Object.keys(sourceStates ?? {})?.length === 0) {\n delete this._state[sourceName];\n }\n return result;\n }\n\n private _sourceName(source: string | undefined): string {\n return source ?? this.DEFAULT_LOCAL_SOURCE_NAME;\n }\n\n private _sourceStatesOrEmpty(source: string | undefined): Record<string, VariableState> {\n return this._state[this._sourceName(source)] ?? {};\n }\n}\n\nexport type VariableSrv = {\n state: VariableStateMap;\n};\n\nexport const VariableContext = createContext<VariableSrv | undefined>(undefined);\n\nfunction useVariableContext(): VariableSrv {\n const ctx = useContext(VariableContext);\n if (ctx === undefined) {\n throw new Error('No VariableContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useVariableValues(names?: string[]): VariableStateMap {\n const { state } = useVariableContext();\n\n const values = useMemo(() => {\n const values: VariableStateMap = {};\n names?.forEach((name) => {\n const s = state[name];\n if (s) {\n values[name] = s;\n }\n });\n return values;\n }, [state, names]);\n\n if (names === undefined) {\n return state;\n }\n\n return values;\n}\n\n// useAllVariableValues wraps user-defined variables with built-in variables\nexport function useAllVariableValues(names?: string[]): VariableStateMap {\n const variableValues = useVariableValues(names);\n const builtinVariableValues = useBuiltinVariableValues(names);\n\n return useMemo(() => {\n return { ...variableValues, ...builtinVariableValues } as VariableStateMap;\n }, [variableValues, builtinVariableValues]);\n}\n\n// Simple wrapper around replaceVariables() with support for extra string variables.\nexport function replaceVariablesInString(\n text: string,\n variableValues: VariableStateMap,\n extraVariables?: Record<string, string>,\n): string {\n const vars = { ...variableValues }; // shallow clone to avoid modifying the original object\n for (const [key, value] of Object.entries(extraVariables ?? {})) {\n vars[key] = { value, loading: false };\n }\n return replaceVariables(text, vars);\n}\n\n// Convenience hook for replacing variables in a string\nexport function useReplaceVariablesInString(str: string | undefined): string | undefined {\n const variablesInString = str ? parseVariables(str) : [];\n const variableValues = useAllVariableValues(variablesInString);\n if (!str) return undefined;\n return replaceVariables(str, variableValues);\n}\n\n/**\n * Convenience hook for replacing variables in a URL, including those nested\n * inside percent-encoded query parameters (e.g. Explore `data=%24var`).\n * Prefer this over {@link useReplaceVariablesInString} for link hrefs.\n */\nexport function useReplaceVariablesInUrl(url: string | undefined): string | undefined {\n const variableValues = useAllVariableValues();\n return useMemo(() => {\n if (url === undefined || url === '') {\n return url;\n }\n return replaceVariablesInUrl(url, variableValues);\n }, [url, variableValues]);\n}\n"],"names":["parseVariables","replaceVariables","replaceVariablesInUrl","immerable","createContext","useContext","useMemo","useBuiltinVariableValues","VariableStoreStateMap","DEFAULT_LOCAL_SOURCE_NAME","_state","get","key","_sourceStatesOrEmpty","source","name","set","value","sourceName","_sourceName","has","undefined","delete","result","sourceStates","Object","keys","length","VariableContext","useVariableContext","ctx","Error","useVariableValues","names","state","values","forEach","s","useAllVariableValues","variableValues","builtinVariableValues","replaceVariablesInString","text","extraVariables","vars","entries","loading","useReplaceVariablesInString","str","variablesInString","useReplaceVariablesInUrl","url"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,cAAc,EAAEC,gBAAgB,EAAEC,qBAAqB,QAAQ,yBAAyB;AACjG,SAASC,SAAS,QAAQ,QAAQ;AAClC,SAASC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAE3D,SAASC,wBAAwB,QAAQ,yBAAsB;AAoB/D;;CAEC,GACD,OAAO,MAAMC;IACX;;;GAGC,GACD,CAACL,UAAU,GAAG,KAAK;IAEFM,4BAA4B,GAAG;IAC/BC,SAAwD,CAAC,EAAE;IAE5E;;;GAGC,GACDC,IAAIC,GAAqB,EAA6B;QACpD,OAAO,IAAI,CAACC,oBAAoB,CAACD,IAAIE,MAAM,CAAC,CAAC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ASW,yBAAyBC,GAAuB;IAC9D,MAAMZ,iBAAiBD;IACvB,OAAOhC,QAAQ;QACb,IAAI6C,QAAQ9B,aAAa8B,QAAQ,IAAI;YACnC,OAAOA;QACT;QACA,OAAOjD,sBAAsBiD,KAAKZ;IACpC,GAAG;QAACY;QAAKZ;KAAe;AAC1B"}
@@ -1,4 +1,5 @@
1
1
  export * from './event';
2
+ export * from './plugin-versions';
2
3
  export * from './variables';
3
4
  export * from './csv-export';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -11,6 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  export * from "./event.js";
14
+ export * from "./plugin-versions.js";
14
15
  export * from "./variables.js";
15
16
  export * from "./csv-export.js";
16
17
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["// Copyright 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\nexport * from './event';\nexport * from './variables';\nexport * from './csv-export';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,aAAU;AACxB,cAAc,iBAAc;AAC5B,cAAc,kBAAe"}
1
+ {"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["// Copyright 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\nexport * from './event';\nexport * from './plugin-versions';\nexport * from './variables';\nexport * from './csv-export';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,aAAU;AACxB,cAAc,uBAAoB;AAClC,cAAc,iBAAc;AAC5B,cAAc,kBAAe"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Sentinel version meaning "the latest version available in the Perses instance". It mirrors the backend
3
+ * `plugin.LatestVersion` constant. A plugin definition using it is not pinned to an exact version: the plugin registry
4
+ * resolves it dynamically at load time.
5
+ */
6
+ export declare const LATEST_PLUGIN_VERSION = "latest";
7
+ /**
8
+ * Compare two plugin version strings with semver semantics, the same way the Perses backend orders plugin versions.
9
+ * Returns a positive number when `a` is greater than `b`, a negative number when it is lower, and 0 when they are equal.
10
+ *
11
+ * Pre-releases order below their stable release (`1.0.0-beta` < `1.0.0`), as semver mandates. Versions that cannot be
12
+ * parsed at all always order below parseable ones, and are compared lexicographically between themselves, so an
13
+ * unexpected value can never be picked as "the latest version".
14
+ */
15
+ export declare function comparePluginVersions(a: string, b: string): number;
16
+ /** Return a new array of versions sorted from newest to oldest, using {@link comparePluginVersions}. */
17
+ export declare function sortPluginVersionsDesc(versions: string[]): string[];
18
+ //# sourceMappingURL=plugin-versions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-versions.d.ts","sourceRoot":"","sources":["../../src/utils/plugin-versions.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAU9C;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAalE;AAED,wGAAwG;AACxG,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAEnE"}
@@ -0,0 +1,52 @@
1
+ // Copyright 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 { coerce, compare, parse } from "semver";
14
+ /**
15
+ * Sentinel version meaning "the latest version available in the Perses instance". It mirrors the backend
16
+ * `plugin.LatestVersion` constant. A plugin definition using it is not pinned to an exact version: the plugin registry
17
+ * resolves it dynamically at load time.
18
+ */ export const LATEST_PLUGIN_VERSION = 'latest';
19
+ /**
20
+ * Parse a plugin version with semver, tolerating the loose forms the backend also accepts (a leading `v`, a missing
21
+ * patch segment, ...). Returns `null` when the value cannot be understood as a version at all.
22
+ */ function parsePluginVersion(version) {
23
+ return parse(version, {
24
+ loose: true
25
+ }) ?? coerce(version);
26
+ }
27
+ /**
28
+ * Compare two plugin version strings with semver semantics, the same way the Perses backend orders plugin versions.
29
+ * Returns a positive number when `a` is greater than `b`, a negative number when it is lower, and 0 when they are equal.
30
+ *
31
+ * Pre-releases order below their stable release (`1.0.0-beta` < `1.0.0`), as semver mandates. Versions that cannot be
32
+ * parsed at all always order below parseable ones, and are compared lexicographically between themselves, so an
33
+ * unexpected value can never be picked as "the latest version".
34
+ */ export function comparePluginVersions(a, b) {
35
+ const parsedA = parsePluginVersion(a);
36
+ const parsedB = parsePluginVersion(b);
37
+ if (parsedA && parsedB) {
38
+ return compare(parsedA, parsedB);
39
+ }
40
+ if (parsedA) {
41
+ return 1;
42
+ }
43
+ if (parsedB) {
44
+ return -1;
45
+ }
46
+ return a.localeCompare(b);
47
+ }
48
+ /** Return a new array of versions sorted from newest to oldest, using {@link comparePluginVersions}. */ export function sortPluginVersionsDesc(versions) {
49
+ return versions.toSorted((a, b)=>comparePluginVersions(b, a));
50
+ }
51
+
52
+ //# sourceMappingURL=plugin-versions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/plugin-versions.ts"],"sourcesContent":["// Copyright 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 type { SemVer } from 'semver';\nimport { coerce, compare, parse } from 'semver';\n\n/**\n * Sentinel version meaning \"the latest version available in the Perses instance\". It mirrors the backend\n * `plugin.LatestVersion` constant. A plugin definition using it is not pinned to an exact version: the plugin registry\n * resolves it dynamically at load time.\n */\nexport const LATEST_PLUGIN_VERSION = 'latest';\n\n/**\n * Parse a plugin version with semver, tolerating the loose forms the backend also accepts (a leading `v`, a missing\n * patch segment, ...). Returns `null` when the value cannot be understood as a version at all.\n */\nfunction parsePluginVersion(version: string): SemVer | null {\n return parse(version, { loose: true }) ?? coerce(version);\n}\n\n/**\n * Compare two plugin version strings with semver semantics, the same way the Perses backend orders plugin versions.\n * Returns a positive number when `a` is greater than `b`, a negative number when it is lower, and 0 when they are equal.\n *\n * Pre-releases order below their stable release (`1.0.0-beta` < `1.0.0`), as semver mandates. Versions that cannot be\n * parsed at all always order below parseable ones, and are compared lexicographically between themselves, so an\n * unexpected value can never be picked as \"the latest version\".\n */\nexport function comparePluginVersions(a: string, b: string): number {\n const parsedA = parsePluginVersion(a);\n const parsedB = parsePluginVersion(b);\n if (parsedA && parsedB) {\n return compare(parsedA, parsedB);\n }\n if (parsedA) {\n return 1;\n }\n if (parsedB) {\n return -1;\n }\n return a.localeCompare(b);\n}\n\n/** Return a new array of versions sorted from newest to oldest, using {@link comparePluginVersions}. */\nexport function sortPluginVersionsDesc(versions: string[]): string[] {\n return versions.toSorted((a, b) => comparePluginVersions(b, a));\n}\n"],"names":["coerce","compare","parse","LATEST_PLUGIN_VERSION","parsePluginVersion","version","loose","comparePluginVersions","a","b","parsedA","parsedB","localeCompare","sortPluginVersionsDesc","versions","toSorted"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,MAAM,EAAEC,OAAO,EAAEC,KAAK,QAAQ,SAAS;AAEhD;;;;CAIC,GACD,OAAO,MAAMC,wBAAwB,SAAS;AAE9C;;;CAGC,GACD,SAASC,mBAAmBC,OAAe;IACzC,OAAOH,MAAMG,SAAS;QAAEC,OAAO;IAAK,MAAMN,OAAOK;AACnD;AAEA;;;;;;;CAOC,GACD,OAAO,SAASE,sBAAsBC,CAAS,EAAEC,CAAS;IACxD,MAAMC,UAAUN,mBAAmBI;IACnC,MAAMG,UAAUP,mBAAmBK;IACnC,IAAIC,WAAWC,SAAS;QACtB,OAAOV,QAAQS,SAASC;IAC1B;IACA,IAAID,SAAS;QACX,OAAO;IACT;IACA,IAAIC,SAAS;QACX,OAAO,CAAC;IACV;IACA,OAAOH,EAAEI,aAAa,CAACH;AACzB;AAEA,sGAAsG,GACtG,OAAO,SAASI,uBAAuBC,QAAkB;IACvD,OAAOA,SAASC,QAAQ,CAAC,CAACP,GAAGC,IAAMF,sBAAsBE,GAAGD;AAC9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/plugin-system",
3
- "version": "0.55.0-beta.8",
3
+ "version": "0.55.0-rc.0",
4
4
  "description": "The plugin feature in Pereses",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/perses/perses/blob/main/README.md",
@@ -29,12 +29,13 @@
29
29
  "lint:fix": "oxlint --fix src"
30
30
  },
31
31
  "dependencies": {
32
- "@module-federation/enhanced": "^2.8.0",
33
- "@perses-dev/client": "0.55.0-beta.8",
34
- "@perses-dev/components": "0.55.0-beta.8",
35
- "@perses-dev/spec": "0.3.0-beta.7",
32
+ "@module-federation/enhanced": "^2.9.1",
33
+ "@perses-dev/client": "0.55.0-rc.0",
34
+ "@perses-dev/components": "0.55.0-rc.0",
35
+ "@perses-dev/spec": "0.3.0-rc.0",
36
36
  "date-fns": "^4.1.0",
37
37
  "date-fns-tz": "^3.2.0",
38
+ "fast-uri": "3.1.8",
38
39
  "immer": "^10.1.1",
39
40
  "react-hook-form": "^7.87.0",
40
41
  "semver": "^7.8.0",