@burdenoff/microfe-bigconsole 2026.1119.3 → 2026.1119.4
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/dist/bigconsole/components/parser/ParserSelector.js +150 -145
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +50 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +223 -201
- package/dist/bigconsole/customWidget/index.d.ts +2 -1
- package/dist/bigconsole/customWidget/index.js +1 -0
- package/dist/bigconsole/customWidget/proposalContract.d.ts +55 -1
- package/dist/bigconsole/customWidget/proposalContract.js +37 -14
- package/dist/bigconsole/customWidget/proposalPreviewData.d.ts +18 -0
- package/dist/bigconsole/customWidget/proposalPreviewData.js +70 -0
- package/dist/bigconsole/customWidget/proposalSource.d.ts +10 -0
- package/dist/bigconsole/customWidget/proposalSource.js +197 -51
- package/dist/bigconsole/hooks/useParserOperations.js +80 -74
- package/dist/bigconsole/pages/ParserBuilderPage.js +540 -518
- package/dist/bigconsole/store/parserScope.d.ts +24 -0
- package/dist/bigconsole/store/parserScope.js +17 -0
- package/dist/bigconsole/store/parserStore.d.ts +3 -0
- package/dist/bigconsole/store/parserStore.js +70 -68
- package/dist/generated/wspace-operations.d.ts +10 -0
- package/dist/generated/wspace-operations.js +180 -110
- package/package.json +1 -1
|
@@ -1,98 +1,104 @@
|
|
|
1
1
|
import { useParserStore as e } from "../store/parserStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { selectParsersInScope as t } from "../store/parserScope.js";
|
|
3
|
+
import { CreateParserDocument as n, DeleteParserDocument as r, ExecuteParserDocument as i, GetParserDocument as a, ListParsersDocument as o, TestParserExpressionDocument as s, UpdateParserDocument as c } from "../../generated/wspace-operations.js";
|
|
4
|
+
import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
5
|
+
import { useApolloClient as p } from "@apollo/client/react";
|
|
5
6
|
// src/bigconsole/hooks/useParserOperations.ts
|
|
6
|
-
function
|
|
7
|
-
let { consoleId:
|
|
8
|
-
|
|
7
|
+
function m(m = {}) {
|
|
8
|
+
let { consoleId: h, skipFetch: g = !1 } = m, [_, v] = f(!1), [y, b] = f(null), x = p(), S = e((e) => e.parsers), C = e((e) => e.setParsers), w = e((e) => e.replaceParsersInScope), T = e((e) => e.addParser), E = e((e) => e.updateParser), D = e((e) => e.removeParser), O = e((e) => e.setParserTesting), k = d(() => h ? {
|
|
9
|
+
kind: "console",
|
|
10
|
+
consoleId: h
|
|
11
|
+
} : null, [h]), A = d(() => k ? t(S, k) : [], [S, k]), j = l(async (e) => {
|
|
12
|
+
if (!k || !h) return [];
|
|
9
13
|
try {
|
|
10
|
-
|
|
11
|
-
let t = ((await
|
|
12
|
-
query:
|
|
14
|
+
v(!0), b(null);
|
|
15
|
+
let t = ((await x.query({
|
|
16
|
+
query: o,
|
|
13
17
|
variables: {
|
|
14
|
-
consoleId:
|
|
18
|
+
consoleId: h,
|
|
15
19
|
type: e?.type,
|
|
16
20
|
status: e?.status,
|
|
17
21
|
first: 100
|
|
18
22
|
},
|
|
19
23
|
fetchPolicy: "network-only"
|
|
20
24
|
})).data?.listParsers?.edges || []).map((e) => e.node);
|
|
21
|
-
return
|
|
25
|
+
return e?.type || e?.status ? C(t) : w(k, t), t;
|
|
22
26
|
} catch (e) {
|
|
23
27
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch parsers");
|
|
24
|
-
return
|
|
28
|
+
return b(t), [];
|
|
25
29
|
} finally {
|
|
26
|
-
|
|
30
|
+
v(!1);
|
|
27
31
|
}
|
|
28
32
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
x,
|
|
34
|
+
h,
|
|
35
|
+
k,
|
|
36
|
+
C,
|
|
37
|
+
w
|
|
38
|
+
]), M = l(async (e) => {
|
|
33
39
|
try {
|
|
34
|
-
|
|
35
|
-
let t = (await
|
|
36
|
-
query:
|
|
40
|
+
v(!0), b(null);
|
|
41
|
+
let t = (await x.query({
|
|
42
|
+
query: a,
|
|
37
43
|
variables: { id: e },
|
|
38
44
|
fetchPolicy: "network-only"
|
|
39
45
|
})).data?.parser;
|
|
40
|
-
return t ? (
|
|
46
|
+
return t ? (T(t), t) : null;
|
|
41
47
|
} catch (e) {
|
|
42
48
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to fetch parser");
|
|
43
|
-
return
|
|
49
|
+
return b(t), null;
|
|
44
50
|
} finally {
|
|
45
|
-
|
|
51
|
+
v(!1);
|
|
46
52
|
}
|
|
47
|
-
}, [
|
|
53
|
+
}, [x, T]), N = l(async (e) => {
|
|
48
54
|
try {
|
|
49
|
-
|
|
50
|
-
let
|
|
51
|
-
mutation:
|
|
55
|
+
v(!0), b(null);
|
|
56
|
+
let t = (await x.mutate({
|
|
57
|
+
mutation: n,
|
|
52
58
|
variables: { input: e }
|
|
53
59
|
})).data?.createParser;
|
|
54
|
-
return
|
|
60
|
+
return t ? (T(t), t) : null;
|
|
55
61
|
} catch (e) {
|
|
56
62
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create parser");
|
|
57
|
-
return
|
|
63
|
+
return b(t), null;
|
|
58
64
|
} finally {
|
|
59
|
-
|
|
65
|
+
v(!1);
|
|
60
66
|
}
|
|
61
|
-
}, [
|
|
67
|
+
}, [x, T]), P = l(async (e, t, n) => {
|
|
62
68
|
try {
|
|
63
|
-
|
|
64
|
-
let r = (await
|
|
65
|
-
mutation:
|
|
69
|
+
v(!0), b(null);
|
|
70
|
+
let r = (await x.mutate({
|
|
71
|
+
mutation: c,
|
|
66
72
|
variables: {
|
|
67
73
|
id: e,
|
|
68
74
|
input: t,
|
|
69
75
|
version: n
|
|
70
76
|
}
|
|
71
77
|
})).data?.updateParser;
|
|
72
|
-
return r ? (
|
|
78
|
+
return r ? (E(e, r), r) : null;
|
|
73
79
|
} catch (e) {
|
|
74
80
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to update parser");
|
|
75
|
-
return
|
|
81
|
+
return b(t), null;
|
|
76
82
|
} finally {
|
|
77
|
-
|
|
83
|
+
v(!1);
|
|
78
84
|
}
|
|
79
|
-
}, [
|
|
85
|
+
}, [x, E]), F = l(async (e) => {
|
|
80
86
|
try {
|
|
81
|
-
return
|
|
82
|
-
mutation:
|
|
87
|
+
return v(!0), b(null), await x.mutate({
|
|
88
|
+
mutation: r,
|
|
83
89
|
variables: { id: e }
|
|
84
|
-
}),
|
|
90
|
+
}), D(e), !0;
|
|
85
91
|
} catch (e) {
|
|
86
92
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to delete parser");
|
|
87
|
-
return
|
|
93
|
+
return b(t), !1;
|
|
88
94
|
} finally {
|
|
89
|
-
|
|
95
|
+
v(!1);
|
|
90
96
|
}
|
|
91
|
-
}, [
|
|
97
|
+
}, [x, D]), I = l(async (e) => {
|
|
92
98
|
try {
|
|
93
|
-
|
|
94
|
-
let t = (await
|
|
95
|
-
mutation:
|
|
99
|
+
v(!0), b(null), O(e, !0);
|
|
100
|
+
let t = (await x.mutate({
|
|
101
|
+
mutation: i,
|
|
96
102
|
variables: { id: e }
|
|
97
103
|
})).data?.executeParser;
|
|
98
104
|
return t ? {
|
|
@@ -105,15 +111,15 @@ function p(p = {}) {
|
|
|
105
111
|
} : null;
|
|
106
112
|
} catch (e) {
|
|
107
113
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to execute parser");
|
|
108
|
-
return
|
|
114
|
+
return b(t), null;
|
|
109
115
|
} finally {
|
|
110
|
-
|
|
116
|
+
v(!1), O(e, !1);
|
|
111
117
|
}
|
|
112
|
-
}, [
|
|
118
|
+
}, [x, O]), L = l(async (e) => {
|
|
113
119
|
try {
|
|
114
|
-
|
|
115
|
-
let t = (await
|
|
116
|
-
query:
|
|
120
|
+
v(!0), b(null);
|
|
121
|
+
let t = (await x.query({
|
|
122
|
+
query: s,
|
|
117
123
|
variables: { input: e },
|
|
118
124
|
fetchPolicy: "network-only"
|
|
119
125
|
})).data?.testParserExpression;
|
|
@@ -128,31 +134,31 @@ function p(p = {}) {
|
|
|
128
134
|
} : null;
|
|
129
135
|
} catch (e) {
|
|
130
136
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to test expression");
|
|
131
|
-
return
|
|
137
|
+
return b(t), null;
|
|
132
138
|
} finally {
|
|
133
|
-
|
|
139
|
+
v(!1);
|
|
134
140
|
}
|
|
135
|
-
}, [
|
|
136
|
-
await
|
|
137
|
-
}, [
|
|
138
|
-
return
|
|
139
|
-
|
|
141
|
+
}, [x]), R = l(async () => {
|
|
142
|
+
await j();
|
|
143
|
+
}, [j]);
|
|
144
|
+
return u(() => {
|
|
145
|
+
h && !g && j();
|
|
140
146
|
}, [
|
|
141
|
-
m,
|
|
142
147
|
h,
|
|
143
|
-
|
|
148
|
+
g,
|
|
149
|
+
j
|
|
144
150
|
]), {
|
|
145
|
-
loading:
|
|
146
|
-
error:
|
|
147
|
-
parsers:
|
|
148
|
-
fetchParsers:
|
|
149
|
-
fetchParser:
|
|
150
|
-
createParser:
|
|
151
|
-
updateParser:
|
|
152
|
-
deleteParser:
|
|
153
|
-
executeParser:
|
|
154
|
-
testParserExpression:
|
|
155
|
-
refetch:
|
|
151
|
+
loading: _,
|
|
152
|
+
error: y,
|
|
153
|
+
parsers: A,
|
|
154
|
+
fetchParsers: j,
|
|
155
|
+
fetchParser: M,
|
|
156
|
+
createParser: N,
|
|
157
|
+
updateParser: P,
|
|
158
|
+
deleteParser: F,
|
|
159
|
+
executeParser: I,
|
|
160
|
+
testParserExpression: L,
|
|
161
|
+
refetch: R
|
|
156
162
|
};
|
|
157
163
|
}
|
|
158
|
-
export {
|
|
164
|
+
export { m as default, m as useParserOperations };
|