@perses-dev/gauge-chart-plugin 0.12.1 → 0.13.0-beta.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/__mf/css/async/236.85c2cbf6.css +1 -0
- package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
- package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
- package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
- package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
- package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
- package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
- package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
- package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
- package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
- package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
- package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
- package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
- package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
- package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
- package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
- package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
- package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
- package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
- package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
- package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
- package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
- package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
- package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
- package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
- package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
- package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
- package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
- package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
- package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
- package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
- package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
- package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
- package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
- package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
- package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
- package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
- package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
- package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
- package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
- package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
- package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
- package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
- package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
- package/__mf/js/GaugeChart.bad14568.js +7 -0
- package/__mf/js/async/1.ba1e7b30.js +30 -0
- package/__mf/js/async/{181.c020220f.js.LICENSE.txt → 1.ba1e7b30.js.LICENSE.txt} +17 -1
- package/__mf/js/async/121.f54c0cd0.js +2 -0
- package/__mf/js/async/172.eae65503.js +110 -0
- package/__mf/js/async/177.9bd5b404.js +1 -0
- package/__mf/js/async/192.7917eb7e.js +1 -0
- package/__mf/js/async/235.ccb953ba.js +1 -0
- package/__mf/js/async/236.f2a0aa21.js +7 -0
- package/__mf/js/async/{901.82adc0d0.js.LICENSE.txt → 236.f2a0aa21.js.LICENSE.txt} +19 -1
- package/__mf/js/async/274.f21ae591.js +2 -0
- package/__mf/js/async/356.0f768c5a.js +1 -0
- package/__mf/js/async/377.63df1710.js +1 -0
- package/__mf/js/async/392.fe3b02d2.js +2 -0
- package/__mf/js/async/403.82cf743c.js +2 -0
- package/__mf/js/async/410.145953d4.js +1 -0
- package/__mf/js/async/{77.429aab8d.js → 458.7044e4bd.js} +1 -1
- package/__mf/js/async/470.fb62dc61.js +2 -0
- package/__mf/js/async/496.5f6f5973.js +1 -0
- package/__mf/js/async/558.05181330.js +1 -0
- package/__mf/js/async/568.d6d1abb7.js +24 -0
- package/__mf/js/async/{634.15a57760.js.LICENSE.txt → 568.d6d1abb7.js.LICENSE.txt} +0 -16
- package/__mf/js/async/587.ee9de63b.js +1 -0
- package/__mf/js/async/588.484c07dd.js +1 -0
- package/__mf/js/async/616.63ed457a.js +1 -0
- package/__mf/js/async/71.2e72589f.js +1 -0
- package/__mf/js/async/756.d0f359e2.js +1 -0
- package/__mf/js/async/77.627b9458.js +1 -0
- package/__mf/js/async/823.16520e98.js +10 -0
- package/__mf/js/async/{204.368d6115.js.LICENSE.txt → 823.16520e98.js.LICENSE.txt} +1 -1
- package/__mf/js/async/854.046f5bd5.js +1 -0
- package/__mf/js/async/873.66154697.js +1 -0
- package/__mf/js/async/941.75c3a449.js +2 -0
- package/__mf/js/async/963.8c43a346.js +1 -0
- package/__mf/js/async/968.a27c5193.js +1 -0
- package/__mf/js/async/978.0139c7c4.js +1 -0
- package/__mf/js/async/__federation_expose_GaugeChart.014110ba.js +1 -0
- package/__mf/js/async/lib-router.cf7b1bc1.js +2 -0
- package/__mf/js/main.dcca1bf3.js +7 -0
- package/lib/GaugeChartBase.d.ts +1 -1
- package/lib/GaugeChartBase.d.ts.map +1 -1
- package/lib/GaugeChartBase.js +1 -2
- package/lib/GaugeChartBase.js.map +1 -1
- package/lib/GaugeChartOptionsEditorSettings.js.map +1 -1
- package/lib/GaugeChartPanel.d.ts +1 -1
- package/lib/GaugeChartPanel.d.ts.map +1 -1
- package/lib/GaugeChartPanel.js +2 -2
- package/lib/GaugeChartPanel.js.map +1 -1
- package/lib/cjs/GaugeChartBase.js +3 -4
- package/lib/cjs/GaugeChartPanel.js +5 -5
- package/lib/gauge-chart-model.d.ts +3 -2
- package/lib/gauge-chart-model.d.ts.map +1 -1
- package/lib/gauge-chart-model.js.map +1 -1
- package/lib/thresholds.d.ts +1 -1
- package/lib/thresholds.d.ts.map +1 -1
- package/lib/thresholds.js.map +1 -1
- package/mf-manifest.json +76 -62
- package/mf-stats.json +90 -62
- package/package.json +4 -4
- package/__mf/css/async/442.d3010b86.css +0 -1
- package/__mf/css/async/61.d3010b86.css +0 -1
- package/__mf/css/async/823.d3010b86.css +0 -1
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/GaugeChart.4c263174.js +0 -6
- package/__mf/js/async/121.0385c285.js +0 -2
- package/__mf/js/async/177.4d5022bb.js +0 -1
- package/__mf/js/async/181.c020220f.js +0 -111
- package/__mf/js/async/192.8bf7cec4.js +0 -1
- package/__mf/js/async/204.368d6115.js +0 -10
- package/__mf/js/async/235.675ef806.js +0 -1
- package/__mf/js/async/274.07ee62ee.js +0 -2
- package/__mf/js/async/350.26d75fbf.js +0 -1
- package/__mf/js/async/356.a480b281.js +0 -1
- package/__mf/js/async/377.9f5a442b.js +0 -1
- package/__mf/js/async/392.32210944.js +0 -2
- package/__mf/js/async/403.4dee4df3.js +0 -2
- package/__mf/js/async/410.839d386d.js +0 -1
- package/__mf/js/async/458.2a1e1dfe.js +0 -1
- package/__mf/js/async/470.9855b786.js +0 -2
- package/__mf/js/async/496.63537c05.js +0 -1
- package/__mf/js/async/587.e32d2906.js +0 -1
- package/__mf/js/async/588.7dda8aa9.js +0 -1
- package/__mf/js/async/616.1b1bb2ba.js +0 -1
- package/__mf/js/async/634.15a57760.js +0 -24
- package/__mf/js/async/71.773ab397.js +0 -1
- package/__mf/js/async/756.ae22d123.js +0 -1
- package/__mf/js/async/828.f4781483.js +0 -29
- package/__mf/js/async/854.0822db86.js +0 -1
- package/__mf/js/async/873.dca7db8d.js +0 -1
- package/__mf/js/async/901.82adc0d0.js +0 -7
- package/__mf/js/async/941.9ebff559.js +0 -2
- package/__mf/js/async/963.c04e5fd0.js +0 -1
- package/__mf/js/async/968.be22fbda.js +0 -1
- package/__mf/js/async/978.26163709.js +0 -1
- package/__mf/js/async/__federation_expose_GaugeChart.13a73d91.js +0 -1
- package/__mf/js/async/lib-router.9df6ec87.js +0 -2
- package/__mf/js/main.91b0662c.js +0 -6
- /package/__mf/js/async/{121.0385c285.js.LICENSE.txt → 121.f54c0cd0.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{274.07ee62ee.js.LICENSE.txt → 274.f21ae591.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.32210944.js.LICENSE.txt → 392.fe3b02d2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{403.4dee4df3.js.LICENSE.txt → 403.82cf743c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.9855b786.js.LICENSE.txt → 470.fb62dc61.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.9ebff559.js.LICENSE.txt → 941.75c3a449.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.9df6ec87.js.LICENSE.txt → lib-router.cf7b1bc1.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gauge-chart-model.d.ts","sourceRoot":"","sources":["../../src/gauge-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"gauge-chart-model.d.ts","sourceRoot":"","sources":["../../src/gauge-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,cAAc,EAAE,aAA2C,CAAC;AACzE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU,CAAC,iBAAiB,CAAC;IACzE,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC7B;AAED,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAEjF;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,iBAAiB,CAelE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/gauge-chart-model.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 {
|
|
1
|
+
{"version":3,"sources":["../../src/gauge-chart-model.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 { FormatOptions, ThresholdOptions } from '@perses-dev/components';\nimport { CalculationType, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Definition } from '@perses-dev/spec';\n\nexport const DEFAULT_FORMAT: FormatOptions = { unit: 'percent-decimal' };\nexport const DEFAULT_MAX_PERCENT = 100;\nexport const DEFAULT_MAX_PERCENT_DECIMAL = 1;\n\n/**\n * The schema for a GaugeChart panel.\n */\nexport interface GaugeChartDefinition extends Definition<GaugeChartOptions> {\n kind: 'GaugeChart';\n}\n\n/**\n * The Options object type supported by the GaugeChart panel plugin.\n */\nexport interface GaugeChartOptions {\n calculation: CalculationType;\n format?: FormatOptions;\n thresholds?: ThresholdOptions;\n max?: number;\n legend?: { show?: boolean };\n}\n\nexport type GaugeChartOptionsEditorProps = OptionsEditorProps<GaugeChartOptions>;\n\n/**\n * Creates the initial/empty options for a GaugeChart panel.\n */\nexport function createInitialGaugeChartOptions(): GaugeChartOptions {\n return {\n calculation: 'last-number',\n format: DEFAULT_FORMAT,\n thresholds: {\n steps: [\n {\n value: 0.8,\n },\n {\n value: 0.9,\n },\n ],\n },\n };\n}\n"],"names":["DEFAULT_FORMAT","unit","DEFAULT_MAX_PERCENT","DEFAULT_MAX_PERCENT_DECIMAL","createInitialGaugeChartOptions","calculation","format","thresholds","steps","value"],"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;AAMjC,OAAO,MAAMA,iBAAgC;IAAEC,MAAM;AAAkB,EAAE;AACzE,OAAO,MAAMC,sBAAsB,IAAI;AACvC,OAAO,MAAMC,8BAA8B,EAAE;AAsB7C;;CAEC,GACD,OAAO,SAASC;IACd,OAAO;QACLC,aAAa;QACbC,QAAQN;QACRO,YAAY;YACVC,OAAO;gBACL;oBACEC,OAAO;gBACT;gBACA;oBACEA,OAAO;gBACT;aACD;QACH;IACF;AACF"}
|
package/lib/thresholds.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThresholdColorPalette, ThresholdOptions
|
|
1
|
+
import { FormatOptions, ThresholdColorPalette, ThresholdOptions } from '@perses-dev/components';
|
|
2
2
|
export type GaugeColorStop = [number, string];
|
|
3
3
|
export type EChartsAxisLineColors = GaugeColorStop[];
|
|
4
4
|
export declare const defaultThresholdInput: ThresholdOptions;
|
package/lib/thresholds.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thresholds.d.ts","sourceRoot":"","sources":["../../src/thresholds.ts"],"names":[],"mappings":"AAaA,OAAO,EAAe,qBAAqB,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"thresholds.d.ts","sourceRoot":"","sources":["../../src/thresholds.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAe,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG7G,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,cAAc,EAAE,CAAC;AAErD,eAAO,MAAM,qBAAqB,EAAE,gBAA4C,CAAC;AAEjF,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,aAAa,EACnB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,qBAAqB,GAC7B,qBAAqB,CA4BvB"}
|
package/lib/thresholds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/thresholds.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 { StepOptions, ThresholdColorPalette, ThresholdOptions
|
|
1
|
+
{"version":3,"sources":["../../src/thresholds.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 { FormatOptions, StepOptions, ThresholdColorPalette, ThresholdOptions } from '@perses-dev/components';\nimport zip from 'lodash/zip';\n\nexport type GaugeColorStop = [number, string];\n\nexport type EChartsAxisLineColors = GaugeColorStop[];\n\nexport const defaultThresholdInput: ThresholdOptions = { steps: [{ value: 0 }] };\n\nexport function convertThresholds(\n thresholds: ThresholdOptions,\n unit: FormatOptions,\n max: number,\n palette: ThresholdColorPalette\n): EChartsAxisLineColors {\n const defaultThresholdColor = thresholds.defaultColor ?? palette.defaultColor;\n const defaultThresholdSteps: EChartsAxisLineColors = [[0, defaultThresholdColor]];\n\n if (thresholds.steps !== undefined) {\n // https://echarts.apache.org/en/option.html#series-gauge.axisLine.lineStyle.color\n // color segments must be decimal between 0 and 1\n const segmentMax = 1;\n const valuesArr: number[] = thresholds.steps.map((step: StepOptions) => {\n if (thresholds.mode === 'percent') {\n return step.value / 100;\n }\n return step.value / max;\n });\n valuesArr.push(segmentMax);\n\n const colorsArr = thresholds.steps.map((step: StepOptions, index) => step.color ?? palette.palette[index]);\n colorsArr.unshift(defaultThresholdColor);\n\n const zippedArr = zip(valuesArr, colorsArr);\n return zippedArr.map((elem) => {\n const convertedValues = elem[0] ?? segmentMax;\n const convertedColors = elem[1] ?? defaultThresholdColor;\n return [convertedValues, convertedColors];\n });\n } else {\n return defaultThresholdSteps;\n }\n}\n"],"names":["zip","defaultThresholdInput","steps","value","convertThresholds","thresholds","unit","max","palette","defaultThresholdColor","defaultColor","defaultThresholdSteps","undefined","segmentMax","valuesArr","map","step","mode","push","colorsArr","index","color","unshift","zippedArr","elem","convertedValues","convertedColors"],"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,OAAOA,SAAS,aAAa;AAM7B,OAAO,MAAMC,wBAA0C;IAAEC,OAAO;QAAC;YAAEC,OAAO;QAAE;KAAE;AAAC,EAAE;AAEjF,OAAO,SAASC,kBACdC,UAA4B,EAC5BC,IAAmB,EACnBC,GAAW,EACXC,OAA8B;IAE9B,MAAMC,wBAAwBJ,WAAWK,YAAY,IAAIF,QAAQE,YAAY;IAC7E,MAAMC,wBAA+C;QAAC;YAAC;YAAGF;SAAsB;KAAC;IAEjF,IAAIJ,WAAWH,KAAK,KAAKU,WAAW;QAClC,kFAAkF;QAClF,iDAAiD;QACjD,MAAMC,aAAa;QACnB,MAAMC,YAAsBT,WAAWH,KAAK,CAACa,GAAG,CAAC,CAACC;YAChD,IAAIX,WAAWY,IAAI,KAAK,WAAW;gBACjC,OAAOD,KAAKb,KAAK,GAAG;YACtB;YACA,OAAOa,KAAKb,KAAK,GAAGI;QACtB;QACAO,UAAUI,IAAI,CAACL;QAEf,MAAMM,YAAYd,WAAWH,KAAK,CAACa,GAAG,CAAC,CAACC,MAAmBI,QAAUJ,KAAKK,KAAK,IAAIb,QAAQA,OAAO,CAACY,MAAM;QACzGD,UAAUG,OAAO,CAACb;QAElB,MAAMc,YAAYvB,IAAIc,WAAWK;QACjC,OAAOI,UAAUR,GAAG,CAAC,CAACS;YACpB,MAAMC,kBAAkBD,IAAI,CAAC,EAAE,IAAIX;YACnC,MAAMa,kBAAkBF,IAAI,CAAC,EAAE,IAAIf;YACnC,OAAO;gBAACgB;gBAAiBC;aAAgB;QAC3C;IACF,OAAO;QACL,OAAOf;IACT;AACF"}
|
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "GaugeChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.
|
|
8
|
+
"buildVersion": "0.13.0-beta.0",
|
|
9
9
|
"buildName": "@perses-dev/gauge-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/GaugeChart.
|
|
12
|
+
"name": "__mf/js/GaugeChart.bad14568.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"api": ""
|
|
21
21
|
},
|
|
22
22
|
"globalName": "GaugeChart",
|
|
23
|
-
"pluginVersion": "
|
|
24
|
-
"prefetchInterface": false,
|
|
23
|
+
"pluginVersion": "2.4.0",
|
|
25
24
|
"getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/GaugeChart/\"; }"
|
|
26
25
|
},
|
|
27
26
|
"shared": [
|
|
@@ -35,35 +34,37 @@
|
|
|
35
34
|
"js": {
|
|
36
35
|
"async": [],
|
|
37
36
|
"sync": [
|
|
38
|
-
"__mf/js/async/274.
|
|
37
|
+
"__mf/js/async/274.f21ae591.js"
|
|
39
38
|
]
|
|
40
39
|
},
|
|
41
40
|
"css": {
|
|
42
41
|
"async": [],
|
|
43
42
|
"sync": []
|
|
44
43
|
}
|
|
45
|
-
}
|
|
44
|
+
},
|
|
45
|
+
"fallback": ""
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"id": "GaugeChart:@emotion/styled",
|
|
49
49
|
"name": "@emotion/styled",
|
|
50
|
-
"version": "11.14.
|
|
50
|
+
"version": "11.14.1",
|
|
51
51
|
"singleton": true,
|
|
52
|
-
"requiredVersion": "^11.14.
|
|
52
|
+
"requiredVersion": "^11.14.1",
|
|
53
53
|
"assets": {
|
|
54
54
|
"js": {
|
|
55
55
|
"async": [],
|
|
56
56
|
"sync": [
|
|
57
|
-
"__mf/js/async/235.
|
|
58
|
-
"__mf/js/async/616.
|
|
59
|
-
"__mf/js/async/854.
|
|
57
|
+
"__mf/js/async/235.ccb953ba.js",
|
|
58
|
+
"__mf/js/async/616.63ed457a.js",
|
|
59
|
+
"__mf/js/async/854.046f5bd5.js"
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
62
|
"css": {
|
|
63
63
|
"async": [],
|
|
64
64
|
"sync": []
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"fallback": ""
|
|
67
68
|
},
|
|
68
69
|
{
|
|
69
70
|
"id": "GaugeChart:@hookform/resolvers",
|
|
@@ -75,53 +76,58 @@
|
|
|
75
76
|
"js": {
|
|
76
77
|
"async": [],
|
|
77
78
|
"sync": [
|
|
78
|
-
"__mf/js/async/587.
|
|
79
|
-
"__mf/js/async/968.
|
|
79
|
+
"__mf/js/async/587.ee9de63b.js",
|
|
80
|
+
"__mf/js/async/968.a27c5193.js"
|
|
80
81
|
]
|
|
81
82
|
},
|
|
82
83
|
"css": {
|
|
83
84
|
"async": [],
|
|
84
85
|
"sync": []
|
|
85
86
|
}
|
|
86
|
-
}
|
|
87
|
+
},
|
|
88
|
+
"fallback": ""
|
|
87
89
|
},
|
|
88
90
|
{
|
|
89
91
|
"id": "GaugeChart:@perses-dev/components",
|
|
90
92
|
"name": "@perses-dev/components",
|
|
91
|
-
"version": "0.
|
|
93
|
+
"version": "0.54.0-beta.3",
|
|
92
94
|
"singleton": true,
|
|
93
|
-
"requiredVersion": "^0.
|
|
95
|
+
"requiredVersion": "^0.54.0-beta.3",
|
|
94
96
|
"assets": {
|
|
95
97
|
"js": {
|
|
96
98
|
"async": [],
|
|
97
99
|
"sync": [
|
|
98
|
-
"__mf/js/async/
|
|
100
|
+
"__mf/js/async/236.f2a0aa21.js"
|
|
99
101
|
]
|
|
100
102
|
},
|
|
101
103
|
"css": {
|
|
102
104
|
"async": [],
|
|
103
|
-
"sync": [
|
|
105
|
+
"sync": [
|
|
106
|
+
"__mf/css/async/236.85c2cbf6.css"
|
|
107
|
+
]
|
|
104
108
|
}
|
|
105
|
-
}
|
|
109
|
+
},
|
|
110
|
+
"fallback": ""
|
|
106
111
|
},
|
|
107
112
|
{
|
|
108
113
|
"id": "GaugeChart:@perses-dev/plugin-system",
|
|
109
114
|
"name": "@perses-dev/plugin-system",
|
|
110
|
-
"version": "0.
|
|
115
|
+
"version": "0.54.0-beta.3",
|
|
111
116
|
"singleton": true,
|
|
112
|
-
"requiredVersion": "^0.
|
|
117
|
+
"requiredVersion": "^0.54.0-beta.3",
|
|
113
118
|
"assets": {
|
|
114
119
|
"js": {
|
|
115
120
|
"async": [],
|
|
116
121
|
"sync": [
|
|
117
|
-
"__mf/js/async/
|
|
122
|
+
"__mf/js/async/568.d6d1abb7.js"
|
|
118
123
|
]
|
|
119
124
|
},
|
|
120
125
|
"css": {
|
|
121
126
|
"async": [],
|
|
122
127
|
"sync": []
|
|
123
128
|
}
|
|
124
|
-
}
|
|
129
|
+
},
|
|
130
|
+
"fallback": ""
|
|
125
131
|
},
|
|
126
132
|
{
|
|
127
133
|
"id": "GaugeChart:date-fns",
|
|
@@ -133,14 +139,15 @@
|
|
|
133
139
|
"js": {
|
|
134
140
|
"async": [],
|
|
135
141
|
"sync": [
|
|
136
|
-
"__mf/js/async/192.
|
|
142
|
+
"__mf/js/async/192.7917eb7e.js"
|
|
137
143
|
]
|
|
138
144
|
},
|
|
139
145
|
"css": {
|
|
140
146
|
"async": [],
|
|
141
147
|
"sync": []
|
|
142
148
|
}
|
|
143
|
-
}
|
|
149
|
+
},
|
|
150
|
+
"fallback": ""
|
|
144
151
|
},
|
|
145
152
|
{
|
|
146
153
|
"id": "GaugeChart:echarts",
|
|
@@ -152,71 +159,75 @@
|
|
|
152
159
|
"js": {
|
|
153
160
|
"async": [],
|
|
154
161
|
"sync": [
|
|
155
|
-
"__mf/js/async/873.
|
|
162
|
+
"__mf/js/async/873.66154697.js"
|
|
156
163
|
]
|
|
157
164
|
},
|
|
158
165
|
"css": {
|
|
159
166
|
"async": [],
|
|
160
167
|
"sync": []
|
|
161
168
|
}
|
|
162
|
-
}
|
|
169
|
+
},
|
|
170
|
+
"fallback": ""
|
|
163
171
|
},
|
|
164
172
|
{
|
|
165
173
|
"id": "GaugeChart:immer",
|
|
166
174
|
"name": "immer",
|
|
167
|
-
"version": "10.
|
|
175
|
+
"version": "10.2.0",
|
|
168
176
|
"singleton": true,
|
|
169
|
-
"requiredVersion": "^10.
|
|
177
|
+
"requiredVersion": "^10.2.0",
|
|
170
178
|
"assets": {
|
|
171
179
|
"js": {
|
|
172
180
|
"async": [],
|
|
173
181
|
"sync": [
|
|
174
|
-
"__mf/js/async/963.
|
|
182
|
+
"__mf/js/async/963.8c43a346.js"
|
|
175
183
|
]
|
|
176
184
|
},
|
|
177
185
|
"css": {
|
|
178
186
|
"async": [],
|
|
179
187
|
"sync": []
|
|
180
188
|
}
|
|
181
|
-
}
|
|
189
|
+
},
|
|
190
|
+
"fallback": ""
|
|
182
191
|
},
|
|
183
192
|
{
|
|
184
193
|
"id": "GaugeChart:lodash",
|
|
185
194
|
"name": "lodash",
|
|
186
|
-
"version": "4.
|
|
195
|
+
"version": "4.18.1",
|
|
187
196
|
"singleton": true,
|
|
188
|
-
"requiredVersion": "^4.
|
|
197
|
+
"requiredVersion": "^4.18.1",
|
|
189
198
|
"assets": {
|
|
190
199
|
"js": {
|
|
191
200
|
"async": [],
|
|
192
201
|
"sync": [
|
|
193
|
-
"__mf/js/async/392.
|
|
202
|
+
"__mf/js/async/392.fe3b02d2.js"
|
|
194
203
|
]
|
|
195
204
|
},
|
|
196
205
|
"css": {
|
|
197
206
|
"async": [],
|
|
198
207
|
"sync": []
|
|
199
208
|
}
|
|
200
|
-
}
|
|
209
|
+
},
|
|
210
|
+
"fallback": ""
|
|
201
211
|
},
|
|
202
212
|
{
|
|
203
213
|
"id": "GaugeChart:mdi-material-ui",
|
|
204
214
|
"name": "mdi-material-ui",
|
|
205
|
-
"version": "7.9.
|
|
215
|
+
"version": "7.9.4",
|
|
206
216
|
"singleton": true,
|
|
207
217
|
"requiredVersion": "7.4.0",
|
|
208
218
|
"assets": {
|
|
209
219
|
"js": {
|
|
210
220
|
"async": [],
|
|
211
221
|
"sync": [
|
|
212
|
-
"__mf/js/async/496.
|
|
222
|
+
"__mf/js/async/496.5f6f5973.js"
|
|
213
223
|
]
|
|
214
224
|
},
|
|
215
225
|
"css": {
|
|
216
226
|
"async": [],
|
|
217
227
|
"sync": []
|
|
218
228
|
}
|
|
219
|
-
}
|
|
229
|
+
},
|
|
230
|
+
"fallback": ""
|
|
220
231
|
},
|
|
221
232
|
{
|
|
222
233
|
"id": "GaugeChart:react-dom",
|
|
@@ -228,14 +239,15 @@
|
|
|
228
239
|
"js": {
|
|
229
240
|
"async": [],
|
|
230
241
|
"sync": [
|
|
231
|
-
"__mf/js/async/470.
|
|
242
|
+
"__mf/js/async/470.fb62dc61.js"
|
|
232
243
|
]
|
|
233
244
|
},
|
|
234
245
|
"css": {
|
|
235
246
|
"async": [],
|
|
236
247
|
"sync": []
|
|
237
248
|
}
|
|
238
|
-
}
|
|
249
|
+
},
|
|
250
|
+
"fallback": ""
|
|
239
251
|
},
|
|
240
252
|
{
|
|
241
253
|
"id": "GaugeChart:react",
|
|
@@ -247,14 +259,15 @@
|
|
|
247
259
|
"js": {
|
|
248
260
|
"async": [],
|
|
249
261
|
"sync": [
|
|
250
|
-
"__mf/js/async/121.
|
|
262
|
+
"__mf/js/async/121.f54c0cd0.js"
|
|
251
263
|
]
|
|
252
264
|
},
|
|
253
265
|
"css": {
|
|
254
266
|
"async": [],
|
|
255
267
|
"sync": []
|
|
256
268
|
}
|
|
257
|
-
}
|
|
269
|
+
},
|
|
270
|
+
"fallback": ""
|
|
258
271
|
},
|
|
259
272
|
{
|
|
260
273
|
"id": "GaugeChart:use-resize-observer",
|
|
@@ -266,15 +279,16 @@
|
|
|
266
279
|
"js": {
|
|
267
280
|
"async": [],
|
|
268
281
|
"sync": [
|
|
269
|
-
"__mf/js/async/458.
|
|
270
|
-
"__mf/js/async/77.
|
|
282
|
+
"__mf/js/async/458.7044e4bd.js",
|
|
283
|
+
"__mf/js/async/77.627b9458.js"
|
|
271
284
|
]
|
|
272
285
|
},
|
|
273
286
|
"css": {
|
|
274
287
|
"async": [],
|
|
275
288
|
"sync": []
|
|
276
289
|
}
|
|
277
|
-
}
|
|
290
|
+
},
|
|
291
|
+
"fallback": ""
|
|
278
292
|
},
|
|
279
293
|
{
|
|
280
294
|
"id": "GaugeChart:date-fns-tz",
|
|
@@ -286,14 +300,15 @@
|
|
|
286
300
|
"js": {
|
|
287
301
|
"async": [],
|
|
288
302
|
"sync": [
|
|
289
|
-
"__mf/js/async/978.
|
|
303
|
+
"__mf/js/async/978.0139c7c4.js"
|
|
290
304
|
]
|
|
291
305
|
},
|
|
292
306
|
"css": {
|
|
293
307
|
"async": [],
|
|
294
308
|
"sync": []
|
|
295
309
|
}
|
|
296
|
-
}
|
|
310
|
+
},
|
|
311
|
+
"fallback": ""
|
|
297
312
|
}
|
|
298
313
|
],
|
|
299
314
|
"remotes": [],
|
|
@@ -304,27 +319,26 @@
|
|
|
304
319
|
"assets": {
|
|
305
320
|
"js": {
|
|
306
321
|
"sync": [
|
|
307
|
-
"__mf/js/async/403.
|
|
308
|
-
"__mf/js/async/
|
|
309
|
-
"__mf/js/async/
|
|
310
|
-
"__mf/js/async/756.
|
|
311
|
-
"__mf/js/async/__federation_expose_GaugeChart.
|
|
322
|
+
"__mf/js/async/403.82cf743c.js",
|
|
323
|
+
"__mf/js/async/823.16520e98.js",
|
|
324
|
+
"__mf/js/async/172.eae65503.js",
|
|
325
|
+
"__mf/js/async/756.d0f359e2.js",
|
|
326
|
+
"__mf/js/async/__federation_expose_GaugeChart.014110ba.js"
|
|
312
327
|
],
|
|
313
328
|
"async": [
|
|
314
|
-
"__mf/js/async/588.
|
|
315
|
-
"__mf/js/async/
|
|
316
|
-
"__mf/js/async/
|
|
317
|
-
"__mf/js/async/
|
|
318
|
-
"__mf/js/async/
|
|
319
|
-
"__mf/js/async/lib-router.
|
|
320
|
-
"__mf/js/async/177.
|
|
329
|
+
"__mf/js/async/588.484c07dd.js",
|
|
330
|
+
"__mf/js/async/356.0f768c5a.js",
|
|
331
|
+
"__mf/js/async/71.2e72589f.js",
|
|
332
|
+
"__mf/js/async/1.ba1e7b30.js",
|
|
333
|
+
"__mf/js/async/410.145953d4.js",
|
|
334
|
+
"__mf/js/async/lib-router.cf7b1bc1.js",
|
|
335
|
+
"__mf/js/async/177.9bd5b404.js"
|
|
321
336
|
]
|
|
322
337
|
},
|
|
323
338
|
"css": {
|
|
324
339
|
"sync": [],
|
|
325
340
|
"async": [
|
|
326
|
-
"__mf/css/async/
|
|
327
|
-
"__mf/css/async/823.d3010b86.css"
|
|
341
|
+
"__mf/css/async/236.85c2cbf6.css"
|
|
328
342
|
]
|
|
329
343
|
}
|
|
330
344
|
},
|