@gingkoo/pandora-metabase 1.0.158-alpha.7 → 1.0.158-alpha.8

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.
@@ -2,7 +2,7 @@ import './index.less';
2
2
  import React from 'react';
3
3
  import { MetaData_ColumnsType } from '../../../store/types';
4
4
  interface PropsType {
5
- column: Pick<MetaData_ColumnsType, 'database_type' | 'database_length'>;
5
+ column: Pick<MetaData_ColumnsType, 'field_type' | 'field_length'>;
6
6
  }
7
7
  declare const ColumnTypeLabel: ({ column }: PropsType) => React.JSX.Element | null;
8
8
  export default ColumnTypeLabel;
@@ -8,11 +8,11 @@ var _jsxRuntime = require("react/jsx-runtime");
8
8
  require("./index.less");
9
9
  var ColumnTypeLabel = function ColumnTypeLabel(_ref) {
10
10
  var column = _ref.column;
11
- var databaseType = String(column.database_type || '').trim();
12
- var databaseLength = column.database_length;
13
- var hasLength = databaseLength !== undefined && databaseLength !== null && "".concat(databaseLength).trim() !== '';
14
- if (!databaseType) return null;
15
- var label = hasLength ? "".concat(databaseType, "(").concat(databaseLength, ")") : databaseType;
11
+ var fieldType = String(column.field_type || '').trim();
12
+ var fieldLength = column.field_length;
13
+ var hasLength = fieldLength !== undefined && fieldLength !== null && "".concat(fieldLength).trim() !== '';
14
+ if (!fieldType && !hasLength) return null;
15
+ var label = fieldType && hasLength ? "".concat(fieldType, "(").concat(fieldLength, ")") : fieldType || "".concat(fieldLength);
16
16
  return (0, _jsxRuntime.jsx)("span", {
17
17
  className: 'Sqb-ColumnTypeLabel',
18
18
  title: label,
@@ -202,7 +202,8 @@ export interface MetaData_ColumnsType {
202
202
  tableUuid?: string;
203
203
  realName?: string;
204
204
  database_type: SQL_COLUMN_TYPE | '';
205
- database_length?: number | string;
205
+ field_type?: string;
206
+ field_length?: number | string;
206
207
  special_type: SpecialType | '';
207
208
  datasourceId: string;
208
209
  datasourceName: string;
@@ -2,7 +2,7 @@ import './index.less';
2
2
  import React from 'react';
3
3
  import { MetaData_ColumnsType } from '../../../store/types';
4
4
  interface PropsType {
5
- column: Pick<MetaData_ColumnsType, 'database_type' | 'database_length'>;
5
+ column: Pick<MetaData_ColumnsType, 'field_type' | 'field_length'>;
6
6
  }
7
7
  declare const ColumnTypeLabel: ({ column }: PropsType) => React.JSX.Element | null;
8
8
  export default ColumnTypeLabel;
@@ -2,11 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import './index.less';
3
3
  var ColumnTypeLabel = function ColumnTypeLabel(_ref) {
4
4
  var column = _ref.column;
5
- var databaseType = String(column.database_type || '').trim();
6
- var databaseLength = column.database_length;
7
- var hasLength = databaseLength !== undefined && databaseLength !== null && "".concat(databaseLength).trim() !== '';
8
- if (!databaseType) return null;
9
- var label = hasLength ? "".concat(databaseType, "(").concat(databaseLength, ")") : databaseType;
5
+ var fieldType = String(column.field_type || '').trim();
6
+ var fieldLength = column.field_length;
7
+ var hasLength = fieldLength !== undefined && fieldLength !== null && "".concat(fieldLength).trim() !== '';
8
+ if (!fieldType && !hasLength) return null;
9
+ var label = fieldType && hasLength ? "".concat(fieldType, "(").concat(fieldLength, ")") : fieldType || "".concat(fieldLength);
10
10
  return _jsx("span", {
11
11
  className: 'Sqb-ColumnTypeLabel',
12
12
  title: label,
@@ -202,7 +202,8 @@ export interface MetaData_ColumnsType {
202
202
  tableUuid?: string;
203
203
  realName?: string;
204
204
  database_type: SQL_COLUMN_TYPE | '';
205
- database_length?: number | string;
205
+ field_type?: string;
206
+ field_length?: number | string;
206
207
  special_type: SpecialType | '';
207
208
  datasourceId: string;
208
209
  datasourceName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "1.0.158-alpha.7",
3
+ "version": "1.0.158-alpha.8",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",