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