@ai-matrx/records 0.58.6 → 0.58.8
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 +35 -0
- package/dist/core/index.cjs +12 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +12 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +12 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +22 -2
- package/dist/react/index.d.ts +22 -2
- package/dist/react/index.js +12 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -2304,6 +2304,8 @@ __export(react_exports, {
|
|
|
2304
2304
|
portalTitleTypedBack: () => portalTitleTypedBack,
|
|
2305
2305
|
publicFormPath: () => publicFormPath,
|
|
2306
2306
|
recordChangeTrigger: () => recordChangeTrigger,
|
|
2307
|
+
recordSourceKey: () => recordSourceKey,
|
|
2308
|
+
recordSourceTable: () => recordSourceTable,
|
|
2307
2309
|
rememberedOpCount: () => rememberedOpCount,
|
|
2308
2310
|
sameDocument: () => sameDocument,
|
|
2309
2311
|
scopeChip: () => scopeChip,
|
|
@@ -2516,6 +2518,7 @@ function parseTableHome(raw) {
|
|
|
2516
2518
|
destinations: destinations.filter((d) => !!d && typeof d === "object" && !!wordsOf(d.id)).map((d) => ({
|
|
2517
2519
|
id: String(d.id),
|
|
2518
2520
|
name: wordsOf(d.name) ?? "An organization",
|
|
2521
|
+
slug: wordsOf(d.slug),
|
|
2519
2522
|
role: wordsOf(d.role) ?? "member",
|
|
2520
2523
|
ok: d.ok === true,
|
|
2521
2524
|
why: wordsOf(d.why)
|
|
@@ -2661,10 +2664,18 @@ async function exportPageXlsx(page, labels = {}, sheetLabel = "Records") {
|
|
|
2661
2664
|
}
|
|
2662
2665
|
return XLSX.write(workbook, { type: "array", bookType: "xlsx", compression: true });
|
|
2663
2666
|
}
|
|
2667
|
+
function recordSourceKey(tableId) {
|
|
2668
|
+
return `record:${tableId}`;
|
|
2669
|
+
}
|
|
2670
|
+
var SOURCE_KEY = /^(record|custom_record):([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
2671
|
+
function recordSourceTable(key) {
|
|
2672
|
+
const m = key ? SOURCE_KEY.exec(key) : null;
|
|
2673
|
+
return m ? m[2] : null;
|
|
2674
|
+
}
|
|
2664
2675
|
function recordChangeTrigger(tableId, options = {}) {
|
|
2665
2676
|
return {
|
|
2666
2677
|
type: "event",
|
|
2667
|
-
entity_type:
|
|
2678
|
+
entity_type: recordSourceKey(tableId),
|
|
2668
2679
|
table_id: tableId,
|
|
2669
2680
|
...options.actions && options.actions.length > 0 ? { actions: options.actions } : {},
|
|
2670
2681
|
...options.changedFields && options.changedFields.length > 0 ? { changed_fields: options.changedFields } : {}
|