habarico 7.3.0-beta.2 → 7.3.0-beta.4

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/README.md CHANGED
@@ -11,7 +11,7 @@ or 19.
11
11
  ## Installation
12
12
 
13
13
  ```bash
14
- pnpm add habarico
14
+ npm install habarico
15
15
  ```
16
16
 
17
17
  Peer dependencies (React, React Admin, MUI) are not bundled — install them in the project at the
@@ -21,28 +21,6 @@ same versions the library declares.
21
21
  > data router. Let `SchemaAdmin` create one itself, or wrap it in `createBrowserRouter` — a legacy
22
22
  > `<BrowserRouter>` silently disables the guard.
23
23
 
24
- ## Local development against a checkout
25
-
26
- To run a project against your working copy instead of the published package, link it from the
27
- project directory — the free library first, the paid one second:
28
-
29
- ```bash
30
- pydev link-library <path-to-libs>/habarico-base/node <path-to-libs>/habarico-enterprise/node-enterprise
31
- ```
32
-
33
- `<path-to-libs>` is the directory holding your library checkouts — the same placeholder the Ruby services use in their compose files. Relative or absolute, both work.
34
-
35
- Link only what you develop; either package works on its own. When you link both, the order matters —
36
- `habarico-enterprise` resolves its own `habarico` through the project, so the free library
37
- has to be linked first or both end up with their own copy of React.
38
-
39
- ```bash
40
- pnpm watch # in the library you edit
41
- pydev unlink-library <same paths>
42
- ```
43
-
44
- See [Installation](https://docs.habarico.com/node/installation) for the details.
45
-
46
24
  ## Quick start
47
25
 
48
26
  ```tsx
@@ -77,7 +55,7 @@ is only a quick start.
77
55
 
78
56
  | Section | What it covers |
79
57
  | --- | --- |
80
- | [Installation](https://docs.habarico.com/node/installation) | Packages, the router requirement, local development against a checkout |
58
+ | [Installation](https://docs.habarico.com/node/installation) | Peer dependencies and the router requirement |
81
59
  | [Base components](https://docs.habarico.com/node/base-components/) | `SchemaAdmin` and `SchemaResource` — every prop |
82
60
  | [View components](https://docs.habarico.com/node/view-components/) | List, show, create, edit and action views |
83
61
  | [Providers](https://docs.habarico.com/node/providers/) | Auth, data and schema providers, and the customisation registries |
@@ -91,10 +69,6 @@ The backends serving those schemas are documented at
91
69
  [docs.habarico.com/ruby/intro](https://docs.habarico.com/ruby/intro); the contract between them is the
92
70
  [API reference](https://docs.habarico.com/api).
93
71
 
94
- The architecture of the library itself — its four layers and what belongs where — is documented in
95
- `src/foundation/README.md`, `src/design/README.md`, `src/admin/README.md` and
96
- `src/schema/README.md`, next to the code they describe.
97
-
98
72
  ## License
99
73
 
100
74
  [MIT](LICENSE)
package/lib/index.cjs CHANGED
@@ -5,6 +5,7 @@ var React = require('react');
5
5
  var reactRouterDom = require('react-router-dom');
6
6
  var material = require('@mui/material');
7
7
  var AllIcons = require('@mui/icons-material');
8
+ var PickersTextField = require('@mui/x-date-pickers/PickersTextField');
8
9
  var xDatePickers = require('@mui/x-date-pickers');
9
10
  var AdapterDateFns = require('@mui/x-date-pickers/AdapterDateFns');
10
11
  var xTreeView = require('@mui/x-tree-view');
@@ -29051,6 +29052,27 @@ const MuiPaper = {
29051
29052
  }
29052
29053
  };
29053
29054
 
29055
+ const MuiPickersInputBase = {
29056
+ styleOverrides: {
29057
+ root: ({ theme }) => ({
29058
+ backgroundColor: varAlpha(theme.palette.background.paperChannel, 0.2)
29059
+ })
29060
+ }
29061
+ };
29062
+
29063
+ const MuiPickersOutlinedInput = {
29064
+ styleOverrides: {
29065
+ root: ({ theme }) => ({
29066
+ [`&.${PickersTextField.pickersOutlinedInputClasses.disabled} .${PickersTextField.pickersOutlinedInputClasses.notchedOutline}`]: {
29067
+ borderColor: theme.palette.divider
29068
+ }
29069
+ }),
29070
+ notchedOutline: ({ theme }) => ({
29071
+ borderColor: theme.palette.divider
29072
+ })
29073
+ }
29074
+ };
29075
+
29054
29076
  const MuiPopover = {
29055
29077
  styleOverrides: {
29056
29078
  // Drive the popover surface shadow from the semantic `dropdown` token (shared
@@ -29207,6 +29229,8 @@ const components = {
29207
29229
  MuiMenuItem,
29208
29230
  MuiOutlinedInput,
29209
29231
  MuiPaper,
29232
+ MuiPickersInputBase,
29233
+ MuiPickersOutlinedInput,
29210
29234
  MuiPopover,
29211
29235
  MuiRadio,
29212
29236
  MuiScopedCssBaseline,
@@ -45847,7 +45871,7 @@ const InputLayout = ({
45847
45871
  m: 0,
45848
45872
  minWidth: 0,
45849
45873
  border: 1,
45850
- borderColor: error ? "error.main" : varAlpha(theme.palette.grey["500Channel"], 0.45),
45874
+ borderColor: error ? "error.main" : "divider",
45851
45875
  borderRadius: 1,
45852
45876
  px: 1,
45853
45877
  pt: 0.5,
@@ -63641,14 +63665,11 @@ const DateInput = (props) => {
63641
63665
  // The caller's own `sx` last, so it wins over these defaults. Array form, because
63642
63666
  // `SxProps` may be an array or a theme callback just as legally as a plain object.
63643
63667
  sx: [
63644
- (theme) => ({
63645
- "& .MuiPickersInputBase-root": {
63646
- backgroundColor: material.alpha(theme.palette.background.paper, 0.2)
63647
- },
63668
+ {
63648
63669
  "& .MuiPickersSectionList-root": {
63649
63670
  width: 0
63650
63671
  }
63651
- }),
63672
+ },
63652
63673
  ...Array.isArray(sx) ? sx : [sx]
63653
63674
  ]
63654
63675
  }
@@ -64221,16 +64242,7 @@ const DateTimeInput = (props) => {
64221
64242
  error: invalid,
64222
64243
  fullWidth: true,
64223
64244
  size: "small",
64224
- // The caller's own `sx` last, so it wins over these defaults. Array form, because
64225
- // `SxProps` may be an array or a theme callback just as legally as a plain object.
64226
- sx: [
64227
- (theme) => ({
64228
- "& .MuiPickersInputBase-root": {
64229
- backgroundColor: material.alpha(theme.palette.background.paper, 0.2)
64230
- }
64231
- }),
64232
- ...Array.isArray(sx) ? sx : [sx]
64233
- ]
64245
+ sx
64234
64246
  }
64235
64247
  },
64236
64248
  onChange: handleChange,
@@ -64650,16 +64662,7 @@ const TimeInput = (props) => {
64650
64662
  error: invalid,
64651
64663
  fullWidth: true,
64652
64664
  size: "small",
64653
- // The caller's own `sx` last, so it wins over these defaults. Array form, because
64654
- // `SxProps` may be an array or a theme callback just as legally as a plain object.
64655
- sx: [
64656
- (theme) => ({
64657
- "& .MuiPickersInputBase-root": {
64658
- backgroundColor: material.alpha(theme.palette.background.paper, 0.2)
64659
- }
64660
- }),
64661
- ...Array.isArray(sx) ? sx : [sx]
64662
- ]
64665
+ sx
64663
64666
  }
64664
64667
  },
64665
64668
  onChange: handleChange
@@ -68512,7 +68515,7 @@ const schemaWrappedFieldSx = (bare) => (theme) => ({
68512
68515
  minWidth: 150,
68513
68516
  width: "100%",
68514
68517
  border: 1,
68515
- borderColor: varAlpha(theme.palette.grey["500Channel"], 0.45),
68518
+ borderColor: theme.palette.divider,
68516
68519
  borderRadius: 1,
68517
68520
  py: 0,
68518
68521
  px: "1px",
@@ -72365,7 +72368,7 @@ const sx = (theme) => ({
72365
72368
  minWidth: 150,
72366
72369
  width: "100%",
72367
72370
  border: 1,
72368
- borderColor: varAlpha(theme.palette.grey["500Channel"], 0.2),
72371
+ borderColor: theme.palette.divider,
72369
72372
  borderRadius: 1,
72370
72373
  py: 0,
72371
72374
  px: "1px",