@ai-matrx/records 0.26.0 → 0.27.0
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 +28 -0
- package/dist/core/index.cjs +62 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +40 -3
- package/dist/core/index.d.ts +40 -3
- package/dist/core/index.js +62 -0
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +149 -4
- package/dist/index.d.ts +149 -4
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +62 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +180 -4
- package/dist/react/index.d.ts +180 -4
- package/dist/react/index.js +62 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -40,6 +40,7 @@ __export(react_exports, {
|
|
|
40
40
|
PARITY_FIELD_TYPES: () => PARITY_FIELD_TYPES,
|
|
41
41
|
PERMISSION_LEVELS: () => PERMISSION_LEVELS,
|
|
42
42
|
PER_VALUE_ACCESS_WORDS: () => PER_VALUE_ACCESS_WORDS,
|
|
43
|
+
PIPELINE_RULE_KINDS: () => PIPELINE_RULE_KINDS,
|
|
43
44
|
REFUSALS_WORTH_REPEATING: () => REFUSALS_WORTH_REPEATING,
|
|
44
45
|
RELATION_BINDINGS: () => RELATION_BINDINGS,
|
|
45
46
|
RELATION_CARDINALITIES: () => RELATION_CARDINALITIES,
|
|
@@ -70,6 +71,7 @@ __export(react_exports, {
|
|
|
70
71
|
isRecordsErr: () => isRecordsErr,
|
|
71
72
|
isTheChosen: () => isTheChosen,
|
|
72
73
|
looksLikeAnId: () => looksLikeAnId,
|
|
74
|
+
mayDrag: () => mayDrag,
|
|
73
75
|
measureKey: () => measureKey,
|
|
74
76
|
memoryStore: () => memoryStore,
|
|
75
77
|
mintClientKey: () => mintClientKey,
|
|
@@ -1944,6 +1946,12 @@ var DOORS = {
|
|
|
1944
1946
|
tableKernelId: "table_kernel_id",
|
|
1945
1947
|
// A saved view references its membership Rule, and the STORE decides who is
|
|
1946
1948
|
// in it — the screen never re-implements the predicate.
|
|
1949
|
+
pipelineDeclare: "pipeline_declare",
|
|
1950
|
+
pipelineRead: "pipeline_read",
|
|
1951
|
+
pipelineBoard: "pipeline_board",
|
|
1952
|
+
pipelineTransitionRefusal: "pipeline_transition_refusal",
|
|
1953
|
+
pipelineMove: "pipeline_move",
|
|
1954
|
+
tableStageField: "table_stage_field",
|
|
1947
1955
|
ruleMembers: "rule_members",
|
|
1948
1956
|
ruleMembership: "rule_membership",
|
|
1949
1957
|
ruleRun: "rule_run",
|
|
@@ -2735,6 +2743,54 @@ function createRecordsClient(config) {
|
|
|
2735
2743
|
async ruleKernelId() {
|
|
2736
2744
|
return callDoor(DOORS.ruleKernelId, {}, "ruleKernelId");
|
|
2737
2745
|
},
|
|
2746
|
+
async pipelineRead({ table_id }) {
|
|
2747
|
+
return callDoor(
|
|
2748
|
+
DOORS.pipelineRead,
|
|
2749
|
+
{ p_organization_id: org, p_table_id: table_id },
|
|
2750
|
+
"pipelineRead"
|
|
2751
|
+
);
|
|
2752
|
+
},
|
|
2753
|
+
async pipelineBoard({ table_id, measure }) {
|
|
2754
|
+
return callDoor(
|
|
2755
|
+
DOORS.pipelineBoard,
|
|
2756
|
+
{ p_organization_id: org, p_table_id: table_id, p_measure: measure ?? null },
|
|
2757
|
+
"pipelineBoard"
|
|
2758
|
+
);
|
|
2759
|
+
},
|
|
2760
|
+
async pipelineTransitionRefusal({ record_id, to }) {
|
|
2761
|
+
return callDoor(
|
|
2762
|
+
DOORS.pipelineTransitionRefusal,
|
|
2763
|
+
{ p_organization_id: org, p_record_id: record_id, p_to: to },
|
|
2764
|
+
"pipelineTransitionRefusal"
|
|
2765
|
+
);
|
|
2766
|
+
},
|
|
2767
|
+
async pipelineMove({ record_id, to, also, expected_version }) {
|
|
2768
|
+
return callDoor(
|
|
2769
|
+
DOORS.pipelineMove,
|
|
2770
|
+
{
|
|
2771
|
+
p_organization_id: org,
|
|
2772
|
+
p_record_id: record_id,
|
|
2773
|
+
p_to: to,
|
|
2774
|
+
p_also: also ?? {},
|
|
2775
|
+
p_expected_version: expected_version ?? null
|
|
2776
|
+
},
|
|
2777
|
+
"pipelineMove"
|
|
2778
|
+
);
|
|
2779
|
+
},
|
|
2780
|
+
async pipelineDeclare({ table_id, spec }) {
|
|
2781
|
+
return callDoor(
|
|
2782
|
+
DOORS.pipelineDeclare,
|
|
2783
|
+
{ p_organization_id: org, p_table_id: table_id, p_spec: spec },
|
|
2784
|
+
"pipelineDeclare"
|
|
2785
|
+
);
|
|
2786
|
+
},
|
|
2787
|
+
async tableStageField({ table_id }) {
|
|
2788
|
+
return callDoor(
|
|
2789
|
+
DOORS.tableStageField,
|
|
2790
|
+
{ p_organization_id: org, p_table_id: table_id },
|
|
2791
|
+
"tableStageField"
|
|
2792
|
+
);
|
|
2793
|
+
},
|
|
2738
2794
|
async ruleMembers({ rule_id }) {
|
|
2739
2795
|
return callDoor(
|
|
2740
2796
|
DOORS.ruleMembers,
|
|
@@ -4407,6 +4463,12 @@ function looksLikeAnId(value) {
|
|
|
4407
4463
|
return typeof value === "string" && UUID.test(value);
|
|
4408
4464
|
}
|
|
4409
4465
|
|
|
4466
|
+
// src/pipeline.ts
|
|
4467
|
+
var PIPELINE_RULE_KINDS = ["moves", "requires", "who", "limit", "entry"];
|
|
4468
|
+
function mayDrag(level) {
|
|
4469
|
+
return level === "editor" || level === "admin" || level === "owner";
|
|
4470
|
+
}
|
|
4471
|
+
|
|
4410
4472
|
// src/rule.ts
|
|
4411
4473
|
function publicFormPath(formId) {
|
|
4412
4474
|
return `/f/${formId}`;
|