@ai-matrx/content-ir-react 0.12.0 → 0.12.2
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 +14 -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/index.js
CHANGED
|
@@ -718,9 +718,9 @@ import { useEffect, useRef, useState } from "react";
|
|
|
718
718
|
import { nounLabel } from "@ai-matrx/content-ir";
|
|
719
719
|
|
|
720
720
|
// directives/item-changes.ts
|
|
721
|
+
import { isUuidShape } from "@ai-matrx/kit/uuid";
|
|
721
722
|
var TARGETING_CLASSES = /* @__PURE__ */ new Set(["update", "delete"]);
|
|
722
723
|
var NOT_A_CHANGE = /* @__PURE__ */ new Set(["__kind", "id"]);
|
|
723
|
-
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
724
724
|
var CHANGE_VALUE_MAX = 60;
|
|
725
725
|
function itemRecordId(item) {
|
|
726
726
|
const id = item.id;
|
|
@@ -733,7 +733,7 @@ function fieldLabel(key) {
|
|
|
733
733
|
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
734
734
|
}
|
|
735
735
|
function recordFallbackName(nounLabel3, id) {
|
|
736
|
-
const short =
|
|
736
|
+
const short = isUuidShape(id) ? id.slice(0, 8) : id.length > 12 ? `${id.slice(0, 12)}\u2026` : id;
|
|
737
737
|
return `${nounLabel3} ${short}`;
|
|
738
738
|
}
|
|
739
739
|
function describeValue(value) {
|