@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.js
CHANGED
|
@@ -239,6 +239,13 @@ function announceRecordChanged(recordId) {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
+
var removed = /* @__PURE__ */ new Set();
|
|
243
|
+
function markRecordRemoved(recordId) {
|
|
244
|
+
removed.add(recordId);
|
|
245
|
+
}
|
|
246
|
+
function markRecordRestored(recordId) {
|
|
247
|
+
removed.delete(recordId);
|
|
248
|
+
}
|
|
242
249
|
function onRecordChanged(listener) {
|
|
243
250
|
listeners.add(listener);
|
|
244
251
|
return () => listeners.delete(listener);
|
|
@@ -3068,7 +3075,10 @@ function createRecordsClient(given) {
|
|
|
3068
3075
|
{ p_organization_id: org, p_record_id: record_id },
|
|
3069
3076
|
"recordDelete"
|
|
3070
3077
|
);
|
|
3071
|
-
if (result.ok)
|
|
3078
|
+
if (result.ok) {
|
|
3079
|
+
markRecordRemoved(record_id);
|
|
3080
|
+
announceRecordChanged(record_id);
|
|
3081
|
+
}
|
|
3072
3082
|
return result;
|
|
3073
3083
|
},
|
|
3074
3084
|
async recordRestore({ record_id }) {
|
|
@@ -3077,7 +3087,10 @@ function createRecordsClient(given) {
|
|
|
3077
3087
|
{ p_organization_id: org, p_record_id: record_id },
|
|
3078
3088
|
"recordRestore"
|
|
3079
3089
|
);
|
|
3080
|
-
if (result.ok)
|
|
3090
|
+
if (result.ok) {
|
|
3091
|
+
markRecordRestored(record_id);
|
|
3092
|
+
announceRecordChanged(record_id);
|
|
3093
|
+
}
|
|
3081
3094
|
return result;
|
|
3082
3095
|
},
|
|
3083
3096
|
async tableArchive({ table_id, chunk, includeTable }) {
|