@entifix/react-controls 0.22.3 → 0.23.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.
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/en.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,KAAK,UAAU,GAAG,cAAc,SAAS,EAAE,QAAQ,CAAC;AAEpD,eAAO,MAAM,QAAQ,EAAE,UA6RtB,CAAC"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/en.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,KAAK,UAAU,GAAG,cAAc,SAAS,EAAE,QAAQ,CAAC;AAEpD,eAAO,MAAM,QAAQ,EAAE,UA8RtB,CAAC"}
@@ -71,7 +71,8 @@
71
71
  },
72
72
  summary: {
73
73
  loading: 'Loading…',
74
- failed: 'Could not load {{label}}.'
74
+ failed: 'Could not load {{label}}.',
75
+ empty: 'Nothing here yet.'
75
76
  },
76
77
  pagination: {
77
78
  label: 'Pages',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/i18n/catalog/en.ts"],"sourcesContent":["/**\n * The `es` shape is the contract: annotating with it makes a key that exists in\n * Spanish but not here a *compile* error, so a half-translated locale cannot\n * reach a build. `tools/check-i18n.mjs` covers what types cannot — empty values,\n * and keys present here but absent from `es`.\n */\ntype EsControls = typeof import('./es.js').controls;\n\nexport const controls: EsControls = {\n actions: {\n more: 'More actions',\n forRecord: 'Actions for {{record}}',\n },\n table: {\n select: 'Select',\n actions: 'Actions',\n new: 'New',\n filters: 'Filters',\n sorting: 'Sorting',\n loading: 'Loading…',\n selection: 'Selection',\n selectRow: 'Select {{record}}',\n expandRow: 'Expand {{record}}',\n collapseRow: 'Collapse {{record}}',\n selectAllOnPage: 'Select all on this page',\n selectAllMatching_one: 'Select {{count}} match',\n selectAllMatching_other: 'Select all {{count}} matches',\n selectedCount_one: '{{count}} selected',\n selectedCount_other: '{{count}} selected',\n clearSelection: 'Clear selection',\n results_one: '{{count}} result',\n results_other: '{{count}} results',\n noResultsFiltered: 'No results for these filters',\n caption: '{{entity}} · {{results}}',\n captionSorted:\n '{{entity}} · {{results}} · sorted by {{column}}, {{direction}}',\n },\n bulk: {\n running: 'Running…',\n succeeded_one: '{{count}} record updated',\n succeeded_other: '{{count}} records updated',\n failed_one: '{{count}} record failed',\n failed_other: '{{count}} records failed',\n retryFailed: 'Retry the failures',\n dismiss: 'Dismiss result',\n resultLabel: 'Bulk action result',\n barLabel: 'Actions on the selection',\n },\n form: {\n details: 'Details',\n new: 'New',\n view: 'View',\n edit: 'Edit',\n save: 'Save',\n saving: 'Saving…',\n delete: 'Delete',\n deleting: 'Deleting…',\n clone: 'Duplicate',\n back: 'Back',\n loading: 'Loading…',\n pending: 'Waiting for the server…',\n errorSummary_one: 'Fix {{count}} field before saving',\n errorSummary_other: 'Fix {{count}} fields before saving',\n requiredHint: 'Fields marked * are required.',\n requiredMarker: '*',\n },\n state: {\n retry: 'Retry',\n forbidden: \"You don't have permission to see {{plural}}.\",\n stale: 'What is shown may be out of date.',\n noResults: 'No {{plural}} match these filters.',\n clearFilters: 'Clear filters',\n empty: 'Your {{plural}} will appear here.',\n saved: 'Saved {{object}}.',\n },\n summary: {\n loading: 'Loading…',\n failed: 'Could not load {{label}}.',\n },\n pagination: {\n label: 'Pages',\n summary: 'Page {{current}} of {{total}} · {{items}} items',\n rows: 'Rows',\n first: 'First',\n previous: 'Previous',\n next: 'Next',\n last: 'Last',\n page: 'Page {{current}} of {{total}}',\n },\n columns: {\n title: 'Columns',\n subtitle: 'Visibility and order',\n reset: 'Reset to default',\n moveUp: 'Move {{column}} up',\n moveDown: 'Move {{column}} down',\n },\n filter: {\n match: 'Match',\n all: 'all',\n any: 'any',\n add: 'Add filter',\n apply: 'Apply',\n clear: 'Clear',\n none: 'No filterable members on this entity.',\n listPlaceholder: 'comma, separated, values',\n matchAria: 'Match all or any filter',\n member: 'Filter member',\n operator: 'Filter operator',\n value: 'Filter value',\n rangeEnd: 'Filter range end',\n remove: 'Remove filter',\n applyAria: 'Apply filters',\n clearAria: 'Clear filters',\n applied: 'Applied filters',\n removeChip: 'Remove filter: {{filter}}',\n clearAll: 'Clear all',\n withCount: '{{label}} ({{count}})',\n },\n sort: {\n by: 'Sort by',\n then: 'then by',\n ascending: 'ascending',\n descending: 'descending',\n add: 'Add sort',\n apply: 'Apply',\n clear: 'Clear',\n none: 'No sortable members on this entity.',\n member: 'Sort member',\n direction: 'Sort direction',\n raisePriority: 'Raise sort priority',\n lowerPriority: 'Lower sort priority',\n remove: 'Remove sort',\n applyAria: 'Apply sorting',\n clearAria: 'Clear sorting',\n },\n alert: {\n dismiss: 'Dismiss',\n },\n quantity: {\n decrease: 'Decrease {{label}}',\n increase: 'Increase {{label}}',\n },\n tabs: {\n close: 'Close {{label}}',\n new: 'Open a new tab',\n list: 'Workspace tabs',\n withState: '{{label}}, {{state}}',\n dirty: 'unsaved changes',\n saving: 'saving',\n error: 'not saved',\n },\n link: {\n search: 'Search {{field}}',\n suggestAria: 'Show {{field}} suggestions',\n browseAria: 'Browse {{field}}',\n browseTitle: 'Select {{field}}',\n clear: 'Clear {{field}}',\n empty: '— unassigned —',\n loading: 'Loading…',\n noResults: 'No matches',\n error: 'Could not load options',\n close: 'Close',\n },\n detail: {\n addRow: 'Add row',\n removeRow: 'Remove row {{row}}',\n rowActions: 'Row actions',\n empty: 'No rows yet.',\n errorSummary_one: '{{count}} cell has errors',\n errorSummary_other: '{{count}} cells have errors',\n },\n reference: {\n unresolved: '{{noun}} {{id}}',\n },\n value: {\n none: '— none —',\n yes: 'Yes',\n no: 'No',\n /**\n * A `composition` in a table: its rows are edited on the master's own\n * screen rather than in the cell, so the cell says how many there are.\n */\n rowCount_one: '{{count}} row',\n rowCount_other: '{{count}} rows',\n },\n /**\n * `required`…`option` are the metadata-derived rules. The rest are the\n * vocabulary an entity's Standard Schema writes its messages in: a schema\n * carries the *key*, never a sentence, so a rule stays translatable.\n *\n * `field` is the only parameter available — a Standard Schema issue exposes a\n * message and a path, nothing else — so these stay unquantified. A rule that\n * has to state its bound writes its own key in its domain catalog and passes\n * it namespaced (`entity:product-specification.validation.codeLength`).\n */\n validation: {\n required: '{{field}} is required',\n number: '{{field}} must be a number',\n date: '{{field}} must be a date',\n option: '{{field}} is not a valid option',\n minLength: '{{field}} is too short',\n maxLength: '{{field}} is too long',\n min: '{{field}} is too small',\n max: '{{field}} is too large',\n pattern: '{{field}} has an invalid format',\n minItems_one: '{{field}} needs at least {{count}} item',\n minItems_other: '{{field}} needs at least {{count}} items',\n maxItems_one: '{{field}} takes at most {{count}} item',\n maxItems_other: '{{field}} takes at most {{count}} items',\n notBefore: '{{field}} cannot be before {{other}}',\n locale: '{{field}} has no {{locale}} text',\n },\n operator: {\n eq: 'is',\n ne: 'is not',\n gt: 'greater than',\n gte: 'greater or equal',\n lt: 'less than',\n lte: 'less or equal',\n in: 'is one of',\n nin: 'is none of',\n between: 'between',\n nbetween: 'not between',\n like: 'contains',\n nlike: 'does not contain',\n isNull: 'is empty',\n isNotNull: 'is not empty',\n },\n density: {\n label: 'Density',\n comfortable: 'Comfortable',\n compact: 'Compact',\n },\n theme: {\n label: 'Theme',\n },\n themes: {\n aurora: 'Aurora',\n sunset: 'Sunset',\n midnight: 'Midnight',\n ocean: 'Ocean (runtime)',\n marketplace: 'Marketplace',\n marketplaceDark: 'Marketplace dark',\n auth: 'Identity',\n authDark: 'Identity dark',\n },\n confirm: {\n confirm: 'Confirm',\n cancel: 'Cancel',\n question: '{{verb}} {{object}}?',\n verbCount_one: '{{verb}}',\n verbCount_other: '{{verb}} {{count}}',\n selection_one: '{{count}} {{label}}',\n selection_other: '{{count}} {{plural}}',\n typeToConfirm: 'Type {{expected}} to confirm',\n done: 'Done: {{verb}}, {{object}}.',\n undo: 'Undo',\n deleteMessage: 'It is removed for good.',\n deleted: '{{object}} deleted.',\n },\n live: {\n reconnecting: 'Live updates paused — reconnecting',\n stopped: 'Live updates stopped',\n reconnect: 'Reconnect',\n resumed: 'Live updates resumed',\n waiting: 'Waiting for connection…',\n },\n toast: {\n region: 'Notifications',\n dismiss: 'Dismiss',\n },\n breadcrumbs: {\n label: 'Breadcrumb',\n },\n wizard: {\n steps: 'Steps',\n previous: 'Back',\n next: 'Continue',\n finish: 'Finish',\n submitting: 'Submitting…',\n stepOf: 'Step {{current}} of {{total}}',\n goToStep: 'Back to {{label}}',\n status: {\n pending: 'pending',\n active: 'in progress',\n complete: 'completed',\n error: 'has errors',\n },\n resume: {\n title: 'Picking up where you left off',\n dismiss: 'Got it',\n },\n },\n};\n"],"names":["controls","actions","more","forRecord","table","select","new","filters","sorting","loading","selection","selectRow","expandRow","collapseRow","selectAllOnPage","selectAllMatching_one","selectAllMatching_other","selectedCount_one","selectedCount_other","clearSelection","results_one","results_other","noResultsFiltered","caption","captionSorted","bulk","running","succeeded_one","succeeded_other","failed_one","failed_other","retryFailed","dismiss","resultLabel","barLabel","form","details","view","edit","save","saving","delete","deleting","clone","back","pending","errorSummary_one","errorSummary_other","requiredHint","requiredMarker","state","retry","forbidden","stale","noResults","clearFilters","empty","saved","summary","failed","pagination","label","rows","first","previous","next","last","page","columns","title","subtitle","reset","moveUp","moveDown","filter","match","all","any","add","apply","clear","none","listPlaceholder","matchAria","member","operator","value","rangeEnd","remove","applyAria","clearAria","applied","removeChip","clearAll","withCount","sort","by","then","ascending","descending","direction","raisePriority","lowerPriority","alert","quantity","decrease","increase","tabs","close","list","withState","dirty","error","link","search","suggestAria","browseAria","browseTitle","detail","addRow","removeRow","rowActions","reference","unresolved","yes","no","rowCount_one","rowCount_other","validation","required","number","date","option","minLength","maxLength","min","max","pattern","minItems_one","minItems_other","maxItems_one","maxItems_other","notBefore","locale","eq","ne","gt","gte","lt","lte","in","nin","between","nbetween","like","nlike","isNull","isNotNull","density","comfortable","compact","theme","themes","aurora","sunset","midnight","ocean","marketplace","marketplaceDark","auth","authDark","confirm","cancel","question","verbCount_one","verbCount_other","selection_one","selection_other","typeToConfirm","done","undo","deleteMessage","deleted","live","reconnecting","stopped","reconnect","resumed","waiting","toast","region","breadcrumbs","wizard","steps","finish","submitting","stepOf","goToStep","status","active","complete","resume"],"mappings":"AAAA;;;;;CAKC,GAGD,OAAO,MAAMA,WAAuB;IAClCC,SAAS;QACPC,MAAM;QACNC,WAAW;IACb;IACAC,OAAO;QACLC,QAAQ;QACRJ,SAAS;QACTK,KAAK;QACLC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,WAAW;QACXC,WAAW;QACXC,WAAW;QACXC,aAAa;QACbC,iBAAiB;QACjBC,uBAAuB;QACvBC,yBAAyB;QACzBC,mBAAmB;QACnBC,qBAAqB;QACrBC,gBAAgB;QAChBC,aAAa;QACbC,eAAe;QACfC,mBAAmB;QACnBC,SAAS;QACTC,eACE;IACJ;IACAC,MAAM;QACJC,SAAS;QACTC,eAAe;QACfC,iBAAiB;QACjBC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,SAAS;QACTC,aAAa;QACbC,UAAU;IACZ;IACAC,MAAM;QACJC,SAAS;QACT9B,KAAK;QACL+B,MAAM;QACNC,MAAM;QACNC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVC,OAAO;QACPC,MAAM;QACNnC,SAAS;QACToC,SAAS;QACTC,kBAAkB;QAClBC,oBAAoB;QACpBC,cAAc;QACdC,gBAAgB;IAClB;IACAC,OAAO;QACLC,OAAO;QACPC,WAAW;QACXC,OAAO;QACPC,WAAW;QACXC,cAAc;QACdC,OAAO;QACPC,OAAO;IACT;IACAC,SAAS;QACPjD,SAAS;QACTkD,QAAQ;IACV;IACAC,YAAY;QACVC,OAAO;QACPH,SAAS;QACTI,MAAM;QACNC,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,MAAM;QACNC,MAAM;IACR;IACAC,SAAS;QACPC,OAAO;QACPC,UAAU;QACVC,OAAO;QACPC,QAAQ;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;QAChBC,WAAW;QACXC,QAAQ;IACV;IACA1D,UAAU;QACR2D,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,KAAK;QACLC,IAAI;QACJC,KAAK;QACLC,IAAI;QACJC,KAAK;QACLC,SAAS;QACTC,UAAU;QACVC,MAAM;QACNC,OAAO;QACPC,QAAQ;QACRC,WAAW;IACb;IACAC,SAAS;QACPjG,OAAO;QACPkG,aAAa;QACbC,SAAS;IACX;IACAC,OAAO;QACLpG,OAAO;IACT;IACAqG,QAAQ;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVC,OAAO;QACPC,aAAa;QACbC,iBAAiB;QACjBC,MAAM;QACNC,UAAU;IACZ;IACAC,SAAS;QACPA,SAAS;QACTC,QAAQ;QACRC,UAAU;QACVC,eAAe;QACfC,iBAAiB;QACjBC,eAAe;QACfC,iBAAiB;QACjBC,eAAe;QACfC,MAAM;QACNC,MAAM;QACNC,eAAe;QACfC,SAAS;IACX;IACAC,MAAM;QACJC,cAAc;QACdC,SAAS;QACTC,WAAW;QACXC,SAAS;QACTC,SAAS;IACX;IACAC,OAAO;QACLC,QAAQ;QACR9J,SAAS;IACX;IACA+J,aAAa;QACXlI,OAAO;IACT;IACAmI,QAAQ;QACNC,OAAO;QACPjI,UAAU;QACVC,MAAM;QACNiI,QAAQ;QACRC,YAAY;QACZC,QAAQ;QACRC,UAAU;QACVC,QAAQ;YACNzJ,SAAS;YACT0J,QAAQ;YACRC,UAAU;YACVxF,OAAO;QACT;QACAyF,QAAQ;YACNpI,OAAO;YACPrC,SAAS;QACX;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/i18n/catalog/en.ts"],"sourcesContent":["/**\n * The `es` shape is the contract: annotating with it makes a key that exists in\n * Spanish but not here a *compile* error, so a half-translated locale cannot\n * reach a build. `tools/check-i18n.mjs` covers what types cannot — empty values,\n * and keys present here but absent from `es`.\n */\ntype EsControls = typeof import('./es.js').controls;\n\nexport const controls: EsControls = {\n actions: {\n more: 'More actions',\n forRecord: 'Actions for {{record}}',\n },\n table: {\n select: 'Select',\n actions: 'Actions',\n new: 'New',\n filters: 'Filters',\n sorting: 'Sorting',\n loading: 'Loading…',\n selection: 'Selection',\n selectRow: 'Select {{record}}',\n expandRow: 'Expand {{record}}',\n collapseRow: 'Collapse {{record}}',\n selectAllOnPage: 'Select all on this page',\n selectAllMatching_one: 'Select {{count}} match',\n selectAllMatching_other: 'Select all {{count}} matches',\n selectedCount_one: '{{count}} selected',\n selectedCount_other: '{{count}} selected',\n clearSelection: 'Clear selection',\n results_one: '{{count}} result',\n results_other: '{{count}} results',\n noResultsFiltered: 'No results for these filters',\n caption: '{{entity}} · {{results}}',\n captionSorted:\n '{{entity}} · {{results}} · sorted by {{column}}, {{direction}}',\n },\n bulk: {\n running: 'Running…',\n succeeded_one: '{{count}} record updated',\n succeeded_other: '{{count}} records updated',\n failed_one: '{{count}} record failed',\n failed_other: '{{count}} records failed',\n retryFailed: 'Retry the failures',\n dismiss: 'Dismiss result',\n resultLabel: 'Bulk action result',\n barLabel: 'Actions on the selection',\n },\n form: {\n details: 'Details',\n new: 'New',\n view: 'View',\n edit: 'Edit',\n save: 'Save',\n saving: 'Saving…',\n delete: 'Delete',\n deleting: 'Deleting…',\n clone: 'Duplicate',\n back: 'Back',\n loading: 'Loading…',\n pending: 'Waiting for the server…',\n errorSummary_one: 'Fix {{count}} field before saving',\n errorSummary_other: 'Fix {{count}} fields before saving',\n requiredHint: 'Fields marked * are required.',\n requiredMarker: '*',\n },\n state: {\n retry: 'Retry',\n forbidden: \"You don't have permission to see {{plural}}.\",\n stale: 'What is shown may be out of date.',\n noResults: 'No {{plural}} match these filters.',\n clearFilters: 'Clear filters',\n empty: 'Your {{plural}} will appear here.',\n saved: 'Saved {{object}}.',\n },\n summary: {\n loading: 'Loading…',\n failed: 'Could not load {{label}}.',\n empty: 'Nothing here yet.',\n },\n pagination: {\n label: 'Pages',\n summary: 'Page {{current}} of {{total}} · {{items}} items',\n rows: 'Rows',\n first: 'First',\n previous: 'Previous',\n next: 'Next',\n last: 'Last',\n page: 'Page {{current}} of {{total}}',\n },\n columns: {\n title: 'Columns',\n subtitle: 'Visibility and order',\n reset: 'Reset to default',\n moveUp: 'Move {{column}} up',\n moveDown: 'Move {{column}} down',\n },\n filter: {\n match: 'Match',\n all: 'all',\n any: 'any',\n add: 'Add filter',\n apply: 'Apply',\n clear: 'Clear',\n none: 'No filterable members on this entity.',\n listPlaceholder: 'comma, separated, values',\n matchAria: 'Match all or any filter',\n member: 'Filter member',\n operator: 'Filter operator',\n value: 'Filter value',\n rangeEnd: 'Filter range end',\n remove: 'Remove filter',\n applyAria: 'Apply filters',\n clearAria: 'Clear filters',\n applied: 'Applied filters',\n removeChip: 'Remove filter: {{filter}}',\n clearAll: 'Clear all',\n withCount: '{{label}} ({{count}})',\n },\n sort: {\n by: 'Sort by',\n then: 'then by',\n ascending: 'ascending',\n descending: 'descending',\n add: 'Add sort',\n apply: 'Apply',\n clear: 'Clear',\n none: 'No sortable members on this entity.',\n member: 'Sort member',\n direction: 'Sort direction',\n raisePriority: 'Raise sort priority',\n lowerPriority: 'Lower sort priority',\n remove: 'Remove sort',\n applyAria: 'Apply sorting',\n clearAria: 'Clear sorting',\n },\n alert: {\n dismiss: 'Dismiss',\n },\n quantity: {\n decrease: 'Decrease {{label}}',\n increase: 'Increase {{label}}',\n },\n tabs: {\n close: 'Close {{label}}',\n new: 'Open a new tab',\n list: 'Workspace tabs',\n withState: '{{label}}, {{state}}',\n dirty: 'unsaved changes',\n saving: 'saving',\n error: 'not saved',\n },\n link: {\n search: 'Search {{field}}',\n suggestAria: 'Show {{field}} suggestions',\n browseAria: 'Browse {{field}}',\n browseTitle: 'Select {{field}}',\n clear: 'Clear {{field}}',\n empty: '— unassigned —',\n loading: 'Loading…',\n noResults: 'No matches',\n error: 'Could not load options',\n close: 'Close',\n },\n detail: {\n addRow: 'Add row',\n removeRow: 'Remove row {{row}}',\n rowActions: 'Row actions',\n empty: 'No rows yet.',\n errorSummary_one: '{{count}} cell has errors',\n errorSummary_other: '{{count}} cells have errors',\n },\n reference: {\n unresolved: '{{noun}} {{id}}',\n },\n value: {\n none: '— none —',\n yes: 'Yes',\n no: 'No',\n /**\n * A `composition` in a table: its rows are edited on the master's own\n * screen rather than in the cell, so the cell says how many there are.\n */\n rowCount_one: '{{count}} row',\n rowCount_other: '{{count}} rows',\n },\n /**\n * `required`…`option` are the metadata-derived rules. The rest are the\n * vocabulary an entity's Standard Schema writes its messages in: a schema\n * carries the *key*, never a sentence, so a rule stays translatable.\n *\n * `field` is the only parameter available — a Standard Schema issue exposes a\n * message and a path, nothing else — so these stay unquantified. A rule that\n * has to state its bound writes its own key in its domain catalog and passes\n * it namespaced (`entity:product-specification.validation.codeLength`).\n */\n validation: {\n required: '{{field}} is required',\n number: '{{field}} must be a number',\n date: '{{field}} must be a date',\n option: '{{field}} is not a valid option',\n minLength: '{{field}} is too short',\n maxLength: '{{field}} is too long',\n min: '{{field}} is too small',\n max: '{{field}} is too large',\n pattern: '{{field}} has an invalid format',\n minItems_one: '{{field}} needs at least {{count}} item',\n minItems_other: '{{field}} needs at least {{count}} items',\n maxItems_one: '{{field}} takes at most {{count}} item',\n maxItems_other: '{{field}} takes at most {{count}} items',\n notBefore: '{{field}} cannot be before {{other}}',\n locale: '{{field}} has no {{locale}} text',\n },\n operator: {\n eq: 'is',\n ne: 'is not',\n gt: 'greater than',\n gte: 'greater or equal',\n lt: 'less than',\n lte: 'less or equal',\n in: 'is one of',\n nin: 'is none of',\n between: 'between',\n nbetween: 'not between',\n like: 'contains',\n nlike: 'does not contain',\n isNull: 'is empty',\n isNotNull: 'is not empty',\n },\n density: {\n label: 'Density',\n comfortable: 'Comfortable',\n compact: 'Compact',\n },\n theme: {\n label: 'Theme',\n },\n themes: {\n aurora: 'Aurora',\n sunset: 'Sunset',\n midnight: 'Midnight',\n ocean: 'Ocean (runtime)',\n marketplace: 'Marketplace',\n marketplaceDark: 'Marketplace dark',\n auth: 'Identity',\n authDark: 'Identity dark',\n },\n confirm: {\n confirm: 'Confirm',\n cancel: 'Cancel',\n question: '{{verb}} {{object}}?',\n verbCount_one: '{{verb}}',\n verbCount_other: '{{verb}} {{count}}',\n selection_one: '{{count}} {{label}}',\n selection_other: '{{count}} {{plural}}',\n typeToConfirm: 'Type {{expected}} to confirm',\n done: 'Done: {{verb}}, {{object}}.',\n undo: 'Undo',\n deleteMessage: 'It is removed for good.',\n deleted: '{{object}} deleted.',\n },\n live: {\n reconnecting: 'Live updates paused — reconnecting',\n stopped: 'Live updates stopped',\n reconnect: 'Reconnect',\n resumed: 'Live updates resumed',\n waiting: 'Waiting for connection…',\n },\n toast: {\n region: 'Notifications',\n dismiss: 'Dismiss',\n },\n breadcrumbs: {\n label: 'Breadcrumb',\n },\n wizard: {\n steps: 'Steps',\n previous: 'Back',\n next: 'Continue',\n finish: 'Finish',\n submitting: 'Submitting…',\n stepOf: 'Step {{current}} of {{total}}',\n goToStep: 'Back to {{label}}',\n status: {\n pending: 'pending',\n active: 'in progress',\n complete: 'completed',\n error: 'has errors',\n },\n resume: {\n title: 'Picking up where you left off',\n dismiss: 'Got it',\n },\n },\n};\n"],"names":["controls","actions","more","forRecord","table","select","new","filters","sorting","loading","selection","selectRow","expandRow","collapseRow","selectAllOnPage","selectAllMatching_one","selectAllMatching_other","selectedCount_one","selectedCount_other","clearSelection","results_one","results_other","noResultsFiltered","caption","captionSorted","bulk","running","succeeded_one","succeeded_other","failed_one","failed_other","retryFailed","dismiss","resultLabel","barLabel","form","details","view","edit","save","saving","delete","deleting","clone","back","pending","errorSummary_one","errorSummary_other","requiredHint","requiredMarker","state","retry","forbidden","stale","noResults","clearFilters","empty","saved","summary","failed","pagination","label","rows","first","previous","next","last","page","columns","title","subtitle","reset","moveUp","moveDown","filter","match","all","any","add","apply","clear","none","listPlaceholder","matchAria","member","operator","value","rangeEnd","remove","applyAria","clearAria","applied","removeChip","clearAll","withCount","sort","by","then","ascending","descending","direction","raisePriority","lowerPriority","alert","quantity","decrease","increase","tabs","close","list","withState","dirty","error","link","search","suggestAria","browseAria","browseTitle","detail","addRow","removeRow","rowActions","reference","unresolved","yes","no","rowCount_one","rowCount_other","validation","required","number","date","option","minLength","maxLength","min","max","pattern","minItems_one","minItems_other","maxItems_one","maxItems_other","notBefore","locale","eq","ne","gt","gte","lt","lte","in","nin","between","nbetween","like","nlike","isNull","isNotNull","density","comfortable","compact","theme","themes","aurora","sunset","midnight","ocean","marketplace","marketplaceDark","auth","authDark","confirm","cancel","question","verbCount_one","verbCount_other","selection_one","selection_other","typeToConfirm","done","undo","deleteMessage","deleted","live","reconnecting","stopped","reconnect","resumed","waiting","toast","region","breadcrumbs","wizard","steps","finish","submitting","stepOf","goToStep","status","active","complete","resume"],"mappings":"AAAA;;;;;CAKC,GAGD,OAAO,MAAMA,WAAuB;IAClCC,SAAS;QACPC,MAAM;QACNC,WAAW;IACb;IACAC,OAAO;QACLC,QAAQ;QACRJ,SAAS;QACTK,KAAK;QACLC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,WAAW;QACXC,WAAW;QACXC,WAAW;QACXC,aAAa;QACbC,iBAAiB;QACjBC,uBAAuB;QACvBC,yBAAyB;QACzBC,mBAAmB;QACnBC,qBAAqB;QACrBC,gBAAgB;QAChBC,aAAa;QACbC,eAAe;QACfC,mBAAmB;QACnBC,SAAS;QACTC,eACE;IACJ;IACAC,MAAM;QACJC,SAAS;QACTC,eAAe;QACfC,iBAAiB;QACjBC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,SAAS;QACTC,aAAa;QACbC,UAAU;IACZ;IACAC,MAAM;QACJC,SAAS;QACT9B,KAAK;QACL+B,MAAM;QACNC,MAAM;QACNC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVC,OAAO;QACPC,MAAM;QACNnC,SAAS;QACToC,SAAS;QACTC,kBAAkB;QAClBC,oBAAoB;QACpBC,cAAc;QACdC,gBAAgB;IAClB;IACAC,OAAO;Q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F,OAAO;QACT;QACAyF,QAAQ;YACNpI,OAAO;YACPrC,SAAS;QACX;IACF;AACF,EAAE"}
@@ -96,6 +96,7 @@ export declare const controls: {
96
96
  summary: {
97
97
  loading: string;
98
98
  failed: string;
99
+ empty: string;
99
100
  };
100
101
  pagination: {
101
102
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/es.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;QAYjB;;;;WAIG;;;;;;QAMH;;;WAGG;;;;;;QAMH;;;WAGG;;;;QAIH,sEAAsE;;;;IAKxE;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;QAyBD,4EAA4E;;;;;;IAM9E;;;OAGG;;;;;;;;;;;;;;;;;;;;;;QAsBD,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8B9C,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCpE;;;;OAIG;;;;;;;;;;;;;IAaH;;;;;;OAMG;;;;;;;;;;;;;;;;QAgBD;;;WAGG;;;;IAIL;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;IAkBH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;IAyBH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;IAyBH,2EAA2E;;;;;;;;;;;;;;;IAe3E;;;;OAIG;;;;QAID;;;;WAIG;;;QAGH;;;;;WAKG;;;;QAIH;;;WAGG;;;;;;;QAOH;;;;WAIG;;;;;;CAMN,CAAC"}
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/es.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;QAYjB;;;;WAIG;;;;;;QAMH;;;WAGG;;;;;;QAMH;;;WAGG;;;;QAIH,sEAAsE;;;;IAKxE;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;QAyBD,4EAA4E;;;;;;IAM9E;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;QAuBD,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8B9C,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCpE;;;;OAIG;;;;;;;;;;;;;IAaH;;;;;;OAMG;;;;;;;;;;;;;;;;QAgBD;;;WAGG;;;;IAIL;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;IAkBH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;IAyBH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;IAyBH,2EAA2E;;;;;;;;;;;;;;;IAe3E;;;;OAIG;;;;QAID;;;;WAIG;;;QAGH;;;;;WAKG;;;;QAIH;;;WAGG;;;;;;;QAOH;;;;WAIG;;;;;;CAMN,CAAC"}
@@ -87,7 +87,8 @@
87
87
  },
88
88
  summary: {
89
89
  loading: 'Cargando…',
90
- failed: 'No se pudo cargar {{label}}.'
90
+ failed: 'No se pudo cargar {{label}}.',
91
+ empty: 'Nada por ahora.'
91
92
  },
92
93
  pagination: {
93
94
  label: 'Páginas',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/i18n/catalog/es.ts"],"sourcesContent":["/**\n * Copy owned by `@entifix/react-controls` — the agnostic entity UI. It lives\n * here rather than next to the components because the typed-key augmentation has\n * to see every namespace from one module, and `@entifix/tooling` (T0) may not\n * import a T3 package.\n */\nexport const controls = {\n actions: {\n more: 'Más acciones',\n forRecord: 'Acciones para {{record}}',\n },\n table: {\n select: 'Seleccionar',\n actions: 'Acciones',\n new: 'Nuevo',\n filters: 'Filtros',\n sorting: 'Orden',\n loading: 'Cargando…',\n /**\n * La columna de selección. `selectRow` nombra la fila porque una casilla\n * sin etiqueta visible sólo se anuncia por su `aria-label`, y repetir el\n * encabezado en cada fila no diría cuál es.\n */\n selection: 'Selección',\n selectRow: 'Seleccionar {{record}}',\n expandRow: 'Expandir {{record}}',\n collapseRow: 'Contraer {{record}}',\n selectAllOnPage: 'Seleccionar todo en esta página',\n /**\n * La segunda selección — la que el servidor evalúa — lleva el número\n * siempre: es la diferencia entre actuar sobre 25 filas y sobre 3.200.\n */\n selectAllMatching_one: 'Seleccionar {{count}} coincidencia',\n selectAllMatching_other: 'Seleccionar las {{count}} coincidencias',\n selectedCount_one: '{{count}} seleccionado',\n selectedCount_other: '{{count}} seleccionados',\n clearSelection: 'Limpiar selección',\n /**\n * Lo que dice la región de estado tras filtrar, ordenar o cambiar de\n * página — nunca en la primera carga, que el lector pidió al llegar.\n */\n results_one: '{{count}} resultado',\n results_other: '{{count}} resultados',\n noResultsFiltered: 'Sin resultados para estos filtros',\n /** El `caption` de la tabla: qué contiene, cuántos y en qué orden. */\n caption: '{{entity}} · {{results}}',\n captionSorted:\n '{{entity}} · {{results}} · ordenado por {{column}}, {{direction}}',\n },\n /**\n * Una acción sobre una selección. El resultado es por fila, nunca un aviso\n * único: 40 seleccionadas y 3 fallidas no es ni un éxito ni un error.\n */\n bulk: {\n running: 'Ejecutando…',\n succeeded_one: '{{count}} registro actualizado',\n succeeded_other: '{{count}} registros actualizados',\n failed_one: '{{count}} registro falló',\n failed_other: '{{count}} registros fallaron',\n retryFailed: 'Reintentar los fallidos',\n dismiss: 'Cerrar resultado',\n resultLabel: 'Resultado de la acción masiva',\n barLabel: 'Acciones sobre la selección',\n },\n form: {\n details: 'Detalles',\n new: 'Nuevo',\n view: 'Ver',\n edit: 'Editar',\n save: 'Guardar',\n saving: 'Guardando…',\n delete: 'Eliminar',\n deleting: 'Eliminando…',\n clone: 'Duplicar',\n back: 'Volver',\n loading: 'Cargando…',\n pending: 'Esperando al servidor…',\n /** El resumen de un guardado rechazado: toma el foco, enlaza cada campo. */\n errorSummary_one: 'Revise {{count}} campo antes de guardar',\n errorSummary_other: 'Revise {{count}} campos antes de guardar',\n requiredHint: 'Los campos marcados con * son obligatorios.',\n requiredMarker: '*',\n },\n /**\n * Lo que dice una región cuando no muestra su contenido (ADR 0028): qué\n * pasó, qué hacer, sin culpar a nadie y sin códigos.\n */\n state: {\n retry: 'Reintentar',\n forbidden: 'No tiene permiso para ver {{plural}}.',\n stale: 'Lo que se muestra puede estar desactualizado.',\n noResults: 'No hay {{plural}} que coincidan con estos filtros.',\n clearFilters: 'Limpiar filtros',\n empty: 'Aquí aparecerán sus {{plural}}.',\n saved: 'Se guardó {{object}}.',\n },\n summary: {\n loading: 'Cargando…',\n failed: 'No se pudo cargar {{label}}.',\n },\n pagination: {\n label: 'Páginas',\n summary: 'Página {{current}} de {{total}} · {{items}} registros',\n rows: 'Filas',\n first: 'Primera',\n previous: 'Anterior',\n next: 'Siguiente',\n last: 'Última',\n /** Lo que se anuncia al cambiar de página. */\n page: 'Página {{current}} de {{total}}',\n },\n columns: {\n title: 'Columnas',\n subtitle: 'Visibilidad y orden',\n reset: 'Restablecer',\n moveUp: 'Subir {{column}}',\n moveDown: 'Bajar {{column}}',\n },\n filter: {\n match: 'Coincidir',\n all: 'todos',\n any: 'cualquiera',\n add: 'Añadir filtro',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros filtrables.',\n listPlaceholder: 'valores, separados, por comas',\n matchAria: 'Coincidir todos o cualquiera de los filtros',\n member: 'Miembro del filtro',\n operator: 'Operador del filtro',\n value: 'Valor del filtro',\n rangeEnd: 'Fin del rango del filtro',\n remove: 'Quitar filtro',\n applyAria: 'Aplicar filtros',\n clearAria: 'Limpiar filtros',\n applied: 'Filtros aplicados',\n removeChip: 'Quitar filtro: {{filter}}',\n clearAll: 'Limpiar todo',\n /** Una opción con cuántos registros la tienen: «Borrador (3)». */\n withCount: '{{label}} ({{count}})',\n },\n sort: {\n by: 'Ordenar por',\n then: 'después por',\n ascending: 'ascendente',\n descending: 'descendente',\n add: 'Añadir orden',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros ordenables.',\n member: 'Miembro de orden',\n direction: 'Dirección de orden',\n raisePriority: 'Subir prioridad de orden',\n lowerPriority: 'Bajar prioridad de orden',\n remove: 'Quitar orden',\n applyAria: 'Aplicar orden',\n clearAria: 'Limpiar orden',\n },\n alert: {\n dismiss: 'Descartar',\n },\n quantity: {\n decrease: 'Disminuir {{label}}',\n increase: 'Aumentar {{label}}',\n },\n tabs: {\n close: 'Cerrar {{label}}',\n new: 'Abrir una pestaña nueva',\n list: 'Pestañas del espacio de trabajo',\n withState: '{{label}}, {{state}}',\n dirty: 'cambios sin guardar',\n saving: 'guardando',\n error: 'sin guardar',\n },\n /**\n * El editor de una relación. `search` es la búsqueda rápida y `browse` abre el\n * catálogo completo; ambos botones son iconos, así que sus etiquetas `aria` son\n * lo único que un lector de pantalla anuncia.\n */\n link: {\n search: 'Buscar {{field}}',\n suggestAria: 'Ver sugerencias de {{field}}',\n browseAria: 'Examinar {{field}}',\n browseTitle: 'Seleccionar {{field}}',\n clear: 'Quitar {{field}}',\n empty: '— sin asignar —',\n loading: 'Cargando…',\n noResults: 'Sin coincidencias',\n error: 'No se pudieron cargar las opciones',\n close: 'Cerrar',\n },\n /**\n * La rejilla de detalle: las filas que un registro **posee** — las líneas de\n * un pedido, los renglones de una factura. `errorSummary` es el único\n * `role=\"alert\"` del control: un aviso por celda anunciaría la rejilla entera\n * en cada pulsación, y un mensaje que sólo vive en la celda es inalcanzable\n * cuando la fila que falla está fuera de pantalla.\n */\n detail: {\n addRow: 'Añadir fila',\n removeRow: 'Quitar fila {{row}}',\n rowActions: 'Acciones de fila',\n empty: 'Todavía no hay filas.',\n errorSummary_one: '{{count}} celda con errores',\n errorSummary_other: '{{count}} celdas con errores',\n },\n reference: {\n unresolved: '{{noun}} {{id}}',\n },\n value: {\n none: '— ninguno —',\n yes: 'Sí',\n no: 'No',\n /**\n * Una `composition` en una tabla: sus filas se editan en la pantalla del\n * maestro, no en la celda, así que la celda dice cuántas hay.\n */\n rowCount_one: '{{count}} fila',\n rowCount_other: '{{count}} filas',\n },\n /**\n * `required`…`option` son las reglas derivadas de la metadata. El resto es el\n * vocabulario en el que un Standard Schema de una entidad escribe sus\n * mensajes: el esquema lleva la *clave*, nunca una frase, para que la regla\n * siga siendo traducible.\n *\n * `field` es el único parámetro disponible — un issue de Standard Schema\n * expone un mensaje y una ruta, nada más — así que estos mensajes no indican\n * el límite. Una regla que deba enunciarlo escribe su propia clave en el\n * catálogo de su dominio (`entity:product-specification.validation.codeLength`).\n */\n validation: {\n required: '{{field}} es obligatorio',\n number: '{{field}} debe ser un número',\n date: '{{field}} debe ser una fecha',\n option: '{{field}} no es una opción válida',\n minLength: '{{field}} es demasiado corto',\n maxLength: '{{field}} es demasiado largo',\n min: '{{field}} es demasiado pequeño',\n max: '{{field}} es demasiado grande',\n pattern: '{{field}} tiene un formato inválido',\n minItems_one: '{{field}} necesita al menos {{count}} elemento',\n minItems_other: '{{field}} necesita al menos {{count}} elementos',\n maxItems_one: '{{field}} admite como máximo {{count}} elemento',\n maxItems_other: '{{field}} admite como máximo {{count}} elementos',\n notBefore: '{{field}} no puede ser anterior a {{other}}',\n locale: '{{field}} no tiene texto en {{locale}}',\n },\n /**\n * The filter vocabulary shown to a user. Deliberately distinct from\n * `RSQL_TOKENS` in `@entifix/core` — those are wire tokens (`==`, `=gt=`)\n * and must never be translated.\n */\n operator: {\n eq: 'es',\n ne: 'no es',\n gt: 'mayor que',\n gte: 'mayor o igual',\n lt: 'menor que',\n lte: 'menor o igual',\n in: 'es uno de',\n nin: 'no es ninguno de',\n between: 'entre',\n nbetween: 'fuera de',\n like: 'contiene',\n nlike: 'no contiene',\n isNull: 'está vacío',\n isNotNull: 'no está vacío',\n },\n density: {\n label: 'Densidad',\n comfortable: 'Cómoda',\n compact: 'Compacta',\n },\n theme: {\n label: 'Tema',\n },\n /**\n * Captions for the theme presets shipped by `@entifix/style`, plus the\n * per-app brand sets. They name design-system tokens, not app copy, so they\n * live beside the switcher that renders them and stay reachable from\n * Storybook, where no shell is mounted.\n */\n themes: {\n aurora: 'Aurora',\n sunset: 'Atardecer',\n midnight: 'Medianoche',\n ocean: 'Océano (en runtime)',\n marketplace: 'Marketplace',\n marketplaceDark: 'Marketplace oscuro',\n auth: 'Identidad',\n authDark: 'Identidad oscura',\n },\n confirm: {\n confirm: 'Confirmar',\n cancel: 'Cancelar',\n question: '¿{{verb}} {{object}}?',\n verbCount_one: '{{verb}}',\n verbCount_other: '{{verb}} {{count}}',\n selection_one: '{{count}} {{label}}',\n selection_other: '{{count}} {{plural}}',\n typeToConfirm: 'Escriba {{expected}} para confirmar',\n done: 'Hecho: {{verb}}, {{object}}.',\n undo: 'Deshacer',\n deleteMessage: 'Se elimina de forma definitiva.',\n deleted: 'Se eliminó {{object}}.',\n },\n /** Las actualizaciones en vivo: se dicen al caer y al volver, nada más. */\n live: {\n reconnecting: 'Actualizaciones en vivo en pausa — reconectando',\n stopped: 'Actualizaciones en vivo detenidas',\n reconnect: 'Reconectar',\n resumed: 'Actualizaciones en vivo reanudadas',\n waiting: 'Esperando la conexión…',\n },\n toast: {\n region: 'Notificaciones',\n dismiss: 'Descartar',\n },\n breadcrumbs: {\n label: 'Ruta de navegación',\n },\n /**\n * El asistente. Las etiquetas de cada paso las traduce quien declara el\n * asistente, no el control: un paso es del dominio que lo definió, y su copy\n * vive en `shell:` junto al resto de sus nombres.\n */\n wizard: {\n steps: 'Pasos',\n previous: 'Atrás',\n /**\n * \"Continuar\" y no \"Siguiente\": una tabla dentro de un paso trae su propio\n * paginador, cuyo botón **es** \"Siguiente\". Dos controles con el mismo\n * nombre en la misma pantalla se anuncian igual y hacen cosas distintas.\n */\n next: 'Continuar',\n finish: 'Finalizar',\n /**\n * Un envío que **no** resuelve. El asistente entrega el trabajo y vuelve\n * antes de que la escritura termine, así que dice \"enviando\" y\n * nunca \"guardado\": lo segundo sería una afirmación que el control no puede\n * comprobar.\n */\n submitting: 'Enviando…',\n stepOf: 'Paso {{current}} de {{total}}',\n goToStep: 'Volver a {{label}}',\n /**\n * El estado de cada paso, anunciado además de mostrarse. El color por sí\n * solo no lo dice, y un lector de pantalla recorre la lista sin verlo.\n */\n status: {\n pending: 'pendiente',\n active: 'en curso',\n complete: 'completado',\n error: 'con errores',\n },\n /**\n * El recordatorio al retomar. La persistencia da el \"continuar\" gratis; lo\n * que no da es acordarse de lo ya decidido, que es la falla conocida de los\n * asistentes largos.\n */\n resume: {\n title: 'Retomando donde lo dejaste',\n dismiss: 'Entendido',\n },\n },\n};\n"],"names":["controls","actions","more","forRecord","table","select","new","filters","sorting","loading","selection","selectRow","expandRow","collapseRow","selectAllOnPage","selectAllMatching_one","selectAllMatching_other","selectedCount_one","selectedCount_other","clearSelection","results_one","results_other","noResultsFiltered","caption","captionSorted","bulk","running","succeeded_one","succeeded_other","failed_one","failed_other","retryFailed","dismiss","resultLabel","barLabel","form","details","view","edit","save","saving","delete","deleting","clone","back","pending","errorSummary_one","errorSummary_other","requiredHint","requiredMarker","state","retry","forbidden","stale","noResults","clearFilters","empty","saved","summary","failed","pagination","label","rows","first","previous","next","last","page","columns","title","subtitle","reset","moveUp","moveDown","filter","match","all","any","add","apply","clear","none","listPlaceholder","matchAria","member","operator","value","rangeEnd","remove","applyAria","clearAria","applied","removeChip","clearAll","withCount","sort","by","then","ascending","descending","direction","raisePriority","lowerPriority","alert","quantity","decrease","increase","tabs","close","list","withState","dirty","error","link","search","suggestAria","browseAria","browseTitle","detail","addRow","removeRow","rowActions","reference","unresolved","yes","no","rowCount_one","rowCount_other","validation","required","number","date","option","minLength","maxLength","min","max","pattern","minItems_one","minItems_other","maxItems_one","maxItems_other","notBefore","locale","eq","ne","gt","gte","lt","lte","in","nin","between","nbetween","like","nlike","isNull","isNotNull","density","comfortable","compact","theme","themes","aurora","sunset","midnight","ocean","marketplace","marketplaceDark","auth","authDark","confirm","cancel","question","verbCount_one","verbCount_other","selection_one","selection_other","typeToConfirm","done","undo","deleteMessage","deleted","live","reconnecting","stopped","reconnect","resumed","waiting","toast","region","breadcrumbs","wizard","steps","finish","submitting","stepOf","goToStep","status","active","complete","resume"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,MAAMA,WAAW;IACtBC,SAAS;QACPC,MAAM;QACNC,WAAW;IACb;IACAC,OAAO;QACLC,QAAQ;QACRJ,SAAS;QACTK,KAAK;QACLC,SAAS;QACTC,SAAS;QACTC,SAAS;QACT;;;;KAIC,GACDC,WAAW;QACXC,WAAW;QACXC,WAAW;QACXC,aAAa;QACbC,iBAAiB;QACjB;;;KAGC,GACDC,uBAAuB;QACvBC,yBAAyB;QACzBC,mBAAmB;QACnBC,qBAAqB;QACrBC,gBAAgB;QAChB;;;KAGC,GACDC,aAAa;QACbC,eAAe;QACfC,mBAAmB;QACnB,oEAAoE,GACpEC,SAAS;QACTC,eACE;IACJ;IACA;;;GAGC,GACDC,MAAM;QACJC,SAAS;QACTC,eAAe;QACfC,iBAAiB;QACjBC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,SAAS;QACTC,aAAa;QACbC,UAAU;IACZ;IACAC,MAAM;QACJC,SAAS;QACT9B,KAAK;QACL+B,MAAM;QACNC,MAAM;QACNC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVC,OAAO;QACPC,MAAM;QACNnC,SAAS;QACToC,SAAS;QACT,0EAA0E,GAC1EC,kBAAkB;QAClBC,oBAAoB;QACpBC,cAAc;QACdC,gBAAgB;IAClB;IACA;;;GAGC,GACDC,OAAO;QACLC,OAAO;QACPC,WAAW;QACXC,OAAO;QACPC,WAAW;QACXC,cAAc;QACdC,OAAO;QACPC,OAAO;IACT;IACAC,SAAS;QACPjD,SAAS;QACTkD,QAAQ;IACV;IACAC,YAAY;QACVC,OAAO;QACPH,SAAS;QACTI,MAAM;QACNC,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,MAAM;QACN,4CAA4C,GAC5CC,MAAM;IACR;IACAC,SAAS;QACPC,OAAO;QACPC,UAAU;QACVC,OAAO;QACPC,QAAQ;QACRC,UAAU;I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gBAAgB;QAChBC,cAAc;QACdC,gBAAgB;QAChBC,WAAW;QACXC,QAAQ;IACV;IACA;;;;GAIC,GACD1D,UAAU;QACR2D,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,KAAK;QACLC,IAAI;QACJC,KAAK;QACLC,IAAI;QACJC,KAAK;QACLC,SAAS;QACTC,UAAU;QACVC,MAAM;QACNC,OAAO;QACPC,QAAQ;QACRC,WAAW;IACb;IACAC,SAAS;QACPjG,OAAO;QACPkG,aAAa;QACbC,SAAS;IACX;IACAC,OAAO;QACLpG,OAAO;IACT;IACA;;;;;GAKC,GACDqG,QAAQ;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVC,OAAO;QACPC,aAAa;QACbC,iBAAiB;QACjBC,MAAM;QACNC,UAAU;IACZ;IACAC,SAAS;QACPA,SAAS;QACTC,QAAQ;QACRC,UAAU;QACVC,eAAe;QACfC,iBAAiB;QACjBC,eAAe;QACfC,iBAAiB;QACjBC,eAAe;QACfC,MAAM;QACNC,MAAM;QACNC,eAAe;QACfC,SAAS;IACX;IACA,yEAAyE,GACzEC,MAAM;QACJC,cAAc;QACdC,SAAS;QACTC,WAAW;QACXC,SAAS;QACTC,SAAS;IACX;IACAC,OAAO;QACLC,QAAQ;QACR9J,SAAS;IACX;IACA+J,aAAa;QACXlI,OAAO;IACT;IACA;;;;GAIC,GACDmI,QAAQ;QACNC,OAAO;QACPjI,UAAU;QACV;;;;KAIC,GACDC,MAAM;QACNiI,QAAQ;QACR;;;;;KAKC,GACDC,YAAY;QACZC,QAAQ;QACRC,UAAU;QACV;;;KAGC,GACDC,QAAQ;YACNzJ,SAAS;YACT0J,QAAQ;YACRC,UAAU;YACVxF,OAAO;QACT;QACA;;;;KAIC,GACDyF,QAAQ;YACNpI,OAAO;YACPrC,SAAS;QACX;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/i18n/catalog/es.ts"],"sourcesContent":["/**\n * Copy owned by `@entifix/react-controls` — the agnostic entity UI. It lives\n * here rather than next to the components because the typed-key augmentation has\n * to see every namespace from one module, and `@entifix/tooling` (T0) may not\n * import a T3 package.\n */\nexport const controls = {\n actions: {\n more: 'Más acciones',\n forRecord: 'Acciones para {{record}}',\n },\n table: {\n select: 'Seleccionar',\n actions: 'Acciones',\n new: 'Nuevo',\n filters: 'Filtros',\n sorting: 'Orden',\n loading: 'Cargando…',\n /**\n * La columna de selección. `selectRow` nombra la fila porque una casilla\n * sin etiqueta visible sólo se anuncia por su `aria-label`, y repetir el\n * encabezado en cada fila no diría cuál es.\n */\n selection: 'Selección',\n selectRow: 'Seleccionar {{record}}',\n expandRow: 'Expandir {{record}}',\n collapseRow: 'Contraer {{record}}',\n selectAllOnPage: 'Seleccionar todo en esta página',\n /**\n * La segunda selección — la que el servidor evalúa — lleva el número\n * siempre: es la diferencia entre actuar sobre 25 filas y sobre 3.200.\n */\n selectAllMatching_one: 'Seleccionar {{count}} coincidencia',\n selectAllMatching_other: 'Seleccionar las {{count}} coincidencias',\n selectedCount_one: '{{count}} seleccionado',\n selectedCount_other: '{{count}} seleccionados',\n clearSelection: 'Limpiar selección',\n /**\n * Lo que dice la región de estado tras filtrar, ordenar o cambiar de\n * página — nunca en la primera carga, que el lector pidió al llegar.\n */\n results_one: '{{count}} resultado',\n results_other: '{{count}} resultados',\n noResultsFiltered: 'Sin resultados para estos filtros',\n /** El `caption` de la tabla: qué contiene, cuántos y en qué orden. */\n caption: '{{entity}} · {{results}}',\n captionSorted:\n '{{entity}} · {{results}} · ordenado por {{column}}, {{direction}}',\n },\n /**\n * Una acción sobre una selección. El resultado es por fila, nunca un aviso\n * único: 40 seleccionadas y 3 fallidas no es ni un éxito ni un error.\n */\n bulk: {\n running: 'Ejecutando…',\n succeeded_one: '{{count}} registro actualizado',\n succeeded_other: '{{count}} registros actualizados',\n failed_one: '{{count}} registro falló',\n failed_other: '{{count}} registros fallaron',\n retryFailed: 'Reintentar los fallidos',\n dismiss: 'Cerrar resultado',\n resultLabel: 'Resultado de la acción masiva',\n barLabel: 'Acciones sobre la selección',\n },\n form: {\n details: 'Detalles',\n new: 'Nuevo',\n view: 'Ver',\n edit: 'Editar',\n save: 'Guardar',\n saving: 'Guardando…',\n delete: 'Eliminar',\n deleting: 'Eliminando…',\n clone: 'Duplicar',\n back: 'Volver',\n loading: 'Cargando…',\n pending: 'Esperando al servidor…',\n /** El resumen de un guardado rechazado: toma el foco, enlaza cada campo. */\n errorSummary_one: 'Revise {{count}} campo antes de guardar',\n errorSummary_other: 'Revise {{count}} campos antes de guardar',\n requiredHint: 'Los campos marcados con * son obligatorios.',\n requiredMarker: '*',\n },\n /**\n * Lo que dice una región cuando no muestra su contenido (ADR 0028): qué\n * pasó, qué hacer, sin culpar a nadie y sin códigos.\n */\n state: {\n retry: 'Reintentar',\n forbidden: 'No tiene permiso para ver {{plural}}.',\n stale: 'Lo que se muestra puede estar desactualizado.',\n noResults: 'No hay {{plural}} que coincidan con estos filtros.',\n clearFilters: 'Limpiar filtros',\n empty: 'Aquí aparecerán sus {{plural}}.',\n saved: 'Se guardó {{object}}.',\n },\n summary: {\n loading: 'Cargando…',\n failed: 'No se pudo cargar {{label}}.',\n empty: 'Nada por ahora.',\n },\n pagination: {\n label: 'Páginas',\n summary: 'Página {{current}} de {{total}} · {{items}} registros',\n rows: 'Filas',\n first: 'Primera',\n previous: 'Anterior',\n next: 'Siguiente',\n last: 'Última',\n /** Lo que se anuncia al cambiar de página. */\n page: 'Página {{current}} de {{total}}',\n },\n columns: {\n title: 'Columnas',\n subtitle: 'Visibilidad y orden',\n reset: 'Restablecer',\n moveUp: 'Subir {{column}}',\n moveDown: 'Bajar {{column}}',\n },\n filter: {\n match: 'Coincidir',\n all: 'todos',\n any: 'cualquiera',\n add: 'Añadir filtro',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros filtrables.',\n listPlaceholder: 'valores, separados, por comas',\n matchAria: 'Coincidir todos o cualquiera de los filtros',\n member: 'Miembro del filtro',\n operator: 'Operador del filtro',\n value: 'Valor del filtro',\n rangeEnd: 'Fin del rango del filtro',\n remove: 'Quitar filtro',\n applyAria: 'Aplicar filtros',\n clearAria: 'Limpiar filtros',\n applied: 'Filtros aplicados',\n removeChip: 'Quitar filtro: {{filter}}',\n clearAll: 'Limpiar todo',\n /** Una opción con cuántos registros la tienen: «Borrador (3)». */\n withCount: '{{label}} ({{count}})',\n },\n sort: {\n by: 'Ordenar por',\n then: 'después por',\n ascending: 'ascendente',\n descending: 'descendente',\n add: 'Añadir orden',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros ordenables.',\n member: 'Miembro de orden',\n direction: 'Dirección de orden',\n raisePriority: 'Subir prioridad de orden',\n lowerPriority: 'Bajar prioridad de orden',\n remove: 'Quitar orden',\n applyAria: 'Aplicar orden',\n clearAria: 'Limpiar orden',\n },\n alert: {\n dismiss: 'Descartar',\n },\n quantity: {\n decrease: 'Disminuir {{label}}',\n increase: 'Aumentar {{label}}',\n },\n tabs: {\n close: 'Cerrar {{label}}',\n new: 'Abrir una pestaña nueva',\n list: 'Pestañas del espacio de trabajo',\n withState: '{{label}}, {{state}}',\n dirty: 'cambios sin guardar',\n saving: 'guardando',\n error: 'sin guardar',\n },\n /**\n * El editor de una relación. `search` es la búsqueda rápida y `browse` abre el\n * catálogo completo; ambos botones son iconos, así que sus etiquetas `aria` son\n * lo único que un lector de pantalla anuncia.\n */\n link: {\n search: 'Buscar {{field}}',\n suggestAria: 'Ver sugerencias de {{field}}',\n browseAria: 'Examinar {{field}}',\n browseTitle: 'Seleccionar {{field}}',\n clear: 'Quitar {{field}}',\n empty: '— sin asignar —',\n loading: 'Cargando…',\n noResults: 'Sin coincidencias',\n error: 'No se pudieron cargar las opciones',\n close: 'Cerrar',\n },\n /**\n * La rejilla de detalle: las filas que un registro **posee** — las líneas de\n * un pedido, los renglones de una factura. `errorSummary` es el único\n * `role=\"alert\"` del control: un aviso por celda anunciaría la rejilla entera\n * en cada pulsación, y un mensaje que sólo vive en la celda es inalcanzable\n * cuando la fila que falla está fuera de pantalla.\n */\n detail: {\n addRow: 'Añadir fila',\n removeRow: 'Quitar fila {{row}}',\n rowActions: 'Acciones de fila',\n empty: 'Todavía no hay filas.',\n errorSummary_one: '{{count}} celda con errores',\n errorSummary_other: '{{count}} celdas con errores',\n },\n reference: {\n unresolved: '{{noun}} {{id}}',\n },\n value: {\n none: '— ninguno —',\n yes: 'Sí',\n no: 'No',\n /**\n * Una `composition` en una tabla: sus filas se editan en la pantalla del\n * maestro, no en la celda, así que la celda dice cuántas hay.\n */\n rowCount_one: '{{count}} fila',\n rowCount_other: '{{count}} filas',\n },\n /**\n * `required`…`option` son las reglas derivadas de la metadata. El resto es el\n * vocabulario en el que un Standard Schema de una entidad escribe sus\n * mensajes: el esquema lleva la *clave*, nunca una frase, para que la regla\n * siga siendo traducible.\n *\n * `field` es el único parámetro disponible — un issue de Standard Schema\n * expone un mensaje y una ruta, nada más — así que estos mensajes no indican\n * el límite. Una regla que deba enunciarlo escribe su propia clave en el\n * catálogo de su dominio (`entity:product-specification.validation.codeLength`).\n */\n validation: {\n required: '{{field}} es obligatorio',\n number: '{{field}} debe ser un número',\n date: '{{field}} debe ser una fecha',\n option: '{{field}} no es una opción válida',\n minLength: '{{field}} es demasiado corto',\n maxLength: '{{field}} es demasiado largo',\n min: '{{field}} es demasiado pequeño',\n max: '{{field}} es demasiado grande',\n pattern: '{{field}} tiene un formato inválido',\n minItems_one: '{{field}} necesita al menos {{count}} elemento',\n minItems_other: '{{field}} necesita al menos {{count}} elementos',\n maxItems_one: '{{field}} admite como máximo {{count}} elemento',\n maxItems_other: '{{field}} admite como máximo {{count}} elementos',\n notBefore: '{{field}} no puede ser anterior a {{other}}',\n locale: '{{field}} no tiene texto en {{locale}}',\n },\n /**\n * The filter vocabulary shown to a user. Deliberately distinct from\n * `RSQL_TOKENS` in `@entifix/core` — those are wire tokens (`==`, `=gt=`)\n * and must never be translated.\n */\n operator: {\n eq: 'es',\n ne: 'no es',\n gt: 'mayor que',\n gte: 'mayor o igual',\n lt: 'menor que',\n lte: 'menor o igual',\n in: 'es uno de',\n nin: 'no es ninguno de',\n between: 'entre',\n nbetween: 'fuera de',\n like: 'contiene',\n nlike: 'no contiene',\n isNull: 'está vacío',\n isNotNull: 'no está vacío',\n },\n density: {\n label: 'Densidad',\n comfortable: 'Cómoda',\n compact: 'Compacta',\n },\n theme: {\n label: 'Tema',\n },\n /**\n * Captions for the theme presets shipped by `@entifix/style`, plus the\n * per-app brand sets. They name design-system tokens, not app copy, so they\n * live beside the switcher that renders them and stay reachable from\n * Storybook, where no shell is mounted.\n */\n themes: {\n aurora: 'Aurora',\n sunset: 'Atardecer',\n midnight: 'Medianoche',\n ocean: 'Océano (en runtime)',\n marketplace: 'Marketplace',\n marketplaceDark: 'Marketplace oscuro',\n auth: 'Identidad',\n authDark: 'Identidad oscura',\n },\n confirm: {\n confirm: 'Confirmar',\n cancel: 'Cancelar',\n question: '¿{{verb}} {{object}}?',\n verbCount_one: '{{verb}}',\n verbCount_other: '{{verb}} {{count}}',\n selection_one: '{{count}} {{label}}',\n selection_other: '{{count}} {{plural}}',\n typeToConfirm: 'Escriba {{expected}} para confirmar',\n done: 'Hecho: {{verb}}, {{object}}.',\n undo: 'Deshacer',\n deleteMessage: 'Se elimina de forma definitiva.',\n deleted: 'Se eliminó {{object}}.',\n },\n /** Las actualizaciones en vivo: se dicen al caer y al volver, nada más. */\n live: {\n reconnecting: 'Actualizaciones en vivo en pausa — reconectando',\n stopped: 'Actualizaciones en vivo detenidas',\n reconnect: 'Reconectar',\n resumed: 'Actualizaciones en vivo reanudadas',\n waiting: 'Esperando la conexión…',\n },\n toast: {\n region: 'Notificaciones',\n dismiss: 'Descartar',\n },\n breadcrumbs: {\n label: 'Ruta de navegación',\n },\n /**\n * El asistente. Las etiquetas de cada paso las traduce quien declara el\n * asistente, no el control: un paso es del dominio que lo definió, y su copy\n * vive en `shell:` junto al resto de sus nombres.\n */\n wizard: {\n steps: 'Pasos',\n previous: 'Atrás',\n /**\n * \"Continuar\" y no \"Siguiente\": una tabla dentro de un paso trae su propio\n * paginador, cuyo botón **es** \"Siguiente\". Dos controles con el mismo\n * nombre en la misma pantalla se anuncian igual y hacen cosas distintas.\n */\n next: 'Continuar',\n finish: 'Finalizar',\n /**\n * Un envío que **no** resuelve. El asistente entrega el trabajo y vuelve\n * antes de que la escritura termine, así que dice \"enviando\" y\n * nunca \"guardado\": lo segundo sería una afirmación que el control no puede\n * comprobar.\n */\n submitting: 'Enviando…',\n stepOf: 'Paso {{current}} de {{total}}',\n goToStep: 'Volver a {{label}}',\n /**\n * El estado de cada paso, anunciado además de mostrarse. El color por sí\n * solo no lo dice, y un lector de pantalla recorre la lista sin verlo.\n */\n status: {\n pending: 'pendiente',\n active: 'en curso',\n complete: 'completado',\n error: 'con errores',\n },\n /**\n * El recordatorio al retomar. La persistencia da el \"continuar\" gratis; lo\n * que no da es acordarse de lo ya decidido, que es la falla conocida de los\n * asistentes largos.\n */\n resume: {\n title: 'Retomando donde lo dejaste',\n dismiss: 'Entendido',\n },\n },\n};\n"],"names":["controls","actions","more","forRecord","table","select","new","filters","sorting","loading","selection","selectRow","expandRow","collapseRow","selectAllOnPage","selectAllMatching_one","selectAllMatching_other","selectedCount_one","selectedCount_other","clearSelection","results_one","results_other","noResultsFiltered","caption","captionSorted","bulk","running","succeeded_one","succeeded_other","failed_one","failed_other","retryFailed","dismiss","resultLabel","barLabel","form","details","view","edit","save","saving","delete","deleting","clone","back","pending","errorSummary_one","errorSummary_other","requiredHint","requiredMarker","state","retry","forbidden","stale","noResults","clearFilters","empty","saved","summary","failed","pagination","label","rows","first","previous","next","last","page","columns","title","subtitle","reset","moveUp","moveDown","filter","match","all","any","add","apply","clear","none","listPlaceholder","matchAria","member","operator","value","rangeEnd","remove","applyAria","clearAria","applied","removeChip","clearAll","withCount","sort","by","then","ascending","descending","direction","raisePriority","lowerPriority","alert","quantity","decrease","increase","tabs","close","list","withState","dirty","error","link","search","suggestAria","browseAria","browseTitle","detail","addRow","removeRow","rowActions","reference","unresolved","yes","no","rowCount_one","rowCount_other","validation","required","number","date","option","minLength","maxLength","min","max","pattern","minItems_one","minItems_other","maxItems_one","maxItems_other","notBefore","locale","eq","ne","gt","gte","lt","lte","in","nin","between","nbetween","like","nlike","isNull","isNotNull","density","comfortable","compact","theme","themes","aurora","sunset","midnight","ocean","marketplace","marketplaceDark","auth","authDark","confirm","cancel","question","verbCount_one","verbCount_other","selection_one","selection_other","typeToConfirm","done","undo","deleteMessage","deleted","live","reconnecting","stopped","reconnect","resumed","waiting","toast","region","breadcrumbs","wizard","steps","finish","submitting","stepOf","goToStep","status","active","complete","resume"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,MAAMA,WAAW;IACtBC,SAAS;QACPC,MAAM;QACNC,WAAW;IACb;IACAC,OAAO;QACLC,QAAQ;QACRJ,SAAS;QACTK,KAAK;QACLC,SAAS;QACTC,SAAS;QACTC,SAAS;QACT;;;;KAIC,GACDC,WAAW;QACXC,WAAW;QACXC,WAAW;QACXC,aAAa;QACbC,iBAAiB;QACjB;;;KAGC,GACDC,uBAAuB;QACvBC,yBAAyB;QACzBC,mBAAmB;QACnBC,qBAAqB;QACrBC,gBAAgB;QAChB;;;KAGC,GACDC,aAAa;QACbC,eAAe;QACfC,mBAAmB;QACnB,oEAAoE,GACpEC,SAAS;QACTC,eACE;IACJ;IACA;;;GAGC,GACDC,MAAM;QACJC,SAAS;QACTC,eAAe;QACfC,iBAAiB;QACjBC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,SAAS;QACTC,aAAa;QACbC,UAAU;IACZ;IACAC,MAAM;QACJC,SAAS;QACT9B,KAAK;QACL+B,MAAM;QACNC,MAAM;QACNC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVC,OAAO;QACPC,MAAM;QACNnC,SAAS;QACToC,SAAS;QACT,0EAA0E,GAC1EC,kBAAkB;QAClBC,oBAAoB;Q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IACT;IACA;;;;GAIC,GACDmI,QAAQ;QACNC,OAAO;QACPjI,UAAU;QACV;;;;KAIC,GACDC,MAAM;QACNiI,QAAQ;QACR;;;;;KAKC,GACDC,YAAY;QACZC,QAAQ;QACRC,UAAU;QACV;;;KAGC,GACDC,QAAQ;YACNzJ,SAAS;YACT0J,QAAQ;YACRC,UAAU;YACVxF,OAAO;QACT;QACA;;;;KAIC,GACDyF,QAAQ;YACNpI,OAAO;YACPrC,SAAS;QACX;IACF;AACF,EAAE"}
@@ -78,6 +78,7 @@ export declare const controlsCatalogs: {
78
78
  summary: {
79
79
  loading: string;
80
80
  failed: string;
81
+ empty: string;
81
82
  };
82
83
  pagination: {
83
84
  label: string;
@@ -351,6 +352,7 @@ export declare const controlsCatalogs: {
351
352
  summary: {
352
353
  loading: string;
353
354
  failed: string;
355
+ empty: string;
354
356
  };
355
357
  pagination: {
356
358
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"version":3,"sources":["../../src/i18next/index.tsx"],"sourcesContent":["'use client';\n\nimport { type Locale, makeFormatters } from '@entifix/core';\nimport { createI18n, sharedFallbackI18n } from '@entifix/i18n';\nimport type { i18n as I18nInstance } from 'i18next';\nimport { type PropsWithChildren, useMemo } from 'react';\nimport { I18nextProvider, initReactI18next } from 'react-i18next';\n\nimport { type Translator, TranslatorProvider } from '../i18n/i18n-context.js';\n\n/**\n * The i18next binding of the translator port.\n *\n * Behind a subpath, with `i18next`, `react-i18next` and `@entifix/i18n` as\n * optional peers, so the controls themselves stay adoptable without any of it.\n * Package-level dependencies are not per-subpath — the optional peers are what\n * does the work, the same arrangement as `@entifix/mongo/transactions`.\n */\nconst translatorFor = (instance: I18nInstance, locale: Locale): Translator => ({\n locale,\n formatters: makeFormatters(locale),\n // `Translator.t` takes a plain string, because the port has to be\n // implementable without i18next at all. i18next's own `Namespace` is whatever\n // union the host declared, and it is not this adapter's job to know it — the\n // key stays checked at the `useT('shell')` call site, where the augmentation\n // is in scope.\n t: (ns, key, params) => {\n const fixed = instance.getFixedT(\n locale,\n (ns ?? null) as Parameters<I18nInstance['getFixedT']>[1],\n ) as (key: string, params?: Record<string, unknown>) => string;\n return fixed(key, params);\n },\n});\n\nexport interface I18nProviderProps extends PropsWithChildren {\n /** Negotiated upstream — by the Next middleware in an app, by a decorator in Storybook. */\n locale: Locale;\n}\n\n/**\n * Binds one locale to the subtree. A fresh i18next instance per locale keeps\n * concurrent server renders from sharing mutable `lng` state; `I18nextProvider`\n * carries it so any nested `useTranslation` resolves against the same catalogs.\n */\nexport function I18nProvider({ locale, children }: I18nProviderProps) {\n const instance = useMemo(\n () => createI18n(locale, [initReactI18next]),\n [locale],\n );\n const translator = useMemo(\n () => translatorFor(instance, locale),\n [instance, locale],\n );\n\n return (\n <TranslatorProvider translator={translator}>\n <I18nextProvider i18n={instance}>{children}</I18nextProvider>\n </TranslatorProvider>\n );\n}\n\n/**\n * A translator over the shared fallback instance, for a caller that has\n * catalogs installed but no provider in the tree — a spec, a Storybook\n * decorator that renders one control.\n */\nexport function fallbackI18nextTranslator(locale: Locale): Translator {\n return translatorFor(sharedFallbackI18n([initReactI18next]), locale);\n}\n"],"names":["makeFormatters","createI18n","sharedFallbackI18n","useMemo","I18nextProvider","initReactI18next","TranslatorProvider","translatorFor","instance","locale","formatters","t","ns","key","params","fixed","getFixedT","I18nProvider","children","translator","i18n","fallbackI18nextTranslator"],"mappings":"AAAA;;AAEA,SAAsBA,cAAc,QAAQ,gBAAgB;AAC5D,SAASC,UAAU,EAAEC,kBAAkB,QAAQ,gBAAgB;AAE/D,SAAiCC,OAAO,QAAQ,QAAQ;AACxD,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,gBAAgB;AAElE,SAA0BC,kBAAkB,QAAQ,0BAA0B;AAE9E;;;;;;;CAOC,GACD,MAAMC,gBAAgB,CAACC,UAAwBC,SAAgC,CAAA;QAC7EA;QACAC,YAAYV,eAAeS;QAC3B,kEAAkE;QAClE,8EAA8E;QAC9E,6EAA6E;QAC7E,6EAA6E;QAC7E,eAAe;QACfE,GAAG,CAACC,IAAIC,KAAKC;YACX,MAAMC,QAAQP,SAASQ,SAAS,CAC9BP,QACCG,aAAAA,KAAM;YAET,OAAOG,MAAMF,KAAKC;QACpB;IACF,CAAA;AAOA;;;;CAIC,GACD,OAAO,SAASG,aAAa,EAAER,MAAM,EAAES,QAAQ,EAAqB;IAClE,MAAMV,WAAWL,QACf,IAAMF,WAAWQ,QAAQ;YAACJ;SAAiB,GAC3C;QAACI;KAAO;IAEV,MAAMU,aAAahB,QACjB,IAAMI,cAAcC,UAAUC,SAC9B;QAACD;QAAUC;KAAO;IAGpB,qBACE,KAACH;QAAmBa,YAAYA;kBAC9B,cAAA,KAACf;YAAgBgB,MAAMZ;sBAAWU;;;AAGxC;AAEA;;;;CAIC,GACD,OAAO,SAASG,0BAA0BZ,MAAc;IACtD,OAAOF,cAAcL,mBAAmB;QAACG;KAAiB,GAAGI;AAC/D"}
1
+ {"version":3,"sources":["../../src/i18next/index.tsx"],"sourcesContent":["'use client';\n\nimport { type Locale, makeFormatters } from '@entifix/core';\nimport { createI18n, sharedFallbackI18n } from '@entifix/i18n';\nimport type { i18n as I18nInstance } from 'i18next';\nimport { type PropsWithChildren, useMemo } from 'react';\nimport { I18nextProvider, initReactI18next } from 'react-i18next';\n\nimport { type Translator, TranslatorProvider } from '../i18n/i18n-context.js';\n\n/**\n * The i18next binding of the translator port.\n *\n * Behind a subpath, with `i18next`, `react-i18next` and `@entifix/i18n` as\n * optional peers, so the controls themselves stay adoptable without any of it.\n * Package-level dependencies are not per-subpath — the optional peers are what\n * does the work, the same arrangement as `@entifix/mongo/transactions`.\n */\nconst translatorFor = (instance: I18nInstance, locale: Locale): Translator => ({\n locale,\n formatters: makeFormatters(locale),\n // `Translator.t` takes a plain string, because the port has to be\n // implementable without i18next at all. i18next's own `Namespace` is whatever\n // union the host declared, and it is not this adapter's job to know it — the\n // key stays checked at the `useT('shell')` call site, where the augmentation\n // is in scope.\n t: (ns, key, params) => {\n const fixed = instance.getFixedT(\n locale,\n (ns ?? null) as Parameters<I18nInstance['getFixedT']>[1],\n ) as unknown as (key: string, params?: Record<string, unknown>) => string;\n return fixed(key, params);\n },\n});\n\nexport interface I18nProviderProps extends PropsWithChildren {\n /** Negotiated upstream — by the Next middleware in an app, by a decorator in Storybook. */\n locale: Locale;\n}\n\n/**\n * Binds one locale to the subtree. A fresh i18next instance per locale keeps\n * concurrent server renders from sharing mutable `lng` state; `I18nextProvider`\n * carries it so any nested `useTranslation` resolves against the same catalogs.\n */\nexport function I18nProvider({ locale, children }: I18nProviderProps) {\n const instance = useMemo(\n () => createI18n(locale, [initReactI18next]),\n [locale],\n );\n const translator = useMemo(\n () => translatorFor(instance, locale),\n [instance, locale],\n );\n\n return (\n <TranslatorProvider translator={translator}>\n <I18nextProvider i18n={instance}>{children}</I18nextProvider>\n </TranslatorProvider>\n );\n}\n\n/**\n * A translator over the shared fallback instance, for a caller that has\n * catalogs installed but no provider in the tree — a spec, a Storybook\n * decorator that renders one control.\n */\nexport function fallbackI18nextTranslator(locale: Locale): Translator {\n return translatorFor(sharedFallbackI18n([initReactI18next]), locale);\n}\n"],"names":["makeFormatters","createI18n","sharedFallbackI18n","useMemo","I18nextProvider","initReactI18next","TranslatorProvider","translatorFor","instance","locale","formatters","t","ns","key","params","fixed","getFixedT","I18nProvider","children","translator","i18n","fallbackI18nextTranslator"],"mappings":"AAAA;;AAEA,SAAsBA,cAAc,QAAQ,gBAAgB;AAC5D,SAASC,UAAU,EAAEC,kBAAkB,QAAQ,gBAAgB;AAE/D,SAAiCC,OAAO,QAAQ,QAAQ;AACxD,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,gBAAgB;AAElE,SAA0BC,kBAAkB,QAAQ,0BAA0B;AAE9E;;;;;;;CAOC,GACD,MAAMC,gBAAgB,CAACC,UAAwBC,SAAgC,CAAA;QAC7EA;QACAC,YAAYV,eAAeS;QAC3B,kEAAkE;QAClE,8EAA8E;QAC9E,6EAA6E;QAC7E,6EAA6E;QAC7E,eAAe;QACfE,GAAG,CAACC,IAAIC,KAAKC;YACX,MAAMC,QAAQP,SAASQ,SAAS,CAC9BP,QACCG,aAAAA,KAAM;YAET,OAAOG,MAAMF,KAAKC;QACpB;IACF,CAAA;AAOA;;;;CAIC,GACD,OAAO,SAASG,aAAa,EAAER,MAAM,EAAES,QAAQ,EAAqB;IAClE,MAAMV,WAAWL,QACf,IAAMF,WAAWQ,QAAQ;YAACJ;SAAiB,GAC3C;QAACI;KAAO;IAEV,MAAMU,aAAahB,QACjB,IAAMI,cAAcC,UAAUC,SAC9B;QAACD;QAAUC;KAAO;IAGpB,qBACE,KAACH;QAAmBa,YAAYA;kBAC9B,cAAA,KAACf;YAAgBgB,MAAMZ;sBAAWU;;;AAGxC;AAEA;;;;CAIC,GACD,OAAO,SAASG,0BAA0BZ,MAAc;IACtD,OAAOF,cAAcL,mBAAmB;QAACG;KAAiB,GAAGI;AAC/D"}
@@ -14,6 +14,14 @@ export interface SummaryTileStatus {
14
14
  /** The words for it; the tone never stands alone. */
15
15
  readonly label: string;
16
16
  }
17
+ /** One record a list tile leads to — "Pedido 1042", and when it was placed. */
18
+ export interface SummaryTileItem {
19
+ readonly href: string;
20
+ /** What the record is called; the link's name. */
21
+ readonly label: string;
22
+ /** A muted detail after it — a date, an amount, a status in words. */
23
+ readonly meta?: ReactNode;
24
+ }
17
25
  export interface SummaryTileProps {
18
26
  /** What is counted — "Envíos por despachar". The tile's heading. */
19
27
  label: string;
@@ -23,6 +31,15 @@ export interface SummaryTileProps {
23
31
  count?: number;
24
32
  /** An amount instead of a count — "Próximo pago". */
25
33
  money?: SummaryTileMoney;
34
+ /**
35
+ * A short list instead of a figure — "Últimos pedidos". The heading links
36
+ * to all of them and each item to its own record, so the tile is not one
37
+ * link. Ignored when {@link money} is given; takes precedence over
38
+ * {@link count}.
39
+ */
40
+ items?: readonly SummaryTileItem[];
41
+ /** What an empty list says. A neutral "nothing yet" when omitted. */
42
+ emptyLabel?: string;
26
43
  /** The figure's meaning as a tag beside it. */
27
44
  status?: SummaryTileStatus;
28
45
  /** Its own source's state: one tile failing leaves every other one standing. */
@@ -50,7 +67,7 @@ export interface SummaryTileProps {
50
67
  * Nothing is announced live: the figure is read once, when the reader
51
68
  * reaches it.
52
69
  */
53
- export declare function SummaryTile({ label, href, count, money, status, state, onRetry, renderLink, className, }: SummaryTileProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
70
+ export declare function SummaryTile({ label, href, count, money, items, emptyLabel, status, state, onRetry, renderLink, className, }: SummaryTileProps): import("react").JSX.Element;
54
71
  export type SummaryTileListProps = Omit<ClusterProps, 'as' | 'role' | 'align'>;
55
72
  /** Tiles side by side, wrapping as the width runs out; a list, so its size is read out. */
56
73
  export declare function SummaryTileList({ children, ...props }: SummaryTileListProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"summary-tile.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/summary-tile/summary-tile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjE,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG3E,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;CAC1B;AAED,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gFAAgF;IAChF,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,QA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12,7 +12,9 @@ import { StatusTag } from '../../atoms/status-tag/index.js';
12
12
  import { Cluster } from '../../layout/cluster/index.js';
13
13
  import { cn } from '../../utils/cn.js';
14
14
  const SURFACE = 'flex min-h-(--target-min) flex-col gap-2xs rounded-xl border border-border bg-surface-elevated p-s text-content';
15
- const LINK = 'block rounded-xl text-content no-underline focus-ring hover:shadow-overlay';
15
+ const LINK = 'rounded-xl text-content no-underline focus-ring hover:shadow-overlay';
16
+ const HEADING_LINK = 'focus-ring rounded-sm text-content hover:underline';
17
+ const ITEM_LINK = `inline-flex min-h-(--target-min) items-center ${HEADING_LINK}`;
16
18
  /**
17
19
  * One figure that leads somewhere: a heading, a count or an amount, and a
18
20
  * status in words. The whole tile is one link to the records it counts, named
@@ -21,26 +23,27 @@ const LINK = 'block rounded-xl text-content no-underline focus-ring hover:shadow
21
23
  * figures ([ADR 0028](../../../../../../../docs/adr/0028-states-an-organism-must-render.md)).
22
24
  * Nothing is announced live: the figure is read once, when the reader
23
25
  * reaches it.
24
- */ export function SummaryTile({ label, href, count, money, status, state, onRetry, renderLink, className }) {
26
+ */ export function SummaryTile({ label, href, count, money, items, emptyLabel, status, state, onRetry, renderLink, className }) {
25
27
  const t = useT();
26
28
  const formatters = useFormatters();
27
29
  const locale = useLocale();
28
- const link = (content, linkClass)=>renderLink === undefined ? /*#__PURE__*/ _jsx("a", {
29
- href: href,
30
+ const linkTo = (to, content, linkClass)=>renderLink === undefined ? /*#__PURE__*/ _jsx("a", {
31
+ href: to,
30
32
  className: linkClass,
31
33
  children: content
32
34
  }) : renderLink({
33
- href,
35
+ href: to,
34
36
  className: linkClass,
35
37
  children: content
36
38
  });
39
+ const link = (content, linkClass)=>linkTo(href, content, linkClass);
37
40
  if (state === 'failed') {
38
41
  return /*#__PURE__*/ _jsxs("article", {
39
42
  className: cn(SURFACE, className),
40
43
  children: [
41
44
  /*#__PURE__*/ _jsx("h3", {
42
45
  className: "text-step-sm font-semibold",
43
- children: link(label, 'focus-ring rounded-sm text-content hover:underline')
46
+ children: link(label, HEADING_LINK)
44
47
  }),
45
48
  /*#__PURE__*/ _jsx(Alert, {
46
49
  tone: "danger",
@@ -58,6 +61,56 @@ const LINK = 'block rounded-xl text-content no-underline focus-ring hover:shadow
58
61
  ]
59
62
  });
60
63
  }
64
+ // A list tile holds a link per record, and links cannot nest: its heading
65
+ // is the link to all of them rather than the whole tile.
66
+ if (items !== undefined && money === undefined) {
67
+ return /*#__PURE__*/ _jsxs("article", {
68
+ className: cn(SURFACE, className),
69
+ children: [
70
+ /*#__PURE__*/ _jsx("h3", {
71
+ className: "text-step-sm font-semibold",
72
+ children: link(label, HEADING_LINK)
73
+ }),
74
+ state === 'loading' ? /*#__PURE__*/ _jsxs(_Fragment, {
75
+ children: [
76
+ /*#__PURE__*/ _jsx(Skeleton, {
77
+ shape: "line",
78
+ className: "w-full"
79
+ }),
80
+ /*#__PURE__*/ _jsx(Skeleton, {
81
+ shape: "line",
82
+ className: "w-3/4"
83
+ }),
84
+ /*#__PURE__*/ _jsx("span", {
85
+ className: "sr-only",
86
+ children: t('summary.loading')
87
+ })
88
+ ]
89
+ }) : items.length === 0 ? /*#__PURE__*/ _jsx("p", {
90
+ className: "m-0 text-step-sm text-content-muted",
91
+ children: emptyLabel != null ? emptyLabel : t('summary.empty')
92
+ }) : /*#__PURE__*/ _jsx("ul", {
93
+ role: "list",
94
+ className: "m-0 p-0 flex list-none flex-col gap-2xs",
95
+ children: items.map((item)=>/*#__PURE__*/ _jsxs("li", {
96
+ className: "flex flex-wrap items-baseline justify-between gap-x-s",
97
+ children: [
98
+ linkTo(item.href, item.label, ITEM_LINK),
99
+ item.meta !== undefined && /*#__PURE__*/ _jsx("span", {
100
+ className: "text-step-sm text-content-muted tabular-nums",
101
+ children: item.meta
102
+ })
103
+ ]
104
+ }, item.href))
105
+ }),
106
+ state === 'ready' && status !== undefined && /*#__PURE__*/ _jsx(StatusTag, {
107
+ tone: status.tone,
108
+ className: "self-start",
109
+ children: status.label
110
+ })
111
+ ]
112
+ });
113
+ }
61
114
  const figure = state === 'loading' ? /*#__PURE__*/ _jsxs(_Fragment, {
62
115
  children: [
63
116
  /*#__PURE__*/ _jsx(Skeleton, {
@@ -75,24 +128,30 @@ const LINK = 'block rounded-xl text-content no-underline focus-ring hover:shadow
75
128
  unit: money.unit,
76
129
  locale: locale
77
130
  }) : formatters.number(count != null ? count : 0);
78
- return link(/*#__PURE__*/ _jsxs("article", {
79
- className: cn(SURFACE, className),
80
- children: [
81
- /*#__PURE__*/ _jsx("h3", {
82
- className: "text-step-sm font-semibold",
83
- children: label
84
- }),
85
- /*#__PURE__*/ _jsx("div", {
86
- className: "text-step-2 font-semibold tabular-nums",
87
- children: figure
88
- }),
89
- state === 'ready' && status !== undefined && /*#__PURE__*/ _jsx(StatusTag, {
90
- tone: status.tone,
91
- className: "self-start",
92
- children: status.label
93
- })
94
- ]
95
- }), LINK);
131
+ // The link sits inside the article, never around it: an article does not
132
+ // take its name from its content, so a link wrapping one reads as nameless
133
+ // to a spec-following tree and to every query by role. Inside, the link is
134
+ // named by its heading, its figure and its status.
135
+ return /*#__PURE__*/ _jsx("article", {
136
+ className: cn('flex flex-col', className),
137
+ children: link(/*#__PURE__*/ _jsxs(_Fragment, {
138
+ children: [
139
+ /*#__PURE__*/ _jsx("h3", {
140
+ className: "text-step-sm font-semibold",
141
+ children: label
142
+ }),
143
+ /*#__PURE__*/ _jsx("span", {
144
+ className: "text-step-2 font-semibold tabular-nums",
145
+ children: figure
146
+ }),
147
+ state === 'ready' && status !== undefined && /*#__PURE__*/ _jsx(StatusTag, {
148
+ tone: status.tone,
149
+ className: "self-start",
150
+ children: status.label
151
+ })
152
+ ]
153
+ }), cn(SURFACE, LINK, 'flex-1'))
154
+ });
96
155
  }
97
156
  /** Tiles side by side, wrapping as the width runs out; a list, so its size is read out. */ export function SummaryTileList(_0) {
98
157
  let { children } = _0, props = _object_without_properties_loose(_0, [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ui/molecules/summary-tile/summary-tile.tsx"],"sourcesContent":["'use client';\n\nimport { Children, isValidElement, type ReactNode } from 'react';\n\nimport { useFormatters, useLocale, useT } from '../../../i18n/index.js';\nimport { Alert } from '../../atoms/alert/index.js';\nimport { Button } from '../../atoms/button/index.js';\nimport { Money, type MoneyUnit } from '../../atoms/money/index.js';\nimport { Skeleton } from '../../atoms/skeleton/index.js';\nimport { StatusTag, type StatusTagTone } from '../../atoms/status-tag/index.js';\nimport { Cluster, type ClusterProps } from '../../layout/cluster/index.js';\nimport { cn } from '../../utils/cn.js';\n\n/** An amount of money a tile states instead of a count. */\nexport interface SummaryTileMoney {\n readonly amount: number;\n readonly currency: string;\n readonly unit: MoneyUnit;\n}\n\n/** What the tile's figure means at a glance, in a tone and in words. */\nexport interface SummaryTileStatus {\n readonly tone: StatusTagTone;\n /** The words for it; the tone never stands alone. */\n readonly label: string;\n}\n\nexport interface SummaryTileProps {\n /** What is counted — \"Envíos por despachar\". The tile's heading. */\n label: string;\n /** Where the counted records are: the tile is one link there. */\n href: string;\n /** How many. Ignored when {@link money} is given. */\n count?: number;\n /** An amount instead of a count — \"Próximo pago\". */\n money?: SummaryTileMoney;\n /** The figure's meaning as a tag beside it. */\n status?: SummaryTileStatus;\n /** Its own source's state: one tile failing leaves every other one standing. */\n state: 'loading' | 'ready' | 'failed';\n /** Reads the tile's source again. Without it, a failed tile offers no Retry. */\n onRetry?: () => void;\n /**\n * Routing escape hatch. It receives the tile's `href`, `className` and\n * content, and must spread `className` onto what it renders; a plain `<a>`\n * when omitted.\n */\n renderLink?: (link: {\n href: string;\n className: string;\n children: ReactNode;\n }) => ReactNode;\n className?: string;\n}\n\nconst SURFACE =\n 'flex min-h-(--target-min) flex-col gap-2xs rounded-xl border border-border bg-surface-elevated p-s text-content';\nconst LINK =\n 'block rounded-xl text-content no-underline focus-ring hover:shadow-overlay';\n\n/**\n * One figure that leads somewhere: a heading, a count or an amount, and a\n * status in words. The whole tile is one link to the records it counts, named\n * by its heading and its figure. It loads, and fails, on its own — a failed\n * tile says so in place and offers Retry while its neighbours keep their\n * figures ([ADR 0028](../../../../../../../docs/adr/0028-states-an-organism-must-render.md)).\n * Nothing is announced live: the figure is read once, when the reader\n * reaches it.\n */\nexport function SummaryTile({\n label,\n href,\n count,\n money,\n status,\n state,\n onRetry,\n renderLink,\n className,\n}: SummaryTileProps) {\n const t = useT();\n const formatters = useFormatters();\n const locale = useLocale();\n const link = (content: ReactNode, linkClass: string) =>\n renderLink === undefined ? (\n <a href={href} className={linkClass}>\n {content}\n </a>\n ) : (\n renderLink({ href, className: linkClass, children: content })\n );\n\n if (state === 'failed') {\n return (\n <article className={cn(SURFACE, className)}>\n <h3 className=\"text-step-sm font-semibold\">\n {link(label, 'focus-ring rounded-sm text-content hover:underline')}\n </h3>\n <Alert\n tone=\"danger\"\n action={\n onRetry === undefined ? undefined : (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={onRetry}\n >\n {t('state.retry')}\n </Button>\n )\n }\n >\n {t('summary.failed', { label })}\n </Alert>\n </article>\n );\n }\n\n const figure =\n state === 'loading' ? (\n <>\n <Skeleton shape=\"line\" className=\"w-12\" />\n <span className=\"sr-only\">{t('summary.loading')}</span>\n </>\n ) : money !== undefined ? (\n <Money\n amount={money.amount}\n currency={money.currency}\n unit={money.unit}\n locale={locale}\n />\n ) : (\n formatters.number(count ?? 0)\n );\n\n return link(\n <article className={cn(SURFACE, className)}>\n <h3 className=\"text-step-sm font-semibold\">{label}</h3>\n <div className=\"text-step-2 font-semibold tabular-nums\">{figure}</div>\n {state === 'ready' && status !== undefined && (\n <StatusTag tone={status.tone} className=\"self-start\">\n {status.label}\n </StatusTag>\n )}\n </article>,\n LINK,\n );\n}\n\nexport type SummaryTileListProps = Omit<ClusterProps, 'as' | 'role' | 'align'>;\n\n/** Tiles side by side, wrapping as the width runs out; a list, so its size is read out. */\nexport function SummaryTileList({ children, ...props }: SummaryTileListProps) {\n return (\n <Cluster as=\"ul\" role=\"list\" gap=\"s\" align=\"stretch\" {...props}>\n {Children.map(children, child =>\n isValidElement(child) ? <li className=\"min-w-0\">{child}</li> : child,\n )}\n </Cluster>\n );\n}\n"],"names":["Children","isValidElement","useFormatters","useLocale","useT","Alert","Button","Money","Skeleton","StatusTag","Cluster","cn","SURFACE","LINK","SummaryTile","label","href","count","money","status","state","onRetry","renderLink","className","t","formatters","locale","link","content","linkClass","undefined","a","children","article","h3","tone","action","type","variant","size","onClick","figure","shape","span","amount","currency","unit","number","div","SummaryTileList","props","as","role","gap","align","map","child","li"],"mappings":"AAAA;;;;AAEA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AAEjE,SAASC,aAAa,EAAEC,SAAS,EAAEC,IAAI,QAAQ,yBAAyB;AACxE,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,MAAM,QAAQ,8BAA8B;AACrD,SAASC,KAAK,QAAwB,6BAA6B;AACnE,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,SAAS,QAA4B,kCAAkC;AAChF,SAASC,OAAO,QAA2B,gCAAgC;AAC3E,SAASC,EAAE,QAAQ,oBAAoB;AA4CvC,MAAMC,UACJ;AACF,MAAMC,OACJ;AAEF;;;;;;;;CAQC,GACD,OAAO,SAASC,YAAY,EAC1BC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,SAAS,EACQ;IACjB,MAAMC,IAAIpB;IACV,MAAMqB,aAAavB;IACnB,MAAMwB,SAASvB;IACf,MAAMwB,OAAO,CAACC,SAAoBC,YAChCP,eAAeQ,0BACb,KAACC;YAAEf,MAAMA;YAAMO,WAAWM;sBACvBD;aAGHN,WAAW;YAAEN;YAAMO,WAAWM;YAAWG,UAAUJ;QAAQ;IAG/D,IAAIR,UAAU,UAAU;QACtB,qBACE,MAACa;YAAQV,WAAWZ,GAAGC,SAASW;;8BAC9B,KAACW;oBAAGX,WAAU;8BACXI,KAAKZ,OAAO;;8BAEf,KAACV;oBACC8B,MAAK;oBACLC,QACEf,YAAYS,YAAYA,0BACtB,KAACxB;wBACC+B,MAAK;wBACLC,SAAQ;wBACRC,MAAK;wBACLC,SAASnB;kCAERG,EAAE;;8BAKRA,EAAE,kBAAkB;wBAAET;oBAAM;;;;IAIrC;IAEA,MAAM0B,SACJrB,UAAU,0BACR;;0BACE,KAACZ;gBAASkC,OAAM;gBAAOnB,WAAU;;0BACjC,KAACoB;gBAAKpB,WAAU;0BAAWC,EAAE;;;SAE7BN,UAAUY,0BACZ,KAACvB;QACCqC,QAAQ1B,MAAM0B,MAAM;QACpBC,UAAU3B,MAAM2B,QAAQ;QACxBC,MAAM5B,MAAM4B,IAAI;QAChBpB,QAAQA;SAGVD,WAAWsB,MAAM,CAAC9B,gBAAAA,QAAS;IAG/B,OAAOU,mBACL,MAACM;QAAQV,WAAWZ,GAAGC,SAASW;;0BAC9B,KAACW;gBAAGX,WAAU;0BAA8BR;;0BAC5C,KAACiC;gBAAIzB,WAAU;0BAA0CkB;;YACxDrB,UAAU,WAAWD,WAAWW,2BAC/B,KAACrB;gBAAU0B,MAAMhB,OAAOgB,IAAI;gBAAEZ,WAAU;0BACrCJ,OAAOJ,KAAK;;;QAInBF;AAEJ;AAIA,yFAAyF,GACzF,OAAO,SAASoC,gBAAgB,EAA4C;QAA5C,EAAEjB,QAAQ,EAAkC,OAA7BkB;;;IAC7C,qBACE,KAACxC;QAAQyC,IAAG;QAAKC,MAAK;QAAOC,KAAI;QAAIC,OAAM;OAAcJ;kBACtDlD,SAASuD,GAAG,CAACvB,UAAUwB,CAAAA,sBACtBvD,eAAeuD,uBAAS,KAACC;gBAAGlC,WAAU;0BAAWiC;iBAAcA;;AAIvE"}
1
+ {"version":3,"sources":["../../../../src/ui/molecules/summary-tile/summary-tile.tsx"],"sourcesContent":["'use client';\n\nimport { Children, isValidElement, type ReactNode } from 'react';\n\nimport { useFormatters, useLocale, useT } from '../../../i18n/index.js';\nimport { Alert } from '../../atoms/alert/index.js';\nimport { Button } from '../../atoms/button/index.js';\nimport { Money, type MoneyUnit } from '../../atoms/money/index.js';\nimport { Skeleton } from '../../atoms/skeleton/index.js';\nimport { StatusTag, type StatusTagTone } from '../../atoms/status-tag/index.js';\nimport { Cluster, type ClusterProps } from '../../layout/cluster/index.js';\nimport { cn } from '../../utils/cn.js';\n\n/** An amount of money a tile states instead of a count. */\nexport interface SummaryTileMoney {\n readonly amount: number;\n readonly currency: string;\n readonly unit: MoneyUnit;\n}\n\n/** What the tile's figure means at a glance, in a tone and in words. */\nexport interface SummaryTileStatus {\n readonly tone: StatusTagTone;\n /** The words for it; the tone never stands alone. */\n readonly label: string;\n}\n\n/** One record a list tile leads to — \"Pedido 1042\", and when it was placed. */\nexport interface SummaryTileItem {\n readonly href: string;\n /** What the record is called; the link's name. */\n readonly label: string;\n /** A muted detail after it — a date, an amount, a status in words. */\n readonly meta?: ReactNode;\n}\n\nexport interface SummaryTileProps {\n /** What is counted — \"Envíos por despachar\". The tile's heading. */\n label: string;\n /** Where the counted records are: the tile is one link there. */\n href: string;\n /** How many. Ignored when {@link money} is given. */\n count?: number;\n /** An amount instead of a count — \"Próximo pago\". */\n money?: SummaryTileMoney;\n /**\n * A short list instead of a figure — \"Últimos pedidos\". The heading links\n * to all of them and each item to its own record, so the tile is not one\n * link. Ignored when {@link money} is given; takes precedence over\n * {@link count}.\n */\n items?: readonly SummaryTileItem[];\n /** What an empty list says. A neutral \"nothing yet\" when omitted. */\n emptyLabel?: string;\n /** The figure's meaning as a tag beside it. */\n status?: SummaryTileStatus;\n /** Its own source's state: one tile failing leaves every other one standing. */\n state: 'loading' | 'ready' | 'failed';\n /** Reads the tile's source again. Without it, a failed tile offers no Retry. */\n onRetry?: () => void;\n /**\n * Routing escape hatch. It receives the tile's `href`, `className` and\n * content, and must spread `className` onto what it renders; a plain `<a>`\n * when omitted.\n */\n renderLink?: (link: {\n href: string;\n className: string;\n children: ReactNode;\n }) => ReactNode;\n className?: string;\n}\n\nconst SURFACE =\n 'flex min-h-(--target-min) flex-col gap-2xs rounded-xl border border-border bg-surface-elevated p-s text-content';\nconst LINK =\n 'rounded-xl text-content no-underline focus-ring hover:shadow-overlay';\nconst HEADING_LINK = 'focus-ring rounded-sm text-content hover:underline';\nconst ITEM_LINK = `inline-flex min-h-(--target-min) items-center ${HEADING_LINK}`;\n\n/**\n * One figure that leads somewhere: a heading, a count or an amount, and a\n * status in words. The whole tile is one link to the records it counts, named\n * by its heading and its figure. It loads, and fails, on its own — a failed\n * tile says so in place and offers Retry while its neighbours keep their\n * figures ([ADR 0028](../../../../../../../docs/adr/0028-states-an-organism-must-render.md)).\n * Nothing is announced live: the figure is read once, when the reader\n * reaches it.\n */\nexport function SummaryTile({\n label,\n href,\n count,\n money,\n items,\n emptyLabel,\n status,\n state,\n onRetry,\n renderLink,\n className,\n}: SummaryTileProps) {\n const t = useT();\n const formatters = useFormatters();\n const locale = useLocale();\n const linkTo = (to: string, content: ReactNode, linkClass: string) =>\n renderLink === undefined ? (\n <a href={to} className={linkClass}>\n {content}\n </a>\n ) : (\n renderLink({ href: to, className: linkClass, children: content })\n );\n const link = (content: ReactNode, linkClass: string) =>\n linkTo(href, content, linkClass);\n\n if (state === 'failed') {\n return (\n <article className={cn(SURFACE, className)}>\n <h3 className=\"text-step-sm font-semibold\">\n {link(label, HEADING_LINK)}\n </h3>\n <Alert\n tone=\"danger\"\n action={\n onRetry === undefined ? undefined : (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={onRetry}\n >\n {t('state.retry')}\n </Button>\n )\n }\n >\n {t('summary.failed', { label })}\n </Alert>\n </article>\n );\n }\n\n // A list tile holds a link per record, and links cannot nest: its heading\n // is the link to all of them rather than the whole tile.\n if (items !== undefined && money === undefined) {\n return (\n <article className={cn(SURFACE, className)}>\n <h3 className=\"text-step-sm font-semibold\">\n {link(label, HEADING_LINK)}\n </h3>\n {state === 'loading' ? (\n <>\n <Skeleton shape=\"line\" className=\"w-full\" />\n <Skeleton shape=\"line\" className=\"w-3/4\" />\n <span className=\"sr-only\">{t('summary.loading')}</span>\n </>\n ) : items.length === 0 ? (\n <p className=\"m-0 text-step-sm text-content-muted\">\n {emptyLabel ?? t('summary.empty')}\n </p>\n ) : (\n <ul role=\"list\" className=\"m-0 p-0 flex list-none flex-col gap-2xs\">\n {items.map(item => (\n <li\n key={item.href}\n className=\"flex flex-wrap items-baseline justify-between gap-x-s\"\n >\n {linkTo(item.href, item.label, ITEM_LINK)}\n {item.meta !== undefined && (\n <span className=\"text-step-sm text-content-muted tabular-nums\">\n {item.meta}\n </span>\n )}\n </li>\n ))}\n </ul>\n )}\n {state === 'ready' && status !== undefined && (\n <StatusTag tone={status.tone} className=\"self-start\">\n {status.label}\n </StatusTag>\n )}\n </article>\n );\n }\n\n const figure =\n state === 'loading' ? (\n <>\n <Skeleton shape=\"line\" className=\"w-12\" />\n <span className=\"sr-only\">{t('summary.loading')}</span>\n </>\n ) : money !== undefined ? (\n <Money\n amount={money.amount}\n currency={money.currency}\n unit={money.unit}\n locale={locale}\n />\n ) : (\n formatters.number(count ?? 0)\n );\n\n // The link sits inside the article, never around it: an article does not\n // take its name from its content, so a link wrapping one reads as nameless\n // to a spec-following tree and to every query by role. Inside, the link is\n // named by its heading, its figure and its status.\n return (\n <article className={cn('flex flex-col', className)}>\n {link(\n <>\n <h3 className=\"text-step-sm font-semibold\">{label}</h3>\n <span className=\"text-step-2 font-semibold tabular-nums\">\n {figure}\n </span>\n {state === 'ready' && status !== undefined && (\n <StatusTag tone={status.tone} className=\"self-start\">\n {status.label}\n </StatusTag>\n )}\n </>,\n cn(SURFACE, LINK, 'flex-1'),\n )}\n </article>\n );\n}\n\nexport type SummaryTileListProps = Omit<ClusterProps, 'as' | 'role' | 'align'>;\n\n/** Tiles side by side, wrapping as the width runs out; a list, so its size is read out. */\nexport function SummaryTileList({ children, ...props }: SummaryTileListProps) {\n return (\n <Cluster as=\"ul\" role=\"list\" gap=\"s\" align=\"stretch\" {...props}>\n {Children.map(children, child =>\n isValidElement(child) ? <li className=\"min-w-0\">{child}</li> : child,\n )}\n </Cluster>\n );\n}\n"],"names":["Children","isValidElement","useFormatters","useLocale","useT","Alert","Button","Money","Skeleton","StatusTag","Cluster","cn","SURFACE","LINK","HEADING_LINK","ITEM_LINK","SummaryTile","label","href","count","money","items","emptyLabel","status","state","onRetry","renderLink","className","t","formatters","locale","linkTo","to","content","linkClass","undefined","a","children","link","article","h3","tone","action","type","variant","size","onClick","shape","span","length","p","ul","role","map","item","li","meta","figure","amount","currency","unit","number","SummaryTileList","props","as","gap","align","child"],"mappings":"AAAA;;;;AAEA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AAEjE,SAASC,aAAa,EAAEC,SAAS,EAAEC,IAAI,QAAQ,yBAAyB;AACxE,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,MAAM,QAAQ,8BAA8B;AACrD,SAASC,KAAK,QAAwB,6BAA6B;AACnE,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,SAAS,QAA4B,kCAAkC;AAChF,SAASC,OAAO,QAA2B,gCAAgC;AAC3E,SAASC,EAAE,QAAQ,oBAAoB;AA8DvC,MAAMC,UACJ;AACF,MAAMC,OACJ;AACF,MAAMC,eAAe;AACrB,MAAMC,YAAY,CAAC,8CAA8C,EAAED,cAAc;AAEjF;;;;;;;;CAQC,GACD,OAAO,SAASE,YAAY,EAC1BC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,KAAK,EACLC,UAAU,EACVC,MAAM,EACNC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,SAAS,EACQ;IACjB,MAAMC,IAAIxB;IACV,MAAMyB,aAAa3B;IACnB,MAAM4B,SAAS3B;IACf,MAAM4B,SAAS,CAACC,IAAYC,SAAoBC,YAC9CR,eAAeS,0BACb,KAACC;YAAElB,MAAMc;YAAIL,WAAWO;sBACrBD;aAGHP,W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rCJ,OAAON,KAAK;;;;IAKvB;IAEA,MAAMwC,SACJjC,UAAU,0BACR;;0BACE,KAAChB;gBAASuC,OAAM;gBAAOpB,WAAU;;0BACjC,KAACqB;gBAAKrB,WAAU;0BAAWC,EAAE;;;SAE7BR,UAAUe,0BACZ,KAAC5B;QACCmD,QAAQtC,MAAMsC,MAAM;QACpBC,UAAUvC,MAAMuC,QAAQ;QACxBC,MAAMxC,MAAMwC,IAAI;QAChB9B,QAAQA;SAGVD,WAAWgC,MAAM,CAAC1C,gBAAAA,QAAS;IAG/B,yEAAyE;IACzE,2EAA2E;IAC3E,2EAA2E;IAC3E,mDAAmD;IACnD,qBACE,KAACoB;QAAQZ,WAAWhB,GAAG,iBAAiBgB;kBACrCW,mBACC;;8BACE,KAACE;oBAAGb,WAAU;8BAA8BV;;8BAC5C,KAAC+B;oBAAKrB,WAAU;8BACb8B;;gBAEFjC,UAAU,WAAWD,WAAWY,2BAC/B,KAAC1B;oBAAUgC,MAAMlB,OAAOkB,IAAI;oBAAEd,WAAU;8BACrCJ,OAAON,KAAK;;;YAInBN,GAAGC,SAASC,MAAM;;AAI1B;AAIA,yFAAyF,GACzF,OAAO,SAASiD,gBAAgB,EAA4C;QAA5C,EAAEzB,QAAQ,EAAkC,OAA7B0B;;;IAC7C,qBACE,KAACrD;QAAQsD,IAAG;QAAKZ,MAAK;QAAOa,KAAI;QAAIC,OAAM;OAAcH;kBACtD/D,SAASqD,GAAG,CAAChB,UAAU8B,CAAAA,sBACtBlE,eAAekE,uBAAS,KAACZ;gBAAG5B,WAAU;0BAAWwC;iBAAcA;;AAIvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"entity-form.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-form/entity-form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,MAAM,EAWZ,MAAM,eAAe,CAAC;AAsCvB,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAqDhC,wBAAgB,UAAU,CAAC,OAAO,SAAS,MAAM,EAAE,EACjD,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,aAAa,EACb,WAAW,EACX,YAAY,EACZ,IAAI,EAAE,QAAQ,EACd,WAAW,EACX,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAwB,EACxB,QAAgB,EAChB,SAAiB,EACjB,QAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,UAAkB,EAClB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAyB,EACzB,KAAK,EACL,QAAQ,EACR,iBAAyB,EACzB,SAAS,EACT,OAAO,EACP,QAAQ,GACT,EAAE,eAAe,CAAC,OAAO,CAAC,+BA6c1B"}
1
+ {"version":3,"file":"entity-form.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-form/entity-form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,MAAM,EAWZ,MAAM,eAAe,CAAC;AAsCvB,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAqDhC,wBAAgB,UAAU,CAAC,OAAO,SAAS,MAAM,EAAE,EACjD,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,aAAa,EACb,WAAW,EACX,YAAY,EACZ,IAAI,EAAE,QAAQ,EACd,WAAW,EACX,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAwB,EACxB,QAAgB,EAChB,SAAiB,EACjB,QAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,UAAkB,EAClB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAyB,EACzB,KAAK,EACL,QAAQ,EACR,iBAAyB,EACzB,SAAS,EACT,OAAO,EACP,QAAQ,GACT,EAAE,eAAe,CAAC,OAAO,CAAC,+BAid1B"}
@@ -72,7 +72,9 @@ export function EntityForm({ entityConstructor, entity, values, onFieldChange, l
72
72
  // The *field* descriptors, which stay local and synchronous — a column is a
73
73
  // property of the class every caller holds. Only an action's availability is
74
74
  // a property of the caller, which is why that half arrives as `metadata`.
75
- const columnDescriptors = describeEntityColumns(entityConstructor, entity);
75
+ // A member that presents as nothing (a `revision`) stays in the draft and is
76
+ // never drawn.
77
+ const columnDescriptors = describeEntityColumns(entityConstructor, entity).filter((descriptor)=>descriptor.presentation !== 'none');
76
78
  // Before slots resolve, so an `<EntityField label>` override still wins.
77
79
  const described = useLocalizedDescriptors(columnDescriptors);
78
80
  const resolved = resolveEntityFormFields(described, slots.fields);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ui/organisms/entity-form/entity-form.tsx"],"sourcesContent":["'use client';\n\nimport {\n cloneEntityDraft,\n describeEntityColumns,\n type Entity,\n type EntityAction,\n type EntityDraft,\n type EntityDraftValue,\n type EntityLinkSource,\n extractMetaEntity,\n type MetaAccessorType,\n readDraftString,\n readLocalizedDraft,\n readRowDrafts,\n type UseCaseDescriptor,\n} from '@entifix/core';\nimport { type ReactNode, useEffect, useId, useRef, useState } from 'react';\n\nimport {\n useEntityNoun,\n useLocalizedDescriptors,\n useT,\n useTranslateKey,\n} from '../../../i18n/index.js';\nimport {\n availableUseCases,\n renderAnchor,\n useCasesForSurface,\n} from '../../actions/index.js';\nimport { useVerbInvoker } from '../../actions/use-verb-invoker.js';\nimport { Button, button } from '../../atoms/button/index.js';\nimport { CellValue, useRecordLabel } from '../../atoms/cell-value/index.js';\nimport { FieldControl } from '../../atoms/field-control/index.js';\nimport { LocalizedFieldControl } from '../../atoms/localized-field-control/index.js';\nimport { Skeleton } from '../../atoms/skeleton/index.js';\nimport { Text } from '../../atoms/text/index.js';\nimport {\n ActionBar,\n type ActionBarItem,\n itemsForUseCases,\n} from '../../molecules/action-bar/index.js';\nimport { Card } from '../../molecules/card/index.js';\nimport { EntityLinkInput } from '../../molecules/entity-link-input/index.js';\nimport { LoadingBoundary } from '../../molecules/loading-boundary/index.js';\nimport { RegionState } from '../../molecules/region-state/index.js';\nimport { Stack } from '../../molecules/stack/index.js';\nimport { cn } from '../../utils/cn.js';\nimport { useLiveUpdates } from '../../utils/live-updates.js';\nimport {\n useFocusOnArrival,\n useFocusOnLoss,\n} from '../../utils/use-focus-on-arrival.js';\nimport { EntityDetailGrid } from '../entity-detail-grid/index.js';\nimport type {\n EntityFormField,\n EntityFormMode,\n EntityFormProps,\n} from './entity-form.types.js';\nimport { readEntityFormFields } from './entity-form-slots.js';\nimport { resolveEntityFormFields } from './use-entity-form-fields.js';\n\n/**\n * The member types a `linkSources` entry can actually produce an editor for.\n *\n * `link` is the obvious one. `string` is here because a foreign key does not\n * have to be a typed relation: when the target lives in **another slice's\n * store**, an `EntityLink` would be an illegal edge and a storage-layer join\n * across a store boundary, so the member is a plain id and the relation exists\n * only in the operator's head — a cross-store reference is an id, never a\n * link. Nothing about the editor cares which of the two it is —\n * `EntityLinkInput` writes `String(target.id)` into the draft either way, and\n * the *only* place `link`-ness still matters is `applyEntityLinks` at submit,\n * which skips a non-`link` descriptor and so leaves the id as the truth.\n *\n * Everything else is excluded on purpose rather than by omission: a `boolean`,\n * `enum`, `number` or `date` member cannot name another record, so a source\n * pointed at one is a wiring mistake — see {@link assertLinkSourcesAreEditable}.\n */\nconst PICKABLE_TYPES: ReadonlySet<MetaAccessorType> = new Set<MetaAccessorType>(\n ['link', 'string'],\n);\n\n/**\n * A form that builds itself from an entity's metadata: fields, labels and value\n * formatting all come from `@accessor()` declarations, so editing a new entity\n * needs no bespoke form. The read/edit toggle is the whole point — the same\n * component shows a record as text or as inputs.\n *\n * Two things layer on top of that default:\n * - **modes** — `read` renders each member through `CellValue`; `edit` renders\n * the matching `FieldControl`. A member in {@link PICKABLE_TYPES} with an\n * entry in `linkSources` gets the full picker instead — a to-one `link`, or a\n * `string` holding a foreign key into another slice's store. Without a source,\n * a relation stays read-only, and a `linkCollection` always does, the to-many\n * editor being a follow-up. A source aimed at a member that can render no\n * picker is a wiring mistake rather than a no-op, and throws.\n * - **slots** — `<EntityField>` children override one field's label, control or\n * read display, or add a computed field.\n *\n * It is presentational: the draft, its errors and the save/delete actions are\n * all props, so the same form hosts on a plain route and inside a workspace tab.\n */\n/** The key the built-in Delete runs under, which no declared verb can take. */\nconst DELETE_KEY = '$delete';\n\n/** Save, from anywhere in the form — the caret in a field included. */\nconst SAVE_SHORTCUT = 'Mod+S';\n/** The footer's declared primary, when it is not Save. */\nconst PRIMARY_SHORTCUT = 'Mod+Enter';\n\nexport function EntityForm<TEntity extends Entity>({\n entityConstructor,\n entity,\n values,\n onFieldChange,\n linkSources,\n onLinkChange,\n mode: modeProp,\n defaultMode,\n onModeChange,\n errors,\n formError,\n onSubmit,\n onDelete,\n deletePolicy = 'confirm',\n embedded = false,\n isLoading = false,\n skeleton = true,\n isSaving = false,\n isPending = false,\n isDeleting = false,\n error,\n onRetry,\n backHref,\n renderLink = renderAnchor,\n title,\n metadata,\n isMetadataLoading = false,\n onUseCase,\n onClone,\n children,\n}: EntityFormProps<TEntity>) {\n const formId = useId();\n const slots = readEntityFormFields<TEntity>(children);\n // The *field* descriptors, which stay local and synchronous — a column is a\n // property of the class every caller holds. Only an action's availability is\n // a property of the caller, which is why that half arrives as `metadata`.\n const columnDescriptors = describeEntityColumns(\n entityConstructor,\n entity,\n ) as Array<EntityFormField<TEntity>>;\n // Before slots resolve, so an `<EntityField label>` override still wins.\n const described = useLocalizedDescriptors(columnDescriptors);\n const resolved = resolveEntityFormFields(described, slots.fields);\n assertLinkSourcesAreEditable(resolved, linkSources);\n\n // **Form above, table below**, and it is a partition rather than an ordering\n // hint. A grid rendered between two labelled inputs reads as a field, which\n // it is not — it is a second record list — so every owned collection is\n // pulled out of the field stack whatever `order` it declared, and rendered\n // full width beneath it. A composition that named no child has nothing to\n // render and stays where it was, showing its row count as before.\n const fields = resolved.filter(field => !isOwnedCollection(field));\n const ownedCollections = resolved.filter(isOwnedCollection);\n\n /**\n * `true`/omitted → the built-in default, which draws one label+control pair\n * per resolved field; a node → that node; `false` → nothing. The field list\n * comes from the constructor's metadata, not from the record, so it is already\n * complete while the record is still in flight — which is what lets the\n * placeholder match the form it is standing in for.\n */\n const customSkeleton = typeof skeleton === 'boolean' ? undefined : skeleton;\n const showSkeleton = isLoading && skeleton !== false;\n\n const [internalMode, setInternalMode] = useState<EntityFormMode>(\n defaultMode ?? (entity ? 'read' : 'edit'),\n );\n const mode = modeProp ?? internalMode;\n const editing = mode === 'edit';\n\n const draft: EntityDraft = values ?? {};\n const setField = (name: string, value: EntityDraftValue) =>\n onFieldChange?.(name, value);\n\n const toggleMode = () => {\n const next: EntityFormMode = editing ? 'read' : 'edit';\n setInternalMode(next);\n onModeChange?.(next);\n };\n\n const t = useT();\n const translateKey = useTranslateKey();\n const entityNoun = useEntityNoun();\n const live = useLiveUpdates();\n // A form reached by a write — saved, handed off by a wizard — takes focus on\n // its heading, so it never rests on `<body>` (ADR 0028).\n const heading = useRef<HTMLHeadingElement>(null);\n useFocusOnArrival(heading);\n const busy = isSaving || isPending || isDeleting;\n\n // A draft restored from storage holds relation ids and no instances, so every\n // picker is resolving its target for a moment after mount. Saving inside that\n // window is exactly the case `applyEntityLinks` refuses: an `embedded` member\n // with an id and nothing to inline. Gating the save is the honest answer —\n // the form is still assembling itself, and the wait is one lookup long.\n //\n // Deliberately not narrowed to `embedded` members: a descriptor's\n // serialization is not what makes an in-flight lookup a bad moment to submit,\n // and a form that saves half-resolved is confusing whichever shape it writes.\n const resolvingLinks = Object.values(linkSources ?? {}).some(\n source => source.selected.isLoading,\n );\n\n // Absent metadata keeps the pre-ADR-0026 behaviour, so an un-migrated call\n // site renders exactly as before. Present metadata is authoritative: it is\n // what the service already decided this caller may do.\n const may = (action: EntityAction) =>\n metadata === undefined || metadata.actions.includes(action);\n\n // A single-record form shows the verbs that act on *this* record. Which cell\n // lands where is `action-surfaces`' business and nobody else's — a\n // `context-dependent` entity verb belongs to a row's overflow menu and a\n // `collection`-bound one to the bulk bar, and resolving that here as well is\n // how the two surfaces drifted apart in the first place.\n //\n // ⚠️ **Only when there is somewhere for them to go.** Every cell these two\n // surfaces render is `binding: 'entity'`, so without an `onUseCase` the\n // button has no handler and clicking it does nothing at all. That is not a\n // hypothetical: `makeEntityCrud` withholds the handler on a create, because\n // there is no record for a verb to act on — and Publish and Unpublish\n // rendered on a new `ProductOffering` and were inert, which reads as a broken\n // feature rather than an inapplicable one.\n //\n // The hooks are called unconditionally and their *results* are gated: React's\n // hook count must stay fixed across renders.\n const declaredHeaderUseCases = useCasesForSurface(\n 'form-header',\n metadata?.useCases,\n );\n const declaredFooterUseCases = useCasesForSurface(\n 'form-footer',\n metadata?.useCases,\n );\n // And only the verbs the record's state allows: a shipment awaiting dispatch\n // offers Dispatch, not every move a shipment can ever make.\n const headerUseCases = onUseCase\n ? availableUseCases(declaredHeaderUseCases, entity)\n : [];\n const footerUseCases = onUseCase\n ? availableUseCases(declaredFooterUseCases, entity)\n : [];\n // A verb that moved its record out of the states it applies to unmounts the\n // button the reader just pressed; focus goes to the heading, not `<body>`.\n useFocusOnLoss(\n () => heading.current,\n [...headerUseCases, ...footerUseCases].map(({ key }) => key).join(' '),\n );\n\n // Every verb on the form, and its own Delete, goes through one invoker: a\n // destructive verb asks, asks for the name, or runs and offers Undo, as it\n // declared — `revoke-sessions` ends every session a user holds.\n const verbs = useVerbInvoker<undefined>({\n run: key => (key === DELETE_KEY ? onDelete?.() : onUseCase?.(key)),\n busy,\n served: metadata?.useCases,\n });\n // What a confirmation names — the object in \"Delete {record}?\" and the text\n // the typed policy asks for — through the one derivation every surface\n // shares: the entity's `labelMember`, resolved if it is a reference.\n const metaEntity = extractMetaEntity(entityConstructor);\n const nameOf = useRecordLabel();\n const recordLabel = nameOf(entityConstructor, draft);\n const invoke = (descriptor: UseCaseDescriptor) =>\n verbs.invoke({\n descriptor,\n target: undefined,\n object: recordLabel,\n count: 1,\n });\n const requestDelete = () => {\n // Undo is the host's to offer: only it can put a deleted record back.\n if (deletePolicy === 'undo') {\n onDelete?.();\n return;\n }\n invoke({\n key: DELETE_KEY,\n binding: 'entity',\n placement: 'determining',\n labelKey: 'controls:form.delete',\n confirm: {\n tone: 'destructive',\n messageKey: 'controls:confirm.deleteMessage',\n },\n reversible: deletePolicy,\n });\n };\n\n const headerItems = itemsForUseCases(\n headerUseCases,\n translateKey,\n invoke,\n busy,\n );\n const footerItems = itemsForUseCases(\n footerUseCases,\n translateKey,\n invoke,\n busy,\n );\n /**\n * A save attempt. Counted, so a refused one moves focus to the error summary\n * once — not again on every keystroke that leaves an error standing.\n */\n const [attempt, setAttempt] = useState(0);\n const save = () => {\n setAttempt(current => current + 1);\n onSubmit?.(draft);\n };\n const summary = useRef<HTMLDivElement>(null);\n const summaryId = useId();\n const invalid = editing\n ? fields.filter(field => errors?.[field.name] !== undefined)\n : [];\n const focusedAttempt = useRef(0);\n useEffect(() => {\n if (attempt === focusedAttempt.current || invalid.length === 0) return;\n focusedAttempt.current = attempt;\n summary.current?.focus();\n }, [attempt, invalid.length]);\n\n // Save is the footer's primary unless the entity declared one of its own — a\n // determining \"Publish\" is what that page is for, and Save steps aside.\n const declaresFooterPrimary = footerItems.some(\n item => item.emphasis === 'primary',\n );\n const footerActions: ActionBarItem[] = [\n ...(may('write')\n ? [\n {\n key: 'save',\n // A pending write waits on the push stream; while that is down\n // it says so, rather than waiting without a word.\n label: isPending\n ? t(live.connection === 'open' ? 'form.pending' : 'live.waiting')\n : isSaving\n ? t('form.saving')\n : t('form.save'),\n emphasis: declaresFooterPrimary\n ? ('default' as const)\n : ('primary' as const),\n disabled: busy || resolvingLinks,\n submit: true,\n shortcut: SAVE_SHORTCUT,\n onSelect: save,\n },\n ]\n : []),\n // The page's main act answers Mod+Enter, unless it declared its own.\n ...footerItems.map(item =>\n item.emphasis === 'primary' && item.shortcut === undefined\n ? { ...item, shortcut: PRIMARY_SHORTCUT }\n : item,\n ),\n // Clone is the CRUD triple's, not a declared verb's: every entity can be\n // copied, so giving it a `@useCase()` would mean declaring the same verb on\n // all 28 of them. It needs `write`, because what it produces is a create.\n ...(onClone && entity && may('write')\n ? [\n {\n key: 'clone',\n label: t('form.clone'),\n disabled: busy,\n onSelect: () => onClone(cloneEntityDraft(entityConstructor, draft)),\n },\n ]\n : []),\n ...(onDelete && may('delete')\n ? [\n {\n key: 'delete',\n label: isDeleting ? t('form.deleting') : t('form.delete'),\n destructive: true,\n disabled: busy,\n onSelect: requestDelete,\n },\n ]\n : []),\n ];\n\n // A real form while editing, so Enter in a field saves; an embedded one\n // belongs to its host's flow, and a caller who may not write has no Save.\n const asForm = editing && !embedded && may('write');\n const rows = fields.map(field => (\n <FieldRow\n key={field.name}\n field={field}\n entity={entity}\n draft={draft}\n value={readDraftString(draft, field.name)}\n editing={editing}\n error={editing ? errors?.[field.name] : undefined}\n setField={setField}\n linkSource={linkSources?.[field.name]}\n onLinkChange={onLinkChange}\n id={`${formId}-${field.name}`}\n />\n ));\n\n const body = (\n <Stack gap=\"s\">\n {/* An embedded form brings only its fields: the heading and the action\n row belong to whatever is hosting it — a wizard step sits under the\n wizard's own heading and advances with the wizard's own footer, so\n rendering a second of each is two controls for one job. */}\n {!embedded && (\n <Stack direction=\"row\" gap=\"xs\" align=\"center\">\n <Text\n as=\"h2\"\n ref={heading}\n tabIndex={-1}\n step={1}\n weight=\"semibold\"\n className=\"focus-ring\"\n >\n {/* `entity` is undefined while the record is still in flight, so\n testing it alone made a loading edit form announce itself as\n \"New\" for as long as the fetch took, then relabel when the\n record landed. A form that is loading is never a create. */}\n {title ?? (entity || isLoading ? t('form.details') : t('form.new'))}\n </Text>\n {/* The built-in toggle only appears when the form owns its mode and\n there is a record to view — a create form has nothing to read. */}\n {modeProp === undefined && entity && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={toggleMode}\n >\n {editing ? t('form.view') : t('form.edit')}\n </Button>\n )}\n <LoadingBoundary isLoading={isMetadataLoading} lines={0}>\n <>\n {headerItems.length > 0 && (\n <ActionBar surface=\"form-header\" items={headerItems} />\n )}\n {slots.headerActions}\n </>\n </LoadingBoundary>\n </Stack>\n )}\n\n {/* One announcement for the form; the shimmer below is aria-hidden. */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {isLoading ? t('form.loading') : ''}\n </span>\n\n <RegionState\n plural={entityNoun(metaEntity, 'plural')}\n error={error}\n onRetry={onRetry}\n // Only a load that can be retried leaves an out-of-date record; a\n // failed save leaves what the reader typed, which is current.\n hasStaleData={entity !== undefined && onRetry !== undefined}\n />\n\n {/* A refused save, as one summary of links to what needs fixing: the\n only alert in the form, and where focus goes after the attempt. */}\n {invalid.length > 0 && (\n <div\n ref={summary}\n tabIndex={-1}\n role=\"alert\"\n aria-labelledby={summaryId}\n data-testid=\"entity-form-error-summary\"\n className=\"rounded-lg border-l-4 border-danger bg-danger-subtle px-s py-xs text-step-sm text-content focus-ring\"\n >\n <p id={summaryId} className=\"m-0 font-semibold\">\n {t('form.errorSummary', { count: invalid.length })}\n </p>\n <ul className=\"m-0 ps-s\">\n {invalid.map(field => (\n <li key={field.name}>\n <a\n href={`#${formId}-${field.name}`}\n // The content colour: primary on the danger surface misses\n // 4.5:1.\n className=\"font-medium text-content underline underline-offset-2 focus-ring\"\n onClick={event => {\n event.preventDefault();\n document.getElementById(`${formId}-${field.name}`)?.focus();\n }}\n >\n {errors?.[field.name]}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {editing && fields.some(field => field.required && !field.readonly) && (\n <Text step={-1} tone=\"muted\">\n {t('form.requiredHint')}\n </Text>\n )}\n\n {/* The placeholder *replaces* the rows rather than sitting above them.\n Rendering both meant a shimmer stacked on a full set of empty fields,\n which is two loading signals for one region and twice the height the\n loaded form settles at. */}\n {showSkeleton\n ? (customSkeleton ??\n fields.map(field => (\n <Stack key={field.name} gap=\"3xs\">\n <Skeleton shape=\"line\" className=\"w-24\" />\n <Skeleton className=\"h-9 w-full\" />\n </Stack>\n )))\n : editing\n ? rows\n : // Read mode is a description list: a label points at nothing\n // when there is no control, and a term and its value is what\n // the pair is.\n rows.length > 0 && (\n <dl className=\"m-0 flex flex-col gap-s\">{rows}</dl>\n )}\n\n {/* The rows the record owns, full width and below every field. Each\n grid is handed the *whole* error map and picks out the keys naming\n its own member, so a record owning two collections needs no\n bookkeeping here. */}\n {ownedCollections.map(field => (\n <EntityDetailGrid\n key={field.name}\n descriptor={field}\n rows={readRowDrafts(draft[field.name])}\n onRowsChange={rows => setField(field.name, rows)}\n errors={editing ? errors : undefined}\n editing={editing}\n isLoading={isLoading}\n skeleton={skeleton}\n />\n ))}\n\n {/* A cross-field rule has no row to sit under, so it sits with the\n actions it blocks. */}\n {editing && formError && (\n <span role=\"alert\" className=\"text-step-sm text-danger\">\n {formError}\n </span>\n )}\n\n {editing && !embedded && (\n <Stack direction=\"row\" gap=\"xs\" align=\"center\">\n <ActionBar surface=\"form-footer\" size=\"md\" items={footerActions} />\n {slots.footerActions}\n {/* A link styled as a button, not a button inside a link: the old\n nesting was two interactive elements for one action, and its\n `disabled` stopped nothing, because the anchor around it still\n navigated. While busy the link is inert instead. */}\n {backHref &&\n renderLink({\n href: backHref,\n className: cn(\n button({ variant: 'ghost' }),\n busy && 'pointer-events-none opacity-50',\n ),\n children: t('form.back'),\n intent: { kind: 'back' },\n })}\n </Stack>\n )}\n\n {slots.rest}\n </Stack>\n );\n\n return (\n <Card>\n {asForm ? (\n <form\n noValidate\n // Enter submits through Save, the form's default button, which is\n // disabled while a save is in flight — so a busy form stays put.\n onSubmit={event => {\n event.preventDefault();\n save();\n }}\n >\n {body}\n </form>\n ) : (\n body\n )}\n\n {verbs.dialog}\n </Card>\n );\n}\n\n/**\n * A member the detail grid renders rather than the field stack.\n *\n * The `childType` half is not defensive: a `composition` that declared no child\n * has no columns, so there is nothing for a grid to draw. It keeps its place in\n * the field stack and reads as its row count, which is what it did before this\n * control existed — an honest \"some rows\" rather than an empty table implying\n * there are none.\n */\nfunction isOwnedCollection<TEntity extends Entity>(\n field: EntityFormField<TEntity>,\n): boolean {\n return field.type === 'composition' && field.childType !== undefined;\n}\n\n/**\n * Refuse a `linkSources` entry that names a member no picker can be built for.\n *\n * `FieldRow` asks for {@link PICKABLE_TYPES} before it builds an editor, so a\n * source handed to anything else used to fall through to the read-only display\n * or a plain `FieldControl` with nothing said: the caller wired a picker, no\n * picker appeared, and the field was indistinguishable from one the entity had\n * declared read-only. That is a wiring mistake rather than a state — the entry\n * is dead in *every* shape such a field can render, since an\n * `<EntityField render>` slot is handed the draft and never the source — so it\n * costs the render instead of a warning nobody reads. `useEntityLinkSource`\n * already throws at render for the sibling mistake (a search\n * property the target does not declare `filterable`); this is the same fault\n * caught one level up.\n *\n * Two messages, because the two faults are not the same thing. A\n * `linkCollection` is a member the editor has simply not been built for yet\n * (#26), so the fix is to wait or to point at the to-one you meant. Any other\n * type is a member that can never name another record at all, so the fix is to\n * remove the entry.\n *\n * Here rather than inside `FieldRow`, and that is the whole reason it is a\n * separate pass: a row only reaches its editor branch in **edit** mode, so a\n * per-row check would stay silent on a form that opens in `read` — the default\n * whenever there is a record — and then throw on a click, minutes later. One\n * pass over the registry fires on the first render either way.\n *\n * Against the resolved fields rather than the raw metadata: a slot may drop a\n * member, and a source left behind for a field that no longer renders is not\n * worth a page.\n */\nfunction assertLinkSourcesAreEditable<TEntity extends Entity>(\n fields: Array<EntityFormField<TEntity>>,\n // Same reason as the prop's own declaration: a source's target is another\n // entity entirely and cannot be expressed in terms of `TEntity`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n linkSources: Record<string, EntityLinkSource<any>> | undefined,\n): void {\n if (linkSources === undefined) return;\n\n const sourced = fields.filter(\n field =>\n linkSources[field.name] !== undefined && !PICKABLE_TYPES.has(field.type),\n );\n if (sourced.length === 0) return;\n\n const toMany = sourced\n .filter(field => field.type === 'linkCollection')\n .map(field => field.name);\n if (toMany.length > 0) {\n throw new Error(\n `EntityForm was given a link source for a to-many member: ${toMany.join(', ')}. ` +\n 'A `linkCollection` has no editor yet, so the source can only be dropped ' +\n 'and the field would render read-only with no sign anything was wired. ' +\n 'Remove the entry, or point it at the to-one `link` you meant.',\n );\n }\n\n const owned = sourced\n .filter(field => field.type === 'composition')\n .map(field => field.name);\n if (owned.length > 0) {\n throw new Error(\n `EntityForm was given a link source for an owned collection: ${owned.join(', ')}. ` +\n 'A `composition` is not a reference — its rows have no life outside this ' +\n 'record and are never picked from existing ones, so there is nothing for a ' +\n 'picker to look up. The detail grid is what edits them.',\n );\n }\n\n const unpickable = sourced.map(field => `${field.name} (${field.type})`);\n throw new Error(\n `EntityForm was given a link source for a member that cannot hold one: ${unpickable.join(', ')}. ` +\n 'A picker writes the target’s id into the draft, so the member has to be a ' +\n '`link` or the `string` that carries a foreign key. Remove the entry, or ' +\n 'point it at the member that actually holds the reference.',\n );\n}\n\ninterface FieldRowProps<TEntity extends Entity> {\n field: EntityFormField<TEntity>;\n entity: TEntity | undefined;\n draft: EntityDraft;\n value: string;\n editing: boolean;\n error: string | undefined;\n setField: (name: string, value: EntityDraftValue) => void;\n // The target of a relation is a different entity than the form's own.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n linkSource: EntityLinkSource<any> | undefined;\n onLinkChange:\n ((name: string, entity: Entity | undefined) => void) | undefined;\n id: string;\n}\n\n/**\n * One label + control (or value) row. A `readonly` member renders its read\n * display even in edit mode, and so does a relation with no source; everything\n * else edits through `FieldControl` — or, when a source was supplied for a\n * member in {@link PICKABLE_TYPES}, through `EntityLinkInput`. A boolean edited\n * inline carries its own label, so the row does not add a second one.\n *\n * The source branch sits above the `virtual || isRelation` fallback and below\n * `field.render`, which is what lets a slot still override a picked field.\n */\nfunction FieldRow<TEntity extends Entity>({\n field,\n entity,\n draft,\n value,\n editing,\n error,\n setField,\n linkSource,\n onLinkChange,\n id,\n}: FieldRowProps<TEntity>) {\n const t = useT();\n const errorId = `${id}-error`;\n const readNode: ReactNode = field.readRender ? (\n field.readRender(entity)\n ) : (\n <CellValue\n value={\n entity ? (entity as Record<string, unknown>)[field.name] : undefined\n }\n descriptor={field}\n record={entity as Record<string, unknown> | undefined}\n />\n );\n\n // Members with no editor of their own here: a to-one `link` whose picker was\n // never wired, a `linkCollection` (#26) and a `composition`. All three\n // fall back to the read display, which is honest — a disabled text box\n // holding `[object Object]` is not.\n const isRelation =\n field.type === 'link' ||\n field.type === 'linkCollection' ||\n field.type === 'composition';\n\n let control: ReactNode;\n if (!editing) {\n control = readNode;\n } else if (field.render) {\n control = field.render({ draft, value, setField, id });\n } else if (linkSource && PICKABLE_TYPES.has(field.type)) {\n control = (\n <EntityLinkInput\n descriptor={field}\n value={value}\n source={linkSource}\n id={id}\n disabled={field.readonly}\n onSelect={target => {\n setField(field.name, target.id == null ? '' : String(target.id));\n onLinkChange?.(field.name, target);\n }}\n onClear={() => {\n setField(field.name, '');\n onLinkChange?.(field.name, undefined);\n }}\n />\n );\n } else if (field.type === 'localized' && !field.virtual) {\n control = (\n <LocalizedFieldControl\n descriptor={field}\n value={readLocalizedDraft(draft, field.name)}\n onChange={next => setField(field.name, next)}\n id={id}\n />\n );\n } else if (field.virtual || isRelation) {\n // A relation with no source has no input to offer, and a virtual field has\n // no member to edit unless a `render` was supplied — both fall back to the\n // read display.\n control = readNode;\n } else {\n control = (\n <FieldControl\n descriptor={field}\n value={value}\n onChange={next => setField(field.name, next)}\n id={id}\n record={draft}\n aria-invalid={error !== undefined || undefined}\n aria-describedby={error === undefined ? undefined : errorId}\n aria-required={field.required || undefined}\n />\n );\n }\n\n if (!editing)\n return (\n <div className=\"flex flex-col gap-3xs\">\n <dt className=\"text-step-sm text-content-muted\">{field.label}</dt>\n <dd className=\"m-0\">{control}</dd>\n </div>\n );\n\n const ownsLabel = field.type === 'boolean' && !field.render && !field.virtual;\n // Marked before anyone submits, not discovered after.\n const marked = field.required && !field.readonly;\n\n return (\n <Stack gap=\"3xs\">\n {!ownsLabel && (\n // The marker sits beside the label, not in it: the name stays the\n // field's own, and `aria-required` is what says it to a reader.\n <span className=\"flex items-baseline gap-3xs\">\n <label htmlFor={id} className=\"text-step-sm text-content-muted\">\n {field.label}\n </label>\n {marked && (\n <span aria-hidden=\"true\" className=\"text-step-sm text-danger\">\n {t('form.requiredMarker')}\n </span>\n )}\n </span>\n )}\n {control}\n {/* Not an alert of its own: the summary above the fields is the one\n announcement, and this is what the control's description reads. */}\n {error && (\n <span id={errorId} className=\"text-step-sm text-danger\">\n {error}\n </span>\n )}\n </Stack>\n );\n}\n"],"names":["cloneEntityDraft","describeEntityColumns","extractMetaEntity","readDraftString","readLocalizedDraft","readRowDrafts","useEffect","useId","useRef","useState","useEntityNoun","useLocalizedDescriptors","useT","useTranslateKey","availableUseCases","renderAnchor","useCasesForSurface","useVerbInvoker","Button","button","CellValue","useRecordLabel","FieldControl","LocalizedFieldControl","Skeleton","Text","ActionBar","itemsForUseCases","Card","EntityLinkInput","LoadingBoundary","RegionState","Stack","cn","useLiveUpdates","useFocusOnArrival","useFocusOnLoss","EntityDetailGrid","readEntityFormFields","resolveEntityFormFields","PICKABLE_TYPES","Set","DELETE_KEY","SAVE_SHORTCUT","PRIMARY_SHORTCUT","EntityForm","entityConstructor","entity","values","onFieldChange","linkSources","onLinkChange","mode","modeProp","defaultMode","onModeChange","errors","formError","onSubmit","onDelete","deletePolicy","embedded","isLoading","skeleton","isSaving","isPending","isDeleting","error","onRetry","backHref","renderLink","title","metadata","isMetadataLoading","onUseCase","onClone","children","formId","slots","columnDescriptors","described","resolved","fields","assertLinkSourcesAreEditable","filter","field","isOwnedCollection","ownedCollections","customSkeleton","undefined","showSkeleton","internalMode","setInternalMode","editing","draft","setField","name","value","toggleMode","next","t","translateKey","entityNoun","live","heading","busy","resolvingLinks","Object","some","source","selected","may","action","actions","includes","declaredHeaderUseCases","useCases","declaredFooterUseCases","headerUseCases","footerUseCases","current","map","key","join","verbs","run","served","metaEntity","nameOf","recordLabel","invoke","descriptor","target","object","count","requestDelete","binding","placement","labelKey","confirm","tone","messageKey","reversible","headerItems","footerItems","attempt","setAttempt","save","summary","summaryId","invalid","focusedAttempt","length","focus","declaresFooterPrimary","item","emphasis","footerActions","label","connection","disabled","submit","shortcut","onSelect","destructive","asForm","rows","FieldRow","linkSource","id","body","gap","direction","align","as","ref","tabIndex","step","weight","className","type","variant","size","onClick","lines","surface","items","headerActions","span","role","aria-live","plural","hasStaleData","div","aria-labelledby","data-testid","p","ul","li","a","href","event","document","preventDefault","getElementById","required","readonly","shape","dl","onRowsChange","intent","kind","rest","form","noValidate","dialog","childType","sourced","has","toMany","Error","owned","unpickable","errorId","readNode","readRender","record","isRelation","control","render","String","onClear","virtual","onChange","aria-invalid","aria-describedby","aria-required","dt","dd","ownsLabel","marked","htmlFor","aria-hidden"],"mappings":"AAAA;;;AAEA,SACEA,gBAAgB,EAChBC,qBAAqB,EAMrBC,iBAAiB,EAEjBC,eAAe,EACfC,kBAAkB,EAClBC,aAAa,QAER,gBAAgB;AACvB,SAAyBC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAE3E,SACEC,aAAa,EACbC,uBAAuB,EACvBC,IAAI,EACJC,eAAe,QACV,yBAAyB;AAChC,SACEC,iBAAiB,EACjBC,YAAY,EACZC,kBAAkB,QACb,yBAAyB;AAChC,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,MAAM,EAAEC,MAAM,QAAQ,8BAA8B;AAC7D,SAASC,SAAS,EAAEC,cAAc,QAAQ,kCAAkC;AAC5E,SAASC,YAAY,QAAQ,qCAAqC;AAClE,SAASC,qBAAqB,QAAQ,+CAA+C;AACrF,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SACEC,SAAS,EAETC,gBAAgB,QACX,sCAAsC;AAC7C,SAASC,IAAI,QAAQ,gCAAgC;AACrD,SAASC,eAAe,QAAQ,6CAA6C;AAC7E,SAASC,eAAe,QAAQ,4CAA4C;AAC5E,SAASC,WAAW,QAAQ,wCAAwC;AACpE,SAASC,KAAK,QAAQ,iCAAiC;AACvD,SAASC,EAAE,QAAQ,oBAAoB;AACvC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AAsD;IACtD,MAAMQ,SAAS3J,MAAMwH,QAAQ,IAAI,CAACxH,MAAMyH,QAAQ;IAEhD,qBACE,MAAC9K;QAAM2I,KAAI;;YACR,CAACoE,aACA,kEAAkE;YAClE,gEAAgE;0BAChE,MAACnD;gBAAKT,WAAU;;kCACd,KAACrB;wBAAMmF,SAASxE;wBAAIU,WAAU;kCAC3B9F,MAAMyE,KAAK;;oBAEbkF,wBACC,KAACpD;wBAAKsD,eAAY;wBAAO/D,WAAU;kCAChC/E,EAAE;;;;YAKVgI;YAGAjK,uBACC,KAACyH;gBAAKnB,IAAIsD;gBAAS5C,WAAU;0BAC1BhH;;;;AAKX"}
1
+ {"version":3,"sources":["../../../../src/ui/organisms/entity-form/entity-form.tsx"],"sourcesContent":["'use client';\n\nimport {\n cloneEntityDraft,\n describeEntityColumns,\n type Entity,\n type EntityAction,\n type EntityDraft,\n type EntityDraftValue,\n type EntityLinkSource,\n extractMetaEntity,\n type MetaAccessorType,\n readDraftString,\n readLocalizedDraft,\n readRowDrafts,\n type UseCaseDescriptor,\n} from '@entifix/core';\nimport { type ReactNode, useEffect, useId, useRef, useState } from 'react';\n\nimport {\n useEntityNoun,\n useLocalizedDescriptors,\n useT,\n useTranslateKey,\n} from '../../../i18n/index.js';\nimport {\n availableUseCases,\n renderAnchor,\n useCasesForSurface,\n} from '../../actions/index.js';\nimport { useVerbInvoker } from '../../actions/use-verb-invoker.js';\nimport { Button, button } from '../../atoms/button/index.js';\nimport { CellValue, useRecordLabel } from '../../atoms/cell-value/index.js';\nimport { FieldControl } from '../../atoms/field-control/index.js';\nimport { LocalizedFieldControl } from '../../atoms/localized-field-control/index.js';\nimport { Skeleton } from '../../atoms/skeleton/index.js';\nimport { Text } from '../../atoms/text/index.js';\nimport {\n ActionBar,\n type ActionBarItem,\n itemsForUseCases,\n} from '../../molecules/action-bar/index.js';\nimport { Card } from '../../molecules/card/index.js';\nimport { EntityLinkInput } from '../../molecules/entity-link-input/index.js';\nimport { LoadingBoundary } from '../../molecules/loading-boundary/index.js';\nimport { RegionState } from '../../molecules/region-state/index.js';\nimport { Stack } from '../../molecules/stack/index.js';\nimport { cn } from '../../utils/cn.js';\nimport { useLiveUpdates } from '../../utils/live-updates.js';\nimport {\n useFocusOnArrival,\n useFocusOnLoss,\n} from '../../utils/use-focus-on-arrival.js';\nimport { EntityDetailGrid } from '../entity-detail-grid/index.js';\nimport type {\n EntityFormField,\n EntityFormMode,\n EntityFormProps,\n} from './entity-form.types.js';\nimport { readEntityFormFields } from './entity-form-slots.js';\nimport { resolveEntityFormFields } from './use-entity-form-fields.js';\n\n/**\n * The member types a `linkSources` entry can actually produce an editor for.\n *\n * `link` is the obvious one. `string` is here because a foreign key does not\n * have to be a typed relation: when the target lives in **another slice's\n * store**, an `EntityLink` would be an illegal edge and a storage-layer join\n * across a store boundary, so the member is a plain id and the relation exists\n * only in the operator's head — a cross-store reference is an id, never a\n * link. Nothing about the editor cares which of the two it is —\n * `EntityLinkInput` writes `String(target.id)` into the draft either way, and\n * the *only* place `link`-ness still matters is `applyEntityLinks` at submit,\n * which skips a non-`link` descriptor and so leaves the id as the truth.\n *\n * Everything else is excluded on purpose rather than by omission: a `boolean`,\n * `enum`, `number` or `date` member cannot name another record, so a source\n * pointed at one is a wiring mistake — see {@link assertLinkSourcesAreEditable}.\n */\nconst PICKABLE_TYPES: ReadonlySet<MetaAccessorType> = new Set<MetaAccessorType>(\n ['link', 'string'],\n);\n\n/**\n * A form that builds itself from an entity's metadata: fields, labels and value\n * formatting all come from `@accessor()` declarations, so editing a new entity\n * needs no bespoke form. The read/edit toggle is the whole point — the same\n * component shows a record as text or as inputs.\n *\n * Two things layer on top of that default:\n * - **modes** — `read` renders each member through `CellValue`; `edit` renders\n * the matching `FieldControl`. A member in {@link PICKABLE_TYPES} with an\n * entry in `linkSources` gets the full picker instead — a to-one `link`, or a\n * `string` holding a foreign key into another slice's store. Without a source,\n * a relation stays read-only, and a `linkCollection` always does, the to-many\n * editor being a follow-up. A source aimed at a member that can render no\n * picker is a wiring mistake rather than a no-op, and throws.\n * - **slots** — `<EntityField>` children override one field's label, control or\n * read display, or add a computed field.\n *\n * It is presentational: the draft, its errors and the save/delete actions are\n * all props, so the same form hosts on a plain route and inside a workspace tab.\n */\n/** The key the built-in Delete runs under, which no declared verb can take. */\nconst DELETE_KEY = '$delete';\n\n/** Save, from anywhere in the form — the caret in a field included. */\nconst SAVE_SHORTCUT = 'Mod+S';\n/** The footer's declared primary, when it is not Save. */\nconst PRIMARY_SHORTCUT = 'Mod+Enter';\n\nexport function EntityForm<TEntity extends Entity>({\n entityConstructor,\n entity,\n values,\n onFieldChange,\n linkSources,\n onLinkChange,\n mode: modeProp,\n defaultMode,\n onModeChange,\n errors,\n formError,\n onSubmit,\n onDelete,\n deletePolicy = 'confirm',\n embedded = false,\n isLoading = false,\n skeleton = true,\n isSaving = false,\n isPending = false,\n isDeleting = false,\n error,\n onRetry,\n backHref,\n renderLink = renderAnchor,\n title,\n metadata,\n isMetadataLoading = false,\n onUseCase,\n onClone,\n children,\n}: EntityFormProps<TEntity>) {\n const formId = useId();\n const slots = readEntityFormFields<TEntity>(children);\n // The *field* descriptors, which stay local and synchronous — a column is a\n // property of the class every caller holds. Only an action's availability is\n // a property of the caller, which is why that half arrives as `metadata`.\n // A member that presents as nothing (a `revision`) stays in the draft and is\n // never drawn.\n const columnDescriptors = describeEntityColumns(\n entityConstructor,\n entity,\n ).filter(descriptor => descriptor.presentation !== 'none') as Array<\n EntityFormField<TEntity>\n >;\n // Before slots resolve, so an `<EntityField label>` override still wins.\n const described = useLocalizedDescriptors(columnDescriptors);\n const resolved = resolveEntityFormFields(described, slots.fields);\n assertLinkSourcesAreEditable(resolved, linkSources);\n\n // **Form above, table below**, and it is a partition rather than an ordering\n // hint. A grid rendered between two labelled inputs reads as a field, which\n // it is not — it is a second record list — so every owned collection is\n // pulled out of the field stack whatever `order` it declared, and rendered\n // full width beneath it. A composition that named no child has nothing to\n // render and stays where it was, showing its row count as before.\n const fields = resolved.filter(field => !isOwnedCollection(field));\n const ownedCollections = resolved.filter(isOwnedCollection);\n\n /**\n * `true`/omitted → the built-in default, which draws one label+control pair\n * per resolved field; a node → that node; `false` → nothing. The field list\n * comes from the constructor's metadata, not from the record, so it is already\n * complete while the record is still in flight — which is what lets the\n * placeholder match the form it is standing in for.\n */\n const customSkeleton = typeof skeleton === 'boolean' ? undefined : skeleton;\n const showSkeleton = isLoading && skeleton !== false;\n\n const [internalMode, setInternalMode] = useState<EntityFormMode>(\n defaultMode ?? (entity ? 'read' : 'edit'),\n );\n const mode = modeProp ?? internalMode;\n const editing = mode === 'edit';\n\n const draft: EntityDraft = values ?? {};\n const setField = (name: string, value: EntityDraftValue) =>\n onFieldChange?.(name, value);\n\n const toggleMode = () => {\n const next: EntityFormMode = editing ? 'read' : 'edit';\n setInternalMode(next);\n onModeChange?.(next);\n };\n\n const t = useT();\n const translateKey = useTranslateKey();\n const entityNoun = useEntityNoun();\n const live = useLiveUpdates();\n // A form reached by a write — saved, handed off by a wizard — takes focus on\n // its heading, so it never rests on `<body>` (ADR 0028).\n const heading = useRef<HTMLHeadingElement>(null);\n useFocusOnArrival(heading);\n const busy = isSaving || isPending || isDeleting;\n\n // A draft restored from storage holds relation ids and no instances, so every\n // picker is resolving its target for a moment after mount. Saving inside that\n // window is exactly the case `applyEntityLinks` refuses: an `embedded` member\n // with an id and nothing to inline. Gating the save is the honest answer —\n // the form is still assembling itself, and the wait is one lookup long.\n //\n // Deliberately not narrowed to `embedded` members: a descriptor's\n // serialization is not what makes an in-flight lookup a bad moment to submit,\n // and a form that saves half-resolved is confusing whichever shape it writes.\n const resolvingLinks = Object.values(linkSources ?? {}).some(\n source => source.selected.isLoading,\n );\n\n // Absent metadata keeps the pre-ADR-0026 behaviour, so an un-migrated call\n // site renders exactly as before. Present metadata is authoritative: it is\n // what the service already decided this caller may do.\n const may = (action: EntityAction) =>\n metadata === undefined || metadata.actions.includes(action);\n\n // A single-record form shows the verbs that act on *this* record. Which cell\n // lands where is `action-surfaces`' business and nobody else's — a\n // `context-dependent` entity verb belongs to a row's overflow menu and a\n // `collection`-bound one to the bulk bar, and resolving that here as well is\n // how the two surfaces drifted apart in the first place.\n //\n // ⚠️ **Only when there is somewhere for them to go.** Every cell these two\n // surfaces render is `binding: 'entity'`, so without an `onUseCase` the\n // button has no handler and clicking it does nothing at all. That is not a\n // hypothetical: `makeEntityCrud` withholds the handler on a create, because\n // there is no record for a verb to act on — and Publish and Unpublish\n // rendered on a new `ProductOffering` and were inert, which reads as a broken\n // feature rather than an inapplicable one.\n //\n // The hooks are called unconditionally and their *results* are gated: React's\n // hook count must stay fixed across renders.\n const declaredHeaderUseCases = useCasesForSurface(\n 'form-header',\n metadata?.useCases,\n );\n const declaredFooterUseCases = useCasesForSurface(\n 'form-footer',\n metadata?.useCases,\n );\n // And only the verbs the record's state allows: a shipment awaiting dispatch\n // offers Dispatch, not every move a shipment can ever make.\n const headerUseCases = onUseCase\n ? availableUseCases(declaredHeaderUseCases, entity)\n : [];\n const footerUseCases = onUseCase\n ? availableUseCases(declaredFooterUseCases, entity)\n : [];\n // A verb that moved its record out of the states it applies to unmounts the\n // button the reader just pressed; focus goes to the heading, not `<body>`.\n useFocusOnLoss(\n () => heading.current,\n [...headerUseCases, ...footerUseCases].map(({ key }) => key).join(' '),\n );\n\n // Every verb on the form, and its own Delete, goes through one invoker: a\n // destructive verb asks, asks for the name, or runs and offers Undo, as it\n // declared — `revoke-sessions` ends every session a user holds.\n const verbs = useVerbInvoker<undefined>({\n run: key => (key === DELETE_KEY ? onDelete?.() : onUseCase?.(key)),\n busy,\n served: metadata?.useCases,\n });\n // What a confirmation names — the object in \"Delete {record}?\" and the text\n // the typed policy asks for — through the one derivation every surface\n // shares: the entity's `labelMember`, resolved if it is a reference.\n const metaEntity = extractMetaEntity(entityConstructor);\n const nameOf = useRecordLabel();\n const recordLabel = nameOf(entityConstructor, draft);\n const invoke = (descriptor: UseCaseDescriptor) =>\n verbs.invoke({\n descriptor,\n target: undefined,\n object: recordLabel,\n count: 1,\n });\n const requestDelete = () => {\n // Undo is the host's to offer: only it can put a deleted record back.\n if (deletePolicy === 'undo') {\n onDelete?.();\n return;\n }\n invoke({\n key: DELETE_KEY,\n binding: 'entity',\n placement: 'determining',\n labelKey: 'controls:form.delete',\n confirm: {\n tone: 'destructive',\n messageKey: 'controls:confirm.deleteMessage',\n },\n reversible: deletePolicy,\n });\n };\n\n const headerItems = itemsForUseCases(\n headerUseCases,\n translateKey,\n invoke,\n busy,\n );\n const footerItems = itemsForUseCases(\n footerUseCases,\n translateKey,\n invoke,\n busy,\n );\n /**\n * A save attempt. Counted, so a refused one moves focus to the error summary\n * once — not again on every keystroke that leaves an error standing.\n */\n const [attempt, setAttempt] = useState(0);\n const save = () => {\n setAttempt(current => current + 1);\n onSubmit?.(draft);\n };\n const summary = useRef<HTMLDivElement>(null);\n const summaryId = useId();\n const invalid = editing\n ? fields.filter(field => errors?.[field.name] !== undefined)\n : [];\n const focusedAttempt = useRef(0);\n useEffect(() => {\n if (attempt === focusedAttempt.current || invalid.length === 0) return;\n focusedAttempt.current = attempt;\n summary.current?.focus();\n }, [attempt, invalid.length]);\n\n // Save is the footer's primary unless the entity declared one of its own — a\n // determining \"Publish\" is what that page is for, and Save steps aside.\n const declaresFooterPrimary = footerItems.some(\n item => item.emphasis === 'primary',\n );\n const footerActions: ActionBarItem[] = [\n ...(may('write')\n ? [\n {\n key: 'save',\n // A pending write waits on the push stream; while that is down\n // it says so, rather than waiting without a word.\n label: isPending\n ? t(live.connection === 'open' ? 'form.pending' : 'live.waiting')\n : isSaving\n ? t('form.saving')\n : t('form.save'),\n emphasis: declaresFooterPrimary\n ? ('default' as const)\n : ('primary' as const),\n disabled: busy || resolvingLinks,\n submit: true,\n shortcut: SAVE_SHORTCUT,\n onSelect: save,\n },\n ]\n : []),\n // The page's main act answers Mod+Enter, unless it declared its own.\n ...footerItems.map(item =>\n item.emphasis === 'primary' && item.shortcut === undefined\n ? { ...item, shortcut: PRIMARY_SHORTCUT }\n : item,\n ),\n // Clone is the CRUD triple's, not a declared verb's: every entity can be\n // copied, so giving it a `@useCase()` would mean declaring the same verb on\n // all 28 of them. It needs `write`, because what it produces is a create.\n ...(onClone && entity && may('write')\n ? [\n {\n key: 'clone',\n label: t('form.clone'),\n disabled: busy,\n onSelect: () => onClone(cloneEntityDraft(entityConstructor, draft)),\n },\n ]\n : []),\n ...(onDelete && may('delete')\n ? [\n {\n key: 'delete',\n label: isDeleting ? t('form.deleting') : t('form.delete'),\n destructive: true,\n disabled: busy,\n onSelect: requestDelete,\n },\n ]\n : []),\n ];\n\n // A real form while editing, so Enter in a field saves; an embedded one\n // belongs to its host's flow, and a caller who may not write has no Save.\n const asForm = editing && !embedded && may('write');\n const rows = fields.map(field => (\n <FieldRow\n key={field.name}\n field={field}\n entity={entity}\n draft={draft}\n value={readDraftString(draft, field.name)}\n editing={editing}\n error={editing ? errors?.[field.name] : undefined}\n setField={setField}\n linkSource={linkSources?.[field.name]}\n onLinkChange={onLinkChange}\n id={`${formId}-${field.name}`}\n />\n ));\n\n const body = (\n <Stack gap=\"s\">\n {/* An embedded form brings only its fields: the heading and the action\n row belong to whatever is hosting it — a wizard step sits under the\n wizard's own heading and advances with the wizard's own footer, so\n rendering a second of each is two controls for one job. */}\n {!embedded && (\n <Stack direction=\"row\" gap=\"xs\" align=\"center\">\n <Text\n as=\"h2\"\n ref={heading}\n tabIndex={-1}\n step={1}\n weight=\"semibold\"\n className=\"focus-ring\"\n >\n {/* `entity` is undefined while the record is still in flight, so\n testing it alone made a loading edit form announce itself as\n \"New\" for as long as the fetch took, then relabel when the\n record landed. A form that is loading is never a create. */}\n {title ?? (entity || isLoading ? t('form.details') : t('form.new'))}\n </Text>\n {/* The built-in toggle only appears when the form owns its mode and\n there is a record to view — a create form has nothing to read. */}\n {modeProp === undefined && entity && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={toggleMode}\n >\n {editing ? t('form.view') : t('form.edit')}\n </Button>\n )}\n <LoadingBoundary isLoading={isMetadataLoading} lines={0}>\n <>\n {headerItems.length > 0 && (\n <ActionBar surface=\"form-header\" items={headerItems} />\n )}\n {slots.headerActions}\n </>\n </LoadingBoundary>\n </Stack>\n )}\n\n {/* One announcement for the form; the shimmer below is aria-hidden. */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {isLoading ? t('form.loading') : ''}\n </span>\n\n <RegionState\n plural={entityNoun(metaEntity, 'plural')}\n error={error}\n onRetry={onRetry}\n // Only a load that can be retried leaves an out-of-date record; a\n // failed save leaves what the reader typed, which is current.\n hasStaleData={entity !== undefined && onRetry !== undefined}\n />\n\n {/* A refused save, as one summary of links to what needs fixing: the\n only alert in the form, and where focus goes after the attempt. */}\n {invalid.length > 0 && (\n <div\n ref={summary}\n tabIndex={-1}\n role=\"alert\"\n aria-labelledby={summaryId}\n data-testid=\"entity-form-error-summary\"\n className=\"rounded-lg border-l-4 border-danger bg-danger-subtle px-s py-xs text-step-sm text-content focus-ring\"\n >\n <p id={summaryId} className=\"m-0 font-semibold\">\n {t('form.errorSummary', { count: invalid.length })}\n </p>\n <ul className=\"m-0 ps-s\">\n {invalid.map(field => (\n <li key={field.name}>\n <a\n href={`#${formId}-${field.name}`}\n // The content colour: primary on the danger surface misses\n // 4.5:1.\n className=\"font-medium text-content underline underline-offset-2 focus-ring\"\n onClick={event => {\n event.preventDefault();\n document.getElementById(`${formId}-${field.name}`)?.focus();\n }}\n >\n {errors?.[field.name]}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {editing && fields.some(field => field.required && !field.readonly) && (\n <Text step={-1} tone=\"muted\">\n {t('form.requiredHint')}\n </Text>\n )}\n\n {/* The placeholder *replaces* the rows rather than sitting above them.\n Rendering both meant a shimmer stacked on a full set of empty fields,\n which is two loading signals for one region and twice the height the\n loaded form settles at. */}\n {showSkeleton\n ? (customSkeleton ??\n fields.map(field => (\n <Stack key={field.name} gap=\"3xs\">\n <Skeleton shape=\"line\" className=\"w-24\" />\n <Skeleton className=\"h-9 w-full\" />\n </Stack>\n )))\n : editing\n ? rows\n : // Read mode is a description list: a label points at nothing\n // when there is no control, and a term and its value is what\n // the pair is.\n rows.length > 0 && (\n <dl className=\"m-0 flex flex-col gap-s\">{rows}</dl>\n )}\n\n {/* The rows the record owns, full width and below every field. Each\n grid is handed the *whole* error map and picks out the keys naming\n its own member, so a record owning two collections needs no\n bookkeeping here. */}\n {ownedCollections.map(field => (\n <EntityDetailGrid\n key={field.name}\n descriptor={field}\n rows={readRowDrafts(draft[field.name])}\n onRowsChange={rows => setField(field.name, rows)}\n errors={editing ? errors : undefined}\n editing={editing}\n isLoading={isLoading}\n skeleton={skeleton}\n />\n ))}\n\n {/* A cross-field rule has no row to sit under, so it sits with the\n actions it blocks. */}\n {editing && formError && (\n <span role=\"alert\" className=\"text-step-sm text-danger\">\n {formError}\n </span>\n )}\n\n {editing && !embedded && (\n <Stack direction=\"row\" gap=\"xs\" align=\"center\">\n <ActionBar surface=\"form-footer\" size=\"md\" items={footerActions} />\n {slots.footerActions}\n {/* A link styled as a button, not a button inside a link: the old\n nesting was two interactive elements for one action, and its\n `disabled` stopped nothing, because the anchor around it still\n navigated. While busy the link is inert instead. */}\n {backHref &&\n renderLink({\n href: backHref,\n className: cn(\n button({ variant: 'ghost' }),\n busy && 'pointer-events-none opacity-50',\n ),\n children: t('form.back'),\n intent: { kind: 'back' },\n })}\n </Stack>\n )}\n\n {slots.rest}\n </Stack>\n );\n\n return (\n <Card>\n {asForm ? (\n <form\n noValidate\n // Enter submits through Save, the form's default button, which is\n // disabled while a save is in flight — so a busy form stays put.\n onSubmit={event => {\n event.preventDefault();\n save();\n }}\n >\n {body}\n </form>\n ) : (\n body\n )}\n\n {verbs.dialog}\n </Card>\n );\n}\n\n/**\n * A member the detail grid renders rather than the field stack.\n *\n * The `childType` half is not defensive: a `composition` that declared no child\n * has no columns, so there is nothing for a grid to draw. It keeps its place in\n * the field stack and reads as its row count, which is what it did before this\n * control existed — an honest \"some rows\" rather than an empty table implying\n * there are none.\n */\nfunction isOwnedCollection<TEntity extends Entity>(\n field: EntityFormField<TEntity>,\n): boolean {\n return field.type === 'composition' && field.childType !== undefined;\n}\n\n/**\n * Refuse a `linkSources` entry that names a member no picker can be built for.\n *\n * `FieldRow` asks for {@link PICKABLE_TYPES} before it builds an editor, so a\n * source handed to anything else used to fall through to the read-only display\n * or a plain `FieldControl` with nothing said: the caller wired a picker, no\n * picker appeared, and the field was indistinguishable from one the entity had\n * declared read-only. That is a wiring mistake rather than a state — the entry\n * is dead in *every* shape such a field can render, since an\n * `<EntityField render>` slot is handed the draft and never the source — so it\n * costs the render instead of a warning nobody reads. `useEntityLinkSource`\n * already throws at render for the sibling mistake (a search\n * property the target does not declare `filterable`); this is the same fault\n * caught one level up.\n *\n * Two messages, because the two faults are not the same thing. A\n * `linkCollection` is a member the editor has simply not been built for yet\n * (#26), so the fix is to wait or to point at the to-one you meant. Any other\n * type is a member that can never name another record at all, so the fix is to\n * remove the entry.\n *\n * Here rather than inside `FieldRow`, and that is the whole reason it is a\n * separate pass: a row only reaches its editor branch in **edit** mode, so a\n * per-row check would stay silent on a form that opens in `read` — the default\n * whenever there is a record — and then throw on a click, minutes later. One\n * pass over the registry fires on the first render either way.\n *\n * Against the resolved fields rather than the raw metadata: a slot may drop a\n * member, and a source left behind for a field that no longer renders is not\n * worth a page.\n */\nfunction assertLinkSourcesAreEditable<TEntity extends Entity>(\n fields: Array<EntityFormField<TEntity>>,\n // Same reason as the prop's own declaration: a source's target is another\n // entity entirely and cannot be expressed in terms of `TEntity`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n linkSources: Record<string, EntityLinkSource<any>> | undefined,\n): void {\n if (linkSources === undefined) return;\n\n const sourced = fields.filter(\n field =>\n linkSources[field.name] !== undefined && !PICKABLE_TYPES.has(field.type),\n );\n if (sourced.length === 0) return;\n\n const toMany = sourced\n .filter(field => field.type === 'linkCollection')\n .map(field => field.name);\n if (toMany.length > 0) {\n throw new Error(\n `EntityForm was given a link source for a to-many member: ${toMany.join(', ')}. ` +\n 'A `linkCollection` has no editor yet, so the source can only be dropped ' +\n 'and the field would render read-only with no sign anything was wired. ' +\n 'Remove the entry, or point it at the to-one `link` you meant.',\n );\n }\n\n const owned = sourced\n .filter(field => field.type === 'composition')\n .map(field => field.name);\n if (owned.length > 0) {\n throw new Error(\n `EntityForm was given a link source for an owned collection: ${owned.join(', ')}. ` +\n 'A `composition` is not a reference — its rows have no life outside this ' +\n 'record and are never picked from existing ones, so there is nothing for a ' +\n 'picker to look up. The detail grid is what edits them.',\n );\n }\n\n const unpickable = sourced.map(field => `${field.name} (${field.type})`);\n throw new Error(\n `EntityForm was given a link source for a member that cannot hold one: ${unpickable.join(', ')}. ` +\n 'A picker writes the target’s id into the draft, so the member has to be a ' +\n '`link` or the `string` that carries a foreign key. Remove the entry, or ' +\n 'point it at the member that actually holds the reference.',\n );\n}\n\ninterface FieldRowProps<TEntity extends Entity> {\n field: EntityFormField<TEntity>;\n entity: TEntity | undefined;\n draft: EntityDraft;\n value: string;\n editing: boolean;\n error: string | undefined;\n setField: (name: string, value: EntityDraftValue) => void;\n // The target of a relation is a different entity than the form's own.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n linkSource: EntityLinkSource<any> | undefined;\n onLinkChange:\n ((name: string, entity: Entity | undefined) => void) | undefined;\n id: string;\n}\n\n/**\n * One label + control (or value) row. A `readonly` member renders its read\n * display even in edit mode, and so does a relation with no source; everything\n * else edits through `FieldControl` — or, when a source was supplied for a\n * member in {@link PICKABLE_TYPES}, through `EntityLinkInput`. A boolean edited\n * inline carries its own label, so the row does not add a second one.\n *\n * The source branch sits above the `virtual || isRelation` fallback and below\n * `field.render`, which is what lets a slot still override a picked field.\n */\nfunction FieldRow<TEntity extends Entity>({\n field,\n entity,\n draft,\n value,\n editing,\n error,\n setField,\n linkSource,\n onLinkChange,\n id,\n}: FieldRowProps<TEntity>) {\n const t = useT();\n const errorId = `${id}-error`;\n const readNode: ReactNode = field.readRender ? (\n field.readRender(entity)\n ) : (\n <CellValue\n value={\n entity ? (entity as Record<string, unknown>)[field.name] : undefined\n }\n descriptor={field}\n record={entity as Record<string, unknown> | undefined}\n />\n );\n\n // Members with no editor of their own here: a to-one `link` whose picker was\n // never wired, a `linkCollection` (#26) and a `composition`. All three\n // fall back to the read display, which is honest — a disabled text box\n // holding `[object Object]` is not.\n const isRelation =\n field.type === 'link' ||\n field.type === 'linkCollection' ||\n field.type === 'composition';\n\n let control: ReactNode;\n if (!editing) {\n control = readNode;\n } else if (field.render) {\n control = field.render({ draft, value, setField, id });\n } else if (linkSource && PICKABLE_TYPES.has(field.type)) {\n control = (\n <EntityLinkInput\n descriptor={field}\n value={value}\n source={linkSource}\n id={id}\n disabled={field.readonly}\n onSelect={target => {\n setField(field.name, target.id == null ? '' : String(target.id));\n onLinkChange?.(field.name, target);\n }}\n onClear={() => {\n setField(field.name, '');\n onLinkChange?.(field.name, undefined);\n }}\n />\n );\n } else if (field.type === 'localized' && !field.virtual) {\n control = (\n <LocalizedFieldControl\n descriptor={field}\n value={readLocalizedDraft(draft, field.name)}\n onChange={next => setField(field.name, next)}\n id={id}\n />\n );\n } else if (field.virtual || isRelation) {\n // A relation with no source has no input to offer, and a virtual field has\n // no member to edit unless a `render` was supplied — both fall back to the\n // read display.\n control = readNode;\n } else {\n control = (\n <FieldControl\n descriptor={field}\n value={value}\n onChange={next => setField(field.name, next)}\n id={id}\n record={draft}\n aria-invalid={error !== undefined || undefined}\n aria-describedby={error === undefined ? undefined : errorId}\n aria-required={field.required || undefined}\n />\n );\n }\n\n if (!editing)\n return (\n <div className=\"flex flex-col gap-3xs\">\n <dt className=\"text-step-sm text-content-muted\">{field.label}</dt>\n <dd className=\"m-0\">{control}</dd>\n </div>\n );\n\n const ownsLabel = field.type === 'boolean' && !field.render && !field.virtual;\n // Marked before anyone submits, not discovered after.\n const marked = field.required && !field.readonly;\n\n return (\n <Stack gap=\"3xs\">\n {!ownsLabel && (\n // The marker sits beside the label, not in it: the name stays the\n // field's own, and `aria-required` is what says it to a reader.\n <span className=\"flex items-baseline gap-3xs\">\n <label htmlFor={id} className=\"text-step-sm text-content-muted\">\n {field.label}\n </label>\n {marked && (\n <span aria-hidden=\"true\" className=\"text-step-sm text-danger\">\n {t('form.requiredMarker')}\n </span>\n )}\n </span>\n )}\n {control}\n {/* Not an alert of its own: the summary above the fields is the one\n announcement, and this is what the control's description reads. */}\n {error && (\n <span id={errorId} className=\"text-step-sm text-danger\">\n {error}\n </span>\n )}\n </Stack>\n );\n}\n"],"names":["cloneEntityDraft","describeEntityColumns","extractMetaEntity","readDraftString","readLocalizedDraft","readRowDrafts","useEffect","useId","useRef","useState","useEntityNoun","useLocalizedDescriptors","useT","useTranslateKey","availableUseCases","renderAnchor","useCasesForSurface","useVerbInvoker","Button","button","CellValue","useRecordLabel","FieldControl","LocalizedFieldControl","Skeleton","Text","ActionBar","itemsForUseCases","Card","EntityLinkInput","LoadingBoundary","RegionState","Stack","cn","useLiveUpdates","useFocusOnArrival","useFocusOnLoss","EntityDetailGrid","readEntityFormFields","resolveEntityFormFields","PICKABLE_TYPES","Set","DELETE_KEY","SAVE_SHORTCUT","PRIMARY_SHORTCUT","EntityForm","entityConstructor","entity","values","onFieldChange","linkSources","onLinkChange","mode","modeProp","defaultMode","onModeChange","errors","formError","onSubmit","onDelete","deletePolicy","embedded","isLoading","skeleton","isSaving","isPending","isDeleting","error","onRetry","backHref","renderLink","title","metadata","isMetadataLoading","onUseCase","onClone","children","formId","slots","columnDescriptors","filter","descriptor","presentation","described","resolved","fields","assertLinkSourcesAreEditable","field","isOwnedCollection","ownedCollections","customSkeleton","undefined","showSkeleton","internalMode","setInternalMode","editing","draft","setField","name","value","toggleMode","next","t","translateKey","entityNoun","live","heading","busy","resolvingLinks","Object","some","source","selected","may","action","actions","includes","declaredHeaderUseCases","useCases","declaredFooterUseCases","headerUseCases","footerUseCases","current","map","key","join","verbs","run","served","metaEntity","nameOf","recordLabel","invoke","target","object","count","requestDelete","binding","placement","labelKey","confirm","tone","messageKey","reversible","headerItems","footerItems","attempt","setAttempt","save","summary","summaryId","invalid","focusedAttempt","length","focus","declaresFooterPrimary","item","emphasis","footerActions","label","connection","disabled","submit","shortcut","onSelect","destructive","asForm","rows","FieldRow","linkSource","id","body","gap","direction","align","as","ref","tabIndex","step","weight","className","type","variant","size","onClick","lines","surface","items","headerActions","span","role","aria-live","plural","hasStaleData","div","aria-labelledby","data-testid","p","ul","li","a","href","event","document","preventDefault","getElementById","required","readonly","shape","dl","onRowsChange","intent","kind","rest","form","noValidate","dialog","childType","sourced","has","toMany","Error","owned","unpickable","errorId","readNode","readRender","record","isRelation","control","render","String","onClear","virtual","onChange","aria-invalid","aria-describedby","aria-required","dt","dd","ownsLabel","marked","htmlFor","aria-hidden"],"mappings":"AAAA;;;AAEA,SACEA,gBAAgB,EAChBC,qBAAqB,EAMrBC,iBAAiB,EAEjBC,eAAe,EACfC,kBAAkB,EAClBC,aAAa,QAER,gBAAgB;AACvB,SAAyBC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAE3E,SACEC,aAAa,EACbC,uBAAuB,EACvBC,IAAI,EACJC,eAAe,QACV,yBAAyB;AAChC,SACEC,iBAAiB,EACjBC,YAAY,EACZC,kBAAkB,QACb,yBAAyB;AAChC,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,MAAM,EAAEC,MAAM,QAAQ,8BAA8B;AAC7D,SAASC,SAAS,EAAEC,cAAc,QAAQ,kCAAkC;AAC5E,SAASC,YAAY,QAAQ,qCAAqC;AAClE,SAASC,qBAAqB,QAAQ,+CAA+C;AACrF,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SACEC,SAAS,EAETC,gBAAgB,QACX,sCAAsC;AAC7C,SAASC,IAAI,QAAQ,gCAAgC;AACrD,SAASC,eAAe,Q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mG;QAAId,WAAU;;0BACb,KAAC0D;gBAAG1D,WAAU;0BAAmC7F,MAAMwE,KAAK;;0BAC5D,KAACgF;gBAAG3D,WAAU;0BAAOiD;;;;IAI3B,MAAMW,YAAYzJ,MAAM8F,IAAI,KAAK,aAAa,CAAC9F,MAAM+I,MAAM,IAAI,CAAC/I,MAAMkJ,OAAO;IAC7E,sDAAsD;IACtD,MAAMQ,SAAS1J,MAAMuH,QAAQ,IAAI,CAACvH,MAAMwH,QAAQ;IAEhD,qBACE,MAAC/K;QAAM4I,KAAI;;YACR,CAACoE,aACA,kEAAkE;YAClE,gEAAgE;0BAChE,MAACnD;gBAAKT,WAAU;;kCACd,KAACrB;wBAAMmF,SAASxE;wBAAIU,WAAU;kCAC3B7F,MAAMwE,KAAK;;oBAEbkF,wBACC,KAACpD;wBAAKsD,eAAY;wBAAO/D,WAAU;kCAChC9E,EAAE;;;;YAKV+H;YAGAlK,uBACC,KAAC0H;gBAAKnB,IAAIsD;gBAAS5C,WAAU;0BAC1BjH;;;;AAKX"}
@@ -1,4 +1,4 @@
1
- import type { Entity, MetaAccessorType } from '@entifix/core';
1
+ import type { Entity, MetaAccessorType, MoneyFormat } from '@entifix/core';
2
2
  import { type ReactNode } from 'react';
3
3
  import type { EntityTableColumn } from './entity-table.types.js';
4
4
  /**
@@ -16,6 +16,11 @@ export interface EntityColumnProps<TEntity extends Entity = Entity> {
16
16
  type?: MetaAccessorType;
17
17
  /** The narrowest the column reads at, in `rem` — what the pivot counts it as. */
18
18
  minWidth?: number;
19
+ /**
20
+ * The column holds an amount: printed as `Money` in its currency, never as
21
+ * the stored number. A computed column has no accessor to declare it on.
22
+ */
23
+ money?: MoneyFormat;
19
24
  order?: number;
20
25
  sortable?: boolean;
21
26
  filterable?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"entity-table-slots.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-table/entity-table-slots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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AAC,CAAC,KACvC,SAAS,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EAC5D,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,GACnC,SAAS,CAEX;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oEAAoE;AACpE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,GAAG,SAAS,CAE7E;AAED,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,MAAM;IACtD,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0EAA0E;IAC1E,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,MAAM,EACzD,QAAQ,EAAE,SAAS,GAClB,gBAAgB,CAAC,OAAO,CAAC,CA4B3B"}
1
+ {"version":3,"file":"entity-table-slots.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-table/entity-table-slots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;GAMG;AAEH,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IAChE,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CA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AAG,SAAS,CAE7E;AAED,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,MAAM;IACtD,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0EAA0E;IAC1E,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,MAAM,EACzD,QAAQ,EAAE,SAAS,GAClB,gBAAgB,CAAC,OAAO,CAAC,CA4B3B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ui/organisms/entity-table/entity-table-slots.tsx"],"sourcesContent":["import type { Entity, MetaAccessorType } from '@entifix/core';\nimport { Children, isValidElement, type ReactNode } from 'react';\n\nimport type { EntityTableColumn } from './entity-table.types.js';\n\n/**\n * The declarative customization API. Slots are configuration expressed as JSX:\n * they never render themselves — `EntityTable` reads their props and decides\n * where the configuration applies. That keeps simple tables to a single\n * self-closing tag while complex ones stay declarative instead of drowning in\n * option objects.\n */\n\nexport interface EntityColumnProps<TEntity extends Entity = Entity> {\n /** Accessor name. Unknown names create an extra, entity-less column. */\n field: string;\n label?: string;\n header?: ReactNode;\n type?: MetaAccessorType;\n /** The narrowest the column reads at, in `rem` — what the pivot counts it as. */\n minWidth?: number;\n order?: number;\n sortable?: boolean;\n filterable?: boolean;\n render?: (item: TEntity) => ReactNode;\n}\n\n/** Overrides one metadata-derived column, or adds a computed one. */\nexport function EntityColumn<TEntity extends Entity = Entity>(\n _props: EntityColumnProps<TEntity>,\n): ReactNode {\n return null;\n}\n\nexport interface EntityTableHeaderProps<TEntity extends Entity = Entity> {\n /** Replaces the whole header row. Receives the resolved visible columns. */\n render: (columns: Array<EntityTableColumn<TEntity>>) => ReactNode;\n}\n\nexport function EntityTableHeader<TEntity extends Entity = Entity>(\n _props: EntityTableHeaderProps<TEntity>,\n): ReactNode {\n return null;\n}\n\nexport interface EntityTableRowProps<TEntity extends Entity = Entity> {\n /** Replaces the whole body row for every item. */\n render: (\n item: TEntity,\n columns: Array<EntityTableColumn<TEntity>>,\n ) => ReactNode;\n}\n\nexport function EntityTableRow<TEntity extends Entity = Entity>(\n _props: EntityTableRowProps<TEntity>,\n): ReactNode {\n return null;\n}\n\nexport interface EntityTableToolbarProps {\n children?: ReactNode;\n}\n\n/** Extra actions placed alongside the built-in toolbar controls. */\nexport function EntityTableToolbar(_props: EntityTableToolbarProps): ReactNode {\n return null;\n}\n\nexport interface EntityTableSlots<TEntity extends Entity> {\n columns: Array<EntityColumnProps<TEntity>>;\n header?: EntityTableHeaderProps<TEntity>;\n row?: EntityTableRowProps<TEntity>;\n toolbar?: ReactNode;\n /** Children that matched no slot — rendered below the table untouched. */\n rest: ReactNode[];\n}\n\n/**\n * Sorts children into slots.\n *\n * Matching is by component identity rather than by `displayName`: identity\n * survives minification and cannot collide with an unrelated component that\n * happens to share a name.\n */\nexport function readEntityTableSlots<TEntity extends Entity>(\n children: ReactNode,\n): EntityTableSlots<TEntity> {\n const slots: EntityTableSlots<TEntity> = { columns: [], rest: [] };\n\n Children.toArray(children).forEach(child => {\n if (!isValidElement(child)) {\n slots.rest.push(child);\n return;\n }\n\n switch (child.type) {\n case EntityColumn:\n slots.columns.push(child.props as EntityColumnProps<TEntity>);\n break;\n case EntityTableHeader:\n slots.header = child.props as EntityTableHeaderProps<TEntity>;\n break;\n case EntityTableRow:\n slots.row = child.props as EntityTableRowProps<TEntity>;\n break;\n case EntityTableToolbar:\n slots.toolbar = (child.props as EntityTableToolbarProps).children;\n break;\n default:\n slots.rest.push(child);\n }\n });\n\n return slots;\n}\n"],"names":["Children","isValidElement","EntityColumn","_props","EntityTableHeader","EntityTableRow","EntityTableToolbar","readEntityTableSlots","children","slots","columns","rest","toArray","forEach","child","push","type","props","header","row","toolbar"],"mappings":"AACA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AA0BjE,mEAAmE,GACnE,OAAO,SAASC,aACdC,MAAkC;IAElC,OAAO;AACT;AAOA,OAAO,SAASC,kBACdD,MAAuC;IAEvC,OAAO;AACT;AAUA,OAAO,SAASE,eACdF,MAAoC;IAEpC,OAAO;AACT;AAMA,kEAAkE,GAClE,OAAO,SAASG,mBAAmBH,MAA+B;IAChE,OAAO;AACT;AAWA;;;;;;CAMC,GACD,OAAO,SAASI,qBACdC,QAAmB;IAEnB,MAAMC,QAAmC;QAAEC,SAAS,EAAE;QAAEC,MAAM,EAAE;IAAC;IAEjEX,SAASY,OAAO,CAACJ,UAAUK,OAAO,CAACC,CAAAA;QACjC,IAAI,eAACb,eAAea,QAAQ;YAC1BL,MAAME,IAAI,CAACI,IAAI,CAACD;YAChB;QACF;QAEA,OAAQA,MAAME,IAAI;YAChB,KAAKd;gBACHO,MAAMC,OAAO,CAACK,IAAI,CAACD,MAAMG,KAAK;gBAC9B;YACF,KAAKb;gBACHK,MAAMS,MAAM,GAAGJ,MAAMG,KAAK;gBAC1B;YACF,KAAKZ;gBACHI,MAAMU,GAAG,GAAGL,MAAMG,KAAK;gBACvB;YACF,KAAKX;gBACHG,MAAMW,OAAO,GAAG,AAACN,MAAMG,KAAK,CAA6BT,QAAQ;gBACjE;YACF;gBACEC,MAAME,IAAI,CAACI,IAAI,CAACD;QACpB;IACF;IAEA,OAAOL;AACT"}
1
+ {"version":3,"sources":["../../../../src/ui/organisms/entity-table/entity-table-slots.tsx"],"sourcesContent":["import type { Entity, MetaAccessorType, MoneyFormat } from '@entifix/core';\nimport { Children, isValidElement, type ReactNode } from 'react';\n\nimport type { EntityTableColumn } from './entity-table.types.js';\n\n/**\n * The declarative customization API. Slots are configuration expressed as JSX:\n * they never render themselves — `EntityTable` reads their props and decides\n * where the configuration applies. That keeps simple tables to a single\n * self-closing tag while complex ones stay declarative instead of drowning in\n * option objects.\n */\n\nexport interface EntityColumnProps<TEntity extends Entity = Entity> {\n /** Accessor name. Unknown names create an extra, entity-less column. */\n field: string;\n label?: string;\n header?: ReactNode;\n type?: MetaAccessorType;\n /** The narrowest the column reads at, in `rem` — what the pivot counts it as. */\n minWidth?: number;\n /**\n * The column holds an amount: printed as `Money` in its currency, never as\n * the stored number. A computed column has no accessor to declare it on.\n */\n money?: MoneyFormat;\n order?: number;\n sortable?: boolean;\n filterable?: boolean;\n render?: (item: TEntity) => ReactNode;\n}\n\n/** Overrides one metadata-derived column, or adds a computed one. */\nexport function EntityColumn<TEntity extends Entity = Entity>(\n _props: EntityColumnProps<TEntity>,\n): ReactNode {\n return null;\n}\n\nexport interface EntityTableHeaderProps<TEntity extends Entity = Entity> {\n /** Replaces the whole header row. Receives the resolved visible columns. */\n render: (columns: Array<EntityTableColumn<TEntity>>) => ReactNode;\n}\n\nexport function EntityTableHeader<TEntity extends Entity = Entity>(\n _props: EntityTableHeaderProps<TEntity>,\n): ReactNode {\n return null;\n}\n\nexport interface EntityTableRowProps<TEntity extends Entity = Entity> {\n /** Replaces the whole body row for every item. */\n render: (\n item: TEntity,\n columns: Array<EntityTableColumn<TEntity>>,\n ) => ReactNode;\n}\n\nexport function EntityTableRow<TEntity extends Entity = Entity>(\n _props: EntityTableRowProps<TEntity>,\n): ReactNode {\n return null;\n}\n\nexport interface EntityTableToolbarProps {\n children?: ReactNode;\n}\n\n/** Extra actions placed alongside the built-in toolbar controls. */\nexport function EntityTableToolbar(_props: EntityTableToolbarProps): ReactNode {\n return null;\n}\n\nexport interface EntityTableSlots<TEntity extends Entity> {\n columns: Array<EntityColumnProps<TEntity>>;\n header?: EntityTableHeaderProps<TEntity>;\n row?: EntityTableRowProps<TEntity>;\n toolbar?: ReactNode;\n /** Children that matched no slot — rendered below the table untouched. */\n rest: ReactNode[];\n}\n\n/**\n * Sorts children into slots.\n *\n * Matching is by component identity rather than by `displayName`: identity\n * survives minification and cannot collide with an unrelated component that\n * happens to share a name.\n */\nexport function readEntityTableSlots<TEntity extends Entity>(\n children: ReactNode,\n): EntityTableSlots<TEntity> {\n const slots: EntityTableSlots<TEntity> = { columns: [], rest: [] };\n\n Children.toArray(children).forEach(child => {\n if (!isValidElement(child)) {\n slots.rest.push(child);\n return;\n }\n\n switch (child.type) {\n case EntityColumn:\n slots.columns.push(child.props as EntityColumnProps<TEntity>);\n break;\n case EntityTableHeader:\n slots.header = child.props as EntityTableHeaderProps<TEntity>;\n break;\n case EntityTableRow:\n slots.row = child.props as EntityTableRowProps<TEntity>;\n break;\n case EntityTableToolbar:\n slots.toolbar = (child.props as EntityTableToolbarProps).children;\n break;\n default:\n slots.rest.push(child);\n }\n });\n\n return slots;\n}\n"],"names":["Children","isValidElement","EntityColumn","_props","EntityTableHeader","EntityTableRow","EntityTableToolbar","readEntityTableSlots","children","slots","columns","rest","toArray","forEach","child","push","type","props","header","row","toolbar"],"mappings":"AACA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AA+BjE,mEAAmE,GACnE,OAAO,SAASC,aACdC,MAAkC;IAElC,OAAO;AACT;AAOA,OAAO,SAASC,kBACdD,MAAuC;IAEvC,OAAO;AACT;AAUA,OAAO,SAASE,eACdF,MAAoC;IAEpC,OAAO;AACT;AAMA,kEAAkE,GAClE,OAAO,SAASG,mBAAmBH,MAA+B;IAChE,OAAO;AACT;AAWA;;;;;;CAMC,GACD,OAAO,SAASI,qBACdC,QAAmB;IAEnB,MAAMC,QAAmC;QAAEC,SAAS,EAAE;QAAEC,MAAM,EAAE;IAAC;IAEjEX,SAASY,OAAO,CAACJ,UAAUK,OAAO,CAACC,CAAAA;QACjC,IAAI,eAACb,eAAea,QAAQ;YAC1BL,MAAME,IAAI,CAACI,IAAI,CAACD;YAChB;QACF;QAEA,OAAQA,MAAME,IAAI;YAChB,KAAKd;gBACHO,MAAMC,OAAO,CAACK,IAAI,CAACD,MAAMG,KAAK;gBAC9B;YACF,KAAKb;gBACHK,MAAMS,MAAM,GAAGJ,MAAMG,KAAK;gBAC1B;YACF,KAAKZ;gBACHI,MAAMU,GAAG,GAAGL,MAAMG,KAAK;gBACvB;YACF,KAAKX;gBACHG,MAAMW,OAAO,GAAG,AAACN,MAAMG,KAAK,CAA6BT,QAAQ;gBACjE;YACF;gBACEC,MAAME,IAAI,CAACI,IAAI,CAACD;QACpB;IACF;IAEA,OAAOL;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-entity-table-columns.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-table/use-entity-table-columns.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA0GjE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,MAAM,EAC9D,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAC5C,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAC9C,eAAe,EAAE,qBAAqB,EACtC,QAAQ,GAAE,SAAS,MAAM,EAAkB,EAC3C,OAAO,UAAQ,GACd;IACD,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAaA;AAED,MAAM,WAAW,2BAA2B,CAAC,OAAO,SAAS,MAAM;IACjE,2EAA2E;IAC3E,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,oCAAoC;IACpC,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,qBAAqB,CAAC;IACvC,kBAAkB,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC3D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,MAAM,EAC1D,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAC7C,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAC9C,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,aAAa,EAAE,MAAM,EACrB,QAAQ,GAAE,SAAS,MAAM,EAAkB,EAC3C,OAAO,UAAQ,GACd,2BAA2B,CAAC,OAAO,CAAC,CAqCtC"}
1
+ {"version":3,"file":"use-entity-table-columns.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-table/use-entity-table-columns.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA2GjE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,MAAM,EAC9D,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAC5C,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAC9C,eAAe,EAAE,qBAAqB,EACtC,QAAQ,GAAE,SAAS,MAAM,EAAkB,EAC3C,OAAO,UAAQ,GACd;IACD,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAaA;AAED,MAAM,WAAW,2BAA2B,CAAC,OAAO,SAAS,MAAM;IACjE,2EAA2E;IAC3E,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,oCAAoC;IACpC,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,qBAAqB,CAAC;IACvC,kBAAkB,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC3D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,MAAM,EAC1D,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAC7C,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAC9C,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,aAAa,EAAE,MAAM,EACrB,QAAQ,GAAE,SAAS,MAAM,EAAkB,EAC3C,OAAO,UAAQ,GACd,2BAA2B,CAAC,OAAO,CAAC,CAqCtC"}
@@ -40,6 +40,8 @@ const NONE_WITHHELD = [];
40
40
  resetOnClone: false
41
41
  }, slot.minWidth === undefined ? {} : {
42
42
  minWidth: slot.minWidth
43
+ }, slot.money === undefined ? {} : {
44
+ money: slot.money
43
45
  }, {
44
46
  header: slot.header,
45
47
  render: slot.render,
@@ -106,7 +108,7 @@ const NONE_WITHHELD = [];
106
108
  * then the user's persisted layout.
107
109
  */ export function useEntityTableColumns(entityConstructor, slotColumns, sample, preferenceKey, withheld = NONE_WITHHELD, showKey = false) {
108
110
  const { value: personalization, setValue: setPersonalization } = useUiPreference(preferenceKey, EMPTY_PERSONALIZATION);
109
- const metadata = useMemo(()=>describeEntityColumns(entityConstructor, sample), [
111
+ const metadata = useMemo(()=>describeEntityColumns(entityConstructor, sample).filter((descriptor)=>descriptor.presentation !== 'none'), [
110
112
  entityConstructor,
111
113
  sample
112
114
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ui/organisms/entity-table/use-entity-table-columns.ts"],"sourcesContent":["'use client';\n\nimport {\n describeEntityColumns,\n type Entity,\n type EntityConstructor,\n} from '@entifix/core';\nimport { useMemo } from 'react';\n\nimport { useLocalizedDescriptors } from '../../../i18n/index.js';\nimport { useUiPreference } from '../../../preferences/index.js';\nimport type { ColumnPersonalization } from '../../molecules/column-settings/index.js';\nimport type { EntityTableColumn } from './entity-table.types.js';\nimport type { EntityColumnProps } from './entity-table-slots.js';\n\nconst EMPTY_PERSONALIZATION: ColumnPersonalization = {};\nconst NONE_WITHHELD: readonly string[] = [];\n\n/**\n * Applies `<EntityColumn>` overrides on top of the metadata descriptors, and\n * appends a virtual column for any slot naming a member the entity does not\n * have (a computed column).\n */\nfunction mergeSlots<TEntity extends Entity>(\n descriptors: Array<EntityTableColumn<TEntity>>,\n slotColumns: Array<EntityColumnProps<TEntity>>,\n): Array<EntityTableColumn<TEntity>> {\n const merged = descriptors.map(descriptor => {\n const slot = slotColumns.find(entry => entry.field === descriptor.name);\n if (!slot) return descriptor;\n const { field: _field, ...overrides } = slot;\n return {\n ...descriptor,\n ...Object.fromEntries(\n Object.entries(overrides).filter(([, value]) => value !== undefined),\n ),\n } as EntityTableColumn<TEntity>;\n });\n\n const virtual = slotColumns\n .filter(slot => !descriptors.some(entry => entry.name === slot.field))\n .map<EntityTableColumn<TEntity>>((slot, index) => ({\n name: slot.field,\n key: slot.field,\n label: slot.label ?? slot.field,\n type: slot.type ?? 'string',\n sortable: slot.sortable ?? false,\n filterable: slot.filterable ?? false,\n order: slot.order ?? descriptors.length + index,\n readonly: false,\n required: false,\n linkLabelProperty: 'name',\n linkSearchProperty: 'name',\n linkSerialization: 'id',\n // A slot-only column has no accessor, so there is nothing for a copy to\n // reset — the value is computed from members that are cloned themselves.\n resetOnClone: false,\n ...(slot.minWidth === undefined ? {} : { minWidth: slot.minWidth }),\n header: slot.header,\n render: slot.render,\n virtual: true,\n }));\n\n return [...merged, ...virtual].sort(\n (left, right) => left.order - right.order,\n );\n}\n\n/**\n * Reorders columns per the stored personalization. Names the user never saw\n * (added to the entity after the layout was saved) keep their default position\n * at the end instead of vanishing, and stale names in the stored order are\n * dropped — so a saved layout degrades rather than breaks.\n */\nfunction applyOrder<TEntity extends Entity>(\n columns: Array<EntityTableColumn<TEntity>>,\n order: string[] | undefined,\n): Array<EntityTableColumn<TEntity>> {\n if (!order || order.length === 0) return columns;\n\n const ranked = order\n .map(name => columns.find(column => column.name === name))\n .filter((column): column is EntityTableColumn<TEntity> => !!column);\n const remaining = columns.filter(column => !order.includes(column.name));\n\n return [...ranked, ...remaining];\n}\n\n/**\n * Drops the columns the host withholds from this reader. Not a hidden column\n * the reader can bring back: it is gone from the settings, the filters, the\n * sort choices and the cards. A name that is no column throws, because a\n * withheld column that is still on screen is the failure nobody would notice.\n */\nfunction withhold<TEntity extends Entity>(\n columns: Array<EntityTableColumn<TEntity>>,\n withheld: readonly string[],\n): Array<EntityTableColumn<TEntity>> {\n for (const name of withheld) {\n if (!columns.some(column => column.name === name)) {\n throw new Error(\n `EntityTable was asked to hide \"${name}\", which is not one of its columns. ` +\n 'Name a member the entity declares, or a column a slot adds.',\n );\n }\n }\n return columns.filter(column => !withheld.includes(column.name));\n}\n\n/**\n * Whether a column is the record's own key — the entity's `id`, not a\n * reference to another record's.\n */\nfunction isOwnKey<TEntity extends Entity>(\n column: EntityTableColumn<TEntity>,\n): boolean {\n return column.type === 'id' && column.references === undefined;\n}\n\n/**\n * The whole column pipeline as a pure function — metadata descriptors, then\n * slot overrides, then what the host withholds and the record's own key\n * (unless `showKey`), then the user's stored layout.\n * Kept separate from the hook so the resolution rules can be reasoned about\n * (and tested) without React.\n */\nexport function resolveEntityTableColumns<TEntity extends Entity>(\n described: Array<EntityTableColumn<TEntity>>,\n slotColumns: Array<EntityColumnProps<TEntity>>,\n personalization: ColumnPersonalization,\n withheld: readonly string[] = NONE_WITHHELD,\n showKey = false,\n): {\n columns: Array<EntityTableColumn<TEntity>>;\n visibleColumns: Array<EntityTableColumn<TEntity>>;\n hidden: string[];\n} {\n const kept = withhold(mergeSlots(described, slotColumns), withheld);\n const columns = applyOrder(\n showKey ? kept : kept.filter(column => !isOwnKey(column)),\n personalization.order,\n );\n const hidden = personalization.hidden ?? [];\n\n return {\n columns,\n visibleColumns: columns.filter(column => !hidden.includes(column.name)),\n hidden,\n };\n}\n\nexport interface UseEntityTableColumnsResult<TEntity extends Entity> {\n /** Every column, in the user's order — what the settings popover lists. */\n columns: Array<EntityTableColumn<TEntity>>;\n /** The subset actually rendered. */\n visibleColumns: Array<EntityTableColumn<TEntity>>;\n hidden: string[];\n personalization: ColumnPersonalization;\n setPersonalization: (next: ColumnPersonalization) => void;\n}\n\n/**\n * Resolves the columns a table renders: entity metadata, then slot overrides,\n * then the user's persisted layout.\n */\nexport function useEntityTableColumns<TEntity extends Entity>(\n entityConstructor: EntityConstructor<TEntity>,\n slotColumns: Array<EntityColumnProps<TEntity>>,\n sample: TEntity | undefined,\n preferenceKey: string,\n withheld: readonly string[] = NONE_WITHHELD,\n showKey = false,\n): UseEntityTableColumnsResult<TEntity> {\n const { value: personalization, setValue: setPersonalization } =\n useUiPreference<ColumnPersonalization>(\n preferenceKey,\n EMPTY_PERSONALIZATION,\n );\n\n const metadata = useMemo(\n () =>\n describeEntityColumns(entityConstructor, sample) as Array<\n EntityTableColumn<TEntity>\n >,\n [entityConstructor, sample],\n );\n\n // Before slots merge, so an `<EntityColumn label>` override still wins over\n // the entity's own translated label.\n const described = useLocalizedDescriptors(metadata);\n\n // Not memoized: `slotColumns` is rebuilt from `children` on every render, so\n // any dependency list would miss every time. The work is a few array passes\n // over a handful of columns — cheaper than the comparison would be.\n const { columns, visibleColumns, hidden } = resolveEntityTableColumns(\n described,\n slotColumns,\n personalization,\n withheld,\n showKey,\n );\n\n return {\n columns,\n visibleColumns,\n hidden,\n personalization,\n setPersonalization,\n };\n}\n"],"names":["describeEntityColumns","useMemo","useLocalizedDescriptors","useUiPreference","EMPTY_PERSONALIZATION","NONE_WITHHELD","mergeSlots","descriptors","slotColumns","merged","map","descriptor","slot","find","entry","field","name","_field","overrides","Object","fromEntries","entries","filter","value","undefined","virtual","some","index","key","label","type","sortable","filterable","order","length","readonly","required","linkLabelProperty","linkSearchProperty","linkSerialization","resetOnClone","minWidth","header","render","sort","left","right","applyOrder","columns","ranked","column","remaining","includes","withhold","withheld","Error","isOwnKey","references","resolveEntityTableColumns","described","personalization","showKey","kept","hidden","visibleColumns","useEntityTableColumns","entityConstructor","sample","preferenceKey","setValue","setPersonalization","metadata"],"mappings":"AAAA;;;AAEA,SACEA,qBAAqB,QAGhB,gBAAgB;AACvB,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,eAAe,QAAQ,gCAAgC;AAKhE,MAAMC,wBAA+C,CAAC;AACtD,MAAMC,gBAAmC,EAAE;AAE3C;;;;CAIC,GACD,SAASC,WACPC,WAA8C,EAC9CC,WAA8C;IAE9C,MAAMC,SAASF,YAAYG,GAAG,CAACC,CAAAA;QAC7B,MAAMC,OAAOJ,YAAYK,IAAI,CAACC,CAAAA,QAASA,MAAMC,KAAK,KAAKJ,WAAWK,IAAI;QACtE,IAAI,CAACJ,MAAM,OAAOD;QAClB,MAAM,EAAEI,OAAOE,MAAM,EAAgB,GAAGL,MAAdM,6CAAcN;;;QACxC,OAAO,aACFD,YACAQ,OAAOC,WAAW,CACnBD,OAAOE,OAAO,CAACH,WAAWI,MAAM,CAAC,CAAC,GAAGC,MAAM,GAAKA,UAAUC;IAGhE;IAEA,MAAMC,UAAUjB,YACbc,MAAM,CAACV,CAAAA,OAAQ,CAACL,YAAYmB,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AK;IAEf,MAAM,EAAEtC,OAAOqC,eAAe,EAAES,UAAUC,kBAAkB,EAAE,GAC5DnE,gBACEiE,eACAhE;IAGJ,MAAMmE,WAAWtE,QACf,IACED,sBAAsBkE,mBAAmBC,SAG3C;QAACD;QAAmBC;KAAO;IAG7B,4EAA4E;IAC5E,qCAAqC;IACrC,MAAMR,YAAYzD,wBAAwBqE;IAE1C,6EAA6E;IAC7E,4EAA4E;IAC5E,oEAAoE;IACpE,MAAM,EAAEvB,OAAO,EAAEgB,cAAc,EAAED,MAAM,EAAE,GAAGL,0BAC1CC,WACAnD,aACAoD,iBACAN,UACAO;IAGF,OAAO;QACLb;QACAgB;QACAD;QACAH;QACAU;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../src/ui/organisms/entity-table/use-entity-table-columns.ts"],"sourcesContent":["'use client';\n\nimport {\n describeEntityColumns,\n type Entity,\n type EntityConstructor,\n} from '@entifix/core';\nimport { useMemo } from 'react';\n\nimport { useLocalizedDescriptors } from '../../../i18n/index.js';\nimport { useUiPreference } from '../../../preferences/index.js';\nimport type { ColumnPersonalization } from '../../molecules/column-settings/index.js';\nimport type { EntityTableColumn } from './entity-table.types.js';\nimport type { EntityColumnProps } from './entity-table-slots.js';\n\nconst EMPTY_PERSONALIZATION: ColumnPersonalization = {};\nconst NONE_WITHHELD: readonly string[] = [];\n\n/**\n * Applies `<EntityColumn>` overrides on top of the metadata descriptors, and\n * appends a virtual column for any slot naming a member the entity does not\n * have (a computed column).\n */\nfunction mergeSlots<TEntity extends Entity>(\n descriptors: Array<EntityTableColumn<TEntity>>,\n slotColumns: Array<EntityColumnProps<TEntity>>,\n): Array<EntityTableColumn<TEntity>> {\n const merged = descriptors.map(descriptor => {\n const slot = slotColumns.find(entry => entry.field === descriptor.name);\n if (!slot) return descriptor;\n const { field: _field, ...overrides } = slot;\n return {\n ...descriptor,\n ...Object.fromEntries(\n Object.entries(overrides).filter(([, value]) => value !== undefined),\n ),\n } as EntityTableColumn<TEntity>;\n });\n\n const virtual = slotColumns\n .filter(slot => !descriptors.some(entry => entry.name === slot.field))\n .map<EntityTableColumn<TEntity>>((slot, index) => ({\n name: slot.field,\n key: slot.field,\n label: slot.label ?? slot.field,\n type: slot.type ?? 'string',\n sortable: slot.sortable ?? false,\n filterable: slot.filterable ?? false,\n order: slot.order ?? descriptors.length + index,\n readonly: false,\n required: false,\n linkLabelProperty: 'name',\n linkSearchProperty: 'name',\n linkSerialization: 'id',\n // A slot-only column has no accessor, so there is nothing for a copy to\n // reset — the value is computed from members that are cloned themselves.\n resetOnClone: false,\n ...(slot.minWidth === undefined ? {} : { minWidth: slot.minWidth }),\n ...(slot.money === undefined ? {} : { money: slot.money }),\n header: slot.header,\n render: slot.render,\n virtual: true,\n }));\n\n return [...merged, ...virtual].sort(\n (left, right) => left.order - right.order,\n );\n}\n\n/**\n * Reorders columns per the stored personalization. Names the user never saw\n * (added to the entity after the layout was saved) keep their default position\n * at the end instead of vanishing, and stale names in the stored order are\n * dropped — so a saved layout degrades rather than breaks.\n */\nfunction applyOrder<TEntity extends Entity>(\n columns: Array<EntityTableColumn<TEntity>>,\n order: string[] | undefined,\n): Array<EntityTableColumn<TEntity>> {\n if (!order || order.length === 0) return columns;\n\n const ranked = order\n .map(name => columns.find(column => column.name === name))\n .filter((column): column is EntityTableColumn<TEntity> => !!column);\n const remaining = columns.filter(column => !order.includes(column.name));\n\n return [...ranked, ...remaining];\n}\n\n/**\n * Drops the columns the host withholds from this reader. Not a hidden column\n * the reader can bring back: it is gone from the settings, the filters, the\n * sort choices and the cards. A name that is no column throws, because a\n * withheld column that is still on screen is the failure nobody would notice.\n */\nfunction withhold<TEntity extends Entity>(\n columns: Array<EntityTableColumn<TEntity>>,\n withheld: readonly string[],\n): Array<EntityTableColumn<TEntity>> {\n for (const name of withheld) {\n if (!columns.some(column => column.name === name)) {\n throw new Error(\n `EntityTable was asked to hide \"${name}\", which is not one of its columns. ` +\n 'Name a member the entity declares, or a column a slot adds.',\n );\n }\n }\n return columns.filter(column => !withheld.includes(column.name));\n}\n\n/**\n * Whether a column is the record's own key — the entity's `id`, not a\n * reference to another record's.\n */\nfunction isOwnKey<TEntity extends Entity>(\n column: EntityTableColumn<TEntity>,\n): boolean {\n return column.type === 'id' && column.references === undefined;\n}\n\n/**\n * The whole column pipeline as a pure function — metadata descriptors, then\n * slot overrides, then what the host withholds and the record's own key\n * (unless `showKey`), then the user's stored layout.\n * Kept separate from the hook so the resolution rules can be reasoned about\n * (and tested) without React.\n */\nexport function resolveEntityTableColumns<TEntity extends Entity>(\n described: Array<EntityTableColumn<TEntity>>,\n slotColumns: Array<EntityColumnProps<TEntity>>,\n personalization: ColumnPersonalization,\n withheld: readonly string[] = NONE_WITHHELD,\n showKey = false,\n): {\n columns: Array<EntityTableColumn<TEntity>>;\n visibleColumns: Array<EntityTableColumn<TEntity>>;\n hidden: string[];\n} {\n const kept = withhold(mergeSlots(described, slotColumns), withheld);\n const columns = applyOrder(\n showKey ? kept : kept.filter(column => !isOwnKey(column)),\n personalization.order,\n );\n const hidden = personalization.hidden ?? [];\n\n return {\n columns,\n visibleColumns: columns.filter(column => !hidden.includes(column.name)),\n hidden,\n };\n}\n\nexport interface UseEntityTableColumnsResult<TEntity extends Entity> {\n /** Every column, in the user's order — what the settings popover lists. */\n columns: Array<EntityTableColumn<TEntity>>;\n /** The subset actually rendered. */\n visibleColumns: Array<EntityTableColumn<TEntity>>;\n hidden: string[];\n personalization: ColumnPersonalization;\n setPersonalization: (next: ColumnPersonalization) => void;\n}\n\n/**\n * Resolves the columns a table renders: entity metadata, then slot overrides,\n * then the user's persisted layout.\n */\nexport function useEntityTableColumns<TEntity extends Entity>(\n entityConstructor: EntityConstructor<TEntity>,\n slotColumns: Array<EntityColumnProps<TEntity>>,\n sample: TEntity | undefined,\n preferenceKey: string,\n withheld: readonly string[] = NONE_WITHHELD,\n showKey = false,\n): UseEntityTableColumnsResult<TEntity> {\n const { value: personalization, setValue: setPersonalization } =\n useUiPreference<ColumnPersonalization>(\n preferenceKey,\n EMPTY_PERSONALIZATION,\n );\n\n const metadata = useMemo(\n () =>\n describeEntityColumns(entityConstructor, sample).filter(\n descriptor => descriptor.presentation !== 'none',\n ) as Array<EntityTableColumn<TEntity>>,\n [entityConstructor, sample],\n );\n\n // Before slots merge, so an `<EntityColumn label>` override still wins over\n // the entity's own translated label.\n const described = useLocalizedDescriptors(metadata);\n\n // Not memoized: `slotColumns` is rebuilt from `children` on every render, so\n // any dependency list would miss every time. The work is a few array passes\n // over a handful of columns — cheaper than the comparison would be.\n const { columns, visibleColumns, hidden } = resolveEntityTableColumns(\n described,\n slotColumns,\n personalization,\n withheld,\n showKey,\n );\n\n return {\n columns,\n visibleColumns,\n hidden,\n personalization,\n setPersonalization,\n };\n}\n"],"names":["describeEntityColumns","useMemo","useLocalizedDescriptors","useUiPreference","EMPTY_PERSONALIZATION","NONE_WITHHELD","mergeSlots","descriptors","slotColumns","merged","map","descriptor","slot","find","entry","field","name","_field","overrides","Object","fromEntries","entries","filter","value","undefined","virtual","some","index","key","label","type","sortable","filterable","order","length","readonly","required","linkLabelProperty","linkSearchProperty","linkSerialization","resetOnClone","minWidth","money","header","render","sort","left","right","applyOrder","columns","ranked","column","remaining","includes","withhold","withheld","Error","isOwnKey","references","resolveEntityTableColumns","described","personalization","showKey","kept","hidden","visibleColumns","useEntityTableColumns","entityConstructor","sample","preferenceKey","setValue","setPersonalization","metadata","presentation"],"mappings":"AAAA;;;AAEA,SACEA,qBAAqB,QAGhB,gBAAgB;AACvB,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,eAAe,QAAQ,gCAAgC;AAKhE,MAAMC,wBAA+C,CAAC;AACtD,MAAMC,gBAAmC,EAAE;AAE3C;;;;CAIC,GACD,SAASC,WACPC,WAA8C,EAC9CC,WAA8C;IAE9C,MAAMC,SAASF,YAAYG,GAAG,CAACC,CAAAA;QAC7B,MAAMC,OAAOJ,YAAYK,IAAI,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,UAAUC,OAAOA,KAAKzC,MAAM,CAAC6B,CAAAA,SAAU,CAACM,SAASN,UACjDU,gBAAgB5B,KAAK;IAEvB,MAAM+B,UAASH,0BAAAA,gBAAgBG,MAAM,YAAtBH,0BAA0B,EAAE;IAE3C,OAAO;QACLZ;QACAgB,gBAAgBhB,QAAQ3B,MAAM,CAAC6B,CAAAA,SAAU,CAACa,OAAOX,QAAQ,CAACF,OAAOnC,IAAI;QACrEgD;IACF;AACF;AAYA;;;CAGC,GACD,OAAO,SAASE,sBACdC,iBAA6C,EAC7C3D,WAA8C,EAC9C4D,MAA2B,EAC3BC,aAAqB,EACrBd,WAA8BlD,aAAa,EAC3CyD,UAAU,KAAK;IAEf,MAAM,EAAEvC,OAAOsC,eAAe,EAAES,UAAUC,kBAAkB,EAAE,GAC5DpE,gBACEkE,eACAjE;IAGJ,MAAMoE,WAAWvE,QACf,IACED,sBAAsBmE,mBAAmBC,QAAQ9C,MAAM,CACrDX,CAAAA,aAAcA,WAAW8D,YAAY,KAAK,SAE9C;QAACN;QAAmBC;KAAO;IAG7B,4EAA4E;IAC5E,qCAAqC;IACrC,MAAMR,YAAY1D,wBAAwBsE;IAE1C,6EAA6E;IAC7E,4EAA4E;IAC5E,oEAAoE;IACpE,MAAM,EAAEvB,OAAO,EAAEgB,cAAc,EAAED,MAAM,EAAE,GAAGL,0BAC1CC,WACApD,aACAqD,iBACAN,UACAO;IAGF,OAAO;QACLb;QACAgB;QACAD;QACAH;QACAU;IACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entifix/react-controls",
3
- "version": "0.22.3",
3
+ "version": "0.23.0",
4
4
  "description": "Entity-agnostic React UI — table, form, filters, wizard, command palette — rendered from entity metadata, plus layout primitives.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  "@headlessui/react": "^2.2.10",
20
20
  "class-variance-authority": "^0.7.1",
21
21
  "idb": "^8.0.4",
22
- "@entifix/core": "0.22.3"
22
+ "@entifix/core": "0.23.0"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",
@@ -51,12 +51,12 @@
51
51
  "@storybook/addon-vitest": "^10.6.6",
52
52
  "@storybook/react-vite": "^10.6.6",
53
53
  "effect": "4.0.7",
54
- "i18next": "26.6.0",
54
+ "i18next": "27.1.1",
55
55
  "react": "19.3.1",
56
- "react-i18next": "17.1.10",
56
+ "react-i18next": "18.0.1",
57
57
  "storybook": "^10.6.6",
58
- "@entifix/i18n": "0.22.3",
59
- "@entifix/style": "0.22.3"
58
+ "@entifix/i18n": "0.23.0",
59
+ "@entifix/style": "0.23.0"
60
60
  },
61
61
  "nx": {
62
62
  "tags": [
@@ -108,10 +108,10 @@
108
108
  },
109
109
  "peerDependencies": {
110
110
  "effect": "^4.0.7",
111
- "i18next": ">=26 <27",
111
+ "i18next": ">=26 <28",
112
112
  "react": ">=19 <20",
113
- "react-i18next": ">=17 <18",
114
- "@entifix/i18n": "0.22.3"
113
+ "react-i18next": ">=17 <19",
114
+ "@entifix/i18n": "0.23.0"
115
115
  },
116
116
  "peerDependenciesMeta": {
117
117
  "@entifix/i18n": {