@ai-matrx/records 0.84.2 → 0.84.3
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 +6 -0
- package/dist/app-table/index.cjs +18 -2
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.js +18 -2
- package/dist/app-table/index.js.map +1 -1
- package/dist/core/index.cjs +18 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +5 -2
- package/dist/core/index.d.ts +5 -2
- package/dist/core/index.js +18 -2
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +18 -2
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.js +18 -2
- package/dist/data/index.js.map +1 -1
- package/dist/react/index.cjs +18 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +18 -2
- package/dist/react/index.js.map +1 -1
- package/package.json +3 -3
package/dist/react/index.js
CHANGED
|
@@ -51,9 +51,20 @@ function takePrimedDoorAnswer(key) {
|
|
|
51
51
|
registry2.delete(key);
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
function dropPrimedDoorAnswers() {
|
|
55
|
-
doorRegistry()
|
|
54
|
+
function dropPrimedDoorAnswers(doors) {
|
|
55
|
+
const registry2 = doorRegistry();
|
|
56
|
+
if (!doors) {
|
|
57
|
+
registry2.clear();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
for (const key of [...registry2.keys()]) if (doors.some((door) => key.startsWith(`${door}|`))) registry2.delete(key);
|
|
56
61
|
}
|
|
62
|
+
var LOOK_WRITES = {
|
|
63
|
+
view_declare: ["views", "view_look_read", "grid_layout", "table_page_bundle"],
|
|
64
|
+
view_designate: ["views", "view_look_read", "grid_layout", "table_page_bundle"],
|
|
65
|
+
view_look_set: ["views", "view_look_read", "grid_layout", "table_page_bundle"],
|
|
66
|
+
view_record_order_set: ["views", "view_look_read", "grid_layout", "table_page_bundle"]
|
|
67
|
+
};
|
|
57
68
|
function isWritingDoor(door) {
|
|
58
69
|
return /(_declare|_set(_|$)|_update|_write|_delete|_restore|_archive|_upsert|_reparent|_change|_duplicate|_move|_decide|_run$|_submit|_publish|_import_|_start$|_complete|_sign$|_add$|_retire|_propose|_promote|_land$|_pin$|_mute|_snooze|_unsnooze|_clear|_unclear|_revoke|_issue|_bind|_unbind|_apply|_backfill|_sync$|_decorate|_designate|_ensure|^migrate_|^home_add|^capture_|^claim_|^record_stage|^anon_|^io_import_|^io_comment_resolve|^enrich_(declare|land|pin)|^field_(declare|duplicate|propose|restore|retire|update)|^table_(declare|ensure|from_example|move|sync)|^value_restore|^relation_own)/.test(door);
|
|
59
70
|
}
|
|
@@ -4255,6 +4266,11 @@ function createRecordsClient(given) {
|
|
|
4255
4266
|
for (const key of [...bundleParts.keys()]) if (key.includes(tableId)) bundleParts.delete(key);
|
|
4256
4267
|
}
|
|
4257
4268
|
function primedFor(door, args) {
|
|
4269
|
+
const look = LOOK_WRITES[door];
|
|
4270
|
+
if (look) {
|
|
4271
|
+
dropPrimedDoorAnswers(look);
|
|
4272
|
+
return null;
|
|
4273
|
+
}
|
|
4258
4274
|
if (isWritingDoor(door)) {
|
|
4259
4275
|
dropPrimedDoorAnswers();
|
|
4260
4276
|
return null;
|