@astroapps/forms-core 2.0.1 → 2.0.2
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/index.cjs +6 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +9 -2
- package/lib/index.js.map +1 -1
- package/package.json +3 -2
- package/src/defaultSchemaInterface.ts +8 -1
package/lib/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ensureMetaValue, newControl, updateComputedValue, addDependent, createAsyncEffect, createSyncEffect, trackedValue, collectChanges, getCurrentFields, createCleanupScope, createEffect, trackControlChange, ControlChange, createScopedEffect, updateElements } from '@astroapps/controls';
|
|
2
|
+
import { parseDateTime } from '@internationalized/date';
|
|
2
3
|
import jsonata from 'jsonata';
|
|
3
4
|
import { v4 } from 'uuid';
|
|
4
5
|
|
|
@@ -1021,11 +1022,17 @@ function getHasMoreControl(data) {
|
|
|
1021
1022
|
}
|
|
1022
1023
|
|
|
1023
1024
|
class DefaultSchemaInterface {
|
|
1024
|
-
constructor(boolStrings = ["No", "Yes"], parseDateTime = s =>
|
|
1025
|
+
constructor(boolStrings = ["No", "Yes"], parseDateTime$1 = s => {
|
|
1026
|
+
try {
|
|
1027
|
+
return parseDateTime(s).toDate("UTC").getTime();
|
|
1028
|
+
} catch (e) {
|
|
1029
|
+
return Number.NaN;
|
|
1030
|
+
}
|
|
1031
|
+
}) {
|
|
1025
1032
|
this.boolStrings = void 0;
|
|
1026
1033
|
this.parseDateTime = void 0;
|
|
1027
1034
|
this.boolStrings = boolStrings;
|
|
1028
|
-
this.parseDateTime = parseDateTime;
|
|
1035
|
+
this.parseDateTime = parseDateTime$1;
|
|
1029
1036
|
}
|
|
1030
1037
|
parseToMillis(field, v) {
|
|
1031
1038
|
return this.parseDateTime(v);
|