gristlabs_grist-core/app/common
Alex Hall 599545fb11 (core) Fuller guessing of type and options when adding first data to blank columns
Summary:
Adds `common/ValueGuesser.ts` with logic for guessing column type and widget options (only for dates/datetimes) from an array of strings, and converting the strings to the guessed type in a lossless manner, so that converting back to Text gives the original values.

Changes `_ensure_column_accepts_data` in Python to call an exported JS method using the new logic where possible.

Test Plan: Added `test/common/ValueGuesser.ts` to unit test the core guessing logic and a DocApi end-to-end test for what happens to new columns.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3290
2022-03-01 22:00:45 +02:00
..
ACLPermissions.ts
ACLRuleCollection.ts
ActionBundle.ts (core) Log number of rows in user tables in data engine 2022-02-22 00:59:56 +02:00
ActionDispatcher.ts
ActionGroup.ts
ActionRouter.ts
ActionSummary.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
ActiveDocAPI.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
ApiError.ts
arrayToString.ts
AsyncCreate.ts
AsyncFlow.ts
BaseAPI.ts (core) Remove code for unused welcome flows 2022-02-28 13:21:28 -08:00
BasketClientAPI.ts
BigInt.ts
BillingAPI.ts
BinaryIndexedTree.js Correct spelling mistakes 2022-02-19 09:46:49 +00:00
BrowserSettings.ts
ColumnFilterFunc.ts
ColumnGetters.ts
csvFormat.ts
CustomWidget.ts
declarations.d.ts (core) Guess date format during type conversion 2022-02-21 22:39:47 +02:00
delay.ts
DisposableWithEvents.ts
DocActions.ts
DocData.ts (core) Fuller guessing of type and options when adding first data to blank columns 2022-03-01 22:00:45 +02:00
DocListAPI.ts
DocSnapshot.ts
DocumentSettings.ts
emails.ts
EncActionBundle.ts
ErrorWithCode.ts
Features.ts
FilterState.ts
Formula.ts
GranularAccessClause.ts
GristServerAPI.ts
gristTypes.ts (core) Custom Widget column mapping feature. 2022-02-08 17:41:04 +01:00
gristUrls.ts (core) Remove code for unused welcome flows 2022-02-28 13:21:28 -08:00
gutil.ts (core) Guess date format during type conversion 2022-02-21 22:39:47 +02:00
InactivityTimer.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
isHiddenTable.ts
KeyedMutex.ts
KeyedOps.ts
LocaleCodes.ts
Locales.ts
LoginSessionAPI.ts (core) Add account page option to allow Google login 2022-02-14 16:56:23 -08:00
LoginState.ts
marshal.ts
MemBuffer.js
NumberFormat.ts
NumberParse.ts
orgNameUtils.ts
parseDate.ts (core) Fuller guessing of type and options when adding first data to blank columns 2022-03-01 22:00:45 +02:00
plugin.ts
PluginInstance.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
Prefs.ts
RefCountMap.ts
resetOrg.ts
roles.ts
RowFilterFunc.ts
schema.ts
ShareAnnotator.ts
sharing.ts
SortFunc.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
SortSpec.ts
StringUnion.ts
TableData.ts (core) Guess date format during type conversion 2022-02-21 22:39:47 +02:00
TabularDiff.ts
tbind.ts
TestState.ts
timeFormat.ts
tpromisified.ts
tsconfig.json
tsvFormat.ts
UIRowId.ts
uploads.ts
urlUtils.ts
UserAPI.ts (core) Add account page option to allow Google login 2022-02-14 16:56:23 -08:00
UserConfig.ts
ValueConverter.ts (core) Use visible column formatting when converting RefList to Text 2022-02-12 09:45:57 +02:00
ValueFormatter.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
ValueGuesser.ts (core) Fuller guessing of type and options when adding first data to blank columns 2022-03-01 22:00:45 +02:00
ValueParser.ts (core) Fuller guessing of type and options when adding first data to blank columns 2022-03-01 22:00:45 +02:00