@bpmn-io/properties-panel 3.10.0 → 3.10.1
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/assets/properties-panel.css +4 -0
- package/dist/index.esm.js +4259 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.mjs +810 -390
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -5
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { options, Component, createElement, Fragment, toChildArray, render, createContext } from 'preact';
|
|
2
2
|
import { isFunction, isString, isArray, get, assign, set, sortBy, find, isNumber, debounce } from 'min-dash';
|
|
3
|
-
import { createPortal, forwardRef } from '../preact/compat';
|
|
4
|
-
import { jsx, jsxs, Fragment } from '../preact/jsx-runtime';
|
|
5
|
-
import { createContext, createElement } from '../preact';
|
|
6
3
|
import classnames from 'classnames';
|
|
7
4
|
import { query, domify } from 'min-dom';
|
|
8
5
|
import { FeelersEditor } from 'feelers';
|
|
@@ -10,10 +7,433 @@ import FeelEditor from '@bpmn-io/feel-editor';
|
|
|
10
7
|
import { lineNumbers } from '@codemirror/view';
|
|
11
8
|
import * as focusTrap from 'focus-trap';
|
|
12
9
|
|
|
10
|
+
var t,
|
|
11
|
+
r,
|
|
12
|
+
u,
|
|
13
|
+
i,
|
|
14
|
+
o$1 = 0,
|
|
15
|
+
f = [],
|
|
16
|
+
c = [],
|
|
17
|
+
e = options.__b,
|
|
18
|
+
a = options.__r,
|
|
19
|
+
v = options.diffed,
|
|
20
|
+
l = options.__c,
|
|
21
|
+
m = options.unmount;
|
|
22
|
+
function d(t, u) {
|
|
23
|
+
options.__h && options.__h(r, t, o$1 || u), o$1 = 0;
|
|
24
|
+
var i = r.__H || (r.__H = {
|
|
25
|
+
__: [],
|
|
26
|
+
__h: []
|
|
27
|
+
});
|
|
28
|
+
return t >= i.__.length && i.__.push({
|
|
29
|
+
__V: c
|
|
30
|
+
}), i.__[t];
|
|
31
|
+
}
|
|
32
|
+
function h(n) {
|
|
33
|
+
return o$1 = 1, s(B$1, n);
|
|
34
|
+
}
|
|
35
|
+
function s(n, u, i) {
|
|
36
|
+
var o = d(t++, 2);
|
|
37
|
+
if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B$1(void 0, u), function (n) {
|
|
38
|
+
var t = o.__N ? o.__N[0] : o.__[0],
|
|
39
|
+
r = o.t(t, n);
|
|
40
|
+
t !== r && (o.__N = [r, o.__[1]], o.__c.setState({}));
|
|
41
|
+
}], o.__c = r, !r.u)) {
|
|
42
|
+
var f = function (n, t, r) {
|
|
43
|
+
if (!o.__c.__H) return !0;
|
|
44
|
+
var u = o.__c.__H.__.filter(function (n) {
|
|
45
|
+
return n.__c;
|
|
46
|
+
});
|
|
47
|
+
if (u.every(function (n) {
|
|
48
|
+
return !n.__N;
|
|
49
|
+
})) return !c || c.call(this, n, t, r);
|
|
50
|
+
var i = !1;
|
|
51
|
+
return u.forEach(function (n) {
|
|
52
|
+
if (n.__N) {
|
|
53
|
+
var t = n.__[0];
|
|
54
|
+
n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = !0);
|
|
55
|
+
}
|
|
56
|
+
}), !(!i && o.__c.props === n) && (!c || c.call(this, n, t, r));
|
|
57
|
+
};
|
|
58
|
+
r.u = !0;
|
|
59
|
+
var c = r.shouldComponentUpdate,
|
|
60
|
+
e = r.componentWillUpdate;
|
|
61
|
+
r.componentWillUpdate = function (n, t, r) {
|
|
62
|
+
if (this.__e) {
|
|
63
|
+
var u = c;
|
|
64
|
+
c = void 0, f(n, t, r), c = u;
|
|
65
|
+
}
|
|
66
|
+
e && e.call(this, n, t, r);
|
|
67
|
+
}, r.shouldComponentUpdate = f;
|
|
68
|
+
}
|
|
69
|
+
return o.__N || o.__;
|
|
70
|
+
}
|
|
71
|
+
function p(u, i) {
|
|
72
|
+
var o = d(t++, 3);
|
|
73
|
+
!options.__s && z$1(o.__H, i) && (o.__ = u, o.i = i, r.__H.__h.push(o));
|
|
74
|
+
}
|
|
75
|
+
function y(u, i) {
|
|
76
|
+
var o = d(t++, 4);
|
|
77
|
+
!options.__s && z$1(o.__H, i) && (o.__ = u, o.i = i, r.__h.push(o));
|
|
78
|
+
}
|
|
79
|
+
function _$1(n) {
|
|
80
|
+
return o$1 = 5, F$1(function () {
|
|
81
|
+
return {
|
|
82
|
+
current: n
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
}
|
|
86
|
+
function F$1(n, r) {
|
|
87
|
+
var u = d(t++, 7);
|
|
88
|
+
return z$1(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__;
|
|
89
|
+
}
|
|
90
|
+
function T$1(n, t) {
|
|
91
|
+
return o$1 = 8, F$1(function () {
|
|
92
|
+
return n;
|
|
93
|
+
}, t);
|
|
94
|
+
}
|
|
95
|
+
function q$1(n) {
|
|
96
|
+
var u = r.context[n.__c],
|
|
97
|
+
i = d(t++, 9);
|
|
98
|
+
return i.c = n, u ? (null == i.__ && (i.__ = !0, u.sub(r)), u.props.value) : n.__;
|
|
99
|
+
}
|
|
100
|
+
function b() {
|
|
101
|
+
for (var t; t = f.shift();) if (t.__P && t.__H) try {
|
|
102
|
+
t.__H.__h.forEach(k$1), t.__H.__h.forEach(w$1), t.__H.__h = [];
|
|
103
|
+
} catch (r) {
|
|
104
|
+
t.__H.__h = [], options.__e(r, t.__v);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
options.__b = function (n) {
|
|
108
|
+
r = null, e && e(n);
|
|
109
|
+
}, options.__r = function (n) {
|
|
110
|
+
a && a(n), t = 0;
|
|
111
|
+
var i = (r = n.__c).__H;
|
|
112
|
+
i && (u === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) {
|
|
113
|
+
n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i = void 0;
|
|
114
|
+
})) : (i.__h.forEach(k$1), i.__h.forEach(w$1), i.__h = [], t = 0)), u = r;
|
|
115
|
+
}, options.diffed = function (t) {
|
|
116
|
+
v && v(t);
|
|
117
|
+
var o = t.__c;
|
|
118
|
+
o && o.__H && (o.__H.__h.length && (1 !== f.push(o) && i === options.requestAnimationFrame || ((i = options.requestAnimationFrame) || j$1)(b)), o.__H.__.forEach(function (n) {
|
|
119
|
+
n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c;
|
|
120
|
+
})), u = r = null;
|
|
121
|
+
}, options.__c = function (t, r) {
|
|
122
|
+
r.some(function (t) {
|
|
123
|
+
try {
|
|
124
|
+
t.__h.forEach(k$1), t.__h = t.__h.filter(function (n) {
|
|
125
|
+
return !n.__ || w$1(n);
|
|
126
|
+
});
|
|
127
|
+
} catch (u) {
|
|
128
|
+
r.some(function (n) {
|
|
129
|
+
n.__h && (n.__h = []);
|
|
130
|
+
}), r = [], options.__e(u, t.__v);
|
|
131
|
+
}
|
|
132
|
+
}), l && l(t, r);
|
|
133
|
+
}, options.unmount = function (t) {
|
|
134
|
+
m && m(t);
|
|
135
|
+
var r,
|
|
136
|
+
u = t.__c;
|
|
137
|
+
u && u.__H && (u.__H.__.forEach(function (n) {
|
|
138
|
+
try {
|
|
139
|
+
k$1(n);
|
|
140
|
+
} catch (n) {
|
|
141
|
+
r = n;
|
|
142
|
+
}
|
|
143
|
+
}), u.__H = void 0, r && options.__e(r, u.__v));
|
|
144
|
+
};
|
|
145
|
+
var g$1 = "function" == typeof requestAnimationFrame;
|
|
146
|
+
function j$1(n) {
|
|
147
|
+
var t,
|
|
148
|
+
r = function () {
|
|
149
|
+
clearTimeout(u), g$1 && cancelAnimationFrame(t), setTimeout(n);
|
|
150
|
+
},
|
|
151
|
+
u = setTimeout(r, 100);
|
|
152
|
+
g$1 && (t = requestAnimationFrame(r));
|
|
153
|
+
}
|
|
154
|
+
function k$1(n) {
|
|
155
|
+
var t = r,
|
|
156
|
+
u = n.__c;
|
|
157
|
+
"function" == typeof u && (n.__c = void 0, u()), r = t;
|
|
158
|
+
}
|
|
159
|
+
function w$1(n) {
|
|
160
|
+
var t = r;
|
|
161
|
+
n.__c = n.__(), r = t;
|
|
162
|
+
}
|
|
163
|
+
function z$1(n, t) {
|
|
164
|
+
return !n || n.length !== t.length || t.some(function (t, r) {
|
|
165
|
+
return t !== n[r];
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function B$1(n, t) {
|
|
169
|
+
return "function" == typeof t ? t(n) : t;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function g(n, t) {
|
|
173
|
+
for (var e in t) n[e] = t[e];
|
|
174
|
+
return n;
|
|
175
|
+
}
|
|
176
|
+
function C(n, t) {
|
|
177
|
+
for (var e in n) if ("__source" !== e && !(e in t)) return !0;
|
|
178
|
+
for (var r in t) if ("__source" !== r && n[r] !== t[r]) return !0;
|
|
179
|
+
return !1;
|
|
180
|
+
}
|
|
181
|
+
function w(n) {
|
|
182
|
+
this.props = n;
|
|
183
|
+
}
|
|
184
|
+
(w.prototype = new Component()).isPureReactComponent = !0, w.prototype.shouldComponentUpdate = function (n, t) {
|
|
185
|
+
return C(this.props, n) || C(this.state, t);
|
|
186
|
+
};
|
|
187
|
+
var R = options.__b;
|
|
188
|
+
options.__b = function (n) {
|
|
189
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), R && R(n);
|
|
190
|
+
};
|
|
191
|
+
var N = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
192
|
+
function k(n) {
|
|
193
|
+
function t(t) {
|
|
194
|
+
var e = g({}, t);
|
|
195
|
+
return delete e.ref, n(e, t.ref || null);
|
|
196
|
+
}
|
|
197
|
+
return t.$$typeof = N, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
|
|
198
|
+
}
|
|
199
|
+
var T = options.__e;
|
|
200
|
+
options.__e = function (n, t, e, r) {
|
|
201
|
+
if (n.then) for (var u, o = t; o = o.__;) if ((u = o.__c) && u.__c) return null == t.__e && (t.__e = e.__e, t.__k = e.__k), u.__c(n, t);
|
|
202
|
+
T(n, t, e, r);
|
|
203
|
+
};
|
|
204
|
+
var F = options.unmount;
|
|
205
|
+
function I(n, t, e) {
|
|
206
|
+
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function (n) {
|
|
207
|
+
"function" == typeof n.__c && n.__c();
|
|
208
|
+
}), n.__c.__H = null), null != (n = g({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c = null), n.__k = n.__k && n.__k.map(function (n) {
|
|
209
|
+
return I(n, t, e);
|
|
210
|
+
})), n;
|
|
211
|
+
}
|
|
212
|
+
function L(n, t, e) {
|
|
213
|
+
return n && e && (n.__v = null, n.__k = n.__k && n.__k.map(function (n) {
|
|
214
|
+
return L(n, t, e);
|
|
215
|
+
}), n.__c && n.__c.__P === t && (n.__e && e.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = e)), n;
|
|
216
|
+
}
|
|
217
|
+
function U() {
|
|
218
|
+
this.__u = 0, this.t = null, this.__b = null;
|
|
219
|
+
}
|
|
220
|
+
function D(n) {
|
|
221
|
+
var t = n.__.__c;
|
|
222
|
+
return t && t.__a && t.__a(n);
|
|
223
|
+
}
|
|
224
|
+
function V() {
|
|
225
|
+
this.u = null, this.o = null;
|
|
226
|
+
}
|
|
227
|
+
options.unmount = function (n) {
|
|
228
|
+
var t = n.__c;
|
|
229
|
+
t && t.__R && t.__R(), t && !0 === n.__h && (n.type = null), F && F(n);
|
|
230
|
+
}, (U.prototype = new Component()).__c = function (n, t) {
|
|
231
|
+
var e = t.__c,
|
|
232
|
+
r = this;
|
|
233
|
+
null == r.t && (r.t = []), r.t.push(e);
|
|
234
|
+
var u = D(r.__v),
|
|
235
|
+
o = !1,
|
|
236
|
+
i = function () {
|
|
237
|
+
o || (o = !0, e.__R = null, u ? u(l) : l());
|
|
238
|
+
};
|
|
239
|
+
e.__R = i;
|
|
240
|
+
var l = function () {
|
|
241
|
+
if (! --r.__u) {
|
|
242
|
+
if (r.state.__a) {
|
|
243
|
+
var n = r.state.__a;
|
|
244
|
+
r.__v.__k[0] = L(n, n.__c.__P, n.__c.__O);
|
|
245
|
+
}
|
|
246
|
+
var t;
|
|
247
|
+
for (r.setState({
|
|
248
|
+
__a: r.__b = null
|
|
249
|
+
}); t = r.t.pop();) t.forceUpdate();
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
c = !0 === t.__h;
|
|
253
|
+
r.__u++ || c || r.setState({
|
|
254
|
+
__a: r.__b = r.__v.__k[0]
|
|
255
|
+
}), n.then(i, i);
|
|
256
|
+
}, U.prototype.componentWillUnmount = function () {
|
|
257
|
+
this.t = [];
|
|
258
|
+
}, U.prototype.render = function (n, e) {
|
|
259
|
+
if (this.__b) {
|
|
260
|
+
if (this.__v.__k) {
|
|
261
|
+
var r = document.createElement("div"),
|
|
262
|
+
o = this.__v.__k[0].__c;
|
|
263
|
+
this.__v.__k[0] = I(this.__b, r, o.__O = o.__P);
|
|
264
|
+
}
|
|
265
|
+
this.__b = null;
|
|
266
|
+
}
|
|
267
|
+
var i = e.__a && createElement(Fragment, null, n.fallback);
|
|
268
|
+
return i && (i.__h = null), [createElement(Fragment, null, e.__a ? null : n.children), i];
|
|
269
|
+
};
|
|
270
|
+
var W = function (n, t, e) {
|
|
271
|
+
if (++e[1] === e[0] && n.o.delete(t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) for (e = n.u; e;) {
|
|
272
|
+
for (; e.length > 3;) e.pop()();
|
|
273
|
+
if (e[1] < e[0]) break;
|
|
274
|
+
n.u = e = e[2];
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
function P(n) {
|
|
278
|
+
return this.getChildContext = function () {
|
|
279
|
+
return n.context;
|
|
280
|
+
}, n.children;
|
|
281
|
+
}
|
|
282
|
+
function j(n) {
|
|
283
|
+
var e = this,
|
|
284
|
+
r = n.i;
|
|
285
|
+
e.componentWillUnmount = function () {
|
|
286
|
+
render(null, e.l), e.l = null, e.i = null;
|
|
287
|
+
}, e.i && e.i !== r && e.componentWillUnmount(), e.l || (e.i = r, e.l = {
|
|
288
|
+
nodeType: 1,
|
|
289
|
+
parentNode: r,
|
|
290
|
+
childNodes: [],
|
|
291
|
+
appendChild: function (n) {
|
|
292
|
+
this.childNodes.push(n), e.i.appendChild(n);
|
|
293
|
+
},
|
|
294
|
+
insertBefore: function (n, t) {
|
|
295
|
+
this.childNodes.push(n), e.i.appendChild(n);
|
|
296
|
+
},
|
|
297
|
+
removeChild: function (n) {
|
|
298
|
+
this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.i.removeChild(n);
|
|
299
|
+
}
|
|
300
|
+
}), render(createElement(P, {
|
|
301
|
+
context: e.context
|
|
302
|
+
}, n.__v), e.l);
|
|
303
|
+
}
|
|
304
|
+
function z(n, e) {
|
|
305
|
+
var r = createElement(j, {
|
|
306
|
+
__v: n,
|
|
307
|
+
i: e
|
|
308
|
+
});
|
|
309
|
+
return r.containerInfo = e, r;
|
|
310
|
+
}
|
|
311
|
+
(V.prototype = new Component()).__a = function (n) {
|
|
312
|
+
var t = this,
|
|
313
|
+
e = D(t.__v),
|
|
314
|
+
r = t.o.get(n);
|
|
315
|
+
return r[0]++, function (u) {
|
|
316
|
+
var o = function () {
|
|
317
|
+
t.props.revealOrder ? (r.push(u), W(t, n, r)) : u();
|
|
318
|
+
};
|
|
319
|
+
e ? e(o) : o();
|
|
320
|
+
};
|
|
321
|
+
}, V.prototype.render = function (n) {
|
|
322
|
+
this.u = null, this.o = new Map();
|
|
323
|
+
var t = toChildArray(n.children);
|
|
324
|
+
n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
|
|
325
|
+
for (var e = t.length; e--;) this.o.set(t[e], this.u = [1, 0, this.u]);
|
|
326
|
+
return n.children;
|
|
327
|
+
}, V.prototype.componentDidUpdate = V.prototype.componentDidMount = function () {
|
|
328
|
+
var n = this;
|
|
329
|
+
this.o.forEach(function (t, e) {
|
|
330
|
+
W(n, e, t);
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
var B = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103,
|
|
334
|
+
H = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
|
|
335
|
+
Z = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
|
|
336
|
+
Y = /[A-Z0-9]/g,
|
|
337
|
+
$ = "undefined" != typeof document,
|
|
338
|
+
q = function (n) {
|
|
339
|
+
return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
340
|
+
};
|
|
341
|
+
Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function (t) {
|
|
342
|
+
Object.defineProperty(Component.prototype, t, {
|
|
343
|
+
configurable: !0,
|
|
344
|
+
get: function () {
|
|
345
|
+
return this["UNSAFE_" + t];
|
|
346
|
+
},
|
|
347
|
+
set: function (n) {
|
|
348
|
+
Object.defineProperty(this, t, {
|
|
349
|
+
configurable: !0,
|
|
350
|
+
writable: !0,
|
|
351
|
+
value: n
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
var K = options.event;
|
|
357
|
+
function Q() {}
|
|
358
|
+
function X() {
|
|
359
|
+
return this.cancelBubble;
|
|
360
|
+
}
|
|
361
|
+
function nn() {
|
|
362
|
+
return this.defaultPrevented;
|
|
363
|
+
}
|
|
364
|
+
options.event = function (n) {
|
|
365
|
+
return K && (n = K(n)), n.persist = Q, n.isPropagationStopped = X, n.isDefaultPrevented = nn, n.nativeEvent = n;
|
|
366
|
+
};
|
|
367
|
+
var en = {
|
|
368
|
+
enumerable: !1,
|
|
369
|
+
configurable: !0,
|
|
370
|
+
get: function () {
|
|
371
|
+
return this.class;
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
rn = options.vnode;
|
|
375
|
+
options.vnode = function (n) {
|
|
376
|
+
"string" == typeof n.type && function (n) {
|
|
377
|
+
var t = n.props,
|
|
378
|
+
e = n.type,
|
|
379
|
+
u = {};
|
|
380
|
+
for (var o in t) {
|
|
381
|
+
var i = t[o];
|
|
382
|
+
if (!("value" === o && "defaultValue" in t && null == i || $ && "children" === o && "noscript" === e || "class" === o || "className" === o)) {
|
|
383
|
+
var l = o.toLowerCase();
|
|
384
|
+
"defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && !0 === i ? i = "" : "ondoubleclick" === l ? o = "ondblclick" : "onchange" !== l || "input" !== e && "textarea" !== e || q(t.type) ? "onfocus" === l ? o = "onfocusin" : "onblur" === l ? o = "onfocusout" : Z.test(o) ? o = l : -1 === e.indexOf("-") && H.test(o) ? o = o.replace(Y, "-$&").toLowerCase() : null === i && (i = void 0) : l = o = "oninput", "oninput" === l && u[o = l] && (o = "oninputCapture"), u[o] = i;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
"select" == e && u.multiple && Array.isArray(u.value) && (u.value = toChildArray(t.children).forEach(function (n) {
|
|
388
|
+
n.props.selected = -1 != u.value.indexOf(n.props.value);
|
|
389
|
+
})), "select" == e && null != u.defaultValue && (u.value = toChildArray(t.children).forEach(function (n) {
|
|
390
|
+
n.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n.props.value) : u.defaultValue == n.props.value;
|
|
391
|
+
})), t.class && !t.className ? (u.class = t.class, Object.defineProperty(u, "className", en)) : (t.className && !t.class || t.class && t.className) && (u.class = u.className = t.className), n.props = u;
|
|
392
|
+
}(n), n.$$typeof = B, rn && rn(n);
|
|
393
|
+
};
|
|
394
|
+
var un = options.__r;
|
|
395
|
+
options.__r = function (n) {
|
|
396
|
+
un && un(n);
|
|
397
|
+
};
|
|
398
|
+
var on = options.diffed;
|
|
399
|
+
options.diffed = function (n) {
|
|
400
|
+
on && on(n);
|
|
401
|
+
var t = n.props,
|
|
402
|
+
e = n.__e;
|
|
403
|
+
null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value);
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
var _ = 0;
|
|
407
|
+
function o(o, e, n, t, f, l) {
|
|
408
|
+
var s,
|
|
409
|
+
u,
|
|
410
|
+
a = {};
|
|
411
|
+
for (u in e) "ref" == u ? s = e[u] : a[u] = e[u];
|
|
412
|
+
var i = {
|
|
413
|
+
type: o,
|
|
414
|
+
props: a,
|
|
415
|
+
key: n,
|
|
416
|
+
ref: s,
|
|
417
|
+
__k: null,
|
|
418
|
+
__: null,
|
|
419
|
+
__b: 0,
|
|
420
|
+
__e: null,
|
|
421
|
+
__d: void 0,
|
|
422
|
+
__c: null,
|
|
423
|
+
__h: null,
|
|
424
|
+
constructor: void 0,
|
|
425
|
+
__v: --_,
|
|
426
|
+
__source: f,
|
|
427
|
+
__self: l
|
|
428
|
+
};
|
|
429
|
+
if ("function" == typeof o && (s = o.defaultProps)) for (u in s) void 0 === a[u] && (a[u] = s[u]);
|
|
430
|
+
return options.vnode && options.vnode(i), i;
|
|
431
|
+
}
|
|
432
|
+
|
|
13
433
|
var ArrowIcon = function ArrowIcon(props) {
|
|
14
|
-
return
|
|
434
|
+
return o("svg", {
|
|
15
435
|
...props,
|
|
16
|
-
children:
|
|
436
|
+
children: o("path", {
|
|
17
437
|
fillRule: "evenodd",
|
|
18
438
|
d: "m11.657 8-4.95 4.95a1 1 0 0 1-1.414-1.414L8.828 8 5.293 4.464A1 1 0 1 1 6.707 3.05L11.657 8Z"
|
|
19
439
|
})
|
|
@@ -25,9 +445,9 @@ ArrowIcon.defaultProps = {
|
|
|
25
445
|
height: "16"
|
|
26
446
|
};
|
|
27
447
|
var CreateIcon = function CreateIcon(props) {
|
|
28
|
-
return
|
|
448
|
+
return o("svg", {
|
|
29
449
|
...props,
|
|
30
|
-
children:
|
|
450
|
+
children: o("path", {
|
|
31
451
|
fillRule: "evenodd",
|
|
32
452
|
d: "M9 13V9h4a1 1 0 0 0 0-2H9V3a1 1 0 1 0-2 0v4H3a1 1 0 1 0 0 2h4v4a1 1 0 0 0 2 0Z"
|
|
33
453
|
})
|
|
@@ -39,9 +459,9 @@ CreateIcon.defaultProps = {
|
|
|
39
459
|
height: "16"
|
|
40
460
|
};
|
|
41
461
|
var DeleteIcon = function DeleteIcon(props) {
|
|
42
|
-
return
|
|
462
|
+
return o("svg", {
|
|
43
463
|
...props,
|
|
44
|
-
children:
|
|
464
|
+
children: o("path", {
|
|
45
465
|
fillRule: "evenodd",
|
|
46
466
|
d: "M12 6v7c0 1.1-.4 1.55-1.5 1.55h-5C4.4 14.55 4 14.1 4 13V6h8Zm-1.5 1.5h-5v4.3c0 .66.5 1.2 1.111 1.2H9.39c.611 0 1.111-.54 1.111-1.2V7.5ZM13 3h-2l-1-1H6L5 3H3v1.5h10V3Z"
|
|
47
467
|
})
|
|
@@ -53,21 +473,21 @@ DeleteIcon.defaultProps = {
|
|
|
53
473
|
height: "16"
|
|
54
474
|
};
|
|
55
475
|
var DragIcon = function DragIcon(props) {
|
|
56
|
-
return
|
|
476
|
+
return o("svg", {
|
|
57
477
|
...props,
|
|
58
|
-
children: [
|
|
478
|
+
children: [o("path", {
|
|
59
479
|
fill: "#fff",
|
|
60
480
|
style: {
|
|
61
481
|
mixBlendMode: "multiply"
|
|
62
482
|
},
|
|
63
483
|
d: "M0 0h16v16H0z"
|
|
64
|
-
}),
|
|
484
|
+
}), o("path", {
|
|
65
485
|
fill: "#fff",
|
|
66
486
|
style: {
|
|
67
487
|
mixBlendMode: "multiply"
|
|
68
488
|
},
|
|
69
489
|
d: "M0 0h16v16H0z"
|
|
70
|
-
}),
|
|
490
|
+
}), o("path", {
|
|
71
491
|
d: "M7 3H5v2h2V3zm4 0H9v2h2V3zM7 7H5v2h2V7zm4 0H9v2h2V7zm-4 4H5v2h2v-2zm4 0H9v2h2v-2z",
|
|
72
492
|
fill: "#161616"
|
|
73
493
|
})]
|
|
@@ -80,9 +500,9 @@ DragIcon.defaultProps = {
|
|
|
80
500
|
xmlns: "http://www.w3.org/2000/svg"
|
|
81
501
|
};
|
|
82
502
|
var ExternalLinkIcon = function ExternalLinkIcon(props) {
|
|
83
|
-
return
|
|
503
|
+
return o("svg", {
|
|
84
504
|
...props,
|
|
85
|
-
children:
|
|
505
|
+
children: o("path", {
|
|
86
506
|
fillRule: "evenodd",
|
|
87
507
|
clipRule: "evenodd",
|
|
88
508
|
d: "M12.637 12.637v-4.72h1.362v4.721c0 .36-.137.676-.411.95-.275.275-.591.412-.95.412H3.362c-.38 0-.703-.132-.967-.396A1.315 1.315 0 0 1 2 12.638V3.362c0-.38.132-.703.396-.967S2.982 2 3.363 2h4.553v1.363H3.363v9.274h9.274ZM14 2H9.28l-.001 1.362h2.408L5.065 9.984l.95.95 6.622-6.622v2.409H14V2Z",
|
|
@@ -97,9 +517,9 @@ ExternalLinkIcon.defaultProps = {
|
|
|
97
517
|
xmlns: "http://www.w3.org/2000/svg"
|
|
98
518
|
};
|
|
99
519
|
var FeelIcon$1 = function FeelIcon(props) {
|
|
100
|
-
return
|
|
520
|
+
return o("svg", {
|
|
101
521
|
...props,
|
|
102
|
-
children:
|
|
522
|
+
children: o("path", {
|
|
103
523
|
d: "M3.617 11.99c-.137.684-.392 1.19-.765 1.518-.362.328-.882.492-1.558.492H0l.309-1.579h1.264l1.515-7.64h-.912l.309-1.579h.911l.236-1.191c.137-.685.387-1.192.75-1.52C4.753.164 5.277 0 5.953 0h1.294L6.94 1.579H5.675l-.323 1.623h1.264l-.309 1.579H5.043l-1.426 7.208ZM5.605 11.021l3.029-4.155L7.28 3.202h2.073l.706 2.547h.176l1.691-2.547H14l-3.014 4.051 1.338 3.768H10.25l-.706-2.606H9.37L7.678 11.02H5.605Z",
|
|
104
524
|
fill: "currentcolor"
|
|
105
525
|
})
|
|
@@ -127,35 +547,35 @@ function Header(props) {
|
|
|
127
547
|
const type = getTypeLabel(element);
|
|
128
548
|
const documentationRef = getDocumentationRef && getDocumentationRef(element);
|
|
129
549
|
const ElementIcon = getElementIcon(element);
|
|
130
|
-
return
|
|
550
|
+
return o("div", {
|
|
131
551
|
class: "bio-properties-panel-header",
|
|
132
|
-
children: [
|
|
552
|
+
children: [o("div", {
|
|
133
553
|
class: "bio-properties-panel-header-icon",
|
|
134
|
-
children: ElementIcon &&
|
|
554
|
+
children: ElementIcon && o(ElementIcon, {
|
|
135
555
|
width: "32",
|
|
136
556
|
height: "32",
|
|
137
557
|
viewBox: "0 0 32 32"
|
|
138
558
|
})
|
|
139
|
-
}),
|
|
559
|
+
}), o("div", {
|
|
140
560
|
class: "bio-properties-panel-header-labels",
|
|
141
|
-
children: [
|
|
561
|
+
children: [o("div", {
|
|
142
562
|
title: type,
|
|
143
563
|
class: "bio-properties-panel-header-type",
|
|
144
564
|
children: type
|
|
145
|
-
}), label ?
|
|
565
|
+
}), label ? o("div", {
|
|
146
566
|
title: label,
|
|
147
567
|
class: "bio-properties-panel-header-label",
|
|
148
568
|
children: label
|
|
149
569
|
}) : null]
|
|
150
|
-
}),
|
|
570
|
+
}), o("div", {
|
|
151
571
|
class: "bio-properties-panel-header-actions",
|
|
152
|
-
children: documentationRef ?
|
|
572
|
+
children: documentationRef ? o("a", {
|
|
153
573
|
rel: "noopener",
|
|
154
574
|
class: "bio-properties-panel-header-link",
|
|
155
575
|
href: documentationRef,
|
|
156
576
|
title: "Open documentation",
|
|
157
577
|
target: "_blank",
|
|
158
|
-
children:
|
|
578
|
+
children: o(ExternalLinkIcon, {})
|
|
159
579
|
}) : null
|
|
160
580
|
})]
|
|
161
581
|
});
|
|
@@ -218,7 +638,7 @@ const TooltipContext = createContext({
|
|
|
218
638
|
function useTooltipContext(id, element) {
|
|
219
639
|
const {
|
|
220
640
|
getTooltipForId
|
|
221
|
-
} =
|
|
641
|
+
} = q$1(TooltipContext);
|
|
222
642
|
return getTooltipForId(id, element);
|
|
223
643
|
}
|
|
224
644
|
|
|
@@ -232,7 +652,7 @@ function TooltipWrapper(props) {
|
|
|
232
652
|
if (!value) {
|
|
233
653
|
return props.children;
|
|
234
654
|
}
|
|
235
|
-
return
|
|
655
|
+
return o(Tooltip, {
|
|
236
656
|
...props,
|
|
237
657
|
value: value,
|
|
238
658
|
forId: prefixId$9(forId)
|
|
@@ -244,11 +664,11 @@ function Tooltip(props) {
|
|
|
244
664
|
value,
|
|
245
665
|
parent
|
|
246
666
|
} = props;
|
|
247
|
-
const [visible, setShow] =
|
|
248
|
-
const [focusedViaKeyboard, setFocusedViaKeyboard] =
|
|
667
|
+
const [visible, setShow] = h(false);
|
|
668
|
+
const [focusedViaKeyboard, setFocusedViaKeyboard] = h(false);
|
|
249
669
|
let timeout = null;
|
|
250
|
-
const wrapperRef =
|
|
251
|
-
const tooltipRef =
|
|
670
|
+
const wrapperRef = _$1(null);
|
|
671
|
+
const tooltipRef = _$1(null);
|
|
252
672
|
const showTooltip = async event => {
|
|
253
673
|
const show = () => setShow(true);
|
|
254
674
|
if (!visible && !timeout) {
|
|
@@ -275,7 +695,7 @@ function Tooltip(props) {
|
|
|
275
695
|
const wrapper = wrapperRef.current;
|
|
276
696
|
return tooltip && (inBounds(x, y, wrapper.getBoundingClientRect()) || inBounds(x, y, tooltip.getBoundingClientRect()));
|
|
277
697
|
};
|
|
278
|
-
|
|
698
|
+
p(() => {
|
|
279
699
|
const {
|
|
280
700
|
current
|
|
281
701
|
} = wrapperRef;
|
|
@@ -310,7 +730,7 @@ function Tooltip(props) {
|
|
|
310
730
|
};
|
|
311
731
|
}, [wrapperRef.current, visible, focusedViaKeyboard]);
|
|
312
732
|
const renderTooltip = () => {
|
|
313
|
-
return
|
|
733
|
+
return o("div", {
|
|
314
734
|
class: "bio-properties-panel-tooltip",
|
|
315
735
|
role: "tooltip",
|
|
316
736
|
id: "bio-properties-panel-tooltip",
|
|
@@ -318,15 +738,15 @@ function Tooltip(props) {
|
|
|
318
738
|
style: getTooltipPosition(wrapperRef.current),
|
|
319
739
|
ref: tooltipRef,
|
|
320
740
|
onClick: e => e.stopPropagation(),
|
|
321
|
-
children: [
|
|
741
|
+
children: [o("div", {
|
|
322
742
|
class: "bio-properties-panel-tooltip-content",
|
|
323
743
|
children: value
|
|
324
|
-
}),
|
|
744
|
+
}), o("div", {
|
|
325
745
|
class: "bio-properties-panel-tooltip-arrow"
|
|
326
746
|
})]
|
|
327
747
|
});
|
|
328
748
|
};
|
|
329
|
-
return
|
|
749
|
+
return o("div", {
|
|
330
750
|
class: "bio-properties-panel-tooltip-wrapper",
|
|
331
751
|
tabIndex: "0",
|
|
332
752
|
ref: wrapperRef,
|
|
@@ -337,7 +757,7 @@ function Tooltip(props) {
|
|
|
337
757
|
},
|
|
338
758
|
onFocus: showTooltip,
|
|
339
759
|
onKeyDown: hideTooltipViaEscape,
|
|
340
|
-
children: [props.children, visible ? parent ?
|
|
760
|
+
children: [props.children, visible ? parent ? z(renderTooltip(), parent.current) : renderTooltip() : null]
|
|
341
761
|
});
|
|
342
762
|
}
|
|
343
763
|
|
|
@@ -382,20 +802,20 @@ function prefixId$9(id) {
|
|
|
382
802
|
function useDescriptionContext(id, element) {
|
|
383
803
|
const {
|
|
384
804
|
getDescriptionForId
|
|
385
|
-
} =
|
|
805
|
+
} = q$1(DescriptionContext);
|
|
386
806
|
return getDescriptionForId(id, element);
|
|
387
807
|
}
|
|
388
808
|
|
|
389
809
|
function useError(id) {
|
|
390
810
|
const {
|
|
391
811
|
errors
|
|
392
|
-
} =
|
|
812
|
+
} = q$1(ErrorsContext);
|
|
393
813
|
return errors[id];
|
|
394
814
|
}
|
|
395
815
|
function useErrors() {
|
|
396
816
|
const {
|
|
397
817
|
errors
|
|
398
|
-
} =
|
|
818
|
+
} = q$1(ErrorsContext);
|
|
399
819
|
return errors;
|
|
400
820
|
}
|
|
401
821
|
|
|
@@ -406,13 +826,13 @@ function useErrors() {
|
|
|
406
826
|
* @param {Function} callback
|
|
407
827
|
*/
|
|
408
828
|
function useEvent(event, callback, eventBus) {
|
|
409
|
-
const eventContext =
|
|
829
|
+
const eventContext = q$1(EventContext);
|
|
410
830
|
if (!eventBus) {
|
|
411
831
|
({
|
|
412
832
|
eventBus
|
|
413
833
|
} = eventContext);
|
|
414
834
|
}
|
|
415
|
-
const didMount =
|
|
835
|
+
const didMount = _$1(false);
|
|
416
836
|
|
|
417
837
|
// (1) subscribe immediately
|
|
418
838
|
if (eventBus && !didMount.current) {
|
|
@@ -420,7 +840,7 @@ function useEvent(event, callback, eventBus) {
|
|
|
420
840
|
}
|
|
421
841
|
|
|
422
842
|
// (2) update subscription after inputs changed
|
|
423
|
-
|
|
843
|
+
p(() => {
|
|
424
844
|
if (eventBus && didMount.current) {
|
|
425
845
|
eventBus.on(event, callback);
|
|
426
846
|
}
|
|
@@ -455,7 +875,7 @@ const KEY_LENGTH = 6;
|
|
|
455
875
|
* @returns {(element: object) => string}
|
|
456
876
|
*/
|
|
457
877
|
function useKeyFactory(dependencies = []) {
|
|
458
|
-
const map =
|
|
878
|
+
const map = F$1(() => new Map(), dependencies);
|
|
459
879
|
const getKey = el => {
|
|
460
880
|
let key = map.get(el);
|
|
461
881
|
if (!key) {
|
|
@@ -486,9 +906,9 @@ function useLayoutState(path, defaultValue) {
|
|
|
486
906
|
const {
|
|
487
907
|
getLayoutForKey,
|
|
488
908
|
setLayoutForKey
|
|
489
|
-
} =
|
|
909
|
+
} = q$1(LayoutContext);
|
|
490
910
|
const layoutForKey = getLayoutForKey(path, defaultValue);
|
|
491
|
-
const setState =
|
|
911
|
+
const setState = T$1(newValue => {
|
|
492
912
|
setLayoutForKey(path, newValue);
|
|
493
913
|
}, [setLayoutForKey]);
|
|
494
914
|
return [layoutForKey, setState];
|
|
@@ -502,8 +922,8 @@ function useLayoutState(path, defaultValue) {
|
|
|
502
922
|
*/
|
|
503
923
|
|
|
504
924
|
function usePrevious(value) {
|
|
505
|
-
const ref =
|
|
506
|
-
|
|
925
|
+
const ref = _$1();
|
|
926
|
+
p(() => {
|
|
507
927
|
ref.current = value;
|
|
508
928
|
});
|
|
509
929
|
return ref.current;
|
|
@@ -519,10 +939,10 @@ function usePrevious(value) {
|
|
|
519
939
|
function useShowEntryEvent(id) {
|
|
520
940
|
const {
|
|
521
941
|
onShow
|
|
522
|
-
} =
|
|
523
|
-
const ref =
|
|
524
|
-
const focus =
|
|
525
|
-
const onShowEntry =
|
|
942
|
+
} = q$1(LayoutContext);
|
|
943
|
+
const ref = _$1();
|
|
944
|
+
const focus = _$1(false);
|
|
945
|
+
const onShowEntry = T$1(event => {
|
|
526
946
|
if (event.id === id) {
|
|
527
947
|
onShow();
|
|
528
948
|
if (!focus.current) {
|
|
@@ -530,7 +950,7 @@ function useShowEntryEvent(id) {
|
|
|
530
950
|
}
|
|
531
951
|
}
|
|
532
952
|
}, [id]);
|
|
533
|
-
|
|
953
|
+
p(() => {
|
|
534
954
|
if (focus.current && ref.current) {
|
|
535
955
|
if (isFunction(ref.current.focus)) {
|
|
536
956
|
ref.current.focus();
|
|
@@ -561,19 +981,19 @@ function useShowEntryEvent(id) {
|
|
|
561
981
|
* @param {setSticky} setSticky
|
|
562
982
|
*/
|
|
563
983
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
564
|
-
const [scrollContainer, setScrollContainer] =
|
|
565
|
-
const updateScrollContainer =
|
|
984
|
+
const [scrollContainer, setScrollContainer] = h(query(scrollContainerSelector));
|
|
985
|
+
const updateScrollContainer = T$1(() => {
|
|
566
986
|
const newScrollContainer = query(scrollContainerSelector);
|
|
567
987
|
if (newScrollContainer !== scrollContainer) {
|
|
568
988
|
setScrollContainer(newScrollContainer);
|
|
569
989
|
}
|
|
570
990
|
}, [scrollContainerSelector, scrollContainer]);
|
|
571
|
-
|
|
991
|
+
p(() => {
|
|
572
992
|
updateScrollContainer();
|
|
573
993
|
}, [updateScrollContainer]);
|
|
574
994
|
useEvent('propertiesPanel.attach', updateScrollContainer);
|
|
575
995
|
useEvent('propertiesPanel.detach', updateScrollContainer);
|
|
576
|
-
|
|
996
|
+
p(() => {
|
|
577
997
|
const Observer = IntersectionObserver;
|
|
578
998
|
|
|
579
999
|
// return early if IntersectionObserver is not available
|
|
@@ -627,9 +1047,9 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
|
|
|
627
1047
|
* @returns {Function} static function reference
|
|
628
1048
|
*/
|
|
629
1049
|
function useStaticCallback(callback) {
|
|
630
|
-
const callbackRef =
|
|
1050
|
+
const callbackRef = _$1(callback);
|
|
631
1051
|
callbackRef.current = callback;
|
|
632
|
-
return
|
|
1052
|
+
return T$1((...args) => callbackRef.current(...args), []);
|
|
633
1053
|
}
|
|
634
1054
|
|
|
635
1055
|
function Group(props) {
|
|
@@ -640,15 +1060,15 @@ function Group(props) {
|
|
|
640
1060
|
label,
|
|
641
1061
|
shouldOpen = false
|
|
642
1062
|
} = props;
|
|
643
|
-
const groupRef =
|
|
1063
|
+
const groupRef = _$1(null);
|
|
644
1064
|
const [open, setOpen] = useLayoutState(['groups', id, 'open'], shouldOpen);
|
|
645
|
-
const onShow =
|
|
1065
|
+
const onShow = T$1(() => setOpen(true), [setOpen]);
|
|
646
1066
|
const toggleOpen = () => setOpen(!open);
|
|
647
|
-
const [edited, setEdited] =
|
|
648
|
-
const [sticky, setSticky] =
|
|
1067
|
+
const [edited, setEdited] = h(false);
|
|
1068
|
+
const [sticky, setSticky] = h(false);
|
|
649
1069
|
|
|
650
1070
|
// set edited state depending on all entries
|
|
651
|
-
|
|
1071
|
+
p(() => {
|
|
652
1072
|
// TODO(@barmac): replace with CSS when `:has()` is supported in all major browsers, or rewrite as in https://github.com/camunda/camunda-modeler/issues/3815#issuecomment-1733038161
|
|
653
1073
|
const scheduled = requestAnimationFrame(() => {
|
|
654
1074
|
const hasOneEditedEntry = entries.find(entry => {
|
|
@@ -675,43 +1095,43 @@ function Group(props) {
|
|
|
675
1095
|
// set css class when group is sticky to top
|
|
676
1096
|
useStickyIntersectionObserver(groupRef, 'div.bio-properties-panel-scroll-container', setSticky);
|
|
677
1097
|
const propertiesPanelContext = {
|
|
678
|
-
...
|
|
1098
|
+
...q$1(LayoutContext),
|
|
679
1099
|
onShow
|
|
680
1100
|
};
|
|
681
|
-
return
|
|
1101
|
+
return o("div", {
|
|
682
1102
|
class: "bio-properties-panel-group",
|
|
683
1103
|
"data-group-id": 'group-' + id,
|
|
684
1104
|
ref: groupRef,
|
|
685
|
-
children: [
|
|
1105
|
+
children: [o("div", {
|
|
686
1106
|
class: classnames('bio-properties-panel-group-header', edited ? '' : 'empty', open ? 'open' : '', sticky && open ? 'sticky' : ''),
|
|
687
1107
|
onClick: toggleOpen,
|
|
688
|
-
children: [
|
|
1108
|
+
children: [o("div", {
|
|
689
1109
|
title: props.tooltip ? null : label,
|
|
690
1110
|
"data-title": label,
|
|
691
1111
|
class: "bio-properties-panel-group-header-title",
|
|
692
|
-
children:
|
|
1112
|
+
children: o(TooltipWrapper, {
|
|
693
1113
|
value: props.tooltip,
|
|
694
1114
|
forId: 'group-' + id,
|
|
695
1115
|
element: element,
|
|
696
1116
|
parent: groupRef,
|
|
697
1117
|
children: label
|
|
698
1118
|
})
|
|
699
|
-
}),
|
|
1119
|
+
}), o("div", {
|
|
700
1120
|
class: "bio-properties-panel-group-header-buttons",
|
|
701
|
-
children: [
|
|
1121
|
+
children: [o(DataMarker, {
|
|
702
1122
|
edited: edited,
|
|
703
1123
|
hasErrors: hasErrors
|
|
704
|
-
}),
|
|
1124
|
+
}), o("button", {
|
|
705
1125
|
title: "Toggle section",
|
|
706
1126
|
class: "bio-properties-panel-group-header-button bio-properties-panel-arrow",
|
|
707
|
-
children:
|
|
1127
|
+
children: o(ArrowIcon, {
|
|
708
1128
|
class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
|
|
709
1129
|
})
|
|
710
1130
|
})]
|
|
711
1131
|
})]
|
|
712
|
-
}),
|
|
1132
|
+
}), o("div", {
|
|
713
1133
|
class: classnames('bio-properties-panel-group-entries', open ? 'open' : ''),
|
|
714
|
-
children:
|
|
1134
|
+
children: o(LayoutContext.Provider, {
|
|
715
1135
|
value: propertiesPanelContext,
|
|
716
1136
|
children: entries.map(entry => {
|
|
717
1137
|
const {
|
|
@@ -734,13 +1154,13 @@ function DataMarker(props) {
|
|
|
734
1154
|
hasErrors
|
|
735
1155
|
} = props;
|
|
736
1156
|
if (hasErrors) {
|
|
737
|
-
return
|
|
1157
|
+
return o("div", {
|
|
738
1158
|
title: "Section contains an error",
|
|
739
1159
|
class: "bio-properties-panel-dot bio-properties-panel-dot--error"
|
|
740
1160
|
});
|
|
741
1161
|
}
|
|
742
1162
|
if (edited) {
|
|
743
|
-
return
|
|
1163
|
+
return o("div", {
|
|
744
1164
|
title: "Section contains data",
|
|
745
1165
|
class: "bio-properties-panel-dot"
|
|
746
1166
|
});
|
|
@@ -761,13 +1181,13 @@ function Placeholder(props) {
|
|
|
761
1181
|
text,
|
|
762
1182
|
icon: Icon
|
|
763
1183
|
} = props;
|
|
764
|
-
return
|
|
1184
|
+
return o("div", {
|
|
765
1185
|
class: "bio-properties-panel open",
|
|
766
|
-
children:
|
|
1186
|
+
children: o("section", {
|
|
767
1187
|
class: "bio-properties-panel-placeholder",
|
|
768
|
-
children: [Icon &&
|
|
1188
|
+
children: [Icon && o(Icon, {
|
|
769
1189
|
class: "bio-properties-panel-placeholder-icon"
|
|
770
|
-
}),
|
|
1190
|
+
}), o("p", {
|
|
771
1191
|
class: "bio-properties-panel-placeholder-text",
|
|
772
1192
|
children: text
|
|
773
1193
|
})]
|
|
@@ -784,7 +1204,7 @@ function Description(props) {
|
|
|
784
1204
|
const contextDescription = useDescriptionContext(forId, element);
|
|
785
1205
|
const description = value || contextDescription;
|
|
786
1206
|
if (description) {
|
|
787
|
-
return
|
|
1207
|
+
return o("div", {
|
|
788
1208
|
class: "bio-properties-panel-description",
|
|
789
1209
|
children: description
|
|
790
1210
|
});
|
|
@@ -798,8 +1218,8 @@ const noop$6 = () => {};
|
|
|
798
1218
|
* Set Focus inside when the editor is ready.
|
|
799
1219
|
*/
|
|
800
1220
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
801
|
-
const [buffer, setBuffer] =
|
|
802
|
-
ref.current =
|
|
1221
|
+
const [buffer, setBuffer] = h(undefined);
|
|
1222
|
+
ref.current = F$1(() => ({
|
|
803
1223
|
focus: offset => {
|
|
804
1224
|
if (editor) {
|
|
805
1225
|
editor.focus(offset);
|
|
@@ -811,14 +1231,14 @@ const useBufferedFocus$1 = function (editor, ref) {
|
|
|
811
1231
|
}
|
|
812
1232
|
}
|
|
813
1233
|
}), [editor]);
|
|
814
|
-
|
|
1234
|
+
p(() => {
|
|
815
1235
|
if (typeof buffer !== 'undefined' && editor) {
|
|
816
1236
|
editor.focus(buffer);
|
|
817
1237
|
setBuffer(false);
|
|
818
1238
|
}
|
|
819
1239
|
}, [editor, buffer]);
|
|
820
1240
|
};
|
|
821
|
-
const CodeEditor$1 =
|
|
1241
|
+
const CodeEditor$1 = k((props, ref) => {
|
|
822
1242
|
const {
|
|
823
1243
|
onInput,
|
|
824
1244
|
disabled,
|
|
@@ -832,15 +1252,15 @@ const CodeEditor$1 = forwardRef((props, ref) => {
|
|
|
832
1252
|
hostLanguage = null,
|
|
833
1253
|
singleLine = false
|
|
834
1254
|
} = props;
|
|
835
|
-
const inputRef =
|
|
836
|
-
const [editor, setEditor] =
|
|
837
|
-
const [localValue, setLocalValue] =
|
|
1255
|
+
const inputRef = _$1();
|
|
1256
|
+
const [editor, setEditor] = h();
|
|
1257
|
+
const [localValue, setLocalValue] = h(value || '');
|
|
838
1258
|
useBufferedFocus$1(editor, ref);
|
|
839
1259
|
const handleInput = useStaticCallback(newValue => {
|
|
840
1260
|
onInput(newValue);
|
|
841
1261
|
setLocalValue(newValue);
|
|
842
1262
|
});
|
|
843
|
-
|
|
1263
|
+
p(() => {
|
|
844
1264
|
let editor;
|
|
845
1265
|
editor = new FeelersEditor({
|
|
846
1266
|
container: inputRef.current,
|
|
@@ -860,7 +1280,7 @@ const CodeEditor$1 = forwardRef((props, ref) => {
|
|
|
860
1280
|
setEditor(null);
|
|
861
1281
|
};
|
|
862
1282
|
}, []);
|
|
863
|
-
|
|
1283
|
+
p(() => {
|
|
864
1284
|
if (!editor) {
|
|
865
1285
|
return;
|
|
866
1286
|
}
|
|
@@ -873,21 +1293,21 @@ const CodeEditor$1 = forwardRef((props, ref) => {
|
|
|
873
1293
|
const handleClick = () => {
|
|
874
1294
|
ref.current.focus();
|
|
875
1295
|
};
|
|
876
|
-
return
|
|
1296
|
+
return o("div", {
|
|
877
1297
|
class: classnames('bio-properties-panel-feelers-editor-container', popupOpen ? 'popupOpen' : null),
|
|
878
|
-
children: [
|
|
1298
|
+
children: [o("div", {
|
|
879
1299
|
class: "bio-properties-panel-feelers-editor__open-popup-placeholder",
|
|
880
1300
|
children: "Opened in editor"
|
|
881
|
-
}),
|
|
1301
|
+
}), o("div", {
|
|
882
1302
|
name: props.name,
|
|
883
1303
|
class: classnames('bio-properties-panel-feelers-editor bio-properties-panel-input', localValue ? 'edited' : null, disabled ? 'disabled' : null),
|
|
884
1304
|
ref: inputRef,
|
|
885
1305
|
onClick: handleClick
|
|
886
|
-
}),
|
|
1306
|
+
}), o("button", {
|
|
887
1307
|
title: "Open pop-up editor",
|
|
888
1308
|
class: "bio-properties-panel-open-feel-popup",
|
|
889
1309
|
onClick: () => onPopupOpen('feelers'),
|
|
890
|
-
children:
|
|
1310
|
+
children: o(ExternalLinkIcon, {})
|
|
891
1311
|
})]
|
|
892
1312
|
});
|
|
893
1313
|
});
|
|
@@ -899,8 +1319,8 @@ const noop$5 = () => {};
|
|
|
899
1319
|
* Set Focus inside when the editor is ready.
|
|
900
1320
|
*/
|
|
901
1321
|
const useBufferedFocus = function (editor, ref) {
|
|
902
|
-
const [buffer, setBuffer] =
|
|
903
|
-
ref.current =
|
|
1322
|
+
const [buffer, setBuffer] = h(undefined);
|
|
1323
|
+
ref.current = F$1(() => ({
|
|
904
1324
|
focus: offset => {
|
|
905
1325
|
if (editor) {
|
|
906
1326
|
editor.focus(offset);
|
|
@@ -912,14 +1332,14 @@ const useBufferedFocus = function (editor, ref) {
|
|
|
912
1332
|
}
|
|
913
1333
|
}
|
|
914
1334
|
}), [editor]);
|
|
915
|
-
|
|
1335
|
+
p(() => {
|
|
916
1336
|
if (typeof buffer !== 'undefined' && editor) {
|
|
917
1337
|
editor.focus(buffer);
|
|
918
1338
|
setBuffer(false);
|
|
919
1339
|
}
|
|
920
1340
|
}, [editor, buffer]);
|
|
921
1341
|
};
|
|
922
|
-
const CodeEditor =
|
|
1342
|
+
const CodeEditor = k((props, ref) => {
|
|
923
1343
|
const {
|
|
924
1344
|
enableGutters,
|
|
925
1345
|
value,
|
|
@@ -932,15 +1352,15 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
932
1352
|
tooltipContainer,
|
|
933
1353
|
variables
|
|
934
1354
|
} = props;
|
|
935
|
-
const inputRef =
|
|
936
|
-
const [editor, setEditor] =
|
|
937
|
-
const [localValue, setLocalValue] =
|
|
1355
|
+
const inputRef = _$1();
|
|
1356
|
+
const [editor, setEditor] = h();
|
|
1357
|
+
const [localValue, setLocalValue] = h(value || '');
|
|
938
1358
|
useBufferedFocus(editor, ref);
|
|
939
1359
|
const handleInput = useStaticCallback(newValue => {
|
|
940
1360
|
onInput(newValue);
|
|
941
1361
|
setLocalValue(newValue);
|
|
942
1362
|
});
|
|
943
|
-
|
|
1363
|
+
p(() => {
|
|
944
1364
|
let editor;
|
|
945
1365
|
|
|
946
1366
|
/* Trigger FEEL toggle when
|
|
@@ -975,7 +1395,7 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
975
1395
|
setEditor(null);
|
|
976
1396
|
};
|
|
977
1397
|
}, []);
|
|
978
|
-
|
|
1398
|
+
p(() => {
|
|
979
1399
|
if (!editor) {
|
|
980
1400
|
return;
|
|
981
1401
|
}
|
|
@@ -985,7 +1405,7 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
985
1405
|
editor.setValue(value);
|
|
986
1406
|
setLocalValue(value);
|
|
987
1407
|
}, [value]);
|
|
988
|
-
|
|
1408
|
+
p(() => {
|
|
989
1409
|
if (!editor) {
|
|
990
1410
|
return;
|
|
991
1411
|
}
|
|
@@ -994,21 +1414,21 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
994
1414
|
const handleClick = () => {
|
|
995
1415
|
ref.current.focus();
|
|
996
1416
|
};
|
|
997
|
-
return
|
|
1417
|
+
return o("div", {
|
|
998
1418
|
class: classnames('bio-properties-panel-feel-editor-container', disabled ? 'disabled' : null, popupOpen ? 'popupOpen' : null),
|
|
999
|
-
children: [
|
|
1419
|
+
children: [o("div", {
|
|
1000
1420
|
class: "bio-properties-panel-feel-editor__open-popup-placeholder",
|
|
1001
1421
|
children: "Opened in editor"
|
|
1002
|
-
}),
|
|
1422
|
+
}), o("div", {
|
|
1003
1423
|
name: props.name,
|
|
1004
1424
|
class: classnames('bio-properties-panel-input', localValue ? 'edited' : null),
|
|
1005
1425
|
ref: inputRef,
|
|
1006
1426
|
onClick: handleClick
|
|
1007
|
-
}),
|
|
1427
|
+
}), o("button", {
|
|
1008
1428
|
title: "Open pop-up editor",
|
|
1009
1429
|
class: "bio-properties-panel-open-feel-popup",
|
|
1010
1430
|
onClick: () => onPopupOpen(),
|
|
1011
|
-
children:
|
|
1431
|
+
children: o(ExternalLinkIcon, {})
|
|
1012
1432
|
})]
|
|
1013
1433
|
});
|
|
1014
1434
|
});
|
|
@@ -1020,7 +1440,7 @@ function FeelIndicator(props) {
|
|
|
1020
1440
|
if (!active) {
|
|
1021
1441
|
return null;
|
|
1022
1442
|
}
|
|
1023
|
-
return
|
|
1443
|
+
return o("span", {
|
|
1024
1444
|
class: "bio-properties-panel-feel-indicator",
|
|
1025
1445
|
children: "="
|
|
1026
1446
|
});
|
|
@@ -1050,12 +1470,12 @@ function FeelIcon(props) {
|
|
|
1050
1470
|
e.stopPropagation();
|
|
1051
1471
|
}
|
|
1052
1472
|
};
|
|
1053
|
-
return
|
|
1473
|
+
return o("button", {
|
|
1054
1474
|
class: classnames('bio-properties-panel-feel-icon', active ? 'active' : null, feel === 'required' ? 'required' : 'optional'),
|
|
1055
1475
|
onClick: handleClick,
|
|
1056
1476
|
disabled: feel === 'required' || disabled,
|
|
1057
1477
|
title: feel === 'required' ? feelRequiredLabel : feelOptionalLabel,
|
|
1058
|
-
children:
|
|
1478
|
+
children: o(FeelIcon$1, {})
|
|
1059
1479
|
});
|
|
1060
1480
|
}
|
|
1061
1481
|
|
|
@@ -1168,10 +1588,10 @@ function PopupComponent(props, globalRef) {
|
|
|
1168
1588
|
closeOnEscape = true,
|
|
1169
1589
|
title
|
|
1170
1590
|
} = props;
|
|
1171
|
-
const focusTrapRef =
|
|
1172
|
-
const localRef =
|
|
1591
|
+
const focusTrapRef = _$1(null);
|
|
1592
|
+
const localRef = _$1(null);
|
|
1173
1593
|
const popupRef = globalRef || localRef;
|
|
1174
|
-
const containerNode =
|
|
1594
|
+
const containerNode = F$1(() => getContainerNode(container), [container]);
|
|
1175
1595
|
const handleKeydown = event => {
|
|
1176
1596
|
// do not allow keyboard events to bubble
|
|
1177
1597
|
event.stopPropagation();
|
|
@@ -1200,7 +1620,7 @@ function PopupComponent(props, globalRef) {
|
|
|
1200
1620
|
if (height) {
|
|
1201
1621
|
style.height = height + 'px';
|
|
1202
1622
|
}
|
|
1203
|
-
|
|
1623
|
+
p(() => {
|
|
1204
1624
|
if (popupRef.current) {
|
|
1205
1625
|
popupRef.current.addEventListener('focusin', handleFocus);
|
|
1206
1626
|
}
|
|
@@ -1208,7 +1628,7 @@ function PopupComponent(props, globalRef) {
|
|
|
1208
1628
|
popupRef.current.removeEventListener('focusin', handleFocus);
|
|
1209
1629
|
};
|
|
1210
1630
|
}, [popupRef]);
|
|
1211
|
-
|
|
1631
|
+
p(() => {
|
|
1212
1632
|
if (popupRef.current) {
|
|
1213
1633
|
focusTrapRef.current = focusTrap.createFocusTrap(popupRef.current, {
|
|
1214
1634
|
clickOutsideDeactivates: true,
|
|
@@ -1222,7 +1642,7 @@ function PopupComponent(props, globalRef) {
|
|
|
1222
1642
|
}
|
|
1223
1643
|
return () => focusTrapRef.current && focusTrapRef.current.deactivate();
|
|
1224
1644
|
}, [popupRef]);
|
|
1225
|
-
return
|
|
1645
|
+
return z(o("div", {
|
|
1226
1646
|
"aria-label": title,
|
|
1227
1647
|
tabIndex: -1,
|
|
1228
1648
|
ref: popupRef,
|
|
@@ -1233,7 +1653,7 @@ function PopupComponent(props, globalRef) {
|
|
|
1233
1653
|
children: props.children
|
|
1234
1654
|
}), containerNode || document.body);
|
|
1235
1655
|
}
|
|
1236
|
-
const Popup =
|
|
1656
|
+
const Popup = k(PopupComponent);
|
|
1237
1657
|
Popup.Title = Title;
|
|
1238
1658
|
Popup.Body = Body;
|
|
1239
1659
|
Popup.Footer = Footer;
|
|
@@ -1249,12 +1669,12 @@ function Title(props) {
|
|
|
1249
1669
|
|
|
1250
1670
|
// we can't use state as we need to
|
|
1251
1671
|
// manipulate this inside dragging events
|
|
1252
|
-
const context =
|
|
1672
|
+
const context = _$1({
|
|
1253
1673
|
startPosition: null,
|
|
1254
1674
|
newPosition: null
|
|
1255
1675
|
});
|
|
1256
|
-
const dragPreviewRef =
|
|
1257
|
-
const titleRef =
|
|
1676
|
+
const dragPreviewRef = _$1();
|
|
1677
|
+
const titleRef = _$1();
|
|
1258
1678
|
const onMove = (event, delta) => {
|
|
1259
1679
|
cancel(event);
|
|
1260
1680
|
const {
|
|
@@ -1296,22 +1716,22 @@ function Title(props) {
|
|
|
1296
1716
|
// notify interested parties
|
|
1297
1717
|
emit('dragend');
|
|
1298
1718
|
};
|
|
1299
|
-
return
|
|
1719
|
+
return o("div", {
|
|
1300
1720
|
class: classnames('bio-properties-panel-popup__header', draggable && 'draggable', className),
|
|
1301
1721
|
ref: titleRef,
|
|
1302
1722
|
draggable: draggable,
|
|
1303
1723
|
onDragStart: onMoveStart,
|
|
1304
1724
|
onDragEnd: onMoveEnd,
|
|
1305
1725
|
...rest,
|
|
1306
|
-
children: [draggable &&
|
|
1307
|
-
children: [
|
|
1726
|
+
children: [draggable && o(Fragment, {
|
|
1727
|
+
children: [o("div", {
|
|
1308
1728
|
ref: dragPreviewRef,
|
|
1309
1729
|
class: "bio-properties-panel-popup__drag-preview"
|
|
1310
|
-
}),
|
|
1730
|
+
}), o("div", {
|
|
1311
1731
|
class: "bio-properties-panel-popup__drag-handle",
|
|
1312
|
-
children:
|
|
1732
|
+
children: o(DragIcon, {})
|
|
1313
1733
|
})]
|
|
1314
|
-
}),
|
|
1734
|
+
}), o("div", {
|
|
1315
1735
|
class: "bio-properties-panel-popup__title",
|
|
1316
1736
|
children: title
|
|
1317
1737
|
}), children]
|
|
@@ -1323,7 +1743,7 @@ function Body(props) {
|
|
|
1323
1743
|
className,
|
|
1324
1744
|
...rest
|
|
1325
1745
|
} = props;
|
|
1326
|
-
return
|
|
1746
|
+
return o("div", {
|
|
1327
1747
|
class: classnames('bio-properties-panel-popup__body', className),
|
|
1328
1748
|
...rest,
|
|
1329
1749
|
children: children
|
|
@@ -1335,7 +1755,7 @@ function Footer(props) {
|
|
|
1335
1755
|
className,
|
|
1336
1756
|
...rest
|
|
1337
1757
|
} = props;
|
|
1338
|
-
return
|
|
1758
|
+
return o("div", {
|
|
1339
1759
|
class: classnames('bio-properties-panel-popup__footer', className),
|
|
1340
1760
|
...rest,
|
|
1341
1761
|
children: props.children
|
|
@@ -1379,14 +1799,14 @@ function FEELPopupRoot(props) {
|
|
|
1379
1799
|
popupContainer
|
|
1380
1800
|
} = props;
|
|
1381
1801
|
const prevElement = usePrevious(element);
|
|
1382
|
-
const [popupConfig, setPopupConfig] =
|
|
1383
|
-
const [open, setOpen] =
|
|
1384
|
-
const [source, setSource] =
|
|
1385
|
-
const [sourceElement, setSourceElement] =
|
|
1802
|
+
const [popupConfig, setPopupConfig] = h({});
|
|
1803
|
+
const [open, setOpen] = h(false);
|
|
1804
|
+
const [source, setSource] = h(null);
|
|
1805
|
+
const [sourceElement, setSourceElement] = h(null);
|
|
1386
1806
|
const emit = (type, context) => {
|
|
1387
1807
|
eventBus.fire('feelPopup.' + type, context);
|
|
1388
1808
|
};
|
|
1389
|
-
const isOpen =
|
|
1809
|
+
const isOpen = T$1(() => {
|
|
1390
1810
|
return !!open;
|
|
1391
1811
|
}, [open]);
|
|
1392
1812
|
useUpdateEffect(() => {
|
|
@@ -1412,14 +1832,14 @@ function FEELPopupRoot(props) {
|
|
|
1412
1832
|
};
|
|
1413
1833
|
|
|
1414
1834
|
// close popup on element change, cf. https://github.com/bpmn-io/properties-panel/issues/270
|
|
1415
|
-
|
|
1835
|
+
p(() => {
|
|
1416
1836
|
if (element && prevElement && element !== prevElement) {
|
|
1417
1837
|
handleClose();
|
|
1418
1838
|
}
|
|
1419
1839
|
}, [element]);
|
|
1420
1840
|
|
|
1421
1841
|
// allow close and open via events
|
|
1422
|
-
|
|
1842
|
+
p(() => {
|
|
1423
1843
|
const handlePopupOpen = context => {
|
|
1424
1844
|
const {
|
|
1425
1845
|
entryId,
|
|
@@ -1440,9 +1860,9 @@ function FEELPopupRoot(props) {
|
|
|
1440
1860
|
eventBus.off('feelPopup._isOpen', handleIsOpen);
|
|
1441
1861
|
};
|
|
1442
1862
|
}, [eventBus, isOpen]);
|
|
1443
|
-
return
|
|
1863
|
+
return o(FeelPopupContext.Provider, {
|
|
1444
1864
|
value: feelPopupContext,
|
|
1445
|
-
children: [open &&
|
|
1865
|
+
children: [open && o(FeelPopupComponent, {
|
|
1446
1866
|
onClose: handleClose,
|
|
1447
1867
|
container: popupContainer,
|
|
1448
1868
|
sourceElement: sourceElement,
|
|
@@ -1468,9 +1888,9 @@ function FeelPopupComponent(props) {
|
|
|
1468
1888
|
variables,
|
|
1469
1889
|
emit
|
|
1470
1890
|
} = props;
|
|
1471
|
-
const editorRef =
|
|
1472
|
-
const popupRef =
|
|
1473
|
-
const isAutoCompletionOpen =
|
|
1891
|
+
const editorRef = _$1();
|
|
1892
|
+
const popupRef = _$1();
|
|
1893
|
+
const isAutoCompletionOpen = _$1(false);
|
|
1474
1894
|
const handleSetReturnFocus = () => {
|
|
1475
1895
|
sourceElement && sourceElement.focus();
|
|
1476
1896
|
};
|
|
@@ -1492,7 +1912,7 @@ function FeelPopupComponent(props) {
|
|
|
1492
1912
|
}
|
|
1493
1913
|
}
|
|
1494
1914
|
};
|
|
1495
|
-
|
|
1915
|
+
p(() => {
|
|
1496
1916
|
emit('opened', {
|
|
1497
1917
|
domNode: popupRef.current
|
|
1498
1918
|
});
|
|
@@ -1500,7 +1920,7 @@ function FeelPopupComponent(props) {
|
|
|
1500
1920
|
domNode: popupRef.current
|
|
1501
1921
|
});
|
|
1502
1922
|
}, []);
|
|
1503
|
-
return
|
|
1923
|
+
return o(Popup, {
|
|
1504
1924
|
container: container,
|
|
1505
1925
|
className: "bio-properties-panel-feel-popup",
|
|
1506
1926
|
emit: emit,
|
|
@@ -1517,16 +1937,16 @@ function FeelPopupComponent(props) {
|
|
|
1517
1937
|
height: FEEL_POPUP_HEIGHT,
|
|
1518
1938
|
width: FEEL_POPUP_WIDTH,
|
|
1519
1939
|
ref: popupRef,
|
|
1520
|
-
children: [
|
|
1940
|
+
children: [o(Popup.Title, {
|
|
1521
1941
|
title: title,
|
|
1522
1942
|
emit: emit,
|
|
1523
1943
|
draggable: true
|
|
1524
|
-
}),
|
|
1525
|
-
children:
|
|
1944
|
+
}), o(Popup.Body, {
|
|
1945
|
+
children: o("div", {
|
|
1526
1946
|
onKeyDownCapture: onKeyDownCapture,
|
|
1527
1947
|
onKeyDown: onKeyDown,
|
|
1528
1948
|
class: "bio-properties-panel-feel-popup__body",
|
|
1529
|
-
children: [type === 'feel' &&
|
|
1949
|
+
children: [type === 'feel' && o(CodeEditor, {
|
|
1530
1950
|
enableGutters: true,
|
|
1531
1951
|
id: prefixId$8(id),
|
|
1532
1952
|
name: id,
|
|
@@ -1535,7 +1955,7 @@ function FeelPopupComponent(props) {
|
|
|
1535
1955
|
variables: variables,
|
|
1536
1956
|
ref: editorRef,
|
|
1537
1957
|
tooltipContainer: tooltipContainer
|
|
1538
|
-
}), type === 'feelers' &&
|
|
1958
|
+
}), type === 'feelers' && o(CodeEditor$1, {
|
|
1539
1959
|
id: prefixId$8(id),
|
|
1540
1960
|
contentAttributes: {
|
|
1541
1961
|
'aria-label': title
|
|
@@ -1550,8 +1970,8 @@ function FeelPopupComponent(props) {
|
|
|
1550
1970
|
tooltipContainer: tooltipContainer
|
|
1551
1971
|
})]
|
|
1552
1972
|
})
|
|
1553
|
-
}),
|
|
1554
|
-
children:
|
|
1973
|
+
}), o(Popup.Footer, {
|
|
1974
|
+
children: o("button", {
|
|
1555
1975
|
onClick: onClose,
|
|
1556
1976
|
title: "Close pop-up editor",
|
|
1557
1977
|
class: "bio-properties-panel-feel-popup__close-btn",
|
|
@@ -1577,8 +1997,8 @@ function autoCompletionOpen(element) {
|
|
|
1577
1997
|
* @param {Array} deps
|
|
1578
1998
|
*/
|
|
1579
1999
|
function useUpdateEffect(effect, deps) {
|
|
1580
|
-
const isMounted =
|
|
1581
|
-
|
|
2000
|
+
const isMounted = _$1(false);
|
|
2001
|
+
p(() => {
|
|
1582
2002
|
if (isMounted.current) {
|
|
1583
2003
|
return effect();
|
|
1584
2004
|
} else {
|
|
@@ -1600,7 +2020,7 @@ function ToggleSwitch(props) {
|
|
|
1600
2020
|
inputRef,
|
|
1601
2021
|
tooltip
|
|
1602
2022
|
} = props;
|
|
1603
|
-
const [localValue, setLocalValue] =
|
|
2023
|
+
const [localValue, setLocalValue] = h(value);
|
|
1604
2024
|
const handleInputCallback = async () => {
|
|
1605
2025
|
onInput(!value);
|
|
1606
2026
|
};
|
|
@@ -1608,30 +2028,30 @@ function ToggleSwitch(props) {
|
|
|
1608
2028
|
handleInputCallback();
|
|
1609
2029
|
setLocalValue(e.target.value);
|
|
1610
2030
|
};
|
|
1611
|
-
|
|
2031
|
+
p(() => {
|
|
1612
2032
|
if (value === localValue) {
|
|
1613
2033
|
return;
|
|
1614
2034
|
}
|
|
1615
2035
|
setLocalValue(value);
|
|
1616
2036
|
}, [value]);
|
|
1617
|
-
return
|
|
2037
|
+
return o("div", {
|
|
1618
2038
|
class: classnames('bio-properties-panel-toggle-switch', {
|
|
1619
2039
|
inline
|
|
1620
2040
|
}),
|
|
1621
|
-
children: [
|
|
2041
|
+
children: [o("label", {
|
|
1622
2042
|
class: "bio-properties-panel-label",
|
|
1623
2043
|
for: prefixId$7(id),
|
|
1624
|
-
children:
|
|
2044
|
+
children: o(TooltipWrapper, {
|
|
1625
2045
|
value: tooltip,
|
|
1626
2046
|
forId: id,
|
|
1627
2047
|
element: props.element,
|
|
1628
2048
|
children: label
|
|
1629
2049
|
})
|
|
1630
|
-
}),
|
|
2050
|
+
}), o("div", {
|
|
1631
2051
|
class: "bio-properties-panel-field-wrapper",
|
|
1632
|
-
children: [
|
|
2052
|
+
children: [o("label", {
|
|
1633
2053
|
class: "bio-properties-panel-toggle-switch__switcher",
|
|
1634
|
-
children: [
|
|
2054
|
+
children: [o("input", {
|
|
1635
2055
|
ref: inputRef,
|
|
1636
2056
|
id: prefixId$7(id),
|
|
1637
2057
|
class: "bio-properties-panel-input",
|
|
@@ -1641,10 +2061,10 @@ function ToggleSwitch(props) {
|
|
|
1641
2061
|
name: id,
|
|
1642
2062
|
onInput: handleInput,
|
|
1643
2063
|
checked: !!localValue
|
|
1644
|
-
}),
|
|
2064
|
+
}), o("span", {
|
|
1645
2065
|
class: "bio-properties-panel-toggle-switch__slider"
|
|
1646
2066
|
})]
|
|
1647
|
-
}), switcherLabel &&
|
|
2067
|
+
}), switcherLabel && o("p", {
|
|
1648
2068
|
class: "bio-properties-panel-toggle-switch__label",
|
|
1649
2069
|
children: switcherLabel
|
|
1650
2070
|
})]
|
|
@@ -1681,10 +2101,10 @@ function ToggleSwitchEntry(props) {
|
|
|
1681
2101
|
tooltip
|
|
1682
2102
|
} = props;
|
|
1683
2103
|
const value = getValue(element);
|
|
1684
|
-
return
|
|
2104
|
+
return o("div", {
|
|
1685
2105
|
class: "bio-properties-panel-entry bio-properties-panel-toggle-switch-entry",
|
|
1686
2106
|
"data-entry-id": id,
|
|
1687
|
-
children: [
|
|
2107
|
+
children: [o(ToggleSwitch, {
|
|
1688
2108
|
id: id,
|
|
1689
2109
|
label: label,
|
|
1690
2110
|
value: value,
|
|
@@ -1695,7 +2115,7 @@ function ToggleSwitchEntry(props) {
|
|
|
1695
2115
|
inline: inline,
|
|
1696
2116
|
tooltip: tooltip,
|
|
1697
2117
|
element: element
|
|
1698
|
-
}),
|
|
2118
|
+
}), o(Description, {
|
|
1699
2119
|
forId: id,
|
|
1700
2120
|
element: element,
|
|
1701
2121
|
value: description
|
|
@@ -1728,8 +2148,8 @@ function NumberField(props) {
|
|
|
1728
2148
|
onFocus,
|
|
1729
2149
|
onBlur
|
|
1730
2150
|
} = props;
|
|
1731
|
-
const [localValue, setLocalValue] =
|
|
1732
|
-
const handleInputCallback =
|
|
2151
|
+
const [localValue, setLocalValue] = h(value);
|
|
2152
|
+
const handleInputCallback = F$1(() => {
|
|
1733
2153
|
return debounce(event => {
|
|
1734
2154
|
const {
|
|
1735
2155
|
validity,
|
|
@@ -1744,19 +2164,19 @@ function NumberField(props) {
|
|
|
1744
2164
|
handleInputCallback(e);
|
|
1745
2165
|
setLocalValue(e.target.value);
|
|
1746
2166
|
};
|
|
1747
|
-
|
|
2167
|
+
p(() => {
|
|
1748
2168
|
if (value === localValue) {
|
|
1749
2169
|
return;
|
|
1750
2170
|
}
|
|
1751
2171
|
setLocalValue(value);
|
|
1752
2172
|
}, [value]);
|
|
1753
|
-
return
|
|
2173
|
+
return o("div", {
|
|
1754
2174
|
class: "bio-properties-panel-numberfield",
|
|
1755
|
-
children: [displayLabel &&
|
|
2175
|
+
children: [displayLabel && o("label", {
|
|
1756
2176
|
for: prefixId$6(id),
|
|
1757
2177
|
class: "bio-properties-panel-label",
|
|
1758
2178
|
children: label
|
|
1759
|
-
}),
|
|
2179
|
+
}), o("input", {
|
|
1760
2180
|
id: prefixId$6(id),
|
|
1761
2181
|
ref: inputRef,
|
|
1762
2182
|
type: "number",
|
|
@@ -1811,9 +2231,9 @@ function NumberFieldEntry(props) {
|
|
|
1811
2231
|
validate
|
|
1812
2232
|
} = props;
|
|
1813
2233
|
const globalError = useError(id);
|
|
1814
|
-
const [localError, setLocalError] =
|
|
2234
|
+
const [localError, setLocalError] = h(null);
|
|
1815
2235
|
let value = getValue(element);
|
|
1816
|
-
|
|
2236
|
+
p(() => {
|
|
1817
2237
|
if (isFunction(validate)) {
|
|
1818
2238
|
const newValidationError = validate(value) || null;
|
|
1819
2239
|
setLocalError(newValidationError);
|
|
@@ -1828,10 +2248,10 @@ function NumberFieldEntry(props) {
|
|
|
1828
2248
|
setLocalError(newValidationError);
|
|
1829
2249
|
};
|
|
1830
2250
|
const error = globalError || localError;
|
|
1831
|
-
return
|
|
2251
|
+
return o("div", {
|
|
1832
2252
|
class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
1833
2253
|
"data-entry-id": id,
|
|
1834
|
-
children: [
|
|
2254
|
+
children: [o(NumberField, {
|
|
1835
2255
|
debounce: debounce,
|
|
1836
2256
|
disabled: disabled,
|
|
1837
2257
|
id: id,
|
|
@@ -1843,10 +2263,10 @@ function NumberFieldEntry(props) {
|
|
|
1843
2263
|
min: min,
|
|
1844
2264
|
step: step,
|
|
1845
2265
|
value: value
|
|
1846
|
-
}, element), error &&
|
|
2266
|
+
}, element), error && o("div", {
|
|
1847
2267
|
class: "bio-properties-panel-error",
|
|
1848
2268
|
children: error
|
|
1849
|
-
}),
|
|
2269
|
+
}), o(Description, {
|
|
1850
2270
|
forId: id,
|
|
1851
2271
|
element: element,
|
|
1852
2272
|
value: description
|
|
@@ -1882,16 +2302,16 @@ function FeelTextfield(props) {
|
|
|
1882
2302
|
OptionalComponent = OptionalFeelInput,
|
|
1883
2303
|
tooltip
|
|
1884
2304
|
} = props;
|
|
1885
|
-
const [localValue, _setLocalValue] =
|
|
2305
|
+
const [localValue, _setLocalValue] = h(value);
|
|
1886
2306
|
const editorRef = useShowEntryEvent(id);
|
|
1887
|
-
const containerRef =
|
|
2307
|
+
const containerRef = _$1();
|
|
1888
2308
|
const feelActive = isString(localValue) && localValue.startsWith('=') || feel === 'required';
|
|
1889
2309
|
const feelOnlyValue = isString(localValue) && localValue.startsWith('=') ? localValue.substring(1) : localValue;
|
|
1890
|
-
const [focus, _setFocus] =
|
|
2310
|
+
const [focus, _setFocus] = h(undefined);
|
|
1891
2311
|
const {
|
|
1892
2312
|
open: openPopup,
|
|
1893
2313
|
source: popupSource
|
|
1894
|
-
} =
|
|
2314
|
+
} = q$1(FeelPopupContext);
|
|
1895
2315
|
const popuOpen = popupSource === id;
|
|
1896
2316
|
const setFocus = (offset = 0) => {
|
|
1897
2317
|
const hasFocus = containerRef.current.contains(document.activeElement);
|
|
@@ -1900,7 +2320,7 @@ function FeelTextfield(props) {
|
|
|
1900
2320
|
const position = hasFocus ? document.activeElement.selectionStart : Infinity;
|
|
1901
2321
|
_setFocus(position + offset);
|
|
1902
2322
|
};
|
|
1903
|
-
const handleInputCallback =
|
|
2323
|
+
const handleInputCallback = F$1(() => {
|
|
1904
2324
|
return debounce(newValue => {
|
|
1905
2325
|
onInput(newValue);
|
|
1906
2326
|
});
|
|
@@ -1960,13 +2380,13 @@ function FeelTextfield(props) {
|
|
|
1960
2380
|
};
|
|
1961
2381
|
openPopup(id, popupOptions, editorRef.current);
|
|
1962
2382
|
};
|
|
1963
|
-
|
|
2383
|
+
p(() => {
|
|
1964
2384
|
if (typeof focus !== 'undefined') {
|
|
1965
2385
|
editorRef.current.focus(focus);
|
|
1966
2386
|
_setFocus(undefined);
|
|
1967
2387
|
}
|
|
1968
2388
|
}, [focus]);
|
|
1969
|
-
|
|
2389
|
+
p(() => {
|
|
1970
2390
|
if (value === localValue) {
|
|
1971
2391
|
return;
|
|
1972
2392
|
}
|
|
@@ -1980,7 +2400,7 @@ function FeelTextfield(props) {
|
|
|
1980
2400
|
}, [value]);
|
|
1981
2401
|
|
|
1982
2402
|
// copy-paste integration
|
|
1983
|
-
|
|
2403
|
+
p(() => {
|
|
1984
2404
|
const copyHandler = event => {
|
|
1985
2405
|
if (!feelActive) {
|
|
1986
2406
|
return;
|
|
@@ -2008,33 +2428,33 @@ function FeelTextfield(props) {
|
|
|
2008
2428
|
containerRef.current.removeEventListener('paste', pasteHandler);
|
|
2009
2429
|
};
|
|
2010
2430
|
}, [containerRef, feelActive, handleFeelToggle, setFocus]);
|
|
2011
|
-
return
|
|
2431
|
+
return o("div", {
|
|
2012
2432
|
class: classnames('bio-properties-panel-feel-entry', {
|
|
2013
2433
|
'feel-active': feelActive
|
|
2014
2434
|
}),
|
|
2015
|
-
children: [
|
|
2435
|
+
children: [o("label", {
|
|
2016
2436
|
for: prefixId$5(id),
|
|
2017
2437
|
class: "bio-properties-panel-label",
|
|
2018
2438
|
onClick: () => setFocus(),
|
|
2019
|
-
children: [
|
|
2439
|
+
children: [o(TooltipWrapper, {
|
|
2020
2440
|
value: tooltip,
|
|
2021
2441
|
forId: id,
|
|
2022
2442
|
element: props.element,
|
|
2023
2443
|
children: label
|
|
2024
|
-
}),
|
|
2444
|
+
}), o(FeelIcon, {
|
|
2025
2445
|
label: label,
|
|
2026
2446
|
feel: feel,
|
|
2027
2447
|
onClick: handleFeelToggle,
|
|
2028
2448
|
active: feelActive
|
|
2029
2449
|
})]
|
|
2030
|
-
}),
|
|
2450
|
+
}), o("div", {
|
|
2031
2451
|
class: "bio-properties-panel-feel-container",
|
|
2032
2452
|
ref: containerRef,
|
|
2033
|
-
children: [
|
|
2453
|
+
children: [o(FeelIndicator, {
|
|
2034
2454
|
active: feelActive,
|
|
2035
2455
|
disabled: feel !== 'optional' || disabled,
|
|
2036
2456
|
onClick: handleFeelToggle
|
|
2037
|
-
}), feelActive ?
|
|
2457
|
+
}), feelActive ? o(CodeEditor, {
|
|
2038
2458
|
id: prefixId$5(id),
|
|
2039
2459
|
name: id,
|
|
2040
2460
|
onInput: handleLocalInput,
|
|
@@ -2050,7 +2470,7 @@ function FeelTextfield(props) {
|
|
|
2050
2470
|
variables: variables,
|
|
2051
2471
|
ref: editorRef,
|
|
2052
2472
|
tooltipContainer: tooltipContainer
|
|
2053
|
-
}) :
|
|
2473
|
+
}) : o(OptionalComponent, {
|
|
2054
2474
|
...props,
|
|
2055
2475
|
popupOpen: popuOpen,
|
|
2056
2476
|
onInput: handleLocalInput,
|
|
@@ -2066,7 +2486,7 @@ function FeelTextfield(props) {
|
|
|
2066
2486
|
})]
|
|
2067
2487
|
});
|
|
2068
2488
|
}
|
|
2069
|
-
const OptionalFeelInput =
|
|
2489
|
+
const OptionalFeelInput = k((props, ref) => {
|
|
2070
2490
|
const {
|
|
2071
2491
|
id,
|
|
2072
2492
|
disabled,
|
|
@@ -2075,7 +2495,7 @@ const OptionalFeelInput = forwardRef((props, ref) => {
|
|
|
2075
2495
|
onFocus,
|
|
2076
2496
|
onBlur
|
|
2077
2497
|
} = props;
|
|
2078
|
-
const inputRef =
|
|
2498
|
+
const inputRef = _$1();
|
|
2079
2499
|
|
|
2080
2500
|
// To be consistent with the FEEL editor, set focus at start of input
|
|
2081
2501
|
// this ensures clean editing experience when switching with the keyboard
|
|
@@ -2094,7 +2514,7 @@ const OptionalFeelInput = forwardRef((props, ref) => {
|
|
|
2094
2514
|
}
|
|
2095
2515
|
}
|
|
2096
2516
|
};
|
|
2097
|
-
return
|
|
2517
|
+
return o("input", {
|
|
2098
2518
|
id: prefixId$5(id),
|
|
2099
2519
|
type: "text",
|
|
2100
2520
|
ref: inputRef,
|
|
@@ -2109,7 +2529,7 @@ const OptionalFeelInput = forwardRef((props, ref) => {
|
|
|
2109
2529
|
value: value || ''
|
|
2110
2530
|
});
|
|
2111
2531
|
});
|
|
2112
|
-
const OptionalFeelNumberField =
|
|
2532
|
+
const OptionalFeelNumberField = k((props, ref) => {
|
|
2113
2533
|
const {
|
|
2114
2534
|
id,
|
|
2115
2535
|
debounce,
|
|
@@ -2122,7 +2542,7 @@ const OptionalFeelNumberField = forwardRef((props, ref) => {
|
|
|
2122
2542
|
onFocus,
|
|
2123
2543
|
onBlur
|
|
2124
2544
|
} = props;
|
|
2125
|
-
const inputRef =
|
|
2545
|
+
const inputRef = _$1();
|
|
2126
2546
|
|
|
2127
2547
|
// To be consistent with the FEEL editor, set focus at start of input
|
|
2128
2548
|
// this ensures clean editing experience when switching with the keyboard
|
|
@@ -2141,7 +2561,7 @@ const OptionalFeelNumberField = forwardRef((props, ref) => {
|
|
|
2141
2561
|
}
|
|
2142
2562
|
}
|
|
2143
2563
|
};
|
|
2144
|
-
return
|
|
2564
|
+
return o(NumberField, {
|
|
2145
2565
|
id: id,
|
|
2146
2566
|
debounce: debounce,
|
|
2147
2567
|
disabled: disabled,
|
|
@@ -2156,7 +2576,7 @@ const OptionalFeelNumberField = forwardRef((props, ref) => {
|
|
|
2156
2576
|
onBlur: onBlur
|
|
2157
2577
|
});
|
|
2158
2578
|
});
|
|
2159
|
-
const OptionalFeelTextArea =
|
|
2579
|
+
const OptionalFeelTextArea = k((props, ref) => {
|
|
2160
2580
|
const {
|
|
2161
2581
|
id,
|
|
2162
2582
|
disabled,
|
|
@@ -2165,7 +2585,7 @@ const OptionalFeelTextArea = forwardRef((props, ref) => {
|
|
|
2165
2585
|
onFocus,
|
|
2166
2586
|
onBlur
|
|
2167
2587
|
} = props;
|
|
2168
|
-
const inputRef =
|
|
2588
|
+
const inputRef = _$1();
|
|
2169
2589
|
|
|
2170
2590
|
// To be consistent with the FEEL editor, set focus at start of input
|
|
2171
2591
|
// this ensures clean editing experience when switching with the keyboard
|
|
@@ -2179,7 +2599,7 @@ const OptionalFeelTextArea = forwardRef((props, ref) => {
|
|
|
2179
2599
|
input.setSelectionRange(0, 0);
|
|
2180
2600
|
}
|
|
2181
2601
|
};
|
|
2182
|
-
return
|
|
2602
|
+
return o("textarea", {
|
|
2183
2603
|
id: prefixId$5(id),
|
|
2184
2604
|
type: "text",
|
|
2185
2605
|
ref: inputRef,
|
|
@@ -2195,7 +2615,7 @@ const OptionalFeelTextArea = forwardRef((props, ref) => {
|
|
|
2195
2615
|
"data-gramm": "false"
|
|
2196
2616
|
});
|
|
2197
2617
|
});
|
|
2198
|
-
const OptionalFeelToggleSwitch =
|
|
2618
|
+
const OptionalFeelToggleSwitch = k((props, ref) => {
|
|
2199
2619
|
const {
|
|
2200
2620
|
id,
|
|
2201
2621
|
onInput,
|
|
@@ -2204,7 +2624,7 @@ const OptionalFeelToggleSwitch = forwardRef((props, ref) => {
|
|
|
2204
2624
|
onBlur,
|
|
2205
2625
|
switcherLabel
|
|
2206
2626
|
} = props;
|
|
2207
|
-
const inputRef =
|
|
2627
|
+
const inputRef = _$1();
|
|
2208
2628
|
|
|
2209
2629
|
// To be consistent with the FEEL editor, set focus at start of input
|
|
2210
2630
|
// this ensures clean editing experience when switching with the keyboard
|
|
@@ -2217,7 +2637,7 @@ const OptionalFeelToggleSwitch = forwardRef((props, ref) => {
|
|
|
2217
2637
|
input.focus();
|
|
2218
2638
|
}
|
|
2219
2639
|
};
|
|
2220
|
-
return
|
|
2640
|
+
return o(ToggleSwitch, {
|
|
2221
2641
|
id: id,
|
|
2222
2642
|
value: value,
|
|
2223
2643
|
inputRef: inputRef,
|
|
@@ -2227,7 +2647,7 @@ const OptionalFeelToggleSwitch = forwardRef((props, ref) => {
|
|
|
2227
2647
|
switcherLabel: switcherLabel
|
|
2228
2648
|
});
|
|
2229
2649
|
});
|
|
2230
|
-
const OptionalFeelCheckbox =
|
|
2650
|
+
const OptionalFeelCheckbox = k((props, ref) => {
|
|
2231
2651
|
const {
|
|
2232
2652
|
id,
|
|
2233
2653
|
disabled,
|
|
@@ -2236,7 +2656,7 @@ const OptionalFeelCheckbox = forwardRef((props, ref) => {
|
|
|
2236
2656
|
onFocus,
|
|
2237
2657
|
onBlur
|
|
2238
2658
|
} = props;
|
|
2239
|
-
const inputRef =
|
|
2659
|
+
const inputRef = _$1();
|
|
2240
2660
|
const handleChange = ({
|
|
2241
2661
|
target
|
|
2242
2662
|
}) => {
|
|
@@ -2254,7 +2674,7 @@ const OptionalFeelCheckbox = forwardRef((props, ref) => {
|
|
|
2254
2674
|
input.focus();
|
|
2255
2675
|
}
|
|
2256
2676
|
};
|
|
2257
|
-
return
|
|
2677
|
+
return o("input", {
|
|
2258
2678
|
ref: inputRef,
|
|
2259
2679
|
id: prefixId$5(id),
|
|
2260
2680
|
name: id,
|
|
@@ -2310,10 +2730,10 @@ function FeelEntry(props) {
|
|
|
2310
2730
|
onBlur,
|
|
2311
2731
|
tooltip
|
|
2312
2732
|
} = props;
|
|
2313
|
-
const [validationError, setValidationError] =
|
|
2314
|
-
const [localError, setLocalError] =
|
|
2733
|
+
const [validationError, setValidationError] = h(null);
|
|
2734
|
+
const [localError, setLocalError] = h(null);
|
|
2315
2735
|
let value = getValue(element);
|
|
2316
|
-
|
|
2736
|
+
p(() => {
|
|
2317
2737
|
if (isFunction(validate)) {
|
|
2318
2738
|
const newValidationError = validate(value) || null;
|
|
2319
2739
|
setValidationError(newValidationError);
|
|
@@ -2331,12 +2751,12 @@ function FeelEntry(props) {
|
|
|
2331
2751
|
}
|
|
2332
2752
|
setValidationError(newValidationError);
|
|
2333
2753
|
});
|
|
2334
|
-
const onError =
|
|
2754
|
+
const onError = T$1(err => {
|
|
2335
2755
|
setLocalError(err);
|
|
2336
2756
|
}, []);
|
|
2337
2757
|
const temporaryError = useError(id);
|
|
2338
2758
|
const error = temporaryError || localError || validationError;
|
|
2339
|
-
return
|
|
2759
|
+
return o("div", {
|
|
2340
2760
|
class: classnames(props.class, 'bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
2341
2761
|
"data-entry-id": id,
|
|
2342
2762
|
children: [createElement(FeelTextfield, {
|
|
@@ -2360,10 +2780,10 @@ function FeelEntry(props) {
|
|
|
2360
2780
|
tooltipContainer: tooltipContainer,
|
|
2361
2781
|
OptionalComponent: props.OptionalComponent,
|
|
2362
2782
|
tooltip: tooltip
|
|
2363
|
-
}), error &&
|
|
2783
|
+
}), error && o("div", {
|
|
2364
2784
|
class: "bio-properties-panel-error",
|
|
2365
2785
|
children: error
|
|
2366
|
-
}),
|
|
2786
|
+
}), o(Description, {
|
|
2367
2787
|
forId: id,
|
|
2368
2788
|
element: element,
|
|
2369
2789
|
value: description
|
|
@@ -2394,7 +2814,7 @@ function FeelEntry(props) {
|
|
|
2394
2814
|
* @param {Function} props.onBlur
|
|
2395
2815
|
*/
|
|
2396
2816
|
function FeelNumberEntry(props) {
|
|
2397
|
-
return
|
|
2817
|
+
return o(FeelEntry, {
|
|
2398
2818
|
class: "bio-properties-panel-feel-number",
|
|
2399
2819
|
OptionalComponent: OptionalFeelNumberField,
|
|
2400
2820
|
...props
|
|
@@ -2421,7 +2841,7 @@ function FeelNumberEntry(props) {
|
|
|
2421
2841
|
* @param {Function} props.onBlur
|
|
2422
2842
|
*/
|
|
2423
2843
|
function FeelTextAreaEntry(props) {
|
|
2424
|
-
return
|
|
2844
|
+
return o(FeelEntry, {
|
|
2425
2845
|
class: "bio-properties-panel-feel-textarea",
|
|
2426
2846
|
OptionalComponent: OptionalFeelTextArea,
|
|
2427
2847
|
...props
|
|
@@ -2448,7 +2868,7 @@ function FeelTextAreaEntry(props) {
|
|
|
2448
2868
|
* @param {Function} props.onBlur
|
|
2449
2869
|
*/
|
|
2450
2870
|
function FeelToggleSwitchEntry(props) {
|
|
2451
|
-
return
|
|
2871
|
+
return o(FeelEntry, {
|
|
2452
2872
|
class: "bio-properties-panel-feel-toggle-switch",
|
|
2453
2873
|
OptionalComponent: OptionalFeelToggleSwitch,
|
|
2454
2874
|
...props
|
|
@@ -2475,7 +2895,7 @@ function FeelToggleSwitchEntry(props) {
|
|
|
2475
2895
|
* @param {Function} props.onBlur
|
|
2476
2896
|
*/
|
|
2477
2897
|
function FeelCheckboxEntry(props) {
|
|
2478
|
-
return
|
|
2898
|
+
return o(FeelEntry, {
|
|
2479
2899
|
class: "bio-properties-panel-feel-checkbox",
|
|
2480
2900
|
OptionalComponent: OptionalFeelCheckbox,
|
|
2481
2901
|
...props
|
|
@@ -2504,7 +2924,7 @@ function FeelCheckboxEntry(props) {
|
|
|
2504
2924
|
* @param {Function} props.onBlur
|
|
2505
2925
|
*/
|
|
2506
2926
|
function FeelTemplatingEntry(props) {
|
|
2507
|
-
return
|
|
2927
|
+
return o(FeelEntry, {
|
|
2508
2928
|
class: "bio-properties-panel-feel-templating",
|
|
2509
2929
|
OptionalComponent: CodeEditor$1,
|
|
2510
2930
|
...props
|
|
@@ -2646,14 +3066,14 @@ function PropertiesPanel(props) {
|
|
|
2646
3066
|
} = props;
|
|
2647
3067
|
|
|
2648
3068
|
// set-up layout context
|
|
2649
|
-
const [layout, setLayout] =
|
|
3069
|
+
const [layout, setLayout] = h(createLayout(layoutConfig));
|
|
2650
3070
|
|
|
2651
3071
|
// react to external changes in the layout config
|
|
2652
3072
|
useUpdateLayoutEffect(() => {
|
|
2653
3073
|
const newLayout = createLayout(layoutConfig);
|
|
2654
3074
|
setLayout(newLayout);
|
|
2655
3075
|
}, [layoutConfig]);
|
|
2656
|
-
|
|
3076
|
+
p(() => {
|
|
2657
3077
|
if (typeof layoutChanged === 'function') {
|
|
2658
3078
|
layoutChanged(layout);
|
|
2659
3079
|
}
|
|
@@ -2674,8 +3094,8 @@ function PropertiesPanel(props) {
|
|
|
2674
3094
|
};
|
|
2675
3095
|
|
|
2676
3096
|
// set-up description context
|
|
2677
|
-
const description =
|
|
2678
|
-
|
|
3097
|
+
const description = F$1(() => createDescriptionContext(descriptionConfig), [descriptionConfig]);
|
|
3098
|
+
p(() => {
|
|
2679
3099
|
if (typeof descriptionLoaded === 'function') {
|
|
2680
3100
|
descriptionLoaded(description);
|
|
2681
3101
|
}
|
|
@@ -2689,8 +3109,8 @@ function PropertiesPanel(props) {
|
|
|
2689
3109
|
};
|
|
2690
3110
|
|
|
2691
3111
|
// set-up tooltip context
|
|
2692
|
-
const tooltip =
|
|
2693
|
-
|
|
3112
|
+
const tooltip = F$1(() => createTooltipContext(tooltipConfig), [tooltipConfig]);
|
|
3113
|
+
p(() => {
|
|
2694
3114
|
if (typeof tooltipLoaded === 'function') {
|
|
2695
3115
|
tooltipLoaded(tooltip);
|
|
2696
3116
|
}
|
|
@@ -2702,7 +3122,7 @@ function PropertiesPanel(props) {
|
|
|
2702
3122
|
tooltip,
|
|
2703
3123
|
getTooltipForId
|
|
2704
3124
|
};
|
|
2705
|
-
const [errors, setErrors] =
|
|
3125
|
+
const [errors, setErrors] = h({});
|
|
2706
3126
|
const onSetErrors = ({
|
|
2707
3127
|
errors
|
|
2708
3128
|
}) => setErrors(errors);
|
|
@@ -2719,39 +3139,39 @@ function PropertiesPanel(props) {
|
|
|
2719
3139
|
|
|
2720
3140
|
// empty state
|
|
2721
3141
|
if (placeholderProvider && !element) {
|
|
2722
|
-
return
|
|
3142
|
+
return o(Placeholder, {
|
|
2723
3143
|
...placeholderProvider.getEmpty()
|
|
2724
3144
|
});
|
|
2725
3145
|
}
|
|
2726
3146
|
|
|
2727
3147
|
// multiple state
|
|
2728
3148
|
if (placeholderProvider && isArray(element)) {
|
|
2729
|
-
return
|
|
3149
|
+
return o(Placeholder, {
|
|
2730
3150
|
...placeholderProvider.getMultiple()
|
|
2731
3151
|
});
|
|
2732
3152
|
}
|
|
2733
|
-
return
|
|
3153
|
+
return o(LayoutContext.Provider, {
|
|
2734
3154
|
value: propertiesPanelContext,
|
|
2735
|
-
children:
|
|
3155
|
+
children: o(ErrorsContext.Provider, {
|
|
2736
3156
|
value: errorsContext,
|
|
2737
|
-
children:
|
|
3157
|
+
children: o(DescriptionContext.Provider, {
|
|
2738
3158
|
value: descriptionContext,
|
|
2739
|
-
children:
|
|
3159
|
+
children: o(TooltipContext.Provider, {
|
|
2740
3160
|
value: tooltipContext,
|
|
2741
|
-
children:
|
|
3161
|
+
children: o(LayoutContext.Provider, {
|
|
2742
3162
|
value: layoutContext,
|
|
2743
|
-
children:
|
|
3163
|
+
children: o(EventContext.Provider, {
|
|
2744
3164
|
value: eventContext,
|
|
2745
|
-
children:
|
|
3165
|
+
children: o(FEELPopupRoot, {
|
|
2746
3166
|
element: element,
|
|
2747
3167
|
eventBus: eventBus,
|
|
2748
3168
|
popupContainer: feelPopupContainer,
|
|
2749
|
-
children:
|
|
3169
|
+
children: o("div", {
|
|
2750
3170
|
class: "bio-properties-panel",
|
|
2751
|
-
children: [
|
|
3171
|
+
children: [o(Header, {
|
|
2752
3172
|
element: element,
|
|
2753
3173
|
headerProvider: headerProvider
|
|
2754
|
-
}),
|
|
3174
|
+
}), o("div", {
|
|
2755
3175
|
class: "bio-properties-panel-scroll-container",
|
|
2756
3176
|
children: groups.map(group => {
|
|
2757
3177
|
const {
|
|
@@ -2805,8 +3225,8 @@ function createTooltipContext(overrides = {}) {
|
|
|
2805
3225
|
* @param {Array} deps
|
|
2806
3226
|
*/
|
|
2807
3227
|
function useUpdateLayoutEffect(effect, deps) {
|
|
2808
|
-
const isMounted =
|
|
2809
|
-
|
|
3228
|
+
const isMounted = _$1(false);
|
|
3229
|
+
y(() => {
|
|
2810
3230
|
if (isMounted.current) {
|
|
2811
3231
|
return effect();
|
|
2812
3232
|
} else {
|
|
@@ -2821,9 +3241,9 @@ function DropdownButton(props) {
|
|
|
2821
3241
|
children,
|
|
2822
3242
|
menuItems = []
|
|
2823
3243
|
} = props;
|
|
2824
|
-
const dropdownRef =
|
|
2825
|
-
const menuRef =
|
|
2826
|
-
const [open, setOpen] =
|
|
3244
|
+
const dropdownRef = _$1(null);
|
|
3245
|
+
const menuRef = _$1(null);
|
|
3246
|
+
const [open, setOpen] = h(false);
|
|
2827
3247
|
const close = () => setOpen(false);
|
|
2828
3248
|
function onDropdownToggle(event) {
|
|
2829
3249
|
if (menuRef.current && menuRef.current.contains(event.target)) {
|
|
@@ -2838,16 +3258,16 @@ function DropdownButton(props) {
|
|
|
2838
3258
|
action();
|
|
2839
3259
|
}
|
|
2840
3260
|
useGlobalClick([dropdownRef.current], () => close());
|
|
2841
|
-
return
|
|
3261
|
+
return o("div", {
|
|
2842
3262
|
class: classnames('bio-properties-panel-dropdown-button', {
|
|
2843
3263
|
open
|
|
2844
3264
|
}, className),
|
|
2845
3265
|
onClick: onDropdownToggle,
|
|
2846
3266
|
ref: dropdownRef,
|
|
2847
|
-
children: [children,
|
|
3267
|
+
children: [children, o("div", {
|
|
2848
3268
|
class: "bio-properties-panel-dropdown-button__menu",
|
|
2849
3269
|
ref: menuRef,
|
|
2850
|
-
children: menuItems.map((item, index) =>
|
|
3270
|
+
children: menuItems.map((item, index) => o(MenuItem, {
|
|
2851
3271
|
onClick: onActionClick,
|
|
2852
3272
|
item: item
|
|
2853
3273
|
}, index))
|
|
@@ -2859,18 +3279,18 @@ function MenuItem({
|
|
|
2859
3279
|
onClick
|
|
2860
3280
|
}) {
|
|
2861
3281
|
if (item.separator) {
|
|
2862
|
-
return
|
|
3282
|
+
return o("div", {
|
|
2863
3283
|
class: "bio-properties-panel-dropdown-button__menu-item bio-properties-panel-dropdown-button__menu-item--separator"
|
|
2864
3284
|
});
|
|
2865
3285
|
}
|
|
2866
3286
|
if (item.action) {
|
|
2867
|
-
return
|
|
3287
|
+
return o("button", {
|
|
2868
3288
|
class: "bio-properties-panel-dropdown-button__menu-item bio-properties-panel-dropdown-button__menu-item--actionable",
|
|
2869
3289
|
onClick: event => onClick(event, item.action),
|
|
2870
3290
|
children: item.entry
|
|
2871
3291
|
});
|
|
2872
3292
|
}
|
|
2873
|
-
return
|
|
3293
|
+
return o("div", {
|
|
2874
3294
|
class: "bio-properties-panel-dropdown-button__menu-item",
|
|
2875
3295
|
children: item.entry
|
|
2876
3296
|
});
|
|
@@ -2882,7 +3302,7 @@ function MenuItem({
|
|
|
2882
3302
|
* @param {Function} callback
|
|
2883
3303
|
*/
|
|
2884
3304
|
function useGlobalClick(ignoredElements, callback) {
|
|
2885
|
-
|
|
3305
|
+
p(() => {
|
|
2886
3306
|
/**
|
|
2887
3307
|
* @param {MouseEvent} event
|
|
2888
3308
|
*/
|
|
@@ -2908,7 +3328,7 @@ function HeaderButton(props) {
|
|
|
2908
3328
|
onClick = () => {},
|
|
2909
3329
|
...otherProps
|
|
2910
3330
|
} = props;
|
|
2911
|
-
return
|
|
3331
|
+
return o("button", {
|
|
2912
3332
|
...otherProps,
|
|
2913
3333
|
onClick: onClick,
|
|
2914
3334
|
class: classnames('bio-properties-panel-group-header-button', classname),
|
|
@@ -2925,14 +3345,14 @@ function CollapsibleEntry(props) {
|
|
|
2925
3345
|
open: shouldOpen,
|
|
2926
3346
|
remove
|
|
2927
3347
|
} = props;
|
|
2928
|
-
const [open, setOpen] =
|
|
3348
|
+
const [open, setOpen] = h(shouldOpen);
|
|
2929
3349
|
const toggleOpen = () => setOpen(!open);
|
|
2930
3350
|
const {
|
|
2931
3351
|
onShow
|
|
2932
|
-
} =
|
|
3352
|
+
} = q$1(LayoutContext);
|
|
2933
3353
|
const propertiesPanelContext = {
|
|
2934
|
-
...
|
|
2935
|
-
onShow:
|
|
3354
|
+
...q$1(LayoutContext),
|
|
3355
|
+
onShow: T$1(() => {
|
|
2936
3356
|
setOpen(true);
|
|
2937
3357
|
if (isFunction(onShow)) {
|
|
2938
3358
|
onShow();
|
|
@@ -2942,31 +3362,31 @@ function CollapsibleEntry(props) {
|
|
|
2942
3362
|
|
|
2943
3363
|
// todo(pinussilvestrus): translate once we have a translate mechanism for the core
|
|
2944
3364
|
const placeholderLabel = '<empty>';
|
|
2945
|
-
return
|
|
3365
|
+
return o("div", {
|
|
2946
3366
|
"data-entry-id": id,
|
|
2947
3367
|
class: classnames('bio-properties-panel-collapsible-entry', open ? 'open' : ''),
|
|
2948
|
-
children: [
|
|
3368
|
+
children: [o("div", {
|
|
2949
3369
|
class: "bio-properties-panel-collapsible-entry-header",
|
|
2950
3370
|
onClick: toggleOpen,
|
|
2951
|
-
children: [
|
|
3371
|
+
children: [o("div", {
|
|
2952
3372
|
title: label || placeholderLabel,
|
|
2953
3373
|
class: classnames('bio-properties-panel-collapsible-entry-header-title', !label && 'empty'),
|
|
2954
3374
|
children: label || placeholderLabel
|
|
2955
|
-
}),
|
|
3375
|
+
}), o("button", {
|
|
2956
3376
|
title: "Toggle list item",
|
|
2957
3377
|
class: "bio-properties-panel-arrow bio-properties-panel-collapsible-entry-arrow",
|
|
2958
|
-
children:
|
|
3378
|
+
children: o(ArrowIcon, {
|
|
2959
3379
|
class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
|
|
2960
3380
|
})
|
|
2961
|
-
}), remove ?
|
|
3381
|
+
}), remove ? o("button", {
|
|
2962
3382
|
title: "Delete item",
|
|
2963
3383
|
class: "bio-properties-panel-remove-entry",
|
|
2964
3384
|
onClick: remove,
|
|
2965
|
-
children:
|
|
3385
|
+
children: o(DeleteIcon, {})
|
|
2966
3386
|
}) : null]
|
|
2967
|
-
}),
|
|
3387
|
+
}), o("div", {
|
|
2968
3388
|
class: classnames('bio-properties-panel-collapsible-entry-entries', open ? 'open' : ''),
|
|
2969
|
-
children:
|
|
3389
|
+
children: o(LayoutContext.Provider, {
|
|
2970
3390
|
value: propertiesPanelContext,
|
|
2971
3391
|
children: entries.map(entry => {
|
|
2972
3392
|
const {
|
|
@@ -2991,7 +3411,7 @@ function ListItem(props) {
|
|
|
2991
3411
|
} = props;
|
|
2992
3412
|
|
|
2993
3413
|
// focus specified entry on auto open
|
|
2994
|
-
|
|
3414
|
+
p(() => {
|
|
2995
3415
|
if (autoOpen && autoFocusEntry) {
|
|
2996
3416
|
const entry = query(`[data-entry-id="${autoFocusEntry}"]`);
|
|
2997
3417
|
const focusableInput = query('.bio-properties-panel-input', entry);
|
|
@@ -3004,9 +3424,9 @@ function ListItem(props) {
|
|
|
3004
3424
|
}
|
|
3005
3425
|
}
|
|
3006
3426
|
}, [autoOpen, autoFocusEntry]);
|
|
3007
|
-
return
|
|
3427
|
+
return o("div", {
|
|
3008
3428
|
class: "bio-properties-panel-list-item",
|
|
3009
|
-
children:
|
|
3429
|
+
children: o(CollapsibleEntry, {
|
|
3010
3430
|
...props,
|
|
3011
3431
|
open: autoOpen
|
|
3012
3432
|
})
|
|
@@ -3028,15 +3448,15 @@ function ListGroup(props) {
|
|
|
3028
3448
|
shouldOpen = true,
|
|
3029
3449
|
shouldSort = true
|
|
3030
3450
|
} = props;
|
|
3031
|
-
const groupRef =
|
|
3451
|
+
const groupRef = _$1(null);
|
|
3032
3452
|
const [open, setOpen] = useLayoutState(['groups', id, 'open'], false);
|
|
3033
|
-
const [sticky, setSticky] =
|
|
3034
|
-
const onShow =
|
|
3035
|
-
const [ordering, setOrdering] =
|
|
3036
|
-
const [newItemAdded, setNewItemAdded] =
|
|
3453
|
+
const [sticky, setSticky] = h(false);
|
|
3454
|
+
const onShow = T$1(() => setOpen(true), [setOpen]);
|
|
3455
|
+
const [ordering, setOrdering] = h([]);
|
|
3456
|
+
const [newItemAdded, setNewItemAdded] = h(false);
|
|
3037
3457
|
|
|
3038
3458
|
// Flag to mark that add button was clicked in the last render cycle
|
|
3039
|
-
const [addTriggered, setAddTriggered] =
|
|
3459
|
+
const [addTriggered, setAddTriggered] = h(false);
|
|
3040
3460
|
const prevItems = usePrevious(items);
|
|
3041
3461
|
const prevElement = usePrevious(element);
|
|
3042
3462
|
const elementChanged = element !== prevElement;
|
|
@@ -3050,14 +3470,14 @@ function ListGroup(props) {
|
|
|
3050
3470
|
// keep ordering in sync to items - and open changes
|
|
3051
3471
|
|
|
3052
3472
|
// (0) set initial ordering from given items
|
|
3053
|
-
|
|
3473
|
+
p(() => {
|
|
3054
3474
|
if (!prevItems || !shouldSort) {
|
|
3055
3475
|
setOrdering(createOrdering(items));
|
|
3056
3476
|
}
|
|
3057
3477
|
}, [items, element]);
|
|
3058
3478
|
|
|
3059
3479
|
// (1) items were added
|
|
3060
|
-
|
|
3480
|
+
p(() => {
|
|
3061
3481
|
// reset addTriggered flag
|
|
3062
3482
|
setAddTriggered(false);
|
|
3063
3483
|
if (shouldHandleEffects && prevItems && items.length > prevItems.length) {
|
|
@@ -3098,14 +3518,14 @@ function ListGroup(props) {
|
|
|
3098
3518
|
}, [items, open, shouldHandleEffects, addTriggered]);
|
|
3099
3519
|
|
|
3100
3520
|
// (2) sort items on open if shouldSort is set
|
|
3101
|
-
|
|
3521
|
+
p(() => {
|
|
3102
3522
|
if (shouldSort && open && !newItemAdded) {
|
|
3103
3523
|
setOrdering(createOrdering(sortItems(items)));
|
|
3104
3524
|
}
|
|
3105
3525
|
}, [open, shouldSort]);
|
|
3106
3526
|
|
|
3107
3527
|
// (3) items were deleted
|
|
3108
|
-
|
|
3528
|
+
p(() => {
|
|
3109
3529
|
if (shouldHandleEffects && prevItems && items.length < prevItems.length) {
|
|
3110
3530
|
let keep = [];
|
|
3111
3531
|
ordering.forEach(o => {
|
|
@@ -3122,7 +3542,7 @@ function ListGroup(props) {
|
|
|
3122
3542
|
const toggleOpen = () => setOpen(!open);
|
|
3123
3543
|
const hasItems = !!items.length;
|
|
3124
3544
|
const propertiesPanelContext = {
|
|
3125
|
-
...
|
|
3545
|
+
...q$1(LayoutContext),
|
|
3126
3546
|
onShow
|
|
3127
3547
|
};
|
|
3128
3548
|
const handleAddClick = e => {
|
|
@@ -3141,49 +3561,49 @@ function ListGroup(props) {
|
|
|
3141
3561
|
// also check if the error is nested, e.g. for name-value entries
|
|
3142
3562
|
return item.entries.some(entry => allErrors[entry.id]);
|
|
3143
3563
|
});
|
|
3144
|
-
return
|
|
3564
|
+
return o("div", {
|
|
3145
3565
|
class: "bio-properties-panel-group",
|
|
3146
3566
|
"data-group-id": 'group-' + id,
|
|
3147
3567
|
ref: groupRef,
|
|
3148
|
-
children: [
|
|
3568
|
+
children: [o("div", {
|
|
3149
3569
|
class: classnames('bio-properties-panel-group-header', hasItems ? '' : 'empty', hasItems && open ? 'open' : '', sticky && open ? 'sticky' : ''),
|
|
3150
3570
|
onClick: hasItems ? toggleOpen : noop$1,
|
|
3151
|
-
children: [
|
|
3571
|
+
children: [o("div", {
|
|
3152
3572
|
title: props.tooltip ? null : label,
|
|
3153
3573
|
"data-title": label,
|
|
3154
3574
|
class: "bio-properties-panel-group-header-title",
|
|
3155
|
-
children:
|
|
3575
|
+
children: o(TooltipWrapper, {
|
|
3156
3576
|
value: props.tooltip,
|
|
3157
3577
|
forId: 'group-' + id,
|
|
3158
3578
|
element: element,
|
|
3159
3579
|
parent: groupRef,
|
|
3160
3580
|
children: label
|
|
3161
3581
|
})
|
|
3162
|
-
}),
|
|
3582
|
+
}), o("div", {
|
|
3163
3583
|
class: "bio-properties-panel-group-header-buttons",
|
|
3164
|
-
children: [add ?
|
|
3584
|
+
children: [add ? o("button", {
|
|
3165
3585
|
title: "Create new list item",
|
|
3166
3586
|
class: "bio-properties-panel-group-header-button bio-properties-panel-add-entry",
|
|
3167
3587
|
onClick: handleAddClick,
|
|
3168
|
-
children: [
|
|
3588
|
+
children: [o(CreateIcon, {}), !hasItems ? o("span", {
|
|
3169
3589
|
class: "bio-properties-panel-add-entry-label",
|
|
3170
3590
|
children: "Create"
|
|
3171
3591
|
}) : null]
|
|
3172
|
-
}) : null, hasItems ?
|
|
3592
|
+
}) : null, hasItems ? o("div", {
|
|
3173
3593
|
title: `List contains ${items.length} item${items.length != 1 ? 's' : ''}`,
|
|
3174
3594
|
class: classnames('bio-properties-panel-list-badge', hasError ? 'bio-properties-panel-list-badge--error' : ''),
|
|
3175
3595
|
children: items.length
|
|
3176
|
-
}) : null, hasItems ?
|
|
3596
|
+
}) : null, hasItems ? o("button", {
|
|
3177
3597
|
title: "Toggle section",
|
|
3178
3598
|
class: "bio-properties-panel-group-header-button bio-properties-panel-arrow",
|
|
3179
|
-
children:
|
|
3599
|
+
children: o(ArrowIcon, {
|
|
3180
3600
|
class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
|
|
3181
3601
|
})
|
|
3182
3602
|
}) : null]
|
|
3183
3603
|
})]
|
|
3184
|
-
}),
|
|
3604
|
+
}), o("div", {
|
|
3185
3605
|
class: classnames('bio-properties-panel-list', open && hasItems ? 'open' : ''),
|
|
3186
|
-
children:
|
|
3606
|
+
children: o(LayoutContext.Provider, {
|
|
3187
3607
|
value: propertiesPanelContext,
|
|
3188
3608
|
children: ordering.map((o, index) => {
|
|
3189
3609
|
const item = getItem(items, o);
|
|
@@ -3236,7 +3656,7 @@ function Checkbox(props) {
|
|
|
3236
3656
|
onBlur,
|
|
3237
3657
|
tooltip
|
|
3238
3658
|
} = props;
|
|
3239
|
-
const [localValue, setLocalValue] =
|
|
3659
|
+
const [localValue, setLocalValue] = h(value);
|
|
3240
3660
|
const handleChangeCallback = ({
|
|
3241
3661
|
target
|
|
3242
3662
|
}) => {
|
|
@@ -3246,16 +3666,16 @@ function Checkbox(props) {
|
|
|
3246
3666
|
handleChangeCallback(e);
|
|
3247
3667
|
setLocalValue(e.target.value);
|
|
3248
3668
|
};
|
|
3249
|
-
|
|
3669
|
+
p(() => {
|
|
3250
3670
|
if (value === localValue) {
|
|
3251
3671
|
return;
|
|
3252
3672
|
}
|
|
3253
3673
|
setLocalValue(value);
|
|
3254
3674
|
}, [value]);
|
|
3255
3675
|
const ref = useShowEntryEvent(id);
|
|
3256
|
-
return
|
|
3676
|
+
return o("div", {
|
|
3257
3677
|
class: "bio-properties-panel-checkbox",
|
|
3258
|
-
children: [
|
|
3678
|
+
children: [o("input", {
|
|
3259
3679
|
ref: ref,
|
|
3260
3680
|
id: prefixId$4(id),
|
|
3261
3681
|
name: id,
|
|
@@ -3266,10 +3686,10 @@ function Checkbox(props) {
|
|
|
3266
3686
|
onChange: handleChange,
|
|
3267
3687
|
checked: localValue,
|
|
3268
3688
|
disabled: disabled
|
|
3269
|
-
}),
|
|
3689
|
+
}), o("label", {
|
|
3270
3690
|
for: prefixId$4(id),
|
|
3271
3691
|
class: "bio-properties-panel-label",
|
|
3272
|
-
children:
|
|
3692
|
+
children: o(TooltipWrapper, {
|
|
3273
3693
|
value: tooltip,
|
|
3274
3694
|
forId: id,
|
|
3275
3695
|
element: props.element,
|
|
@@ -3307,10 +3727,10 @@ function CheckboxEntry(props) {
|
|
|
3307
3727
|
} = props;
|
|
3308
3728
|
const value = getValue(element);
|
|
3309
3729
|
const error = useError(id);
|
|
3310
|
-
return
|
|
3730
|
+
return o("div", {
|
|
3311
3731
|
class: "bio-properties-panel-entry bio-properties-panel-checkbox-entry",
|
|
3312
3732
|
"data-entry-id": id,
|
|
3313
|
-
children: [
|
|
3733
|
+
children: [o(Checkbox, {
|
|
3314
3734
|
disabled: disabled,
|
|
3315
3735
|
id: id,
|
|
3316
3736
|
label: label,
|
|
@@ -3320,10 +3740,10 @@ function CheckboxEntry(props) {
|
|
|
3320
3740
|
value: value,
|
|
3321
3741
|
tooltip: tooltip,
|
|
3322
3742
|
element: element
|
|
3323
|
-
}, element), error &&
|
|
3743
|
+
}, element), error && o("div", {
|
|
3324
3744
|
class: "bio-properties-panel-error",
|
|
3325
3745
|
children: error
|
|
3326
|
-
}),
|
|
3746
|
+
}), o(Description, {
|
|
3327
3747
|
forId: id,
|
|
3328
3748
|
element: element,
|
|
3329
3749
|
value: description
|
|
@@ -3370,10 +3790,10 @@ function TemplatingEntry(props) {
|
|
|
3370
3790
|
validate,
|
|
3371
3791
|
show = noop
|
|
3372
3792
|
} = props;
|
|
3373
|
-
const [validationError, setValidationError] =
|
|
3374
|
-
const [localError, setLocalError] =
|
|
3793
|
+
const [validationError, setValidationError] = h(null);
|
|
3794
|
+
const [localError, setLocalError] = h(null);
|
|
3375
3795
|
let value = getValue(element);
|
|
3376
|
-
|
|
3796
|
+
p(() => {
|
|
3377
3797
|
if (isFunction(validate)) {
|
|
3378
3798
|
const newValidationError = validate(value) || null;
|
|
3379
3799
|
setValidationError(newValidationError);
|
|
@@ -3391,15 +3811,15 @@ function TemplatingEntry(props) {
|
|
|
3391
3811
|
}
|
|
3392
3812
|
setValidationError(newValidationError);
|
|
3393
3813
|
});
|
|
3394
|
-
const onError =
|
|
3814
|
+
const onError = T$1(err => {
|
|
3395
3815
|
setLocalError(err);
|
|
3396
3816
|
}, []);
|
|
3397
3817
|
const temporaryError = useError(id);
|
|
3398
3818
|
const error = localError || temporaryError || validationError;
|
|
3399
|
-
return
|
|
3819
|
+
return o("div", {
|
|
3400
3820
|
class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
3401
3821
|
"data-entry-id": id,
|
|
3402
|
-
children: [
|
|
3822
|
+
children: [o(Templating, {
|
|
3403
3823
|
debounce: debounce,
|
|
3404
3824
|
disabled: disabled,
|
|
3405
3825
|
id: id,
|
|
@@ -3409,10 +3829,10 @@ function TemplatingEntry(props) {
|
|
|
3409
3829
|
show: show,
|
|
3410
3830
|
value: value,
|
|
3411
3831
|
tooltipContainer: tooltipContainer
|
|
3412
|
-
}, element), error &&
|
|
3832
|
+
}, element), error && o("div", {
|
|
3413
3833
|
class: "bio-properties-panel-error",
|
|
3414
3834
|
children: error
|
|
3415
|
-
}),
|
|
3835
|
+
}), o(Description, {
|
|
3416
3836
|
forId: id,
|
|
3417
3837
|
element: element,
|
|
3418
3838
|
value: description
|
|
@@ -3430,10 +3850,10 @@ function Templating(props) {
|
|
|
3430
3850
|
disabled = false,
|
|
3431
3851
|
tooltipContainer
|
|
3432
3852
|
} = props;
|
|
3433
|
-
const [localValue, setLocalValue] =
|
|
3853
|
+
const [localValue, setLocalValue] = h(value);
|
|
3434
3854
|
const editorRef = useShowEntryEvent(id);
|
|
3435
|
-
const containerRef =
|
|
3436
|
-
const [focus, _setFocus] =
|
|
3855
|
+
const containerRef = _$1();
|
|
3856
|
+
const [focus, _setFocus] = h(undefined);
|
|
3437
3857
|
const setFocus = (offset = 0) => {
|
|
3438
3858
|
const hasFocus = containerRef.current.contains(document.activeElement);
|
|
3439
3859
|
|
|
@@ -3441,7 +3861,7 @@ function Templating(props) {
|
|
|
3441
3861
|
const position = hasFocus ? document.activeElement.selectionStart : Infinity;
|
|
3442
3862
|
_setFocus(position + offset);
|
|
3443
3863
|
};
|
|
3444
|
-
const handleInputCallback =
|
|
3864
|
+
const handleInputCallback = F$1(() => {
|
|
3445
3865
|
return debounce(newValue => onInput(newValue.length ? newValue : undefined));
|
|
3446
3866
|
}, [onInput, debounce]);
|
|
3447
3867
|
const handleInput = newValue => {
|
|
@@ -3458,29 +3878,29 @@ function Templating(props) {
|
|
|
3458
3878
|
const message = `${error.source}: ${error.message}`;
|
|
3459
3879
|
onError(message);
|
|
3460
3880
|
});
|
|
3461
|
-
|
|
3881
|
+
p(() => {
|
|
3462
3882
|
if (typeof focus !== 'undefined') {
|
|
3463
3883
|
editorRef.current.focus(focus);
|
|
3464
3884
|
_setFocus(undefined);
|
|
3465
3885
|
}
|
|
3466
3886
|
}, [focus]);
|
|
3467
|
-
|
|
3887
|
+
p(() => {
|
|
3468
3888
|
if (value === localValue) {
|
|
3469
3889
|
return;
|
|
3470
3890
|
}
|
|
3471
3891
|
setLocalValue(value ? value : '');
|
|
3472
3892
|
}, [value]);
|
|
3473
|
-
return
|
|
3893
|
+
return o("div", {
|
|
3474
3894
|
class: "bio-properties-panel-feelers",
|
|
3475
|
-
children: [
|
|
3895
|
+
children: [o("label", {
|
|
3476
3896
|
id: prefixIdLabel(id),
|
|
3477
3897
|
class: "bio-properties-panel-label",
|
|
3478
3898
|
onClick: () => setFocus(),
|
|
3479
3899
|
children: label
|
|
3480
|
-
}),
|
|
3900
|
+
}), o("div", {
|
|
3481
3901
|
class: "bio-properties-panel-feelers-input",
|
|
3482
3902
|
ref: containerRef,
|
|
3483
|
-
children:
|
|
3903
|
+
children: o(CodeEditor$1, {
|
|
3484
3904
|
name: id,
|
|
3485
3905
|
onInput: handleInput,
|
|
3486
3906
|
contentAttributes: {
|
|
@@ -3519,7 +3939,7 @@ function List(props) {
|
|
|
3519
3939
|
compareFn,
|
|
3520
3940
|
...restProps
|
|
3521
3941
|
} = props;
|
|
3522
|
-
const [open, setOpen] =
|
|
3942
|
+
const [open, setOpen] = h(!!shouldOpen);
|
|
3523
3943
|
const hasItems = !!items.length;
|
|
3524
3944
|
const toggleOpen = () => hasItems && setOpen(!open);
|
|
3525
3945
|
const opening = !usePrevious(open) && open;
|
|
@@ -3527,7 +3947,7 @@ function List(props) {
|
|
|
3527
3947
|
const shouldReset = opening || elementChanged;
|
|
3528
3948
|
const sortedItems = useSortedItems(items, compareFn, shouldReset);
|
|
3529
3949
|
const newItems = useNewItems(items, elementChanged);
|
|
3530
|
-
|
|
3950
|
+
p(() => {
|
|
3531
3951
|
if (open && !hasItems) {
|
|
3532
3952
|
setOpen(false);
|
|
3533
3953
|
}
|
|
@@ -3543,39 +3963,39 @@ function List(props) {
|
|
|
3543
3963
|
setOpen(true);
|
|
3544
3964
|
}
|
|
3545
3965
|
}
|
|
3546
|
-
return
|
|
3966
|
+
return o("div", {
|
|
3547
3967
|
"data-entry-id": id,
|
|
3548
3968
|
class: classnames('bio-properties-panel-entry', 'bio-properties-panel-list-entry', hasItems ? '' : 'empty', open ? 'open' : ''),
|
|
3549
|
-
children: [
|
|
3969
|
+
children: [o("div", {
|
|
3550
3970
|
class: "bio-properties-panel-list-entry-header",
|
|
3551
3971
|
onClick: toggleOpen,
|
|
3552
|
-
children: [
|
|
3972
|
+
children: [o("div", {
|
|
3553
3973
|
title: label,
|
|
3554
3974
|
class: classnames('bio-properties-panel-list-entry-header-title', open && 'open'),
|
|
3555
3975
|
children: label
|
|
3556
|
-
}),
|
|
3976
|
+
}), o("div", {
|
|
3557
3977
|
class: "bio-properties-panel-list-entry-header-buttons",
|
|
3558
|
-
children: [
|
|
3978
|
+
children: [o("button", {
|
|
3559
3979
|
title: "Create new list item",
|
|
3560
3980
|
onClick: addItem,
|
|
3561
3981
|
class: "bio-properties-panel-add-entry",
|
|
3562
|
-
children: [
|
|
3982
|
+
children: [o(CreateIcon, {}), !hasItems ? o("span", {
|
|
3563
3983
|
class: "bio-properties-panel-add-entry-label",
|
|
3564
3984
|
children: "Create"
|
|
3565
3985
|
}) : null]
|
|
3566
|
-
}), hasItems &&
|
|
3986
|
+
}), hasItems && o("div", {
|
|
3567
3987
|
title: `List contains ${items.length} item${items.length != 1 ? 's' : ''}`,
|
|
3568
3988
|
class: "bio-properties-panel-list-badge",
|
|
3569
3989
|
children: items.length
|
|
3570
|
-
}), hasItems &&
|
|
3990
|
+
}), hasItems && o("button", {
|
|
3571
3991
|
title: "Toggle list item",
|
|
3572
3992
|
class: "bio-properties-panel-arrow",
|
|
3573
|
-
children:
|
|
3993
|
+
children: o(ArrowIcon, {
|
|
3574
3994
|
class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
|
|
3575
3995
|
})
|
|
3576
3996
|
})]
|
|
3577
3997
|
})]
|
|
3578
|
-
}), hasItems &&
|
|
3998
|
+
}), hasItems && o(ItemsList, {
|
|
3579
3999
|
...restProps,
|
|
3580
4000
|
autoFocusEntry: autoFocusEntry,
|
|
3581
4001
|
component: component,
|
|
@@ -3602,7 +4022,7 @@ function ItemsList(props) {
|
|
|
3602
4022
|
} = props;
|
|
3603
4023
|
const getKey = useKeyFactory();
|
|
3604
4024
|
const newItem = newItems[0];
|
|
3605
|
-
|
|
4025
|
+
p(() => {
|
|
3606
4026
|
if (newItem && autoFocusEntry) {
|
|
3607
4027
|
// (0) select the parent entry (containing all list items)
|
|
3608
4028
|
const entry = query(`[data-entry-id="${id}"]`);
|
|
@@ -3621,25 +4041,25 @@ function ItemsList(props) {
|
|
|
3621
4041
|
}
|
|
3622
4042
|
}
|
|
3623
4043
|
}, [newItem, autoFocusEntry, id]);
|
|
3624
|
-
return
|
|
4044
|
+
return o("ol", {
|
|
3625
4045
|
class: classnames('bio-properties-panel-list-entry-items', open ? 'open' : ''),
|
|
3626
4046
|
children: items.map((item, index) => {
|
|
3627
4047
|
const key = getKey(item);
|
|
3628
|
-
return
|
|
4048
|
+
return o("li", {
|
|
3629
4049
|
class: "bio-properties-panel-list-entry-item",
|
|
3630
|
-
children: [
|
|
4050
|
+
children: [o(Component, {
|
|
3631
4051
|
...restProps,
|
|
3632
4052
|
element: element,
|
|
3633
4053
|
id: id,
|
|
3634
4054
|
index: index,
|
|
3635
4055
|
item: item,
|
|
3636
4056
|
open: item === newItem
|
|
3637
|
-
}), onRemove &&
|
|
4057
|
+
}), onRemove && o("button", {
|
|
3638
4058
|
type: "button",
|
|
3639
4059
|
title: "Delete item",
|
|
3640
4060
|
class: "bio-properties-panel-remove-entry bio-properties-panel-remove-list-entry",
|
|
3641
4061
|
onClick: () => onRemove && onRemove(item),
|
|
3642
|
-
children:
|
|
4062
|
+
children: o(DeleteIcon, {})
|
|
3643
4063
|
})]
|
|
3644
4064
|
}, key);
|
|
3645
4065
|
})
|
|
@@ -3656,7 +4076,7 @@ function ItemsList(props) {
|
|
|
3656
4076
|
* @returns {Item[]}
|
|
3657
4077
|
*/
|
|
3658
4078
|
function useSortedItems(currentItems, compareFn, shouldReset = false) {
|
|
3659
|
-
const itemsRef =
|
|
4079
|
+
const itemsRef = _$1(currentItems.slice());
|
|
3660
4080
|
|
|
3661
4081
|
// (1) Reset and optionally sort.
|
|
3662
4082
|
if (shouldReset) {
|
|
@@ -3701,7 +4121,7 @@ function Select(props) {
|
|
|
3701
4121
|
tooltip
|
|
3702
4122
|
} = props;
|
|
3703
4123
|
const ref = useShowEntryEvent(id);
|
|
3704
|
-
const [localValue, setLocalValue] =
|
|
4124
|
+
const [localValue, setLocalValue] = h(value);
|
|
3705
4125
|
const handleChangeCallback = ({
|
|
3706
4126
|
target
|
|
3707
4127
|
}) => {
|
|
@@ -3711,24 +4131,24 @@ function Select(props) {
|
|
|
3711
4131
|
handleChangeCallback(e);
|
|
3712
4132
|
setLocalValue(e.target.value);
|
|
3713
4133
|
};
|
|
3714
|
-
|
|
4134
|
+
p(() => {
|
|
3715
4135
|
if (value === localValue) {
|
|
3716
4136
|
return;
|
|
3717
4137
|
}
|
|
3718
4138
|
setLocalValue(value);
|
|
3719
4139
|
}, [value]);
|
|
3720
|
-
return
|
|
4140
|
+
return o("div", {
|
|
3721
4141
|
class: "bio-properties-panel-select",
|
|
3722
|
-
children: [
|
|
4142
|
+
children: [o("label", {
|
|
3723
4143
|
for: prefixId$3(id),
|
|
3724
4144
|
class: "bio-properties-panel-label",
|
|
3725
|
-
children:
|
|
4145
|
+
children: o(TooltipWrapper, {
|
|
3726
4146
|
value: tooltip,
|
|
3727
4147
|
forId: id,
|
|
3728
4148
|
element: props.element,
|
|
3729
4149
|
children: label
|
|
3730
4150
|
})
|
|
3731
|
-
}),
|
|
4151
|
+
}), o("select", {
|
|
3732
4152
|
ref: ref,
|
|
3733
4153
|
id: prefixId$3(id),
|
|
3734
4154
|
name: id,
|
|
@@ -3740,16 +4160,16 @@ function Select(props) {
|
|
|
3740
4160
|
disabled: disabled,
|
|
3741
4161
|
children: options.map((option, idx) => {
|
|
3742
4162
|
if (option.children) {
|
|
3743
|
-
return
|
|
4163
|
+
return o("optgroup", {
|
|
3744
4164
|
label: option.label,
|
|
3745
|
-
children: option.children.map((child, idx) =>
|
|
4165
|
+
children: option.children.map((child, idx) => o("option", {
|
|
3746
4166
|
value: child.value,
|
|
3747
4167
|
disabled: child.disabled,
|
|
3748
4168
|
children: child.label
|
|
3749
4169
|
}, idx))
|
|
3750
4170
|
}, idx);
|
|
3751
4171
|
}
|
|
3752
|
-
return
|
|
4172
|
+
return o("option", {
|
|
3753
4173
|
value: option.value,
|
|
3754
4174
|
disabled: option.disabled,
|
|
3755
4175
|
children: option.label
|
|
@@ -3791,9 +4211,9 @@ function SelectEntry(props) {
|
|
|
3791
4211
|
} = props;
|
|
3792
4212
|
const options = getOptions(element);
|
|
3793
4213
|
const globalError = useError(id);
|
|
3794
|
-
const [localError, setLocalError] =
|
|
4214
|
+
const [localError, setLocalError] = h(null);
|
|
3795
4215
|
let value = getValue(element);
|
|
3796
|
-
|
|
4216
|
+
p(() => {
|
|
3797
4217
|
if (isFunction(validate)) {
|
|
3798
4218
|
const newValidationError = validate(value) || null;
|
|
3799
4219
|
setLocalError(newValidationError);
|
|
@@ -3808,10 +4228,10 @@ function SelectEntry(props) {
|
|
|
3808
4228
|
setLocalError(newValidationError);
|
|
3809
4229
|
};
|
|
3810
4230
|
const error = globalError || localError;
|
|
3811
|
-
return
|
|
4231
|
+
return o("div", {
|
|
3812
4232
|
class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
3813
4233
|
"data-entry-id": id,
|
|
3814
|
-
children: [
|
|
4234
|
+
children: [o(Select, {
|
|
3815
4235
|
id: id,
|
|
3816
4236
|
label: label,
|
|
3817
4237
|
value: value,
|
|
@@ -3822,10 +4242,10 @@ function SelectEntry(props) {
|
|
|
3822
4242
|
disabled: disabled,
|
|
3823
4243
|
tooltip: tooltip,
|
|
3824
4244
|
element: element
|
|
3825
|
-
}, element), error &&
|
|
4245
|
+
}, element), error && o("div", {
|
|
3826
4246
|
class: "bio-properties-panel-error",
|
|
3827
4247
|
children: error
|
|
3828
|
-
}),
|
|
4248
|
+
}), o(Description, {
|
|
3829
4249
|
forId: id,
|
|
3830
4250
|
element: element,
|
|
3831
4251
|
value: description
|
|
@@ -3854,8 +4274,8 @@ function Simple(props) {
|
|
|
3854
4274
|
setValue
|
|
3855
4275
|
} = props;
|
|
3856
4276
|
const value = getValue(element);
|
|
3857
|
-
const [localValue, setLocalValue] =
|
|
3858
|
-
const handleInputCallback =
|
|
4277
|
+
const [localValue, setLocalValue] = h(value);
|
|
4278
|
+
const handleInputCallback = F$1(() => {
|
|
3859
4279
|
return debounce(({
|
|
3860
4280
|
target
|
|
3861
4281
|
}) => setValue(target.value.length ? target.value : undefined));
|
|
@@ -3864,15 +4284,15 @@ function Simple(props) {
|
|
|
3864
4284
|
handleInputCallback(e);
|
|
3865
4285
|
setLocalValue(e.target.value);
|
|
3866
4286
|
};
|
|
3867
|
-
|
|
4287
|
+
p(() => {
|
|
3868
4288
|
if (value === localValue) {
|
|
3869
4289
|
return;
|
|
3870
4290
|
}
|
|
3871
4291
|
setLocalValue(value);
|
|
3872
4292
|
}, [value]);
|
|
3873
|
-
return
|
|
4293
|
+
return o("div", {
|
|
3874
4294
|
class: "bio-properties-panel-simple",
|
|
3875
|
-
children:
|
|
4295
|
+
children: o("input", {
|
|
3876
4296
|
id: prefixId$2(id),
|
|
3877
4297
|
type: "text",
|
|
3878
4298
|
name: id,
|
|
@@ -3920,9 +4340,9 @@ function TextArea(props) {
|
|
|
3920
4340
|
rows = autoResize ? 1 : 2,
|
|
3921
4341
|
tooltip
|
|
3922
4342
|
} = props;
|
|
3923
|
-
const [localValue, setLocalValue] =
|
|
4343
|
+
const [localValue, setLocalValue] = h(value);
|
|
3924
4344
|
const ref = useShowEntryEvent(id);
|
|
3925
|
-
const handleInputCallback =
|
|
4345
|
+
const handleInputCallback = F$1(() => {
|
|
3926
4346
|
return debounce(({
|
|
3927
4347
|
target
|
|
3928
4348
|
}) => onInput(target.value.length ? target.value : undefined));
|
|
@@ -3932,27 +4352,27 @@ function TextArea(props) {
|
|
|
3932
4352
|
autoResize && resizeToContents(e.target);
|
|
3933
4353
|
setLocalValue(e.target.value);
|
|
3934
4354
|
};
|
|
3935
|
-
|
|
4355
|
+
y(() => {
|
|
3936
4356
|
autoResize && resizeToContents(ref.current);
|
|
3937
4357
|
}, []);
|
|
3938
|
-
|
|
4358
|
+
p(() => {
|
|
3939
4359
|
if (value === localValue) {
|
|
3940
4360
|
return;
|
|
3941
4361
|
}
|
|
3942
4362
|
setLocalValue(value);
|
|
3943
4363
|
}, [value]);
|
|
3944
|
-
return
|
|
4364
|
+
return o("div", {
|
|
3945
4365
|
class: "bio-properties-panel-textarea",
|
|
3946
|
-
children: [
|
|
4366
|
+
children: [o("label", {
|
|
3947
4367
|
for: prefixId$1(id),
|
|
3948
4368
|
class: "bio-properties-panel-label",
|
|
3949
|
-
children:
|
|
4369
|
+
children: o(TooltipWrapper, {
|
|
3950
4370
|
value: tooltip,
|
|
3951
4371
|
forId: id,
|
|
3952
4372
|
element: props.element,
|
|
3953
4373
|
children: label
|
|
3954
4374
|
})
|
|
3955
|
-
}),
|
|
4375
|
+
}), o("textarea", {
|
|
3956
4376
|
ref: ref,
|
|
3957
4377
|
id: prefixId$1(id),
|
|
3958
4378
|
name: id,
|
|
@@ -4004,9 +4424,9 @@ function TextAreaEntry(props) {
|
|
|
4004
4424
|
tooltip
|
|
4005
4425
|
} = props;
|
|
4006
4426
|
const globalError = useError(id);
|
|
4007
|
-
const [localError, setLocalError] =
|
|
4427
|
+
const [localError, setLocalError] = h(null);
|
|
4008
4428
|
let value = getValue(element);
|
|
4009
|
-
|
|
4429
|
+
p(() => {
|
|
4010
4430
|
if (isFunction(validate)) {
|
|
4011
4431
|
const newValidationError = validate(value) || null;
|
|
4012
4432
|
setLocalError(newValidationError);
|
|
@@ -4021,10 +4441,10 @@ function TextAreaEntry(props) {
|
|
|
4021
4441
|
setLocalError(newValidationError);
|
|
4022
4442
|
};
|
|
4023
4443
|
const error = globalError || localError;
|
|
4024
|
-
return
|
|
4444
|
+
return o("div", {
|
|
4025
4445
|
class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
4026
4446
|
"data-entry-id": id,
|
|
4027
|
-
children: [
|
|
4447
|
+
children: [o(TextArea, {
|
|
4028
4448
|
id: id,
|
|
4029
4449
|
label: label,
|
|
4030
4450
|
value: value,
|
|
@@ -4038,10 +4458,10 @@ function TextAreaEntry(props) {
|
|
|
4038
4458
|
autoResize: autoResize,
|
|
4039
4459
|
tooltip: tooltip,
|
|
4040
4460
|
element: element
|
|
4041
|
-
}, element), error &&
|
|
4461
|
+
}, element), error && o("div", {
|
|
4042
4462
|
class: "bio-properties-panel-error",
|
|
4043
4463
|
children: error
|
|
4044
|
-
}),
|
|
4464
|
+
}), o(Description, {
|
|
4045
4465
|
forId: id,
|
|
4046
4466
|
element: element,
|
|
4047
4467
|
value: description
|
|
@@ -4070,9 +4490,9 @@ function Textfield(props) {
|
|
|
4070
4490
|
value = '',
|
|
4071
4491
|
tooltip
|
|
4072
4492
|
} = props;
|
|
4073
|
-
const [localValue, setLocalValue] =
|
|
4493
|
+
const [localValue, setLocalValue] = h(value || '');
|
|
4074
4494
|
const ref = useShowEntryEvent(id);
|
|
4075
|
-
const handleInputCallback =
|
|
4495
|
+
const handleInputCallback = F$1(() => {
|
|
4076
4496
|
return debounce(({
|
|
4077
4497
|
target
|
|
4078
4498
|
}) => onInput(target.value.length ? target.value : undefined));
|
|
@@ -4081,24 +4501,24 @@ function Textfield(props) {
|
|
|
4081
4501
|
handleInputCallback(e);
|
|
4082
4502
|
setLocalValue(e.target.value);
|
|
4083
4503
|
};
|
|
4084
|
-
|
|
4504
|
+
p(() => {
|
|
4085
4505
|
if (value === localValue) {
|
|
4086
4506
|
return;
|
|
4087
4507
|
}
|
|
4088
4508
|
setLocalValue(value);
|
|
4089
4509
|
}, [value]);
|
|
4090
|
-
return
|
|
4510
|
+
return o("div", {
|
|
4091
4511
|
class: "bio-properties-panel-textfield",
|
|
4092
|
-
children: [
|
|
4512
|
+
children: [o("label", {
|
|
4093
4513
|
for: prefixId(id),
|
|
4094
4514
|
class: "bio-properties-panel-label",
|
|
4095
|
-
children:
|
|
4515
|
+
children: o(TooltipWrapper, {
|
|
4096
4516
|
value: tooltip,
|
|
4097
4517
|
forId: id,
|
|
4098
4518
|
element: props.element,
|
|
4099
4519
|
children: label
|
|
4100
4520
|
})
|
|
4101
|
-
}),
|
|
4521
|
+
}), o("input", {
|
|
4102
4522
|
ref: ref,
|
|
4103
4523
|
id: prefixId(id),
|
|
4104
4524
|
type: "text",
|
|
@@ -4146,9 +4566,9 @@ function TextfieldEntry(props) {
|
|
|
4146
4566
|
tooltip
|
|
4147
4567
|
} = props;
|
|
4148
4568
|
const globalError = useError(id);
|
|
4149
|
-
const [localError, setLocalError] =
|
|
4569
|
+
const [localError, setLocalError] = h(null);
|
|
4150
4570
|
let value = getValue(element);
|
|
4151
|
-
|
|
4571
|
+
p(() => {
|
|
4152
4572
|
if (isFunction(validate)) {
|
|
4153
4573
|
const newValidationError = validate(value) || null;
|
|
4154
4574
|
setLocalError(newValidationError);
|
|
@@ -4163,10 +4583,10 @@ function TextfieldEntry(props) {
|
|
|
4163
4583
|
setLocalError(newValidationError);
|
|
4164
4584
|
};
|
|
4165
4585
|
const error = globalError || localError;
|
|
4166
|
-
return
|
|
4586
|
+
return o("div", {
|
|
4167
4587
|
class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
4168
4588
|
"data-entry-id": id,
|
|
4169
|
-
children: [
|
|
4589
|
+
children: [o(Textfield, {
|
|
4170
4590
|
debounce: debounce,
|
|
4171
4591
|
disabled: disabled,
|
|
4172
4592
|
id: id,
|
|
@@ -4177,10 +4597,10 @@ function TextfieldEntry(props) {
|
|
|
4177
4597
|
value: value,
|
|
4178
4598
|
tooltip: tooltip,
|
|
4179
4599
|
element: element
|
|
4180
|
-
}, element), error &&
|
|
4600
|
+
}, element), error && o("div", {
|
|
4181
4601
|
class: "bio-properties-panel-error",
|
|
4182
4602
|
children: error
|
|
4183
|
-
}),
|
|
4603
|
+
}), o(Description, {
|
|
4184
4604
|
forId: id,
|
|
4185
4605
|
element: element,
|
|
4186
4606
|
value: description
|