@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
package/build/Blocks.d.ts CHANGED
@@ -1,51 +1,38 @@
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;
1
+ export function SizeConfig({ height, setAttributes, panelStatus, initialOpen }: {
2
+ height: any;
3
+ setAttributes: any;
7
4
  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);
5
+ initialOpen: any;
6
+ }): import("react").JSX.Element;
7
+ export class ComponentWithSettings extends Component<any, any, any> {
8
+ constructor(props: any);
9
+ state: {
10
+ react_ui_url: string;
11
+ };
12
+ iframe: import("react").RefObject<any>;
13
+ unsubscribe: any;
27
14
  componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
28
15
  componentDidMount(): void;
29
16
  componentWillUnmount(): void;
30
17
  }
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;
18
+ export class BlockEditWithFilters extends ComponentWithSettings {
19
+ state: {
20
+ taxonomyValues: never[];
21
+ sortingTaxonomyValues: never[];
22
+ types: null;
23
+ taxonomies: null;
24
+ loading: boolean;
25
+ defaultValues: never[];
26
+ defaultValuesSearchTerm: string;
27
+ };
45
28
  onTypeChanged(value: any): void;
46
29
  onTaxonomyChanged(value: any): void;
47
- onCategoryChanged(checked: any, value: any): void;
30
+ onSortingTaxonomyChanged(value: any): void;
48
31
  getTaxonomyValues(): void;
32
+ onCategoryChanged(checked: any, value: any): void;
33
+ getSortingTaxonomyValues(): void;
34
+ onDefaultCategoryChanged(value: any, filterType: string | undefined, checked: any): void;
35
+ onDefaultValuesChanged(value: any, filterType?: string): void;
49
36
  getTaxonomies(): void;
50
37
  getTypes(): void;
51
38
  typeOptions(): {
@@ -55,36 +42,26 @@ export declare class BlockEditWithFilters<T extends BlockEditWithFiltersProps =
55
42
  }[];
56
43
  taxonomyOptions(): {
57
44
  label: string;
58
- value: string;
45
+ value: any;
59
46
  }[];
60
47
  categoriesOptions(): {
61
- label: string;
62
- value: number;
48
+ label: any;
49
+ value: any;
63
50
  }[];
64
- renderFilters(): React.JSX.Element;
51
+ sortingCategoriesOptions(): {
52
+ label: any;
53
+ value: any;
54
+ }[];
55
+ renderFilters(title: any): import("react").JSX.Element;
56
+ renderSorting(showTaxonomy?: boolean): import("react").JSX.Element;
57
+ renderSelectDefaultValues(filterType?: string): import("react").JSX.Element;
65
58
  }
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;
59
+ export class BlockEditWithAPIMetadata extends ComponentWithSettings {
60
+ componentDidUpdate(prevProps: any): void;
85
61
  evictSuperSetCache(): void;
86
62
  loadDatasets(app: any): void;
87
- loadMetadata(app: string, dvzProxyDatasetId?: string): void;
88
- fetchData(url: string, stateKey: string, transformData: (data: any) => any): void;
63
+ loadMetadata(app: any, dvzProxyDatasetId: any): void;
64
+ fetchData(url: any, stateKey: any, transformData: any): void;
89
65
  }
90
66
  export default SizeConfig;
67
+ import { Component } from '@wordpress/element';