@ai-matrx/content-ir-react 0.12.0 → 0.12.1
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 +7 -0
- package/dist/directives.cjs +2 -2
- package/dist/directives.cjs.map +1 -1
- package/dist/directives.js +2 -2
- package/dist/directives.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/package.json +3 -2
package/dist/react.js
CHANGED
|
@@ -88,9 +88,9 @@ import { useEffect, useRef, useState } from "react";
|
|
|
88
88
|
import { nounLabel } from "@ai-matrx/content-ir";
|
|
89
89
|
|
|
90
90
|
// directives/item-changes.ts
|
|
91
|
+
import { isUuidShape } from "@ai-matrx/kit/uuid";
|
|
91
92
|
var TARGETING_CLASSES = /* @__PURE__ */ new Set(["update", "delete"]);
|
|
92
93
|
var NOT_A_CHANGE = /* @__PURE__ */ new Set(["__kind", "id"]);
|
|
93
|
-
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
94
94
|
var CHANGE_VALUE_MAX = 60;
|
|
95
95
|
function itemRecordId(item) {
|
|
96
96
|
const id = item.id;
|
|
@@ -103,7 +103,7 @@ function fieldLabel(key) {
|
|
|
103
103
|
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
104
104
|
}
|
|
105
105
|
function recordFallbackName(nounLabel3, id) {
|
|
106
|
-
const short =
|
|
106
|
+
const short = isUuidShape(id) ? id.slice(0, 8) : id.length > 12 ? `${id.slice(0, 12)}\u2026` : id;
|
|
107
107
|
return `${nounLabel3} ${short}`;
|
|
108
108
|
}
|
|
109
109
|
function describeValue(value) {
|