Skip to content
Open
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
20,554 changes: 0 additions & 20,554 deletions dist/packed/widget_bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/packed/widget_bundle.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions dist/packed/widget_bundle.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/packed/widget_bundle.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
7 changes: 6 additions & 1 deletion src/airtable-import/add-record.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export const AddRecord: React.FC<IAddRecord> = props => {
file: curFile,
datasheetId: datasheet.datasheetId,
});
files.push(uploadRlt);
files.push({
...uploadRlt,
name: rv.filename,
});
}
}
recordValue = files;
Expand All @@ -70,6 +73,8 @@ export const AddRecord: React.FC<IAddRecord> = props => {
recordValue = recordValue.join(',');
} else if (field.type !== FieldType.MultiSelect && typeof recordValue === 'object') {
recordValue = JSON.stringify(recordValue);
} else if (field.type === FieldType.Text && typeof recordValue === 'number') {
recordValue = JSON.stringify(recordValue);
}
newRecord[field.id] = recordValue;
}
Expand Down
12 changes: 11 additions & 1 deletion src/utils/get-field-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ export const getFields = (records?: IRecord[]): IFieldMap => {
const type = getFieldType(fieldValue);
pre[fieldKey] = [type, []];
}
// if fieldValue has multiple types, set it as text type
if (pre[fieldKey]) {
const type = getFieldType(fieldValue);
if (pre[fieldKey][0] != type) {
set(pre[fieldKey], 0, FieldType.Text);
}
}
// Collect multi-select default values and add default options in addField
// fieldValue is array
if (pre[fieldKey][0] === FieldType.MultiSelect) {
Expand All @@ -39,10 +46,13 @@ const getFieldType = (fieldValue) => {
if (fieldValue[0]?.url) {
return FieldType.Attachment;
}
if (typeof fieldValue === 'object') {
return FieldType.Text;
}
return FieldType.MultiSelect
} else if (typeof fieldValue === 'boolean') {
return FieldType.Checkbox;
} else if (typeof fieldValue === 'number') {
} else if (typeof fieldValue === 'number' && !isNaN(fieldValue)) {
return FieldType.Number;
}
return FieldType.Text;
Expand Down
84 changes: 59 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
urlcat "^2.0.4"

"@apitable/i18n@^1.0.2":
version "1.0.3"
resolved "https://registry.npmjs.org/@apitable/i18n/-/i18n-1.0.3.tgz#478eb16041d224d0ce607b44c3dd27769a7078d9"
integrity sha512-0S+LaxGwdip9CYtWqs/RkKkFTxaEdK002S8zqcXtX2LBuD/c69AbYwYWHr8azUyzYBWqNXCVjNoXaMCu6Fu0rw==
version "1.0.4"
resolved "https://registry.npmjs.org/@apitable/i18n/-/i18n-1.0.4.tgz#9a916ccaa4b9dffc580c64187b7081fc285e27aa"
integrity sha512-b5xphjtrNkTa/7wWe2jnoYVHLRTkqijNniHDp9diajxgkEQr+flordta8cFPTfE14ZSTvYLdN4E/E6BiLD1jtg==
dependencies:
apitable "^0.8.1"
lodash "^4.17.21"
Expand Down Expand Up @@ -145,13 +145,20 @@
socket.io-client "2.2.0"
store2 "^2.12.0"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.0", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.0", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.0", "@babel/runtime@^7.9.2":
version "7.20.6"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz#facf4879bfed9b5326326273a64220f099b0fce3"
integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==
dependencies:
regenerator-runtime "^0.13.11"

"@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.0", "@babel/runtime@^7.20.7":
version "7.20.13"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b"
integrity sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==
dependencies:
regenerator-runtime "^0.13.11"

"@bugsnag/safe-json-stringify@^6.0.0":
version "6.0.0"
resolved "https://registry.npmjs.org/@bugsnag/safe-json-stringify/-/safe-json-stringify-6.0.0.tgz#22abdcd83e008c369902976730c34c150148a758"
Expand Down Expand Up @@ -372,9 +379,9 @@
"@types/react" "*"

"@types/react@*":
version "18.0.26"
resolved "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917"
integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==
version "18.0.27"
resolved "https://registry.npmjs.org/@types/react/-/react-18.0.27.tgz#d9425abe187a00f8a5ec182b010d4fd9da703b71"
integrity sha512-3vtRKHgVxu3Jp9t718R9BuzoD4NcQ8YJ5XRzsSKxNDiDonD2MXIT1TmSkenxuCycZJoQT5d2vE8LwWJxBC1gmA==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
Expand Down Expand Up @@ -494,9 +501,9 @@ [email protected]:
scroll-into-view-if-needed "^2.2.25"

apitable@^0.8.1:
version "0.8.2"
resolved "https://registry.npmjs.org/apitable/-/apitable-0.8.2.tgz#d3c59f70694b1049596c4af6a4c1e3706cbc8aec"
integrity sha512-kfQgP4CfJJJ/RpfDR9q5g0Tdslr2uARiqCodf++TC+qqzhN8cT1pvvodFTTOinbbhph1GOfkqKztw3J6f3WINw==
version "0.8.3"
resolved "https://registry.npmjs.org/apitable/-/apitable-0.8.3.tgz#8b4e9c4ab18d033dde054e225107a123dfa7b1a3"
integrity sha512-Gw00FtAOqWXvh76EUVwITzvKqlLjVGy7DDKD+7rcnCHBflJ3DWs7SBPN84ZbSi1T12GWLU66DLglJJpeSvP3Jg==
dependencies:
axios "^0.19.2"
form-data "^3.0.0"
Expand Down Expand Up @@ -1319,9 +1326,9 @@ [email protected]:
better-assert "~1.0.0"

phone@^3.1.10:
version "3.1.31"
resolved "https://registry.npmjs.org/phone/-/phone-3.1.31.tgz#28003e772054f8f2852da310e872021f74dbca20"
integrity sha512-rx0Gpn6ILyASMB1uyr9vn2x5sVVjD+thveGIt+oeUN+Djv11j5OnmBkZSH/pmw1hJtOHbeGegpXtmYMQYC8K4w==
version "3.1.33"
resolved "https://registry.npmjs.org/phone/-/phone-3.1.33.tgz#78d8b20493cb665c95c566c53545f9138c746f4e"
integrity sha512-mTDJ9NsXyRxxsnhEZpdNO6PFoPxSzEW0s5gjaxgTv8rqmIcyfbNBZpKxmdifr6jJVL/0oSwiHHvL2+SNL9BVFw==

prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
Expand Down Expand Up @@ -1428,9 +1435,9 @@ rc-dropdown@~4.0.0:
rc-util "^5.17.0"

rc-field-form@~1.27.0:
version "1.27.3"
resolved "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.27.3.tgz#e5262796b91c80848a42a3e7a669bf459f08d63d"
integrity sha512-HGqxHnmGQgkPApEcikV4qTg3BLPC82uB/cwBDftDt1pYaqitJfSl5TFTTUMKVEJVT5RqJ2Zi68ME1HmIMX2HAw==
version "1.27.4"
resolved "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.27.4.tgz#53600714af5b28c226c70d34867a8c52ccd64d44"
integrity sha512-PQColQnZimGKArnOh8V2907+VzDCXcqtFvHgevDLtqWc/P7YASb/FqntSmdS8q3VND5SHX3Y1vgMIzY22/f/0Q==
dependencies:
"@babel/runtime" "^7.18.0"
async-validator "^4.1.0"
Expand Down Expand Up @@ -1489,7 +1496,7 @@ rc-menu@~9.6.0, rc-menu@~9.6.3:
rc-util "^5.12.0"
shallowequal "^1.1.0"

rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.2.0, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motion@^2.4.3, rc-motion@^2.4.4, rc-motion@^2.6.1, rc-motion@^2.6.2:
rc-motion@^2.0.0, rc-motion@^2.0.1:
version "2.6.2"
resolved "https://registry.npmjs.org/rc-motion/-/rc-motion-2.6.2.tgz#3d31f97e41fb8e4f91a4a4189b6a98ac63342869"
integrity sha512-4w1FaX3dtV749P8GwfS4fYnFG4Rb9pxvCYPc/b2fw1cmlHJWNNgOFIz7ysiD+eOrzJSvnLJWlNQQncpNMXwwpg==
Expand All @@ -1498,6 +1505,15 @@ rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.2.0, rc-motion@^2.3.0, rc-motio
classnames "^2.2.1"
rc-util "^5.21.0"

rc-motion@^2.2.0, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motion@^2.4.3, rc-motion@^2.4.4, rc-motion@^2.6.1, rc-motion@^2.6.2:
version "2.6.3"
resolved "https://registry.npmjs.org/rc-motion/-/rc-motion-2.6.3.tgz#e6d8ca06591c2c1bcd3391a8e7a822ebc4d94e9c"
integrity sha512-xFLkes3/7VL/J+ah9jJruEW/Akbx5F6jVa2wG5o/ApGKQKSOd5FR3rseHLL9+xtJg4PmCwo6/1tqhDO/T+jFHA==
dependencies:
"@babel/runtime" "^7.11.1"
classnames "^2.2.1"
rc-util "^5.21.0"

rc-notification@~4.6.0:
version "4.6.1"
resolved "https://registry.npmjs.org/rc-notification/-/rc-notification-4.6.1.tgz#068e8674f4bd7926a447eca512915d4b41b15c91"
Expand Down Expand Up @@ -1558,7 +1574,7 @@ rc-rate@~2.9.0:
classnames "^2.2.5"
rc-util "^5.0.1"

rc-resize-observer@^1.0.0, rc-resize-observer@^1.1.0, rc-resize-observer@^1.2.0:
rc-resize-observer@^1.0.0:
version "1.2.0"
resolved "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.2.0.tgz#9f46052f81cdf03498be35144cb7c53fd282c4c7"
integrity sha512-6W+UzT3PyDM0wVCEHfoW3qTHPTvbdSgiA43buiy8PzmeMnfgnDeb9NjdimMXMl3/TcrvvWl5RRVdp+NqcR47pQ==
Expand All @@ -1568,10 +1584,20 @@ rc-resize-observer@^1.0.0, rc-resize-observer@^1.1.0, rc-resize-observer@^1.2.0:
rc-util "^5.15.0"
resize-observer-polyfill "^1.5.1"

rc-resize-observer@^1.1.0, rc-resize-observer@^1.2.0:
version "1.3.0"
resolved "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.3.0.tgz#10217d606ed12a1e362330f17ab81c9b62d3be91"
integrity sha512-w6cgP6rKnOqsvVQii2iEPsVq96HqvKMTQk+Hi5MJJSMd6/z4BuCUqwuZuL9fcRcPUcnF7AMM+G/VOFcIirZexg==
dependencies:
"@babel/runtime" "^7.20.7"
classnames "^2.2.1"
rc-util "^5.27.0"
resize-observer-polyfill "^1.5.1"

rc-segmented@~2.1.0:
version "2.1.0"
resolved "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.1.0.tgz#0e0afe646c1a0e44a0e18785f518c42633ec8efc"
integrity sha512-hUlonro+pYoZcwrH6Vm56B2ftLfQh046hrwif/VwLIw1j3zGt52p5mREBwmeVzXnSwgnagpOpfafspzs1asjGw==
version "2.1.2"
resolved "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.1.2.tgz#14c9077a1dae9c2ccb2ef5fbc5662c1c48c7ce8e"
integrity sha512-qGo1bCr83ESXpXVOCXjFe1QJlCAQXyi9KCiy8eX3rIMYlTeJr/ftySIaTnYsitL18SvWf5ZEHsfqIWoX0EMfFQ==
dependencies:
"@babel/runtime" "^7.11.1"
classnames "^2.2.1"
Expand Down Expand Up @@ -1705,7 +1731,7 @@ rc-upload@~4.3.0:
classnames "^2.2.5"
rc-util "^5.2.0"

rc-util@^5.0.1, rc-util@^5.0.6, rc-util@^5.12.0, rc-util@^5.15.0, rc-util@^5.16.1, rc-util@^5.17.0, rc-util@^5.18.1, rc-util@^5.19.2, rc-util@^5.2.0, rc-util@^5.2.1, rc-util@^5.20.1, rc-util@^5.21.0, rc-util@^5.21.2, rc-util@^5.22.5, rc-util@^5.23.0, rc-util@^5.24.4, rc-util@^5.3.0, rc-util@^5.4.0, rc-util@^5.5.0, rc-util@^5.6.1, rc-util@^5.8.0, rc-util@^5.9.4:
rc-util@^5.0.1, rc-util@^5.0.6, rc-util@^5.15.0, rc-util@^5.17.0, rc-util@^5.19.2, rc-util@^5.2.1, rc-util@^5.21.0, rc-util@^5.3.0, rc-util@^5.4.0, rc-util@^5.9.4:
version "5.25.3"
resolved "https://registry.npmjs.org/rc-util/-/rc-util-5.25.3.tgz#7f6a5895e4edc5acdf5f73e90e1c031f3b67257d"
integrity sha512-+M+44T6UdM4iOd4QXRQKQjitOY26vC5pgFPNSo0XsY9OWzpHvy77BI55eL9Q9oDMUHzVuRNzzUkK1RI2W3n+ZQ==
Expand All @@ -1714,6 +1740,14 @@ rc-util@^5.0.1, rc-util@^5.0.6, rc-util@^5.12.0, rc-util@^5.15.0, rc-util@^5.16.
react-is "^16.12.0"
shallowequal "^1.1.0"

rc-util@^5.12.0, rc-util@^5.16.1, rc-util@^5.18.1, rc-util@^5.2.0, rc-util@^5.20.1, rc-util@^5.21.2, rc-util@^5.22.5, rc-util@^5.23.0, rc-util@^5.24.4, rc-util@^5.27.0, rc-util@^5.5.0, rc-util@^5.6.1, rc-util@^5.8.0:
version "5.27.2"
resolved "https://registry.npmjs.org/rc-util/-/rc-util-5.27.2.tgz#472a7bab26a62856c2c016d18dc6356e46d01012"
integrity sha512-8XHRbeJOWlTR2Hk1K2xLaPOf7lZu+3taskAGuqOPccA676vB3ygrz3ZgdrA3wml40CzR9RlIEHDWwI7FZT3wBQ==
dependencies:
"@babel/runtime" "^7.18.3"
react-is "^16.12.0"

rc-virtual-list@^3.2.0, rc-virtual-list@^3.4.8:
version "3.4.13"
resolved "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.4.13.tgz#20acc934b263abcf7b7c161f50ef82281b2f7e8d"
Expand Down Expand Up @@ -1798,9 +1832,9 @@ react-is@^18.0.0:
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==

react-laag@^2.0.4:
version "2.0.4"
resolved "https://registry.npmjs.org/react-laag/-/react-laag-2.0.4.tgz#9a2787ca9d83bf4d8b6e304f29d22cff0365348c"
integrity sha512-9CGIwYJbysmpQC4KeeTx3fNzchvZT3AIYapi2/z7kOJrYopP2uCoPK39qHKuiyawE57EVRI8F1OtbJeyJ7NTrg==
version "2.0.5"
resolved "https://registry.npmjs.org/react-laag/-/react-laag-2.0.5.tgz#549f1035b761b9ba09ac98fd128ccad63464c877"
integrity sha512-RCvublJhdcgGRHU1wMYJ8kRtnYsKUgYusLvVhMuftg65POnnOB4+fwXvnETm6adc0cMnc1spujlrK6bGIz6aug==
dependencies:
tiny-warning "^1.0.3"

Expand Down