@ai-matrx/records 0.58.6 → 0.58.7
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 +19 -0
- package/dist/core/index.cjs +11 -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 +11 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +11 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +16 -2
- package/dist/react/index.d.ts +16 -2
- package/dist/react/index.js +11 -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,
|
|
@@ -2661,10 +2663,18 @@ async function exportPageXlsx(page, labels = {}, sheetLabel = "Records") {
|
|
|
2661
2663
|
}
|
|
2662
2664
|
return XLSX.write(workbook, { type: "array", bookType: "xlsx", compression: true });
|
|
2663
2665
|
}
|
|
2666
|
+
function recordSourceKey(tableId) {
|
|
2667
|
+
return `record:${tableId}`;
|
|
2668
|
+
}
|
|
2669
|
+
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})$/;
|
|
2670
|
+
function recordSourceTable(key) {
|
|
2671
|
+
const m = key ? SOURCE_KEY.exec(key) : null;
|
|
2672
|
+
return m ? m[2] : null;
|
|
2673
|
+
}
|
|
2664
2674
|
function recordChangeTrigger(tableId, options = {}) {
|
|
2665
2675
|
return {
|
|
2666
2676
|
type: "event",
|
|
2667
|
-
entity_type:
|
|
2677
|
+
entity_type: recordSourceKey(tableId),
|
|
2668
2678
|
table_id: tableId,
|
|
2669
2679
|
...options.actions && options.actions.length > 0 ? { actions: options.actions } : {},
|
|
2670
2680
|
...options.changedFields && options.changedFields.length > 0 ? { changed_fields: options.changedFields } : {}
|