@gingkoo/pandora-metabase 0.0.29 → 1.0.0-alpha.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 (32) hide show
  1. package/README.md +6 -1
  2. package/lib/es/components/dialog/custom-editor/enum.d.ts +43 -0
  3. package/lib/es/components/dialog/custom-editor/index.d.ts +10 -0
  4. package/lib/es/components/dialog/custom-editor/utils.d.ts +8 -0
  5. package/lib/es/components/dialog/select-column/index.d.ts +2 -1
  6. package/lib/es/components/dialog/select-filter/index.d.ts +10 -1
  7. package/lib/es/components/dialog/select-join-column/index.d.ts +4 -0
  8. package/lib/es/components/dialog/select-list/index.d.ts +10 -0
  9. package/lib/es/components/icons.d.ts +1 -0
  10. package/lib/es/components/modules/components/meta-icon.d.ts +1 -0
  11. package/lib/es/components/modules/custom-column.d.ts +1 -0
  12. package/lib/es/components/modules/filter.d.ts +1 -0
  13. package/lib/es/components/modules/group.d.ts +9 -0
  14. package/lib/es/components/modules/join-data.d.ts +1 -0
  15. package/lib/es/components/modules/permission-table.d.ts +1 -0
  16. package/lib/es/components/modules/row-limit.d.ts +1 -0
  17. package/lib/es/components/modules/sort.d.ts +1 -0
  18. package/lib/es/components/modules/summarize/group-by.d.ts +1 -0
  19. package/lib/es/components/modules/summarize/index.d.ts +1 -0
  20. package/lib/es/components/modules/summarize/select-index.d.ts +1 -0
  21. package/lib/es/components/modules/table-data.d.ts +1 -0
  22. package/lib/es/components/popup.d.ts +1 -0
  23. package/lib/es/index.js +4423 -3445
  24. package/lib/es/index.js.map +1 -1
  25. package/lib/es/store/enum.d.ts +6 -1
  26. package/lib/es/store/helper.d.ts +4 -1
  27. package/lib/es/store/types.d.ts +40 -1
  28. package/lib/es/types.d.ts +14 -1
  29. package/lib/es/utils/helper-dom.d.ts +1 -0
  30. package/lib/es/utils/helper.d.ts +1 -0
  31. package/lib/es/utils.d.ts +3 -1
  32. package/package.json +2 -4
package/README.md CHANGED
@@ -37,7 +37,8 @@ export type ToolbarType =
37
37
  | 'permissionTable'
38
38
  | 'customColumn'
39
39
  | 'sort'
40
- | 'rowLimit';
40
+ | 'rowLimit'
41
+ | 'group'; //展示合并结果集,会变为多个数组
41
42
 
42
43
  export interface MetaBaseProps {
43
44
  loading?: boolean; // 加载状态
@@ -54,6 +55,10 @@ export interface MetaBaseProps {
54
55
  getTables: (datasourceId: string) => Promise<any>; //获取表
55
56
  getColumns: (table: string, datasourceId: string) => Promise<any>;//获取数据源
56
57
  onOk: (params: any) => Promise<void>;
58
+ value?: MetaListType[]; //默认值
59
+ sourceList?: DatasourceType[];
60
+ showSubquery?: boolean; //是否展示子查询
61
+ subShowSubquery?: boolean; //子查询是否展示子查询
57
62
  }
58
63
 
59
64
  export interface SqlVisionBuilderRef {
@@ -0,0 +1,43 @@
1
+ export declare enum OptionsTypeEnum {
2
+ CONSTANT = "constant",// 常量
3
+ INPUT = "input",// 输入框
4
+ FIELD = "field",// 字段
5
+ OPERATOR = "operator",// 运算符
6
+ EXPRESSION = "expression",// 公式
7
+ OTHER = "other"
8
+ }
9
+ export declare enum FunctionEnum {
10
+ LOWER = "lower",
11
+ UPPER = "upper",
12
+ SUBSTRING = "substring",
13
+ REGEX_MATCH_FIRST = "regex-match-first",
14
+ 'CONCAT' = "concat",
15
+ 'REPLACE' = "replace",
16
+ 'TRIM' = "trim",
17
+ 'RTRIM' = "RTRIM",
18
+ 'LTRIM' = "rtrim",
19
+ 'LENGTH' = "length",
20
+ 'ABS' = "abs",
21
+ 'FLOOR' = "floor",
22
+ 'CEIL' = "ceil",
23
+ 'ROUND' = "round",
24
+ 'SQRT' = "sqrt",
25
+ 'POWER' = "power",
26
+ 'LOG' = "log",
27
+ 'EXP' = "exp",
28
+ 'CONTAINS' = "contains",
29
+ 'ENDS_WITH' = "ends-with",
30
+ 'STARTS_WITH' = "starts-with",
31
+ 'BETWEEN' = "between",
32
+ 'TIME_INTERVAL' = "time-interval",
33
+ 'IS_NULL' = "is-null",
34
+ 'IS_EMPTY' = "is-empty",
35
+ 'COALESCE' = "coalesce"
36
+ }
37
+ export declare const operatorList: string[];
38
+ export declare const otherList: string[];
39
+ export declare const functionList: string[];
40
+ export declare const customTypes: {
41
+ value: OptionsTypeEnum;
42
+ label: any;
43
+ }[];
@@ -0,0 +1,10 @@
1
+ import './index.less';
2
+ import { MetaCustom_Item } from '../../../store/types';
3
+ interface PropsType {
4
+ value: MetaCustom_Item;
5
+ data: any;
6
+ onOk: Function;
7
+ onCancel: Function;
8
+ }
9
+ declare const CaseEditor: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
10
+ export default CaseEditor;
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param type 当前选择的类型
4
+ * @param list 当前数组
5
+ * @param index 需要讲模版插入的位置
6
+ * @returns
7
+ */
8
+ export declare const getTemplate: (type: string, list: any[], index: number) => any[];
@@ -8,7 +8,8 @@ import './index.less';
8
8
  import { MetaData_ColumnsType } from '../../../store/types';
9
9
  interface PropsType {
10
10
  data: MetaData_ColumnsType[];
11
+ groupIndex: number;
11
12
  onChange: (record: MetaData_ColumnsType[]) => void;
12
13
  }
13
- declare const SelectColumn: ({ data, onChange }: PropsType) => import("react/jsx-runtime").JSX.Element;
14
+ declare const SelectColumn: ({ data, groupIndex, onChange }: PropsType) => import("react/jsx-runtime").JSX.Element;
14
15
  export default SelectColumn;
@@ -2,5 +2,14 @@
2
2
  * 关联模块 选择表字段
3
3
  */
4
4
  import './index.less';
5
- declare const _default: (props: any) => import("react/jsx-runtime").JSX.Element;
5
+ import { MetaFilter_Item } from '../../../store/types';
6
+ import { DataType } from '../select-join-column';
7
+ interface PropsType {
8
+ data: DataType[];
9
+ value: MetaFilter_Item;
10
+ onChange: (reocrd: MetaFilter_Item) => void;
11
+ didUpdate?: Function;
12
+ isCustom?: boolean;
13
+ }
14
+ declare const _default: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
15
  export default _default;
@@ -15,6 +15,9 @@ export declare const NUMBER_GROUP_MAP: Map<string, string>;
15
15
  export interface ColumnType {
16
16
  table: string;
17
17
  tableId: string;
18
+ tableUuid: string;
19
+ fieldUuid: string;
20
+ fieldAlias: string;
18
21
  alias: string;
19
22
  name: string;
20
23
  database_type: SQL_COLUMN_TYPE | '';
@@ -31,6 +34,7 @@ export interface ColumnGroupType {
31
34
  export type DataType = Partial<DatasourceType> & {
32
35
  table: string;
33
36
  tableId: string;
37
+ tableUuid: string;
34
38
  alias: string;
35
39
  columns: MetaData_ColumnsType[];
36
40
  };
@@ -0,0 +1,10 @@
1
+ import './index.less';
2
+ import { OptionItem } from '../../../types';
3
+ interface PropsType {
4
+ className?: string;
5
+ value?: any;
6
+ list: OptionItem[];
7
+ onChange: (type: any) => void;
8
+ }
9
+ declare const SelectList: ({ value, onChange, list, className }: PropsType) => import("react/jsx-runtime").JSX.Element;
10
+ export default SelectList;
@@ -7,6 +7,7 @@ export declare const CloseIcon2: (reset: any) => import("react/jsx-runtime").JSX
7
7
  export declare const FilterIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export declare const SummarizeIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export declare const JoinDataIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const GroupIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export declare const PermissionTableIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export declare const CustomColumnIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export declare const SortIcon: ({ width, height }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { MetaListType } from '../../../store/types';
2
2
  interface PropsType {
3
3
  meta: MetaListType;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const NextDom: (props: PropsType) => import("react/jsx-runtime").JSX.Element | null;
6
7
  export default NextDom;
@@ -2,6 +2,7 @@ import { MetaCustom } from '../../store/types';
2
2
  interface PropsType {
3
3
  store?: any;
4
4
  meta: MetaCustom;
5
+ groupIndex: number;
5
6
  }
6
7
  declare const CustomColumn: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
8
  export default CustomColumn;
@@ -1,6 +1,7 @@
1
1
  import { MetaFilter } from '../../store/types';
2
2
  interface PropsType {
3
3
  meta: MetaFilter;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const Filter: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
7
  export default Filter;
@@ -0,0 +1,9 @@
1
+ import { UnionEnum } from '../../store/enum';
2
+ interface PropsType {
3
+ store?: any;
4
+ meta: any;
5
+ operator: UnionEnum;
6
+ groupIndex: number;
7
+ }
8
+ declare const RowLimit: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
9
+ export default RowLimit;
@@ -1,6 +1,7 @@
1
1
  import { MetaJoin } from '../../store/types';
2
2
  interface PropsType {
3
3
  meta: MetaJoin;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const JoinData: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
7
  export default JoinData;
@@ -1,6 +1,7 @@
1
1
  import { MetaData } from '../../store/types';
2
2
  interface PropsType {
3
3
  meta: MetaData;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const PermissionTable: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
7
  export default PermissionTable;
@@ -1,6 +1,7 @@
1
1
  interface PropsType {
2
2
  store?: any;
3
3
  meta: any;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const RowLimit: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
7
  export default RowLimit;
@@ -1,6 +1,7 @@
1
1
  import { MetaSort } from '../../store/types';
2
2
  interface PropsType {
3
3
  meta: MetaSort;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const Sort: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
7
  export default Sort;
@@ -6,6 +6,7 @@ export type ValueType = ColumnType & {
6
6
  };
7
7
  interface PropsType {
8
8
  meta: MetaSummarize;
9
+ groupIndex: number;
9
10
  }
10
11
  declare const GroupBy: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
11
12
  export default GroupBy;
@@ -2,6 +2,7 @@ import { MetaSummarize } from '../../../store/types';
2
2
  interface PropsType {
3
3
  store?: any;
4
4
  meta: MetaSummarize;
5
+ groupIndex: number;
5
6
  }
6
7
  declare const Summarize: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
8
  export default Summarize;
@@ -2,6 +2,7 @@ import { MetaSummarize } from '../../../store/types';
2
2
  interface PropsType {
3
3
  store?: any;
4
4
  meta: MetaSummarize;
5
+ groupIndex: number;
5
6
  }
6
7
  declare const SelectIndex: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
8
  export default SelectIndex;
@@ -1,6 +1,7 @@
1
1
  import { MetaData } from '../../store/types';
2
2
  interface PropsType {
3
3
  meta: MetaData;
4
+ groupIndex: number;
4
5
  }
5
6
  declare const TableData: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
7
  export default TableData;
@@ -93,5 +93,6 @@ interface PropsType {
93
93
  node: any;
94
94
  innerSpacing?: number;
95
95
  container?: HTMLDivElement;
96
+ zIndex?: string | null;
96
97
  closable?: boolean;
97
98
  }