@multiplatform.one/frappe-ui 7.34.1 → 7.34.3

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.
Files changed (50) hide show
  1. package/dist/cjs/fields/Date/catalog.cjs +139 -0
  2. package/dist/cjs/fields/Date/catalog.native.js +165 -0
  3. package/dist/cjs/fields/Date/catalog.native.js.map +1 -0
  4. package/dist/cjs/fields/Date/dateTimePickerLoader.cjs +38 -0
  5. package/dist/cjs/fields/Date/dateTimePickerLoader.native.js +42 -0
  6. package/dist/cjs/fields/Date/dateTimePickerLoader.native.js.map +1 -0
  7. package/dist/cjs/fields/Date/index.cjs +2 -113
  8. package/dist/cjs/fields/Date/index.native.js +19 -15
  9. package/dist/cjs/fields/Date/index.native.js.map +1 -1
  10. package/dist/esm/fields/Date/catalog.mjs +114 -0
  11. package/dist/esm/fields/Date/catalog.mjs.map +1 -0
  12. package/dist/esm/fields/Date/catalog.native.js +137 -0
  13. package/dist/esm/fields/Date/catalog.native.js.map +1 -0
  14. package/dist/esm/fields/Date/dateTimePickerLoader.mjs +13 -0
  15. package/dist/esm/fields/Date/dateTimePickerLoader.mjs.map +1 -0
  16. package/dist/esm/fields/Date/dateTimePickerLoader.native.js +14 -0
  17. package/dist/esm/fields/Date/dateTimePickerLoader.native.js.map +1 -0
  18. package/dist/esm/fields/Date/index.mjs +1 -112
  19. package/dist/esm/fields/Date/index.mjs.map +1 -1
  20. package/dist/esm/fields/Date/index.native.js +17 -2
  21. package/dist/esm/fields/Date/index.native.js.map +1 -1
  22. package/dist/jsx/fields/Date/catalog.mjs +114 -0
  23. package/dist/jsx/fields/Date/catalog.mjs.map +1 -0
  24. package/dist/jsx/fields/Date/catalog.native.js +165 -0
  25. package/dist/jsx/fields/Date/catalog.native.js.map +1 -0
  26. package/dist/jsx/fields/Date/dateTimePickerLoader.mjs +13 -0
  27. package/dist/jsx/fields/Date/dateTimePickerLoader.mjs.map +1 -0
  28. package/dist/jsx/fields/Date/dateTimePickerLoader.native.js +42 -0
  29. package/dist/jsx/fields/Date/dateTimePickerLoader.native.js.map +1 -0
  30. package/dist/jsx/fields/Date/index.mjs +1 -112
  31. package/dist/jsx/fields/Date/index.mjs.map +1 -1
  32. package/dist/jsx/fields/Date/index.native.js +19 -15
  33. package/dist/jsx/fields/Date/index.native.js.map +1 -1
  34. package/package.json +27 -27
  35. package/src/FrappeTable.infiniteLoadError.spec.tsx +118 -0
  36. package/src/fields/Date/catalog.tsx +190 -0
  37. package/src/fields/Date/dateTimePickerLoader.ts +25 -0
  38. package/src/fields/Date/index.native.tsx +24 -3
  39. package/src/fields/Date/index.tsx +1 -188
  40. package/src/fields/Date/nativeFallback.spec.tsx +23 -0
  41. package/src/fields/Date/nativePresentation.spec.tsx +2 -2
  42. package/src/fields/Date/typeParity.spec.tsx +2 -2
  43. package/types/fields/Date/catalog.d.ts +25 -0
  44. package/types/fields/Date/catalog.d.ts.map +1 -0
  45. package/types/fields/Date/dateTimePickerLoader.d.ts +11 -0
  46. package/types/fields/Date/dateTimePickerLoader.d.ts.map +1 -0
  47. package/types/fields/Date/index.d.ts +1 -22
  48. package/types/fields/Date/index.d.ts.map +1 -1
  49. package/types/fields/Date/index.native.d.ts +2 -7
  50. package/types/fields/Date/index.native.d.ts.map +1 -1
@@ -36,8 +36,8 @@ vi.mock("../../shared/useKeyboardInset", () => ({
36
36
  useKeyboardInset: () => mockState.keyboardInset,
37
37
  }));
38
38
 
39
- vi.mock("@react-native-community/datetimepicker", () => ({
40
- default: (props: Record<string, unknown>) => {
39
+ vi.mock("./dateTimePickerLoader", () => ({
40
+ loadDateTimePicker: () => (props: Record<string, unknown>) => {
41
41
  mockState.picks.push(props);
42
42
  return null;
43
43
  },
@@ -30,8 +30,8 @@ const mockState = vi.hoisted(() => ({
30
30
  picks: [] as Record<string, unknown>[],
31
31
  }));
32
32
 
33
- vi.mock("@react-native-community/datetimepicker", () => ({
34
- default: (props: Record<string, unknown>) => {
33
+ vi.mock("./dateTimePickerLoader", () => ({
34
+ loadDateTimePicker: () => (props: Record<string, unknown>) => {
35
35
  mockState.picks.push(props);
36
36
  return null;
37
37
  },
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Web `Date` field for the three Frappe date fieldtypes, and the native one
3
+ * when the optional `@react-native-community/datetimepicker` peer is absent.
4
+ *
5
+ * The field used to render ONE date-only calendar for all three types, with
6
+ * only the placeholder varying — so a `Datetime` silently dropped its time
7
+ * component from the picker and a `Time` rendered EMPTY, because the calendar
8
+ * adopts its value through `coerceToDate`, for which a bare `HH:mm` is not a
9
+ * date (SB-M-617). Each type now gets the house primitive that matches it:
10
+ *
11
+ * date → forms `DatePicker` (month grid)
12
+ * datetime → forms `DatetimePicker` (Date/Time tabs — grid, then columns)
13
+ * time → the package's own `TimePicker`, which is also what the field
14
+ * registry routes the Frappe `Time` fieldtype to, so a
15
+ * `Date type="time"` and a `Time` field are one control
16
+ *
17
+ * This mirrors what the native half already does (calendar / wheel /
18
+ * calendar-then-wheel), and every branch serializes through the one shared
19
+ * `wire.ts` body, so a web pick and a native pick of the same moment persist
20
+ * byte-identical strings.
21
+ */
22
+ import type { DateProps } from "./types";
23
+ export type { DateProps } from "./types";
24
+ export declare function Date<TData extends Record<string, unknown> = Record<string, unknown>, TName extends string = string>(props: DateProps<TData, TName>): import("react/jsx-runtime").JSX.Element;
25
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/fields/Date/catalog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AASH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA6BzC,wBAAgB,IAAI,CAClB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,2CA6H/B"}
@@ -0,0 +1,11 @@
1
+ export type DateTimePickerComponent = typeof import("@react-native-community/datetimepicker").default;
2
+ export type { DateTimePickerEvent } from "@react-native-community/datetimepicker";
3
+ /**
4
+ * Loads the optional `@react-native-community/datetimepicker` peer at runtime,
5
+ * the same contract as forms' `nativeDateTime/dateTimePickerLoader.ts`. A
6
+ * static import of an absent peer stays external in the native bundle and
7
+ * hermesc rejects the leftover `import` statement (FZ-7357); the guarded
8
+ * `require` returns null instead, and the field renders its catalog half.
9
+ */
10
+ export declare function loadDateTimePicker(): DateTimePickerComponent | null;
11
+ //# sourceMappingURL=dateTimePickerLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePickerLoader.d.ts","sourceRoot":"","sources":["../../../src/fields/Date/dateTimePickerLoader.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GACjC,cAAc,wCAAwC,EAAE,OAAO,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAIlF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,uBAAuB,GAAG,IAAI,CAWnE"}
@@ -1,24 +1,3 @@
1
- /**
2
- * Web `Date` field for the three Frappe date fieldtypes.
3
- *
4
- * The field used to render ONE date-only calendar for all three types, with
5
- * only the placeholder varying — so a `Datetime` silently dropped its time
6
- * component from the picker and a `Time` rendered EMPTY, because the calendar
7
- * adopts its value through `coerceToDate`, for which a bare `HH:mm` is not a
8
- * date (SB-M-617). Each type now gets the house primitive that matches it:
9
- *
10
- * date → forms `DatePicker` (month grid)
11
- * datetime → forms `DatetimePicker` (Date/Time tabs — grid, then columns)
12
- * time → the package's own `TimePicker`, which is also what the field
13
- * registry routes the Frappe `Time` fieldtype to, so a
14
- * `Date type="time"` and a `Time` field are one control
15
- *
16
- * This mirrors what the native half already does (calendar / wheel /
17
- * calendar-then-wheel), and every branch serializes through the one shared
18
- * `wire.ts` body, so a web pick and a native pick of the same moment persist
19
- * byte-identical strings.
20
- */
21
- import type { DateProps } from "./types";
1
+ export { Date } from "./catalog";
22
2
  export type { DateProps } from "./types";
23
- export declare function Date<TData extends Record<string, unknown> = Record<string, unknown>, TName extends string = string>(props: DateProps<TData, TName>): import("react/jsx-runtime").JSX.Element;
24
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Date/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AASH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA6BzC,wBAAgB,IAAI,CAClB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,2CA6H/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Date/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -6,13 +6,8 @@ import type { DateProps } from "./types";
6
6
  */
7
7
  export type { DateProps } from "./types";
8
8
  /**
9
- * Native `Date` field for iOS and Android.
10
- *
11
- * Resolution picks this file over `index.tsx` on native, so the field is the
12
- * real OS picker: the iOS 14+ calendar for dates (`inline`), the wheel for
13
- * times, and the Material dialog on Android. Declared as `Date` rather than
14
- * written as `function Date` so the global `Date` constructor stays reachable
15
- * inside this module.
9
+ * Without the optional `@react-native-community/datetimepicker` peer the
10
+ * field keeps working as the catalog picker the web half renders.
16
11
  */
17
12
  declare function DateField<TData extends Record<string, unknown> = Record<string, unknown>, TName extends string = string>(props: DateProps<TData, TName>): import("react/jsx-runtime").JSX.Element;
18
13
  export { DateField as Date };
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/fields/Date/index.native.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC;;;;GAIG;AAEH,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAyDzC;;;;;;;;GAQG;AACH,iBAAS,SAAS,CAChB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,2CAwT/B;AAED,OAAO,EAAE,SAAS,IAAI,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/fields/Date/index.native.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC;;;;GAIG;AAEH,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAkYzC;;;GAGG;AACH,iBAAS,SAAS,CAChB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,2CAI/B;AAED,OAAO,EAAE,SAAS,IAAI,IAAI,EAAE,CAAC"}