@object-ui/core 17.6.0 → 18.0.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +7260 -0
  2. package/README.md +228 -14
  3. package/dist/actions/ActionEngine.d.ts +4 -2
  4. package/dist/actions/ActionEngine.js +13 -8
  5. package/dist/actions/ActionRunner.d.ts +473 -69
  6. package/dist/actions/ActionRunner.js +792 -125
  7. package/dist/actions/TransactionManager.d.ts +7 -2
  8. package/dist/actions/UndoManager.d.ts +8 -13
  9. package/dist/actions/actionKeys.d.ts +9 -7
  10. package/dist/actions/actionKeys.js +67 -14
  11. package/dist/actions/actionResponse.js +2 -2
  12. package/dist/actions/index.d.ts +2 -0
  13. package/dist/actions/index.js +2 -0
  14. package/dist/actions/navigationTarget.d.ts +41 -0
  15. package/dist/actions/navigationTarget.js +20 -0
  16. package/dist/actions/recordDelete.d.ts +154 -0
  17. package/dist/actions/recordDelete.js +110 -0
  18. package/dist/adapters/ApiDataSource.d.ts +8 -4
  19. package/dist/adapters/ApiDataSource.js +19 -7
  20. package/dist/adapters/ValueDataSource.d.ts +6 -1
  21. package/dist/adapters/ValueDataSource.js +1090 -98
  22. package/dist/adapters/batchTransaction.d.ts +1 -1
  23. package/dist/adapters/batchTransaction.js +1 -1
  24. package/dist/adapters/resolveDataSource.d.ts +9 -6
  25. package/dist/adapters/resolveDataSource.js +9 -12
  26. package/dist/builder/schema-builder.d.ts +38 -81
  27. package/dist/builder/schema-builder.js +33 -152
  28. package/dist/data-scope/ViewDataProvider.d.ts +8 -25
  29. package/dist/data-scope/ViewDataProvider.js +27 -54
  30. package/dist/data-scope/element-data-source.d.ts +261 -7
  31. package/dist/data-scope/element-data-source.js +342 -52
  32. package/dist/data-scope/index.d.ts +9 -4
  33. package/dist/data-scope/index.js +9 -4
  34. package/dist/evaluator/ExpressionEvaluator.d.ts +86 -0
  35. package/dist/evaluator/ExpressionEvaluator.js +184 -12
  36. package/dist/evaluator/FormulaFunctions.d.ts +0 -10
  37. package/dist/evaluator/FormulaFunctions.js +166 -27
  38. package/dist/evaluator/deadlineSettled.d.ts +40 -0
  39. package/dist/evaluator/deadlineSettled.js +45 -0
  40. package/dist/evaluator/declaredPredicate.d.ts +93 -9
  41. package/dist/evaluator/declaredPredicate.js +117 -16
  42. package/dist/evaluator/fieldRules.d.ts +88 -4
  43. package/dist/evaluator/fieldRules.js +208 -31
  44. package/dist/evaluator/index.d.ts +2 -0
  45. package/dist/evaluator/index.js +2 -0
  46. package/dist/evaluator/listConditional.d.ts +103 -34
  47. package/dist/evaluator/listConditional.js +127 -50
  48. package/dist/evaluator/optionRules.d.ts +77 -6
  49. package/dist/evaluator/optionRules.js +87 -10
  50. package/dist/evaluator/predicateInput.d.ts +15 -4
  51. package/dist/evaluator/predicateInput.js +35 -2
  52. package/dist/evaluator/rowPredicateCanon.d.ts +7 -18
  53. package/dist/evaluator/rowPredicateCanon.js +65 -115
  54. package/dist/evaluator/subjectPermissions.d.ts +105 -0
  55. package/dist/evaluator/subjectPermissions.js +86 -0
  56. package/dist/evaluator/unevaluablePredicate.d.ts +57 -0
  57. package/dist/evaluator/unevaluablePredicate.js +70 -0
  58. package/dist/index.d.ts +15 -0
  59. package/dist/index.js +83 -2
  60. package/dist/protocols/index.d.ts +0 -1
  61. package/dist/protocols/index.js +9 -1
  62. package/dist/registry/Registry.d.ts +382 -34
  63. package/dist/registry/Registry.js +247 -12
  64. package/dist/registry/WidgetRegistry.js +7 -3
  65. package/dist/registry/html-tier-intrinsics.d.ts +90 -0
  66. package/dist/registry/html-tier-intrinsics.js +110 -0
  67. package/dist/registry/public-blocks.d.ts +8 -0
  68. package/dist/registry/public-blocks.js +57 -0
  69. package/dist/theme/ThemeEngine.js +1 -1
  70. package/dist/utils/affordanceGrants.d.ts +371 -0
  71. package/dist/utils/affordanceGrants.js +252 -0
  72. package/dist/utils/chart-category-key.d.ts +82 -0
  73. package/dist/utils/chart-category-key.js +84 -0
  74. package/dist/utils/chart-measure-key.d.ts +64 -0
  75. package/dist/utils/chart-measure-key.js +65 -0
  76. package/dist/utils/chart-presentation.d.ts +95 -112
  77. package/dist/utils/chart-presentation.js +169 -104
  78. package/dist/utils/chart-series.d.ts +165 -5
  79. package/dist/utils/chart-series.js +123 -18
  80. package/dist/utils/column-sortability.d.ts +157 -0
  81. package/dist/utils/column-sortability.js +217 -0
  82. package/dist/utils/dashboard-filters.d.ts +38 -6
  83. package/dist/utils/dashboard-filters.js +107 -61
  84. package/dist/utils/dataset-format.d.ts +211 -30
  85. package/dist/utils/dataset-format.js +389 -46
  86. package/dist/utils/date-display.d.ts +346 -0
  87. package/dist/utils/date-display.js +644 -0
  88. package/dist/utils/date-macros.js +7 -0
  89. package/dist/utils/drill-down.d.ts +78 -0
  90. package/dist/utils/drill-down.js +93 -0
  91. package/dist/utils/emptiness.d.ts +96 -0
  92. package/dist/utils/emptiness.js +101 -0
  93. package/dist/utils/expand-fields.d.ts +81 -9
  94. package/dist/utils/expand-fields.js +81 -9
  95. package/dist/utils/extract-records.d.ts +65 -5
  96. package/dist/utils/extract-records.js +65 -8
  97. package/dist/utils/filter-converter.d.ts +158 -6
  98. package/dist/utils/filter-converter.js +1098 -24
  99. package/dist/utils/filter-tokens.d.ts +49 -5
  100. package/dist/utils/filter-tokens.js +105 -33
  101. package/dist/utils/grouping-fields.d.ts +61 -0
  102. package/dist/utils/grouping-fields.js +84 -0
  103. package/dist/utils/managedBy.d.ts +3 -3
  104. package/dist/utils/managedBy.js +5 -5
  105. package/dist/utils/native-date-value.d.ts +48 -0
  106. package/dist/utils/native-date-value.js +167 -0
  107. package/dist/utils/non-grid-row-ceiling.d.ts +143 -0
  108. package/dist/utils/non-grid-row-ceiling.js +141 -0
  109. package/dist/utils/normalize-list-view.d.ts +135 -11
  110. package/dist/utils/normalize-list-view.js +243 -64
  111. package/dist/utils/number-display.d.ts +63 -14
  112. package/dist/utils/number-display.js +34 -12
  113. package/dist/utils/object-aggregate-query.d.ts +113 -0
  114. package/dist/utils/object-aggregate-query.js +50 -0
  115. package/dist/utils/parent-scope.d.ts +123 -0
  116. package/dist/utils/parent-scope.js +140 -0
  117. package/dist/utils/predicate-fields.d.ts +45 -12
  118. package/dist/utils/predicate-fields.js +141 -12
  119. package/dist/utils/record-color.d.ts +75 -0
  120. package/dist/utils/record-color.js +65 -0
  121. package/dist/utils/record-source.d.ts +298 -0
  122. package/dist/utils/record-source.js +331 -0
  123. package/dist/utils/record-title.d.ts +148 -8
  124. package/dist/utils/record-title.js +220 -26
  125. package/dist/utils/reference-keys.d.ts +21 -22
  126. package/dist/utils/reference-keys.js +532 -29
  127. package/dist/utils/sort-query.d.ts +115 -15
  128. package/dist/utils/sort-query.js +240 -13
  129. package/dist/utils/text-comparand.d.ts +92 -0
  130. package/dist/utils/text-comparand.js +99 -0
  131. package/dist/utils/without-denied-fields.d.ts +49 -0
  132. package/dist/utils/without-denied-fields.js +52 -0
  133. package/dist/validation/index.d.ts +8 -4
  134. package/dist/validation/index.js +8 -4
  135. package/dist/validation/schema-validator.d.ts +1 -1
  136. package/dist/validation/schema-validator.js +225 -83
  137. package/dist/validation/server-owned-value.d.ts +5 -1
  138. package/dist/validation/server-owned-value.js +5 -1
  139. package/dist/validation/validators/object-validation-engine.d.ts +1 -1
  140. package/dist/validation/validators/object-validation-engine.js +14 -3
  141. package/package.json +8 -9
  142. package/dist/data-scope/DataScopeManager.d.ts +0 -127
  143. package/dist/data-scope/DataScopeManager.js +0 -229
  144. package/dist/protocols/ResponsiveProtocol.d.ts +0 -73
  145. package/dist/protocols/ResponsiveProtocol.js +0 -158
  146. package/dist/validation/validation-engine.d.ts +0 -88
  147. package/dist/validation/validation-engine.js +0 -434
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  export * from './registry/Registry.js';
9
9
  export * from './registry/public-blocks.js';
10
+ export * from './registry/html-tier-intrinsics.js';
10
11
  export * from './registry/PluginSystem.js';
11
12
  export * from './registry/PluginScopeImpl.js';
12
13
  export * from './registry/WidgetRegistry.js';
@@ -20,7 +21,21 @@ export * from './builder/schema-builder.js';
20
21
  export * from './utils/dom-props.js';
21
22
  export * from './utils/filter-converter.js';
22
23
  export * from './utils/managedBy.js';
24
+ // The affordance-to-grant map (objectui#12082): every console affordance that
25
+ // offers a write reads the grant it exercises from this one table.
26
+ export * from './utils/affordanceGrants.js';
23
27
  export * from './utils/extract-records.js';
28
+ // The non-grid row ceiling (objectui#7210), homed beside the `extractRecords`
29
+ // it wraps by objectui#7508's ruling A′. `@object-ui/react` re-exports three of
30
+ // these names and keeps only the React footnote, `NonGridRowCeilingNote`.
31
+ export * from './utils/non-grid-row-ceiling.js';
32
+ // The emptiness FLOOR (objectui#8496, director seat, decision batch #86): the
33
+ // weakest common claim about "is this value empty" — `null`, `undefined`, the
34
+ // empty string, the empty array — below `plugin-detail`, `plugin-list`,
35
+ // `plugin-kanban` and `@object-ui/fields`, each of which used to spell those
36
+ // four members privately. Surfaces EXTEND it or DECLINE a member out loud; ⛔
37
+ // the floor itself never grows past the four.
38
+ export * from './utils/emptiness.js';
24
39
  export * from './utils/expand-fields.js';
25
40
  // The RETIREMENT gate (objectui#4914, maintainer ruling B). Homed here rather
26
41
  // than in `@object-ui/fields` because `@object-ui/components` is one of its six
@@ -29,6 +44,12 @@ export * from './utils/expand-fields.js';
29
44
  // name, so its published surface is unchanged.
30
45
  export * from './utils/retired-field-types.js';
31
46
  export * from './utils/unmaterialized-fields.js';
47
+ // [#5729] The consumer half of objectstack#10235's ruling: the SERVED
48
+ // per-column sortability projection, and the one spelling of its contract
49
+ // (`entry exists && sortable: true`). Homed beside the storage-fact set above
50
+ // because a consumer that reaches for one must be able to see the other and
51
+ // know which one the platform actually served.
52
+ export * from './utils/column-sortability.js';
32
53
  export * from './utils/column-identity.js';
33
54
  export * from './utils/sort-values.js';
34
55
  export * from './utils/sort-query.js';
@@ -55,14 +76,29 @@ export * from './runtime/capabilities.js';
55
76
  export { composeStacks } from '@objectstack/spec';
56
77
  export * from './utils/drill-down.js';
57
78
  export * from './utils/date-macros.js';
58
- // Session-scoped filter placeholders ({current_user_id} / {current_org_id})
79
+ // Session-scoped filter placeholders ({current_user_id} / {current_org_id}),
80
+ // the record-scoped `{record_id}` (objectui#7297),
59
81
  // plus `resolveFilterPlaceholders`, the single entry point every surface
60
- // should call so no vocabulary is silently skipped (framework #3574).
82
+ // should call so no vocabulary is silently skipped (objectstack-ai/objectstack#3574).
61
83
  export * from './utils/filter-tokens.js';
62
84
  export * from './utils/dashboard-filters.js';
63
85
  export * from './utils/merge-filters.js';
64
86
  export * from './utils/compare-to.js';
65
87
  export * from './utils/chart-series.js';
88
+ // "Which result column carries the measure?" — one answer for the row
89
+ // projection and the series binding alike, delegated to the spec's own
90
+ // derivation so the two cannot drift (objectui#8266).
91
+ export * from './utils/chart-measure-key.js';
92
+ // "Which result column carries the CATEGORY?" — the same move on the other
93
+ // axis, delegated to the contract's own published derivation so a relay cannot
94
+ // floor the x-axis binding on a literal the aggregate contradicts
95
+ // (objectui#8269).
96
+ export * from './utils/chart-category-key.js';
97
+ // "Which CALL does an object-bound aggregate make when its `groupBy` is the
98
+ // structured date-bucketing node?" — the same move on the REQUEST rather than
99
+ // on a result column, so the chart and the metric cannot post two different
100
+ // wires for one authored shape (objectui#8613).
101
+ export * from './utils/object-aggregate-query.js';
66
102
  // The AUTHORED half of a dataset-bound chart (objectui#4229's data/presentation
67
103
  // split), shared by the dashboard widget and the report's embedded chart so the
68
104
  // same spec keys are lowered identically on both (objectui#4877).
@@ -73,12 +109,26 @@ export * from './utils/chart-presentation.js';
73
109
  // `dataset-format` below from reaching it (so the two drifted). `@object-ui/i18n`
74
110
  // re-exports these names unchanged, so both import paths name the same symbol.
75
111
  export * from './utils/number-display.js';
112
+ // The ONE date-display path (objectui#7178) — the same story one type over.
113
+ // It lived in `@object-ui/fields`' React barrel, which `dataset-format`
114
+ // below could not import, so a date-valued measure rendered its raw ISO
115
+ // string. `@object-ui/fields` re-exports these names unchanged.
116
+ export * from './utils/date-display.js';
117
+ // The native date/time control adapters (objectui#3127), moved down from
118
+ // `@object-ui/fields` so `@object-ui/components`' data table can share them
119
+ // instead of keeping private copies (objectui#10625). `@object-ui/fields`
120
+ // re-exports these names unchanged.
121
+ export * from './utils/native-date-value.js';
76
122
  export * from './utils/dataset-format.js';
77
123
  // Pivot lookup-key encoders, shared by every cross-tab renderer so the
78
124
  // dashboard widget and the report renderer key their buckets identically
79
125
  // (objectstack#5473 / objectstack#5665).
80
126
  export * from './utils/dataset-pivot.js';
81
127
  export * from './utils/record-title.js';
128
+ // The one `colorField` ladder every record view shares (objectui#7243) — the
129
+ // gantt, calendar and timeline all resolve an authored option colour here
130
+ // instead of each guessing at the raw stored value.
131
+ export * from './utils/record-color.js';
82
132
  export * from './utils/export-filename.js';
83
133
  export * from './utils/reference-keys.js';
84
134
  // Binds a fetched record into an expression scope the way the SERVER binds it
@@ -86,10 +136,41 @@ export * from './utils/reference-keys.js';
86
136
  // `toPredicateRecord` for why an unnormalized one gives the same predicate
87
137
  // different verdicts on different surfaces.
88
138
  export * from './utils/predicate-record.js';
139
+ // The field-read rule for ONE record (objectui#10594, ruling A): the row as the
140
+ // viewer may read it, which every surface that builds a display value from a
141
+ // whole row calls. It replaced module-private copies in `@object-ui/fields`,
142
+ // `@object-ui/react`, `@object-ui/app-shell` and `@object-ui/plugin-detail`.
143
+ export * from './utils/without-denied-fields.js';
144
+ // The parent-relationship condition a detail-page related list is scoped by.
145
+ // One implementation, imported by BOTH the row query and the tab-badge count
146
+ // probe — objectui#8882 is what two of them cost.
147
+ export * from './utils/parent-scope.js';
89
148
  // The other half of a view's field appetite: the fields its PREDICATES read,
90
149
  // which the column-derived `$select` never asked the server for.
91
150
  export * from './utils/predicate-fields.js';
151
+ // The THIRD source of a view's field appetite: the fields it GROUPS BY. The
152
+ // spec's `grouping` block is a sibling of `columns`, not a subset, so a grid
153
+ // may group by a field it never shows (objectui#7179).
154
+ export * from './utils/grouping-fields.js';
92
155
  export * from './utils/normalize-list-view.js';
156
+ // The ONE record-source ladder, both halves. `resolveRecordSourceConfig`
157
+ // (`ce2aaefe1`) is the PRODUCER — the ruled `data` / `staticData` /
158
+ // `objectName` ladder, hand-copied into five view plugins with no gate holding
159
+ // them together. `resolveRecordSourceObjectName` (`b041b9c0c`) is the READER
160
+ // over its output: six view plugins each spelled "the object this block is
161
+ // bound to — the resolved data config's object when it names one, else
162
+ // `objectName`" locally, and had drifted. Both are deliberately SEPARATE from
163
+ // the `normalizeListViewSchema` gap-fill above: that one answers how
164
+ // `objectName` gets POPULATED when absent (#7477 ruling B), these answer which
165
+ // object a block RESOLVES (the three-rung ladder `77cb489b4` declared). Merging them
166
+ // would override one standing ruling or the other.
167
+ // A THIRD reading ships beside them since objectui#9571:
168
+ // `recordSourceDataArmForType` answers which `data` arm a registered block TYPE
169
+ // declares, for the one consumer that cannot be handed the arm as a parameter —
170
+ // `SchemaRenderer`, which is generic over every type and holds only
171
+ // `schema.type`. Read its docblock before adding a row; it transports the call
172
+ // sites' own literals rather than re-deriving them.
173
+ export * from './utils/record-source.js';
93
174
  // The single home for the VALUE fallback prettifier (a stored value becomes a
94
175
  // display string when nothing resolves it). `@object-ui/fields` and
95
176
  // `@object-ui/plugin-charts` each carried a byte-identical private copy;
@@ -7,5 +7,4 @@
7
7
  */
8
8
  export * from './DndProtocol.js';
9
9
  export * from './KeyboardProtocol.js';
10
- export * from './ResponsiveProtocol.js';
11
10
  export * from './SharingProtocol.js';
@@ -15,5 +15,13 @@ export * from './KeyboardProtocol.js';
15
15
  // which declares its own `NotificationSystemConfig` and is what every surface
16
16
  // reads. Re-typing the bridge would have meant re-declaring a vocabulary the
17
17
  // spec had just retired (AGENTS.md #0.1).
18
- export * from './ResponsiveProtocol.js';
18
+ // `ResponsiveProtocol` removed in the objectstack#11027 uptake (objectui#7580):
19
+ // it bridged `@objectstack/spec/ui`'s `ResponsiveConfig`, which that retirement
20
+ // deleted with no successor, and it had zero importers in this repo (measured on
21
+ // objectui#4773; `docs/audits/2901-spec-enum-renderer-coverage.md` had already
22
+ // recorded it as one of the zero-importer protocols). Re-typing the bridge would
23
+ // have meant re-declaring a vocabulary the spec had just retired, for a reader
24
+ // that does not exist — AGENTS.md #0.1, and the same disposition
25
+ // `NotificationProtocol` got above. The layout vocabulary that DOES have a
26
+ // renderer is re-homed instead, in `@object-ui/types` and `@object-ui/layout`.
19
27
  export * from './SharingProtocol.js';