@devgateway/dvz-wp-commons 1.1.0 → 1.3.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 (65) hide show
  1. package/build/APIConfig.cjs +479 -0
  2. package/build/APIConfig.d.ts +31 -42
  3. package/build/APIConfig.js +366 -277
  4. package/build/APIutils.cjs +54 -0
  5. package/build/APIutils.d.ts +3 -3
  6. package/build/APIutils.js +11 -1
  7. package/build/Blocks.cjs +672 -0
  8. package/build/Blocks.d.ts +42 -65
  9. package/build/Blocks.js +524 -346
  10. package/build/CSVSourceConfig.cjs +99 -0
  11. package/build/CSVSourceConfig.d.ts +2 -3
  12. package/build/CSVSourceConfig.js +63 -41
  13. package/build/ChartColors.cjs +593 -0
  14. package/build/ChartColors.d.ts +4 -46
  15. package/build/ChartColors.js +431 -380
  16. package/build/ChartLegends.cjs +157 -0
  17. package/build/ChartLegends.d.ts +1 -33
  18. package/build/ChartLegends.js +173 -69
  19. package/build/ChartMeasures.cjs +192 -0
  20. package/build/ChartMeasures.d.ts +1 -23
  21. package/build/ChartMeasures.js +195 -108
  22. package/build/Constants.cjs +21 -0
  23. package/build/Constants.d.ts +18 -15
  24. package/build/Constants.js +3 -1
  25. package/build/DataFilters.cjs +176 -0
  26. package/build/DataFilters.d.ts +1 -12
  27. package/build/DataFilters.js +100 -93
  28. package/build/Format.cjs +1038 -0
  29. package/build/Format.d.ts +8 -10
  30. package/build/Format.js +428 -379
  31. package/build/MapCSVSourceConfig.cjs +36 -0
  32. package/build/MapCSVSourceConfig.d.ts +7 -9
  33. package/build/MapCSVSourceConfig.js +19 -9
  34. package/build/Measures.cjs +196 -0
  35. package/build/Measures.d.ts +1 -24
  36. package/build/Measures.js +208 -119
  37. package/build/MobileConfigUtils.cjs +92 -0
  38. package/build/MobileConfigUtils.d.ts +6 -6
  39. package/build/MobileConfigUtils.js +39 -32
  40. package/build/Tooltip.cjs +63 -0
  41. package/build/Tooltip.d.ts +1 -3
  42. package/build/Tooltip.js +27 -51
  43. package/build/Util.cjs +29 -0
  44. package/build/Util.d.ts +5 -6
  45. package/build/Util.js +9 -9
  46. package/build/hooks/index.cjs +1 -0
  47. package/build/hooks/index.js +0 -3
  48. package/build/icons/Chart.cjs +49 -0
  49. package/build/icons/Chart.d.ts +1 -2
  50. package/build/icons/Chart.js +10 -11
  51. package/build/icons/Generic.cjs +24 -0
  52. package/build/icons/Generic.d.ts +1 -2
  53. package/build/icons/Generic.js +25 -4
  54. package/build/icons/index.cjs +19 -0
  55. package/build/icons/index.d.ts +2 -2
  56. package/build/icons/index.js +2 -2
  57. package/build/index.cjs +225 -0
  58. package/build/index.d.ts +16 -18
  59. package/build/index.js +47 -19
  60. package/package.json +39 -30
  61. package/build/post-type.d.ts +0 -193
  62. package/build/post-type.js +0 -12
  63. package/build/tsconfig.tsbuildinfo +0 -1
  64. package/build/types.d.ts +0 -349
  65. package/build/types.js +0 -33
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.extractAxisValues = extractAxisValues;
7
+ exports.getSelectedItemsForApp = getSelectedItemsForApp;
8
+ exports.getSelectedLabelsForApp = getSelectedLabelsForApp;
9
+ exports.getStoredOrSetItem = getStoredOrSetItem;
10
+ exports.transformDataToAppObject = transformDataToAppObject;
11
+ exports.updateMeasureLabels = updateMeasureLabels;
12
+ var _lodash = _interopRequireDefault(require("lodash"));
13
+ var _APIutils = require("./APIutils.cjs");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function extractAxisValues(csvData) {
16
+ const lines = csvData.split("\n");
17
+ const firstColumnValues = lines?.slice(1)?.map(row => {
18
+ return row.split(",")[0];
19
+ });
20
+ return firstColumnValues;
21
+ }
22
+ function transformDataToAppObject(data, appName, existingObject = {}) {
23
+ if (existingObject[appName] !== undefined) {
24
+ return existingObject;
25
+ }
26
+ existingObject[appName] = {};
27
+ if (data) {
28
+ data.forEach(item => {
29
+ const key = item.value;
30
+ existingObject[appName][key] = {
31
+ selected: false,
32
+ format: {
33
+ style: "percent",
34
+ minimumFractionDigits: 1,
35
+ maximumFractionDigits: 1,
36
+ currency: "USD"
37
+ },
38
+ hasCustomLabel: false,
39
+ customLabel: item.label || key
40
+ };
41
+ });
42
+ }
43
+ return existingObject;
44
+ }
45
+ function getSelectedItemsForApp(config, appName) {
46
+ const appConfig = config[appName];
47
+ if (!appConfig) return {};
48
+ const selectedEntries = {};
49
+ for (const key in appConfig) {
50
+ const value = appConfig[key];
51
+ if (value && typeof value === 'object' && value.selected === true) {
52
+ selectedEntries[key] = value;
53
+ }
54
+ }
55
+ return selectedEntries;
56
+ }
57
+ function getSelectedLabelsForApp(data, appName) {
58
+ const appData = data;
59
+ if (!appData) {
60
+ return [];
61
+ }
62
+ return Object.keys(appData).filter(key => appData[key].selected) // Filter out the selected items
63
+ .map(key => {
64
+ return appData[key].hasCustomLabel ? appData[key].customLabel : appData[key].label;
65
+ });
66
+ }
67
+ function updateMeasureLabels(data, measures, app) {
68
+ transformDataToAppObject(data, app, measures);
69
+ const apiMeasures = (0, _APIutils.getTranslatedOptions)(data);
70
+ // for each api measure, find the corresponding measure in the measures array
71
+ // and add a label property to the measure in the measures array
72
+ apiMeasures?.forEach(apiMeasure => {
73
+ const measure = measures[app][apiMeasure.value];
74
+ if (measure) {
75
+ measure.label = apiMeasure.label;
76
+ }
77
+ });
78
+ }
79
+ ;
80
+ function getStoredOrSetItem(key, fallback, overwrite = false) {
81
+ const fallbackValue = fallback || [];
82
+ if (overwrite && !_lodash.default.isEmpty(fallbackValue)) {
83
+ sessionStorage.setItem(key, JSON.stringify(fallbackValue));
84
+ return fallbackValue;
85
+ }
86
+ const stored = JSON.parse(sessionStorage.getItem(key));
87
+ if (!stored) {
88
+ sessionStorage.setItem(key, JSON.stringify(fallbackValue));
89
+ return fallbackValue;
90
+ }
91
+ return stored;
92
+ }
@@ -1,6 +1,6 @@
1
- export declare function extractAxisValues(csvData: string): string[];
2
- export declare function transformDataToAppObject(data: any[], appName: string, existingObject?: any): any;
3
- export declare function getSelectedItemsForApp(config: Record<string, any>, appName: string): {};
4
- export declare function getSelectedLabelsForApp(data: any, appName: string): any[];
5
- export declare function updateMeasureLabels(data: any, measures: any, app: string): void;
6
- export declare function getStoredOrSetItem(key: any, fallback: any, overwrite?: boolean): any;
1
+ export function extractAxisValues(csvData: any): any;
2
+ export function transformDataToAppObject(data: any, appName: any, existingObject?: {}): {};
3
+ export function getSelectedItemsForApp(config: any, appName: any): {};
4
+ export function getSelectedLabelsForApp(data: any, appName: any): any[];
5
+ export function updateMeasureLabels(data: any, measures: any, app: any): void;
6
+ export function getStoredOrSetItem(key: any, fallback: any, overwrite?: boolean): any;
@@ -1,5 +1,7 @@
1
- import isEmpty from 'lodash.isempty';
2
- import { getTranslatedOptions } from "./APIutils";
1
+ import _ from 'lodash';
2
+ import {getTranslatedOptions} from "./APIutils.js";
3
+
4
+
3
5
  export function extractAxisValues(csvData) {
4
6
  const lines = csvData.split("\n");
5
7
  const firstColumnValues = lines?.slice(1)?.map((row) => {
@@ -7,53 +9,62 @@ export function extractAxisValues(csvData) {
7
9
  });
8
10
  return firstColumnValues;
9
11
  }
12
+
10
13
  export function transformDataToAppObject(data, appName, existingObject = {}) {
11
14
  if (existingObject[appName] !== undefined) {
12
15
  return existingObject;
13
16
  }
14
17
  existingObject[appName] = {};
15
- data?.forEach((item) => {
16
- const key = item.value;
17
- existingObject[appName][key] = {
18
- selected: false,
19
- format: {
20
- style: "percent",
21
- minimumFractionDigits: 1,
22
- maximumFractionDigits: 1,
23
- currency: "USD",
24
- },
25
- hasCustomLabel: false,
26
- customLabel: item.label || key,
27
- };
28
- });
18
+ if (data) {
19
+ data.forEach((item) => {
20
+ const key = item.value;
21
+ existingObject[appName][key] = {
22
+ selected: false,
23
+ format: {
24
+ style: "percent",
25
+ minimumFractionDigits: 1,
26
+ maximumFractionDigits: 1,
27
+ currency: "USD",
28
+ },
29
+ hasCustomLabel: false,
30
+ customLabel: item.label || key,
31
+ };
32
+ });
33
+ }
29
34
  return existingObject;
30
35
  }
36
+
31
37
  export function getSelectedItemsForApp(config, appName) {
32
38
  const appConfig = config[appName];
33
- if (!appConfig)
34
- return {};
39
+ if (!appConfig) return {};
40
+
35
41
  const selectedEntries = {};
42
+
36
43
  for (const key in appConfig) {
37
44
  const value = appConfig[key];
38
45
  if (value && typeof value === 'object' && value.selected === true) {
39
46
  selectedEntries[key] = value;
40
47
  }
41
48
  }
49
+
42
50
  return selectedEntries;
43
51
  }
52
+
53
+
44
54
  export function getSelectedLabelsForApp(data, appName) {
45
- const appData = data[appName];
55
+ const appData = data;
46
56
  if (!appData) {
47
57
  return [];
48
58
  }
49
59
  return Object.keys(appData)
50
60
  .filter((key) => appData[key].selected) // Filter out the selected items
51
61
  .map((key) => {
52
- return appData[key].hasCustomLabel
53
- ? appData[key].customLabel
54
- : appData[key].label;
55
- });
62
+ return appData[key].hasCustomLabel
63
+ ? appData[key].customLabel
64
+ : appData[key].label;
65
+ });
56
66
  }
67
+
57
68
  export function updateMeasureLabels(data, measures, app) {
58
69
  transformDataToAppObject(data, app, measures);
59
70
  const apiMeasures = getTranslatedOptions(data);
@@ -65,21 +76,17 @@ export function updateMeasureLabels(data, measures, app) {
65
76
  measure.label = apiMeasure.label;
66
77
  }
67
78
  });
68
- }
69
- ;
79
+ };
80
+
81
+
70
82
  export function getStoredOrSetItem(key, fallback, overwrite = false) {
71
83
  const fallbackValue = fallback || [];
72
- if (overwrite && !isEmpty(fallbackValue)) {
84
+ if (overwrite && !_.isEmpty(fallbackValue)) {
73
85
  sessionStorage
74
86
  .setItem(key, JSON.stringify(fallbackValue));
75
87
  return fallbackValue;
76
88
  }
77
- const storedItem = sessionStorage.getItem(key);
78
- if (storedItem === null) {
79
- sessionStorage.setItem(key, JSON.stringify(fallbackValue));
80
- return fallbackValue;
81
- }
82
- const stored = JSON.parse(storedItem);
89
+ const stored = JSON.parse(sessionStorage.getItem(key));
83
90
  if (!stored) {
84
91
  sessionStorage.setItem(key, JSON.stringify(fallbackValue));
85
92
  return fallbackValue;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Tooltip = void 0;
7
+ var _components = require("@wordpress/components");
8
+ var _i18n = require("@wordpress/i18n");
9
+ const Tooltip = props => {
10
+ function repeat(times) {
11
+ return function (...args) {
12
+ return cook(...args).repeat(times);
13
+ };
14
+ }
15
+ function cook(strs, ...substs) {
16
+ return substs.reduce((prev, cur, i) => prev + cur + strs[i + 1], strs[0]);
17
+ }
18
+ const {
19
+ setAttributes,
20
+ attributes: {
21
+ tooltipHTML,
22
+ dimension1,
23
+ dimension2,
24
+ dimension3,
25
+ measures
26
+ },
27
+ allMeasures,
28
+ allDimensions,
29
+ type
30
+ } = props;
31
+ return [/* @__PURE__ */React.createElement(_components.PanelBody, {
32
+ title: (0, _i18n.__)("Variables")
33
+ }, /* @__PURE__ */React.createElement("div", null, allDimensions.filter(d => d.value === dimension1 || d.value === dimension2 || d.value === dimension3).map(d => /* @__PURE__ */React.createElement(_components.PanelRow, null, /* @__PURE__ */React.createElement("span", {
34
+ style: {
35
+ "font-size": "11px"
36
+ }
37
+ }, d.label, " -> ", "{", d.value, "}")))), /* @__PURE__ */React.createElement("div", null, allMeasures.map(m => /* @__PURE__ */React.createElement(_components.PanelRow, null, /* @__PURE__ */React.createElement("span", {
38
+ style: {
39
+ "font-size": "11px"
40
+ }
41
+ }, m.label, " -> ", "{", m.value, "}")))), dimension1 == "none" && dimension2 == "none" && /* @__PURE__ */React.createElement(_components.PanelRow, null, /* @__PURE__ */React.createElement("span", {
42
+ style: {
43
+ "font-size": "11px"
44
+ }
45
+ }, "Corresponding Population -> ", "{", "populationValue", "}")), type === "pie" && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(_components.PanelRow, null, /* @__PURE__ */React.createElement("span", {
46
+ style: {
47
+ "font-size": "11px"
48
+ }
49
+ }, "Value Percent -> ", "{valuePercent}")), /* @__PURE__ */React.createElement(_components.PanelRow, null, /* @__PURE__ */React.createElement("span", {
50
+ style: {
51
+ "font-size": "11px"
52
+ }
53
+ }, "Category -> ", "{category}")))), /* @__PURE__ */React.createElement(_components.PanelRow, null, /* @__PURE__ */React.createElement(_components.TextareaControl, {
54
+ label: (0, _i18n.__)("Tooltip"),
55
+ value: tooltipHTML,
56
+ help: (0, _i18n.__)("You can use variables {var_name}"),
57
+ onChange: tooltipHTML2 => setAttributes({
58
+ tooltipHTML: tooltipHTML2
59
+ }),
60
+ rows: 10
61
+ }))];
62
+ };
63
+ exports.Tooltip = Tooltip;
@@ -1,3 +1 @@
1
- import React from 'react';
2
- export declare const Tooltip: (props: any) => React.JSX.Element[];
3
- export default Tooltip;
1
+ export function Tooltip(props: any): import("react").JSX.Element[];
package/build/Tooltip.js CHANGED
@@ -1,53 +1,29 @@
1
- import React from 'react';
2
- import { PanelRow, PanelBody, TextareaControl } from '@wordpress/components';
3
- import { __ } from '@wordpress/i18n';
1
+ import { PanelRow, Label, PanelBody, TextareaControl } from "@wordpress/components";
2
+ import { __ } from "@wordpress/i18n";
4
3
  export const Tooltip = (props) => {
5
- function repeat(times) {
6
- return function (strs, ...substs) {
7
- return cook(strs, ...substs).repeat(times);
8
- };
9
- }
10
- function cook(strs, ...substs) {
11
- return substs.reduce((prev, cur, i) => prev + cur + strs[i + 1], strs[0]);
12
- }
13
- const { setAttributes, attributes: { tooltipHTML, dimension1, dimension2, dimension3, measures }, allMeasures, allDimensions, type } = props;
14
- return [
15
- React.createElement(PanelBody, { title: __("Variables") },
16
- React.createElement("div", null, allDimensions.filter(d => (d.value === dimension1 || d.value === dimension2 || d.value === dimension3))
17
- .map(d => React.createElement(PanelRow, null,
18
- React.createElement("span", { style: { fontSize: "11px" } },
19
- d.label,
20
- " -> ",
21
- "{",
22
- d.value,
23
- "}")))),
24
- React.createElement("div", null, allMeasures
25
- .map(m => React.createElement(PanelRow, null,
26
- React.createElement("span", { style: { fontSize: "11px" } },
27
- m.label,
28
- " -> ",
29
- "{",
30
- m.value,
31
- "}")))),
32
- dimension1 == "none" && dimension2 == "none" &&
33
- React.createElement(PanelRow, null,
34
- React.createElement("span", { style: { fontSize: "11px" } },
35
- "Corresponding Population -> ",
36
- "{",
37
- "populationValue",
38
- "}")),
39
- type === "pie" &&
40
- React.createElement(React.Fragment, null,
41
- React.createElement(PanelRow, null,
42
- React.createElement("span", { style: { fontSize: "11px" } },
43
- "Value Percent -> ",
44
- '{valuePercent}')),
45
- React.createElement(PanelRow, null,
46
- React.createElement("span", { style: { fontSize: "11px" } },
47
- "Category -> ",
48
- '{category}')))),
49
- React.createElement(PanelRow, null,
50
- React.createElement(TextareaControl, { label: __("Tooltip"), value: tooltipHTML, help: __("You can use variables {var_name}"), onChange: (tooltipHTML) => setAttributes({ tooltipHTML }), rows: 10 }))
51
- ];
4
+ function repeat(times) {
5
+ return function(...args) {
6
+ return cook(...args).repeat(times);
7
+ };
8
+ }
9
+ function cook(strs, ...substs) {
10
+ return substs.reduce(
11
+ (prev, cur, i) => prev + cur + strs[i + 1],
12
+ strs[0]
13
+ );
14
+ }
15
+ const { setAttributes, attributes: { tooltipHTML, dimension1, dimension2, dimension3, measures }, allMeasures, allDimensions, type } = props;
16
+ return [
17
+ /* @__PURE__ */ React.createElement(PanelBody, { title: __("Variables") }, /* @__PURE__ */ React.createElement("div", null, allDimensions.filter((d) => d.value === dimension1 || d.value === dimension2 || d.value === dimension3).map((d) => /* @__PURE__ */ React.createElement(PanelRow, null, /* @__PURE__ */ React.createElement("span", { style: { "font-size": "11px" } }, d.label, " -> ", "{", d.value, "}")))), /* @__PURE__ */ React.createElement("div", null, allMeasures.map((m) => /* @__PURE__ */ React.createElement(PanelRow, null, /* @__PURE__ */ React.createElement("span", { style: { "font-size": "11px" } }, m.label, " -> ", "{", m.value, "}")))), dimension1 == "none" && dimension2 == "none" && /* @__PURE__ */ React.createElement(PanelRow, null, /* @__PURE__ */ React.createElement("span", { style: { "font-size": "11px" } }, "Corresponding Population -> ", "{", "populationValue", "}")), type === "pie" && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PanelRow, null, /* @__PURE__ */ React.createElement("span", { style: { "font-size": "11px" } }, "Value Percent -> ", "{valuePercent}")), /* @__PURE__ */ React.createElement(PanelRow, null, /* @__PURE__ */ React.createElement("span", { style: { "font-size": "11px" } }, "Category -> ", "{category}")))),
18
+ /* @__PURE__ */ React.createElement(PanelRow, null, /* @__PURE__ */ React.createElement(
19
+ TextareaControl,
20
+ {
21
+ label: __("Tooltip"),
22
+ value: tooltipHTML,
23
+ help: __("You can use variables {var_name}"),
24
+ onChange: (tooltipHTML2) => setAttributes({ tooltipHTML: tooltipHTML2 }),
25
+ rows: 10
26
+ }
27
+ ))
28
+ ];
52
29
  };
53
- export default Tooltip;
package/build/Util.cjs ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.togglePanel = exports.panelFocus = exports.default = void 0;
7
+ const togglePanel = (name, panelStatus2, setAttributes2) => {
8
+ const newStatus = {
9
+ ...panelStatus2
10
+ };
11
+ newStatus[name] = newStatus[name] == true ? false : true;
12
+ setAttributes2({
13
+ panelStatus: newStatus
14
+ });
15
+ };
16
+ exports.togglePanel = togglePanel;
17
+ const panelFocus = name => {
18
+ const newStatus = {
19
+ ...panelStatus
20
+ };
21
+ newStatus[name] = newStatus[name] == true ? false : true;
22
+ setAttributes({
23
+ panelFocus: newStatus
24
+ });
25
+ };
26
+ exports.panelFocus = panelFocus;
27
+ module.exports = {
28
+ togglePanel
29
+ };
package/build/Util.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- export declare const togglePanel: <T extends Record<string, any> = Record<string, any>>(name: string, panelStatus: Record<string, boolean>, setAttributes: (attributes: T) => void) => void;
2
- export declare const panelFocus: <T extends Record<string, any> = Record<string, any>>(name: string, panelStatus: Record<string, boolean>, setAttributes: (attributes: T) => void) => void;
3
- declare const _default: {
4
- togglePanel: <T extends Record<string, any> = Record<string, any>>(name: string, panelStatus: Record<string, boolean>, setAttributes: (attributes: T) => void) => void;
5
- panelFocus: <T extends Record<string, any> = Record<string, any>>(name: string, panelStatus: Record<string, boolean>, setAttributes: (attributes: T) => void) => void;
6
- };
1
+ export function togglePanel(name: any, panelStatus: any, setAttributes: any): void;
2
+ export function panelFocus(name: any): void;
3
+ declare namespace _default {
4
+ export { togglePanel };
5
+ }
7
6
  export default _default;
package/build/Util.js CHANGED
@@ -1,11 +1,11 @@
1
- export const togglePanel = (name, panelStatus, setAttributes) => {
2
- const newStatus = { ...panelStatus };
3
- newStatus[name] = newStatus[name] == true ? false : true;
4
- setAttributes({ panelStatus: newStatus });
1
+ export const togglePanel = (name, panelStatus2, setAttributes2) => {
2
+ const newStatus = { ...panelStatus2 };
3
+ newStatus[name] = newStatus[name] == true ? false : true;
4
+ setAttributes2({ panelStatus: newStatus });
5
5
  };
6
- export const panelFocus = (name, panelStatus, setAttributes) => {
7
- const newStatus = { ...panelStatus };
8
- newStatus[name] = newStatus[name] == true ? false : true;
9
- setAttributes({ panelFocus: newStatus });
6
+ export const panelFocus = (name) => {
7
+ const newStatus = { ...panelStatus };
8
+ newStatus[name] = newStatus[name] == true ? false : true;
9
+ setAttributes({ panelFocus: newStatus });
10
10
  };
11
- export default { togglePanel, panelFocus };
11
+ export default { togglePanel };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // @ts-ignore
3
- // export * from './useSetting';
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ module.exports = exports.ChartIcon = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _components = require("@wordpress/components");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const ChartIcon = () => {
11
+ return /* @__PURE__ */_react.default.createElement(_components.Icon, {
12
+ icon: () => /* @__PURE__ */_react.default.createElement("svg", {
13
+ version: "1.1",
14
+ viewBox: "0 0 18.777 18.777"
15
+ }, /* @__PURE__ */_react.default.createElement("g", null, /* @__PURE__ */_react.default.createElement("g", null, /* @__PURE__ */_react.default.createElement("path", {
16
+ style: {
17
+ "fill": "#030104;"
18
+ },
19
+ d: "M2.245,10.496H0.272C0.122,10.496,0,10.62,0,10.77v5.717c0,0.15,0.122,0.272,0.272,0.272h1.973\n c0.15,0,0.272-0.122,0.272-0.272V10.77C2.518,10.62,2.396,10.496,2.245,10.496z"
20
+ }), /* @__PURE__ */_react.default.createElement("path", {
21
+ style: {
22
+ "fill": "#030104;"
23
+ },
24
+ d: "M18.504,10.496h-1.973c-0.15,0-0.271,0.124-0.271,0.274v5.717c0,0.15,0.121,0.272,0.271,0.272\n h1.973c0.152,0,0.273-0.122,0.273-0.272V10.77C18.777,10.62,18.656,10.496,18.504,10.496z"
25
+ }), /* @__PURE__ */_react.default.createElement("path", {
26
+ style: {
27
+ "fill": "#030104;"
28
+ },
29
+ d: "M5.907,7.228H3.934c-0.15,0-0.273,0.122-0.273,0.273v8.984c0,0.15,0.123,0.272,0.273,0.272h1.973\n c0.151,0,0.273-0.122,0.273-0.272V7.501C6.18,7.349,6.058,7.228,5.907,7.228z"
30
+ }), /* @__PURE__ */_react.default.createElement("path", {
31
+ style: {
32
+ "fill": "#030104;"
33
+ },
34
+ d: "M14.271,7.228h-1.973c-0.15,0-0.271,0.122-0.271,0.273v8.984c0,0.15,0.121,0.272,0.271,0.272h1.973\n c0.152,0,0.273-0.122,0.273-0.272V7.501C14.545,7.349,14.424,7.228,14.271,7.228z"
35
+ }), /* @__PURE__ */_react.default.createElement("path", {
36
+ style: {
37
+ "fill": "#030104;"
38
+ },
39
+ d: "M10.01,9.218H8.036c-0.15,0-0.272,0.123-0.272,0.272v6.994c0,0.15,0.122,0.272,0.272,0.272h1.974\n c0.152,0,0.273-0.122,0.273-0.272V9.49C10.283,9.341,10.162,9.218,10.01,9.218z"
40
+ }), /* @__PURE__ */_react.default.createElement("path", {
41
+ style: {
42
+ "fill": "#030104;"
43
+ },
44
+ d: "M1.259,6.947c0.581,0,1.051-0.47,1.051-1.051c0-0.101-0.019-0.196-0.046-0.288l2.211-1.591\n c0.136,0.064,0.286,0.102,0.446,0.102c0.309,0,0.583-0.135,0.776-0.347L7.784,4.98c-0.012,0.062-0.02,0.126-0.02,0.19\n c0,0.58,0.471,1.051,1.051,1.051c0.559,0,1.012-0.438,1.044-0.989l2.814-0.823c0.191,0.262,0.498,0.435,0.848,0.435\n c0.232,0,0.443-0.077,0.617-0.205l2.365,1.604c-0.02,0.083-0.037,0.17-0.037,0.26c0,0.581,0.471,1.052,1.051,1.052\n s1.053-0.471,1.053-1.052s-0.473-1.051-1.053-1.051c-0.232,0-0.443,0.077-0.617,0.204l-2.363-1.601\n c0.02-0.084,0.035-0.17,0.035-0.26c0-0.581-0.469-1.051-1.051-1.051c-0.559,0-1.012,0.438-1.045,0.989L9.663,4.555\n C9.472,4.292,9.164,4.12,8.815,4.12c-0.259,0-0.492,0.096-0.675,0.251L5.968,3.112c0-0.015,0.004-0.028,0.004-0.042\n c0-0.581-0.47-1.052-1.051-1.052S3.87,2.488,3.87,3.069c0,0.158,0.038,0.306,0.1,0.441L1.855,5.032\n C1.686,4.914,1.481,4.845,1.259,4.845c-0.581,0-1.051,0.471-1.051,1.051C0.208,6.477,0.678,6.947,1.259,6.947z"
45
+ }))))
46
+ });
47
+ };
48
+ exports.ChartIcon = ChartIcon;
49
+ module.exports = ChartIcon;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- export declare const ChartIcon: () => React.JSX.Element;
1
+ export function ChartIcon(): JSX.Element;
3
2
  export default ChartIcon;
@@ -1,14 +1,13 @@
1
- import React from 'react';
2
- import { Icon } from '@wordpress/components';
1
+ import React from "react";
2
+ import { Icon } from "@wordpress/components";
3
3
  export const ChartIcon = () => {
4
- return React.createElement(Icon, { icon: () => (React.createElement("svg", { version: "1.1", viewBox: "0 0 18.777 18.777" },
5
- React.createElement("g", null,
6
- React.createElement("g", null,
7
- React.createElement("path", { style: { "fill": "#030104;" }, d: "M2.245,10.496H0.272C0.122,10.496,0,10.62,0,10.77v5.717c0,0.15,0.122,0.272,0.272,0.272h1.973\n\t\t\tc0.15,0,0.272-0.122,0.272-0.272V10.77C2.518,10.62,2.396,10.496,2.245,10.496z" }),
8
- React.createElement("path", { style: { "fill": "#030104;" }, d: "M18.504,10.496h-1.973c-0.15,0-0.271,0.124-0.271,0.274v5.717c0,0.15,0.121,0.272,0.271,0.272\n\t\t\th1.973c0.152,0,0.273-0.122,0.273-0.272V10.77C18.777,10.62,18.656,10.496,18.504,10.496z" }),
9
- React.createElement("path", { style: { "fill": "#030104;" }, d: "M5.907,7.228H3.934c-0.15,0-0.273,0.122-0.273,0.273v8.984c0,0.15,0.123,0.272,0.273,0.272h1.973\n\t\t\tc0.151,0,0.273-0.122,0.273-0.272V7.501C6.18,7.349,6.058,7.228,5.907,7.228z" }),
10
- React.createElement("path", { style: { "fill": "#030104;" }, d: "M14.271,7.228h-1.973c-0.15,0-0.271,0.122-0.271,0.273v8.984c0,0.15,0.121,0.272,0.271,0.272h1.973\n\t\t\tc0.152,0,0.273-0.122,0.273-0.272V7.501C14.545,7.349,14.424,7.228,14.271,7.228z" }),
11
- React.createElement("path", { style: { "fill": "#030104;" }, d: "M10.01,9.218H8.036c-0.15,0-0.272,0.123-0.272,0.272v6.994c0,0.15,0.122,0.272,0.272,0.272h1.974\n\t\t\tc0.152,0,0.273-0.122,0.273-0.272V9.49C10.283,9.341,10.162,9.218,10.01,9.218z" }),
12
- React.createElement("path", { style: { "fill": "#030104;" }, d: "M1.259,6.947c0.581,0,1.051-0.47,1.051-1.051c0-0.101-0.019-0.196-0.046-0.288l2.211-1.591\n\t\t\tc0.136,0.064,0.286,0.102,0.446,0.102c0.309,0,0.583-0.135,0.776-0.347L7.784,4.98c-0.012,0.062-0.02,0.126-0.02,0.19\n\t\t\tc0,0.58,0.471,1.051,1.051,1.051c0.559,0,1.012-0.438,1.044-0.989l2.814-0.823c0.191,0.262,0.498,0.435,0.848,0.435\n\t\t\tc0.232,0,0.443-0.077,0.617-0.205l2.365,1.604c-0.02,0.083-0.037,0.17-0.037,0.26c0,0.581,0.471,1.052,1.051,1.052\n\t\t\ts1.053-0.471,1.053-1.052s-0.473-1.051-1.053-1.051c-0.232,0-0.443,0.077-0.617,0.204l-2.363-1.601\n\t\t\tc0.02-0.084,0.035-0.17,0.035-0.26c0-0.581-0.469-1.051-1.051-1.051c-0.559,0-1.012,0.438-1.045,0.989L9.663,4.555\n\t\t\tC9.472,4.292,9.164,4.12,8.815,4.12c-0.259,0-0.492,0.096-0.675,0.251L5.968,3.112c0-0.015,0.004-0.028,0.004-0.042\n\t\t\tc0-0.581-0.47-1.052-1.051-1.052S3.87,2.488,3.87,3.069c0,0.158,0.038,0.306,0.1,0.441L1.855,5.032\n\t\t\tC1.686,4.914,1.481,4.845,1.259,4.845c-0.581,0-1.051,0.471-1.051,1.051C0.208,6.477,0.678,6.947,1.259,6.947z" }))))) });
4
+ return /* @__PURE__ */ React.createElement(Icon, { icon: () => /* @__PURE__ */ React.createElement(
5
+ "svg",
6
+ {
7
+ version: "1.1",
8
+ viewBox: "0 0 18.777 18.777"
9
+ },
10
+ /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("path", { style: { "fill": "#030104;" }, d: "M2.245,10.496H0.272C0.122,10.496,0,10.62,0,10.77v5.717c0,0.15,0.122,0.272,0.272,0.272h1.973\n c0.15,0,0.272-0.122,0.272-0.272V10.77C2.518,10.62,2.396,10.496,2.245,10.496z" }), /* @__PURE__ */ React.createElement("path", { style: { "fill": "#030104;" }, d: "M18.504,10.496h-1.973c-0.15,0-0.271,0.124-0.271,0.274v5.717c0,0.15,0.121,0.272,0.271,0.272\n h1.973c0.152,0,0.273-0.122,0.273-0.272V10.77C18.777,10.62,18.656,10.496,18.504,10.496z" }), /* @__PURE__ */ React.createElement("path", { style: { "fill": "#030104;" }, d: "M5.907,7.228H3.934c-0.15,0-0.273,0.122-0.273,0.273v8.984c0,0.15,0.123,0.272,0.273,0.272h1.973\n c0.151,0,0.273-0.122,0.273-0.272V7.501C6.18,7.349,6.058,7.228,5.907,7.228z" }), /* @__PURE__ */ React.createElement("path", { style: { "fill": "#030104;" }, d: "M14.271,7.228h-1.973c-0.15,0-0.271,0.122-0.271,0.273v8.984c0,0.15,0.121,0.272,0.271,0.272h1.973\n c0.152,0,0.273-0.122,0.273-0.272V7.501C14.545,7.349,14.424,7.228,14.271,7.228z" }), /* @__PURE__ */ React.createElement("path", { style: { "fill": "#030104;" }, d: "M10.01,9.218H8.036c-0.15,0-0.272,0.123-0.272,0.272v6.994c0,0.15,0.122,0.272,0.272,0.272h1.974\n c0.152,0,0.273-0.122,0.273-0.272V9.49C10.283,9.341,10.162,9.218,10.01,9.218z" }), /* @__PURE__ */ React.createElement("path", { style: { "fill": "#030104;" }, d: "M1.259,6.947c0.581,0,1.051-0.47,1.051-1.051c0-0.101-0.019-0.196-0.046-0.288l2.211-1.591\n c0.136,0.064,0.286,0.102,0.446,0.102c0.309,0,0.583-0.135,0.776-0.347L7.784,4.98c-0.012,0.062-0.02,0.126-0.02,0.19\n c0,0.58,0.471,1.051,1.051,1.051c0.559,0,1.012-0.438,1.044-0.989l2.814-0.823c0.191,0.262,0.498,0.435,0.848,0.435\n c0.232,0,0.443-0.077,0.617-0.205l2.365,1.604c-0.02,0.083-0.037,0.17-0.037,0.26c0,0.581,0.471,1.052,1.051,1.052\n s1.053-0.471,1.053-1.052s-0.473-1.051-1.053-1.051c-0.232,0-0.443,0.077-0.617,0.204l-2.363-1.601\n c0.02-0.084,0.035-0.17,0.035-0.26c0-0.581-0.469-1.051-1.051-1.051c-0.559,0-1.012,0.438-1.045,0.989L9.663,4.555\n C9.472,4.292,9.164,4.12,8.815,4.12c-0.259,0-0.492,0.096-0.675,0.251L5.968,3.112c0-0.015,0.004-0.028,0.004-0.042\n c0-0.581-0.47-1.052-1.051-1.052S3.87,2.488,3.87,3.069c0,0.158,0.038,0.306,0.1,0.441L1.855,5.032\n C1.686,4.914,1.481,4.845,1.259,4.845c-0.581,0-1.051,0.471-1.051,1.051C0.208,6.477,0.678,6.947,1.259,6.947z" })))
11
+ ) });
13
12
  };
14
13
  export default ChartIcon;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ module.exports = exports.GenericIcon = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _components = require("@wordpress/components");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const GenericIcon = () => /* @__PURE__ */_react.default.createElement(_components.Icon, {
11
+ icon: () => /* @__PURE__ */_react.default.createElement("svg", {
12
+ width: "24",
13
+ height: "24",
14
+ viewBox: "0 0 24 24",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ role: "img",
17
+ "aria-hidden": "true",
18
+ focusable: "false"
19
+ }, /* @__PURE__ */_react.default.createElement("path", {
20
+ d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"
21
+ }))
22
+ });
23
+ exports.GenericIcon = GenericIcon;
24
+ module.exports = GenericIcon;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- export declare const GenericIcon: () => React.JSX.Element;
1
+ export function GenericIcon(): JSX.Element;
3
2
  export default GenericIcon;
@@ -1,5 +1,26 @@
1
- import React from 'react';
2
- import { Icon } from '@wordpress/components';
3
- export const GenericIcon = () => (React.createElement(Icon, { icon: () => (React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-hidden": "true", focusable: "false" },
4
- React.createElement("path", { d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z" }))) }));
1
+ import React from "react";
2
+ import { Icon } from "@wordpress/components";
3
+ export const GenericIcon = () => /* @__PURE__ */ React.createElement(
4
+ Icon,
5
+ {
6
+ icon: () => /* @__PURE__ */ React.createElement(
7
+ "svg",
8
+ {
9
+ width: "24",
10
+ height: "24",
11
+ viewBox: "0 0 24 24",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ role: "img",
14
+ "aria-hidden": "true",
15
+ focusable: "false"
16
+ },
17
+ /* @__PURE__ */ React.createElement(
18
+ "path",
19
+ {
20
+ d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"
21
+ }
22
+ )
23
+ )
24
+ }
25
+ );
5
26
  export default GenericIcon;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ChartIcon", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Chart.ChartIcon;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "GenericIcon", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _Generic.GenericIcon;
16
+ }
17
+ });
18
+ var _Generic = require("./Generic.cjs");
19
+ var _Chart = require("./Chart.cjs");
@@ -1,2 +1,2 @@
1
- export { GenericIcon } from './Generic';
2
- export { ChartIcon } from './Chart';
1
+ export { GenericIcon } from "./Generic";
2
+ export { ChartIcon } from "./Chart";
@@ -1,2 +1,2 @@
1
- export { GenericIcon } from './Generic';
2
- export { ChartIcon } from './Chart';
1
+ export {GenericIcon} from './Generic.js';
2
+ export {ChartIcon} from './Chart.js';