@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.
- package/lib/cjs/components/dialog/column-type-label/index.d.ts +1 -1
- package/lib/cjs/components/dialog/column-type-label/index.js +5 -5
- package/lib/cjs/store/types.d.ts +2 -1
- package/lib/es/components/dialog/column-type-label/index.d.ts +1 -1
- package/lib/es/components/dialog/column-type-label/index.js +5 -5
- package/lib/es/store/types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -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, '
|
|
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
|
|
12
|
-
var
|
|
13
|
-
var hasLength =
|
|
14
|
-
if (!
|
|
15
|
-
var label = hasLength ? "".concat(
|
|
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,
|
package/lib/cjs/store/types.d.ts
CHANGED
|
@@ -202,7 +202,8 @@ export interface MetaData_ColumnsType {
|
|
|
202
202
|
tableUuid?: string;
|
|
203
203
|
realName?: string;
|
|
204
204
|
database_type: SQL_COLUMN_TYPE | '';
|
|
205
|
-
|
|
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, '
|
|
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
|
|
6
|
-
var
|
|
7
|
-
var hasLength =
|
|
8
|
-
if (!
|
|
9
|
-
var label = hasLength ? "".concat(
|
|
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,
|
package/lib/es/store/types.d.ts
CHANGED
|
@@ -202,7 +202,8 @@ export interface MetaData_ColumnsType {
|
|
|
202
202
|
tableUuid?: string;
|
|
203
203
|
realName?: string;
|
|
204
204
|
database_type: SQL_COLUMN_TYPE | '';
|
|
205
|
-
|
|
205
|
+
field_type?: string;
|
|
206
|
+
field_length?: number | string;
|
|
206
207
|
special_type: SpecialType | '';
|
|
207
208
|
datasourceId: string;
|
|
208
209
|
datasourceName: string;
|