@perses-dev/scatter-chart-plugin 0.6.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/LICENSE +201 -0
  2. package/README.md +41 -0
  3. package/__mf/css/async/341.9c79ef64.css +1 -0
  4. package/__mf/css/async/564.9c79ef64.css +1 -0
  5. package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
  6. package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
  7. package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
  8. package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
  9. package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
  10. package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
  11. package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
  12. package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
  13. package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
  14. package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
  15. package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
  16. package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
  17. package/__mf/js/527.d3310177.js +2 -0
  18. package/__mf/js/527.d3310177.js.LICENSE.txt +24 -0
  19. package/__mf/js/792.6224e3b1.js +6 -0
  20. package/__mf/js/792.6224e3b1.js.LICENSE.txt +9 -0
  21. package/__mf/js/ScatterChart.907123a8.js +5 -0
  22. package/__mf/js/async/150.4fc9e087.js +2 -0
  23. package/__mf/js/async/150.4fc9e087.js.LICENSE.txt +21 -0
  24. package/__mf/js/async/156.c11b1700.js +1 -0
  25. package/__mf/js/async/173.c19d3b98.js +2 -0
  26. package/__mf/js/async/173.c19d3b98.js.LICENSE.txt +19 -0
  27. package/__mf/js/async/507.3d416130.js +174 -0
  28. package/__mf/js/async/507.3d416130.js.LICENSE.txt +55 -0
  29. package/__mf/js/async/564.e5b95c38.js +2 -0
  30. package/__mf/js/async/564.e5b95c38.js.LICENSE.txt +9 -0
  31. package/__mf/js/async/651.791f807e.js +1 -0
  32. package/__mf/js/async/694.903128f9.js +1 -0
  33. package/__mf/js/async/740.c78d3483.js +1 -0
  34. package/__mf/js/async/75.06e41df4.js +1 -0
  35. package/__mf/js/async/770.da7255d0.js +1 -0
  36. package/__mf/js/async/960.e791a996.js +2 -0
  37. package/__mf/js/async/960.e791a996.js.LICENSE.txt +8 -0
  38. package/__mf/js/async/964.34b88a18.js +2 -0
  39. package/__mf/js/async/964.34b88a18.js.LICENSE.txt +9 -0
  40. package/__mf/js/async/__federation_expose_ScatterChart.9e6627ee.js +2 -0
  41. package/__mf/js/async/__federation_expose_ScatterChart.9e6627ee.js.LICENSE.txt +9 -0
  42. package/__mf/js/index.b48f09c4.js +1 -0
  43. package/lib/ScatterChart.d.ts +8 -0
  44. package/lib/ScatterChart.d.ts.map +1 -0
  45. package/lib/ScatterChart.js +27 -0
  46. package/lib/ScatterChart.js.map +1 -0
  47. package/lib/ScatterChartPanel.d.ts +37 -0
  48. package/lib/ScatterChartPanel.d.ts.map +1 -0
  49. package/lib/ScatterChartPanel.js +182 -0
  50. package/lib/ScatterChartPanel.js.map +1 -0
  51. package/lib/Scatterplot.d.ts +11 -0
  52. package/lib/Scatterplot.d.ts.map +1 -0
  53. package/lib/Scatterplot.js +113 -0
  54. package/lib/Scatterplot.js.map +1 -0
  55. package/lib/bootstrap.d.ts +2 -0
  56. package/lib/bootstrap.d.ts.map +1 -0
  57. package/lib/bootstrap.js +19 -0
  58. package/lib/bootstrap.js.map +1 -0
  59. package/lib/cjs/ScatterChart.js +33 -0
  60. package/lib/cjs/ScatterChartPanel.js +183 -0
  61. package/lib/cjs/Scatterplot.js +121 -0
  62. package/lib/cjs/bootstrap.js +26 -0
  63. package/lib/cjs/env.d.js +14 -0
  64. package/lib/cjs/getPluginModule.js +27 -0
  65. package/lib/cjs/index-federation.js +55 -0
  66. package/lib/cjs/index.js +28 -0
  67. package/lib/cjs/mock-trace-data.js +145 -0
  68. package/lib/cjs/scatter-chart-model.js +25 -0
  69. package/lib/cjs/setup-tests.js +19 -0
  70. package/lib/env.d.js +15 -0
  71. package/lib/env.d.js.map +1 -0
  72. package/lib/getPluginModule.d.ts +6 -0
  73. package/lib/getPluginModule.d.ts.map +1 -0
  74. package/lib/getPluginModule.js +16 -0
  75. package/lib/getPluginModule.js.map +1 -0
  76. package/lib/index-federation.d.ts +1 -0
  77. package/lib/index-federation.d.ts.map +1 -0
  78. package/lib/index-federation.js +15 -0
  79. package/lib/index-federation.js.map +1 -0
  80. package/lib/index.d.ts +6 -0
  81. package/lib/index.d.ts.map +1 -0
  82. package/lib/index.js +7 -0
  83. package/lib/index.js.map +1 -0
  84. package/lib/mock-trace-data.d.ts +88 -0
  85. package/lib/mock-trace-data.d.ts.map +1 -0
  86. package/lib/mock-trace-data.js +129 -0
  87. package/lib/mock-trace-data.js.map +1 -0
  88. package/lib/scatter-chart-model.d.ts +14 -0
  89. package/lib/scatter-chart-model.d.ts.map +1 -0
  90. package/lib/scatter-chart-model.js +19 -0
  91. package/lib/scatter-chart-model.js.map +1 -0
  92. package/lib/setup-tests.d.ts +2 -0
  93. package/lib/setup-tests.d.ts.map +1 -0
  94. package/lib/setup-tests.js +17 -0
  95. package/lib/setup-tests.js.map +1 -0
  96. package/mf-manifest.json +212 -0
  97. package/mf-stats.json +235 -0
  98. package/package.json +55 -0
@@ -0,0 +1,129 @@
1
+ // Copyright 2023 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
+ /**
14
+ * Mock data we get from getTraceData() in @perses/tempo-plugin.
15
+ */ export const MOCK_TRACE_SEARCH_RESULT = {
16
+ searchResult: [
17
+ {
18
+ startTimeUnixMs: 1702915645000,
19
+ durationMs: 100,
20
+ serviceStats: {
21
+ 'service-name': {
22
+ spanCount: 10
23
+ },
24
+ 'second-service-name': {
25
+ spanCount: 3,
26
+ errorCount: 2
27
+ }
28
+ },
29
+ traceId: '123',
30
+ rootServiceName: 'service-name',
31
+ rootTraceName: 'span-name'
32
+ }
33
+ ],
34
+ metadata: {
35
+ executedQueryString: '{duration > 500ms}'
36
+ }
37
+ };
38
+ export const MOCK_TRACE_SEARCH_RESULT_EMPTY = {
39
+ searchResult: [],
40
+ metadata: {
41
+ executedQueryString: '{duration > 500ms}'
42
+ }
43
+ };
44
+ /**
45
+ * Mocks results obtained from useTraceQueries() in @perses/plugin-system/runtime.
46
+ * This function uses then React TanStack function useQueries(fooQuery) to
47
+ * handle fetching.
48
+ */ export const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT = [
49
+ {
50
+ status: 'success',
51
+ fetchStatus: 'idle',
52
+ isLoading: false,
53
+ isSuccess: true,
54
+ isError: false,
55
+ data: MOCK_TRACE_SEARCH_RESULT,
56
+ dataUpdatedAt: 1666500979895,
57
+ definition: {
58
+ kind: 'TraceQuery',
59
+ spec: {
60
+ plugin: {
61
+ kind: 'TempoTraceQuery',
62
+ spec: {
63
+ query: '{}',
64
+ datasource: {
65
+ kind: 'TempoDatasource',
66
+ name: 'tempolocal'
67
+ }
68
+ }
69
+ }
70
+ }
71
+ },
72
+ error: null,
73
+ errorUpdatedAt: 0,
74
+ failureCount: 0,
75
+ errorUpdateCount: 0,
76
+ isFetched: true,
77
+ isFetchedAfterMount: true,
78
+ isFetching: false,
79
+ isRefetching: false,
80
+ isLoadingError: false,
81
+ isPaused: false,
82
+ isPlaceholderData: false,
83
+ isPreviousData: false,
84
+ isRefetchError: false,
85
+ isStale: true
86
+ }
87
+ ];
88
+ export const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY = [
89
+ {
90
+ status: 'success',
91
+ fetchStatus: 'idle',
92
+ isLoading: false,
93
+ isSuccess: true,
94
+ isError: false,
95
+ data: MOCK_TRACE_SEARCH_RESULT_EMPTY,
96
+ dataUpdatedAt: 1666500979895,
97
+ definition: {
98
+ kind: 'TraceQuery',
99
+ spec: {
100
+ plugin: {
101
+ kind: 'TempoTraceQuery',
102
+ spec: {
103
+ query: '{}',
104
+ datasource: {
105
+ kind: 'TempoDatasource',
106
+ name: 'tempolocal'
107
+ }
108
+ }
109
+ }
110
+ }
111
+ },
112
+ error: null,
113
+ errorUpdatedAt: 0,
114
+ failureCount: 0,
115
+ errorUpdateCount: 0,
116
+ isFetched: true,
117
+ isFetchedAfterMount: true,
118
+ isFetching: false,
119
+ isRefetching: false,
120
+ isLoadingError: false,
121
+ isPaused: false,
122
+ isPlaceholderData: false,
123
+ isPreviousData: false,
124
+ isRefetchError: false,
125
+ isStale: true
126
+ }
127
+ ];
128
+
129
+ //# sourceMappingURL=mock-trace-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/mock-trace-data.ts"],"sourcesContent":["// Copyright 2023 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 { TraceData } from '@perses-dev/core';\n\n/**\n * Mock data we get from getTraceData() in @perses/tempo-plugin.\n */\nexport const MOCK_TRACE_SEARCH_RESULT: TraceData = {\n searchResult: [\n {\n startTimeUnixMs: 1702915645000, // unix epoch time in milliseconds\n durationMs: 100,\n serviceStats: {\n 'service-name': {\n spanCount: 10,\n },\n 'second-service-name': {\n spanCount: 3,\n errorCount: 2,\n },\n },\n traceId: '123',\n rootServiceName: 'service-name',\n rootTraceName: 'span-name',\n },\n ],\n metadata: {\n executedQueryString: '{duration > 500ms}',\n },\n};\n\nexport const MOCK_TRACE_SEARCH_RESULT_EMPTY: TraceData = {\n searchResult: [],\n metadata: {\n executedQueryString: '{duration > 500ms}',\n },\n};\n\n/**\n * Mocks results obtained from useTraceQueries() in @perses/plugin-system/runtime.\n * This function uses then React TanStack function useQueries(fooQuery) to\n * handle fetching.\n */\nexport const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT = [\n {\n status: 'success',\n fetchStatus: 'idle',\n isLoading: false,\n isSuccess: true,\n isError: false,\n data: MOCK_TRACE_SEARCH_RESULT,\n dataUpdatedAt: 1666500979895,\n definition: {\n kind: 'TraceQuery',\n spec: {\n plugin: {\n kind: 'TempoTraceQuery',\n spec: {\n query: '{}',\n datasource: {\n kind: 'TempoDatasource',\n name: 'tempolocal',\n },\n },\n },\n },\n },\n error: null,\n errorUpdatedAt: 0,\n failureCount: 0,\n errorUpdateCount: 0,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: false,\n isRefetching: false,\n isLoadingError: false,\n isPaused: false,\n isPlaceholderData: false,\n isPreviousData: false,\n isRefetchError: false,\n isStale: true,\n },\n];\n\nexport const MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY = [\n {\n status: 'success',\n fetchStatus: 'idle',\n isLoading: false,\n isSuccess: true,\n isError: false,\n data: MOCK_TRACE_SEARCH_RESULT_EMPTY,\n dataUpdatedAt: 1666500979895,\n definition: {\n kind: 'TraceQuery',\n spec: {\n plugin: {\n kind: 'TempoTraceQuery',\n spec: {\n query: '{}',\n datasource: {\n kind: 'TempoDatasource',\n name: 'tempolocal',\n },\n },\n },\n },\n },\n error: null,\n errorUpdatedAt: 0,\n failureCount: 0,\n errorUpdateCount: 0,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: false,\n isRefetching: false,\n isLoadingError: false,\n isPaused: false,\n isPlaceholderData: false,\n isPreviousData: false,\n isRefetchError: false,\n isStale: true,\n },\n];\n"],"names":["MOCK_TRACE_SEARCH_RESULT","searchResult","startTimeUnixMs","durationMs","serviceStats","spanCount","errorCount","traceId","rootServiceName","rootTraceName","metadata","executedQueryString","MOCK_TRACE_SEARCH_RESULT_EMPTY","MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT","status","fetchStatus","isLoading","isSuccess","isError","data","dataUpdatedAt","definition","kind","spec","plugin","query","datasource","name","error","errorUpdatedAt","failureCount","errorUpdateCount","isFetched","isFetchedAfterMount","isFetching","isRefetching","isLoadingError","isPaused","isPlaceholderData","isPreviousData","isRefetchError","isStale","MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY"],"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;AAIjC;;CAEC,GACD,OAAO,MAAMA,2BAAsC;IACjDC,cAAc;QACZ;YACEC,iBAAiB;YACjBC,YAAY;YACZC,cAAc;gBACZ,gBAAgB;oBACdC,WAAW;gBACb;gBACA,uBAAuB;oBACrBA,WAAW;oBACXC,YAAY;gBACd;YACF;YACAC,SAAS;YACTC,iBAAiB;YACjBC,eAAe;QACjB;KACD;IACDC,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF,OAAO,MAAMC,iCAA4C;IACvDX,cAAc,EAAE;IAChBS,UAAU;QACRC,qBAAqB;IACvB;AACF,EAAE;AAEF;;;;CAIC,GACD,OAAO,MAAME,wCAAwC;IACnD;QACEC,QAAQ;QACRC,aAAa;QACbC,WAAW;QACXC,WAAW;QACXC,SAAS;QACTC,MAAMnB;QACNoB,eAAe;QACfC,YAAY;YACVC,MAAM;YACNC,MAAM;gBACJC,QAAQ;oBACNF,MAAM;oBACNC,MAAM;wBACJE,OAAO;wBACPC,YAAY;4BACVJ,MAAM;4BACNK,MAAM;wBACR;oBACF;gBACF;YACF;QACF;QACAC,OAAO;QACPC,gBAAgB;QAChBC,cAAc;QACdC,kBAAkB;QAClBC,WAAW;QACXC,qBAAqB;QACrBC,YAAY;QACZC,cAAc;QACdC,gBAAgB;QAChBC,UAAU;QACVC,mBAAmB;QACnBC,gBAAgB;QAChBC,gBAAgB;QAChBC,SAAS;IACX;CACD,CAAC;AAEF,OAAO,MAAMC,8CAA8C;IACzD;QACE5B,QAAQ;QACRC,aAAa;QACbC,WAAW;QACXC,WAAW;QACXC,SAAS;QACTC,MAAMP;QACNQ,eAAe;QACfC,YAAY;YACVC,MAAM;YACNC,MAAM;gBACJC,QAAQ;oBACNF,MAAM;oBACNC,MAAM;wBACJE,OAAO;wBACPC,YAAY;4BACVJ,MAAM;4BACNK,MAAM;wBACR;oBACF;gBACF;YACF;QACF;QACAC,OAAO;QACPC,gBAAgB;QAChBC,cAAc;QACdC,kBAAkB;QAClBC,WAAW;QACXC,qBAAqB;QACrBC,YAAY;QACZC,cAAc;QACdC,gBAAgB;QAChBC,UAAU;QACVC,mBAAmB;QACnBC,gBAAgB;QAChBC,gBAAgB;QAChBC,SAAS;IACX;CACD,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { UnknownSpec, QueryDefinition } from '@perses-dev/core';
2
+ export type TraceQueryDefinition<PluginSpec = UnknownSpec> = QueryDefinition<'TraceQuery', PluginSpec>;
3
+ /**
4
+ * The Options object type supported by the ScatterChart panel plugin.
5
+ */
6
+ export interface ScatterChartOptions {
7
+ /** range of the circles diameter */
8
+ sizeRange?: [number, number];
9
+ }
10
+ /**
11
+ * Creates the initial/empty options for a ScatterChart panel.
12
+ */
13
+ export declare function createInitialScatterChartOptions(): Record<string, unknown>;
14
+ //# sourceMappingURL=scatter-chart-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scatter-chart-model.d.ts","sourceRoot":"","sources":["../../src/scatter-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhE,MAAM,MAAM,oBAAoB,CAAC,UAAU,GAAG,WAAW,IAAI,eAAe,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAEvG;;GAEG;AAKH,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E"}
@@ -0,0 +1,19 @@
1
+ // Copyright 2023 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
+ /**
14
+ * Creates the initial/empty options for a ScatterChart panel.
15
+ */ export function createInitialScatterChartOptions() {
16
+ return {};
17
+ }
18
+
19
+ //# sourceMappingURL=scatter-chart-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/scatter-chart-model.ts"],"sourcesContent":["// Copyright 2023 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 { UnknownSpec, QueryDefinition } from '@perses-dev/core';\n\nexport type TraceQueryDefinition<PluginSpec = UnknownSpec> = QueryDefinition<'TraceQuery', PluginSpec>;\n\n/**\n * The Options object type supported by the ScatterChart panel plugin.\n */\n// TODO: Add support for scatter chart formatting options.\n// Some scaffolding has been done to support formatting options.\n// This includes the interface below which still needs implementation.\n// Note: The interface attributes must match cue/schemas/panels/scatter/scatter.cue\nexport interface ScatterChartOptions {\n /** range of the circles diameter */\n sizeRange?: [number, number];\n}\n\n/**\n * Creates the initial/empty options for a ScatterChart panel.\n */\nexport function createInitialScatterChartOptions(): Record<string, unknown> {\n return {};\n}\n"],"names":["createInitialScatterChartOptions"],"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;AAkBjC;;CAEC,GACD,OAAO,SAASA;IACd,OAAO,CAAC;AACV"}
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=setup-tests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,17 @@
1
+ // Copyright 2023 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 '@testing-library/jest-dom';
14
+ // Always mock e-charts during tests since we don't have a proper canvas in jsdom
15
+ jest.mock('echarts/core');
16
+
17
+ //# sourceMappingURL=setup-tests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/setup-tests.ts"],"sourcesContent":["// Copyright 2023 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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
@@ -0,0 +1,212 @@
1
+ {
2
+ "id": "ScatterChart",
3
+ "name": "ScatterChart",
4
+ "metaData": {
5
+ "name": "ScatterChart",
6
+ "type": "app",
7
+ "buildInfo": {
8
+ "buildVersion": "0.6.0",
9
+ "buildName": "@perses-dev/scatter-chart-plugin"
10
+ },
11
+ "remoteEntry": {
12
+ "name": "__mf/js/ScatterChart.907123a8.js",
13
+ "path": "",
14
+ "type": "global"
15
+ },
16
+ "types": {
17
+ "path": "",
18
+ "name": "",
19
+ "zip": "",
20
+ "api": ""
21
+ },
22
+ "globalName": "ScatterChart",
23
+ "pluginVersion": "0.11.2",
24
+ "prefetchInterface": false,
25
+ "publicPath": "/plugins/ScatterChart/"
26
+ },
27
+ "shared": [
28
+ {
29
+ "id": "ScatterChart:@emotion/react",
30
+ "name": "@emotion/react",
31
+ "version": "11.14.0",
32
+ "singleton": true,
33
+ "requiredVersion": "^11.11.3",
34
+ "assets": {
35
+ "js": {
36
+ "async": [
37
+ "__mf/js/async/964.34b88a18.js"
38
+ ],
39
+ "sync": [
40
+ "__mf/js/async/960.e791a996.js"
41
+ ]
42
+ },
43
+ "css": {
44
+ "async": [],
45
+ "sync": []
46
+ }
47
+ }
48
+ },
49
+ {
50
+ "id": "ScatterChart:@emotion/styled",
51
+ "name": "@emotion/styled",
52
+ "version": "11.14.0",
53
+ "singleton": true,
54
+ "requiredVersion": "^11.14.0",
55
+ "assets": {
56
+ "js": {
57
+ "async": [
58
+ "__mf/js/async/964.34b88a18.js",
59
+ "__mf/js/async/960.e791a996.js"
60
+ ],
61
+ "sync": [
62
+ "__mf/js/async/694.903128f9.js",
63
+ "__mf/js/async/770.da7255d0.js"
64
+ ]
65
+ },
66
+ "css": {
67
+ "async": [],
68
+ "sync": []
69
+ }
70
+ }
71
+ },
72
+ {
73
+ "id": "ScatterChart:@perses-dev/components",
74
+ "name": "@perses-dev/components",
75
+ "version": "0.51.0-beta.1",
76
+ "singleton": true,
77
+ "requiredVersion": "^0.51.0-beta.1",
78
+ "assets": {
79
+ "js": {
80
+ "async": [
81
+ "__mf/js/async/694.903128f9.js",
82
+ "__mf/js/async/960.e791a996.js",
83
+ "__mf/js/async/173.c19d3b98.js",
84
+ "__mf/js/async/740.c78d3483.js",
85
+ "__mf/js/async/75.06e41df4.js",
86
+ "__mf/js/async/964.34b88a18.js"
87
+ ],
88
+ "sync": [
89
+ "__mf/js/async/507.3d416130.js"
90
+ ]
91
+ },
92
+ "css": {
93
+ "async": [],
94
+ "sync": []
95
+ }
96
+ }
97
+ },
98
+ {
99
+ "id": "ScatterChart:date-fns",
100
+ "name": "date-fns",
101
+ "version": "4.1.0",
102
+ "singleton": true,
103
+ "requiredVersion": "^4.1.0",
104
+ "assets": {
105
+ "js": {
106
+ "async": [],
107
+ "sync": [
108
+ "__mf/js/async/75.06e41df4.js"
109
+ ]
110
+ },
111
+ "css": {
112
+ "async": [],
113
+ "sync": []
114
+ }
115
+ }
116
+ },
117
+ {
118
+ "id": "ScatterChart:react-dom",
119
+ "name": "react-dom",
120
+ "version": "18.3.1",
121
+ "singleton": true,
122
+ "requiredVersion": "18.2.0",
123
+ "assets": {
124
+ "js": {
125
+ "async": [
126
+ "__mf/js/async/964.34b88a18.js"
127
+ ],
128
+ "sync": [
129
+ "__mf/js/async/173.c19d3b98.js"
130
+ ]
131
+ },
132
+ "css": {
133
+ "async": [],
134
+ "sync": []
135
+ }
136
+ }
137
+ },
138
+ {
139
+ "id": "ScatterChart:react",
140
+ "name": "react",
141
+ "version": "18.3.1",
142
+ "singleton": true,
143
+ "requiredVersion": "18.2.0",
144
+ "assets": {
145
+ "js": {
146
+ "async": [],
147
+ "sync": [
148
+ "__mf/js/async/964.34b88a18.js"
149
+ ]
150
+ },
151
+ "css": {
152
+ "async": [],
153
+ "sync": []
154
+ }
155
+ }
156
+ },
157
+ {
158
+ "id": "ScatterChart:date-fns-tz",
159
+ "name": "date-fns-tz",
160
+ "version": "3.2.0",
161
+ "singleton": true,
162
+ "requiredVersion": "^3.2.0",
163
+ "assets": {
164
+ "js": {
165
+ "async": [
166
+ "__mf/js/async/75.06e41df4.js"
167
+ ],
168
+ "sync": [
169
+ "__mf/js/async/740.c78d3483.js"
170
+ ]
171
+ },
172
+ "css": {
173
+ "async": [],
174
+ "sync": []
175
+ }
176
+ }
177
+ }
178
+ ],
179
+ "remotes": [],
180
+ "exposes": [
181
+ {
182
+ "id": "ScatterChart:ScatterChart",
183
+ "name": "ScatterChart",
184
+ "assets": {
185
+ "js": {
186
+ "sync": [
187
+ "__mf/js/527.d3310177.js",
188
+ "__mf/js/async/150.4fc9e087.js",
189
+ "__mf/js/async/__federation_expose_ScatterChart.9e6627ee.js"
190
+ ],
191
+ "async": [
192
+ "__mf/js/async/964.34b88a18.js",
193
+ "__mf/js/async/156.c11b1700.js",
194
+ "__mf/js/async/507.3d416130.js",
195
+ "__mf/js/async/694.903128f9.js",
196
+ "__mf/js/async/960.e791a996.js",
197
+ "__mf/js/async/173.c19d3b98.js",
198
+ "__mf/js/async/740.c78d3483.js",
199
+ "__mf/js/async/75.06e41df4.js"
200
+ ]
201
+ },
202
+ "css": {
203
+ "sync": [],
204
+ "async": [
205
+ "__mf/css/async/341.9c79ef64.css"
206
+ ]
207
+ }
208
+ },
209
+ "path": "./ScatterChart"
210
+ }
211
+ ]
212
+ }
package/mf-stats.json ADDED
@@ -0,0 +1,235 @@
1
+ {
2
+ "id": "ScatterChart",
3
+ "name": "ScatterChart",
4
+ "metaData": {
5
+ "name": "ScatterChart",
6
+ "type": "app",
7
+ "buildInfo": {
8
+ "buildVersion": "0.6.0",
9
+ "buildName": "@perses-dev/scatter-chart-plugin"
10
+ },
11
+ "remoteEntry": {
12
+ "name": "__mf/js/ScatterChart.907123a8.js",
13
+ "path": "",
14
+ "type": "global"
15
+ },
16
+ "types": {
17
+ "path": "",
18
+ "name": "",
19
+ "zip": "",
20
+ "api": ""
21
+ },
22
+ "globalName": "ScatterChart",
23
+ "pluginVersion": "0.11.2",
24
+ "prefetchInterface": false,
25
+ "publicPath": "/plugins/ScatterChart/"
26
+ },
27
+ "shared": [
28
+ {
29
+ "singleton": true,
30
+ "requiredVersion": "^11.11.3",
31
+ "shareScope": "default",
32
+ "name": "@emotion/react",
33
+ "version": "11.14.0",
34
+ "eager": false,
35
+ "id": "ScatterChart:@emotion/react",
36
+ "assets": {
37
+ "js": {
38
+ "async": [
39
+ "__mf/js/async/964.34b88a18.js"
40
+ ],
41
+ "sync": [
42
+ "__mf/js/async/960.e791a996.js"
43
+ ]
44
+ },
45
+ "css": {
46
+ "async": [],
47
+ "sync": []
48
+ }
49
+ },
50
+ "usedIn": []
51
+ },
52
+ {
53
+ "singleton": true,
54
+ "requiredVersion": "^11.14.0",
55
+ "shareScope": "default",
56
+ "name": "@emotion/styled",
57
+ "version": "11.14.0",
58
+ "eager": false,
59
+ "id": "ScatterChart:@emotion/styled",
60
+ "assets": {
61
+ "js": {
62
+ "async": [
63
+ "__mf/js/async/964.34b88a18.js",
64
+ "__mf/js/async/960.e791a996.js"
65
+ ],
66
+ "sync": [
67
+ "__mf/js/async/694.903128f9.js",
68
+ "__mf/js/async/770.da7255d0.js"
69
+ ]
70
+ },
71
+ "css": {
72
+ "async": [],
73
+ "sync": []
74
+ }
75
+ },
76
+ "usedIn": []
77
+ },
78
+ {
79
+ "singleton": true,
80
+ "requiredVersion": "^0.51.0-beta.1",
81
+ "shareScope": "default",
82
+ "name": "@perses-dev/components",
83
+ "version": "0.51.0-beta.1",
84
+ "eager": false,
85
+ "id": "ScatterChart:@perses-dev/components",
86
+ "assets": {
87
+ "js": {
88
+ "async": [
89
+ "__mf/js/async/694.903128f9.js",
90
+ "__mf/js/async/960.e791a996.js",
91
+ "__mf/js/async/173.c19d3b98.js",
92
+ "__mf/js/async/740.c78d3483.js",
93
+ "__mf/js/async/75.06e41df4.js",
94
+ "__mf/js/async/964.34b88a18.js"
95
+ ],
96
+ "sync": [
97
+ "__mf/js/async/507.3d416130.js"
98
+ ]
99
+ },
100
+ "css": {
101
+ "async": [],
102
+ "sync": []
103
+ }
104
+ },
105
+ "usedIn": []
106
+ },
107
+ {
108
+ "singleton": true,
109
+ "requiredVersion": "^4.1.0",
110
+ "shareScope": "default",
111
+ "name": "date-fns",
112
+ "version": "4.1.0",
113
+ "eager": false,
114
+ "id": "ScatterChart:date-fns",
115
+ "assets": {
116
+ "js": {
117
+ "async": [],
118
+ "sync": [
119
+ "__mf/js/async/75.06e41df4.js"
120
+ ]
121
+ },
122
+ "css": {
123
+ "async": [],
124
+ "sync": []
125
+ }
126
+ },
127
+ "usedIn": []
128
+ },
129
+ {
130
+ "singleton": true,
131
+ "requiredVersion": "18.2.0",
132
+ "shareScope": "default",
133
+ "name": "react-dom",
134
+ "version": "18.3.1",
135
+ "eager": false,
136
+ "id": "ScatterChart:react-dom",
137
+ "assets": {
138
+ "js": {
139
+ "async": [
140
+ "__mf/js/async/964.34b88a18.js"
141
+ ],
142
+ "sync": [
143
+ "__mf/js/async/173.c19d3b98.js"
144
+ ]
145
+ },
146
+ "css": {
147
+ "async": [],
148
+ "sync": []
149
+ }
150
+ },
151
+ "usedIn": []
152
+ },
153
+ {
154
+ "singleton": true,
155
+ "requiredVersion": "18.2.0",
156
+ "shareScope": "default",
157
+ "name": "react",
158
+ "version": "18.3.1",
159
+ "eager": false,
160
+ "id": "ScatterChart:react",
161
+ "assets": {
162
+ "js": {
163
+ "async": [],
164
+ "sync": [
165
+ "__mf/js/async/964.34b88a18.js"
166
+ ]
167
+ },
168
+ "css": {
169
+ "async": [],
170
+ "sync": []
171
+ }
172
+ },
173
+ "usedIn": []
174
+ },
175
+ {
176
+ "singleton": true,
177
+ "requiredVersion": "^3.2.0",
178
+ "shareScope": "default",
179
+ "name": "date-fns-tz",
180
+ "version": "3.2.0",
181
+ "eager": false,
182
+ "id": "ScatterChart:date-fns-tz",
183
+ "assets": {
184
+ "js": {
185
+ "async": [
186
+ "__mf/js/async/75.06e41df4.js"
187
+ ],
188
+ "sync": [
189
+ "__mf/js/async/740.c78d3483.js"
190
+ ]
191
+ },
192
+ "css": {
193
+ "async": [],
194
+ "sync": []
195
+ }
196
+ },
197
+ "usedIn": []
198
+ }
199
+ ],
200
+ "remotes": [],
201
+ "exposes": [
202
+ {
203
+ "path": "./ScatterChart",
204
+ "id": "ScatterChart:ScatterChart",
205
+ "name": "ScatterChart",
206
+ "requires": [],
207
+ "file": "src/ScatterChart.ts",
208
+ "assets": {
209
+ "js": {
210
+ "sync": [
211
+ "__mf/js/527.d3310177.js",
212
+ "__mf/js/async/150.4fc9e087.js",
213
+ "__mf/js/async/__federation_expose_ScatterChart.9e6627ee.js"
214
+ ],
215
+ "async": [
216
+ "__mf/js/async/964.34b88a18.js",
217
+ "__mf/js/async/156.c11b1700.js",
218
+ "__mf/js/async/507.3d416130.js",
219
+ "__mf/js/async/694.903128f9.js",
220
+ "__mf/js/async/960.e791a996.js",
221
+ "__mf/js/async/173.c19d3b98.js",
222
+ "__mf/js/async/740.c78d3483.js",
223
+ "__mf/js/async/75.06e41df4.js"
224
+ ]
225
+ },
226
+ "css": {
227
+ "sync": [],
228
+ "async": [
229
+ "__mf/css/async/341.9c79ef64.css"
230
+ ]
231
+ }
232
+ }
233
+ }
234
+ ]
235
+ }