Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"react-dom": "16.14.0"
},
"dependencies": {
"@apitable/components": "latest",
"@apitable/icons": "latest",
"@apitable/widget-sdk": "latest",
"@apitable/components": "^1.0.0",
"@apitable/icons": "^1.4.0",
"@apitable/widget-sdk": "^1.4.1",
"@types/react": "^16.9.43",
"@types/react-dom": "^16.9.8",
"lodash": "^4.17.21",
Expand Down
24 changes: 4 additions & 20 deletions src/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FieldType, t } from '@apitable/widget-sdk';
import { FieldType, t , FieldIconMap} from '@apitable/widget-sdk';
import { Strings } from './utils/i18n';
import {
ColumnAttachmentFilled,
Expand All @@ -25,23 +25,7 @@ import {
import React from 'react';
import { Box, colorVars } from '@apitable/components';

export const FieldIconMap = {
[FieldType.Attachment]: ColumnAttachmentFilled,
[FieldType.URL]: ColumnUrlOutlined,
[FieldType.Email]: ColumnEmailFilled,
[FieldType.Phone]: ColumnPhoneFilled,
[FieldType.Checkbox]: ColumnCheckboxFilled,
[FieldType.Rating]: ColumnRatingFilled,
[FieldType.Member]: AccountFilled,
[FieldType.Formula]: ColumnFormulaFilled,
[FieldType.Currency]: ColumnCurrencyFilled,
[FieldType.Percent]: ColumnPercentFilled,
[FieldType.AutoNumber]: ColumnAutonumberFilled,
[FieldType.CreatedTime]: ColumnCreatedtimeFilled,
[FieldType.LastModifiedTime]: ColumnLastmodifiedtimeFilled,
[FieldType.CreatedBy]: ColumnCreatedbyFilled,
[FieldType.LastModifiedBy]: ColumnLastmodifiedbyFilled,
};
export {FieldIconMap}

export const AIRTABLE_URL = 'https://api.airtable.com';

Expand Down Expand Up @@ -201,7 +185,7 @@ export const TYPE_OPTIONS = [
{t(Strings.phone)}
</div>
),
value: FieldType.Phone
value: FieldType.Phone
},
{
label: (
Expand All @@ -212,7 +196,7 @@ export const TYPE_OPTIONS = [
{t(Strings.attachment)}
</div>
),
value: FieldType.Attachment
value: FieldType.Attachment
},
]

Expand Down
Loading