@perses-dev/histogram-chart-plugin 0.12.0 → 0.13.0-beta.2
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/js/{main.ffd61509.js → HistogramChart.df5fff46.js} +4 -4
- package/__mf/js/async/121.27e8d4f8.js +2 -0
- package/__mf/js/async/362.fcbf1223.js +1 -0
- package/__mf/js/async/392.5ba26727.js +2 -0
- package/__mf/js/async/470.2ea03b19.js +2 -0
- package/__mf/js/async/887.bbc6e84a.js +144 -0
- package/__mf/js/async/888.85a51e69.js +1 -0
- package/__mf/js/async/941.8421dbe6.js +2 -0
- package/__mf/js/async/{953.5b6a6f54.js → 953.bbe56839.js} +2 -2
- package/__mf/js/async/963.0a826f58.js +1 -0
- package/__mf/js/async/__federation_expose_HistogramChart.a9992cd4.js +1 -0
- package/__mf/js/main.4a790b64.js +7 -0
- package/lib/HistogramChart.d.ts +3 -3
- package/lib/HistogramChart.d.ts.map +1 -1
- package/lib/HistogramChart.js +2 -2
- package/lib/HistogramChart.js.map +1 -1
- package/lib/bootstrap.js +2 -2
- package/lib/components/HistogramChart.d.ts +4 -4
- package/lib/components/HistogramChart.d.ts.map +1 -1
- package/lib/components/HistogramChart.js +7 -7
- package/lib/components/HistogramChart.js.map +1 -1
- package/lib/components/HistogramChartOptionsEditorSettings.d.ts +2 -2
- package/lib/components/HistogramChartOptionsEditorSettings.d.ts.map +1 -1
- package/lib/components/HistogramChartOptionsEditorSettings.js +5 -5
- package/lib/components/HistogramChartOptionsEditorSettings.js.map +1 -1
- package/lib/components/HistogramChartPanel.d.ts +4 -4
- package/lib/components/HistogramChartPanel.d.ts.map +1 -1
- package/lib/components/HistogramChartPanel.js +6 -6
- package/lib/components/HistogramChartPanel.js.map +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/index.js.map +1 -1
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/histogram-chart-model.d.ts +3 -3
- package/lib/histogram-chart-model.d.ts.map +1 -1
- package/lib/histogram-chart-model.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +2 -2
- package/lib/setup-tests.js.map +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/thresholds.d.ts +1 -1
- package/lib/utils/thresholds.d.ts.map +1 -1
- package/lib/utils/thresholds.js.map +1 -1
- package/mf-manifest.json +18 -18
- package/mf-stats.json +18 -18
- package/package.json +10 -10
- package/__mf/js/HistogramChart.e667cd2b.js +0 -7
- package/__mf/js/async/121.4fbaef7c.js +0 -2
- package/__mf/js/async/392.76c75fd4.js +0 -2
- package/__mf/js/async/470.46eda164.js +0 -2
- package/__mf/js/async/535.32b814f1.js +0 -1
- package/__mf/js/async/888.0f662c7e.js +0 -1
- package/__mf/js/async/892.f82ac287.js +0 -144
- package/__mf/js/async/941.4dc35097.js +0 -2
- package/__mf/js/async/963.85edfb9c.js +0 -1
- package/__mf/js/async/__federation_expose_HistogramChart.c1589bb7.js +0 -1
- package/lib/cjs/HistogramChart.js +0 -40
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/components/HistogramChart.js +0 -207
- package/lib/cjs/components/HistogramChartOptionsEditorSettings.js +0 -138
- package/lib/cjs/components/HistogramChartPanel.js +0 -104
- package/lib/cjs/components/index.js +0 -32
- package/lib/cjs/env.d.js +0 -14
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/histogram-chart-model.js +0 -84
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -47
- package/lib/cjs/setup-tests.js +0 -19
- package/lib/cjs/utils/index.js +0 -30
- package/lib/cjs/utils/thresholds.js +0 -34
- /package/__mf/css/async/{892.85c2cbf6.css → 887.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{121.4fbaef7c.js.LICENSE.txt → 121.27e8d4f8.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.76c75fd4.js.LICENSE.txt → 392.5ba26727.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.46eda164.js.LICENSE.txt → 470.2ea03b19.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{892.f82ac287.js.LICENSE.txt → 887.bbc6e84a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.4dc35097.js.LICENSE.txt → 941.8421dbe6.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{953.5b6a6f54.js.LICENSE.txt → 953.bbe56839.js.LICENSE.txt} +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get DEFAULT_FORMAT () {
|
|
25
|
-
return DEFAULT_FORMAT;
|
|
26
|
-
},
|
|
27
|
-
get DEFAULT_MAX_PERCENT () {
|
|
28
|
-
return DEFAULT_MAX_PERCENT;
|
|
29
|
-
},
|
|
30
|
-
get DEFAULT_MAX_PERCENT_DECIMAL () {
|
|
31
|
-
return DEFAULT_MAX_PERCENT_DECIMAL;
|
|
32
|
-
},
|
|
33
|
-
get DEFAULT_MIN_PERCENT () {
|
|
34
|
-
return DEFAULT_MIN_PERCENT;
|
|
35
|
-
},
|
|
36
|
-
get DEFAULT_MIN_PERCENT_DECIMAL () {
|
|
37
|
-
return DEFAULT_MIN_PERCENT_DECIMAL;
|
|
38
|
-
},
|
|
39
|
-
get DEFAULT_THRESHOLDS () {
|
|
40
|
-
return DEFAULT_THRESHOLDS;
|
|
41
|
-
},
|
|
42
|
-
get LOG_BASE_CONFIG () {
|
|
43
|
-
return LOG_BASE_CONFIG;
|
|
44
|
-
},
|
|
45
|
-
get LOG_BASE_OPTIONS () {
|
|
46
|
-
return LOG_BASE_OPTIONS;
|
|
47
|
-
},
|
|
48
|
-
get createInitialHistogramChartOptions () {
|
|
49
|
-
return createInitialHistogramChartOptions;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const DEFAULT_FORMAT = {
|
|
53
|
-
unit: 'decimal'
|
|
54
|
-
};
|
|
55
|
-
const DEFAULT_THRESHOLDS = {
|
|
56
|
-
defaultColor: '#56b4e9'
|
|
57
|
-
};
|
|
58
|
-
const DEFAULT_MIN_PERCENT = 0;
|
|
59
|
-
const DEFAULT_MAX_PERCENT = 100;
|
|
60
|
-
const DEFAULT_MIN_PERCENT_DECIMAL = 0;
|
|
61
|
-
const DEFAULT_MAX_PERCENT_DECIMAL = 1;
|
|
62
|
-
const LOG_BASE_CONFIG = {
|
|
63
|
-
none: {
|
|
64
|
-
label: 'None',
|
|
65
|
-
log: undefined
|
|
66
|
-
},
|
|
67
|
-
'2': {
|
|
68
|
-
label: '2',
|
|
69
|
-
log: 2
|
|
70
|
-
},
|
|
71
|
-
'10': {
|
|
72
|
-
label: '10',
|
|
73
|
-
log: 10
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const LOG_BASE_OPTIONS = Object.entries(LOG_BASE_CONFIG).map(([id, config])=>({
|
|
77
|
-
id: id,
|
|
78
|
-
...config
|
|
79
|
-
}));
|
|
80
|
-
function createInitialHistogramChartOptions() {
|
|
81
|
-
return {
|
|
82
|
-
format: DEFAULT_FORMAT
|
|
83
|
-
};
|
|
84
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
3
|
-
if (typeof WeakMap !== "function") return null;
|
|
4
|
-
var cacheBabelInterop = new WeakMap();
|
|
5
|
-
var cacheNodeInterop = new WeakMap();
|
|
6
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
7
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
8
|
-
})(nodeInterop);
|
|
9
|
-
}
|
|
10
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
11
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
15
|
-
return {
|
|
16
|
-
default: obj
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
20
|
-
if (cache && cache.has(obj)) {
|
|
21
|
-
return cache.get(obj);
|
|
22
|
-
}
|
|
23
|
-
var newObj = {
|
|
24
|
-
__proto__: null
|
|
25
|
-
};
|
|
26
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
27
|
-
for(var key in obj){
|
|
28
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
29
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
30
|
-
if (desc && (desc.get || desc.set)) {
|
|
31
|
-
Object.defineProperty(newObj, key, desc);
|
|
32
|
-
} else {
|
|
33
|
-
newObj[key] = obj[key];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
newObj.default = obj;
|
|
38
|
-
if (cache) {
|
|
39
|
-
cache.set(obj, newObj);
|
|
40
|
-
}
|
|
41
|
-
return newObj;
|
|
42
|
-
}
|
|
43
|
-
// Copyright The Perses Authors
|
|
44
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
45
|
-
// you may not use this file except in compliance with the License.
|
|
46
|
-
// You may obtain a copy of the License at
|
|
47
|
-
//
|
|
48
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
-
//
|
|
50
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
51
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
52
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
53
|
-
// See the License for the specific language governing permissions and
|
|
54
|
-
// limitations under the License.
|
|
55
|
-
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
|
package/lib/cjs/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get HistogramChartPanel () {
|
|
25
|
-
return _components.HistogramChartPanel;
|
|
26
|
-
},
|
|
27
|
-
get getPluginModule () {
|
|
28
|
-
return _getPluginModule.getPluginModule;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const _getPluginModule = require("./getPluginModule");
|
|
32
|
-
const _components = require("./components");
|
|
33
|
-
_export_star(require("./histogram-chart-model"), exports);
|
|
34
|
-
_export_star(require("./HistogramChart"), exports);
|
|
35
|
-
function _export_star(from, to) {
|
|
36
|
-
Object.keys(from).forEach(function(k) {
|
|
37
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
38
|
-
Object.defineProperty(to, k, {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function() {
|
|
41
|
-
return from[k];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
return from;
|
|
47
|
-
}
|
package/lib/cjs/setup-tests.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
require("@testing-library/jest-dom");
|
|
18
|
-
// Always mock e-charts during tests since we don't have a proper canvas in jsdom
|
|
19
|
-
jest.mock('echarts/core');
|
package/lib/cjs/utils/index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
_export_star(require("./thresholds"), exports);
|
|
18
|
-
function _export_star(from, to) {
|
|
19
|
-
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
-
Object.defineProperty(to, k, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function() {
|
|
24
|
-
return from[k];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return from;
|
|
30
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "getColorFromThresholds", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return getColorFromThresholds;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
function getColorFromThresholds(value, thresholds, chartsTheme, defaultColor) {
|
|
24
|
-
if (thresholds?.steps) {
|
|
25
|
-
const matchingColors = thresholds.steps.map((step, index)=>{
|
|
26
|
-
if (value >= step.value) {
|
|
27
|
-
return step.color ?? chartsTheme.thresholds.palette[index] ?? thresholds.defaultColor ?? defaultColor;
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
}).filter((color)=>color !== null);
|
|
31
|
-
return matchingColors[matchingColors.length - 1] ?? thresholds.defaultColor ?? defaultColor;
|
|
32
|
-
}
|
|
33
|
-
return thresholds?.defaultColor ?? defaultColor;
|
|
34
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|