@devgateway/dvz-wp-commons 1.0.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 (50) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +0 -0
  3. package/build/APIConfig.d.ts +49 -0
  4. package/build/APIConfig.js +302 -0
  5. package/build/APIutils.d.ts +4 -0
  6. package/build/APIutils.js +30 -0
  7. package/build/Blocks.d.ts +90 -0
  8. package/build/Blocks.js +374 -0
  9. package/build/CSVSourceConfig.d.ts +11 -0
  10. package/build/CSVSourceConfig.js +48 -0
  11. package/build/ChartColors.d.ts +55 -0
  12. package/build/ChartColors.js +401 -0
  13. package/build/ChartLegends.d.ts +33 -0
  14. package/build/ChartLegends.js +71 -0
  15. package/build/ChartMeasures.d.ts +23 -0
  16. package/build/ChartMeasures.js +117 -0
  17. package/build/Constants.d.ts +15 -0
  18. package/build/Constants.js +15 -0
  19. package/build/DataFilters.d.ts +13 -0
  20. package/build/DataFilters.js +98 -0
  21. package/build/Format.d.ts +12 -0
  22. package/build/Format.js +385 -0
  23. package/build/MapCSVSourceConfig.d.ts +12 -0
  24. package/build/MapCSVSourceConfig.js +12 -0
  25. package/build/Measures.d.ts +25 -0
  26. package/build/Measures.js +126 -0
  27. package/build/MobileConfigUtils.d.ts +6 -0
  28. package/build/MobileConfigUtils.js +88 -0
  29. package/build/Tooltip.d.ts +3 -0
  30. package/build/Tooltip.js +53 -0
  31. package/build/Util.d.ts +7 -0
  32. package/build/Util.js +11 -0
  33. package/build/hooks/index.d.ts +0 -0
  34. package/build/hooks/index.js +3 -0
  35. package/build/hooks/useSetting.d.ts +2 -0
  36. package/build/hooks/useSetting.js +11 -0
  37. package/build/icons/Chart.d.ts +3 -0
  38. package/build/icons/Chart.js +14 -0
  39. package/build/icons/Generic.d.ts +3 -0
  40. package/build/icons/Generic.js +5 -0
  41. package/build/icons/index.d.ts +2 -0
  42. package/build/icons/index.js +2 -0
  43. package/build/index.d.ts +18 -0
  44. package/build/index.js +19 -0
  45. package/build/post-type.d.ts +193 -0
  46. package/build/post-type.js +12 -0
  47. package/build/tsconfig.tsbuildinfo +1 -0
  48. package/build/types.d.ts +349 -0
  49. package/build/types.js +33 -0
  50. package/package.json +74 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright © 2025 Development Gateway
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
File without changes
@@ -0,0 +1,49 @@
1
+ import React from "react";
2
+ import { Component } from "@wordpress/element";
3
+ import { Measure, Dimension, Filter, Category, Categories } from "./types";
4
+ type APIConfigProps = {
5
+ allDimensions: Dimension[];
6
+ allFilters: Filter[];
7
+ allMeasures: Measure[];
8
+ allCategories: Categories;
9
+ setAttributes: (attributes: any) => void;
10
+ attributes: {
11
+ measures: Measure[];
12
+ filters: Filter[];
13
+ categories: Category[];
14
+ dimension1: string;
15
+ dimension2: string;
16
+ type: string;
17
+ swap: boolean;
18
+ manualColors: Record<string, Record<string, string>>;
19
+ scheme: string;
20
+ colorBy: string;
21
+ barColor: string;
22
+ app: string;
23
+ csv: string;
24
+ includeOverall: boolean;
25
+ types: any[];
26
+ };
27
+ };
28
+ export declare class APIConfig extends Component<APIConfigProps> {
29
+ constructor(props: APIConfigProps);
30
+ cleanSelection(prevState: any): void;
31
+ updateFilterParam(param: any, idx: any): void;
32
+ updateFilterValue(value: any, idx: any): void;
33
+ setFilterValue(value: any, idx: any): void;
34
+ addFilter(): void;
35
+ removeFilter(f: any): void;
36
+ componentDidUpdate(prevProps: any): void;
37
+ onSetSingleMeasure(value: any): void;
38
+ onFormatChange(format: any, field: any): void;
39
+ onUseCustomAxisFormatChange(value: any): void;
40
+ onMeasuresChange(value: string): void;
41
+ onCustomLabelToggleChange(value: string): void;
42
+ onCustomLabelChange(value: string, customLabel: string): void;
43
+ items(type: string): {
44
+ value: string;
45
+ id: number;
46
+ }[] | null;
47
+ render(): React.JSX.Element[];
48
+ }
49
+ export default APIConfig;
@@ -0,0 +1,302 @@
1
+ import React from "react";
2
+ import { Component } from "@wordpress/element";
3
+ import { __ } from "@wordpress/i18n";
4
+ import { Button, PanelBody, PanelRow, SelectControl, ToggleControl, } from "@wordpress/components";
5
+ import Measures from "./Measures";
6
+ const defaultFormat = {
7
+ style: "percent",
8
+ minimumFractionDigits: 1,
9
+ maximumFractionDigits: 1,
10
+ currency: "USD",
11
+ };
12
+ const FilterSelector = ({ param, index, options, onUpdateFilterParam }) => {
13
+ const sortedOptions = options.sort(function (a, b) {
14
+ var aLabel = a.label ? a.label.toLowerCase() : "";
15
+ var bLabel = b.label ? b.label.toLowerCase() : "";
16
+ return aLabel < bLabel ? -1 : aLabel > bLabel ? 1 : 0;
17
+ });
18
+ return (React.createElement(SelectControl, { onChange: (value) => {
19
+ onUpdateFilterParam(value, index);
20
+ }, value: param, options: sortedOptions }));
21
+ };
22
+ const CategoricalFilter = ({ value, index, items, onUpdateFilterValue }) => {
23
+ if (items) {
24
+ const sortedItems = items.sort(function (a, b) {
25
+ if (a.position !== undefined && b.position !== undefined) {
26
+ return a.position - b.position;
27
+ }
28
+ let aValue = a.value ? a.value.toLowerCase() : "";
29
+ let bValue = b.value ? b.value.toLowerCase() : "";
30
+ return aValue < bValue ? -1 : aValue > bValue ? 1 : 0;
31
+ });
32
+ return sortedItems.map((v) => (React.createElement(PanelRow, null,
33
+ " ",
34
+ React.createElement(ToggleControl, { label: v.value, checked: value.indexOf(v.id) > -1, onChange: (e) => {
35
+ onUpdateFilterValue(v.id, index);
36
+ } }))));
37
+ }
38
+ else {
39
+ return null;
40
+ }
41
+ };
42
+ export class APIConfig extends Component {
43
+ constructor(props) {
44
+ super(props);
45
+ this.onMeasuresChange = this.onMeasuresChange.bind(this);
46
+ this.onSetSingleMeasure = this.onSetSingleMeasure.bind(this);
47
+ this.addFilter = this.addFilter.bind(this);
48
+ this.updateFilterParam = this.updateFilterParam.bind(this);
49
+ this.updateFilterValue = this.updateFilterValue.bind(this);
50
+ this.setFilterValue = this.setFilterValue.bind(this);
51
+ this.removeFilter = this.removeFilter.bind(this);
52
+ this.items = this.items.bind(this);
53
+ this.onFormatChange = this.onFormatChange.bind(this);
54
+ this.onCustomLabelToggleChange = this.onCustomLabelToggleChange.bind(this);
55
+ this.onCustomLabelChange = this.onCustomLabelChange.bind(this);
56
+ this.onUseCustomAxisFormatChange =
57
+ this.onUseCustomAxisFormatChange.bind(this);
58
+ //this.onCustomMeasureFieldChange = this.onCustomMeasureFieldChange.bind(this)
59
+ this.state = {
60
+ measures: [],
61
+ dimensions: [],
62
+ filters: [],
63
+ categories: [],
64
+ };
65
+ }
66
+ cleanSelection(prevState) {
67
+ const { setAttributes } = this.props;
68
+ setAttributes({ measures: [], filters: [] });
69
+ }
70
+ updateFilterParam(param, idx) {
71
+ const { attributes: { filters }, setAttributes, allFilters, } = this.props;
72
+ const newFilters = filters.slice();
73
+ const selected = allFilters.filter((f) => f.param === param)[0];
74
+ newFilters[idx] = { ...selected, value: [] };
75
+ setAttributes({ filters: newFilters });
76
+ }
77
+ updateFilterValue(value, idx) {
78
+ const { attributes: { filters }, setAttributes, allFilters, } = this.props;
79
+ const selected = filters[idx];
80
+ let values = selected.value;
81
+ if (values.indexOf(value) > -1) {
82
+ values = values.filter((v) => v != value);
83
+ }
84
+ else {
85
+ values.push(value);
86
+ }
87
+ const newFilters = filters.slice();
88
+ newFilters[idx].value = values;
89
+ setAttributes({ filters: newFilters });
90
+ }
91
+ setFilterValue(value, idx) {
92
+ const { attributes: { filters }, setAttributes, allFilters, } = this.props;
93
+ const selected = filters[idx];
94
+ let values = selected.value;
95
+ values = value.split(",");
96
+ const newFilters = filters.slice();
97
+ newFilters[idx].value = values;
98
+ setAttributes({ filters: newFilters });
99
+ }
100
+ addFilter() {
101
+ const { attributes: { filters }, setAttributes, allFilters, } = this.props;
102
+ let index = filters.length > allFilters.length ? allFilters.length : filters.length;
103
+ const newFilter = allFilters && allFilters.length > 0
104
+ ? {
105
+ ...allFilters[index],
106
+ value: [],
107
+ }
108
+ : null;
109
+ let newFilters = filters.slice();
110
+ newFilters.push(newFilter);
111
+ setAttributes({ filters: newFilters });
112
+ }
113
+ removeFilter(f) {
114
+ const { attributes: { filters }, setAttributes, allFilters, } = this.props;
115
+ let newFilters = filters.slice(0, -1);
116
+ setAttributes({ filters: newFilters });
117
+ }
118
+ componentDidUpdate(prevProps) {
119
+ const { setAttributes, attributes: { type, colorBy, dimension2, types, measures, app }, } = this.props;
120
+ const { attributes: { type: prevType, dimension2: prevDimension2 }, } = prevProps;
121
+ const prevTypeObject = types.filter((t) => t.value === prevType).length > 0
122
+ ? types.filter((t) => t.value === prevType)[0]
123
+ : null;
124
+ if (dimension2 != prevDimension2) {
125
+ //TODO ensure only one measure remains selected when selecting a second dimensions
126
+ const uMs = Object.assign({}, measures);
127
+ if (dimension2 != "none") {
128
+ let i = 0; //the idea is to keep one selected
129
+ if (uMs[app]) {
130
+ const selected = Object.keys(uMs[app]).map((k) => uMs[app][k].selected).length;
131
+ if (selected > 1) {
132
+ Object.keys(uMs[app]).forEach((k) => {
133
+ if (uMs[app][k].selected) {
134
+ uMs[app][k].prevSelected = true; //can be used to recover measures
135
+ uMs[app][k].selected = i > 0 ? false : true;
136
+ }
137
+ else {
138
+ uMs[app][k].prevSelected = false;
139
+ }
140
+ i++;
141
+ });
142
+ }
143
+ }
144
+ setAttributes({ measures: uMs });
145
+ }
146
+ if (dimension2 == "none" && uMs[app]) {
147
+ Object.keys(uMs[app]).forEach((k) => {
148
+ if (uMs[app][k].prevSelected) {
149
+ uMs[app][k].selected = true; //can be used to recover measures
150
+ uMs[app][k].prevSelected = false;
151
+ }
152
+ });
153
+ setAttributes({ measures: uMs });
154
+ }
155
+ }
156
+ }
157
+ onSetSingleMeasure(value) {
158
+ const { setAttributes, attributes: { app, measures }, } = this.props;
159
+ const uMs = Object.assign({}, measures);
160
+ if (!uMs[app]) {
161
+ uMs[app] = {};
162
+ }
163
+ Object.keys(uMs[app])
164
+ .filter((k) => typeof uMs[app][k] !== "boolean")
165
+ .forEach((k) => (uMs[app][k].selected = false)); //single selection all other should be unselected
166
+ if (uMs[app][value]) {
167
+ uMs[app][value].selected = uMs[app][value].selected ? false : true;
168
+ }
169
+ else {
170
+ uMs[app][value] = { selected: true, format: defaultFormat };
171
+ }
172
+ setAttributes({ measures: uMs });
173
+ }
174
+ onFormatChange(format, field) {
175
+ const { setAttributes, attributes: { app, measures }, } = this.props;
176
+ const uMs = Object.assign({}, { ...measures });
177
+ if (!uMs[app]) {
178
+ uMs[app] = {
179
+ allowSelection: false,
180
+ format: format,
181
+ customFormat: format,
182
+ selected: false,
183
+ };
184
+ }
185
+ uMs[app][field] = format;
186
+ setAttributes({ measures: uMs });
187
+ }
188
+ onUseCustomAxisFormatChange(value) {
189
+ const { setAttributes, attributes: { app, measures }, } = this.props;
190
+ const uMs = Object.assign({}, { ...measures });
191
+ if (uMs[app]) {
192
+ uMs[app].useCustomAxisFormat = value;
193
+ setAttributes({ measures: uMs });
194
+ }
195
+ else {
196
+ uMs[app] = {
197
+ allowSelection: false,
198
+ format: defaultFormat,
199
+ customFormat: defaultFormat,
200
+ selected: false,
201
+ useCustomAxisFormat: value,
202
+ };
203
+ setAttributes({ measures: uMs });
204
+ }
205
+ }
206
+ /*
207
+ onCustomMeasureFieldChange(measureName, field, value) {
208
+
209
+ const {setAttributes, attributes: {measures}} = this.props
210
+ const uMs = Object.assign({}, {...measures})
211
+
212
+ if (uMs[measureName]) {
213
+ uMs[measureName][field] = value
214
+ } else {
215
+ uMs[measureName] = {allowSelection: false, field: value, selected: false}
216
+ }
217
+
218
+ setAttributes({measures: uMs})
219
+ }
220
+ */
221
+ onMeasuresChange(value) {
222
+ const { setAttributes, attributes: { app, measures }, } = this.props;
223
+ const uMs = Object.assign({}, measures);
224
+ if (!uMs[app]) {
225
+ uMs[app] = {};
226
+ }
227
+ if (uMs[app][value]) {
228
+ uMs[app][value].selected = uMs[app][value].selected ? false : true;
229
+ }
230
+ else {
231
+ uMs[app][value] = { selected: true, format: defaultFormat };
232
+ }
233
+ setAttributes({ measures: uMs });
234
+ }
235
+ onCustomLabelToggleChange(value) {
236
+ const { setAttributes, attributes: { app, measures }, } = this.props;
237
+ const uMs = Object.assign({}, measures);
238
+ if (uMs[app] && uMs[app][value]) {
239
+ uMs[app][value].hasCustomLabel = uMs[app][value].hasCustomLabel
240
+ ? false
241
+ : true;
242
+ setAttributes({ measures: uMs });
243
+ }
244
+ }
245
+ onCustomLabelChange(value, customLabel) {
246
+ const { setAttributes, attributes: { app, measures }, } = this.props;
247
+ const uMs = Object.assign({}, measures);
248
+ if (uMs[app] && uMs[app][value] && uMs[app][value].hasCustomLabel) {
249
+ uMs[app][value].customLabel = customLabel;
250
+ setAttributes({ measures: uMs });
251
+ }
252
+ }
253
+ items(type) {
254
+ const values = this.props.allCategories
255
+ ? this.props.allCategories.filter((c) => c.type === type)
256
+ : [];
257
+ const cat = values.length > 0 ? values[0] : null;
258
+ let items = null;
259
+ if (type === "Boolean") {
260
+ items = [
261
+ { value: "Yes", id: 1 },
262
+ { value: "No", id: 0 },
263
+ ];
264
+ }
265
+ else if (cat) {
266
+ items = cat.items.map((item) => ({ value: item.value, id: item.id }));
267
+ }
268
+ return items;
269
+ }
270
+ render() {
271
+ const { allDimensions, allFilters, allMeasures, setAttributes, attributes: { measures, filters, dimension1, dimension2, type, types }, } = this.props;
272
+ const currentType = types.filter((t) => t.value === type).length > 0
273
+ ? types.filter((t) => t.value === type)[0]
274
+ : null;
275
+ return [
276
+ React.createElement(PanelBody, { initialOpen: false, title: __(type == "map" ? "Fields" : `Dimensions`) },
277
+ React.createElement(PanelRow, null,
278
+ React.createElement(SelectControl, { multiple: false, label: __(type == "map" ? "Matching Field" : "First Dimension"), value: dimension1, onChange: (value) => {
279
+ setAttributes({
280
+ dimension1: value,
281
+ dimension2: value == "none" ? "none" : dimension2,
282
+ });
283
+ }, options: allDimensions })),
284
+ type != "line" && type != "radar" && (React.createElement(PanelRow, null,
285
+ React.createElement(SelectControl, { multiple: false, label: __(type == "map" ? "Breakdown Field" : "Second Dimension"), value: dimension2, onChange: (value) => {
286
+ setAttributes({ dimension2: value });
287
+ }, options: allDimensions, disabled: dimension1 == "none" })))),
288
+ React.createElement(Measures, { ...this.props, onFormatChange: this.onFormatChange, onUseCustomAxisFormatChange: this.onUseCustomAxisFormatChange, onSetSingleMeasure: this.onSetSingleMeasure, onMeasuresChange: this.onMeasuresChange, onCustomLabelToggleChange: this.onCustomLabelToggleChange, onCustomLabelChange: this.onCustomLabelChange, currentType: currentType }),
289
+ React.createElement(React.Fragment, null,
290
+ React.createElement(PanelBody, { initialOpen: false, title: __("Filters") },
291
+ filters.map((f, index) => {
292
+ return (React.createElement(PanelBody, { initialOpen: true, title: __(`Filter - ${f.label}`) },
293
+ React.createElement(FilterSelector, { param: f.param, index: index, options: allFilters, onUpdateFilterParam: this.updateFilterParam }),
294
+ React.createElement(CategoricalFilter, { value: f.value, index: index, items: this.items(f.type), onUpdateFilterValue: this.updateFilterValue })));
295
+ }),
296
+ React.createElement(PanelRow, null,
297
+ React.createElement(Button, { variant: "link", onClick: this.addFilter }, __("Add Filter")),
298
+ React.createElement(Button, { variant: "link", onClick: this.removeFilter }, __("Remove"))))),
299
+ ];
300
+ }
301
+ }
302
+ export default APIConfig;
@@ -0,0 +1,4 @@
1
+ export declare const getTranslatedOptions: (options: any[]) => any[];
2
+ export declare const getTranslation: (translatable: any) => any;
3
+ export declare const isSupersetAPI: (app: string, apps: any[]) => any;
4
+ export default getTranslatedOptions;
@@ -0,0 +1,30 @@
1
+ export const getTranslatedOptions = (options) => {
2
+ const currentLocale = (window._user_locale ? window._user_locale : '').toUpperCase();
3
+ if (options && options instanceof Array) {
4
+ return options.map(o => {
5
+ let { label, value, labels } = o;
6
+ if (labels && labels[currentLocale]) {
7
+ label = labels[currentLocale];
8
+ }
9
+ return { ...o, label, value };
10
+ });
11
+ }
12
+ return [];
13
+ };
14
+ export const getTranslation = (translatable) => {
15
+ const currentLocale = (window._user_locale ? window._user_locale : '').toUpperCase();
16
+ let { label, labels, value } = translatable;
17
+ if (labels && labels[currentLocale]) {
18
+ label = labels[currentLocale];
19
+ }
20
+ return label || value || translatable;
21
+ };
22
+ export const isSupersetAPI = (app, apps) => {
23
+ if (app == 'csv' || !apps) {
24
+ return false;
25
+ }
26
+ const appObj = apps.filter(a => a.value == app)[0];
27
+ return appObj && appObj.settings && appObj.settings.metadata
28
+ && appObj.settings.metadata.superset == 'true';
29
+ };
30
+ export default getTranslatedOptions;
@@ -0,0 +1,90 @@
1
+ import React from 'react';
2
+ import { Component } from '@wordpress/element';
3
+ import { Taxonomies, Taxonomy, Wp_Types } from './types';
4
+ export interface SizeConfigProps {
5
+ height: number;
6
+ setAttributes: (attributes: any) => void;
7
+ panelStatus: any;
8
+ initialOpen?: boolean;
9
+ }
10
+ export declare const SizeConfig: ({ height, setAttributes, panelStatus, initialOpen }: SizeConfigProps) => React.JSX.Element;
11
+ export type ComponentWithSettingsProps = {
12
+ attributes: any;
13
+ setAttributes: (attributes: any) => void;
14
+ };
15
+ export type ComponentWithSettingsState = {
16
+ react_ui_url?: string;
17
+ react_api_url?: string | null;
18
+ apache_superset_url?: string | boolean | null;
19
+ site_language?: string;
20
+ current_language?: string;
21
+ previewMode?: string;
22
+ };
23
+ export declare class ComponentWithSettings<T extends ComponentWithSettingsProps, U extends ComponentWithSettingsState> extends Component<T, U> {
24
+ iframe: React.RefObject<HTMLIFrameElement>;
25
+ unsubscribe: () => void;
26
+ constructor(props: T);
27
+ componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
28
+ componentDidMount(): void;
29
+ componentWillUnmount(): void;
30
+ }
31
+ export type BlockEditWithFiltersProps = {
32
+ attributes: any;
33
+ setAttributes: (attributes: any) => void;
34
+ };
35
+ export interface BlockEditWithFiltersState extends ComponentWithSettingsState {
36
+ taxonomyValues: Taxonomy[] | null;
37
+ types: Wp_Types[] | null;
38
+ taxonomies: Taxonomies | null;
39
+ loading: boolean;
40
+ }
41
+ export declare class BlockEditWithFilters<T extends BlockEditWithFiltersProps = BlockEditWithFiltersProps, S extends BlockEditWithFiltersState = BlockEditWithFiltersState> extends ComponentWithSettings<T, S> {
42
+ constructor(props: T);
43
+ componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
44
+ componentDidMount(): void;
45
+ onTypeChanged(value: any): void;
46
+ onTaxonomyChanged(value: any): void;
47
+ onCategoryChanged(checked: any, value: any): void;
48
+ getTaxonomyValues(): void;
49
+ getTaxonomies(): void;
50
+ getTypes(): void;
51
+ typeOptions(): {
52
+ slug: any;
53
+ label: any;
54
+ value: any;
55
+ }[];
56
+ taxonomyOptions(): {
57
+ label: string;
58
+ value: string;
59
+ }[];
60
+ categoriesOptions(): {
61
+ label: string;
62
+ value: number;
63
+ }[];
64
+ renderFilters(): React.JSX.Element;
65
+ }
66
+ export type BlockEditWithAPIMetadataProps = {
67
+ attributes: {
68
+ app: string;
69
+ dvzProxyDatasetId?: string;
70
+ };
71
+ setAttributes: (attributes: any) => void;
72
+ };
73
+ export type BlockEditWithAPIMetadataState = {
74
+ apps: any[];
75
+ datasets?: any[];
76
+ dimensions?: any[];
77
+ filters?: any[];
78
+ measures?: any[];
79
+ categories?: any[];
80
+ } & ComponentWithSettingsState;
81
+ export declare class BlockEditWithAPIMetadata<T extends BlockEditWithAPIMetadataProps = BlockEditWithAPIMetadataProps, S extends BlockEditWithAPIMetadataState = BlockEditWithAPIMetadataState> extends ComponentWithSettings<T, S> {
82
+ constructor(props: T);
83
+ componentDidMount(): void;
84
+ componentDidUpdate(prevProps: BlockEditWithAPIMetadataProps, prevState: any, snapshot?: any): void;
85
+ evictSuperSetCache(): void;
86
+ loadDatasets(app: any): void;
87
+ loadMetadata(app: string, dvzProxyDatasetId?: string): void;
88
+ fetchData(url: string, stateKey: string, transformData: (data: any) => any): void;
89
+ }
90
+ export default SizeConfig;