lowcoder-map-component 0.1.1

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 (123) hide show
  1. package/README.md +37 -0
  2. package/icons/demo-icon.svg +10 -0
  3. package/icons/hills.svg +17 -0
  4. package/index.css +27 -0
  5. package/index.html +35 -0
  6. package/index.tsx +20 -0
  7. package/loader.mjs +11 -0
  8. package/package.json +175 -0
  9. package/src/README.md +35 -0
  10. package/src/components/ChartPropertyView.tsx +961 -0
  11. package/src/components/SeriesComp.tsx +368 -0
  12. package/src/components/TabPropertyView.tsx +127 -0
  13. package/src/comps/Barcharts/comp.tsx +338 -0
  14. package/src/comps/Barcharts/constants.tsx +77 -0
  15. package/src/comps/Linecharts/comp.tsx +350 -0
  16. package/src/comps/Linecharts/constants.tsx +53 -0
  17. package/src/comps/Linechartsv2/comp.tsx +350 -0
  18. package/src/comps/Linechartsv2/constants.tsx +68 -0
  19. package/src/comps/Mapcharts/comp.tsx +381 -0
  20. package/src/comps/Mapcharts/constants.tsx +312 -0
  21. package/src/comps/Mapchartsv2/comp.tsx +393 -0
  22. package/src/comps/Mapchartsv2/constants.tsx +340 -0
  23. package/src/comps/MixedLineBarCharts/comp.tsx +353 -0
  24. package/src/comps/MixedLineBarCharts/constants.tsx +60 -0
  25. package/src/comps/MultiLineCharts/comp.tsx +362 -0
  26. package/src/comps/MultiLineCharts/constants.tsx +96 -0
  27. package/src/comps/PercentageCharts/comp.tsx +359 -0
  28. package/src/comps/PercentageCharts/constants.tsx +98 -0
  29. package/src/comps/Piecharts/comp.tsx +334 -0
  30. package/src/comps/Piecharts/constants.tsx +48 -0
  31. package/src/comps/Tablecharts/comp.tsx +429 -0
  32. package/src/comps/Tablecharts/constants.tsx +97 -0
  33. package/src/comps/Totalcharts/comp.tsx +463 -0
  34. package/src/comps/Totalcharts/constants.tsx +66 -0
  35. package/src/comps/TwoLineCharts/comp.tsx +350 -0
  36. package/src/comps/TwoLineCharts/constants.tsx +82 -0
  37. package/src/comps/mapComponent/comp.tsx +338 -0
  38. package/src/comps/mapComponent/constants.tsx +2149 -0
  39. package/src/comps/tab/comp.tsx +283 -0
  40. package/src/comps/tab/constants.tsx +79 -0
  41. package/src/configs/barChartConfig.tsx +153 -0
  42. package/src/configs/baseConfig.tsx +66 -0
  43. package/src/configs/candleStickChartConfig.tsx +35 -0
  44. package/src/configs/cartesianAxisConfig.tsx +314 -0
  45. package/src/configs/chartUrls.tsx +9 -0
  46. package/src/configs/echartConfig.tsx +260 -0
  47. package/src/configs/echartsLabelConfig.tsx +47 -0
  48. package/src/configs/echartsLegendConfig.tsx +29 -0
  49. package/src/configs/echartsTitleConfig.tsx +49 -0
  50. package/src/configs/echartsTitleVerticalConfig.tsx +50 -0
  51. package/src/configs/funnelChartConfig.tsx +35 -0
  52. package/src/configs/gaugeChartConfig.tsx +31 -0
  53. package/src/configs/graphChartConfig.tsx +31 -0
  54. package/src/configs/heatmapChartConfig.tsx +31 -0
  55. package/src/configs/legendConfig.tsx +55 -0
  56. package/src/configs/lineChartConfig.tsx +246 -0
  57. package/src/configs/lineChartConfigv2.tsx +246 -0
  58. package/src/configs/mapChartConfig.tsx +106 -0
  59. package/src/configs/mapChartConfigv2.tsx +106 -0
  60. package/src/configs/mixedChartConfig.tsx +21 -0
  61. package/src/configs/pieChartConfig.tsx +156 -0
  62. package/src/configs/radarChartConfig.tsx +31 -0
  63. package/src/configs/sankeyChartConfig.tsx +35 -0
  64. package/src/configs/scatterChartConfig.tsx +152 -0
  65. package/src/configs/sunburstChartConfig.tsx +31 -0
  66. package/src/configs/tabConfig.tsx +0 -0
  67. package/src/configs/tableChartConfig.tsx +81 -0
  68. package/src/configs/themeriverChartConfig.tsx +31 -0
  69. package/src/configs/totalChartConfig.tsx +670 -0
  70. package/src/configs/treeChartConfig.tsx +31 -0
  71. package/src/configs/treemapChartConfig.tsx +31 -0
  72. package/src/controls/AnimationsControls.tsx +3 -0
  73. package/src/controls/AutoHeightControl.tsx +2 -0
  74. package/src/controls/AxisControls.tsx +146 -0
  75. package/src/controls/AxisVisibilityControl.tsx +14 -0
  76. package/src/controls/ChartTypeControl.tsx +15 -0
  77. package/src/controls/ColorScaleControl.tsx +221 -0
  78. package/src/controls/ColumnControl.tsx +204 -0
  79. package/src/controls/ConfigControl.tsx +37 -0
  80. package/src/controls/DirectionControls.tsx +20 -0
  81. package/src/controls/IconControl.tsx +88 -0
  82. package/src/controls/LegendControl.tsx +8 -0
  83. package/src/controls/RowLimitControl.tsx +91 -0
  84. package/src/controls/StyleControls.tsx +22 -0
  85. package/src/controls/TimeControls.tsx +41 -0
  86. package/src/controls/TrendlineControl.tsx +89 -0
  87. package/src/controls/UIEventControl.tsx +21 -0
  88. package/src/controls/index.ts +16 -0
  89. package/src/controls/radioControl.tsx +88 -0
  90. package/src/exposing/index.ts +3 -0
  91. package/src/exposing/setPoint.ts +19 -0
  92. package/src/geo/vn.geo.json +369897 -0
  93. package/src/geo/world.geo.json +32127 -0
  94. package/src/i18n/comps/index.tsx +39 -0
  95. package/src/i18n/comps/locales/en.ts +558 -0
  96. package/src/i18n/comps/locales/enObj.tsx +7186 -0
  97. package/src/i18n/comps/locales/index.ts +7 -0
  98. package/src/i18n/comps/locales/pt.ts +37 -0
  99. package/src/i18n/comps/locales/ptObj.tsx +40 -0
  100. package/src/i18n/comps/locales/types.tsx +622 -0
  101. package/src/i18n/comps/locales/zh.ts +3 -0
  102. package/src/i18n/comps/locales/zhObj.tsx +4 -0
  103. package/src/index.ts +31 -0
  104. package/src/types/global.d.ts +9 -0
  105. package/src/types/lowcoder-sdk.d.ts +578 -0
  106. package/src/utils/chartStyle.util.ts +121 -0
  107. package/src/utils/columnExtractor.util.ts +41 -0
  108. package/src/utils/dataTransform.util.ts +37 -0
  109. package/src/utils/deepEqual.util.ts +29 -0
  110. package/src/utils/echarts.util.tsx +822 -0
  111. package/src/utils/getDataKey.util.ts +115 -0
  112. package/src/utils/getLinearRegression.util.ts +46 -0
  113. package/src/utils/googleMaps.util.ts +28 -0
  114. package/src/utils/isEmpty.util.ts +10 -0
  115. package/src/utils/move.util.ts +6 -0
  116. package/src/utils/selection.util.ts +73 -0
  117. package/src/utils/style.util.ts +315 -0
  118. package/src/utils/time.util.ts +221 -0
  119. package/src/utils/timeFormatter.util.ts +104 -0
  120. package/src/utils/timeProcessing.util.ts +38 -0
  121. package/src/utils/trendline.util.ts +342 -0
  122. package/tsconfig.json +25 -0
  123. package/vite.config.js +19 -0
package/src/index.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { BarChartCompWithDefault } from "./comps/Barcharts/comp";
2
+ import { LineChartCompWithDefault } from "./comps/Linecharts/comp";
3
+ import { LineChartv2CompWithDefault } from "./comps/Linechartsv2/comp";
4
+ import { MapChartCompWithDefault } from "./comps/Mapcharts/comp";
5
+ import { MapChartv2CompWithDefault } from "./comps/Mapchartsv2/comp";
6
+ import { MapComponentCompWithDefault } from "./comps/mapComponent/comp";
7
+ import { MixedLineBarChartCompWithDefault } from "./comps/MixedLineBarCharts/comp";
8
+ import { MutilLineChartCompWithDefault } from "./comps/MultiLineCharts/comp";
9
+ import { PercentageChartCompWithDefault } from "./comps/PercentageCharts/comp";
10
+ import { PieChartCompWithDefault } from "./comps/Piecharts/comp";
11
+ import { TablechartCompWithDefault } from "./comps/Tablecharts/comp";
12
+ import { TotalChartCompWithDefault } from "./comps/Totalcharts/comp";
13
+ import { TwoLineChartCompWithDefault } from "./comps/TwoLineCharts/comp";
14
+ import { TabCompWithDefault } from "./comps/tab/comp";
15
+
16
+ export default {
17
+ lineChart: LineChartCompWithDefault,
18
+ lineChartv2: LineChartv2CompWithDefault,
19
+ twoLineChart: TwoLineChartCompWithDefault,
20
+ multiLineChart: MutilLineChartCompWithDefault,
21
+ pieChart: PieChartCompWithDefault,
22
+ barChart: BarChartCompWithDefault,
23
+ percentageChart: PercentageChartCompWithDefault,
24
+ totalChart: TotalChartCompWithDefault,
25
+ tableChart: TablechartCompWithDefault,
26
+ mapChart: MapChartCompWithDefault,
27
+ mapChartv2: MapChartv2CompWithDefault,
28
+ mixedLineBarChart: MixedLineBarChartCompWithDefault,
29
+ tab: TabCompWithDefault,
30
+ mapComponent: MapComponentCompWithDefault,
31
+ };
@@ -0,0 +1,9 @@
1
+ declare module "*.module.css" {
2
+ const classes: { [key: string]: string };
3
+ export default classes;
4
+ }
5
+
6
+ declare module "*.module.scss" {
7
+ const classes: { [key: string]: string };
8
+ export default classes;
9
+ }
@@ -0,0 +1,578 @@
1
+ import { SwitchProps } from "antd";
2
+
3
+ declare module "lowcoder-sdk" {
4
+ import React from "react";
5
+
6
+ export type ChangeValueAction<T> = (newValue: T) => void;
7
+
8
+ export declare abstract class SimpleComp<T> {
9
+ protected value: T;
10
+ protected dispatchChangeValueAction: ChangeValueAction<T>;
11
+ protected abstract getDefaultValue(): T;
12
+ abstract getPropertyView(): ReactNode;
13
+ }
14
+
15
+ export interface ControlParams {
16
+ label?: string;
17
+ value?: any;
18
+ disabled?: boolean;
19
+ onChange?: (value: any) => void;
20
+ }
21
+
22
+ export declare function controlItem(
23
+ options: { filterText?: string },
24
+ node: ReactNode
25
+ ): ReactNode;
26
+
27
+ /** ========== i18n Utilities ========== */
28
+ export function getI18nObjects<T>(
29
+ localeData: Record<string, any>,
30
+ languages: string
31
+ ): T;
32
+ export function getValueByLocale<T>(
33
+ defaultValue: T,
34
+ fn: (locale: { language: string }) => T
35
+ ): T;
36
+
37
+ export class Translator<T> {
38
+ constructor(localeData: Record<string, any>, languages: string);
39
+ trans(key: string): string;
40
+ language: string;
41
+ }
42
+
43
+ /** ========== JSON Helpers ========== */
44
+ export type JSONValue =
45
+ | string
46
+ | number
47
+ | boolean
48
+ | null
49
+ | JSONObject
50
+ | JSONArray;
51
+ export interface JSONObject {
52
+ [key: string]: JSONValue;
53
+ }
54
+
55
+ export interface JSONArray extends Array<JSONValue> { }
56
+
57
+ /** ========== Option & Dropdown ========== */
58
+ export interface Option<T = any> {
59
+ label: string;
60
+ value: T;
61
+ }
62
+ export type OptionsType = Option[];
63
+
64
+ export interface DropdownOption {
65
+ label: string;
66
+ value: string;
67
+ }
68
+ export interface DropdownProps {
69
+ value: string;
70
+ options: DropdownOption[];
71
+ label: string;
72
+ onChange: (value: string) => void;
73
+ }
74
+ export const Dropdown: React.FC<DropdownProps>;
75
+ export const Switch: React.FC<SwitchProps>;
76
+
77
+ /** ========== UI Components ========== */
78
+ export interface SectionProps {
79
+ name: string;
80
+ children?: React.ReactNode;
81
+ }
82
+ export const Section: React.FC<SectionProps>;
83
+
84
+ export const CustomModal: {
85
+ confirm: (options: {
86
+ title: string;
87
+ content: string;
88
+ onConfirm: () => void;
89
+ confirmBtnType?: "delete" | "primary";
90
+ okText?: string;
91
+ }) => void;
92
+ };
93
+
94
+ export interface RedButtonProps {
95
+ onClick: () => void;
96
+ children?: React.ReactNode;
97
+ }
98
+ export const RedButton: React.FC<RedButtonProps>;
99
+ export const AlignBottom: React.FC<AlignBottomProps>;
100
+ export const AlignClose: React.FC<AlignCloseProps>;
101
+ export const AlignTop: React.FC<AlignTopProps>;
102
+ export const AlignLeft: React.FC<AlignLeftProps>;
103
+ export const AlignRight: React.FC<AlignRightProps>;
104
+
105
+ export interface OptionProps<T> {
106
+ items: T[];
107
+ title: string;
108
+ itemColor?: (item: any) => string;
109
+ itemTitle: (item: any) => string;
110
+ popoverTitle?: (item: any) => string;
111
+ content: (item: any, index: number) => React.ReactNode;
112
+ onAdd?: () => void;
113
+ onMove?: (fromIndex: number, toIndex: number) => void;
114
+ hide?: (item: any) => boolean;
115
+ onHide?: (item: any, hide: boolean) => void;
116
+ dataIndex?: (item: any) => number;
117
+ }
118
+ export const Option: <T>(props: OptionProps<T>) => JSX.Element;
119
+
120
+ export const sectionNames: Record<string, string>;
121
+ export const hiddenPropertyView: (children: any) => JSX.Element;
122
+
123
+ export const InnerGrid: React.ComponentType<any>;
124
+ export const Drawer: React.ComponentType<any>;
125
+ export const HintPlaceHolder: React.ComponentType<any>;
126
+ export const BackgroundColorContext: React.Context<string>;
127
+
128
+ //** ========== Hooks ========== */
129
+ export function useUserViewMode(): boolean;
130
+
131
+ /** ========== Theme Context ========== */
132
+ export interface Theme {
133
+ theme: { chart?: string;[key: string]: any };
134
+ }
135
+
136
+ export const ThemeContext = React.createContext<Theme | undefined>(undefined);
137
+
138
+ /** ========== Action Types & Helpers ========== */
139
+ export interface CompAction<T = any> {
140
+ type: string;
141
+ payload?: T;
142
+ value?: T;
143
+ }
144
+ export interface CustomAction {
145
+ type: string;
146
+ value?: any;
147
+ }
148
+
149
+ export type ChildrenMap = Record<string, any>;
150
+
151
+ export declare function customAction<T = any>(payload: T): CustomAction;
152
+ export declare function isMyCustomAction<T>(
153
+ action: CompAction,
154
+ type: string
155
+ ): action is CustomAction & { value: T };
156
+
157
+ export const CompActionTypes: {
158
+ UPDATE_NODES_V2: string;
159
+ [key: string]: string;
160
+ };
161
+
162
+ export function changeValueAction<T = any>(
163
+ value: T,
164
+ check?: boolean
165
+ ): CompAction<T>;
166
+ export function changeChildAction<T = any>(
167
+ childKey: string,
168
+ value: T,
169
+ silent?: boolean,
170
+ name?: string,
171
+ flag?: boolean
172
+ ): CompAction<T>;
173
+ export function wrapChildAction(
174
+ childKey: string,
175
+ action: CompAction
176
+ ): CompAction;
177
+
178
+ export function getPromiseAfterDispatch(
179
+ dispatch: (action: CompAction) => void,
180
+ action: CompAction,
181
+ options?: { autoHandleAfterReduce?: boolean }
182
+ ): Promise<void>;
183
+
184
+ /** ========== Utilities ========== */
185
+ export const chartColorPalette: string[];
186
+ export function childrenToProps<T extends object>(
187
+ children: T
188
+ ): Record<keyof T, any>;
189
+ export function genRandomKey(): string;
190
+ export function isNumeric(val: any): boolean;
191
+
192
+ /** ========== Config & Builder ========== */
193
+ export class NameConfig {
194
+ constructor(name: string, desc?: string, label?: string);
195
+ }
196
+ export function depsConfig(config: {
197
+ name: string;
198
+ desc: string;
199
+ depKeys: string[];
200
+ func: (input: any) => any;
201
+ }): any;
202
+
203
+ export const MultiCompBuilder: new (
204
+ childrenMap: Record<string, any>,
205
+ renderer: (props: any) => any
206
+ ) => {
207
+ setPropertyViewFn(fn: (children: any, dispatch: DispatchFn) => void): any;
208
+ build(): any;
209
+ };
210
+
211
+ export function withContext<CompType, ContextKeys extends readonly string[]>(
212
+ comp: CompType,
213
+ contextKeys: ContextKeys
214
+ ): CompType & {
215
+ context: Record<ContextKeys[number], any>;
216
+ };
217
+
218
+ /** ========== Controls ========== */
219
+
220
+ export interface ChangeEventHandlerControl
221
+ extends Control<(eventName: string) => void> {
222
+ propertyView(config: {
223
+ title?: string;
224
+ label?: string;
225
+ tooltip?: string;
226
+ events?: Array<{ label: string; value: string }>;
227
+ }): React.ReactNode;
228
+ getView(): (eventName: string) => void;
229
+ }
230
+
231
+ export const ChangeEventHandlerControl: new (
232
+ params?: any
233
+ ) => ChangeEventHandlerControl;
234
+ export interface JSONObjectControl extends Control<object> {
235
+ propertyView(config: {
236
+ label?: string;
237
+ tooltip?: string;
238
+ placeholder?: string;
239
+ objType?: string;
240
+ }): React.ReactNode;
241
+ getView(): object;
242
+ }
243
+ export const JSONObjectControl: new (opts?: any) => JSONObjectControl;
244
+ export interface ArrayControl<T = any> extends Control<T[]> {
245
+ propertyView(config: {
246
+ label?: string;
247
+ tooltip?: string;
248
+ placeholder?: string;
249
+ }): React.ReactNode;
250
+ getView(): T[];
251
+ }
252
+
253
+ export const ArrayControl: new <T = any>(params?: any) => ArrayControl<T>;
254
+ export const ExposingStateControl = {
255
+ propertyView: (opts?: any) => null,
256
+ } as const;
257
+ export const ColorControl = {
258
+ propertyView: (opts?: any) => null,
259
+ } as Control<string>;
260
+ export const ColumnOptionControl = {
261
+ propertyView: (opts?: any) => null,
262
+ } as Control<string>;
263
+ export const FunctionControl = {
264
+ propertyView: (opts?: any) => null,
265
+ } as Control<any>;
266
+ export const StringControl = {
267
+ propertyView: (opts?: any) => null,
268
+ } as Control<string>;
269
+ export const NumberControl = {
270
+ propertyView: (opts?: any) => null,
271
+ } as Control<number>;
272
+ export const BoolControl = {
273
+ propertyView: (opts?: any) => null,
274
+ } as Control<boolean>;
275
+ export const ColorOrBoolCodeControl = {
276
+ propertyView: (opts?: any) => null,
277
+ } as Control<boolean>;
278
+ export function dropdownControl<
279
+ T extends readonly {
280
+ label: string | JSX.Element;
281
+ value: string | number | boolean;
282
+ }[],
283
+ >(options: T, defaultValue?: string | number | boolean): JSX.Element;
284
+ export const BoolCodeControl: React.ComponentType<any>;
285
+ export const RefControl: React.ComponentType<any>;
286
+ export const StringStateControl: React.ComponentType<any>;
287
+
288
+ export function EventOptionControl(label: string): any;
289
+ export function EventControl(label: string): any;
290
+ export function switchControl(label: string, defaultValue?: boolean): any;
291
+ export function switchAndTextControl(
292
+ label: string,
293
+ defaultValue: boolean,
294
+ inputProps?: any
295
+ ): any;
296
+ export function numberControl(
297
+ label: string,
298
+ defaultValue?: number,
299
+ options?: { min?: number; max?: number }
300
+ ): any;
301
+ export function multiCompBuilder<T>(builders: T): any;
302
+ export function text(label: string): any;
303
+
304
+ export declare function list<T>(comp: T): any;
305
+ export declare function stateComp<T>(initialValue: T): any;
306
+ export declare function jsonControl<T = any>(
307
+ transform: (value: any) => T,
308
+ defaultValue?: T
309
+ ): any;
310
+ export function eventHandlerControl<T extends readonly any[]>(events: T): any;
311
+
312
+ export function stringExposingStateControl(
313
+ name: string,
314
+ defaultValue?: string
315
+ ): ExposingStateControl<string>;
316
+
317
+ export interface EventHandlerControl {
318
+ propertyView: () => React.ReactNode;
319
+ }
320
+
321
+ export function valueComp<T>(defaultValue: T): any;
322
+ export function uiChildren<T extends Record<string, any>>(children: T): T;
323
+
324
+ export type Control<T = any> = {
325
+ getView: () => T;
326
+ onChange: (value: T) => void;
327
+ propertyView?: (options?: T) => React.ReactNode;
328
+ getPropertyView: (options?: T) => void;
329
+ change?: (value: T) => void;
330
+ children?: any;
331
+ };
332
+
333
+ export const BooleanStateControl: Control<boolean>;
334
+ // declare const AutoHeightControl: ControlComponent<AutoHeightType>;
335
+ export type AutoHeightType = "auto" | "fixed";
336
+
337
+ export const AutoHeightControl = {
338
+ propertyView: (opts?: any) => null,
339
+ } as Control<AutoHeightType>;
340
+
341
+ export const stringStateControl: (label?: string) => Control<string>;
342
+ export const jsonObjectExposingStateControl: (
343
+ defaultValue?: any
344
+ ) => Control<any>;
345
+
346
+ /** ========== Type Helpers ========== */
347
+ export type ConstructorToComp<T> = T extends new (...args: any[]) => infer R
348
+ ? R
349
+ : never;
350
+ export type ConstructorToDataType<T> = T extends new (...args: any[]) => {
351
+ getView(): infer D;
352
+ }
353
+ ? D
354
+ : never;
355
+ export type ConstructorToView<T> = T extends new (...args: any[]) => {
356
+ getPropertyViewWithData(...args: any[]): infer V;
357
+ }
358
+ ? V
359
+ : never;
360
+ export type ValueFromOption<T extends readonly { value: any }[]> =
361
+ T[number]["value"];
362
+ export const EchartDefaultChartStyle: EchartDefaultChartStyleType = {};
363
+ export const EchartDefaultTextStyle: EchartDefaultTextStyleType = {};
364
+ export const clickEvent: ClickEventType = "click";
365
+ export const styleControl: StyleControlFn = (style, key) => style;
366
+ export const toArray: ToArrayFn = (value) =>
367
+ Array.isArray(value) ? value : [value];
368
+
369
+ export const toJSONObjectArray: ToJSONObjectArrayFn = (value) =>
370
+ Array.isArray(value) ? value : [value];
371
+
372
+ export const toJSONObject: ToJSONObjectFn = (value) =>
373
+ Array.isArray(value) ? value[0] : value;
374
+
375
+ export const toObject: ToObjectFn = (value) => value;
376
+ export const withType: WithTypeFn = (optionMap, defaultKey) =>
377
+ optionMap[defaultKey];
378
+
379
+ export type RecordConstructorToView<T extends Record<string, any>> = {
380
+ [K in keyof T]: T[K] extends { propertyView: (...args: any) => any }
381
+ ? T[K] extends { value: infer V }
382
+ ? V
383
+ : any
384
+ : T[K] extends (...args: any) => any
385
+ ? ReturnType<T[K]>
386
+ : any;
387
+ };
388
+
389
+ export type RecordConstructorToComp<T extends Record<string, any>> = {
390
+ [K in keyof T]: T[K];
391
+ };
392
+
393
+ // ---- Exposing / Method ----
394
+ export function withMethodExposing(comp: any, methods: any[]): any;
395
+ export function withViewFn<T>(comp: T, fn: (comp: any) => JSX.Element): T;
396
+ export function withExposingConfigs<T>(comp: T, configs: any[]): T;
397
+ export function withDefault<T>(comp: T, defaultValue: any): T;
398
+
399
+ // --------- Utils ----------
400
+ export function getData<T = any>(data: T): { data: T };
401
+
402
+ // --------- Grid Utils ----------
403
+ export function gridItemCompToGridItems(items: any): any[];
404
+
405
+ // --------- Constants ----------
406
+ export const Layers: {
407
+ drawer: number;
408
+ };
409
+
410
+ export const DrawerStyle: any;
411
+ export const PositionControl: Control<string>;
412
+
413
+ // --------- Container Builder ----------
414
+ export class ContainerCompBuilder {
415
+ constructor(
416
+ children: Record<string, any>,
417
+ render: (props: any, dispatch: DispatchFn) => React.ReactNode
418
+ );
419
+ setPropertyViewFn(fn: (children: any) => React.ReactNode): this;
420
+ build(): any;
421
+ }
422
+
423
+ // --------- Event Controls ----------
424
+ export const MeetingEventHandlerControl: Control<any>;
425
+
426
+ export const ButtonStyle = {
427
+ background,
428
+ border,
429
+ text,
430
+ radius,
431
+ margin,
432
+ padding,
433
+ } as const;
434
+
435
+ export type GenColorFn = (baseColor: string) => string;
436
+ export const genHoverColor: GenColorFn;
437
+ export const genActiveColor: GenColorFn;
438
+
439
+ export type FocusWithOptions = (options?: FocusOptions) => void;
440
+ export type BlurMethod = () => void;
441
+ export type ClickMethod = () => void;
442
+
443
+ export const focusWithOptions: FocusWithOptions;
444
+ export const blurMethod: BlurMethod;
445
+ export const clickMethod: ClickMethod;
446
+
447
+ export type RefMethod = (...args: any[]) => void;
448
+ export type RefMethods = (methods: RefMethod[]) => Record<string, RefMethod>;
449
+ export const refMethods: RefMethods;
450
+
451
+ export type MigrateOldData<T> = (
452
+ control: T,
453
+ fixOldData: (oldData: any) => any
454
+ ) => T;
455
+ export const migrateOldData: MigrateOldData<any>;
456
+
457
+ export const EditorContext: React.Context<any>;
458
+
459
+ // styled
460
+ export const styled: {
461
+ video: (
462
+ styles: TemplateStringsArray,
463
+ ...args: any[]
464
+ ) => React.ComponentType<any>;
465
+ div: (
466
+ styles: TemplateStringsArray,
467
+ ...args: any[]
468
+ ) => React.ComponentType<any>;
469
+ };
470
+
471
+ export const CommonNameConfig: NameConfig[];
472
+
473
+ export const showLabelPropertyView: (children: any) => JSX.Element = (
474
+ children
475
+ ) => {
476
+ return children;
477
+ };
478
+
479
+ export type DispatchFn = (action: { type: string; payload?: any }) => void;
480
+
481
+ export interface UICompBuilder<TChildren, TProps> {
482
+ constructor(
483
+ children: TChildren,
484
+ renderFn: (props: TProps, dispatch: DispatchFn) => React.ReactNode
485
+ );
486
+ setPropertyViewFn(
487
+ fn: (children: TChildren, dispatch: DispatchFn) => React.ReactNode
488
+ ): UICompBuilder<TChildren, TProps>;
489
+ build(): any;
490
+ }
491
+
492
+ export declare const UICompBuilder: new <TChildren, TProps>(
493
+ children: TChildren,
494
+ renderFn: (props: TProps, dispatch: DispatchFn) => React.ReactNode
495
+ ) => UICompBuilder<TChildren, TProps>;
496
+
497
+ export declare function booleanControl(defaultValue?: boolean): any;
498
+
499
+ export declare function jsonControl(defaultValue: any): any;
500
+
501
+ export declare function stringControl(defaultValue: string): any;
502
+
503
+ export declare function animationStyleControl(options?: any): any;
504
+
505
+ export declare function eventModalStyleControl(options?: any): any;
506
+
507
+ export declare const styleControlObject: any;
508
+ export declare const animationStyleControlObject: any;
509
+ export declare const eventModalStyleControlObject: any;
510
+
511
+ // ======= State Comp =======
512
+ export declare function stateComp<T>(
513
+ initialValue: T,
514
+ options?: any,
515
+ initState: (props: T) => any,
516
+ mapStateToProps: (state: any) => Partial<T>,
517
+ mapDispatchToProps: (dispatch: DispatchFn) => any
518
+ ): {
519
+ getView: () => T;
520
+ setView: (value: T) => void;
521
+ };
522
+
523
+ export type CalendarStyle = {
524
+ background?: string;
525
+ textSize?: string;
526
+ color?: string;
527
+ [key: string]: any;
528
+ };
529
+
530
+ export type AnimationStyle = {
531
+ animationType?: string;
532
+ animationDelay?: string;
533
+ animationDuration?: string;
534
+ animationIterationCount?: string;
535
+ };
536
+
537
+ export type EventModalStyle = {
538
+ background?: string;
539
+ borderRadius?: string;
540
+ [key: string]: any;
541
+ };
542
+
543
+ export type EventType = {
544
+ id: string;
545
+ label: string;
546
+ detail?: string;
547
+ start: string;
548
+ end: string;
549
+ allDay?: boolean;
550
+ groupId?: string;
551
+ resourceId?: string;
552
+ color?: string;
553
+ backgroundColor?: string;
554
+ titleColor?: string;
555
+ detailColor?: string;
556
+ titleFontWeight?: string;
557
+ titleFontStyle?: string;
558
+ detailFontWeight?: string;
559
+ detailFontStyle?: string;
560
+ animation?: string;
561
+ animationDelay?: string;
562
+ animationDuration?: string;
563
+ animationIterationCount?: string;
564
+ };
565
+ }
566
+
567
+ /** ========== AxisFormatterComp ========== */
568
+ export interface AxisFormatterCompProps {
569
+ value: string;
570
+ }
571
+
572
+ export declare const AxisFormatterComp: {
573
+ new(): {
574
+ getView(): string;
575
+ getPropertyView(): React.ReactNode;
576
+ dispatch: (action: CompAction) => void;
577
+ };
578
+ };