@object-ui/react 11.2.0 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @object-ui/react
2
2
 
3
+ ## 11.3.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d88c8ec]
8
+ - Updated dependencies [d23d6eb]
9
+ - @object-ui/i18n@11.3.0
10
+ - @object-ui/core@11.3.0
11
+ - @object-ui/data-objectstack@11.3.0
12
+ - @object-ui/types@11.3.0
13
+
3
14
  ## 11.2.0
4
15
 
5
16
  ### Patch Changes
@@ -6,32 +6,12 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { useEffect, useMemo, useRef, useState } from 'react';
9
- /**
10
- * Local copy of the display-name resolver used by app-shell. Kept in
11
- * `@object-ui/react` so hooks can derive a record's visible label without
12
- * pulling in the shell. Mirrors `app-shell/src/utils#getRecordDisplayName`;
13
- * the two should stay in sync.
14
- */
15
- function defaultDisplayName(objectDef, record) {
16
- const fmt = objectDef?.titleFormat;
17
- if (fmt && typeof fmt === 'string') {
18
- const rendered = fmt.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (_m, path) => {
19
- const v = path.split('.').reduce((acc, k) => (acc == null ? acc : acc[k]), record);
20
- return v == null ? '' : String(v);
21
- }).trim();
22
- if (rendered.length > 0)
23
- return rendered;
24
- }
25
- return (record?.name ||
26
- record?.full_name ||
27
- record?.fullName ||
28
- record?.title ||
29
- record?.label ||
30
- record?.subject ||
31
- record?.id ||
32
- record?._id ||
33
- 'Untitled');
34
- }
9
+ import { getRecordDisplayName as defaultDisplayName } from '@object-ui/core';
10
+ // ADR-0079: the global-search default display-name resolver is now the ONE
11
+ // shared `getRecordDisplayName` from `@object-ui/core` (honors titleFormat →
12
+ // `displayNameField` → type-aware derivation → `Record #<id>`). Callers can
13
+ // still pass an explicit `getDisplayName` (app-shell's CommandPalette passes
14
+ // the same shared resolver re-exported via `@object-ui/app-shell`).
35
15
  /**
36
16
  * Relevance score for a single record hit against the query. Higher wins.
37
17
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/react",
3
- "version": "11.2.0",
3
+ "version": "11.3.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "React bindings and SchemaRenderer component for Object UI",
@@ -24,12 +24,12 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@objectstack/spec": "^11.0.0",
27
+ "@objectstack/spec": "^11.2.0",
28
28
  "react-hook-form": "^7.80.0",
29
- "@object-ui/core": "11.2.0",
30
- "@object-ui/data-objectstack": "11.2.0",
31
- "@object-ui/i18n": "11.2.0",
32
- "@object-ui/types": "11.2.0"
29
+ "@object-ui/core": "11.3.0",
30
+ "@object-ui/i18n": "11.3.0",
31
+ "@object-ui/types": "11.3.0",
32
+ "@object-ui/data-objectstack": "11.3.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": "^18.0.0 || ^19.0.0",