@panneau/core 5.0.0-alpha.26 → 5.0.0-alpha.28

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
@@ -36,7 +36,7 @@ function EditPage({ item, onSave }) {
36
36
 
37
37
  ## Definition engine
38
38
 
39
- - **`resolveForm(resource, { mode, type })`**: the fields of the form and its layout. Field nodes that name unknown fields are dropped, and fields that no node references are appended at the end. `create` drops `updateOnly` fields; `update` makes `createOnly` fields read-only. `type` adds the fields of an item type.
39
+ - **`resolveForm(resource, { mode, type })`**: the fields of the form and its layout. Field nodes that name unknown fields are dropped, and fields that no node references are appended at the end. `notInForm` fields are dropped, even when the layout names them. `create` drops `updateOnly` fields; `update` makes `createOnly` fields read-only. `type` adds the fields of an item type.
40
40
  - **`resolveList(resource)`**: columns (label, display and sortability from their field), filters, sorts, default sort, layouts, page size, and the actions the user can run, by placement. Without columns, the list shows the item title and the next fields.
41
41
  - **Abilities:** `can(abilities, 'create')`, `isActionAllowedOn(action, item)`, `partitionByAction(action, items)`. Without abilities, everything is allowed and the backend decides; with abilities, only what is `true`.
42
42
  - **`useResource(id)`** resolves a resource of the provider's definition.
@@ -8,8 +8,8 @@ export interface ResolvedForm {
8
8
  /** The fields, by name. */
9
9
  fieldsByName: ReadonlyMap<string, Field>;
10
10
  /**
11
- * The layout tree. Field nodes that name an unknown field are removed, and fields that no
12
- * node references are appended at the end, as `field` nodes.
11
+ * The layout tree. Field nodes that name an unknown field, or a field left out of the form,
12
+ * are removed, and fields that no node references are appended at the end, as `field` nodes.
13
13
  */
14
14
  layout: LayoutNode[];
15
15
  }
@@ -26,7 +26,8 @@ export interface ResolveFormOptions {
26
26
  /**
27
27
  * Resolves fields and a layout into a form. Fields the current user can't see
28
28
  * (`abilities.view: false`) are left out, and those they can't edit (`abilities.update: false`)
29
- * are read-only (decision 0046).
29
+ * are read-only (decision 0046). Fields that only items give (`notInForm`) are left out too, even
30
+ * when the layout names them (decision 0071).
30
31
  */
31
32
  export declare function resolveFields(fields: readonly Field[], layout?: readonly LayoutNode[], { mode }?: Pick<ResolveFormOptions, 'mode'>): ResolvedForm;
32
33
  /** Resolves the form of a resource: its fields (plus those of the item's type) and its layout. */
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/definition/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAQ,MAAM,mBAAmB,CAAC;AAI3E,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,yFAAyF;AACzF,MAAM,WAAW,YAAY;IACzB,mDAAmD;IACnD,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,2BAA2B;IAC3B,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzC;;;OAGG;IACH,MAAM,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AA2DD;;;;GAIG;AACH,wBAAgB,aAAa,CACzB,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,MAAM,GAAE,SAAS,UAAU,EAAO,EAClC,EAAE,IAAI,EAAE,GAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAM,GAChD,YAAY,CAyBd;AAED,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAE,kBAAuB,GAAG,YAAY,CAM9F;AAED,qDAAqD;AACrD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,EAAE,CAE3E"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/definition/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAQ,MAAM,mBAAmB,CAAC;AAI3E,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,yFAAyF;AACzF,MAAM,WAAW,YAAY;IACzB,mDAAmD;IACnD,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,2BAA2B;IAC3B,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzC;;;OAGG;IACH,MAAM,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AA2DD;;;;;GAKG;AACH,wBAAgB,aAAa,CACzB,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,MAAM,GAAE,SAAS,UAAU,EAAO,EAClC,EAAE,IAAI,EAAE,GAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAM,GAChD,YAAY,CAyBd;AAED,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAE,kBAAuB,GAAG,YAAY,CAM9F;AAED,qDAAqD;AACrD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,EAAE,CAE3E"}
@@ -40,11 +40,12 @@ function resolveFieldRules(field, mode) {
40
40
  /**
41
41
  * Resolves fields and a layout into a form. Fields the current user can't see
42
42
  * (`abilities.view: false`) are left out, and those they can't edit (`abilities.update: false`)
43
- * are read-only (decision 0046).
43
+ * are read-only (decision 0046). Fields that only items give (`notInForm`) are left out too, even
44
+ * when the layout names them (decision 0071).
44
45
  */
45
46
  function resolveFields(fields, layout = [], { mode } = {}) {
46
47
  const resolved = fields.flatMap((declared) => {
47
- if (!canViewField(declared)) return [];
48
+ if (!canViewField(declared) || declared.notInForm === true) return [];
48
49
  const field = canUpdateField(declared) ? declared : {
49
50
  ...declared,
50
51
  readOnly: true
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","names":["Field","LayoutNode","Resource","Rule","canUpdateField","canViewField","FormMode","ResolvedForm","fields","fieldsByName","ReadonlyMap","layout","ResolveFormOptions","mode","type","referencedNames","nodes","names","Set","forEach","node","name","undefined","add","children","pruneLayout","flatMap","has","resolveRules","rules","rule","_mode","resolved","resolveFieldRules","field","map","nested","types","resolveFields","Pick","declared","readOnly","updateOnly","withRules","createOnly","Map","pruned","referenced","appended","filter","resolveForm","resource","options","typeFields","find","id","form","getLayoutFieldNames"],"sources":["../../src/definition/form.ts"],"sourcesContent":["import type { Field, LayoutNode, Resource, Rule } from '@panneau/protocol';\n\nimport { canUpdateField, canViewField } from './abilities';\n\n/** Whether a form creates an item or updates one. */\nexport type FormMode = 'create' | 'update';\n\n/** A form ready to render: its fields and a layout that references every one of them. */\nexport interface ResolvedForm {\n /** The fields of the form, in definition order. */\n fields: Field[];\n /** The fields, by name. */\n fieldsByName: ReadonlyMap<string, Field>;\n /**\n * The layout tree. Field nodes that name an unknown field are removed, and fields that no\n * node references are appended at the end, as `field` nodes.\n */\n layout: LayoutNode[];\n}\n\nexport interface ResolveFormOptions {\n /**\n * `create` removes `updateOnly` fields; `update` makes `createOnly` fields read-only. Rules\n * limited to a mode (`{ \"rule\": \"required\", \"mode\": \"create\" }`) are kept, without their\n * `mode`, in that mode only, in nested fields too. Without a mode, every field is kept as is.\n */\n mode?: FormMode;\n /** The type of the item, among the resource's `types`: its fields are added. */\n type?: string;\n}\n\nfunction referencedNames(nodes: readonly LayoutNode[], names = new Set<string>()): Set<string> {\n nodes.forEach((node) => {\n if (node.type === 'field' && node.name !== undefined) {\n names.add(node.name);\n }\n referencedNames(node.children ?? [], names);\n });\n return names;\n}\n\nfunction pruneLayout(\n nodes: readonly LayoutNode[],\n fields: ReadonlyMap<string, Field>,\n): LayoutNode[] {\n return nodes.flatMap((node) => {\n if (node.type === 'field' && (node.name === undefined || !fields.has(node.name))) {\n return [];\n }\n if (node.children === undefined) {\n return [node];\n }\n return [{ ...node, children: pruneLayout(node.children, fields) }];\n });\n}\n\n/** The rules that apply in the mode, without their `mode`. */\nfunction resolveRules(rules: readonly Rule[], mode: FormMode): Rule[] {\n return rules.flatMap((rule) => {\n if (rule.mode === undefined) {\n return [rule];\n }\n if (rule.mode !== mode) {\n return [];\n }\n const { mode: _mode, ...resolved } = rule;\n return [resolved as Rule];\n });\n}\n\n/** A field with the rules of the mode, and those of its nested fields and block types. */\nfunction resolveFieldRules(field: Field, mode: FormMode): Field {\n const resolved: Field = { ...field };\n if (field.rules !== undefined) {\n resolved.rules = resolveRules(field.rules, mode);\n }\n if (field.fields !== undefined) {\n resolved.fields = field.fields.map((nested) => resolveFieldRules(nested, mode));\n }\n if (field.types !== undefined) {\n resolved.types = field.types.map((type) => ({\n ...type,\n fields: type.fields.map((nested) => resolveFieldRules(nested, mode)),\n }));\n }\n return resolved;\n}\n\n/**\n * Resolves fields and a layout into a form. Fields the current user can't see\n * (`abilities.view: false`) are left out, and those they can't edit (`abilities.update: false`)\n * are read-only (decision 0046).\n */\nexport function resolveFields(\n fields: readonly Field[],\n layout: readonly LayoutNode[] = [],\n { mode }: Pick<ResolveFormOptions, 'mode'> = {},\n): ResolvedForm {\n const resolved = fields.flatMap((declared): Field[] => {\n if (!canViewField(declared)) {\n return [];\n }\n const field = canUpdateField(declared) ? declared : { ...declared, readOnly: true };\n if (mode === undefined) {\n return [field];\n }\n if (mode === 'create' && field.updateOnly === true) {\n return [];\n }\n const withRules = resolveFieldRules(field, mode);\n if (mode === 'update' && field.createOnly === true) {\n return [{ ...withRules, readOnly: true }];\n }\n return [withRules];\n });\n const fieldsByName = new Map(resolved.map((field) => [field.name, field]));\n const pruned = pruneLayout(layout, fieldsByName);\n const referenced = referencedNames(pruned);\n const appended: LayoutNode[] = resolved\n .filter((field) => !referenced.has(field.name))\n .map((field) => ({ type: 'field', name: field.name }));\n return { fields: resolved, fieldsByName, layout: [...pruned, ...appended] };\n}\n\n/** Resolves the form of a resource: its fields (plus those of the item's type) and its layout. */\nexport function resolveForm(resource: Resource, options: ResolveFormOptions = {}): ResolvedForm {\n const typeFields =\n options.type !== undefined\n ? (resource.types?.find((type) => type.id === options.type)?.fields ?? [])\n : [];\n return resolveFields([...resource.fields, ...typeFields], resource.form?.layout ?? [], options);\n}\n\n/** The field names a layout references, in order. */\nexport function getLayoutFieldNames(layout: readonly LayoutNode[]): string[] {\n return [...referencedNames(layout)];\n}\n"],"mappings":";;AA+BA,SAASe,gBAAgBC,OAA8BC,wBAAQ,IAAIC,IAAY,GAAgB;CAC3FF,MAAMG,SAASC,SAAS;EACpB,IAAIA,KAAKN,SAAS,WAAWM,KAAKC,SAASC,KAAAA,GACvCL,MAAMM,IAAIH,KAAKC,IAAI;EAEvBN,gBAAgBK,KAAKI,YAAY,CAAA,GAAIP,KAAK;CAC9C,CAAC;CACD,OAAOA;AACX;AAEA,SAASQ,YACLT,OACAR,QACY;CACZ,OAAOQ,MAAMU,SAASN,SAAS;EAC3B,IAAIA,KAAKN,SAAS,YAAYM,KAAKC,SAASC,KAAAA,KAAa,CAACd,OAAOmB,IAAIP,KAAKC,IAAI,IAC1E,OAAO,CAAA;EAEX,IAAID,KAAKI,aAAaF,KAAAA,GAClB,OAAO,CAACF,IAAI;EAEhB,OAAO,CAAC;GAAE,GAAGA;GAAMI,UAAUC,YAAYL,KAAKI,UAAUhB,MAAM;EAAE,CAAC;CACrE,CAAC;AACL;;AAGA,SAASoB,aAAaC,OAAwBhB,MAAwB;CAClE,OAAOgB,MAAMH,SAASI,SAAS;EAC3B,IAAIA,KAAKjB,SAASS,KAAAA,GACd,OAAO,CAACQ,IAAI;EAEhB,IAAIA,KAAKjB,SAASA,MACd,OAAO,CAAA;EAEX,MAAM,EAAEA,MAAMkB,OAAO,GAAGC,aAAaF;EACrC,OAAO,CAACE,QAAgB;CA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M;CACzC,MAAME,WAAyBhB,SAC1BiB,QAAQf,UAAU,CAACa,WAAWpB,IAAIO,MAAMb,IAAI,CAAC,CAAC,CAC9Cc,KAAKD,WAAW;EAAEpB,MAAM;EAASO,MAAMa,MAAMb;CAAK,EAAE;CACzD,OAAO;EAAEb,QAAQwB;EAAUvB;EAAcE,QAAQ,CAAC,GAAGmC,QAAQ,GAAGE,QAAQ;CAAE;AAC9E;;AAGA,SAAgBE,YAAYC,UAAoBC,UAA8B,CAAC,GAAiB;CAC5F,MAAMC,aACFD,QAAQtC,SAASQ,KAAAA,IACV6B,SAASd,OAAOiB,MAAMxC,SAASA,KAAKyC,OAAOH,QAAQtC,IAAI,CAAC,EAAEN,UAAU,CAAA,IACrE,CAAA;CACV,OAAO8B,cAAc,CAAC,GAAGa,SAAS3C,QAAQ,GAAG6C,UAAU,GAAGF,SAASK,MAAM7C,UAAU,CAAA,GAAIyC,OAAO;AAClG;;AAGA,SAAgBK,oBAAoB9C,QAAyC;CACzE,OAAO,CAAC,GAAGI,gBAAgBJ,MAAM,CAAC;AACtC"}
1
+ {"version":3,"file":"form.js","names":["Field","LayoutNode","Resource","Rule","canUpdateField","canViewField","FormMode","ResolvedForm","fields","fieldsByName","ReadonlyMap","layout","ResolveFormOptions","mode","type","referencedNames","nodes","names","Set","forEach","node","name","undefined","add","children","pruneLayout","flatMap","has","resolveRules","rules","rule","_mode","resolved","resolveFieldRules","field","map","nested","types","resolveFields","Pick","declared","notInForm","readOnly","updateOnly","withRules","createOnly","Map","pruned","referenced","appended","filter","resolveForm","resource","options","typeFields","find","id","form","getLayoutFieldNames"],"sources":["../../src/definition/form.ts"],"sourcesContent":["import type { Field, LayoutNode, Resource, Rule } from '@panneau/protocol';\n\nimport { canUpdateField, canViewField } from './abilities';\n\n/** Whether a form creates an item or updates one. */\nexport type FormMode = 'create' | 'update';\n\n/** A form ready to render: its fields and a layout that references every one of them. */\nexport interface ResolvedForm {\n /** The fields of the form, in definition order. */\n fields: Field[];\n /** The fields, by name. */\n fieldsByName: ReadonlyMap<string, Field>;\n /**\n * The layout tree. Field nodes that name an unknown field, or a field left out of the form,\n * are removed, and fields that no node references are appended at the end, as `field` nodes.\n */\n layout: LayoutNode[];\n}\n\nexport interface ResolveFormOptions {\n /**\n * `create` removes `updateOnly` fields; `update` makes `createOnly` fields read-only. Rules\n * limited to a mode (`{ \"rule\": \"required\", \"mode\": \"create\" }`) are kept, without their\n * `mode`, in that mode only, in nested fields too. Without a mode, every field is kept as is.\n */\n mode?: FormMode;\n /** The type of the item, among the resource's `types`: its fields are added. */\n type?: string;\n}\n\nfunction referencedNames(nodes: readonly LayoutNode[], names = new Set<string>()): Set<string> {\n nodes.forEach((node) => {\n if (node.type === 'field' && node.name !== undefined) {\n names.add(node.name);\n }\n referencedNames(node.children ?? [], names);\n });\n return names;\n}\n\nfunction pruneLayout(\n nodes: readonly LayoutNode[],\n fields: ReadonlyMap<string, Field>,\n): LayoutNode[] {\n return nodes.flatMap((node) => {\n if (node.type === 'field' && (node.name === undefined || !fields.has(node.name))) {\n return [];\n }\n if (node.children === undefined) {\n return [node];\n }\n return [{ ...node, children: pruneLayout(node.children, fields) }];\n });\n}\n\n/** The rules that apply in the mode, without their `mode`. */\nfunction resolveRules(rules: readonly Rule[], mode: FormMode): Rule[] {\n return rules.flatMap((rule) => {\n if (rule.mode === undefined) {\n return [rule];\n }\n if (rule.mode !== mode) {\n return [];\n }\n const { mode: _mode, ...resolved } = rule;\n return [resolved as Rule];\n });\n}\n\n/** A field with the rules of the mode, and those of its nested fields and block types. */\nfunction resolveFieldRules(field: Field, mode: FormMode): Field {\n const resolved: Field = { ...field };\n if (field.rules !== undefined) {\n resolved.rules = resolveRules(field.rules, mode);\n }\n if (field.fields !== undefined) {\n resolved.fields = field.fields.map((nested) => resolveFieldRules(nested, mode));\n }\n if (field.types !== undefined) {\n resolved.types = field.types.map((type) => ({\n ...type,\n fields: type.fields.map((nested) => resolveFieldRules(nested, mode)),\n }));\n }\n return resolved;\n}\n\n/**\n * Resolves fields and a layout into a form. Fields the current user can't see\n * (`abilities.view: false`) are left out, and those they can't edit (`abilities.update: false`)\n * are read-only (decision 0046). Fields that only items give (`notInForm`) are left out too, even\n * when the layout names them (decision 0071).\n */\nexport function resolveFields(\n fields: readonly Field[],\n layout: readonly LayoutNode[] = [],\n { mode }: Pick<ResolveFormOptions, 'mode'> = {},\n): ResolvedForm {\n const resolved = fields.flatMap((declared): Field[] => {\n if (!canViewField(declared) || declared.notInForm === true) {\n return [];\n }\n const field = canUpdateField(declared) ? declared : { ...declared, readOnly: true };\n if (mode === undefined) {\n return [field];\n }\n if (mode === 'create' && field.updateOnly === true) {\n return [];\n }\n const withRules = resolveFieldRules(field, mode);\n if (mode === 'update' && field.createOnly === true) {\n return [{ ...withRules, readOnly: true }];\n }\n return [withRules];\n });\n const fieldsByName = new Map(resolved.map((field) => [field.name, field]));\n const pruned = pruneLayout(layout, fieldsByName);\n const referenced = referencedNames(pruned);\n const appended: LayoutNode[] = resolved\n .filter((field) => !referenced.has(field.name))\n .map((field) => ({ type: 'field', name: field.name }));\n return { fields: resolved, fieldsByName, layout: [...pruned, ...appended] };\n}\n\n/** Resolves the form of a resource: its fields (plus those of the item's type) and its layout. */\nexport function resolveForm(resource: Resource, options: ResolveFormOptions = {}): ResolvedForm {\n const typeFields =\n options.type !== undefined\n ? (resource.types?.find((type) => type.id === options.type)?.fields ?? [])\n : [];\n return resolveFields([...resource.fields, ...typeFields], resource.form?.layout ?? [], options);\n}\n\n/** The field names a layout references, in order. */\nexport function getLayoutFieldNames(layout: readonly LayoutNode[]): string[] {\n return [...referencedNames(layout)];\n}\n"],"mappings":";;AA+BA,SAASe,gBAAgBC,OAA8BC,wBAAQ,IAAIC,IAAY,GAAgB;CAC3FF,MAAMG,SAASC,SAAS;EACpB,IAAIA,KAAKN,SAAS,WAAWM,KAAKC,SAASC,KAAAA,GACvCL,MAAMM,IAAIH,KAAKC,IAAI;EAEvBN,gBAAgBK,KAAKI,YAAY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OAAO;AAClG;;AAGA,SAAgBK,oBAAoB/C,QAAyC;CACzE,OAAO,CAAC,GAAGI,gBAAgBJ,MAAM,CAAC;AACtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/core",
3
- "version": "5.0.0-alpha.26",
3
+ "version": "5.0.0-alpha.28",
4
4
  "description": "The engine of Panneau: plugin registry, definition to forms and lists, form and list state, with React hooks. No UI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,6 +33,6 @@
33
33
  "react": "^19.2.0"
34
34
  },
35
35
  "dependencies": {
36
- "@panneau/protocol": "5.0.0-alpha.26"
36
+ "@panneau/protocol": "5.0.0-alpha.28"
37
37
  }
38
38
  }