@object-ui/plugin-designer 0.1.0 → 2.0.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/dist/index.d.ts +1 -1
- package/dist/index.js +1152 -530
- package/dist/index.umd.cjs +2 -2
- package/dist/{src → plugin-designer/src}/CollaborationProvider.d.ts +0 -1
- package/dist/{src → plugin-designer/src}/DataModelDesigner.d.ts +0 -1
- package/dist/{src → plugin-designer/src}/PageDesigner.d.ts +0 -1
- package/dist/{src → plugin-designer/src}/ProcessDesigner.d.ts +0 -1
- package/dist/{src → plugin-designer/src}/ReportDesigner.d.ts +0 -1
- package/dist/plugin-designer/src/ViewDesigner.d.ts +67 -0
- package/dist/{src → plugin-designer/src}/index.d.ts +3 -2
- package/package.json +5 -5
- package/dist/src/CollaborationProvider.d.ts.map +0 -1
- package/dist/src/DataModelDesigner.d.ts.map +0 -1
- package/dist/src/PageDesigner.d.ts.map +0 -1
- package/dist/src/ProcessDesigner.d.ts.map +0 -1
- package/dist/src/ReportDesigner.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,335 +1,335 @@
|
|
|
1
|
-
import { ComponentRegistry as
|
|
2
|
-
import
|
|
3
|
-
import { Plus as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import { twMerge as
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
var
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
for (var
|
|
17
|
-
|
|
18
|
-
} else
|
|
19
|
-
return
|
|
20
|
-
$$typeof:
|
|
21
|
-
type:
|
|
22
|
-
key:
|
|
23
|
-
ref:
|
|
24
|
-
props:
|
|
1
|
+
import { ComponentRegistry as Z } from "@object-ui/core";
|
|
2
|
+
import ve, { useState as F, useMemo as ae, useCallback as D, createContext as je } from "react";
|
|
3
|
+
import { Plus as Y, Undo2 as we, Redo2 as Ne, Eye as be, GripVertical as ge, Trash2 as G, Layers as ye, Database as de, Link2 as ke, GitBranch as Ee, Play as Se, Square as ce, Diamond as Ce, FileText as Te, Type as Re, ImageIcon as _e, BarChart3 as Ae, Table2 as Pe, Settings2 as De, X as Fe, Save as $e, LayoutGrid as Ie, Kanban as Ve, Image as Le, Calendar as ze, Clock as Ge, GanttChart as Me, Map as Ye, Columns3 as Ue, ArrowUp as We, ArrowDown as qe, EyeOff as He } from "lucide-react";
|
|
4
|
+
import { clsx as K } from "clsx";
|
|
5
|
+
import { twMerge as Q } from "tailwind-merge";
|
|
6
|
+
var re = { exports: {} }, J = {};
|
|
7
|
+
var ue;
|
|
8
|
+
function Be() {
|
|
9
|
+
if (ue) return J;
|
|
10
|
+
ue = 1;
|
|
11
|
+
var i = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
12
|
+
function w(T, h, b) {
|
|
13
|
+
var N = null;
|
|
14
|
+
if (b !== void 0 && (N = "" + b), h.key !== void 0 && (N = "" + h.key), "key" in h) {
|
|
15
|
+
b = {};
|
|
16
|
+
for (var c in h)
|
|
17
|
+
c !== "key" && (b[c] = h[c]);
|
|
18
|
+
} else b = h;
|
|
19
|
+
return h = b.ref, {
|
|
20
|
+
$$typeof: i,
|
|
21
|
+
type: T,
|
|
22
|
+
key: N,
|
|
23
|
+
ref: h !== void 0 ? h : null,
|
|
24
|
+
props: b
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return J.Fragment = g, J.jsx = w, J.jsxs = w, J;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
return
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
35
|
-
if (typeof
|
|
36
|
-
return
|
|
37
|
-
if (typeof
|
|
38
|
-
switch (
|
|
39
|
-
case
|
|
29
|
+
var X = {};
|
|
30
|
+
var me;
|
|
31
|
+
function Je() {
|
|
32
|
+
return me || (me = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
33
|
+
function i(r) {
|
|
34
|
+
if (r == null) return null;
|
|
35
|
+
if (typeof r == "function")
|
|
36
|
+
return r.$$typeof === z ? null : r.displayName || r.name || null;
|
|
37
|
+
if (typeof r == "string") return r;
|
|
38
|
+
switch (r) {
|
|
39
|
+
case u:
|
|
40
40
|
return "Fragment";
|
|
41
|
-
case
|
|
41
|
+
case x:
|
|
42
42
|
return "Profiler";
|
|
43
|
-
case
|
|
43
|
+
case a:
|
|
44
44
|
return "StrictMode";
|
|
45
|
-
case h:
|
|
46
|
-
return "Suspense";
|
|
47
45
|
case f:
|
|
46
|
+
return "Suspense";
|
|
47
|
+
case p:
|
|
48
48
|
return "SuspenseList";
|
|
49
|
-
case
|
|
49
|
+
case L:
|
|
50
50
|
return "Activity";
|
|
51
51
|
}
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (typeof
|
|
52
|
+
if (typeof r == "object")
|
|
53
|
+
switch (typeof r.tag == "number" && console.error(
|
|
54
54
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
55
|
-
),
|
|
56
|
-
case
|
|
55
|
+
), r.$$typeof) {
|
|
56
|
+
case k:
|
|
57
57
|
return "Portal";
|
|
58
|
-
case
|
|
59
|
-
return
|
|
60
|
-
case
|
|
61
|
-
return (
|
|
62
|
-
case
|
|
63
|
-
var
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
return
|
|
67
|
-
case
|
|
68
|
-
|
|
58
|
+
case A:
|
|
59
|
+
return r.displayName || "Context";
|
|
60
|
+
case o:
|
|
61
|
+
return (r._context.displayName || "Context") + ".Consumer";
|
|
62
|
+
case j:
|
|
63
|
+
var d = r.render;
|
|
64
|
+
return r = r.displayName, r || (r = d.displayName || d.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
65
|
+
case V:
|
|
66
|
+
return d = r.displayName || null, d !== null ? d : i(r.type) || "Memo";
|
|
67
|
+
case $:
|
|
68
|
+
d = r._payload, r = r._init;
|
|
69
69
|
try {
|
|
70
|
-
return
|
|
70
|
+
return i(r(d));
|
|
71
71
|
} catch {
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return "" +
|
|
76
|
+
function g(r) {
|
|
77
|
+
return "" + r;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function w(r) {
|
|
80
80
|
try {
|
|
81
|
-
|
|
82
|
-
var
|
|
81
|
+
g(r);
|
|
82
|
+
var d = !1;
|
|
83
83
|
} catch {
|
|
84
|
-
|
|
84
|
+
d = !0;
|
|
85
85
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
return
|
|
90
|
-
|
|
86
|
+
if (d) {
|
|
87
|
+
d = console;
|
|
88
|
+
var S = d.error, P = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
89
|
+
return S.call(
|
|
90
|
+
d,
|
|
91
91
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
92
|
-
|
|
93
|
-
),
|
|
92
|
+
P
|
|
93
|
+
), g(r);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
if (
|
|
98
|
-
if (typeof
|
|
96
|
+
function T(r) {
|
|
97
|
+
if (r === u) return "<>";
|
|
98
|
+
if (typeof r == "object" && r !== null && r.$$typeof === $)
|
|
99
99
|
return "<...>";
|
|
100
100
|
try {
|
|
101
|
-
var
|
|
102
|
-
return
|
|
101
|
+
var d = i(r);
|
|
102
|
+
return d ? "<" + d + ">" : "<...>";
|
|
103
103
|
} catch {
|
|
104
104
|
return "<...>";
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
var
|
|
109
|
-
return
|
|
107
|
+
function h() {
|
|
108
|
+
var r = U.A;
|
|
109
|
+
return r === null ? null : r.getOwner();
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function b() {
|
|
112
112
|
return Error("react-stack-top-frame");
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
if (
|
|
116
|
-
var
|
|
117
|
-
if (
|
|
114
|
+
function N(r) {
|
|
115
|
+
if (W.call(r, "key")) {
|
|
116
|
+
var d = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
117
|
+
if (d && d.isReactWarning) return !1;
|
|
118
118
|
}
|
|
119
|
-
return
|
|
119
|
+
return r.key !== void 0;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
function
|
|
123
|
-
|
|
121
|
+
function c(r, d) {
|
|
122
|
+
function S() {
|
|
123
|
+
O || (O = !0, console.error(
|
|
124
124
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
125
|
-
|
|
125
|
+
d
|
|
126
126
|
));
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
get:
|
|
128
|
+
S.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
129
|
+
get: S,
|
|
130
130
|
configurable: !0
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
var
|
|
135
|
-
return
|
|
133
|
+
function m() {
|
|
134
|
+
var r = i(this.type);
|
|
135
|
+
return H[r] || (H[r] = !0, console.error(
|
|
136
136
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
137
|
-
)),
|
|
137
|
+
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
var
|
|
141
|
-
return
|
|
142
|
-
$$typeof:
|
|
143
|
-
type:
|
|
144
|
-
key:
|
|
145
|
-
props:
|
|
146
|
-
_owner:
|
|
147
|
-
}, (
|
|
139
|
+
function l(r, d, S, P, t, n) {
|
|
140
|
+
var s = S.ref;
|
|
141
|
+
return r = {
|
|
142
|
+
$$typeof: C,
|
|
143
|
+
type: r,
|
|
144
|
+
key: d,
|
|
145
|
+
props: S,
|
|
146
|
+
_owner: P
|
|
147
|
+
}, (s !== void 0 ? s : null) !== null ? Object.defineProperty(r, "ref", {
|
|
148
148
|
enumerable: !1,
|
|
149
|
-
get:
|
|
150
|
-
}) : Object.defineProperty(
|
|
149
|
+
get: m
|
|
150
|
+
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
151
151
|
configurable: !1,
|
|
152
152
|
enumerable: !1,
|
|
153
153
|
writable: !0,
|
|
154
154
|
value: 0
|
|
155
|
-
}), Object.defineProperty(
|
|
155
|
+
}), Object.defineProperty(r, "_debugInfo", {
|
|
156
156
|
configurable: !1,
|
|
157
157
|
enumerable: !1,
|
|
158
158
|
writable: !0,
|
|
159
159
|
value: null
|
|
160
|
-
}), Object.defineProperty(
|
|
160
|
+
}), Object.defineProperty(r, "_debugStack", {
|
|
161
161
|
configurable: !1,
|
|
162
162
|
enumerable: !1,
|
|
163
163
|
writable: !0,
|
|
164
|
-
value:
|
|
165
|
-
}), Object.defineProperty(
|
|
164
|
+
value: t
|
|
165
|
+
}), Object.defineProperty(r, "_debugTask", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
168
168
|
writable: !0,
|
|
169
|
-
value:
|
|
170
|
-
}), Object.freeze && (Object.freeze(
|
|
169
|
+
value: n
|
|
170
|
+
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
var
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
if (
|
|
177
|
-
for (
|
|
178
|
-
|
|
179
|
-
Object.freeze && Object.freeze(
|
|
172
|
+
function y(r, d, S, P, t, n) {
|
|
173
|
+
var s = d.children;
|
|
174
|
+
if (s !== void 0)
|
|
175
|
+
if (P)
|
|
176
|
+
if (le(s)) {
|
|
177
|
+
for (P = 0; P < s.length; P++)
|
|
178
|
+
_(s[P]);
|
|
179
|
+
Object.freeze && Object.freeze(s);
|
|
180
180
|
} else
|
|
181
181
|
console.error(
|
|
182
182
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
183
183
|
);
|
|
184
|
-
else
|
|
185
|
-
if (
|
|
186
|
-
|
|
187
|
-
var
|
|
188
|
-
return
|
|
184
|
+
else _(s);
|
|
185
|
+
if (W.call(d, "key")) {
|
|
186
|
+
s = i(r);
|
|
187
|
+
var v = Object.keys(d).filter(function(B) {
|
|
188
|
+
return B !== "key";
|
|
189
189
|
});
|
|
190
|
-
|
|
190
|
+
P = 0 < v.length ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}", M[s + P] || (v = 0 < v.length ? "{" + v.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
191
191
|
`A props object containing a "key" prop is being spread into JSX:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s {...props} />
|
|
194
194
|
React keys must be passed directly to JSX without using spread:
|
|
195
195
|
let props = %s;
|
|
196
196
|
<%s key={someKey} {...props} />`,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
),
|
|
197
|
+
P,
|
|
198
|
+
s,
|
|
199
|
+
v,
|
|
200
|
+
s
|
|
201
|
+
), M[s + P] = !0);
|
|
202
202
|
}
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
for (var
|
|
206
|
-
|
|
207
|
-
} else
|
|
208
|
-
return
|
|
209
|
-
|
|
210
|
-
typeof
|
|
211
|
-
),
|
|
203
|
+
if (s = null, S !== void 0 && (w(S), s = "" + S), N(d) && (w(d.key), s = "" + d.key), "key" in d) {
|
|
204
|
+
S = {};
|
|
205
|
+
for (var I in d)
|
|
206
|
+
I !== "key" && (S[I] = d[I]);
|
|
207
|
+
} else S = d;
|
|
208
|
+
return s && c(
|
|
209
|
+
S,
|
|
210
|
+
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
211
|
+
), l(
|
|
212
|
+
r,
|
|
213
|
+
s,
|
|
214
|
+
S,
|
|
215
|
+
h(),
|
|
212
216
|
t,
|
|
213
|
-
|
|
214
|
-
y,
|
|
215
|
-
i(),
|
|
216
|
-
I,
|
|
217
|
-
q
|
|
217
|
+
n
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
220
|
+
function _(r) {
|
|
221
|
+
E(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === $ && (r._payload.status === "fulfilled" ? E(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
return typeof
|
|
223
|
+
function E(r) {
|
|
224
|
+
return typeof r == "object" && r !== null && r.$$typeof === C;
|
|
225
225
|
}
|
|
226
|
-
var R =
|
|
226
|
+
var R = ve, C = /* @__PURE__ */ Symbol.for("react.transitional.element"), k = /* @__PURE__ */ Symbol.for("react.portal"), u = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), x = /* @__PURE__ */ Symbol.for("react.profiler"), o = /* @__PURE__ */ Symbol.for("react.consumer"), A = /* @__PURE__ */ Symbol.for("react.context"), j = /* @__PURE__ */ Symbol.for("react.forward_ref"), f = /* @__PURE__ */ Symbol.for("react.suspense"), p = /* @__PURE__ */ Symbol.for("react.suspense_list"), V = /* @__PURE__ */ Symbol.for("react.memo"), $ = /* @__PURE__ */ Symbol.for("react.lazy"), L = /* @__PURE__ */ Symbol.for("react.activity"), z = /* @__PURE__ */ Symbol.for("react.client.reference"), U = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, le = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
227
227
|
return null;
|
|
228
228
|
};
|
|
229
229
|
R = {
|
|
230
|
-
react_stack_bottom_frame: function(
|
|
231
|
-
return
|
|
230
|
+
react_stack_bottom_frame: function(r) {
|
|
231
|
+
return r();
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
var
|
|
234
|
+
var O, H = {}, ee = R.react_stack_bottom_frame.bind(
|
|
235
235
|
R,
|
|
236
|
-
|
|
237
|
-
)(),
|
|
238
|
-
|
|
239
|
-
var
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
236
|
+
b
|
|
237
|
+
)(), te = q(T(b)), M = {};
|
|
238
|
+
X.Fragment = u, X.jsx = function(r, d, S) {
|
|
239
|
+
var P = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
240
|
+
return y(
|
|
241
|
+
r,
|
|
242
|
+
d,
|
|
243
|
+
S,
|
|
244
244
|
!1,
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
P ? Error("react-stack-top-frame") : ee,
|
|
246
|
+
P ? q(T(r)) : te
|
|
247
247
|
);
|
|
248
|
-
},
|
|
249
|
-
var
|
|
250
|
-
return
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
}, X.jsxs = function(r, d, S) {
|
|
249
|
+
var P = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
250
|
+
return y(
|
|
251
|
+
r,
|
|
252
|
+
d,
|
|
253
|
+
S,
|
|
254
254
|
!0,
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
P ? Error("react-stack-top-frame") : ee,
|
|
256
|
+
P ? q(T(r)) : te
|
|
257
257
|
);
|
|
258
258
|
};
|
|
259
|
-
})()),
|
|
259
|
+
})()), X;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
262
|
-
function
|
|
263
|
-
return
|
|
261
|
+
var xe;
|
|
262
|
+
function Xe() {
|
|
263
|
+
return xe || (xe = 1, process.env.NODE_ENV === "production" ? re.exports = Be() : re.exports = Je()), re.exports;
|
|
264
264
|
}
|
|
265
|
-
var e =
|
|
266
|
-
function
|
|
267
|
-
return
|
|
265
|
+
var e = Xe();
|
|
266
|
+
function ne(...i) {
|
|
267
|
+
return Q(K(i));
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
canvas:
|
|
271
|
-
components:
|
|
272
|
-
palette:
|
|
273
|
-
showComponentTree:
|
|
274
|
-
undoRedo:
|
|
275
|
-
readOnly:
|
|
276
|
-
onChange:
|
|
277
|
-
className:
|
|
269
|
+
function Ze({
|
|
270
|
+
canvas: i = { width: 1200, height: 800, gridSize: 8, showGrid: !0, snapToGrid: !0 },
|
|
271
|
+
components: g = [],
|
|
272
|
+
palette: w = Ke,
|
|
273
|
+
showComponentTree: T = !0,
|
|
274
|
+
undoRedo: h = !0,
|
|
275
|
+
readOnly: b = !1,
|
|
276
|
+
onChange: N,
|
|
277
|
+
className: c
|
|
278
278
|
}) {
|
|
279
|
-
const [
|
|
280
|
-
() =>
|
|
281
|
-
[
|
|
282
|
-
),
|
|
283
|
-
(
|
|
284
|
-
if (
|
|
285
|
-
const
|
|
279
|
+
const [m, l] = F(g), [y, _] = F(null), [E, R] = F(i.zoom ?? 1), C = ae(
|
|
280
|
+
() => m.find((a) => a.id === y),
|
|
281
|
+
[m, y]
|
|
282
|
+
), k = D(
|
|
283
|
+
(a, x) => {
|
|
284
|
+
if (b) return;
|
|
285
|
+
const o = {
|
|
286
286
|
id: `comp-${Date.now()}`,
|
|
287
|
-
type:
|
|
288
|
-
label:
|
|
287
|
+
type: a,
|
|
288
|
+
label: x,
|
|
289
289
|
position: { x: 100, y: 100, width: 200, height: 100 },
|
|
290
290
|
props: {}
|
|
291
|
-
},
|
|
292
|
-
|
|
291
|
+
}, A = [...m, o];
|
|
292
|
+
l(A), _(o.id), N?.(A);
|
|
293
293
|
},
|
|
294
|
-
[
|
|
295
|
-
),
|
|
296
|
-
(
|
|
297
|
-
if (
|
|
298
|
-
const
|
|
299
|
-
|
|
294
|
+
[m, b, N]
|
|
295
|
+
), u = D(
|
|
296
|
+
(a) => {
|
|
297
|
+
if (b) return;
|
|
298
|
+
const x = m.filter((o) => o.id !== a);
|
|
299
|
+
l(x), y === a && _(null), N?.(x);
|
|
300
300
|
},
|
|
301
|
-
[
|
|
301
|
+
[m, y, b, N]
|
|
302
302
|
);
|
|
303
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
304
|
-
!
|
|
303
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ne("flex h-full w-full border rounded-lg overflow-hidden bg-background", c), children: [
|
|
304
|
+
!b && /* @__PURE__ */ e.jsxs("div", { className: "w-60 border-r bg-muted/30 flex flex-col", children: [
|
|
305
305
|
/* @__PURE__ */ e.jsx("div", { className: "p-3 border-b font-medium text-sm", children: "Components" }),
|
|
306
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children:
|
|
307
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium text-muted-foreground px-2 py-1 uppercase", children:
|
|
308
|
-
|
|
306
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: w.map((a) => /* @__PURE__ */ e.jsxs("div", { className: "mb-3", children: [
|
|
307
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium text-muted-foreground px-2 py-1 uppercase", children: a.label }),
|
|
308
|
+
a.items.map((x) => /* @__PURE__ */ e.jsxs(
|
|
309
309
|
"button",
|
|
310
310
|
{
|
|
311
|
-
onClick: () =>
|
|
311
|
+
onClick: () => k(x.type, x.label),
|
|
312
312
|
className: "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent text-left",
|
|
313
313
|
children: [
|
|
314
|
-
/* @__PURE__ */ e.jsx(
|
|
315
|
-
|
|
314
|
+
/* @__PURE__ */ e.jsx(Y, { className: "h-3 w-3" }),
|
|
315
|
+
x.label
|
|
316
316
|
]
|
|
317
317
|
},
|
|
318
|
-
|
|
318
|
+
x.type
|
|
319
319
|
))
|
|
320
|
-
] },
|
|
320
|
+
] }, a.name)) })
|
|
321
321
|
] }),
|
|
322
322
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col", children: [
|
|
323
323
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
|
|
324
|
-
|
|
325
|
-
/* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Undo", children: /* @__PURE__ */ e.jsx(
|
|
326
|
-
/* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Redo", children: /* @__PURE__ */ e.jsx(
|
|
324
|
+
h && !b && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
325
|
+
/* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Undo", children: /* @__PURE__ */ e.jsx(we, { className: "h-4 w-4" }) }),
|
|
326
|
+
/* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Redo", children: /* @__PURE__ */ e.jsx(Ne, { className: "h-4 w-4" }) }),
|
|
327
327
|
/* @__PURE__ */ e.jsx("div", { className: "w-px h-5 bg-border mx-1" })
|
|
328
328
|
] }),
|
|
329
|
-
/* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Preview", children: /* @__PURE__ */ e.jsx(
|
|
329
|
+
/* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Preview", children: /* @__PURE__ */ e.jsx(be, { className: "h-4 w-4" }) }),
|
|
330
330
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
331
331
|
/* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
332
|
-
Math.round(
|
|
332
|
+
Math.round(E * 100),
|
|
333
333
|
"%"
|
|
334
334
|
] })
|
|
335
335
|
] }),
|
|
@@ -338,94 +338,94 @@ function Oe({
|
|
|
338
338
|
{
|
|
339
339
|
className: "relative bg-background border rounded shadow-sm mx-auto",
|
|
340
340
|
style: {
|
|
341
|
-
width:
|
|
342
|
-
height:
|
|
343
|
-
backgroundImage:
|
|
344
|
-
backgroundSize:
|
|
341
|
+
width: i.width * E,
|
|
342
|
+
height: i.height * E,
|
|
343
|
+
backgroundImage: i.showGrid ? "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)" : void 0,
|
|
344
|
+
backgroundSize: i.showGrid && i.gridSize ? `${i.gridSize * E}px ${i.gridSize * E}px` : void 0
|
|
345
345
|
},
|
|
346
|
-
children:
|
|
346
|
+
children: m.map((a) => /* @__PURE__ */ e.jsxs(
|
|
347
347
|
"div",
|
|
348
348
|
{
|
|
349
|
-
className:
|
|
349
|
+
className: ne(
|
|
350
350
|
"absolute border rounded cursor-move select-none transition-shadow",
|
|
351
|
-
|
|
351
|
+
y === a.id ? "border-primary ring-2 ring-primary/20 shadow-md" : "border-border hover:border-primary/50"
|
|
352
352
|
),
|
|
353
353
|
style: {
|
|
354
|
-
left:
|
|
355
|
-
top:
|
|
356
|
-
width: typeof
|
|
357
|
-
height: typeof
|
|
354
|
+
left: a.position.x * E,
|
|
355
|
+
top: a.position.y * E,
|
|
356
|
+
width: typeof a.position.width == "number" ? a.position.width * E : a.position.width,
|
|
357
|
+
height: typeof a.position.height == "number" ? a.position.height * E : a.position.height
|
|
358
358
|
},
|
|
359
|
-
onClick: () =>
|
|
359
|
+
onClick: () => _(a.id),
|
|
360
360
|
children: [
|
|
361
361
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 px-2 py-1 bg-muted/50 text-xs border-b", children: [
|
|
362
|
-
/* @__PURE__ */ e.jsx(
|
|
363
|
-
/* @__PURE__ */ e.jsx("span", { className: "truncate", children:
|
|
364
|
-
!
|
|
362
|
+
/* @__PURE__ */ e.jsx(ge, { className: "h-3 w-3 text-muted-foreground" }),
|
|
363
|
+
/* @__PURE__ */ e.jsx("span", { className: "truncate", children: a.label ?? a.type }),
|
|
364
|
+
!b && /* @__PURE__ */ e.jsx(
|
|
365
365
|
"button",
|
|
366
366
|
{
|
|
367
|
-
onClick: (
|
|
368
|
-
|
|
367
|
+
onClick: (x) => {
|
|
368
|
+
x.stopPropagation(), u(a.id);
|
|
369
369
|
},
|
|
370
370
|
className: "ml-auto p-0.5 rounded hover:bg-destructive/10",
|
|
371
|
-
children: /* @__PURE__ */ e.jsx(
|
|
371
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-3 w-3 text-destructive" })
|
|
372
372
|
}
|
|
373
373
|
)
|
|
374
374
|
] }),
|
|
375
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-2 text-xs text-muted-foreground", children:
|
|
375
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2 text-xs text-muted-foreground", children: a.type })
|
|
376
376
|
]
|
|
377
377
|
},
|
|
378
|
-
|
|
378
|
+
a.id
|
|
379
379
|
))
|
|
380
380
|
}
|
|
381
381
|
) })
|
|
382
382
|
] }),
|
|
383
|
-
|
|
383
|
+
T && /* @__PURE__ */ e.jsxs("div", { className: "w-60 border-l bg-muted/30 flex flex-col", children: [
|
|
384
384
|
/* @__PURE__ */ e.jsxs("div", { className: "p-3 border-b font-medium text-sm flex items-center gap-2", children: [
|
|
385
|
-
/* @__PURE__ */ e.jsx(
|
|
385
|
+
/* @__PURE__ */ e.jsx(ye, { className: "h-4 w-4" }),
|
|
386
386
|
"Component Tree"
|
|
387
387
|
] }),
|
|
388
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children:
|
|
388
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: m.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "text-xs text-muted-foreground text-center py-4", children: "No components added yet" }) : m.map((a) => /* @__PURE__ */ e.jsx(
|
|
389
389
|
"button",
|
|
390
390
|
{
|
|
391
|
-
onClick: () =>
|
|
392
|
-
className:
|
|
391
|
+
onClick: () => _(a.id),
|
|
392
|
+
className: ne(
|
|
393
393
|
"w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded text-left",
|
|
394
|
-
|
|
394
|
+
y === a.id ? "bg-accent" : "hover:bg-accent/50"
|
|
395
395
|
),
|
|
396
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "truncate", children:
|
|
396
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "truncate", children: a.label ?? a.type })
|
|
397
397
|
},
|
|
398
|
-
|
|
398
|
+
a.id
|
|
399
399
|
)) }),
|
|
400
|
-
|
|
400
|
+
C && /* @__PURE__ */ e.jsxs("div", { className: "border-t p-3", children: [
|
|
401
401
|
/* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium mb-2", children: "Properties" }),
|
|
402
402
|
/* @__PURE__ */ e.jsxs("div", { className: "text-xs text-muted-foreground space-y-1", children: [
|
|
403
403
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
404
404
|
"Type: ",
|
|
405
|
-
|
|
405
|
+
C.type
|
|
406
406
|
] }),
|
|
407
407
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
408
408
|
"ID: ",
|
|
409
|
-
|
|
409
|
+
C.id
|
|
410
410
|
] }),
|
|
411
411
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
412
412
|
"Position: ",
|
|
413
|
-
|
|
413
|
+
C.position.x,
|
|
414
414
|
", ",
|
|
415
|
-
|
|
415
|
+
C.position.y
|
|
416
416
|
] }),
|
|
417
417
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
418
418
|
"Size: ",
|
|
419
|
-
|
|
419
|
+
C.position.width,
|
|
420
420
|
" × ",
|
|
421
|
-
|
|
421
|
+
C.position.height
|
|
422
422
|
] })
|
|
423
423
|
] })
|
|
424
424
|
] })
|
|
425
425
|
] })
|
|
426
426
|
] });
|
|
427
427
|
}
|
|
428
|
-
const
|
|
428
|
+
const Ke = [
|
|
429
429
|
{
|
|
430
430
|
name: "layout",
|
|
431
431
|
label: "Layout",
|
|
@@ -459,56 +459,56 @@ const $e = [
|
|
|
459
459
|
]
|
|
460
460
|
}
|
|
461
461
|
];
|
|
462
|
-
function
|
|
463
|
-
return
|
|
462
|
+
function oe(...i) {
|
|
463
|
+
return Q(K(i));
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
entities:
|
|
467
|
-
relationships:
|
|
468
|
-
canvas:
|
|
469
|
-
showRelationshipLabels:
|
|
470
|
-
readOnly:
|
|
471
|
-
onEntitiesChange:
|
|
472
|
-
onRelationshipsChange:
|
|
473
|
-
className:
|
|
465
|
+
function Qe({
|
|
466
|
+
entities: i = [],
|
|
467
|
+
relationships: g = [],
|
|
468
|
+
canvas: w = { width: 1200, height: 800, showGrid: !0 },
|
|
469
|
+
showRelationshipLabels: T = !0,
|
|
470
|
+
readOnly: h = !1,
|
|
471
|
+
onEntitiesChange: b,
|
|
472
|
+
onRelationshipsChange: N,
|
|
473
|
+
className: c
|
|
474
474
|
}) {
|
|
475
|
-
const [
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
475
|
+
const [m, l] = F(i), [y, _] = F(g), [E, R] = F(null), C = D(() => {
|
|
476
|
+
if (h) return;
|
|
477
|
+
const u = {
|
|
478
478
|
id: `entity-${Date.now()}`,
|
|
479
|
-
name: `new_entity_${
|
|
480
|
-
label: `New Entity ${
|
|
479
|
+
name: `new_entity_${m.length + 1}`,
|
|
480
|
+
label: `New Entity ${m.length + 1}`,
|
|
481
481
|
fields: [
|
|
482
482
|
{ name: "id", type: "uuid", primaryKey: !0, required: !0 },
|
|
483
483
|
{ name: "created_at", type: "datetime", required: !0 },
|
|
484
484
|
{ name: "updated_at", type: "datetime", required: !0 }
|
|
485
485
|
],
|
|
486
|
-
position: { x: 50 +
|
|
487
|
-
},
|
|
488
|
-
|
|
489
|
-
}, [
|
|
490
|
-
(
|
|
491
|
-
if (
|
|
492
|
-
const
|
|
493
|
-
(
|
|
486
|
+
position: { x: 50 + m.length % 4 * 280, y: 50 + Math.floor(m.length / 4) * 250 }
|
|
487
|
+
}, a = [...m, u];
|
|
488
|
+
l(a), R(u.id), b?.(a);
|
|
489
|
+
}, [m, h, b]), k = D(
|
|
490
|
+
(u) => {
|
|
491
|
+
if (h) return;
|
|
492
|
+
const a = m.filter((o) => o.id !== u), x = y.filter(
|
|
493
|
+
(o) => o.sourceEntity !== u && o.targetEntity !== u
|
|
494
494
|
);
|
|
495
|
-
|
|
495
|
+
l(a), _(x), E === u && R(null), b?.(a), N?.(x);
|
|
496
496
|
},
|
|
497
|
-
[
|
|
497
|
+
[m, y, E, h, b, N]
|
|
498
498
|
);
|
|
499
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
499
|
+
return /* @__PURE__ */ e.jsx("div", { className: oe("flex h-full w-full border rounded-lg overflow-hidden bg-background", c), children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full", children: [
|
|
500
500
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
|
|
501
|
-
/* @__PURE__ */ e.jsx(
|
|
501
|
+
/* @__PURE__ */ e.jsx(de, { className: "h-4 w-4" }),
|
|
502
502
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: "Data Model Designer" }),
|
|
503
503
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
504
|
-
!
|
|
504
|
+
!h && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
505
505
|
/* @__PURE__ */ e.jsxs(
|
|
506
506
|
"button",
|
|
507
507
|
{
|
|
508
|
-
onClick:
|
|
508
|
+
onClick: C,
|
|
509
509
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded bg-primary text-primary-foreground hover:bg-primary/90",
|
|
510
510
|
children: [
|
|
511
|
-
/* @__PURE__ */ e.jsx(
|
|
511
|
+
/* @__PURE__ */ e.jsx(Y, { className: "h-3 w-3" }),
|
|
512
512
|
" Add Entity"
|
|
513
513
|
]
|
|
514
514
|
}
|
|
@@ -518,7 +518,7 @@ function ze({
|
|
|
518
518
|
{
|
|
519
519
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
520
520
|
children: [
|
|
521
|
-
/* @__PURE__ */ e.jsx(
|
|
521
|
+
/* @__PURE__ */ e.jsx(ke, { className: "h-3 w-3" }),
|
|
522
522
|
" Add Relationship"
|
|
523
523
|
]
|
|
524
524
|
}
|
|
@@ -530,141 +530,141 @@ function ze({
|
|
|
530
530
|
{
|
|
531
531
|
className: "relative",
|
|
532
532
|
style: {
|
|
533
|
-
width:
|
|
534
|
-
minHeight:
|
|
535
|
-
backgroundImage:
|
|
536
|
-
backgroundSize:
|
|
533
|
+
width: w.width,
|
|
534
|
+
minHeight: w.height,
|
|
535
|
+
backgroundImage: w.showGrid ? "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)" : void 0,
|
|
536
|
+
backgroundSize: w.showGrid ? "20px 20px" : void 0
|
|
537
537
|
},
|
|
538
538
|
children: [
|
|
539
539
|
/* @__PURE__ */ e.jsx(
|
|
540
540
|
"svg",
|
|
541
541
|
{
|
|
542
542
|
className: "absolute inset-0 pointer-events-none",
|
|
543
|
-
width:
|
|
544
|
-
height:
|
|
545
|
-
children:
|
|
546
|
-
const
|
|
547
|
-
return !
|
|
543
|
+
width: w.width,
|
|
544
|
+
height: w.height,
|
|
545
|
+
children: y.map((u) => {
|
|
546
|
+
const a = m.find((o) => o.id === u.sourceEntity), x = m.find((o) => o.id === u.targetEntity);
|
|
547
|
+
return !a || !x ? null : /* @__PURE__ */ e.jsxs("g", { children: [
|
|
548
548
|
/* @__PURE__ */ e.jsx(
|
|
549
549
|
"line",
|
|
550
550
|
{
|
|
551
|
-
x1:
|
|
552
|
-
y1:
|
|
553
|
-
x2:
|
|
554
|
-
y2:
|
|
551
|
+
x1: a.position.x + 120,
|
|
552
|
+
y1: a.position.y + 50,
|
|
553
|
+
x2: x.position.x + 120,
|
|
554
|
+
y2: x.position.y + 50,
|
|
555
555
|
stroke: "hsl(var(--primary))",
|
|
556
556
|
strokeWidth: "2",
|
|
557
|
-
strokeDasharray:
|
|
557
|
+
strokeDasharray: u.type === "many-to-many" ? "5,5" : void 0
|
|
558
558
|
}
|
|
559
559
|
),
|
|
560
|
-
|
|
560
|
+
T && u.label && /* @__PURE__ */ e.jsx(
|
|
561
561
|
"text",
|
|
562
562
|
{
|
|
563
|
-
x: (
|
|
564
|
-
y: (
|
|
563
|
+
x: (a.position.x + x.position.x) / 2 + 120,
|
|
564
|
+
y: (a.position.y + x.position.y) / 2 + 50 - 8,
|
|
565
565
|
textAnchor: "middle",
|
|
566
566
|
className: "text-xs fill-muted-foreground",
|
|
567
|
-
children:
|
|
567
|
+
children: u.label
|
|
568
568
|
}
|
|
569
569
|
)
|
|
570
|
-
] },
|
|
570
|
+
] }, u.id);
|
|
571
571
|
})
|
|
572
572
|
}
|
|
573
573
|
),
|
|
574
|
-
|
|
574
|
+
m.map((u) => /* @__PURE__ */ e.jsxs(
|
|
575
575
|
"div",
|
|
576
576
|
{
|
|
577
|
-
className:
|
|
577
|
+
className: oe(
|
|
578
578
|
"absolute rounded-lg border-2 bg-background shadow-sm w-60 select-none",
|
|
579
|
-
|
|
579
|
+
E === u.id ? "border-primary ring-2 ring-primary/20" : "border-border hover:border-primary/50"
|
|
580
580
|
),
|
|
581
581
|
style: {
|
|
582
|
-
left:
|
|
583
|
-
top:
|
|
582
|
+
left: u.position.x,
|
|
583
|
+
top: u.position.y
|
|
584
584
|
},
|
|
585
|
-
onClick: () => R(
|
|
585
|
+
onClick: () => R(u.id),
|
|
586
586
|
children: [
|
|
587
587
|
/* @__PURE__ */ e.jsxs(
|
|
588
588
|
"div",
|
|
589
589
|
{
|
|
590
590
|
className: "flex items-center gap-2 px-3 py-2 rounded-t-lg font-medium text-sm",
|
|
591
|
-
style: { backgroundColor:
|
|
591
|
+
style: { backgroundColor: u.color ?? "hsl(var(--primary) / 0.1)" },
|
|
592
592
|
children: [
|
|
593
|
-
/* @__PURE__ */ e.jsx(
|
|
594
|
-
/* @__PURE__ */ e.jsx("span", { className: "truncate", children:
|
|
595
|
-
!
|
|
593
|
+
/* @__PURE__ */ e.jsx(de, { className: "h-3.5 w-3.5" }),
|
|
594
|
+
/* @__PURE__ */ e.jsx("span", { className: "truncate", children: u.label }),
|
|
595
|
+
!h && /* @__PURE__ */ e.jsx(
|
|
596
596
|
"button",
|
|
597
597
|
{
|
|
598
|
-
onClick: (
|
|
599
|
-
|
|
598
|
+
onClick: (a) => {
|
|
599
|
+
a.stopPropagation(), k(u.id);
|
|
600
600
|
},
|
|
601
601
|
className: "ml-auto p-0.5 rounded hover:bg-destructive/20",
|
|
602
|
-
children: /* @__PURE__ */ e.jsx(
|
|
602
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-3 w-3 text-destructive" })
|
|
603
603
|
}
|
|
604
604
|
)
|
|
605
605
|
]
|
|
606
606
|
}
|
|
607
607
|
),
|
|
608
|
-
/* @__PURE__ */ e.jsx("div", { className: "px-3 py-1 divide-y", children:
|
|
608
|
+
/* @__PURE__ */ e.jsx("div", { className: "px-3 py-1 divide-y", children: u.fields.map((a) => /* @__PURE__ */ e.jsxs(
|
|
609
609
|
"div",
|
|
610
610
|
{
|
|
611
611
|
className: "flex items-center gap-2 py-1 text-xs",
|
|
612
612
|
children: [
|
|
613
|
-
/* @__PURE__ */ e.jsxs("span", { className:
|
|
614
|
-
|
|
615
|
-
|
|
613
|
+
/* @__PURE__ */ e.jsxs("span", { className: oe("font-mono", a.primaryKey && "font-bold text-primary"), children: [
|
|
614
|
+
a.primaryKey ? "🔑 " : "",
|
|
615
|
+
a.name
|
|
616
616
|
] }),
|
|
617
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-auto", children:
|
|
618
|
-
|
|
617
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-auto", children: a.type }),
|
|
618
|
+
a.required && /* @__PURE__ */ e.jsx("span", { className: "text-destructive", children: "*" })
|
|
619
619
|
]
|
|
620
620
|
},
|
|
621
|
-
|
|
621
|
+
a.name
|
|
622
622
|
)) })
|
|
623
623
|
]
|
|
624
624
|
},
|
|
625
|
-
|
|
625
|
+
u.id
|
|
626
626
|
))
|
|
627
627
|
]
|
|
628
628
|
}
|
|
629
629
|
) })
|
|
630
630
|
] }) });
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
632
|
+
function ie(...i) {
|
|
633
|
+
return Q(K(i));
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
processName:
|
|
637
|
-
nodes:
|
|
638
|
-
edges:
|
|
639
|
-
lanes:
|
|
640
|
-
canvas:
|
|
641
|
-
showToolbar:
|
|
642
|
-
readOnly:
|
|
643
|
-
onNodesChange:
|
|
644
|
-
onEdgesChange:
|
|
645
|
-
className:
|
|
635
|
+
function Oe({
|
|
636
|
+
processName: i = "New Process",
|
|
637
|
+
nodes: g = [],
|
|
638
|
+
edges: w = [],
|
|
639
|
+
lanes: T,
|
|
640
|
+
canvas: h = { width: 1400, height: 800, showGrid: !0 },
|
|
641
|
+
showToolbar: b = !0,
|
|
642
|
+
readOnly: N = !1,
|
|
643
|
+
onNodesChange: c,
|
|
644
|
+
onEdgesChange: m,
|
|
645
|
+
className: l
|
|
646
646
|
}) {
|
|
647
|
-
const [
|
|
648
|
-
(
|
|
649
|
-
if (
|
|
650
|
-
const
|
|
647
|
+
const [y, _] = F(g), [E, R] = F(w), [C, k] = F(null), u = D(
|
|
648
|
+
(o, A) => {
|
|
649
|
+
if (N) return;
|
|
650
|
+
const j = {
|
|
651
651
|
id: `node-${Date.now()}`,
|
|
652
|
-
type:
|
|
653
|
-
label:
|
|
654
|
-
position: { x: 200 +
|
|
655
|
-
},
|
|
656
|
-
|
|
652
|
+
type: o,
|
|
653
|
+
label: A,
|
|
654
|
+
position: { x: 200 + y.length * 160, y: 200 }
|
|
655
|
+
}, f = [...y, j];
|
|
656
|
+
_(f), k(j.id), c?.(f);
|
|
657
657
|
},
|
|
658
|
-
[
|
|
659
|
-
),
|
|
660
|
-
(
|
|
661
|
-
if (
|
|
662
|
-
const
|
|
663
|
-
|
|
658
|
+
[y, N, c]
|
|
659
|
+
), a = D(
|
|
660
|
+
(o) => {
|
|
661
|
+
if (N) return;
|
|
662
|
+
const A = y.filter((f) => f.id !== o), j = E.filter((f) => f.source !== o && f.target !== o);
|
|
663
|
+
_(A), R(j), C === o && k(null), c?.(A), m?.(j);
|
|
664
664
|
},
|
|
665
|
-
[
|
|
666
|
-
),
|
|
667
|
-
switch (
|
|
665
|
+
[y, E, C, N, c, m]
|
|
666
|
+
), x = (o) => {
|
|
667
|
+
switch (o) {
|
|
668
668
|
case "start-event":
|
|
669
669
|
return "rounded-full bg-green-100 border-green-500 text-green-700";
|
|
670
670
|
case "end-event":
|
|
@@ -683,20 +683,20 @@ function Ie({
|
|
|
683
683
|
return "rounded bg-gray-100 border-gray-500 text-gray-700";
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
687
|
-
|
|
688
|
-
/* @__PURE__ */ e.jsx(
|
|
689
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children:
|
|
686
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ie("flex flex-col h-full w-full border rounded-lg overflow-hidden bg-background", l), children: [
|
|
687
|
+
b && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
|
|
688
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "h-4 w-4" }),
|
|
689
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: i }),
|
|
690
690
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
691
|
-
!
|
|
691
|
+
!N && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
692
692
|
/* @__PURE__ */ e.jsxs(
|
|
693
693
|
"button",
|
|
694
694
|
{
|
|
695
|
-
onClick: () =>
|
|
695
|
+
onClick: () => u("start-event", "Start"),
|
|
696
696
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
697
697
|
title: "Add Start Event",
|
|
698
698
|
children: [
|
|
699
|
-
/* @__PURE__ */ e.jsx(
|
|
699
|
+
/* @__PURE__ */ e.jsx(Se, { className: "h-3 w-3 text-green-600" }),
|
|
700
700
|
" Start"
|
|
701
701
|
]
|
|
702
702
|
}
|
|
@@ -704,11 +704,11 @@ function Ie({
|
|
|
704
704
|
/* @__PURE__ */ e.jsxs(
|
|
705
705
|
"button",
|
|
706
706
|
{
|
|
707
|
-
onClick: () =>
|
|
707
|
+
onClick: () => u("user-task", "User Task"),
|
|
708
708
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
709
709
|
title: "Add User Task",
|
|
710
710
|
children: [
|
|
711
|
-
/* @__PURE__ */ e.jsx(
|
|
711
|
+
/* @__PURE__ */ e.jsx(ce, { className: "h-3 w-3 text-blue-600" }),
|
|
712
712
|
" Task"
|
|
713
713
|
]
|
|
714
714
|
}
|
|
@@ -716,11 +716,11 @@ function Ie({
|
|
|
716
716
|
/* @__PURE__ */ e.jsxs(
|
|
717
717
|
"button",
|
|
718
718
|
{
|
|
719
|
-
onClick: () =>
|
|
719
|
+
onClick: () => u("exclusive-gateway", "Decision"),
|
|
720
720
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
721
721
|
title: "Add Gateway",
|
|
722
722
|
children: [
|
|
723
|
-
/* @__PURE__ */ e.jsx(
|
|
723
|
+
/* @__PURE__ */ e.jsx(Ce, { className: "h-3 w-3 text-yellow-600" }),
|
|
724
724
|
" Gateway"
|
|
725
725
|
]
|
|
726
726
|
}
|
|
@@ -728,11 +728,11 @@ function Ie({
|
|
|
728
728
|
/* @__PURE__ */ e.jsxs(
|
|
729
729
|
"button",
|
|
730
730
|
{
|
|
731
|
-
onClick: () =>
|
|
731
|
+
onClick: () => u("end-event", "End"),
|
|
732
732
|
className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
|
|
733
733
|
title: "Add End Event",
|
|
734
734
|
children: [
|
|
735
|
-
/* @__PURE__ */ e.jsx(
|
|
735
|
+
/* @__PURE__ */ e.jsx(ce, { className: "h-3 w-3 text-red-600" }),
|
|
736
736
|
" End"
|
|
737
737
|
]
|
|
738
738
|
}
|
|
@@ -744,18 +744,18 @@ function Ie({
|
|
|
744
744
|
{
|
|
745
745
|
className: "relative",
|
|
746
746
|
style: {
|
|
747
|
-
width:
|
|
748
|
-
minHeight:
|
|
749
|
-
backgroundImage:
|
|
750
|
-
backgroundSize:
|
|
747
|
+
width: h.width,
|
|
748
|
+
minHeight: h.height,
|
|
749
|
+
backgroundImage: h.showGrid ? "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)" : void 0,
|
|
750
|
+
backgroundSize: h.showGrid ? "20px 20px" : void 0
|
|
751
751
|
},
|
|
752
752
|
children: [
|
|
753
753
|
/* @__PURE__ */ e.jsxs(
|
|
754
754
|
"svg",
|
|
755
755
|
{
|
|
756
756
|
className: "absolute inset-0 pointer-events-none",
|
|
757
|
-
width:
|
|
758
|
-
height:
|
|
757
|
+
width: h.width,
|
|
758
|
+
height: h.height,
|
|
759
759
|
children: [
|
|
760
760
|
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx(
|
|
761
761
|
"marker",
|
|
@@ -769,126 +769,126 @@ function Ie({
|
|
|
769
769
|
children: /* @__PURE__ */ e.jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "hsl(var(--foreground))" })
|
|
770
770
|
}
|
|
771
771
|
) }),
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
return !
|
|
772
|
+
E.map((o) => {
|
|
773
|
+
const A = y.find((f) => f.id === o.source), j = y.find((f) => f.id === o.target);
|
|
774
|
+
return !A || !j ? null : /* @__PURE__ */ e.jsx(
|
|
775
775
|
"line",
|
|
776
776
|
{
|
|
777
|
-
x1:
|
|
778
|
-
y1:
|
|
779
|
-
x2:
|
|
780
|
-
y2:
|
|
777
|
+
x1: A.position.x + 60,
|
|
778
|
+
y1: A.position.y + 25,
|
|
779
|
+
x2: j.position.x,
|
|
780
|
+
y2: j.position.y + 25,
|
|
781
781
|
stroke: "hsl(var(--foreground) / 0.5)",
|
|
782
782
|
strokeWidth: "2",
|
|
783
783
|
markerEnd: "url(#arrowhead)"
|
|
784
784
|
},
|
|
785
|
-
|
|
785
|
+
o.id
|
|
786
786
|
);
|
|
787
787
|
})
|
|
788
788
|
]
|
|
789
789
|
}
|
|
790
790
|
),
|
|
791
|
-
|
|
791
|
+
y.map((o) => /* @__PURE__ */ e.jsxs(
|
|
792
792
|
"div",
|
|
793
793
|
{
|
|
794
794
|
className: "absolute select-none",
|
|
795
795
|
style: {
|
|
796
|
-
left:
|
|
797
|
-
top:
|
|
796
|
+
left: o.position.x,
|
|
797
|
+
top: o.position.y
|
|
798
798
|
},
|
|
799
|
-
onClick: () =>
|
|
799
|
+
onClick: () => k(o.id),
|
|
800
800
|
children: [
|
|
801
801
|
/* @__PURE__ */ e.jsx(
|
|
802
802
|
"div",
|
|
803
803
|
{
|
|
804
|
-
className:
|
|
804
|
+
className: ie(
|
|
805
805
|
"flex items-center justify-center border-2 min-w-[120px] min-h-[50px] px-3 py-2",
|
|
806
|
-
|
|
807
|
-
|
|
806
|
+
x(o.type),
|
|
807
|
+
C === o.id && "ring-2 ring-primary shadow-md"
|
|
808
808
|
),
|
|
809
|
-
children: /* @__PURE__ */ e.jsx("span", { className:
|
|
809
|
+
children: /* @__PURE__ */ e.jsx("span", { className: ie(
|
|
810
810
|
"text-xs font-medium",
|
|
811
|
-
(
|
|
812
|
-
), children:
|
|
811
|
+
(o.type === "exclusive-gateway" || o.type === "parallel-gateway") && "-rotate-45"
|
|
812
|
+
), children: o.label })
|
|
813
813
|
}
|
|
814
814
|
),
|
|
815
|
-
!
|
|
815
|
+
!N && C === o.id && /* @__PURE__ */ e.jsx(
|
|
816
816
|
"button",
|
|
817
817
|
{
|
|
818
|
-
onClick: (
|
|
819
|
-
|
|
818
|
+
onClick: (A) => {
|
|
819
|
+
A.stopPropagation(), a(o.id);
|
|
820
820
|
},
|
|
821
821
|
className: "absolute -top-2 -right-2 p-0.5 rounded-full bg-destructive text-destructive-foreground shadow",
|
|
822
|
-
children: /* @__PURE__ */ e.jsx(
|
|
822
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-3 w-3" })
|
|
823
823
|
}
|
|
824
824
|
)
|
|
825
825
|
]
|
|
826
826
|
},
|
|
827
|
-
|
|
827
|
+
o.id
|
|
828
828
|
))
|
|
829
829
|
]
|
|
830
830
|
}
|
|
831
831
|
) })
|
|
832
832
|
] });
|
|
833
833
|
}
|
|
834
|
-
function
|
|
835
|
-
return
|
|
834
|
+
function pe(...i) {
|
|
835
|
+
return Q(K(i));
|
|
836
836
|
}
|
|
837
|
-
const
|
|
837
|
+
const et = {
|
|
838
838
|
A4: { width: 595, height: 842 },
|
|
839
839
|
A3: { width: 842, height: 1191 },
|
|
840
840
|
Letter: { width: 612, height: 792 },
|
|
841
841
|
Legal: { width: 612, height: 1008 },
|
|
842
842
|
Tabloid: { width: 792, height: 1224 }
|
|
843
843
|
};
|
|
844
|
-
function
|
|
845
|
-
reportName:
|
|
846
|
-
objectName:
|
|
847
|
-
pageSize:
|
|
848
|
-
orientation:
|
|
849
|
-
margins:
|
|
850
|
-
sections:
|
|
851
|
-
showToolbar:
|
|
852
|
-
showPropertyPanel:
|
|
853
|
-
readOnly:
|
|
854
|
-
onSectionsChange:
|
|
855
|
-
className:
|
|
844
|
+
function tt({
|
|
845
|
+
reportName: i = "Untitled Report",
|
|
846
|
+
objectName: g,
|
|
847
|
+
pageSize: w = "A4",
|
|
848
|
+
orientation: T = "portrait",
|
|
849
|
+
margins: h = { top: 40, right: 40, bottom: 40, left: 40 },
|
|
850
|
+
sections: b = [],
|
|
851
|
+
showToolbar: N = !0,
|
|
852
|
+
showPropertyPanel: c = !0,
|
|
853
|
+
readOnly: m = !1,
|
|
854
|
+
onSectionsChange: l,
|
|
855
|
+
className: y
|
|
856
856
|
}) {
|
|
857
|
-
const [
|
|
858
|
-
|
|
857
|
+
const [_, E] = F(
|
|
858
|
+
b.length > 0 ? b : [
|
|
859
859
|
{ type: "header", height: 80, elements: [] },
|
|
860
860
|
{ type: "detail", height: 400, elements: [], repeat: !0 },
|
|
861
861
|
{ type: "footer", height: 60, elements: [] }
|
|
862
862
|
]
|
|
863
|
-
), [R,
|
|
864
|
-
(
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
863
|
+
), [R, C] = F(null), k = et[w], u = T === "landscape" ? k.height : k.width, a = T === "landscape" ? k.width : k.height, x = D(
|
|
864
|
+
(j, f) => {
|
|
865
|
+
if (m) return;
|
|
866
|
+
const p = {
|
|
867
867
|
id: `elem-${Date.now()}`,
|
|
868
|
-
type:
|
|
869
|
-
position: { x:
|
|
868
|
+
type: f,
|
|
869
|
+
position: { x: h.left, y: 10, width: 200, height: 30 },
|
|
870
870
|
properties: {
|
|
871
|
-
text:
|
|
872
|
-
field:
|
|
871
|
+
text: f === "text" ? "New Text" : void 0,
|
|
872
|
+
field: f === "field" ? "field_name" : void 0
|
|
873
873
|
}
|
|
874
|
-
},
|
|
875
|
-
(
|
|
874
|
+
}, V = _.map(
|
|
875
|
+
($, L) => L === j ? { ...$, elements: [...$.elements, p] } : $
|
|
876
876
|
);
|
|
877
|
-
|
|
877
|
+
E(V), C(p.id), l?.(V);
|
|
878
878
|
},
|
|
879
|
-
[
|
|
880
|
-
),
|
|
881
|
-
(
|
|
882
|
-
if (
|
|
883
|
-
const
|
|
884
|
-
...
|
|
885
|
-
elements:
|
|
879
|
+
[_, h.left, m, l]
|
|
880
|
+
), o = D(
|
|
881
|
+
(j) => {
|
|
882
|
+
if (m) return;
|
|
883
|
+
const f = _.map((p) => ({
|
|
884
|
+
...p,
|
|
885
|
+
elements: p.elements.filter((V) => V.id !== j)
|
|
886
886
|
}));
|
|
887
|
-
|
|
887
|
+
E(f), R === j && C(null), l?.(f);
|
|
888
888
|
},
|
|
889
|
-
[
|
|
890
|
-
),
|
|
891
|
-
switch (
|
|
889
|
+
[_, R, m, l]
|
|
890
|
+
), A = (j) => {
|
|
891
|
+
switch (j) {
|
|
892
892
|
case "header":
|
|
893
893
|
return "Report Header";
|
|
894
894
|
case "page-header":
|
|
@@ -904,24 +904,24 @@ function Ge({
|
|
|
904
904
|
case "footer":
|
|
905
905
|
return "Report Footer";
|
|
906
906
|
default:
|
|
907
|
-
return
|
|
907
|
+
return j;
|
|
908
908
|
}
|
|
909
909
|
};
|
|
910
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
910
|
+
return /* @__PURE__ */ e.jsxs("div", { className: pe("flex h-full w-full border rounded-lg overflow-hidden bg-background", y), children: [
|
|
911
911
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col", children: [
|
|
912
|
-
|
|
913
|
-
/* @__PURE__ */ e.jsx(
|
|
914
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children:
|
|
915
|
-
|
|
912
|
+
N && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
|
|
913
|
+
/* @__PURE__ */ e.jsx(Te, { className: "h-4 w-4" }),
|
|
914
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: i }),
|
|
915
|
+
g && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
916
916
|
"(",
|
|
917
|
-
|
|
917
|
+
g,
|
|
918
918
|
")"
|
|
919
919
|
] }),
|
|
920
920
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
921
921
|
/* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
922
|
-
|
|
922
|
+
w,
|
|
923
923
|
" ",
|
|
924
|
-
|
|
924
|
+
T
|
|
925
925
|
] })
|
|
926
926
|
] }),
|
|
927
927
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto bg-muted/10 p-4 flex justify-center", children: /* @__PURE__ */ e.jsx(
|
|
@@ -929,42 +929,42 @@ function Ge({
|
|
|
929
929
|
{
|
|
930
930
|
className: "bg-white shadow-lg border",
|
|
931
931
|
style: {
|
|
932
|
-
width:
|
|
933
|
-
minHeight:
|
|
932
|
+
width: u,
|
|
933
|
+
minHeight: a
|
|
934
934
|
},
|
|
935
|
-
children:
|
|
935
|
+
children: _.map((j, f) => /* @__PURE__ */ e.jsxs(
|
|
936
936
|
"div",
|
|
937
937
|
{
|
|
938
938
|
className: "relative border-b border-dashed border-gray-300",
|
|
939
|
-
style: { minHeight:
|
|
939
|
+
style: { minHeight: j.height },
|
|
940
940
|
children: [
|
|
941
941
|
/* @__PURE__ */ e.jsxs("div", { className: "absolute left-0 top-0 px-2 py-0.5 bg-muted text-xs text-muted-foreground border-r border-b rounded-br", children: [
|
|
942
|
-
|
|
943
|
-
|
|
942
|
+
A(j.type),
|
|
943
|
+
j.repeat && " ↻"
|
|
944
944
|
] }),
|
|
945
|
-
!
|
|
945
|
+
!m && /* @__PURE__ */ e.jsxs("div", { className: "absolute right-1 top-0 flex items-center gap-0.5", children: [
|
|
946
946
|
/* @__PURE__ */ e.jsx(
|
|
947
947
|
"button",
|
|
948
948
|
{
|
|
949
|
-
onClick: () =>
|
|
949
|
+
onClick: () => x(f, "text"),
|
|
950
950
|
className: "p-0.5 rounded hover:bg-accent",
|
|
951
951
|
title: "Add Text",
|
|
952
|
-
children: /* @__PURE__ */ e.jsx(
|
|
952
|
+
children: /* @__PURE__ */ e.jsx(Re, { className: "h-3 w-3" })
|
|
953
953
|
}
|
|
954
954
|
),
|
|
955
955
|
/* @__PURE__ */ e.jsx(
|
|
956
956
|
"button",
|
|
957
957
|
{
|
|
958
|
-
onClick: () =>
|
|
958
|
+
onClick: () => x(f, "field"),
|
|
959
959
|
className: "p-0.5 rounded hover:bg-accent",
|
|
960
960
|
title: "Add Field",
|
|
961
|
-
children: /* @__PURE__ */ e.jsx(
|
|
961
|
+
children: /* @__PURE__ */ e.jsx(Y, { className: "h-3 w-3" })
|
|
962
962
|
}
|
|
963
963
|
),
|
|
964
964
|
/* @__PURE__ */ e.jsx(
|
|
965
965
|
"button",
|
|
966
966
|
{
|
|
967
|
-
onClick: () =>
|
|
967
|
+
onClick: () => x(f, "image"),
|
|
968
968
|
className: "p-0.5 rounded hover:bg-accent",
|
|
969
969
|
title: "Add Image",
|
|
970
970
|
children: /* @__PURE__ */ e.jsx(_e, { className: "h-3 w-3" })
|
|
@@ -973,66 +973,66 @@ function Ge({
|
|
|
973
973
|
/* @__PURE__ */ e.jsx(
|
|
974
974
|
"button",
|
|
975
975
|
{
|
|
976
|
-
onClick: () =>
|
|
976
|
+
onClick: () => x(f, "chart"),
|
|
977
977
|
className: "p-0.5 rounded hover:bg-accent",
|
|
978
978
|
title: "Add Chart",
|
|
979
|
-
children: /* @__PURE__ */ e.jsx(
|
|
979
|
+
children: /* @__PURE__ */ e.jsx(Ae, { className: "h-3 w-3" })
|
|
980
980
|
}
|
|
981
981
|
),
|
|
982
982
|
/* @__PURE__ */ e.jsx(
|
|
983
983
|
"button",
|
|
984
984
|
{
|
|
985
|
-
onClick: () =>
|
|
985
|
+
onClick: () => x(f, "table"),
|
|
986
986
|
className: "p-0.5 rounded hover:bg-accent",
|
|
987
987
|
title: "Add Table",
|
|
988
|
-
children: /* @__PURE__ */ e.jsx(
|
|
988
|
+
children: /* @__PURE__ */ e.jsx(Pe, { className: "h-3 w-3" })
|
|
989
989
|
}
|
|
990
990
|
)
|
|
991
991
|
] }),
|
|
992
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative", style: { minHeight:
|
|
992
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative", style: { minHeight: j.height, paddingTop: 24 }, children: j.elements.map((p) => /* @__PURE__ */ e.jsxs(
|
|
993
993
|
"div",
|
|
994
994
|
{
|
|
995
|
-
className:
|
|
995
|
+
className: pe(
|
|
996
996
|
"absolute border rounded px-2 py-1 text-xs cursor-pointer",
|
|
997
|
-
R ===
|
|
997
|
+
R === p.id ? "border-primary ring-1 ring-primary/30 bg-primary/5" : "border-dashed border-gray-400 hover:border-primary/50"
|
|
998
998
|
),
|
|
999
999
|
style: {
|
|
1000
|
-
left:
|
|
1001
|
-
top: (typeof
|
|
1002
|
-
width:
|
|
1003
|
-
height:
|
|
1000
|
+
left: p.position.x,
|
|
1001
|
+
top: (typeof p.position.y == "number" ? p.position.y : 0) + 24,
|
|
1002
|
+
width: p.position.width,
|
|
1003
|
+
height: p.position.height
|
|
1004
1004
|
},
|
|
1005
|
-
onClick: () =>
|
|
1005
|
+
onClick: () => C(p.id),
|
|
1006
1006
|
children: [
|
|
1007
1007
|
/* @__PURE__ */ e.jsxs("span", { className: "text-muted-foreground", children: [
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1008
|
+
p.type === "text" && (p.properties.text ?? "Text"),
|
|
1009
|
+
p.type === "field" && `{${p.properties.field ?? "field"}}`,
|
|
1010
|
+
p.type === "image" && "🖼 Image",
|
|
1011
|
+
p.type === "chart" && "📊 Chart",
|
|
1012
|
+
p.type === "table" && "📋 Table"
|
|
1013
1013
|
] }),
|
|
1014
|
-
!
|
|
1014
|
+
!m && R === p.id && /* @__PURE__ */ e.jsx(
|
|
1015
1015
|
"button",
|
|
1016
1016
|
{
|
|
1017
|
-
onClick: (
|
|
1018
|
-
|
|
1017
|
+
onClick: (V) => {
|
|
1018
|
+
V.stopPropagation(), o(p.id);
|
|
1019
1019
|
},
|
|
1020
1020
|
className: "absolute -top-2 -right-2 p-0.5 rounded-full bg-destructive text-destructive-foreground shadow",
|
|
1021
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1021
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-2.5 w-2.5" })
|
|
1022
1022
|
}
|
|
1023
1023
|
)
|
|
1024
1024
|
]
|
|
1025
1025
|
},
|
|
1026
|
-
|
|
1026
|
+
p.id
|
|
1027
1027
|
)) })
|
|
1028
1028
|
]
|
|
1029
1029
|
},
|
|
1030
|
-
`${
|
|
1030
|
+
`${j.type}-${f}`
|
|
1031
1031
|
))
|
|
1032
1032
|
}
|
|
1033
1033
|
) })
|
|
1034
1034
|
] }),
|
|
1035
|
-
|
|
1035
|
+
c && /* @__PURE__ */ e.jsxs("div", { className: "w-56 border-l bg-muted/30 flex flex-col", children: [
|
|
1036
1036
|
/* @__PURE__ */ e.jsx("div", { className: "p-3 border-b font-medium text-sm", children: "Properties" }),
|
|
1037
1037
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-3", children: R ? /* @__PURE__ */ e.jsx("div", { className: "space-y-2 text-xs", children: /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground", children: [
|
|
1038
1038
|
"Element ID: ",
|
|
@@ -1041,47 +1041,47 @@ function Ge({
|
|
|
1041
1041
|
] })
|
|
1042
1042
|
] });
|
|
1043
1043
|
}
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
function
|
|
1047
|
-
config:
|
|
1048
|
-
user:
|
|
1049
|
-
onOperation:
|
|
1050
|
-
children:
|
|
1044
|
+
const fe = je(null);
|
|
1045
|
+
fe.displayName = "CollaborationContext";
|
|
1046
|
+
function ct({
|
|
1047
|
+
config: i,
|
|
1048
|
+
user: g,
|
|
1049
|
+
onOperation: w,
|
|
1050
|
+
children: T
|
|
1051
1051
|
}) {
|
|
1052
|
-
const
|
|
1053
|
-
userId:
|
|
1054
|
-
userName:
|
|
1055
|
-
avatar:
|
|
1056
|
-
color:
|
|
1052
|
+
const h = ae(() => !i.enabled || !g ? [] : [{
|
|
1053
|
+
userId: g.id,
|
|
1054
|
+
userName: g.name,
|
|
1055
|
+
avatar: g.avatar,
|
|
1056
|
+
color: rt(g.id),
|
|
1057
1057
|
status: "active",
|
|
1058
1058
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString()
|
|
1059
|
-
}], [
|
|
1060
|
-
(
|
|
1061
|
-
if (!
|
|
1062
|
-
const
|
|
1063
|
-
...
|
|
1059
|
+
}], [i.enabled, g]), b = i.enabled && !!g, N = D(
|
|
1060
|
+
(m) => {
|
|
1061
|
+
if (!b || !g) return;
|
|
1062
|
+
const l = {
|
|
1063
|
+
...m,
|
|
1064
1064
|
id: `op-${Date.now()}`,
|
|
1065
|
-
userId:
|
|
1065
|
+
userId: g.id,
|
|
1066
1066
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1067
1067
|
version: Date.now()
|
|
1068
1068
|
};
|
|
1069
|
-
|
|
1069
|
+
w?.(l);
|
|
1070
1070
|
},
|
|
1071
|
-
[
|
|
1072
|
-
),
|
|
1071
|
+
[b, g, w]
|
|
1072
|
+
), c = ae(
|
|
1073
1073
|
() => ({
|
|
1074
|
-
users:
|
|
1075
|
-
isConnected:
|
|
1076
|
-
sendOperation:
|
|
1077
|
-
currentUserId:
|
|
1074
|
+
users: h,
|
|
1075
|
+
isConnected: b,
|
|
1076
|
+
sendOperation: N,
|
|
1077
|
+
currentUserId: g?.id
|
|
1078
1078
|
}),
|
|
1079
|
-
[
|
|
1079
|
+
[h, b, N, g?.id]
|
|
1080
1080
|
);
|
|
1081
|
-
return /* @__PURE__ */ e.jsx(
|
|
1081
|
+
return /* @__PURE__ */ e.jsx(fe.Provider, { value: c, children: T });
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
const
|
|
1083
|
+
function rt(i) {
|
|
1084
|
+
const g = [
|
|
1085
1085
|
"#3b82f6",
|
|
1086
1086
|
"#ef4444",
|
|
1087
1087
|
"#22c55e",
|
|
@@ -1091,14 +1091,620 @@ function Le(l) {
|
|
|
1091
1091
|
"#06b6d4",
|
|
1092
1092
|
"#f97316"
|
|
1093
1093
|
];
|
|
1094
|
-
let
|
|
1095
|
-
for (let
|
|
1096
|
-
|
|
1097
|
-
return
|
|
1094
|
+
let w = 0;
|
|
1095
|
+
for (let T = 0; T < i.length; T++)
|
|
1096
|
+
w = (w << 5) - w + i.charCodeAt(T) | 0;
|
|
1097
|
+
return g[Math.abs(w) % g.length];
|
|
1098
|
+
}
|
|
1099
|
+
function se(...i) {
|
|
1100
|
+
return Q(K(i));
|
|
1101
|
+
}
|
|
1102
|
+
const he = [
|
|
1103
|
+
{ type: "grid", label: "Grid", icon: Ie },
|
|
1104
|
+
{ type: "kanban", label: "Kanban", icon: Ve },
|
|
1105
|
+
{ type: "gallery", label: "Gallery", icon: Le },
|
|
1106
|
+
{ type: "calendar", label: "Calendar", icon: ze },
|
|
1107
|
+
{ type: "timeline", label: "Timeline", icon: Ge },
|
|
1108
|
+
{ type: "gantt", label: "Gantt", icon: Me },
|
|
1109
|
+
{ type: "map", label: "Map", icon: Ye }
|
|
1110
|
+
], st = [
|
|
1111
|
+
{ value: "equals", label: "=" },
|
|
1112
|
+
{ value: "contains", label: "Contains" },
|
|
1113
|
+
{ value: "startsWith", label: "Starts with" },
|
|
1114
|
+
{ value: "gt", label: ">" },
|
|
1115
|
+
{ value: "lt", label: "<" },
|
|
1116
|
+
{ value: "gte", label: ">=" },
|
|
1117
|
+
{ value: "lte", label: "<=" },
|
|
1118
|
+
{ value: "ne", label: "!=" }
|
|
1119
|
+
];
|
|
1120
|
+
function at({
|
|
1121
|
+
objectName: i,
|
|
1122
|
+
viewId: g,
|
|
1123
|
+
viewLabel: w = "",
|
|
1124
|
+
viewType: T = "grid",
|
|
1125
|
+
columns: h = [],
|
|
1126
|
+
filters: b = [],
|
|
1127
|
+
sort: N = [],
|
|
1128
|
+
availableFields: c = [],
|
|
1129
|
+
options: m = {},
|
|
1130
|
+
readOnly: l = !1,
|
|
1131
|
+
onSave: y,
|
|
1132
|
+
onCancel: _,
|
|
1133
|
+
className: E
|
|
1134
|
+
}) {
|
|
1135
|
+
const [R, C] = F(w), [k, u] = F(T), [a, x] = F(h), [o, A] = F(b), [j, f] = F(N), [p, V] = F(m), [$, L] = F(null), [z, U] = F("columns"), W = ae(() => {
|
|
1136
|
+
const t = new Set(a.map((n) => n.field));
|
|
1137
|
+
return c.filter((n) => !t.has(n.name));
|
|
1138
|
+
}, [c, a]), le = D(
|
|
1139
|
+
(t) => {
|
|
1140
|
+
if (l) return;
|
|
1141
|
+
const n = c.find((v) => v.name === t), s = {
|
|
1142
|
+
field: t,
|
|
1143
|
+
label: n?.label ?? t,
|
|
1144
|
+
visible: !0,
|
|
1145
|
+
order: a.length
|
|
1146
|
+
};
|
|
1147
|
+
x((v) => [...v, s]);
|
|
1148
|
+
},
|
|
1149
|
+
[c, a.length, l]
|
|
1150
|
+
), q = D(
|
|
1151
|
+
(t) => {
|
|
1152
|
+
l || (x((n) => n.filter((s, v) => v !== t)), $ === t && L(null));
|
|
1153
|
+
},
|
|
1154
|
+
[l, $]
|
|
1155
|
+
), O = D(
|
|
1156
|
+
(t) => {
|
|
1157
|
+
l || x(
|
|
1158
|
+
(n) => n.map((s, v) => v === t ? { ...s, visible: !s.visible } : s)
|
|
1159
|
+
);
|
|
1160
|
+
},
|
|
1161
|
+
[l]
|
|
1162
|
+
), H = D(
|
|
1163
|
+
(t, n) => {
|
|
1164
|
+
if (l) return;
|
|
1165
|
+
const s = n === "up" ? t - 1 : t + 1;
|
|
1166
|
+
s < 0 || s >= a.length || (x((v) => {
|
|
1167
|
+
const I = [...v], B = I[t];
|
|
1168
|
+
return I[t] = I[s], I[s] = B, I;
|
|
1169
|
+
}), L(s));
|
|
1170
|
+
},
|
|
1171
|
+
[l, a.length]
|
|
1172
|
+
), ee = D(() => {
|
|
1173
|
+
l || c.length === 0 || A((t) => [
|
|
1174
|
+
...t,
|
|
1175
|
+
{ field: c[0].name, operator: "equals", value: "" }
|
|
1176
|
+
]);
|
|
1177
|
+
}, [l, c]), te = D(
|
|
1178
|
+
(t) => {
|
|
1179
|
+
l || A((n) => n.filter((s, v) => v !== t));
|
|
1180
|
+
},
|
|
1181
|
+
[l]
|
|
1182
|
+
), M = D(
|
|
1183
|
+
(t, n) => {
|
|
1184
|
+
l || A(
|
|
1185
|
+
(s) => s.map((v, I) => I === t ? { ...v, ...n } : v)
|
|
1186
|
+
);
|
|
1187
|
+
},
|
|
1188
|
+
[l]
|
|
1189
|
+
), r = D(() => {
|
|
1190
|
+
l || c.length === 0 || f((t) => [
|
|
1191
|
+
...t,
|
|
1192
|
+
{ field: c[0].name, direction: "asc" }
|
|
1193
|
+
]);
|
|
1194
|
+
}, [l, c]), d = D(
|
|
1195
|
+
(t) => {
|
|
1196
|
+
l || f((n) => n.filter((s, v) => v !== t));
|
|
1197
|
+
},
|
|
1198
|
+
[l]
|
|
1199
|
+
), S = D(
|
|
1200
|
+
(t, n) => {
|
|
1201
|
+
l || f(
|
|
1202
|
+
(s) => s.map((v, I) => I === t ? { ...v, ...n } : v)
|
|
1203
|
+
);
|
|
1204
|
+
},
|
|
1205
|
+
[l]
|
|
1206
|
+
), P = D(() => {
|
|
1207
|
+
y?.({
|
|
1208
|
+
viewId: g,
|
|
1209
|
+
viewLabel: R || `${i} View`,
|
|
1210
|
+
viewType: k,
|
|
1211
|
+
columns: a,
|
|
1212
|
+
filters: o,
|
|
1213
|
+
sort: j,
|
|
1214
|
+
options: p
|
|
1215
|
+
});
|
|
1216
|
+
}, [y, g, R, i, k, a, o, j, p]);
|
|
1217
|
+
return /* @__PURE__ */ e.jsxs("div", { className: se("flex flex-col h-full w-full border rounded-lg overflow-hidden bg-background", E), children: [
|
|
1218
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20 shrink-0", children: [
|
|
1219
|
+
/* @__PURE__ */ e.jsx(De, { className: "h-4 w-4 text-muted-foreground" }),
|
|
1220
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: "View Designer" }),
|
|
1221
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
1222
|
+
"— ",
|
|
1223
|
+
i
|
|
1224
|
+
] }),
|
|
1225
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
1226
|
+
!l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1227
|
+
_ && /* @__PURE__ */ e.jsxs(
|
|
1228
|
+
"button",
|
|
1229
|
+
{
|
|
1230
|
+
onClick: _,
|
|
1231
|
+
className: "flex items-center gap-1 px-3 py-1.5 text-xs rounded border border-border hover:bg-accent",
|
|
1232
|
+
"data-testid": "view-designer-cancel",
|
|
1233
|
+
children: [
|
|
1234
|
+
/* @__PURE__ */ e.jsx(Fe, { className: "h-3 w-3" }),
|
|
1235
|
+
" Cancel"
|
|
1236
|
+
]
|
|
1237
|
+
}
|
|
1238
|
+
),
|
|
1239
|
+
/* @__PURE__ */ e.jsxs(
|
|
1240
|
+
"button",
|
|
1241
|
+
{
|
|
1242
|
+
onClick: P,
|
|
1243
|
+
className: "flex items-center gap-1 px-3 py-1.5 text-xs rounded bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1244
|
+
"data-testid": "view-designer-save",
|
|
1245
|
+
children: [
|
|
1246
|
+
/* @__PURE__ */ e.jsx($e, { className: "h-3 w-3" }),
|
|
1247
|
+
" Save View"
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
)
|
|
1251
|
+
] })
|
|
1252
|
+
] }),
|
|
1253
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
1254
|
+
!l && /* @__PURE__ */ e.jsxs("div", { className: "w-56 border-r bg-muted/30 flex flex-col shrink-0", children: [
|
|
1255
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-3 border-b font-medium text-sm", children: "Available Fields" }),
|
|
1256
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: W.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "text-xs text-muted-foreground text-center py-4", children: "All fields added" }) : W.map((t) => /* @__PURE__ */ e.jsxs(
|
|
1257
|
+
"button",
|
|
1258
|
+
{
|
|
1259
|
+
onClick: () => le(t.name),
|
|
1260
|
+
className: "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent text-left",
|
|
1261
|
+
"data-testid": `field-${t.name}`,
|
|
1262
|
+
children: [
|
|
1263
|
+
/* @__PURE__ */ e.jsx(Y, { className: "h-3 w-3 text-muted-foreground" }),
|
|
1264
|
+
/* @__PURE__ */ e.jsx("span", { className: "truncate", children: t.label || t.name }),
|
|
1265
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: t.type })
|
|
1266
|
+
]
|
|
1267
|
+
},
|
|
1268
|
+
t.name
|
|
1269
|
+
)) })
|
|
1270
|
+
] }),
|
|
1271
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
1272
|
+
/* @__PURE__ */ e.jsxs("div", { className: "p-3 border-b space-y-3 shrink-0 bg-muted/10", children: [
|
|
1273
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1274
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs font-semibold text-foreground", children: "View Type" }),
|
|
1275
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex gap-2 flex-wrap", children: he.map(({ type: t, label: n, icon: s }) => /* @__PURE__ */ e.jsxs(
|
|
1276
|
+
"button",
|
|
1277
|
+
{
|
|
1278
|
+
onClick: () => !l && u(t),
|
|
1279
|
+
className: se(
|
|
1280
|
+
"flex items-center gap-2 px-3 py-2 text-sm rounded-md border-2 transition-all font-medium",
|
|
1281
|
+
k === t ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border bg-background hover:border-primary/50 hover:bg-accent"
|
|
1282
|
+
),
|
|
1283
|
+
"data-testid": `view-type-${t}`,
|
|
1284
|
+
children: [
|
|
1285
|
+
/* @__PURE__ */ e.jsx(s, { className: "h-4 w-4" }),
|
|
1286
|
+
n
|
|
1287
|
+
]
|
|
1288
|
+
},
|
|
1289
|
+
t
|
|
1290
|
+
)) })
|
|
1291
|
+
] }),
|
|
1292
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1293
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs font-semibold text-foreground", children: "View Name" }),
|
|
1294
|
+
/* @__PURE__ */ e.jsx(
|
|
1295
|
+
"input",
|
|
1296
|
+
{
|
|
1297
|
+
type: "text",
|
|
1298
|
+
value: R,
|
|
1299
|
+
onChange: (t) => !l && C(t.target.value),
|
|
1300
|
+
placeholder: "Enter view name...",
|
|
1301
|
+
className: "px-3 py-2 text-sm border-2 rounded-md bg-background focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary",
|
|
1302
|
+
readOnly: l,
|
|
1303
|
+
"data-testid": "view-label-input"
|
|
1304
|
+
}
|
|
1305
|
+
)
|
|
1306
|
+
] })
|
|
1307
|
+
] }),
|
|
1308
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto p-3", children: a.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center h-full text-sm text-muted-foreground", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
|
|
1309
|
+
/* @__PURE__ */ e.jsx(Ue, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
|
|
1310
|
+
/* @__PURE__ */ e.jsx("p", { children: "No columns added yet" }),
|
|
1311
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs mt-1", children: "Add fields from the left panel to design your view" })
|
|
1312
|
+
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
1313
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-xs font-medium text-muted-foreground mb-2", children: [
|
|
1314
|
+
"Columns (",
|
|
1315
|
+
a.length,
|
|
1316
|
+
")"
|
|
1317
|
+
] }),
|
|
1318
|
+
a.map((t, n) => /* @__PURE__ */ e.jsxs(
|
|
1319
|
+
"div",
|
|
1320
|
+
{
|
|
1321
|
+
className: se(
|
|
1322
|
+
"flex items-center gap-2 px-3 py-2 rounded border transition-colors cursor-pointer",
|
|
1323
|
+
$ === n ? "border-primary bg-primary/5 ring-1 ring-primary/20" : "border-border hover:border-primary/50",
|
|
1324
|
+
!t.visible && "opacity-50"
|
|
1325
|
+
),
|
|
1326
|
+
onClick: () => L(n),
|
|
1327
|
+
"data-testid": `column-${t.field}`,
|
|
1328
|
+
children: [
|
|
1329
|
+
/* @__PURE__ */ e.jsx(ge, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
|
|
1330
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium truncate flex-1", children: t.label || t.field }),
|
|
1331
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: t.field }),
|
|
1332
|
+
!l && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
|
|
1333
|
+
/* @__PURE__ */ e.jsx(
|
|
1334
|
+
"button",
|
|
1335
|
+
{
|
|
1336
|
+
onClick: (s) => {
|
|
1337
|
+
s.stopPropagation(), H(n, "up");
|
|
1338
|
+
},
|
|
1339
|
+
disabled: n === 0,
|
|
1340
|
+
className: "p-0.5 rounded hover:bg-accent disabled:opacity-30",
|
|
1341
|
+
title: "Move up",
|
|
1342
|
+
children: /* @__PURE__ */ e.jsx(We, { className: "h-3 w-3" })
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
/* @__PURE__ */ e.jsx(
|
|
1346
|
+
"button",
|
|
1347
|
+
{
|
|
1348
|
+
onClick: (s) => {
|
|
1349
|
+
s.stopPropagation(), H(n, "down");
|
|
1350
|
+
},
|
|
1351
|
+
disabled: n === a.length - 1,
|
|
1352
|
+
className: "p-0.5 rounded hover:bg-accent disabled:opacity-30",
|
|
1353
|
+
title: "Move down",
|
|
1354
|
+
children: /* @__PURE__ */ e.jsx(qe, { className: "h-3 w-3" })
|
|
1355
|
+
}
|
|
1356
|
+
),
|
|
1357
|
+
/* @__PURE__ */ e.jsx(
|
|
1358
|
+
"button",
|
|
1359
|
+
{
|
|
1360
|
+
onClick: (s) => {
|
|
1361
|
+
s.stopPropagation(), O(n);
|
|
1362
|
+
},
|
|
1363
|
+
className: "p-0.5 rounded hover:bg-accent",
|
|
1364
|
+
title: t.visible !== !1 ? "Hide column" : "Show column",
|
|
1365
|
+
children: t.visible !== !1 ? /* @__PURE__ */ e.jsx(be, { className: "h-3 w-3" }) : /* @__PURE__ */ e.jsx(He, { className: "h-3 w-3" })
|
|
1366
|
+
}
|
|
1367
|
+
),
|
|
1368
|
+
/* @__PURE__ */ e.jsx(
|
|
1369
|
+
"button",
|
|
1370
|
+
{
|
|
1371
|
+
onClick: (s) => {
|
|
1372
|
+
s.stopPropagation(), q(n);
|
|
1373
|
+
},
|
|
1374
|
+
className: "p-0.5 rounded hover:bg-destructive/10",
|
|
1375
|
+
title: "Remove column",
|
|
1376
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-3 w-3 text-destructive" })
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
] })
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
`${t.field}-${n}`
|
|
1383
|
+
))
|
|
1384
|
+
] }) })
|
|
1385
|
+
] }),
|
|
1386
|
+
/* @__PURE__ */ e.jsxs("div", { className: "w-64 border-l bg-muted/30 flex flex-col shrink-0", children: [
|
|
1387
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex border-b shrink-0", children: ["columns", "filters", "sort", "options"].map((t) => /* @__PURE__ */ e.jsx(
|
|
1388
|
+
"button",
|
|
1389
|
+
{
|
|
1390
|
+
onClick: () => U(t),
|
|
1391
|
+
className: se(
|
|
1392
|
+
"flex-1 px-2 py-2 text-xs font-medium capitalize transition-colors",
|
|
1393
|
+
z === t ? "border-b-2 border-primary text-primary" : "text-muted-foreground hover:text-foreground"
|
|
1394
|
+
),
|
|
1395
|
+
children: t
|
|
1396
|
+
},
|
|
1397
|
+
t
|
|
1398
|
+
)) }),
|
|
1399
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 overflow-y-auto p-3", children: [
|
|
1400
|
+
z === "columns" && /* @__PURE__ */ e.jsx("div", { children: $ !== null && a[$] ? /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
1401
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium", children: "Column Properties" }),
|
|
1402
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1403
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Label" }),
|
|
1404
|
+
/* @__PURE__ */ e.jsx(
|
|
1405
|
+
"input",
|
|
1406
|
+
{
|
|
1407
|
+
type: "text",
|
|
1408
|
+
value: a[$].label ?? "",
|
|
1409
|
+
onChange: (t) => {
|
|
1410
|
+
if (l) return;
|
|
1411
|
+
const n = $;
|
|
1412
|
+
x(
|
|
1413
|
+
(s) => s.map((v, I) => I === n ? { ...v, label: t.target.value } : v)
|
|
1414
|
+
);
|
|
1415
|
+
},
|
|
1416
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1417
|
+
readOnly: l,
|
|
1418
|
+
"data-testid": "column-label-input"
|
|
1419
|
+
}
|
|
1420
|
+
)
|
|
1421
|
+
] }),
|
|
1422
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1423
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Width" }),
|
|
1424
|
+
/* @__PURE__ */ e.jsx(
|
|
1425
|
+
"input",
|
|
1426
|
+
{
|
|
1427
|
+
type: "text",
|
|
1428
|
+
value: a[$].width ?? "",
|
|
1429
|
+
onChange: (t) => {
|
|
1430
|
+
if (l) return;
|
|
1431
|
+
const n = $, s = t.target.value;
|
|
1432
|
+
x(
|
|
1433
|
+
(v) => v.map(
|
|
1434
|
+
(I, B) => B === n ? { ...I, width: /^\d+$/.test(s) ? Number(s) : s } : I
|
|
1435
|
+
)
|
|
1436
|
+
);
|
|
1437
|
+
},
|
|
1438
|
+
placeholder: "auto",
|
|
1439
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1440
|
+
readOnly: l,
|
|
1441
|
+
"data-testid": "column-width-input"
|
|
1442
|
+
}
|
|
1443
|
+
)
|
|
1444
|
+
] }),
|
|
1445
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
1446
|
+
"Field: ",
|
|
1447
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono", children: a[$].field })
|
|
1448
|
+
] })
|
|
1449
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-xs text-muted-foreground text-center py-4", children: "Select a column to edit its properties" }) }),
|
|
1450
|
+
z === "filters" && /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1451
|
+
o.map((t, n) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 p-2 border rounded bg-background", "data-testid": `filter-${n}`, children: [
|
|
1452
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1453
|
+
/* @__PURE__ */ e.jsx(
|
|
1454
|
+
"select",
|
|
1455
|
+
{
|
|
1456
|
+
value: t.field,
|
|
1457
|
+
onChange: (s) => M(n, { field: s.target.value }),
|
|
1458
|
+
className: "flex-1 px-1 py-0.5 text-xs border rounded bg-background",
|
|
1459
|
+
disabled: l,
|
|
1460
|
+
children: c.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.name, children: s.label || s.name }, s.name))
|
|
1461
|
+
}
|
|
1462
|
+
),
|
|
1463
|
+
!l && /* @__PURE__ */ e.jsx(
|
|
1464
|
+
"button",
|
|
1465
|
+
{
|
|
1466
|
+
onClick: () => te(n),
|
|
1467
|
+
className: "p-0.5 rounded hover:bg-destructive/10",
|
|
1468
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-3 w-3 text-destructive" })
|
|
1469
|
+
}
|
|
1470
|
+
)
|
|
1471
|
+
] }),
|
|
1472
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1473
|
+
/* @__PURE__ */ e.jsx(
|
|
1474
|
+
"select",
|
|
1475
|
+
{
|
|
1476
|
+
value: t.operator,
|
|
1477
|
+
onChange: (s) => M(n, { operator: s.target.value }),
|
|
1478
|
+
className: "w-24 px-1 py-0.5 text-xs border rounded bg-background",
|
|
1479
|
+
disabled: l,
|
|
1480
|
+
children: st.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.value, children: s.label }, s.value))
|
|
1481
|
+
}
|
|
1482
|
+
),
|
|
1483
|
+
/* @__PURE__ */ e.jsx(
|
|
1484
|
+
"input",
|
|
1485
|
+
{
|
|
1486
|
+
type: "text",
|
|
1487
|
+
value: t.value ?? "",
|
|
1488
|
+
onChange: (s) => M(n, { value: s.target.value }),
|
|
1489
|
+
placeholder: "Value",
|
|
1490
|
+
className: "flex-1 px-1 py-0.5 text-xs border rounded bg-background",
|
|
1491
|
+
readOnly: l
|
|
1492
|
+
}
|
|
1493
|
+
)
|
|
1494
|
+
] })
|
|
1495
|
+
] }, n)),
|
|
1496
|
+
!l && /* @__PURE__ */ e.jsxs(
|
|
1497
|
+
"button",
|
|
1498
|
+
{
|
|
1499
|
+
onClick: ee,
|
|
1500
|
+
className: "w-full flex items-center justify-center gap-1 px-2 py-1.5 text-xs rounded border border-dashed border-border hover:bg-accent",
|
|
1501
|
+
"data-testid": "add-filter",
|
|
1502
|
+
children: [
|
|
1503
|
+
/* @__PURE__ */ e.jsx(Y, { className: "h-3 w-3" }),
|
|
1504
|
+
" Add Filter"
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
)
|
|
1508
|
+
] }),
|
|
1509
|
+
z === "sort" && /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1510
|
+
j.map((t, n) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 p-2 border rounded bg-background", "data-testid": `sort-${n}`, children: [
|
|
1511
|
+
/* @__PURE__ */ e.jsx(
|
|
1512
|
+
"select",
|
|
1513
|
+
{
|
|
1514
|
+
value: t.field,
|
|
1515
|
+
onChange: (s) => S(n, { field: s.target.value }),
|
|
1516
|
+
className: "flex-1 px-1 py-0.5 text-xs border rounded bg-background",
|
|
1517
|
+
disabled: l,
|
|
1518
|
+
children: c.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.name, children: s.label || s.name }, s.name))
|
|
1519
|
+
}
|
|
1520
|
+
),
|
|
1521
|
+
/* @__PURE__ */ e.jsxs(
|
|
1522
|
+
"select",
|
|
1523
|
+
{
|
|
1524
|
+
value: t.direction,
|
|
1525
|
+
onChange: (s) => S(n, { direction: s.target.value }),
|
|
1526
|
+
className: "w-16 px-1 py-0.5 text-xs border rounded bg-background",
|
|
1527
|
+
disabled: l,
|
|
1528
|
+
children: [
|
|
1529
|
+
/* @__PURE__ */ e.jsx("option", { value: "asc", children: "Asc" }),
|
|
1530
|
+
/* @__PURE__ */ e.jsx("option", { value: "desc", children: "Desc" })
|
|
1531
|
+
]
|
|
1532
|
+
}
|
|
1533
|
+
),
|
|
1534
|
+
!l && /* @__PURE__ */ e.jsx(
|
|
1535
|
+
"button",
|
|
1536
|
+
{
|
|
1537
|
+
onClick: () => d(n),
|
|
1538
|
+
className: "p-0.5 rounded hover:bg-destructive/10",
|
|
1539
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "h-3 w-3 text-destructive" })
|
|
1540
|
+
}
|
|
1541
|
+
)
|
|
1542
|
+
] }, n)),
|
|
1543
|
+
!l && /* @__PURE__ */ e.jsxs(
|
|
1544
|
+
"button",
|
|
1545
|
+
{
|
|
1546
|
+
onClick: r,
|
|
1547
|
+
className: "w-full flex items-center justify-center gap-1 px-2 py-1.5 text-xs rounded border border-dashed border-border hover:bg-accent",
|
|
1548
|
+
"data-testid": "add-sort",
|
|
1549
|
+
children: [
|
|
1550
|
+
/* @__PURE__ */ e.jsx(Y, { className: "h-3 w-3" }),
|
|
1551
|
+
" Add Sort"
|
|
1552
|
+
]
|
|
1553
|
+
}
|
|
1554
|
+
)
|
|
1555
|
+
] }),
|
|
1556
|
+
z === "options" && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
1557
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-xs font-medium", children: [
|
|
1558
|
+
he.find((t) => t.type === k)?.label ?? k,
|
|
1559
|
+
" Options"
|
|
1560
|
+
] }),
|
|
1561
|
+
k === "kanban" && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1562
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Group By Field" }),
|
|
1563
|
+
/* @__PURE__ */ e.jsxs(
|
|
1564
|
+
"select",
|
|
1565
|
+
{
|
|
1566
|
+
value: p.groupBy ?? "",
|
|
1567
|
+
onChange: (t) => !l && V((n) => ({ ...n, groupBy: t.target.value })),
|
|
1568
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1569
|
+
disabled: l,
|
|
1570
|
+
"data-testid": "kanban-group-by",
|
|
1571
|
+
children: [
|
|
1572
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1573
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1574
|
+
]
|
|
1575
|
+
}
|
|
1576
|
+
)
|
|
1577
|
+
] }),
|
|
1578
|
+
k === "calendar" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1579
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1580
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Start Date Field" }),
|
|
1581
|
+
/* @__PURE__ */ e.jsxs(
|
|
1582
|
+
"select",
|
|
1583
|
+
{
|
|
1584
|
+
value: p.startDateField ?? "",
|
|
1585
|
+
onChange: (t) => !l && V((n) => ({ ...n, startDateField: t.target.value })),
|
|
1586
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1587
|
+
disabled: l,
|
|
1588
|
+
"data-testid": "calendar-start-date",
|
|
1589
|
+
children: [
|
|
1590
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1591
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1592
|
+
]
|
|
1593
|
+
}
|
|
1594
|
+
)
|
|
1595
|
+
] }),
|
|
1596
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1597
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Title Field" }),
|
|
1598
|
+
/* @__PURE__ */ e.jsxs(
|
|
1599
|
+
"select",
|
|
1600
|
+
{
|
|
1601
|
+
value: p.titleField ?? "",
|
|
1602
|
+
onChange: (t) => !l && V((n) => ({ ...n, titleField: t.target.value })),
|
|
1603
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1604
|
+
disabled: l,
|
|
1605
|
+
"data-testid": "calendar-title-field",
|
|
1606
|
+
children: [
|
|
1607
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1608
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1609
|
+
]
|
|
1610
|
+
}
|
|
1611
|
+
)
|
|
1612
|
+
] })
|
|
1613
|
+
] }),
|
|
1614
|
+
k === "map" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1615
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1616
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Latitude Field" }),
|
|
1617
|
+
/* @__PURE__ */ e.jsxs(
|
|
1618
|
+
"select",
|
|
1619
|
+
{
|
|
1620
|
+
value: p.latitudeField ?? "",
|
|
1621
|
+
onChange: (t) => !l && V((n) => ({ ...n, latitudeField: t.target.value })),
|
|
1622
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1623
|
+
disabled: l,
|
|
1624
|
+
children: [
|
|
1625
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1626
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1627
|
+
]
|
|
1628
|
+
}
|
|
1629
|
+
)
|
|
1630
|
+
] }),
|
|
1631
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1632
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Longitude Field" }),
|
|
1633
|
+
/* @__PURE__ */ e.jsxs(
|
|
1634
|
+
"select",
|
|
1635
|
+
{
|
|
1636
|
+
value: p.longitudeField ?? "",
|
|
1637
|
+
onChange: (t) => !l && V((n) => ({ ...n, longitudeField: t.target.value })),
|
|
1638
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1639
|
+
disabled: l,
|
|
1640
|
+
children: [
|
|
1641
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1642
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1643
|
+
]
|
|
1644
|
+
}
|
|
1645
|
+
)
|
|
1646
|
+
] })
|
|
1647
|
+
] }),
|
|
1648
|
+
k === "gallery" && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1649
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Image Field" }),
|
|
1650
|
+
/* @__PURE__ */ e.jsxs(
|
|
1651
|
+
"select",
|
|
1652
|
+
{
|
|
1653
|
+
value: p.imageField ?? "",
|
|
1654
|
+
onChange: (t) => !l && V((n) => ({ ...n, imageField: t.target.value })),
|
|
1655
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1656
|
+
disabled: l,
|
|
1657
|
+
children: [
|
|
1658
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1659
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1660
|
+
]
|
|
1661
|
+
}
|
|
1662
|
+
)
|
|
1663
|
+
] }),
|
|
1664
|
+
(k === "timeline" || k === "gantt") && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1665
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1666
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Date Field" }),
|
|
1667
|
+
/* @__PURE__ */ e.jsxs(
|
|
1668
|
+
"select",
|
|
1669
|
+
{
|
|
1670
|
+
value: p.dateField ?? p.startDateField ?? "",
|
|
1671
|
+
onChange: (t) => !l && V((n) => ({ ...n, dateField: t.target.value, startDateField: t.target.value })),
|
|
1672
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1673
|
+
disabled: l,
|
|
1674
|
+
children: [
|
|
1675
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1676
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1677
|
+
]
|
|
1678
|
+
}
|
|
1679
|
+
)
|
|
1680
|
+
] }),
|
|
1681
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1682
|
+
/* @__PURE__ */ e.jsx("label", { className: "text-xs text-muted-foreground", children: "Title Field" }),
|
|
1683
|
+
/* @__PURE__ */ e.jsxs(
|
|
1684
|
+
"select",
|
|
1685
|
+
{
|
|
1686
|
+
value: p.titleField ?? "",
|
|
1687
|
+
onChange: (t) => !l && V((n) => ({ ...n, titleField: t.target.value })),
|
|
1688
|
+
className: "w-full px-2 py-1 text-sm border rounded bg-background mt-1",
|
|
1689
|
+
disabled: l,
|
|
1690
|
+
children: [
|
|
1691
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select field..." }),
|
|
1692
|
+
c.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.name, children: t.label || t.name }, t.name))
|
|
1693
|
+
]
|
|
1694
|
+
}
|
|
1695
|
+
)
|
|
1696
|
+
] })
|
|
1697
|
+
] }),
|
|
1698
|
+
k === "grid" && /* @__PURE__ */ e.jsx("div", { className: "text-xs text-muted-foreground text-center py-2", children: "Grid view uses the columns configured above." })
|
|
1699
|
+
] })
|
|
1700
|
+
] })
|
|
1701
|
+
] })
|
|
1702
|
+
] })
|
|
1703
|
+
] });
|
|
1098
1704
|
}
|
|
1099
|
-
|
|
1705
|
+
Z.register(
|
|
1100
1706
|
"page-designer",
|
|
1101
|
-
|
|
1707
|
+
Ze,
|
|
1102
1708
|
{
|
|
1103
1709
|
label: "Page Designer",
|
|
1104
1710
|
category: "Designer",
|
|
@@ -1111,9 +1717,9 @@ G.register(
|
|
|
1111
1717
|
]
|
|
1112
1718
|
}
|
|
1113
1719
|
);
|
|
1114
|
-
|
|
1720
|
+
Z.register(
|
|
1115
1721
|
"data-model-designer",
|
|
1116
|
-
|
|
1722
|
+
Qe,
|
|
1117
1723
|
{
|
|
1118
1724
|
label: "Data Model Designer",
|
|
1119
1725
|
category: "Designer",
|
|
@@ -1125,9 +1731,9 @@ G.register(
|
|
|
1125
1731
|
]
|
|
1126
1732
|
}
|
|
1127
1733
|
);
|
|
1128
|
-
|
|
1734
|
+
Z.register(
|
|
1129
1735
|
"process-designer",
|
|
1130
|
-
|
|
1736
|
+
Oe,
|
|
1131
1737
|
{
|
|
1132
1738
|
label: "Process Designer (BPMN)",
|
|
1133
1739
|
category: "Designer",
|
|
@@ -1141,9 +1747,9 @@ G.register(
|
|
|
1141
1747
|
]
|
|
1142
1748
|
}
|
|
1143
1749
|
);
|
|
1144
|
-
|
|
1750
|
+
Z.register(
|
|
1145
1751
|
"report-designer",
|
|
1146
|
-
|
|
1752
|
+
tt,
|
|
1147
1753
|
{
|
|
1148
1754
|
label: "Report Designer",
|
|
1149
1755
|
category: "Designer",
|
|
@@ -1157,10 +1763,26 @@ G.register(
|
|
|
1157
1763
|
]
|
|
1158
1764
|
}
|
|
1159
1765
|
);
|
|
1766
|
+
Z.register(
|
|
1767
|
+
"view-designer",
|
|
1768
|
+
at,
|
|
1769
|
+
{
|
|
1770
|
+
label: "View Designer",
|
|
1771
|
+
category: "Designer",
|
|
1772
|
+
inputs: [
|
|
1773
|
+
{ name: "objectName", type: "string", label: "Object Name" },
|
|
1774
|
+
{ name: "viewId", type: "string", label: "View ID" },
|
|
1775
|
+
{ name: "viewLabel", type: "string", label: "View Label" },
|
|
1776
|
+
{ name: "viewType", type: "string", label: "View Type", defaultValue: "grid" },
|
|
1777
|
+
{ name: "readOnly", type: "boolean", label: "Read Only", defaultValue: !1 }
|
|
1778
|
+
]
|
|
1779
|
+
}
|
|
1780
|
+
);
|
|
1160
1781
|
export {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1782
|
+
ct as CollaborationProvider,
|
|
1783
|
+
Qe as DataModelDesigner,
|
|
1784
|
+
Ze as PageDesigner,
|
|
1785
|
+
Oe as ProcessDesigner,
|
|
1786
|
+
tt as ReportDesigner,
|
|
1787
|
+
at as ViewDesigner
|
|
1166
1788
|
};
|