@ai-matrx/records 0.84.4 → 0.84.5
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 +8 -0
- package/dist/app-table/index.cjs +15 -2
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.js +15 -2
- package/dist/app-table/index.js.map +1 -1
- package/dist/core/index.cjs +23 -4
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +7 -1
- package/dist/core/index.d.ts +7 -1
- package/dist/core/index.js +23 -4
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +15 -2
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.js +15 -2
- package/dist/data/index.js.map +1 -1
- package/dist/react/index.cjs +20 -4
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +20 -4
- package/dist/react/index.js.map +1 -1
- package/package.json +3 -3
package/dist/data/index.cjs
CHANGED
|
@@ -283,6 +283,13 @@ function announceRecordChanged(recordId) {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
+
var removed = /* @__PURE__ */ new Set();
|
|
287
|
+
function markRecordRemoved(recordId) {
|
|
288
|
+
removed.add(recordId);
|
|
289
|
+
}
|
|
290
|
+
function markRecordRestored(recordId) {
|
|
291
|
+
removed.delete(recordId);
|
|
292
|
+
}
|
|
286
293
|
function onRecordChanged(listener) {
|
|
287
294
|
listeners.add(listener);
|
|
288
295
|
return () => listeners.delete(listener);
|
|
@@ -3112,7 +3119,10 @@ function createRecordsClient(given) {
|
|
|
3112
3119
|
{ p_organization_id: org, p_record_id: record_id },
|
|
3113
3120
|
"recordDelete"
|
|
3114
3121
|
);
|
|
3115
|
-
if (result.ok)
|
|
3122
|
+
if (result.ok) {
|
|
3123
|
+
markRecordRemoved(record_id);
|
|
3124
|
+
announceRecordChanged(record_id);
|
|
3125
|
+
}
|
|
3116
3126
|
return result;
|
|
3117
3127
|
},
|
|
3118
3128
|
async recordRestore({ record_id }) {
|
|
@@ -3121,7 +3131,10 @@ function createRecordsClient(given) {
|
|
|
3121
3131
|
{ p_organization_id: org, p_record_id: record_id },
|
|
3122
3132
|
"recordRestore"
|
|
3123
3133
|
);
|
|
3124
|
-
if (result.ok)
|
|
3134
|
+
if (result.ok) {
|
|
3135
|
+
markRecordRestored(record_id);
|
|
3136
|
+
announceRecordChanged(record_id);
|
|
3137
|
+
}
|
|
3125
3138
|
return result;
|
|
3126
3139
|
},
|
|
3127
3140
|
async tableArchive({ table_id, chunk, includeTable }) {
|