@fougere/admin 0.6.0-alpha.0 → 0.7.0-alpha.0
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/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js.map +1 -1
- package/dist/facets.d.ts +2 -26
- package/dist/facets.d.ts.map +1 -1
- package/dist/facets.js.map +1 -1
- package/dist/index.d.ts +1 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -12
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +21 -76
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +25 -82
- package/dist/provider.js.map +1 -1
- package/dist/react.js +2 -2
- package/dist/resources.d.ts +2 -15
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +3 -26
- package/dist/resources.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1 -10
- package/dist/runtime.js.map +1 -1
- package/dist/topology.d.ts +4 -32
- package/dist/topology.d.ts.map +1 -1
- package/dist/topology.js +4 -32
- package/dist/topology.js.map +1 -1
- package/package.json +4 -4
- package/src/extensions.ts +1 -15
- package/src/facets.ts +2 -26
- package/src/index.ts +1 -12
- package/src/provider.ts +36 -98
- package/src/react.tsx +2 -2
- package/src/resources.ts +3 -26
- package/src/runtime.ts +1 -10
- package/src/topology.ts +4 -32
package/dist/extensions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjE,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CACtD;AAED,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,CAAC,SAAS,cAAc,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAEpF;AAsDD,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,SAAS,aAAa,EAAE,EACnC,UAAU,GAAE,SAAS,cAAc,EAAO,GACzC,aAAa,EAAE,CAqBjB"}
|
package/dist/extensions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA2C,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAyBjE,qEAAqE;AACrE,MAAM,UAAU,oBAAoB,CAAiC,SAAY;IAC/E,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,eAAe,CAAC,UAAqC;IAC5D,MAAM,MAAM,GAAqC,EAAE,CAAC;IACpD,KAAK,MAA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QACrB,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC3E,OAAO;YACL,GAAG,QAAQ;YACX,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;YAC7D,OAAO,EAAE,YAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC;YACrD,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACnD,UAAU;YACV,GAAG,EAAE,cAAc,CAAC,UAAU,CAAC;SAChC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/facets.d.ts
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A semantic notion a renderer can act on, DECLARED — never guessed.
|
|
3
|
-
*
|
|
4
|
-
* A facet says something the schema does not: which field is the human title, which
|
|
5
|
-
* enum member means "published". Both are true statements about a domain, and neither
|
|
6
|
-
* is readable from a shape — `oneOf('draft', 'live')` says the set is closed, never
|
|
7
|
-
* what a member MEANS.
|
|
8
|
-
*
|
|
9
|
-
* There was an `inferAdminFacets` here that answered it by field NAME — `title`,
|
|
10
|
-
* `status`, `/^(user|users|member|account)$/`, `['draft','pending','review']`. It was
|
|
11
|
-
* removed on 2026-08-21: the repo recognises a field by its FORM, never by a word, and
|
|
12
|
-
* that heuristic reads an English vocabulary. An entity spelling `titre`, or a status
|
|
13
|
-
* spelling `brouillon`, lost its facet and nothing said so — a wrong answer given
|
|
14
|
-
* silently, where an absent one is merely absent.
|
|
15
|
-
*
|
|
16
|
-
* So a facet is config, and config is exceptions: no facet is the default, and a
|
|
17
|
-
* renderer that finds none shows the derived table, which is already the whole
|
|
18
|
-
* back-office. What is missing is upstream — the declaration has no way to say what a
|
|
19
|
-
* closed set's member means, and until it has, this is where a human says it.
|
|
20
|
-
*/
|
|
1
|
+
/** A semantic notion a renderer can act on, DECLARED — never guessed. */
|
|
21
2
|
export interface EditorialFacet {
|
|
22
3
|
/** The field that carries the human-readable title. */
|
|
23
4
|
title: string;
|
|
@@ -42,12 +23,7 @@ export interface UsersFacet {
|
|
|
42
23
|
};
|
|
43
24
|
createdAt?: string;
|
|
44
25
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Open registry of the semantic projections renderers understand.
|
|
47
|
-
*
|
|
48
|
-
* Fougere ships `editorial` and `users`; a plugin adds `media`, `commerce`,
|
|
49
|
-
* `moderation` without the core renderer growing another enum member.
|
|
50
|
-
*/
|
|
26
|
+
/** Open registry of the semantic projections renderers understand. */
|
|
51
27
|
export interface AdminFacetRegistry {
|
|
52
28
|
editorial: EditorialFacet;
|
|
53
29
|
users: UsersFacet;
|
package/dist/facets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets.d.ts","sourceRoot":"","sources":["../src/facets.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"facets.d.ts","sourceRoot":"","sources":["../src/facets.ts"],"names":[],"mappings":"AACA,yEAAyE;AAEzE,MAAM,WAAW,cAAc;IAC7B,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,KAAK,CAAC,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AAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"facets.js","sourceRoot":"","sources":["../src/facets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAsC3C,MAAM,UAAU,gBAAgB,CAC9B,IAAU,EACV,KAAY;IAEZ,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAyB,CAAC;AAClD,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,gBAAgB,CAAC,IAAiB,EAAE,KAAkB;IACpE,MAAM,KAAK,GAAG,CAAC,IAAa,EAAE,KAAc,EAAW,EAAE;QACvD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QACtD,MAAM,GAAG,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAC;QACjD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QACpF,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAgB,CAAC;AAC3C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `@fougere/admin` — a back-office that states no rule of its own.
|
|
3
|
-
*
|
|
4
|
-
* It reads the identity card and renders what the card says: the doors are the menu,
|
|
5
|
-
* the schema is the columns and the form, the ops are the buttons. Nothing here
|
|
6
|
-
* knows an entity by name, which is why a new one needs no code — and why the same
|
|
7
|
-
* build serves a frond running in this process and one behind `remotes:`.
|
|
8
|
-
*
|
|
9
|
-
* Two layers, kept apart because they do not test the same way and because only the
|
|
10
|
-
* first is derivable: this module is the contract, `./react` is the rendering. That
|
|
11
|
-
* is the line `useFormFor` already draws.
|
|
12
|
-
*/
|
|
1
|
+
/** `@fougere/admin` — a back-office that states no rule of its own. */
|
|
13
2
|
export { createDataProvider, createLazyDataProvider, type FougereDataProvider, type ProviderOptions, type ResourceKey, } from './provider.js';
|
|
14
3
|
export { resourcesOf, keysOf, fetchCard, capabilitiesOf, actionsOf, CRUD_OPS, type AdminOperation, type AdminResource, } from './resources.js';
|
|
15
4
|
export { defineAdminFacet, mergeAdminFacets, type AdminFacetRegistry, type AdminFacets, type EditorialFacet, type UsersFacet, } from './facets.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,cAAc,EACd,SAAS,EACT,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,OAAO,EACP,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,IAAI,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `@fougere/admin` — a back-office that states no rule of its own.
|
|
3
|
-
*
|
|
4
|
-
* It reads the identity card and renders what the card says: the doors are the menu,
|
|
5
|
-
* the schema is the columns and the form, the ops are the buttons. Nothing here
|
|
6
|
-
* knows an entity by name, which is why a new one needs no code — and why the same
|
|
7
|
-
* build serves a frond running in this process and one behind `remotes:`.
|
|
8
|
-
*
|
|
9
|
-
* Two layers, kept apart because they do not test the same way and because only the
|
|
10
|
-
* first is derivable: this module is the contract, `./react` is the rendering. That
|
|
11
|
-
* is the line `useFormFor` already draws.
|
|
12
|
-
*/
|
|
1
|
+
/** `@fougere/admin` — a back-office that states no rule of its own. */
|
|
13
2
|
export { createDataProvider, createLazyDataProvider, } from './provider.js';
|
|
14
3
|
export { resourcesOf, keysOf, fetchCard, capabilitiesOf, actionsOf, CRUD_OPS, } from './resources.js';
|
|
15
4
|
export { defineAdminFacet, mergeAdminFacets, } from './facets.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GAIvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,cAAc,EACd,SAAS,EACT,QAAQ,GAGT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GAKjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAIrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,OAAO,EACP,QAAQ,GAKT,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,GAInB,MAAM,cAAc,CAAC"}
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* react-admin's `DataProvider`, answered by the Fougere wire.
|
|
3
|
-
*
|
|
4
|
-
* Nine functions, and every one of them had a counterpart already: `getList` is
|
|
5
|
-
* `ListOptions`, `getManyReference` is the storage's `findAllByKeys` (written for a
|
|
6
|
-
* presenter that wanted "the items of these lists"), `filter` is `where` — an
|
|
7
|
-
* equality map that already refuses an unknown key, because a filter silently
|
|
8
|
-
* dropped had once returned the whole table.
|
|
9
|
-
*
|
|
10
|
-
* It talks to the FAÇADE and never to a storage, which is not a precaution here but a
|
|
11
|
-
* consequence: this runs in a browser, and the only thing a browser can reach is the
|
|
12
|
-
* call endpoint. Judges, presenters and middlewares are therefore on the path of
|
|
13
|
-
* every read and every write the back-office makes.
|
|
14
|
-
*/
|
|
1
|
+
/** react-admin's `DataProvider`, answered by the Fougere wire. */
|
|
15
2
|
import { type Fetcher } from '@fougere/app/client';
|
|
16
3
|
/** What a resource must tell the provider — the rest of the card is the UI's business. */
|
|
17
4
|
export interface ResourceKey {
|
|
18
5
|
/** The registration key its door answers under — `post`, not `Post`. */
|
|
19
6
|
name: string;
|
|
20
|
-
/**
|
|
21
|
-
* The field that identifies a row. react-admin insists on `id`; an entity does not,
|
|
22
|
-
* so the provider renames it on the way out and back. `FieldSet.primary` reads it off
|
|
23
|
-
* the card, and answers `undefined` rather than defaulting — a shape with no primary
|
|
24
|
-
* has no row identity to invent.
|
|
25
|
-
*/
|
|
7
|
+
/** The field that identifies an instance. */
|
|
26
8
|
primary: string;
|
|
27
9
|
}
|
|
28
10
|
export interface ProviderOptions {
|
|
@@ -32,18 +14,9 @@ export interface ProviderOptions {
|
|
|
32
14
|
endpoint?: string;
|
|
33
15
|
fetcher?: Fetcher;
|
|
34
16
|
}
|
|
35
|
-
type
|
|
17
|
+
type Values = Record<string, unknown>;
|
|
36
18
|
export declare function createDataProvider(options: ProviderOptions): {
|
|
37
|
-
/**
|
|
38
|
-
* One page, and how it knows there is another.
|
|
39
|
-
*
|
|
40
|
-
* `count: true` is asked for and read when it arrives — but `ListResult` extends
|
|
41
|
-
* `Array`, so `JSON.stringify` drops its `total` and nothing wraps a `page`
|
|
42
|
-
* result today. The same handler therefore answers a total in-process and none
|
|
43
|
-
* over the wire. Rather than depend on it, the page is fetched one row longer
|
|
44
|
-
* than asked: the surplus row IS the answer to "is there a next page", which is
|
|
45
|
-
* `pageInfo`, a form react-admin accepts in place of a total.
|
|
46
|
-
*/
|
|
19
|
+
/** One page, and how it knows there is another. */
|
|
47
20
|
getList: (resource: string, params: {
|
|
48
21
|
pagination?: {
|
|
49
22
|
page: number;
|
|
@@ -55,7 +28,7 @@ export declare function createDataProvider(options: ProviderOptions): {
|
|
|
55
28
|
};
|
|
56
29
|
filter?: Record<string, unknown>;
|
|
57
30
|
}) => Promise<{
|
|
58
|
-
data:
|
|
31
|
+
data: Values[];
|
|
59
32
|
total?: number | undefined;
|
|
60
33
|
pageInfo: {
|
|
61
34
|
hasNextPage: boolean;
|
|
@@ -65,19 +38,15 @@ export declare function createDataProvider(options: ProviderOptions): {
|
|
|
65
38
|
getOne: (resource: string, params: {
|
|
66
39
|
id: string | number;
|
|
67
40
|
}) => Promise<{
|
|
68
|
-
data:
|
|
41
|
+
data: Values;
|
|
69
42
|
}>;
|
|
70
|
-
/**
|
|
71
|
-
* N calls, and the reason is upstream: `findByKeys` is a gesture of the storage port,
|
|
72
|
-
* not one of `Crud`'s five ops, so there is no door to ask for several rows by id.
|
|
73
|
-
* Said here rather than hidden — the day `Crud` names that op this becomes one call.
|
|
74
|
-
*/
|
|
43
|
+
/** N calls, and the reason is upstream. */
|
|
75
44
|
getMany: (resource: string, params: {
|
|
76
45
|
ids: (string | number)[];
|
|
77
46
|
}) => Promise<{
|
|
78
|
-
data:
|
|
47
|
+
data: Values[];
|
|
79
48
|
}>;
|
|
80
|
-
/**
|
|
49
|
+
/** What points AT one — an equality filter, which `where` already is. */
|
|
81
50
|
getManyReference: (resource: string, params: {
|
|
82
51
|
target: string;
|
|
83
52
|
id: string | number;
|
|
@@ -91,36 +60,30 @@ export declare function createDataProvider(options: ProviderOptions): {
|
|
|
91
60
|
};
|
|
92
61
|
filter?: Record<string, unknown>;
|
|
93
62
|
}) => Promise<{
|
|
94
|
-
data:
|
|
63
|
+
data: Values[];
|
|
95
64
|
total?: number;
|
|
96
65
|
}>;
|
|
97
66
|
create: (resource: string, params: {
|
|
98
|
-
data:
|
|
67
|
+
data: Values;
|
|
99
68
|
}) => Promise<{
|
|
100
|
-
data:
|
|
69
|
+
data: Values;
|
|
101
70
|
}>;
|
|
102
71
|
update: (resource: string, params: {
|
|
103
72
|
id: string | number;
|
|
104
|
-
data:
|
|
73
|
+
data: Values;
|
|
105
74
|
}) => Promise<{
|
|
106
|
-
data:
|
|
75
|
+
data: Values;
|
|
107
76
|
}>;
|
|
108
77
|
delete: (resource: string, params: {
|
|
109
78
|
id: string | number;
|
|
110
|
-
previousData?:
|
|
79
|
+
previousData?: Values;
|
|
111
80
|
}) => Promise<{
|
|
112
|
-
data:
|
|
81
|
+
data: Values;
|
|
113
82
|
}>;
|
|
114
|
-
/**
|
|
115
|
-
* The bulk pair, one call per row.
|
|
116
|
-
*
|
|
117
|
-
* `Together<[…]>` would make them one unit of work — but it is a port a HANDLER
|
|
118
|
-
* asks for, and this is a browser. Making these atomic means naming an operation
|
|
119
|
-
* in the frond that says so, which is the app's sentence to write, not ours.
|
|
120
|
-
*/
|
|
83
|
+
/** The bulk pair, one call per values. */
|
|
121
84
|
updateMany: (resource: string, params: {
|
|
122
85
|
ids: (string | number)[];
|
|
123
|
-
data:
|
|
86
|
+
data: Values;
|
|
124
87
|
}) => Promise<{
|
|
125
88
|
data: (string | number)[];
|
|
126
89
|
}>;
|
|
@@ -129,35 +92,17 @@ export declare function createDataProvider(options: ProviderOptions): {
|
|
|
129
92
|
}) => Promise<{
|
|
130
93
|
data: (string | number)[];
|
|
131
94
|
}>;
|
|
132
|
-
/**
|
|
133
|
-
* A tenth method, because the other nine are CRUD and a Frond is not.
|
|
134
|
-
*
|
|
135
|
-
* react-admin's verbs describe a RESOURCE; `publish` describes an ACTION, and none of
|
|
136
|
-
* the nine can carry it. `DataProvider` has an index signature for exactly this case.
|
|
137
|
-
*
|
|
138
|
-
* **The id rides in `params`, and that is an assumption.** The card states an op's
|
|
139
|
-
* input SCHEMA and never its binding plan — `computeBindingPlan` lives in the boot and
|
|
140
|
-
* does not travel — so a button derived from a card must guess where each argument is
|
|
141
|
-
* read from, and it guesses the CRUD convention. True of every op the scan derives
|
|
142
|
-
* today; the honest fix is upstream, making the binding ride in `CardOp`.
|
|
143
|
-
*/
|
|
95
|
+
/** A tenth method, because the other nine are CRUD and a Frond is not. */
|
|
144
96
|
invoke: (resource: string, params: {
|
|
145
97
|
op: string;
|
|
146
98
|
id?: string | number;
|
|
147
|
-
data?:
|
|
99
|
+
data?: Values;
|
|
148
100
|
}) => Promise<{
|
|
149
101
|
data: unknown;
|
|
150
102
|
}>;
|
|
151
103
|
};
|
|
152
104
|
export type FougereDataProvider = ReturnType<typeof createDataProvider>;
|
|
153
|
-
/**
|
|
154
|
-
* The card arrives asynchronously; react-admin requires a provider synchronously.
|
|
155
|
-
*
|
|
156
|
-
* Spell the nine delegates instead of hiding them behind a Proxy. Apart from being
|
|
157
|
-
* inspectable and type-checked, this survives object spreading — the prototype used a
|
|
158
|
-
* Proxy and then spread it into `{}`, which enumerated no methods and handed react-admin
|
|
159
|
-
* an empty provider.
|
|
160
|
-
*/
|
|
105
|
+
/** The card arrives asynchronously; react-admin requires a provider synchronously. */
|
|
161
106
|
export declare function createLazyDataProvider(load: () => Promise<FougereDataProvider>): FougereDataProvider;
|
|
162
107
|
export {};
|
|
163
108
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,qBAAqB,CAAC;AAG7B,0FAA0F;AAC1F,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACvC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAYtC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe;IA2CvD,mDAAmD;IACnD,OAAO,aAAmB,MAAM,UAAU;QACxC,UAAU,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAC/C,IAAI,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QACxC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClC;;;;;;;;IAmBD,MAAM,aAAmB,MAAM,UAAU;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;;;IAOhE,2CAA2C;IAC3C,OAAO,aAAmB,MAAM,UAAU;QAAE,GAA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,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;EAOhC;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAExE,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAapG"}
|
package/dist/provider.js
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* react-admin's `DataProvider`, answered by the Fougere wire.
|
|
3
|
-
*
|
|
4
|
-
* Nine functions, and every one of them had a counterpart already: `getList` is
|
|
5
|
-
* `ListOptions`, `getManyReference` is the storage's `findAllByKeys` (written for a
|
|
6
|
-
* presenter that wanted "the items of these lists"), `filter` is `where` — an
|
|
7
|
-
* equality map that already refuses an unknown key, because a filter silently
|
|
8
|
-
* dropped had once returned the whole table.
|
|
9
|
-
*
|
|
10
|
-
* It talks to the FAÇADE and never to a storage, which is not a precaution here but a
|
|
11
|
-
* consequence: this runs in a browser, and the only thing a browser can reach is the
|
|
12
|
-
* call endpoint. Judges, presenters and middlewares are therefore on the path of
|
|
13
|
-
* every read and every write the back-office makes.
|
|
14
|
-
*/
|
|
1
|
+
/** react-admin's `DataProvider`, answered by the Fougere wire. */
|
|
15
2
|
import { sendCall, fetcher as browserFetcher, CALL_ENDPOINT, itemsOf, pageOf, errorsByField, } from '@fougere/app/client';
|
|
16
3
|
import { validationErrorsOf } from '@fougere/core/contract';
|
|
17
|
-
/**
|
|
18
|
-
* A refusal, in the shape react-admin reads.
|
|
19
|
-
*
|
|
20
|
-
* `body.errors` keyed by field is what its forms display; `errorsByField` already
|
|
21
|
-
* produces exactly that, and is the same function the Vue and React form primitives
|
|
22
|
-
* use — so a field is highlighted identically whichever door the page came through.
|
|
23
|
-
* A non-validation failure passes through untouched: it is not a form's business.
|
|
24
|
-
*/
|
|
4
|
+
/** A refusal, in the shape react-admin reads. */
|
|
25
5
|
function asAdminError(err) {
|
|
26
6
|
const refusals = validationErrorsOf(err);
|
|
27
7
|
if (!refusals)
|
|
@@ -39,18 +19,18 @@ export function createDataProvider(options) {
|
|
|
39
19
|
throw new Error(`Unknown resource '${resource}' — the card names none of that address`);
|
|
40
20
|
return known;
|
|
41
21
|
};
|
|
42
|
-
const call = async (resource, op,
|
|
22
|
+
const call = async (resource, op, context) => {
|
|
43
23
|
try {
|
|
44
24
|
return await sendCall(fetcher, { entity: resource, op }, {
|
|
45
|
-
params: {}, query: {},
|
|
25
|
+
params: {}, query: {}, input: undefined, state: {}, ...context,
|
|
46
26
|
}, endpoint);
|
|
47
27
|
}
|
|
48
28
|
catch (err) {
|
|
49
29
|
throw asAdminError(err);
|
|
50
30
|
}
|
|
51
31
|
};
|
|
52
|
-
/** The
|
|
53
|
-
const identified = (
|
|
32
|
+
/** The values as react-admin needs them: whatever identifies them, under `id`. */
|
|
33
|
+
const identified = (values, key) => values === undefined || key.primary === 'id' ? values : { ...values, id: values[key.primary] };
|
|
54
34
|
/** Its dual — what leaves for the server carries the entity's own field name. */
|
|
55
35
|
const deidentified = (data, key) => {
|
|
56
36
|
if (key.primary === 'id')
|
|
@@ -62,21 +42,12 @@ export function createDataProvider(options) {
|
|
|
62
42
|
const key = keyOf(resource);
|
|
63
43
|
const answer = await call(resource, 'list', { query });
|
|
64
44
|
return {
|
|
65
|
-
data: itemsOf(answer).map((
|
|
45
|
+
data: itemsOf(answer).map((values) => identified(values, key)),
|
|
66
46
|
total: pageOf(answer).total,
|
|
67
47
|
};
|
|
68
48
|
};
|
|
69
49
|
return {
|
|
70
|
-
/**
|
|
71
|
-
* One page, and how it knows there is another.
|
|
72
|
-
*
|
|
73
|
-
* `count: true` is asked for and read when it arrives — but `ListResult` extends
|
|
74
|
-
* `Array`, so `JSON.stringify` drops its `total` and nothing wraps a `page`
|
|
75
|
-
* result today. The same handler therefore answers a total in-process and none
|
|
76
|
-
* over the wire. Rather than depend on it, the page is fetched one row longer
|
|
77
|
-
* than asked: the surplus row IS the answer to "is there a next page", which is
|
|
78
|
-
* `pageInfo`, a form react-admin accepts in place of a total.
|
|
79
|
-
*/
|
|
50
|
+
/** One page, and how it knows there is another. */
|
|
80
51
|
getList: async (resource, params) => {
|
|
81
52
|
const { page = 1, perPage = 25 } = params.pagination ?? {};
|
|
82
53
|
const { data, total } = await list(resource, {
|
|
@@ -97,22 +68,18 @@ export function createDataProvider(options) {
|
|
|
97
68
|
},
|
|
98
69
|
getOne: async (resource, params) => {
|
|
99
70
|
const key = keyOf(resource);
|
|
100
|
-
const
|
|
101
|
-
if (!
|
|
71
|
+
const values = identified((await call(resource, 'findById', { params: { id: params.id } })), key);
|
|
72
|
+
if (!values)
|
|
102
73
|
throw Object.assign(new Error(`${resource} ${params.id} not found`), { status: 404 });
|
|
103
|
-
return { data:
|
|
74
|
+
return { data: values };
|
|
104
75
|
},
|
|
105
|
-
/**
|
|
106
|
-
* N calls, and the reason is upstream: `findByKeys` is a gesture of the storage port,
|
|
107
|
-
* not one of `Crud`'s five ops, so there is no door to ask for several rows by id.
|
|
108
|
-
* Said here rather than hidden — the day `Crud` names that op this becomes one call.
|
|
109
|
-
*/
|
|
76
|
+
/** N calls, and the reason is upstream. */
|
|
110
77
|
getMany: async (resource, params) => {
|
|
111
78
|
const key = keyOf(resource);
|
|
112
|
-
const
|
|
113
|
-
return { data:
|
|
79
|
+
const found = await Promise.all(params.ids.map((id) => call(resource, 'findById', { params: { id } })));
|
|
80
|
+
return { data: found.map((values) => identified(values, key)).filter((values) => !!values) };
|
|
114
81
|
},
|
|
115
|
-
/**
|
|
82
|
+
/** What points AT one — an equality filter, which `where` already is. */
|
|
116
83
|
getManyReference: async (resource, params) => {
|
|
117
84
|
const { page = 1, perPage = 25 } = params.pagination ?? {};
|
|
118
85
|
return list(resource, {
|
|
@@ -127,32 +94,26 @@ export function createDataProvider(options) {
|
|
|
127
94
|
},
|
|
128
95
|
create: async (resource, params) => {
|
|
129
96
|
const key = keyOf(resource);
|
|
130
|
-
const
|
|
131
|
-
return { data: identified(
|
|
97
|
+
const values = await call(resource, 'create', { input: deidentified(params.data, key) });
|
|
98
|
+
return { data: identified(values, key) };
|
|
132
99
|
},
|
|
133
100
|
update: async (resource, params) => {
|
|
134
101
|
const key = keyOf(resource);
|
|
135
|
-
const
|
|
102
|
+
const values = await call(resource, 'update', {
|
|
136
103
|
params: { id: params.id },
|
|
137
|
-
|
|
104
|
+
input: deidentified(params.data, key),
|
|
138
105
|
});
|
|
139
|
-
return { data: identified(
|
|
106
|
+
return { data: identified(values, key) };
|
|
140
107
|
},
|
|
141
108
|
delete: async (resource, params) => {
|
|
142
109
|
await call(resource, 'delete', { params: { id: params.id } });
|
|
143
110
|
return { data: (params.previousData ?? { id: params.id }) };
|
|
144
111
|
},
|
|
145
|
-
/**
|
|
146
|
-
* The bulk pair, one call per row.
|
|
147
|
-
*
|
|
148
|
-
* `Together<[…]>` would make them one unit of work — but it is a port a HANDLER
|
|
149
|
-
* asks for, and this is a browser. Making these atomic means naming an operation
|
|
150
|
-
* in the frond that says so, which is the app's sentence to write, not ours.
|
|
151
|
-
*/
|
|
112
|
+
/** The bulk pair, one call per values. */
|
|
152
113
|
updateMany: async (resource, params) => {
|
|
153
114
|
const key = keyOf(resource);
|
|
154
115
|
await Promise.all(params.ids.map((id) => call(resource, 'update', {
|
|
155
|
-
params: { id },
|
|
116
|
+
params: { id }, input: deidentified(params.data, key),
|
|
156
117
|
})));
|
|
157
118
|
return { data: params.ids };
|
|
158
119
|
},
|
|
@@ -160,34 +121,16 @@ export function createDataProvider(options) {
|
|
|
160
121
|
await Promise.all(params.ids.map((id) => call(resource, 'delete', { params: { id } })));
|
|
161
122
|
return { data: params.ids };
|
|
162
123
|
},
|
|
163
|
-
/**
|
|
164
|
-
* A tenth method, because the other nine are CRUD and a Frond is not.
|
|
165
|
-
*
|
|
166
|
-
* react-admin's verbs describe a RESOURCE; `publish` describes an ACTION, and none of
|
|
167
|
-
* the nine can carry it. `DataProvider` has an index signature for exactly this case.
|
|
168
|
-
*
|
|
169
|
-
* **The id rides in `params`, and that is an assumption.** The card states an op's
|
|
170
|
-
* input SCHEMA and never its binding plan — `computeBindingPlan` lives in the boot and
|
|
171
|
-
* does not travel — so a button derived from a card must guess where each argument is
|
|
172
|
-
* read from, and it guesses the CRUD convention. True of every op the scan derives
|
|
173
|
-
* today; the honest fix is upstream, making the binding ride in `CardOp`.
|
|
174
|
-
*/
|
|
124
|
+
/** A tenth method, because the other nine are CRUD and a Frond is not. */
|
|
175
125
|
invoke: async (resource, params) => ({
|
|
176
126
|
data: await call(resource, params.op, {
|
|
177
127
|
...(params.id !== undefined ? { params: { id: String(params.id) } } : {}),
|
|
178
|
-
...(params.data !== undefined ? {
|
|
128
|
+
...(params.data !== undefined ? { input: params.data } : {}),
|
|
179
129
|
}),
|
|
180
130
|
}),
|
|
181
131
|
};
|
|
182
132
|
}
|
|
183
|
-
/**
|
|
184
|
-
* The card arrives asynchronously; react-admin requires a provider synchronously.
|
|
185
|
-
*
|
|
186
|
-
* Spell the nine delegates instead of hiding them behind a Proxy. Apart from being
|
|
187
|
-
* inspectable and type-checked, this survives object spreading — the prototype used a
|
|
188
|
-
* Proxy and then spread it into `{}`, which enumerated no methods and handed react-admin
|
|
189
|
-
* an empty provider.
|
|
190
|
-
*/
|
|
133
|
+
/** The card arrives asynchronously; react-admin requires a provider synchronously. */
|
|
191
134
|
export function createLazyDataProvider(load) {
|
|
192
135
|
return {
|
|
193
136
|
getList: async (...args) => (await load()).getList(...args),
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,cAAc,EACzB,aAAa,EACb,OAAO,EACP,MAAM,EACN,aAAa,GAE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AE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QACzD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QACzD,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;QACjE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;QACjE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
package/dist/react.js
CHANGED
|
@@ -44,7 +44,7 @@ function defaultFieldFor(column, t) {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* The bounds ride along under the names a browser already enforces — the same
|
|
47
|
-
* `attrs` a Vue form spreads onto its input. The
|
|
47
|
+
* `attrs` a Vue form spreads onto its input. The validator reads the same shape either
|
|
48
48
|
* way; stating them here only means the refusal arrives while typing.
|
|
49
49
|
*/
|
|
50
50
|
function defaultInputFor(field, t) {
|
|
@@ -155,7 +155,7 @@ const showFor = (r, renderers) => function ResourceShow() {
|
|
|
155
155
|
* `useEditController` says it outright (`if (!hasValidationErrors || mutationMode !==
|
|
156
156
|
* 'pessimistic')`), so the per-field refusals `asAdminError` builds from
|
|
157
157
|
* `VALIDATION_FAILED` were computed, sent, and thrown away on every edit. Create was
|
|
158
|
-
* always pessimistic, which is why the same form
|
|
158
|
+
* always pessimistic, which is why the same form validated differently depending on whether
|
|
159
159
|
* the row existed.
|
|
160
160
|
*/
|
|
161
161
|
const editFor = (r, renderers) => function ResourceEdit() {
|
package/dist/resources.d.ts
CHANGED
|
@@ -47,23 +47,10 @@ export declare const CRUD_OPS: readonly ['list', 'findById', 'create', 'update',
|
|
|
47
47
|
export declare function actionsOf(operations: readonly AdminOperation[]): AdminOperation[];
|
|
48
48
|
/** Capabilities are a reading of the visible operations, never a second list to maintain. */
|
|
49
49
|
export declare function capabilitiesOf(operations: readonly Pick<AdminOperation, 'name'>[]): AdminResource['can'];
|
|
50
|
-
/**
|
|
51
|
-
* A door with no schema is not a resource.
|
|
52
|
-
*
|
|
53
|
-
* The card omits `schema` when nothing is stored under that name, and that is
|
|
54
|
-
* ordinary — a health check, a search across several shapes. There is no table to
|
|
55
|
-
* draw for it, and no form. It stays reachable by hand; it is simply not furniture.
|
|
56
|
-
*/
|
|
50
|
+
/** A door with no schema is not a resource. */
|
|
57
51
|
export declare function resourcesOf(card: IdentityCard): AdminResource[];
|
|
58
52
|
/** The provider's index — the half of a resource it needs, keyed by door name. */
|
|
59
53
|
export declare function keysOf(resources: AdminResource[]): Record<string, ResourceKey>;
|
|
60
|
-
/**
|
|
61
|
-
* Ask the running app what it hosts.
|
|
62
|
-
*
|
|
63
|
-
* `rpc.discover` travels on the same wire as every other call — it is a reserved op,
|
|
64
|
-
* not a second endpoint — so a back-office needs no configuration to find its
|
|
65
|
-
* subject, and gets the same answer whether the frond is in this process or behind
|
|
66
|
-
* an address in `remotes:`.
|
|
67
|
-
*/
|
|
54
|
+
/** Ask the running app what it hosts. */
|
|
68
55
|
export declare function fetchCard(endpoint?: string, fetcher?: Fetcher): Promise<IdentityCard>;
|
|
69
56
|
//# sourceMappingURL=resources.d.ts.map
|
package/dist/resources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":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