@bpmn-io/form-js-playground 1.14.0 → 1.14.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-playground.umd.js +932 -930
- package/dist/index.cjs +111 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +111 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +6 -6
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
r,
|
|
31
31
|
f = {};
|
|
32
32
|
for (r in u) "key" == r ? t = u[r] : "ref" == r ? o = u[r] : f[r] = u[r];
|
|
33
|
-
if (arguments.length > 2 && (f.children = arguments.length > 3 ? n$1.call(arguments, 2) : i), "function" == typeof l && null != l.defaultProps) for (r in l.defaultProps)
|
|
33
|
+
if (arguments.length > 2 && (f.children = arguments.length > 3 ? n$1.call(arguments, 2) : i), "function" == typeof l && null != l.defaultProps) for (r in l.defaultProps) void 0 === f[r] && (f[r] = l.defaultProps[r]);
|
|
34
34
|
return d$1(l, f, t, o, null);
|
|
35
35
|
}
|
|
36
36
|
function d$1(n, i, t, o, r) {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
__: null,
|
|
44
44
|
__b: 0,
|
|
45
45
|
__e: null,
|
|
46
|
-
__d:
|
|
46
|
+
__d: void 0,
|
|
47
47
|
__c: null,
|
|
48
48
|
__h: null,
|
|
49
|
-
constructor:
|
|
49
|
+
constructor: void 0,
|
|
50
50
|
__v: null == r ? ++u$1 : r
|
|
51
51
|
};
|
|
52
52
|
return null == r && null != l$2.vnode && l$2.vnode(f), f;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
function x() {
|
|
79
79
|
var n, l, u, i, o, r, e, c;
|
|
80
|
-
for (t$2.sort(f$1); n = t$2.shift();) n.__d && (l = t$2.length, i =
|
|
80
|
+
for (t$2.sort(f$1); n = t$2.shift();) n.__d && (l = t$2.length, i = void 0, o = void 0, e = (r = (u = n).__v).__e, (c = u.__P) && (i = [], (o = h$1({}, r)).__v = r.__v + 1, L$2(c, r, o, u.__n, void 0 !== c.ownerSVGElement, null != r.__h ? [e] : null, i, null == e ? g$2(r) : e, r.__h), M$1(i, r), r.__e != e && m$1(r)), t$2.length > l && t$2.sort(f$1));
|
|
81
81
|
x.__r = 0;
|
|
82
82
|
}
|
|
83
83
|
function P$3(n, l, u, i, t, o, r, f, e, a) {
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
for (u.__k = [], h = 0; h < l.length; h++) if (null != (_ = u.__k[h] = null == (_ = l[h]) || "boolean" == typeof _ || "function" == typeof _ ? null : "string" == typeof _ || "number" == typeof _ || "bigint" == typeof _ ? d$1(null, _, null, null, _) : v$2(_) ? d$1(k$2, {
|
|
94
94
|
children: _
|
|
95
95
|
}, null, null, null) : _.__b > 0 ? d$1(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _)) {
|
|
96
|
-
if (_.__ = u, _.__b = u.__b + 1, null === (y = x[h]) || y && _.key == y.key && _.type === y.type) x[h] =
|
|
96
|
+
if (_.__ = u, _.__b = u.__b + 1, null === (y = x[h]) || y && _.key == y.key && _.type === y.type) x[h] = void 0;else for (p = 0; p < P; p++) {
|
|
97
97
|
if ((y = x[p]) && _.key == y.key && _.type === y.type) {
|
|
98
|
-
x[p] =
|
|
98
|
+
x[p] = void 0;
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
y = null;
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
}
|
|
117
117
|
function $$1(n, l, u, i, t, o) {
|
|
118
118
|
var r, f, e;
|
|
119
|
-
if (
|
|
119
|
+
if (void 0 !== l.__d) r = l.__d, l.__d = void 0;else if (null == u || t != o || null == t.parentNode) n: if (null == o || o.parentNode !== n) n.appendChild(t), r = null;else {
|
|
120
120
|
for (f = o, e = 0; (f = f.nextSibling) && e < i.length; e += 1) if (f == t) break n;
|
|
121
121
|
n.insertBefore(t, o), r = o;
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return void 0 !== r ? r : t.nextSibling;
|
|
124
124
|
}
|
|
125
125
|
function A(n) {
|
|
126
126
|
var l, u, i;
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
A,
|
|
175
175
|
H,
|
|
176
176
|
I = u.type;
|
|
177
|
-
if (
|
|
177
|
+
if (void 0 !== u.constructor) return null;
|
|
178
178
|
null != i.__h && (c = i.__h, e = u.__e = i.__e, u.__h = null, r = [e]), (s = l$2.__b) && s(u);
|
|
179
179
|
try {
|
|
180
180
|
n: if ("function" == typeof I) {
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
(h || a) && (h && (a && h.__html == a.__html || h.__html === l.innerHTML) || (l.innerHTML = h && h.__html || ""));
|
|
237
237
|
}
|
|
238
238
|
if (H$1(l, d, y, o, e), h) u.__k = [];else if (P$3(l, v$2(k = u.props.children) ? k : [k], u, i, t, o && "foreignObject" !== _, r, f, r ? r[0] : i.__k && g$2(i, 0), e), null != r) for (k = r.length; k--;) null != r[k] && p$1(r[k]);
|
|
239
|
-
e || ("value" in d &&
|
|
239
|
+
e || ("value" in d && void 0 !== (k = d.value) && (k !== l.value || "progress" === _ && !k || "option" === _ && k !== y.value) && T$3(l, "value", k, y.value, false), "checked" in d && void 0 !== (k = d.checked) && k !== l.checked && T$3(l, "checked", k, y.checked, false));
|
|
240
240
|
}
|
|
241
241
|
return l;
|
|
242
242
|
}
|
|
@@ -255,17 +255,17 @@
|
|
|
255
255
|
} catch (n) {
|
|
256
256
|
l$2.__e(n, u);
|
|
257
257
|
}
|
|
258
|
-
t.base = t.__P = null, n.__c =
|
|
258
|
+
t.base = t.__P = null, n.__c = void 0;
|
|
259
259
|
}
|
|
260
260
|
if (t = n.__k) for (o = 0; o < t.length; o++) t[o] && q$2(t[o], u, i || "function" != typeof n.type);
|
|
261
|
-
i || null == n.__e || p$1(n.__e), n.__ = n.__e = n.__d =
|
|
261
|
+
i || null == n.__e || p$1(n.__e), n.__ = n.__e = n.__d = void 0;
|
|
262
262
|
}
|
|
263
263
|
function B$2(n, l, u) {
|
|
264
264
|
return this.constructor(n, u);
|
|
265
265
|
}
|
|
266
266
|
function D$1(u, i, t) {
|
|
267
267
|
var o, r, f;
|
|
268
|
-
l$2.__ && l$2.__(u, i), r = (o = "function" == "undefined") ? null : i.__k, f = [], L$2(i, u = (i).__k = y$1(k$2, null, [u]), r || c$1, c$1,
|
|
268
|
+
l$2.__ && l$2.__(u, i), r = (o = "function" == "undefined") ? null : i.__k, f = [], L$2(i, u = (i).__k = y$1(k$2, null, [u]), r || c$1, c$1, void 0 !== i.ownerSVGElement, r ? null : i.firstChild ? n$1.call(i.childNodes) : null, f, r ? r.__e : i.firstChild, o), M$1(f, u);
|
|
269
269
|
}
|
|
270
270
|
function G(n, l) {
|
|
271
271
|
var u = {
|
|
@@ -824,7 +824,7 @@
|
|
|
824
824
|
}
|
|
825
825
|
function s$1(n, u, i) {
|
|
826
826
|
var o = d(t$1++, 2);
|
|
827
|
-
if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B$1(
|
|
827
|
+
if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B$1(void 0, u), function (n) {
|
|
828
828
|
var t = o.__N ? o.__N[0] : o.__[0],
|
|
829
829
|
r = o.t(t, n);
|
|
830
830
|
t !== r && (o.__N = [r, o.__[1]], o.__c.setState({}));
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
return u.forEach(function (n) {
|
|
842
842
|
if (n.__N) {
|
|
843
843
|
var t = n.__[0];
|
|
844
|
-
n.__ = n.__N, n.__N =
|
|
844
|
+
n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = true);
|
|
845
845
|
}
|
|
846
846
|
}), !(!i && o.__c.props === n) && (!c || c.call(this, n, t, r));
|
|
847
847
|
};
|
|
@@ -851,7 +851,7 @@
|
|
|
851
851
|
r.componentWillUpdate = function (n, t, r) {
|
|
852
852
|
if (this.__e) {
|
|
853
853
|
var u = c;
|
|
854
|
-
c =
|
|
854
|
+
c = void 0, f(n, t, r), c = u;
|
|
855
855
|
}
|
|
856
856
|
e && e.call(this, n, t, r);
|
|
857
857
|
}, r.shouldComponentUpdate = f;
|
|
@@ -900,13 +900,13 @@
|
|
|
900
900
|
a && a(n), t$1 = 0;
|
|
901
901
|
var i = (r = n.__c).__H;
|
|
902
902
|
i && (u === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) {
|
|
903
|
-
n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i =
|
|
903
|
+
n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i = void 0;
|
|
904
904
|
})) : (i.__h.forEach(k$1), i.__h.forEach(w$1), i.__h = [], t$1 = 0)), u = r;
|
|
905
905
|
}, l$2.diffed = function (t) {
|
|
906
906
|
v$1 && v$1(t);
|
|
907
907
|
var o = t.__c;
|
|
908
908
|
o && o.__H && (o.__H.__h.length && (1 !== f.push(o) && i$1 === l$2.requestAnimationFrame || ((i$1 = l$2.requestAnimationFrame) || j$1)(b)), o.__H.__.forEach(function (n) {
|
|
909
|
-
n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i =
|
|
909
|
+
n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c;
|
|
910
910
|
})), u = r = null;
|
|
911
911
|
}, l$2.__c = function (t, r) {
|
|
912
912
|
r.some(function (t) {
|
|
@@ -930,7 +930,7 @@
|
|
|
930
930
|
} catch (n) {
|
|
931
931
|
r = n;
|
|
932
932
|
}
|
|
933
|
-
}), u.__H =
|
|
933
|
+
}), u.__H = void 0, r && l$2.__e(r, u.__v));
|
|
934
934
|
};
|
|
935
935
|
var g$1 = "function" == typeof requestAnimationFrame;
|
|
936
936
|
function j$1(n) {
|
|
@@ -944,7 +944,7 @@
|
|
|
944
944
|
function k$1(n) {
|
|
945
945
|
var t = r,
|
|
946
946
|
u = n.__c;
|
|
947
|
-
"function" == typeof u && (n.__c =
|
|
947
|
+
"function" == typeof u && (n.__c = void 0, u()), r = t;
|
|
948
948
|
}
|
|
949
949
|
function w$1(n) {
|
|
950
950
|
var t = r;
|
|
@@ -1926,7 +1926,7 @@
|
|
|
1926
1926
|
DIV_BY_ZERO$1 = NAME$1 + 'Division by zero',
|
|
1927
1927
|
// The shared prototype object.
|
|
1928
1928
|
P$2 = {},
|
|
1929
|
-
UNDEFINED$1 =
|
|
1929
|
+
UNDEFINED$1 = void 0,
|
|
1930
1930
|
NUMERIC$1 = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
1931
1931
|
|
|
1932
1932
|
/*
|
|
@@ -2800,15 +2800,15 @@
|
|
|
2800
2800
|
__: null,
|
|
2801
2801
|
__b: 0,
|
|
2802
2802
|
__e: null,
|
|
2803
|
-
__d:
|
|
2803
|
+
__d: void 0,
|
|
2804
2804
|
__c: null,
|
|
2805
2805
|
__h: null,
|
|
2806
|
-
constructor:
|
|
2806
|
+
constructor: void 0,
|
|
2807
2807
|
__v: --_,
|
|
2808
2808
|
__source: f,
|
|
2809
2809
|
__self: l
|
|
2810
2810
|
};
|
|
2811
|
-
if ("function" == typeof o && (s = o.defaultProps)) for (u in s)
|
|
2811
|
+
if ("function" == typeof o && (s = o.defaultProps)) for (u in s) void 0 === a[u] && (a[u] = s[u]);
|
|
2812
2812
|
return l$2.vnode && l$2.vnode(i), i;
|
|
2813
2813
|
}
|
|
2814
2814
|
|
|
@@ -13516,7 +13516,7 @@
|
|
|
13516
13516
|
};
|
|
13517
13517
|
|
|
13518
13518
|
var pad = function (number, length) {
|
|
13519
|
-
if (length ===
|
|
13519
|
+
if (length === void 0) {
|
|
13520
13520
|
length = 2;
|
|
13521
13521
|
}
|
|
13522
13522
|
return ("000" + number).slice(length * -1);
|
|
@@ -13760,11 +13760,11 @@
|
|
|
13760
13760
|
|
|
13761
13761
|
var createDateFormatter = function (_a) {
|
|
13762
13762
|
var _b = _a.config,
|
|
13763
|
-
config = _b ===
|
|
13763
|
+
config = _b === void 0 ? defaults$2 : _b,
|
|
13764
13764
|
_c = _a.l10n,
|
|
13765
|
-
l10n = _c ===
|
|
13765
|
+
l10n = _c === void 0 ? english : _c,
|
|
13766
13766
|
_d = _a.isMobile,
|
|
13767
|
-
isMobile = _d ===
|
|
13767
|
+
isMobile = _d === void 0 ? false : _d;
|
|
13768
13768
|
return function (dateObj, frmt, overrideLocale) {
|
|
13769
13769
|
var locale = overrideLocale || l10n;
|
|
13770
13770
|
if (config.formatDate !== undefined && !isMobile) {
|
|
@@ -13777,9 +13777,9 @@
|
|
|
13777
13777
|
};
|
|
13778
13778
|
var createDateParser = function (_a) {
|
|
13779
13779
|
var _b = _a.config,
|
|
13780
|
-
config = _b ===
|
|
13780
|
+
config = _b === void 0 ? defaults$2 : _b,
|
|
13781
13781
|
_c = _a.l10n,
|
|
13782
|
-
l10n = _c ===
|
|
13782
|
+
l10n = _c === void 0 ? english : _c;
|
|
13783
13783
|
return function (date, givenFormat, timeless, customLocale) {
|
|
13784
13784
|
if (date !== 0 && !date) return undefined;
|
|
13785
13785
|
var locale = customLocale || l10n;
|
|
@@ -13796,7 +13796,7 @@
|
|
|
13796
13796
|
} else if (/Z$/.test(datestr) || /GMT$/.test(datestr)) {
|
|
13797
13797
|
parsedDate = new Date(date);
|
|
13798
13798
|
} else {
|
|
13799
|
-
var matched =
|
|
13799
|
+
var matched = void 0,
|
|
13800
13800
|
ops = [];
|
|
13801
13801
|
for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) {
|
|
13802
13802
|
var token = format[i];
|
|
@@ -13831,7 +13831,7 @@
|
|
|
13831
13831
|
};
|
|
13832
13832
|
};
|
|
13833
13833
|
function compareDates(date1, date2, timeless) {
|
|
13834
|
-
if (timeless ===
|
|
13834
|
+
if (timeless === void 0) {
|
|
13835
13835
|
timeless = true;
|
|
13836
13836
|
}
|
|
13837
13837
|
if (timeless !== false) {
|
|
@@ -13957,10 +13957,10 @@
|
|
|
13957
13957
|
function setupHelperFunctions() {
|
|
13958
13958
|
self.utils = {
|
|
13959
13959
|
getDaysInMonth: function (month, yr) {
|
|
13960
|
-
if (month ===
|
|
13960
|
+
if (month === void 0) {
|
|
13961
13961
|
month = self.currentMonth;
|
|
13962
13962
|
}
|
|
13963
|
-
if (yr ===
|
|
13963
|
+
if (yr === void 0) {
|
|
13964
13964
|
yr = self.currentYear;
|
|
13965
13965
|
}
|
|
13966
13966
|
if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;
|
|
@@ -13993,7 +13993,7 @@
|
|
|
13993
13993
|
}
|
|
13994
13994
|
function getClosestActiveElement() {
|
|
13995
13995
|
var _a;
|
|
13996
|
-
return ((_a = self.calendarContainer) === null || _a ===
|
|
13996
|
+
return ((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode()).activeElement || document.activeElement;
|
|
13997
13997
|
}
|
|
13998
13998
|
function bindToInstance(fn) {
|
|
13999
13999
|
return fn.bind(self);
|
|
@@ -14583,7 +14583,7 @@
|
|
|
14583
14583
|
};
|
|
14584
14584
|
}
|
|
14585
14585
|
function changeMonth(value, isOffset) {
|
|
14586
|
-
if (isOffset ===
|
|
14586
|
+
if (isOffset === void 0) {
|
|
14587
14587
|
isOffset = true;
|
|
14588
14588
|
}
|
|
14589
14589
|
var delta = isOffset ? value : value - self.currentMonth;
|
|
@@ -14600,10 +14600,10 @@
|
|
|
14600
14600
|
updateNavigationCurrentMonth();
|
|
14601
14601
|
}
|
|
14602
14602
|
function clear(triggerChangeEvent, toInitial) {
|
|
14603
|
-
if (triggerChangeEvent ===
|
|
14603
|
+
if (triggerChangeEvent === void 0) {
|
|
14604
14604
|
triggerChangeEvent = true;
|
|
14605
14605
|
}
|
|
14606
|
-
if (toInitial ===
|
|
14606
|
+
if (toInitial === void 0) {
|
|
14607
14607
|
toInitial = true;
|
|
14608
14608
|
}
|
|
14609
14609
|
self.input.value = "";
|
|
@@ -14714,7 +14714,7 @@
|
|
|
14714
14714
|
}
|
|
14715
14715
|
function isEnabled(date, timeless) {
|
|
14716
14716
|
var _a;
|
|
14717
|
-
if (timeless ===
|
|
14717
|
+
if (timeless === void 0) {
|
|
14718
14718
|
timeless = true;
|
|
14719
14719
|
}
|
|
14720
14720
|
var dateToCheck = self.parseDate(date, undefined, timeless);
|
|
@@ -14722,8 +14722,8 @@
|
|
|
14722
14722
|
if (!self.config.enable && self.config.disable.length === 0) return true;
|
|
14723
14723
|
if (dateToCheck === undefined) return false;
|
|
14724
14724
|
var bool = !!self.config.enable,
|
|
14725
|
-
array = (_a = self.config.enable) !== null && _a !==
|
|
14726
|
-
for (var i = 0, d =
|
|
14725
|
+
array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;
|
|
14726
|
+
for (var i = 0, d = void 0; i < array.length; i++) {
|
|
14727
14727
|
d = array[i];
|
|
14728
14728
|
if (typeof d === "function" && d(dateToCheck)) return bool;else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) return bool;else if (typeof d === "string") {
|
|
14729
14729
|
var parsed = self.parseDate(d, undefined, true);
|
|
@@ -14850,7 +14850,7 @@
|
|
|
14850
14850
|
}
|
|
14851
14851
|
}
|
|
14852
14852
|
function onMouseOver(elem, cellClass) {
|
|
14853
|
-
if (cellClass ===
|
|
14853
|
+
if (cellClass === void 0) {
|
|
14854
14854
|
cellClass = "flatpickr-day";
|
|
14855
14855
|
}
|
|
14856
14856
|
if (self.selectedDates.length !== 1 || elem && (!elem.classList.contains(cellClass) || elem.classList.contains("flatpickr-disabled"))) return;
|
|
@@ -14893,7 +14893,7 @@
|
|
|
14893
14893
|
if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar();
|
|
14894
14894
|
}
|
|
14895
14895
|
function open(e, positionElement) {
|
|
14896
|
-
if (positionElement ===
|
|
14896
|
+
if (positionElement === void 0) {
|
|
14897
14897
|
positionElement = self._positionElement;
|
|
14898
14898
|
}
|
|
14899
14899
|
if (self.isMobile === true) {
|
|
@@ -15267,10 +15267,10 @@
|
|
|
15267
15267
|
});
|
|
15268
15268
|
}
|
|
15269
15269
|
function setDate(date, triggerChange, format) {
|
|
15270
|
-
if (triggerChange ===
|
|
15270
|
+
if (triggerChange === void 0) {
|
|
15271
15271
|
triggerChange = false;
|
|
15272
15272
|
}
|
|
15273
|
-
if (format ===
|
|
15273
|
+
if (format === void 0) {
|
|
15274
15274
|
format = self.config.dateFormat;
|
|
15275
15275
|
}
|
|
15276
15276
|
if (date !== 0 && !date || date instanceof Array && date.length === 0) return self.clear(triggerChange);
|
|
@@ -15420,7 +15420,7 @@
|
|
|
15420
15420
|
}).join(self.config.mode !== "range" ? self.config.conjunction : self.l10n.rangeSeparator);
|
|
15421
15421
|
}
|
|
15422
15422
|
function updateValue(triggerChange) {
|
|
15423
|
-
if (triggerChange ===
|
|
15423
|
+
if (triggerChange === void 0) {
|
|
15424
15424
|
triggerChange = true;
|
|
15425
15425
|
}
|
|
15426
15426
|
if (self.mobileInput !== undefined && self.mobileFormatStr) {
|
|
@@ -15755,7 +15755,7 @@
|
|
|
15755
15755
|
var i = t[o];
|
|
15756
15756
|
if (!("value" === o && "defaultValue" in t && null == i || $ && "children" === o && "noscript" === e || "class" === o || "className" === o)) {
|
|
15757
15757
|
var l = o.toLowerCase();
|
|
15758
|
-
"defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && true === 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$1, "-$&").toLowerCase() : null === i && (i =
|
|
15758
|
+
"defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && true === 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$1, "-$&").toLowerCase() : null === i && (i = void 0) : l = o = "oninput", "oninput" === l && u[o = l] && (o = "oninputCapture"), u[o] = i;
|
|
15759
15759
|
}
|
|
15760
15760
|
}
|
|
15761
15761
|
"select" == e && u.multiple && Array.isArray(u.value) && (u.value = S(t.children).forEach(function (n) {
|
|
@@ -15777,7 +15777,7 @@
|
|
|
15777
15777
|
null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value);
|
|
15778
15778
|
};
|
|
15779
15779
|
|
|
15780
|
-
/*! @license DOMPurify 3.2.
|
|
15780
|
+
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|
|
15781
15781
|
|
|
15782
15782
|
const {
|
|
15783
15783
|
entries,
|
|
@@ -15816,8 +15816,10 @@
|
|
|
15816
15816
|
};
|
|
15817
15817
|
}
|
|
15818
15818
|
const arrayForEach = unapply(Array.prototype.forEach);
|
|
15819
|
+
const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
15819
15820
|
const arrayPop = unapply(Array.prototype.pop);
|
|
15820
15821
|
const arrayPush = unapply(Array.prototype.push);
|
|
15822
|
+
const arraySplice = unapply(Array.prototype.splice);
|
|
15821
15823
|
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
15822
15824
|
const stringToString = unapply(String.prototype.toString);
|
|
15823
15825
|
const stringMatch = unapply(String.prototype.match);
|
|
@@ -15971,7 +15973,7 @@
|
|
|
15971
15973
|
// eslint-disable-next-line unicorn/better-regex
|
|
15972
15974
|
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
15973
15975
|
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
15974
|
-
const TMPLIT_EXPR = seal(/\$\{[\w\W]
|
|
15976
|
+
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
|
15975
15977
|
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
|
15976
15978
|
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
15977
15979
|
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
@@ -15999,20 +16001,11 @@
|
|
|
15999
16001
|
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
16000
16002
|
const NODE_TYPE = {
|
|
16001
16003
|
element: 1,
|
|
16002
|
-
attribute: 2,
|
|
16003
16004
|
text: 3,
|
|
16004
|
-
cdataSection: 4,
|
|
16005
|
-
entityReference: 5,
|
|
16006
|
-
// Deprecated
|
|
16007
|
-
entityNode: 6,
|
|
16008
16005
|
// Deprecated
|
|
16009
16006
|
progressingInstruction: 7,
|
|
16010
16007
|
comment: 8,
|
|
16011
|
-
document: 9
|
|
16012
|
-
documentType: 10,
|
|
16013
|
-
documentFragment: 11,
|
|
16014
|
-
notation: 12 // Deprecated
|
|
16015
|
-
};
|
|
16008
|
+
document: 9};
|
|
16016
16009
|
const getGlobal = function getGlobal() {
|
|
16017
16010
|
return typeof window === 'undefined' ? null : window;
|
|
16018
16011
|
};
|
|
@@ -16070,9 +16063,9 @@
|
|
|
16070
16063
|
function createDOMPurify() {
|
|
16071
16064
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
16072
16065
|
const DOMPurify = root => createDOMPurify(root);
|
|
16073
|
-
DOMPurify.version = '3.2.
|
|
16066
|
+
DOMPurify.version = '3.2.4';
|
|
16074
16067
|
DOMPurify.removed = [];
|
|
16075
|
-
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
|
|
16068
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
16076
16069
|
// Not running in a browser, provide a factory function
|
|
16077
16070
|
// so that you can pass your own Window
|
|
16078
16071
|
DOMPurify.isSupported = false;
|
|
@@ -17091,7 +17084,11 @@
|
|
|
17091
17084
|
}
|
|
17092
17085
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
17093
17086
|
};
|
|
17094
|
-
DOMPurify.removeHook = function (entryPoint) {
|
|
17087
|
+
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
|
17088
|
+
if (hookFunction !== undefined) {
|
|
17089
|
+
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
17090
|
+
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
17091
|
+
}
|
|
17095
17092
|
return arrayPop(hooks[entryPoint]);
|
|
17096
17093
|
};
|
|
17097
17094
|
DOMPurify.removeHooks = function (entryPoint) {
|
|
@@ -27707,7 +27704,7 @@
|
|
|
27707
27704
|
let mode = overlays ? 0 : IterMode.IgnoreOverlays;
|
|
27708
27705
|
// Must go up out of overlays when those do not overlap with pos
|
|
27709
27706
|
if (overlays) for (let scan = node, parent = scan.parent; parent; scan = parent, parent = scan.parent) {
|
|
27710
|
-
if (scan instanceof TreeNode && scan.index < 0 && ((_a = parent.enter(pos, side, mode)) === null || _a ===
|
|
27707
|
+
if (scan instanceof TreeNode && scan.index < 0 && ((_a = parent.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent;
|
|
27711
27708
|
}
|
|
27712
27709
|
for (;;) {
|
|
27713
27710
|
let inner = node.enter(pos, side, mode);
|
|
@@ -27733,7 +27730,7 @@
|
|
|
27733
27730
|
return resolveNode(this, pos, side, true);
|
|
27734
27731
|
}
|
|
27735
27732
|
matchContext(context) {
|
|
27736
|
-
return matchNodeContext(this, context);
|
|
27733
|
+
return matchNodeContext(this.parent, context);
|
|
27737
27734
|
}
|
|
27738
27735
|
enterUnfinishedNodesBefore(pos) {
|
|
27739
27736
|
let scan = this.childBefore(pos),
|
|
@@ -27869,7 +27866,7 @@
|
|
|
27869
27866
|
}
|
|
27870
27867
|
}
|
|
27871
27868
|
function matchNodeContext(node, context, i = context.length - 1) {
|
|
27872
|
-
for (let p = node
|
|
27869
|
+
for (let p = node; i >= 0; p = p.parent) {
|
|
27873
27870
|
if (!p) return false;
|
|
27874
27871
|
if (!p.type.isAnonymous) {
|
|
27875
27872
|
if (context[i] && context[i] != p.name) return false;
|
|
@@ -28239,7 +28236,7 @@
|
|
|
28239
28236
|
return this.move(1, enter);
|
|
28240
28237
|
}
|
|
28241
28238
|
/**
|
|
28242
|
-
Move to the next node in a last-to-first pre-order
|
|
28239
|
+
Move to the next node in a last-to-first pre-order traversal. A
|
|
28243
28240
|
node is followed by its last child or, if it has none, its
|
|
28244
28241
|
previous sibling or the previous sibling of the first parent
|
|
28245
28242
|
node that has one.
|
|
@@ -28309,8 +28306,8 @@
|
|
|
28309
28306
|
for (;;) {
|
|
28310
28307
|
if (mustLeave && leave) leave(this);
|
|
28311
28308
|
mustLeave = this.type.isAnonymous;
|
|
28312
|
-
if (this.nextSibling()) break;
|
|
28313
28309
|
if (!depth) return;
|
|
28310
|
+
if (this.nextSibling()) break;
|
|
28314
28311
|
this.parent();
|
|
28315
28312
|
depth--;
|
|
28316
28313
|
mustLeave = true;
|
|
@@ -28323,7 +28320,7 @@
|
|
|
28323
28320
|
are treated as wildcards.
|
|
28324
28321
|
*/
|
|
28325
28322
|
matchContext(context) {
|
|
28326
|
-
if (!this.buffer) return matchNodeContext(this.node, context);
|
|
28323
|
+
if (!this.buffer) return matchNodeContext(this.node.parent, context);
|
|
28327
28324
|
let {
|
|
28328
28325
|
buffer
|
|
28329
28326
|
} = this.buffer,
|
|
@@ -28331,7 +28328,7 @@
|
|
|
28331
28328
|
types
|
|
28332
28329
|
} = buffer.set;
|
|
28333
28330
|
for (let i = context.length - 1, d = this.stack.length - 1; i >= 0; d--) {
|
|
28334
|
-
if (d < 0) return matchNodeContext(this.
|
|
28331
|
+
if (d < 0) return matchNodeContext(this._tree, context, i);
|
|
28335
28332
|
let type = types[buffer.buffer[this.stack[d]]];
|
|
28336
28333
|
if (!type.isAnonymous) {
|
|
28337
28334
|
if (context[i] && context[i] != type.name) return false;
|
|
@@ -28364,7 +28361,8 @@
|
|
|
28364
28361
|
end,
|
|
28365
28362
|
size
|
|
28366
28363
|
} = cursor;
|
|
28367
|
-
let lookAheadAtStart = lookAhead
|
|
28364
|
+
let lookAheadAtStart = lookAhead,
|
|
28365
|
+
contextAtStart = contextHash;
|
|
28368
28366
|
while (size < 0) {
|
|
28369
28367
|
cursor.next();
|
|
28370
28368
|
if (size == -1 /* SpecialRecord.Reuse */) {
|
|
@@ -28407,7 +28405,7 @@
|
|
|
28407
28405
|
while (cursor.pos > endPos) {
|
|
28408
28406
|
if (localInRepeat >= 0 && cursor.id == localInRepeat && cursor.size >= 0) {
|
|
28409
28407
|
if (cursor.end <= lastEnd - maxBufferLength) {
|
|
28410
|
-
makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart);
|
|
28408
|
+
makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
|
|
28411
28409
|
lastGroup = localChildren.length;
|
|
28412
28410
|
lastEnd = cursor.end;
|
|
28413
28411
|
}
|
|
@@ -28418,14 +28416,14 @@
|
|
|
28418
28416
|
takeNode(start, endPos, localChildren, localPositions, localInRepeat, depth + 1);
|
|
28419
28417
|
}
|
|
28420
28418
|
}
|
|
28421
|
-
if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart);
|
|
28419
|
+
if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
|
|
28422
28420
|
localChildren.reverse();
|
|
28423
28421
|
localPositions.reverse();
|
|
28424
28422
|
if (localInRepeat > -1 && lastGroup > 0) {
|
|
28425
|
-
let make = makeBalanced(type);
|
|
28423
|
+
let make = makeBalanced(type, contextAtStart);
|
|
28426
28424
|
node = balanceRange(type, localChildren, localPositions, 0, localChildren.length, 0, end - start, make, make);
|
|
28427
28425
|
} else {
|
|
28428
|
-
node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end);
|
|
28426
|
+
node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
|
|
28429
28427
|
}
|
|
28430
28428
|
}
|
|
28431
28429
|
children.push(node);
|
|
@@ -28467,7 +28465,7 @@
|
|
|
28467
28465
|
positions.push(start - parentStart);
|
|
28468
28466
|
}
|
|
28469
28467
|
}
|
|
28470
|
-
function makeBalanced(type) {
|
|
28468
|
+
function makeBalanced(type, contextHash) {
|
|
28471
28469
|
return (children, positions, length) => {
|
|
28472
28470
|
let lookAhead = 0,
|
|
28473
28471
|
lastI = children.length - 1,
|
|
@@ -28477,20 +28475,20 @@
|
|
|
28477
28475
|
if (!lastI && last.type == type && last.length == length) return last;
|
|
28478
28476
|
if (lookAheadProp = last.prop(NodeProp.lookAhead)) lookAhead = positions[lastI] + last.length + lookAheadProp;
|
|
28479
28477
|
}
|
|
28480
|
-
return makeTree(type, children, positions, length, lookAhead);
|
|
28478
|
+
return makeTree(type, children, positions, length, lookAhead, contextHash);
|
|
28481
28479
|
};
|
|
28482
28480
|
}
|
|
28483
|
-
function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead) {
|
|
28481
|
+
function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {
|
|
28484
28482
|
let localChildren = [],
|
|
28485
28483
|
localPositions = [];
|
|
28486
28484
|
while (children.length > i) {
|
|
28487
28485
|
localChildren.push(children.pop());
|
|
28488
28486
|
localPositions.push(positions.pop() + base - from);
|
|
28489
28487
|
}
|
|
28490
|
-
children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to));
|
|
28488
|
+
children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));
|
|
28491
28489
|
positions.push(from - base);
|
|
28492
28490
|
}
|
|
28493
|
-
function makeTree(type, children, positions, length, lookAhead
|
|
28491
|
+
function makeTree(type, children, positions, length, lookAhead, contextHash, props) {
|
|
28494
28492
|
if (contextHash) {
|
|
28495
28493
|
let pair = [NodeProp.contextHash, contextHash];
|
|
28496
28494
|
props = props ? [pair].concat(props) : [pair];
|
|
@@ -28584,7 +28582,7 @@
|
|
|
28584
28582
|
let children = [],
|
|
28585
28583
|
positions = [];
|
|
28586
28584
|
while (cursor.pos > 0) takeNode(data.start || 0, data.bufferStart || 0, children, positions, -1, 0);
|
|
28587
|
-
let length = (_a = data.length) !== null && _a !==
|
|
28585
|
+
let length = (_a = data.length) !== null && _a !== void 0 ? _a : children.length ? positions[0] + children[0].length : 0;
|
|
28588
28586
|
return new Tree(types[data.topID], children.reverse(), positions.reverse(), length);
|
|
28589
28587
|
}
|
|
28590
28588
|
const nodeSizeCache = new WeakMap();
|
|
@@ -28937,7 +28935,13 @@
|
|
|
28937
28935
|
}
|
|
28938
28936
|
} else if (overlay && (range = overlay.predicate(cursor))) {
|
|
28939
28937
|
if (range === true) range = new Range$3(cursor.from, cursor.to);
|
|
28940
|
-
if (range.from < range.to)
|
|
28938
|
+
if (range.from < range.to) {
|
|
28939
|
+
let last = overlay.ranges.length - 1;
|
|
28940
|
+
if (last >= 0 && overlay.ranges[last].to == range.from) overlay.ranges[last] = {
|
|
28941
|
+
from: overlay.ranges[last].from,
|
|
28942
|
+
to: range.to
|
|
28943
|
+
};else overlay.ranges.push(range);
|
|
28944
|
+
}
|
|
28941
28945
|
}
|
|
28942
28946
|
if (enter && cursor.firstChild()) {
|
|
28943
28947
|
if (overlay) overlay.depth++;
|
|
@@ -29057,7 +29061,7 @@
|
|
|
29057
29061
|
this.fragI = 0;
|
|
29058
29062
|
if (fragments.length) {
|
|
29059
29063
|
let first = this.curFrag = fragments[0];
|
|
29060
|
-
this.curTo = (_a = first.tree.prop(stoppedInner)) !== null && _a !==
|
|
29064
|
+
this.curTo = (_a = first.tree.prop(stoppedInner)) !== null && _a !== void 0 ? _a : first.to;
|
|
29061
29065
|
this.inner = new StructureCursor(first.tree, -first.offset);
|
|
29062
29066
|
} else {
|
|
29063
29067
|
this.curFrag = this.inner = null;
|
|
@@ -29074,7 +29078,7 @@
|
|
|
29074
29078
|
this.curFrag = this.inner = null;
|
|
29075
29079
|
} else {
|
|
29076
29080
|
let frag = this.curFrag = this.fragments[this.fragI];
|
|
29077
|
-
this.curTo = (_a = frag.tree.prop(stoppedInner)) !== null && _a !==
|
|
29081
|
+
this.curTo = (_a = frag.tree.prop(stoppedInner)) !== null && _a !== void 0 ? _a : frag.to;
|
|
29078
29082
|
this.inner = new StructureCursor(frag.tree, -frag.offset);
|
|
29079
29083
|
}
|
|
29080
29084
|
}
|
|
@@ -29084,7 +29088,7 @@
|
|
|
29084
29088
|
if (this.inner) {
|
|
29085
29089
|
this.inner.cursor.moveTo(pos, 1);
|
|
29086
29090
|
for (let pos = this.inner.cursor.node; pos; pos = pos.parent) {
|
|
29087
|
-
let mount = (_a = pos.tree) === null || _a ===
|
|
29091
|
+
let mount = (_a = pos.tree) === null || _a === void 0 ? void 0 : _a.prop(NodeProp.mounted);
|
|
29088
29092
|
if (mount && mount.parser == parser) {
|
|
29089
29093
|
for (let i = this.fragI; i < this.fragments.length; i++) {
|
|
29090
29094
|
let frag = this.fragments[i];
|
|
@@ -29339,7 +29343,7 @@
|
|
|
29339
29343
|
// This is a kludge to try and detect overly deep left-associative
|
|
29340
29344
|
// trees, which will not increase the parse stack depth and thus
|
|
29341
29345
|
// won't be caught by the regular stack-depth limit check.
|
|
29342
|
-
if (size >= 2000 /* Recover.MinBigReduction */ && !((_a = this.p.parser.nodeSet.types[type]) === null || _a ===
|
|
29346
|
+
if (size >= 2000 /* Recover.MinBigReduction */ && !((_a = this.p.parser.nodeSet.types[type]) === null || _a === void 0 ? void 0 : _a.isAnonymous)) {
|
|
29343
29347
|
if (start == this.p.lastBigReductionStart) {
|
|
29344
29348
|
this.p.bigReductionCount++;
|
|
29345
29349
|
this.p.lastBigReductionSize = size;
|
|
@@ -30991,7 +30995,7 @@
|
|
|
30991
30995
|
static define(nameOrParent, parent) {
|
|
30992
30996
|
let name = typeof nameOrParent == "string" ? nameOrParent : "?";
|
|
30993
30997
|
if (nameOrParent instanceof Tag) parent = nameOrParent;
|
|
30994
|
-
if (parent === null || parent ===
|
|
30998
|
+
if (parent === null || parent === void 0 ? void 0 : parent.base) throw new Error("Can not derive from a modified tag");
|
|
30995
30999
|
let tag = new Tag(name, [], null, []);
|
|
30996
31000
|
tag.set.push(tag);
|
|
30997
31001
|
if (parent) for (let t of parent.set) tag.set.push(t);
|
|
@@ -33886,11 +33890,11 @@
|
|
|
33886
33890
|
includeOffset: false
|
|
33887
33891
|
});
|
|
33888
33892
|
}
|
|
33889
|
-
if ((_a = obj.zone) === null || _a ===
|
|
33893
|
+
if ((_a = obj.zone) === null || _a === void 0 ? void 0 : _a.zoneName) {
|
|
33890
33894
|
return obj.toISO({
|
|
33891
33895
|
suppressMilliseconds: true,
|
|
33892
33896
|
includeOffset: false
|
|
33893
|
-
}) + '@' + ((_b = obj.zone) === null || _b ===
|
|
33897
|
+
}) + '@' + ((_b = obj.zone) === null || _b === void 0 ? void 0 : _b.zoneName);
|
|
33894
33898
|
}
|
|
33895
33899
|
return obj.toISO({
|
|
33896
33900
|
suppressMilliseconds: true
|
|
@@ -33909,11 +33913,11 @@
|
|
|
33909
33913
|
includeOffset: false
|
|
33910
33914
|
});
|
|
33911
33915
|
}
|
|
33912
|
-
if ((_c = obj.zone) === null || _c ===
|
|
33916
|
+
if ((_c = obj.zone) === null || _c === void 0 ? void 0 : _c.zoneName) {
|
|
33913
33917
|
return obj.toISOTime({
|
|
33914
33918
|
suppressMilliseconds: true,
|
|
33915
33919
|
includeOffset: false
|
|
33916
|
-
}) + '@' + ((_d = obj.zone) === null || _d ===
|
|
33920
|
+
}) + '@' + ((_d = obj.zone) === null || _d === void 0 ? void 0 : _d.zoneName);
|
|
33917
33921
|
}
|
|
33918
33922
|
return obj.toISOTime({
|
|
33919
33923
|
suppressMilliseconds: true
|
|
@@ -35969,11 +35973,11 @@
|
|
|
35969
35973
|
includeOffset: false
|
|
35970
35974
|
});
|
|
35971
35975
|
}
|
|
35972
|
-
if ((_a = obj.zone) === null || _a ===
|
|
35976
|
+
if ((_a = obj.zone) === null || _a === void 0 ? void 0 : _a.zoneName) {
|
|
35973
35977
|
return obj.toISO({
|
|
35974
35978
|
suppressMilliseconds: true,
|
|
35975
35979
|
includeOffset: false
|
|
35976
|
-
}) + '@' + ((_b = obj.zone) === null || _b ===
|
|
35980
|
+
}) + '@' + ((_b = obj.zone) === null || _b === void 0 ? void 0 : _b.zoneName);
|
|
35977
35981
|
}
|
|
35978
35982
|
return obj.toISO({
|
|
35979
35983
|
suppressMilliseconds: true
|
|
@@ -35992,11 +35996,11 @@
|
|
|
35992
35996
|
includeOffset: false
|
|
35993
35997
|
});
|
|
35994
35998
|
}
|
|
35995
|
-
if ((_c = obj.zone) === null || _c ===
|
|
35999
|
+
if ((_c = obj.zone) === null || _c === void 0 ? void 0 : _c.zoneName) {
|
|
35996
36000
|
return obj.toISOTime({
|
|
35997
36001
|
suppressMilliseconds: true,
|
|
35998
36002
|
includeOffset: false
|
|
35999
|
-
}) + '@' + ((_d = obj.zone) === null || _d ===
|
|
36003
|
+
}) + '@' + ((_d = obj.zone) === null || _d === void 0 ? void 0 : _d.zoneName);
|
|
36000
36004
|
}
|
|
36001
36005
|
return obj.toISOTime({
|
|
36002
36006
|
suppressMilliseconds: true
|
|
@@ -38526,13 +38530,13 @@
|
|
|
38526
38530
|
safely ignore the optional arguments in most situations.
|
|
38527
38531
|
*/
|
|
38528
38532
|
static cursor(pos, assoc = 0, bidiLevel, goalColumn) {
|
|
38529
|
-
return SelectionRange.create(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 8 /* RangeFlag.AssocBefore */ : 16 /* RangeFlag.AssocAfter */) | (bidiLevel == null ? 7 : Math.min(6, bidiLevel)) | (goalColumn !== null && goalColumn !==
|
|
38533
|
+
return SelectionRange.create(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 8 /* RangeFlag.AssocBefore */ : 16 /* RangeFlag.AssocAfter */) | (bidiLevel == null ? 7 : Math.min(6, bidiLevel)) | (goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */);
|
|
38530
38534
|
}
|
|
38531
38535
|
/**
|
|
38532
38536
|
Create a selection range.
|
|
38533
38537
|
*/
|
|
38534
38538
|
static range(anchor, head, goalColumn, bidiLevel) {
|
|
38535
|
-
let flags = (goalColumn !== null && goalColumn !==
|
|
38539
|
+
let flags = (goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */ | (bidiLevel == null ? 7 : Math.min(6, bidiLevel));
|
|
38536
38540
|
return head < anchor ? SelectionRange.create(head, anchor, 32 /* RangeFlag.Inverted */ | 16 /* RangeFlag.AssocAfter */ | flags) : SelectionRange.create(anchor, head, (head > anchor ? 8 /* RangeFlag.AssocBefore */ : 0) | flags);
|
|
38537
38541
|
}
|
|
38538
38542
|
/**
|
|
@@ -38664,7 +38668,7 @@
|
|
|
38664
38668
|
depSel = false,
|
|
38665
38669
|
depAddrs = [];
|
|
38666
38670
|
for (let dep of this.dependencies) {
|
|
38667
|
-
if (dep == "doc") depDoc = true;else if (dep == "selection") depSel = true;else if ((((_a = addresses[dep.id]) !== null && _a !==
|
|
38671
|
+
if (dep == "doc") depDoc = true;else if (dep == "selection") depSel = true;else if ((((_a = addresses[dep.id]) !== null && _a !== void 0 ? _a : 1) & 1) == 0) depAddrs.push(addresses[dep.id]);
|
|
38668
38672
|
}
|
|
38669
38673
|
return {
|
|
38670
38674
|
create(state) {
|
|
@@ -38792,7 +38796,7 @@
|
|
|
38792
38796
|
}
|
|
38793
38797
|
create(state) {
|
|
38794
38798
|
let init = state.facet(initField).find(i => i.field == this);
|
|
38795
|
-
return ((init === null || init ===
|
|
38799
|
+
return ((init === null || init === void 0 ? void 0 : init.create) || this.createF)(state);
|
|
38796
38800
|
}
|
|
38797
38801
|
/**
|
|
38798
38802
|
@internal
|
|
@@ -38812,6 +38816,13 @@
|
|
|
38812
38816
|
return 1 /* SlotStatus.Changed */;
|
|
38813
38817
|
},
|
|
38814
38818
|
reconfigure: (state, oldState) => {
|
|
38819
|
+
let init = state.facet(initField),
|
|
38820
|
+
oldInit = oldState.facet(initField),
|
|
38821
|
+
reInit;
|
|
38822
|
+
if ((reInit = init.find(i => i.field == this)) && reInit != oldInit.find(i => i.field == this)) {
|
|
38823
|
+
state.values[idx] = reInit.create(state);
|
|
38824
|
+
return 1 /* SlotStatus.Changed */;
|
|
38825
|
+
}
|
|
38815
38826
|
if (oldState.config.address[this.id] != null) {
|
|
38816
38827
|
state.values[idx] = oldState.field(this);
|
|
38817
38828
|
return 0;
|
|
@@ -38961,7 +38972,7 @@
|
|
|
38961
38972
|
address[field.id] = dynamicSlots.length << 1;
|
|
38962
38973
|
dynamicSlots.push(a => field.slot(a));
|
|
38963
38974
|
}
|
|
38964
|
-
let oldFacets = oldState === null || oldState ===
|
|
38975
|
+
let oldFacets = oldState === null || oldState === void 0 ? void 0 : oldState.config.facets;
|
|
38965
38976
|
for (let id in facets) {
|
|
38966
38977
|
let providers = facets[id],
|
|
38967
38978
|
facet = providers[0].facet;
|
|
@@ -39396,7 +39407,7 @@
|
|
|
39396
39407
|
}
|
|
39397
39408
|
return {
|
|
39398
39409
|
changes,
|
|
39399
|
-
selection: b.selection ? b.selection.map(mapForB) : (_a = a.selection) === null || _a ===
|
|
39410
|
+
selection: b.selection ? b.selection.map(mapForB) : (_a = a.selection) === null || _a === void 0 ? void 0 : _a.map(mapForA),
|
|
39400
39411
|
effects: StateEffect.mapEffects(a.effects, mapForA).concat(StateEffect.mapEffects(b.effects, mapForB)),
|
|
39401
39412
|
annotations: a.annotations.length ? a.annotations.concat(b.annotations) : b.annotations,
|
|
39402
39413
|
scrollIntoView: a.scrollIntoView || b.scrollIntoView
|
|
@@ -40494,7 +40505,7 @@
|
|
|
40494
40505
|
let shared = new Set();
|
|
40495
40506
|
for (let set of b) for (let i = 0; i < set.chunk.length; i++) {
|
|
40496
40507
|
let known = inA.get(set.chunk[i]);
|
|
40497
|
-
if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i] && !(textDiff === null || textDiff ===
|
|
40508
|
+
if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i] && !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set.chunk[i].length))) shared.add(set.chunk[i]);
|
|
40498
40509
|
}
|
|
40499
40510
|
return shared;
|
|
40500
40511
|
}
|
|
@@ -41737,7 +41748,7 @@
|
|
|
41737
41748
|
if (toI < children.length) {
|
|
41738
41749
|
let after = children[toI];
|
|
41739
41750
|
// Make sure the end of the child after the update is preserved in `after`
|
|
41740
|
-
if (after && (toOff < after.length || after.breakAfter && (last === null || last ===
|
|
41751
|
+
if (after && (toOff < after.length || after.breakAfter && (last === null || last === void 0 ? void 0 : last.breakAfter))) {
|
|
41741
41752
|
// If we're splitting a child, separate part of it to avoid that
|
|
41742
41753
|
// being mangled when updating the child before the update.
|
|
41743
41754
|
if (fromI == toI) {
|
|
@@ -41754,7 +41765,7 @@
|
|
|
41754
41765
|
if (toOff || after.children.length && !after.children[0].length) after.merge(0, toOff, null, false, 0, openEnd);
|
|
41755
41766
|
insert.push(after);
|
|
41756
41767
|
}
|
|
41757
|
-
} else if (after === null || after ===
|
|
41768
|
+
} else if (after === null || after === void 0 ? void 0 : after.breakAfter) {
|
|
41758
41769
|
// The element at `toI` is entirely covered by this range.
|
|
41759
41770
|
// Preserve its line break, if any.
|
|
41760
41771
|
if (last) last.breakAfter = 1;else breakAtStart = 1;
|
|
@@ -42470,7 +42481,7 @@
|
|
|
42470
42481
|
}
|
|
42471
42482
|
eq(other) {
|
|
42472
42483
|
var _a, _b;
|
|
42473
|
-
return this == other || other instanceof MarkDecoration && this.tagName == other.tagName && (this.class || ((_a = this.attrs) === null || _a ===
|
|
42484
|
+
return this == other || other instanceof MarkDecoration && this.tagName == other.tagName && (this.class || ((_a = this.attrs) === null || _a === void 0 ? void 0 : _a.class)) == (other.class || ((_b = other.attrs) === null || _b === void 0 ? void 0 : _b.class)) && attrsEq(this.attrs, other.attrs, "class");
|
|
42474
42485
|
}
|
|
42475
42486
|
range(from, to = from) {
|
|
42476
42487
|
if (from >= to) throw new RangeError("Mark decorations may not be empty");
|
|
@@ -42524,8 +42535,8 @@
|
|
|
42524
42535
|
if (start == null) start = spec.inclusive;
|
|
42525
42536
|
if (end == null) end = spec.inclusive;
|
|
42526
42537
|
return {
|
|
42527
|
-
start: start !== null && start !==
|
|
42528
|
-
end: end !== null && end !==
|
|
42538
|
+
start: start !== null && start !== void 0 ? start : block,
|
|
42539
|
+
end: end !== null && end !== void 0 ? end : block
|
|
42529
42540
|
};
|
|
42530
42541
|
}
|
|
42531
42542
|
function widgetsEq(a, b) {
|
|
@@ -42631,7 +42642,7 @@
|
|
|
42631
42642
|
super.sync(view, track);
|
|
42632
42643
|
let last = this.dom.lastChild;
|
|
42633
42644
|
while (last && ContentView.get(last) instanceof MarkView) last = last.lastChild;
|
|
42634
|
-
if (!last || !this.length || last.nodeName != "BR" && ((_a = ContentView.get(last)) === null || _a ===
|
|
42645
|
+
if (!last || !this.length || last.nodeName != "BR" && ((_a = ContentView.get(last)) === null || _a === void 0 ? void 0 : _a.isEditable) == false && (!browser.ios || !this.children.some(ch => ch instanceof TextView))) {
|
|
42635
42646
|
let hack = document.createElement("BR");
|
|
42636
42647
|
hack.cmIgnore = true;
|
|
42637
42648
|
this.dom.appendChild(hack);
|
|
@@ -43365,7 +43376,7 @@
|
|
|
43365
43376
|
function moveVisually(line, order, dir, start, forward) {
|
|
43366
43377
|
var _a;
|
|
43367
43378
|
let startIndex = start.head - line.from;
|
|
43368
|
-
let spanI = BidiSpan.find(order, startIndex, (_a = start.bidiLevel) !== null && _a !==
|
|
43379
|
+
let spanI = BidiSpan.find(order, startIndex, (_a = start.bidiLevel) !== null && _a !== void 0 ? _a : -1, start.assoc);
|
|
43369
43380
|
let span = order[spanI],
|
|
43370
43381
|
spanEnd = span.side(forward, dir);
|
|
43371
43382
|
// End of span
|
|
@@ -43554,7 +43565,7 @@
|
|
|
43554
43565
|
}
|
|
43555
43566
|
destroy(view) {
|
|
43556
43567
|
var _a;
|
|
43557
|
-
if ((_a = this.value) === null || _a ===
|
|
43568
|
+
if ((_a = this.value) === null || _a === void 0 ? void 0 : _a.destroy) {
|
|
43558
43569
|
try {
|
|
43559
43570
|
this.value.destroy();
|
|
43560
43571
|
} catch (e) {
|
|
@@ -43824,7 +43835,7 @@
|
|
|
43824
43835
|
this.updateEditContextFormatting(update);
|
|
43825
43836
|
let readCompositionAt = -1;
|
|
43826
43837
|
if (this.view.inputState.composing >= 0 && !this.view.observer.editContext) {
|
|
43827
|
-
if ((_a = this.domChanged) === null || _a ===
|
|
43838
|
+
if ((_a = this.domChanged) === null || _a === void 0 ? void 0 : _a.newSel) readCompositionAt = this.domChanged.newSel.head;else if (!touchesComposition(update.changes, this.hasComposition) && !update.selectionSet) readCompositionAt = update.state.selection.main.head;
|
|
43828
43839
|
}
|
|
43829
43840
|
let composition = readCompositionAt > -1 ? findCompositionRange(this.view, update.changes, readCompositionAt) : null;
|
|
43830
43841
|
this.domChanged = null;
|
|
@@ -44630,7 +44641,7 @@
|
|
|
44630
44641
|
// using caret(Position|Range)FromPoint as a shortcut
|
|
44631
44642
|
let node,
|
|
44632
44643
|
offset = -1;
|
|
44633
|
-
if (element && ((_a = view.docView.nearest(element)) === null || _a ===
|
|
44644
|
+
if (element && ((_a = view.docView.nearest(element)) === null || _a === void 0 ? void 0 : _a.isEditable) != false) {
|
|
44634
44645
|
if (doc.caretPositionFromPoint) {
|
|
44635
44646
|
let pos = doc.caretPositionFromPoint(x, y);
|
|
44636
44647
|
if (pos) ({
|
|
@@ -44663,7 +44674,7 @@
|
|
|
44663
44674
|
}
|
|
44664
44675
|
let nearest = view.docView.nearest(node);
|
|
44665
44676
|
if (!nearest) return null;
|
|
44666
|
-
if (nearest.isWidget && ((_b = nearest.dom) === null || _b ===
|
|
44677
|
+
if (nearest.isWidget && ((_b = nearest.dom) === null || _b === void 0 ? void 0 : _b.nodeType) == 1) {
|
|
44667
44678
|
let rect = nearest.dom.getBoundingClientRect();
|
|
44668
44679
|
return coords.y < rect.top || coords.y <= rect.bottom && coords.x <= (rect.left + rect.right) / 2 ? nearest.posAtStart : nearest.posAtEnd;
|
|
44669
44680
|
} else {
|
|
@@ -44773,7 +44784,7 @@
|
|
|
44773
44784
|
startY = (dir < 0 ? line.top : line.bottom) + docTop;
|
|
44774
44785
|
}
|
|
44775
44786
|
let resolvedGoal = rect.left + goal;
|
|
44776
|
-
let dist = distance !== null && distance !==
|
|
44787
|
+
let dist = distance !== null && distance !== void 0 ? distance : view.viewState.heightOracle.textHeight >> 1;
|
|
44777
44788
|
for (let extra = 0;; extra += 10) {
|
|
44778
44789
|
let curY = startY + (dist + extra) * dir;
|
|
44779
44790
|
let pos = posAtCoords(view, {
|
|
@@ -45999,7 +46010,7 @@
|
|
|
45999
46010
|
// In EditContext mode, we must handle insertReplacementText events
|
|
46000
46011
|
// directly, to make spell checking corrections work
|
|
46001
46012
|
if (event.inputType == "insertReplacementText" && view.observer.editContext) {
|
|
46002
|
-
let text = (_a = event.dataTransfer) === null || _a ===
|
|
46013
|
+
let text = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData("text/plain"),
|
|
46003
46014
|
ranges = event.getTargetRanges();
|
|
46004
46015
|
if (text && ranges.length) {
|
|
46005
46016
|
let r = ranges[0];
|
|
@@ -46024,13 +46035,13 @@
|
|
|
46024
46035
|
if (browser.chrome && browser.android && (pending = PendingKeys.find(key => key.inputType == event.inputType))) {
|
|
46025
46036
|
view.observer.delayAndroidKey(pending.key, pending.keyCode);
|
|
46026
46037
|
if (pending.key == "Backspace" || pending.key == "Delete") {
|
|
46027
|
-
let startViewHeight = ((_b = window.visualViewport) === null || _b ===
|
|
46038
|
+
let startViewHeight = ((_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.height) || 0;
|
|
46028
46039
|
setTimeout(() => {
|
|
46029
46040
|
var _a;
|
|
46030
46041
|
// Backspacing near uneditable nodes on Chrome Android sometimes
|
|
46031
46042
|
// closes the virtual keyboard. This tries to crudely detect
|
|
46032
46043
|
// that and refocus to get it back.
|
|
46033
|
-
if ((((_a = window.visualViewport) === null || _a ===
|
|
46044
|
+
if ((((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || 0) > startViewHeight + 10 && view.hasFocus) {
|
|
46034
46045
|
view.contentDOM.blur();
|
|
46035
46046
|
view.focus();
|
|
46036
46047
|
}
|
|
@@ -47814,7 +47825,7 @@
|
|
|
47814
47825
|
if (typeof ResizeObserver == "function") {
|
|
47815
47826
|
this.resizeScroll = new ResizeObserver(() => {
|
|
47816
47827
|
var _a;
|
|
47817
|
-
if (((_a = this.view.docView) === null || _a ===
|
|
47828
|
+
if (((_a = this.view.docView) === null || _a === void 0 ? void 0 : _a.lastUpdate) < Date.now() - 75) this.onResize();
|
|
47818
47829
|
});
|
|
47819
47830
|
this.resizeScroll.observe(view.scrollDOM);
|
|
47820
47831
|
}
|
|
@@ -48003,7 +48014,7 @@
|
|
|
48003
48014
|
// this isn't coming right after another change, in which case
|
|
48004
48015
|
// it is probably part of a weird chain of updates, and should
|
|
48005
48016
|
// be ignored if it returns the DOM to its previous state.
|
|
48006
|
-
force: this.lastChange < Date.now() - 50 || !!((_a = this.delayedAndroidKey) === null || _a ===
|
|
48017
|
+
force: this.lastChange < Date.now() - 50 || !!((_a = this.delayedAndroidKey) === null || _a === void 0 ? void 0 : _a.force)
|
|
48007
48018
|
};
|
|
48008
48019
|
}
|
|
48009
48020
|
clearDelayedAndroidKey() {
|
|
@@ -48144,9 +48155,9 @@
|
|
|
48144
48155
|
destroy() {
|
|
48145
48156
|
var _a, _b, _c;
|
|
48146
48157
|
this.stop();
|
|
48147
|
-
(_a = this.intersection) === null || _a ===
|
|
48148
|
-
(_b = this.gapIntersection) === null || _b ===
|
|
48149
|
-
(_c = this.resizeScroll) === null || _c ===
|
|
48158
|
+
(_a = this.intersection) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
48159
|
+
(_b = this.gapIntersection) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
48160
|
+
(_c = this.resizeScroll) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
48150
48161
|
for (let dom of this.scrollTargets) dom.removeEventListener("scroll", this.onScroll);
|
|
48151
48162
|
this.removeWindowListeners(this.win);
|
|
48152
48163
|
clearTimeout(this.parentCheck);
|
|
@@ -48570,7 +48581,7 @@
|
|
|
48570
48581
|
this.updateAttrs();
|
|
48571
48582
|
this.updateState = 0 /* UpdateState.Idle */;
|
|
48572
48583
|
this.requestMeasure();
|
|
48573
|
-
if ((_a = document.fonts) === null || _a ===
|
|
48584
|
+
if ((_a = document.fonts) === null || _a === void 0 ? void 0 : _a.ready) document.fonts.ready.then(() => this.requestMeasure());
|
|
48574
48585
|
}
|
|
48575
48586
|
dispatch(...input) {
|
|
48576
48587
|
let trs = input.length == 1 && input[0] instanceof Transaction ? input : input.length == 1 && Array.isArray(input[0]) ? input[0] : [this.state.update(...input)];
|
|
@@ -49196,7 +49207,7 @@
|
|
|
49196
49207
|
// or closing, which leads us to ignore selection changes from the
|
|
49197
49208
|
// context menu because it looks like the editor isn't focused.
|
|
49198
49209
|
// This kludges around that.
|
|
49199
|
-
return (this.dom.ownerDocument.hasFocus() || browser.safari && ((_a = this.inputState) === null || _a ===
|
|
49210
|
+
return (this.dom.ownerDocument.hasFocus() || browser.safari && ((_a = this.inputState) === null || _a === void 0 ? void 0 : _a.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
|
|
49200
49211
|
}
|
|
49201
49212
|
/**
|
|
49202
49213
|
Put focus on the editor.
|
|
@@ -49349,7 +49360,7 @@
|
|
|
49349
49360
|
var _a;
|
|
49350
49361
|
let content = dom.querySelector(".cm-content");
|
|
49351
49362
|
let cView = content && ContentView.get(content) || ContentView.get(dom);
|
|
49352
|
-
return ((_a = cView === null || cView ===
|
|
49363
|
+
return ((_a = cView === null || cView === void 0 ? void 0 : cView.rootView) === null || _a === void 0 ? void 0 : _a.view) || null;
|
|
49353
49364
|
}
|
|
49354
49365
|
}
|
|
49355
49366
|
/**
|
|
@@ -49667,7 +49678,7 @@
|
|
|
49667
49678
|
let binding = scopeObj[full] || (scopeObj[full] = {
|
|
49668
49679
|
preventDefault: false,
|
|
49669
49680
|
stopPropagation: false,
|
|
49670
|
-
run: ((_b = (_a = scopeObj._any) === null || _a ===
|
|
49681
|
+
run: ((_b = (_a = scopeObj._any) === null || _a === void 0 ? void 0 : _a.run) === null || _b === void 0 ? void 0 : _b.slice()) || []
|
|
49671
49682
|
});
|
|
49672
49683
|
if (command) binding.run.push(command);
|
|
49673
49684
|
if (preventDefault) binding.preventDefault = true;
|
|
@@ -49908,8 +49919,8 @@
|
|
|
49908
49919
|
bottom = Math.max(fromCoords.bottom, toCoords.bottom, bottom);
|
|
49909
49920
|
if (dir == Direction.LTR) horizontal.push(ltr && fromOpen ? leftSide : fromCoords.left, ltr && toOpen ? rightSide : toCoords.right);else horizontal.push(!ltr && toOpen ? leftSide : toCoords.left, !ltr && fromOpen ? rightSide : fromCoords.right);
|
|
49910
49921
|
}
|
|
49911
|
-
let start = from !== null && from !==
|
|
49912
|
-
end = to !== null && to !==
|
|
49922
|
+
let start = from !== null && from !== void 0 ? from : line.from,
|
|
49923
|
+
end = to !== null && to !== void 0 ? to : line.to;
|
|
49913
49924
|
// Split the range by visible range and document line
|
|
49914
49925
|
for (let r of view.visibleRanges) if (r.to > start && r.from < end) {
|
|
49915
49926
|
for (let pos = Math.max(r.from, start), endPos = Math.min(r.to, end);;) {
|
|
@@ -50149,7 +50160,7 @@
|
|
|
50149
50160
|
let cursorPos = update.state.field(dropCursorPos);
|
|
50150
50161
|
if (cursorPos == null) {
|
|
50151
50162
|
if (this.cursor != null) {
|
|
50152
|
-
(_a = this.cursor) === null || _a ===
|
|
50163
|
+
(_a = this.cursor) === null || _a === void 0 ? void 0 : _a.remove();
|
|
50153
50164
|
this.cursor = null;
|
|
50154
50165
|
}
|
|
50155
50166
|
} else {
|
|
@@ -50382,7 +50393,7 @@
|
|
|
50382
50393
|
var _a;
|
|
50383
50394
|
if (_supportsTabSize == null && typeof document != "undefined" && document.body) {
|
|
50384
50395
|
let styles = document.body.style;
|
|
50385
|
-
_supportsTabSize = ((_a = styles.tabSize) !== null && _a !==
|
|
50396
|
+
_supportsTabSize = ((_a = styles.tabSize) !== null && _a !== void 0 ? _a : styles.MozTabSize) != null;
|
|
50386
50397
|
}
|
|
50387
50398
|
return _supportsTabSize || false;
|
|
50388
50399
|
}
|
|
@@ -50721,7 +50732,7 @@
|
|
|
50721
50732
|
});
|
|
50722
50733
|
return [plugin, EditorView.contentAttributes.of(view => {
|
|
50723
50734
|
var _a;
|
|
50724
|
-
return ((_a = view.plugin(plugin)) === null || _a ===
|
|
50735
|
+
return ((_a = view.plugin(plugin)) === null || _a === void 0 ? void 0 : _a.isDown) ? showCrosshair : null;
|
|
50725
50736
|
})];
|
|
50726
50737
|
}
|
|
50727
50738
|
const Outside = "-10000px";
|
|
@@ -50764,7 +50775,7 @@
|
|
|
50764
50775
|
}
|
|
50765
50776
|
for (let t of this.tooltipViews) if (tooltipViews.indexOf(t) < 0) {
|
|
50766
50777
|
this.removeTooltipView(t);
|
|
50767
|
-
(_a = t.destroy) === null || _a ===
|
|
50778
|
+
(_a = t.destroy) === null || _a === void 0 ? void 0 : _a.call(t);
|
|
50768
50779
|
}
|
|
50769
50780
|
if (above) {
|
|
50770
50781
|
newAbove.forEach((val, i) => above[i] = val);
|
|
@@ -50797,9 +50808,9 @@
|
|
|
50797
50808
|
combine: values => {
|
|
50798
50809
|
var _a, _b, _c;
|
|
50799
50810
|
return {
|
|
50800
|
-
position: browser.ios ? "absolute" : ((_a = values.find(conf => conf.position)) === null || _a ===
|
|
50801
|
-
parent: ((_b = values.find(conf => conf.parent)) === null || _b ===
|
|
50802
|
-
tooltipSpace: ((_c = values.find(conf => conf.tooltipSpace)) === null || _c ===
|
|
50811
|
+
position: browser.ios ? "absolute" : ((_a = values.find(conf => conf.position)) === null || _a === void 0 ? void 0 : _a.position) || "fixed",
|
|
50812
|
+
parent: ((_b = values.find(conf => conf.parent)) === null || _b === void 0 ? void 0 : _b.parent) || null,
|
|
50813
|
+
tooltipSpace: ((_c = values.find(conf => conf.tooltipSpace)) === null || _c === void 0 ? void 0 : _c.tooltipSpace) || windowSpace
|
|
50803
50814
|
};
|
|
50804
50815
|
}
|
|
50805
50816
|
});
|
|
@@ -50903,11 +50914,11 @@
|
|
|
50903
50914
|
this.view.win.removeEventListener("resize", this.measureSoon);
|
|
50904
50915
|
for (let tooltipView of this.manager.tooltipViews) {
|
|
50905
50916
|
tooltipView.dom.remove();
|
|
50906
|
-
(_a = tooltipView.destroy) === null || _a ===
|
|
50917
|
+
(_a = tooltipView.destroy) === null || _a === void 0 ? void 0 : _a.call(tooltipView);
|
|
50907
50918
|
}
|
|
50908
50919
|
if (this.parent) this.container.remove();
|
|
50909
|
-
(_b = this.resizeObserver) === null || _b ===
|
|
50910
|
-
(_c = this.intersectionObserver) === null || _c ===
|
|
50920
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
50921
|
+
(_c = this.intersectionObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
50911
50922
|
clearTimeout(this.measureTimeout);
|
|
50912
50923
|
}
|
|
50913
50924
|
readMeasure() {
|
|
@@ -50997,7 +51008,7 @@
|
|
|
50997
51008
|
let arrow = tooltip.arrow ? tView.dom.querySelector(".cm-tooltip-arrow") : null;
|
|
50998
51009
|
let arrowHeight = arrow ? 7 /* Arrow.Size */ : 0;
|
|
50999
51010
|
let width = size.right - size.left,
|
|
51000
|
-
height = (_a = knownHeight.get(tView)) !== null && _a !==
|
|
51011
|
+
height = (_a = knownHeight.get(tView)) !== null && _a !== void 0 ? _a : size.bottom - size.top;
|
|
51001
51012
|
let offset = tView.offset || noOffset,
|
|
51002
51013
|
ltr = this.view.textDirection == Direction.LTR;
|
|
51003
51014
|
let left = size.width > space.right - space.left ? ltr ? space.left : space.right - size.width : ltr ? Math.max(space.left, Math.min(pos.left - (arrow ? 14 /* Arrow.Offset */ : 0) + offset.x, space.right - width)) : Math.min(Math.max(space.left, pos.left - width + (arrow ? 14 /* Arrow.Offset */ : 0) - offset.x), space.right - width);
|
|
@@ -51169,7 +51180,7 @@
|
|
|
51169
51180
|
}
|
|
51170
51181
|
destroy() {
|
|
51171
51182
|
var _a;
|
|
51172
|
-
for (let t of this.manager.tooltipViews) (_a = t.destroy) === null || _a ===
|
|
51183
|
+
for (let t of this.manager.tooltipViews) (_a = t.destroy) === null || _a === void 0 ? void 0 : _a.call(t);
|
|
51173
51184
|
}
|
|
51174
51185
|
passProp(name) {
|
|
51175
51186
|
let value = undefined;
|
|
@@ -51201,7 +51212,7 @@
|
|
|
51201
51212
|
pos: Math.min(...tooltips.map(t => t.pos)),
|
|
51202
51213
|
end: Math.max(...tooltips.map(t => {
|
|
51203
51214
|
var _a;
|
|
51204
|
-
return (_a = t.end) !== null && _a !==
|
|
51215
|
+
return (_a = t.end) !== null && _a !== void 0 ? _a : t.pos;
|
|
51205
51216
|
})),
|
|
51206
51217
|
create: HoverTooltipHost.create,
|
|
51207
51218
|
above: tooltips[0].above,
|
|
@@ -51266,7 +51277,7 @@
|
|
|
51266
51277
|
side = lastMove.x < posCoords.left ? -rtl : rtl;
|
|
51267
51278
|
}
|
|
51268
51279
|
let open = this.source(view, pos, side);
|
|
51269
|
-
if (open === null || open ===
|
|
51280
|
+
if (open === null || open === void 0 ? void 0 : open.then) {
|
|
51270
51281
|
let pending = this.pending = {
|
|
51271
51282
|
pos
|
|
51272
51283
|
};
|
|
@@ -51306,7 +51317,7 @@
|
|
|
51306
51317
|
let {
|
|
51307
51318
|
pos
|
|
51308
51319
|
} = active[0] || this.pending,
|
|
51309
|
-
end = (_b = (_a = active[0]) === null || _a ===
|
|
51320
|
+
end = (_b = (_a = active[0]) === null || _a === void 0 ? void 0 : _a.end) !== null && _b !== void 0 ? _b : pos;
|
|
51310
51321
|
if (pos == end ? this.view.posAtCoords(this.lastMove) != pos : !isOverRange(this.view, pos, end, event.clientX, event.clientY)) {
|
|
51311
51322
|
this.view.dispatch({
|
|
51312
51323
|
effects: this.setHover.of([])
|
|
@@ -52147,7 +52158,7 @@
|
|
|
52147
52158
|
*/
|
|
52148
52159
|
findRegions(state) {
|
|
52149
52160
|
let lang = state.facet(language$1);
|
|
52150
|
-
if ((lang === null || lang ===
|
|
52161
|
+
if ((lang === null || lang === void 0 ? void 0 : lang.data) == this.data) return [{
|
|
52151
52162
|
from: 0,
|
|
52152
52163
|
to: state.doc.length
|
|
52153
52164
|
}];
|
|
@@ -52350,7 +52361,7 @@
|
|
|
52350
52361
|
*/
|
|
52351
52362
|
work(until, upto) {
|
|
52352
52363
|
if (upto != null && upto >= this.state.doc.length) upto = undefined;
|
|
52353
|
-
if (this.tree != Tree.empty && this.isDone(upto !== null && upto !==
|
|
52364
|
+
if (this.tree != Tree.empty && this.isDone(upto !== null && upto !== void 0 ? upto : this.state.doc.length)) {
|
|
52354
52365
|
this.takeTree();
|
|
52355
52366
|
return true;
|
|
52356
52367
|
}
|
|
@@ -52366,10 +52377,10 @@
|
|
|
52366
52377
|
let done = this.parse.advance();
|
|
52367
52378
|
if (done) {
|
|
52368
52379
|
this.fragments = this.withoutTempSkipped(TreeFragment.addTree(done, this.fragments, this.parse.stoppedAt != null));
|
|
52369
|
-
this.treeLen = (_a = this.parse.stoppedAt) !== null && _a !==
|
|
52380
|
+
this.treeLen = (_a = this.parse.stoppedAt) !== null && _a !== void 0 ? _a : this.state.doc.length;
|
|
52370
52381
|
this.tree = done;
|
|
52371
52382
|
this.parse = null;
|
|
52372
|
-
if (this.treeLen < (upto !== null && upto !==
|
|
52383
|
+
if (this.treeLen < (upto !== null && upto !== void 0 ? upto : this.state.doc.length)) this.parse = this.startParse();else return true;
|
|
52373
52384
|
}
|
|
52374
52385
|
if (until()) return false;
|
|
52375
52386
|
}
|
|
@@ -52591,7 +52602,7 @@
|
|
|
52591
52602
|
}, 100 /* Work.MinPause */);
|
|
52592
52603
|
return () => idle < 0 ? clearTimeout(timeout) : cancelIdleCallback(idle);
|
|
52593
52604
|
};
|
|
52594
|
-
const isInputPending = typeof navigator != "undefined" && ((_a = navigator.scheduling) === null || _a ===
|
|
52605
|
+
const isInputPending = typeof navigator != "undefined" && ((_a = navigator.scheduling) === null || _a === void 0 ? void 0 : _a.isInputPending) ? () => navigator.scheduling.isInputPending() : null;
|
|
52595
52606
|
const parseWorker = /*@__PURE__*/ViewPlugin.fromClass(class ParseWorker {
|
|
52596
52607
|
constructor(view) {
|
|
52597
52608
|
this.view = view;
|
|
@@ -53312,7 +53323,7 @@
|
|
|
53312
53323
|
function findFold(state, from, to) {
|
|
53313
53324
|
var _a;
|
|
53314
53325
|
let found = null;
|
|
53315
|
-
(_a = state.field(foldState, false)) === null || _a ===
|
|
53326
|
+
(_a = state.field(foldState, false)) === null || _a === void 0 ? void 0 : _a.between(from, to, (from, to) => {
|
|
53316
53327
|
if (!found || found.from > from) found = {
|
|
53317
53328
|
from,
|
|
53318
53329
|
to
|
|
@@ -53546,7 +53557,7 @@
|
|
|
53546
53557
|
class: "cm-foldGutter",
|
|
53547
53558
|
markers(view) {
|
|
53548
53559
|
var _a;
|
|
53549
|
-
return ((_a = view.plugin(markers)) === null || _a ===
|
|
53560
|
+
return ((_a = view.plugin(markers)) === null || _a === void 0 ? void 0 : _a.markers) || RangeSet.empty;
|
|
53550
53561
|
},
|
|
53551
53562
|
initialSpacer() {
|
|
53552
53563
|
return new FoldMarker(fullConfig, false);
|
|
@@ -53663,7 +53674,7 @@
|
|
|
53663
53674
|
if (highlighter.module) ext.push(EditorView.styleModule.of(highlighter.module));
|
|
53664
53675
|
themeType = highlighter.themeType;
|
|
53665
53676
|
}
|
|
53666
|
-
if (options === null || options ===
|
|
53677
|
+
if (options === null || options === void 0 ? void 0 : options.fallback) ext.push(fallbackHighlighter.of(highlighter));else if (themeType) ext.push(highlighterFacet.computeN([EditorView.darkTheme], state => {
|
|
53667
53678
|
return state.facet(EditorView.darkTheme) == (themeType == "dark") ? [highlighter] : [];
|
|
53668
53679
|
}));else ext.push(highlighterFacet.of(highlighter));
|
|
53669
53680
|
return ext;
|
|
@@ -53882,7 +53893,7 @@
|
|
|
53882
53893
|
to: handle.to
|
|
53883
53894
|
};
|
|
53884
53895
|
let depth = 0,
|
|
53885
|
-
cursor = parent === null || parent ===
|
|
53896
|
+
cursor = parent === null || parent === void 0 ? void 0 : parent.cursor();
|
|
53886
53897
|
if (cursor && (dir < 0 ? cursor.childBefore(token.from) : cursor.childAfter(token.to))) do {
|
|
53887
53898
|
if (dir < 0 ? cursor.to <= token.from : cursor.from >= token.to) {
|
|
53888
53899
|
if (depth == 0 && matching.indexOf(cursor.type.name) > -1 && cursor.from < cursor.to) {
|
|
@@ -54017,16 +54028,7 @@
|
|
|
54017
54028
|
dir: "ltr"
|
|
54018
54029
|
},
|
|
54019
54030
|
bidiIsolate: Direction.LTR
|
|
54020
|
-
})
|
|
54021
|
-
auto: /*@__PURE__*/Decoration.mark({
|
|
54022
|
-
class: "cm-iso",
|
|
54023
|
-
inclusive: true,
|
|
54024
|
-
attributes: {
|
|
54025
|
-
dir: "auto"
|
|
54026
|
-
},
|
|
54027
|
-
bidiIsolate: null
|
|
54028
|
-
})
|
|
54029
|
-
});
|
|
54031
|
+
})});
|
|
54030
54032
|
|
|
54031
54033
|
/**
|
|
54032
54034
|
An instance of this is passed to completion source functions.
|
|
@@ -54166,19 +54168,6 @@
|
|
|
54166
54168
|
} : null;
|
|
54167
54169
|
};
|
|
54168
54170
|
}
|
|
54169
|
-
/**
|
|
54170
|
-
Wrap the given completion source so that it will not fire when the
|
|
54171
|
-
cursor is in a syntax node with one of the given names.
|
|
54172
|
-
*/
|
|
54173
|
-
function ifNotIn(nodes, source) {
|
|
54174
|
-
return context => {
|
|
54175
|
-
for (let pos = syntaxTree(context.state).resolveInner(context.pos, -1); pos; pos = pos.parent) {
|
|
54176
|
-
if (nodes.indexOf(pos.name) > -1) return null;
|
|
54177
|
-
if (pos.type.isTop) break;
|
|
54178
|
-
}
|
|
54179
|
-
return source(context);
|
|
54180
|
-
};
|
|
54181
|
-
}
|
|
54182
54171
|
class Option {
|
|
54183
54172
|
constructor(completion, source, match, score) {
|
|
54184
54173
|
this.completion = completion;
|
|
@@ -54200,7 +54189,7 @@
|
|
|
54200
54189
|
let addStart = start && source[0] != "^",
|
|
54201
54190
|
addEnd = source[source.length - 1] != "$";
|
|
54202
54191
|
if (!addStart && !addEnd) return expr;
|
|
54203
|
-
return new RegExp(`${addStart ? "^" : ""}(?:${source})${addEnd ? "$" : ""}`, (_a = expr.flags) !== null && _a !==
|
|
54192
|
+
return new RegExp(`${addStart ? "^" : ""}(?:${source})${addEnd ? "$" : ""}`, (_a = expr.flags) !== null && _a !== void 0 ? _a : expr.ignoreCase ? "i" : "");
|
|
54204
54193
|
}
|
|
54205
54194
|
/**
|
|
54206
54195
|
This annotation is added to transactions that are produced by
|
|
@@ -54595,7 +54584,7 @@
|
|
|
54595
54584
|
this.showOptions(options, cState.id);
|
|
54596
54585
|
}
|
|
54597
54586
|
this.updateSel();
|
|
54598
|
-
if (disabled != ((_a = prevState.open) === null || _a ===
|
|
54587
|
+
if (disabled != ((_a = prevState.open) === null || _a === void 0 ? void 0 : _a.disabled)) this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!disabled);
|
|
54599
54588
|
}
|
|
54600
54589
|
}
|
|
54601
54590
|
updateTooltipClass(state) {
|
|
@@ -54680,12 +54669,12 @@
|
|
|
54680
54669
|
let selRect = sel.getBoundingClientRect();
|
|
54681
54670
|
let space = this.space;
|
|
54682
54671
|
if (!space) {
|
|
54683
|
-
let
|
|
54672
|
+
let docElt = this.dom.ownerDocument.documentElement;
|
|
54684
54673
|
space = {
|
|
54685
54674
|
left: 0,
|
|
54686
54675
|
top: 0,
|
|
54687
|
-
right:
|
|
54688
|
-
bottom:
|
|
54676
|
+
right: docElt.clientWidth,
|
|
54677
|
+
bottom: docElt.clientHeight
|
|
54689
54678
|
};
|
|
54690
54679
|
}
|
|
54691
54680
|
if (selRect.top > Math.min(space.bottom, listRect.bottom) - 10 || selRect.bottom < Math.max(space.top, listRect.top) + 10) return null;
|
|
@@ -54707,6 +54696,10 @@
|
|
|
54707
54696
|
ul.setAttribute("role", "listbox");
|
|
54708
54697
|
ul.setAttribute("aria-expanded", "true");
|
|
54709
54698
|
ul.setAttribute("aria-label", this.view.state.phrase("Completions"));
|
|
54699
|
+
ul.addEventListener("mousedown", e => {
|
|
54700
|
+
// Prevent focus change when clicking the scrollbar
|
|
54701
|
+
if (e.target == ul) e.preventDefault();
|
|
54702
|
+
});
|
|
54710
54703
|
let curSection = null;
|
|
54711
54704
|
for (let i = range.from; i < range.to; i++) {
|
|
54712
54705
|
let {
|
|
@@ -54806,7 +54799,7 @@
|
|
|
54806
54799
|
pos = 0;
|
|
54807
54800
|
let cmp = (a, b) => {
|
|
54808
54801
|
var _a, _b;
|
|
54809
|
-
return ((_a = a.rank) !== null && _a !==
|
|
54802
|
+
return ((_a = a.rank) !== null && _a !== void 0 ? _a : 1e9) - ((_b = b.rank) !== null && _b !== void 0 ? _b : 1e9) || (a.name < b.name ? -1 : 1);
|
|
54810
54803
|
};
|
|
54811
54804
|
for (let s of sections.sort(cmp)) {
|
|
54812
54805
|
pos -= 1e5;
|
|
@@ -54991,7 +54984,7 @@
|
|
|
54991
54984
|
if (pos > to || !result || type & 2 /* UpdateType.Backspacing */ && (cur(tr.startState) == this.from || pos < this.limit)) return new ActiveSource(this.source, type & 4 /* UpdateType.Activate */ ? 1 /* State.Pending */ : 0 /* State.Inactive */);
|
|
54992
54985
|
let limit = tr.changes.mapPos(this.limit);
|
|
54993
54986
|
if (checkValid(result.validFor, tr.state, from, to)) return new ActiveResult(this.source, this.explicit, limit, result, from, to);
|
|
54994
|
-
if (result.update && (result = result.update(result, from, to, new CompletionContext(tr.state, pos, false)))) return new ActiveResult(this.source, this.explicit, limit, result, result.from, (_a = result.to) !== null && _a !==
|
|
54987
|
+
if (result.update && (result = result.update(result, from, to, new CompletionContext(tr.state, pos, false)))) return new ActiveResult(this.source, this.explicit, limit, result, result.from, (_a = result.to) !== null && _a !== void 0 ? _a : cur(tr.state));
|
|
54995
54988
|
return new ActiveSource(this.source, 1 /* State.Pending */, this.explicit);
|
|
54996
54989
|
}
|
|
54997
54990
|
map(mapping) {
|
|
@@ -55193,7 +55186,7 @@
|
|
|
55193
55186
|
if (query.done) {
|
|
55194
55187
|
let pos = cur(query.updates.length ? query.updates[0].startState : this.view.state);
|
|
55195
55188
|
let limit = Math.min(pos, query.done.from + (query.active.explicit ? 0 : 1));
|
|
55196
|
-
let active = new ActiveResult(query.active.source, query.active.explicit, limit, query.done, query.done.from, (_a = query.done.to) !== null && _a !==
|
|
55189
|
+
let active = new ActiveResult(query.active.source, query.active.explicit, limit, query.done, query.done.from, (_a = query.done.to) !== null && _a !== void 0 ? _a : pos);
|
|
55197
55190
|
// Replay the transactions that happened since the start of
|
|
55198
55191
|
// the request and see if that preserves the result
|
|
55199
55192
|
for (let tr of query.updates) active = active.update(tr, conf);
|
|
@@ -55749,7 +55742,7 @@
|
|
|
55749
55742
|
function closeBrackets() {
|
|
55750
55743
|
return [inputHandler, bracketState];
|
|
55751
55744
|
}
|
|
55752
|
-
const definedClosing = "()[]{}
|
|
55745
|
+
const definedClosing = "()[]{}<>«»»«[]{}";
|
|
55753
55746
|
function closing(ch) {
|
|
55754
55747
|
for (let i = 0; i < definedClosing.length; i += 2) if (definedClosing.charCodeAt(i) == ch) return definedClosing.charAt(i + 1);
|
|
55755
55748
|
return fromCodePoint(ch < 128 ? ch : ch + 1);
|
|
@@ -56411,9 +56404,9 @@
|
|
|
56411
56404
|
toJSON() {
|
|
56412
56405
|
var _a, _b, _c;
|
|
56413
56406
|
return {
|
|
56414
|
-
changes: (_a = this.changes) === null || _a ===
|
|
56415
|
-
mapped: (_b = this.mapped) === null || _b ===
|
|
56416
|
-
startSelection: (_c = this.startSelection) === null || _c ===
|
|
56407
|
+
changes: (_a = this.changes) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
56408
|
+
mapped: (_b = this.mapped) === null || _b === void 0 ? void 0 : _b.toJSON(),
|
|
56409
|
+
startSelection: (_c = this.startSelection) === null || _c === void 0 ? void 0 : _c.toJSON(),
|
|
56417
56410
|
selectionsAfter: this.selectionsAfter.map(s => s.toJSON())
|
|
56418
56411
|
};
|
|
56419
56412
|
}
|
|
@@ -56714,8 +56707,8 @@
|
|
|
56714
56707
|
if (selfScroll) {
|
|
56715
56708
|
for (let source of view.state.facet(EditorView.scrollMargins)) {
|
|
56716
56709
|
let margins = source(view);
|
|
56717
|
-
if (margins === null || margins ===
|
|
56718
|
-
if (margins === null || margins ===
|
|
56710
|
+
if (margins === null || margins === void 0 ? void 0 : margins.top) marginTop = Math.max(margins === null || margins === void 0 ? void 0 : margins.top, marginTop);
|
|
56711
|
+
if (margins === null || margins === void 0 ? void 0 : margins.bottom) marginBottom = Math.max(margins === null || margins === void 0 ? void 0 : margins.bottom, marginBottom);
|
|
56719
56712
|
}
|
|
56720
56713
|
height = view.scrollDOM.clientHeight - marginTop - marginBottom;
|
|
56721
56714
|
} else {
|
|
@@ -58233,7 +58226,7 @@
|
|
|
58233
58226
|
class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity
|
|
58234
58227
|
}, crelt("span", {
|
|
58235
58228
|
class: "cm-diagnosticText"
|
|
58236
|
-
}, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a = diagnostic.actions) === null || _a ===
|
|
58229
|
+
}, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
|
58237
58230
|
let fired = false,
|
|
58238
58231
|
click = e => {
|
|
58239
58232
|
e.preventDefault();
|
|
@@ -59509,7 +59502,7 @@
|
|
|
59509
59502
|
}
|
|
59510
59503
|
/// @internal
|
|
59511
59504
|
addNode(block, from, to) {
|
|
59512
|
-
if (typeof block == "number") block = new Tree(this.parser.nodeSet.types[block], none, none, (to !== null && to !==
|
|
59505
|
+
if (typeof block == "number") block = new Tree(this.parser.nodeSet.types[block], none, none, (to !== null && to !== void 0 ? to : this.prevLineEnd()) - from);
|
|
59513
59506
|
this.block.addChild(block, from - this.block.from);
|
|
59514
59507
|
}
|
|
59515
59508
|
/// Add a block element. Can be called by [block
|
|
@@ -60340,190 +60333,6 @@
|
|
|
60340
60333
|
});
|
|
60341
60334
|
/// The default CommonMark parser.
|
|
60342
60335
|
const parser$2 = new MarkdownParser(new NodeSet(nodeTypes).extend(markdownHighlighting), Object.keys(DefaultBlockParsers).map(n => DefaultBlockParsers[n]), Object.keys(DefaultBlockParsers).map(n => DefaultLeafBlocks[n]), Object.keys(DefaultBlockParsers), DefaultEndLeaf, DefaultSkipMarkup, Object.keys(DefaultInline).map(n => DefaultInline[n]), Object.keys(DefaultInline), []);
|
|
60343
|
-
const StrikethroughDelim = {
|
|
60344
|
-
resolve: "Strikethrough",
|
|
60345
|
-
mark: "StrikethroughMark"
|
|
60346
|
-
};
|
|
60347
|
-
/// An extension that implements
|
|
60348
|
-
/// [GFM-style](https://github.github.com/gfm/#strikethrough-extension-)
|
|
60349
|
-
/// Strikethrough syntax using `~~` delimiters.
|
|
60350
|
-
({
|
|
60351
|
-
defineNodes: [{
|
|
60352
|
-
name: "Strikethrough",
|
|
60353
|
-
style: {
|
|
60354
|
-
"Strikethrough/...": tags.strikethrough
|
|
60355
|
-
}
|
|
60356
|
-
}, {
|
|
60357
|
-
name: "StrikethroughMark",
|
|
60358
|
-
style: tags.processingInstruction
|
|
60359
|
-
}],
|
|
60360
|
-
parseInline: [{
|
|
60361
|
-
name: "Strikethrough",
|
|
60362
|
-
parse(cx, next, pos) {
|
|
60363
|
-
if (next != 126 /* '~' */ || cx.char(pos + 1) != 126 || cx.char(pos + 2) == 126) return -1;
|
|
60364
|
-
let before = cx.slice(pos - 1, pos),
|
|
60365
|
-
after = cx.slice(pos + 2, pos + 3);
|
|
60366
|
-
let sBefore = /\s|^$/.test(before),
|
|
60367
|
-
sAfter = /\s|^$/.test(after);
|
|
60368
|
-
let pBefore = Punctuation.test(before),
|
|
60369
|
-
pAfter = Punctuation.test(after);
|
|
60370
|
-
return cx.addDelimiter(StrikethroughDelim, pos, pos + 2, !sAfter && (!pAfter || sBefore || pBefore), !sBefore && (!pBefore || sAfter || pAfter));
|
|
60371
|
-
},
|
|
60372
|
-
after: "Emphasis"
|
|
60373
|
-
}]
|
|
60374
|
-
});
|
|
60375
|
-
function parseRow(cx, line, startI = 0, elts, offset = 0) {
|
|
60376
|
-
let count = 0,
|
|
60377
|
-
first = true,
|
|
60378
|
-
cellStart = -1,
|
|
60379
|
-
cellEnd = -1,
|
|
60380
|
-
esc = false;
|
|
60381
|
-
let parseCell = () => {
|
|
60382
|
-
elts.push(cx.elt("TableCell", offset + cellStart, offset + cellEnd, cx.parser.parseInline(line.slice(cellStart, cellEnd), offset + cellStart)));
|
|
60383
|
-
};
|
|
60384
|
-
for (let i = startI; i < line.length; i++) {
|
|
60385
|
-
let next = line.charCodeAt(i);
|
|
60386
|
-
if (next == 124 /* '|' */ && !esc) {
|
|
60387
|
-
if (!first || cellStart > -1) count++;
|
|
60388
|
-
first = false;
|
|
60389
|
-
if (elts) {
|
|
60390
|
-
if (cellStart > -1) parseCell();
|
|
60391
|
-
elts.push(cx.elt("TableDelimiter", i + offset, i + offset + 1));
|
|
60392
|
-
}
|
|
60393
|
-
cellStart = cellEnd = -1;
|
|
60394
|
-
} else if (esc || next != 32 && next != 9) {
|
|
60395
|
-
if (cellStart < 0) cellStart = i;
|
|
60396
|
-
cellEnd = i + 1;
|
|
60397
|
-
}
|
|
60398
|
-
esc = !esc && next == 92;
|
|
60399
|
-
}
|
|
60400
|
-
if (cellStart > -1) {
|
|
60401
|
-
count++;
|
|
60402
|
-
if (elts) parseCell();
|
|
60403
|
-
}
|
|
60404
|
-
return count;
|
|
60405
|
-
}
|
|
60406
|
-
function hasPipe(str, start) {
|
|
60407
|
-
for (let i = start; i < str.length; i++) {
|
|
60408
|
-
let next = str.charCodeAt(i);
|
|
60409
|
-
if (next == 124 /* '|' */) return true;
|
|
60410
|
-
if (next == 92 /* '\\' */) i++;
|
|
60411
|
-
}
|
|
60412
|
-
return false;
|
|
60413
|
-
}
|
|
60414
|
-
const delimiterLine = /^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;
|
|
60415
|
-
class TableParser {
|
|
60416
|
-
constructor() {
|
|
60417
|
-
// Null means we haven't seen the second line yet, false means this
|
|
60418
|
-
// isn't a table, and an array means this is a table and we've
|
|
60419
|
-
// parsed the given rows so far.
|
|
60420
|
-
this.rows = null;
|
|
60421
|
-
}
|
|
60422
|
-
nextLine(cx, line, leaf) {
|
|
60423
|
-
if (this.rows == null) {
|
|
60424
|
-
// Second line
|
|
60425
|
-
this.rows = false;
|
|
60426
|
-
let lineText;
|
|
60427
|
-
if ((line.next == 45 || line.next == 58 || line.next == 124 /* '-:|' */) && delimiterLine.test(lineText = line.text.slice(line.pos))) {
|
|
60428
|
-
let firstRow = [],
|
|
60429
|
-
firstCount = parseRow(cx, leaf.content, 0, firstRow, leaf.start);
|
|
60430
|
-
if (firstCount == parseRow(cx, lineText, line.pos)) this.rows = [cx.elt("TableHeader", leaf.start, leaf.start + leaf.content.length, firstRow), cx.elt("TableDelimiter", cx.lineStart + line.pos, cx.lineStart + line.text.length)];
|
|
60431
|
-
}
|
|
60432
|
-
} else if (this.rows) {
|
|
60433
|
-
// Line after the second
|
|
60434
|
-
let content = [];
|
|
60435
|
-
parseRow(cx, line.text, line.pos, content, cx.lineStart);
|
|
60436
|
-
this.rows.push(cx.elt("TableRow", cx.lineStart + line.pos, cx.lineStart + line.text.length, content));
|
|
60437
|
-
}
|
|
60438
|
-
return false;
|
|
60439
|
-
}
|
|
60440
|
-
finish(cx, leaf) {
|
|
60441
|
-
if (!this.rows) return false;
|
|
60442
|
-
cx.addLeafElement(leaf, cx.elt("Table", leaf.start, leaf.start + leaf.content.length, this.rows));
|
|
60443
|
-
return true;
|
|
60444
|
-
}
|
|
60445
|
-
}
|
|
60446
|
-
/// This extension provides
|
|
60447
|
-
/// [GFM-style](https://github.github.com/gfm/#tables-extension-)
|
|
60448
|
-
/// tables, using syntax like this:
|
|
60449
|
-
///
|
|
60450
|
-
/// ```
|
|
60451
|
-
/// | head 1 | head 2 |
|
|
60452
|
-
/// | --- | --- |
|
|
60453
|
-
/// | cell 1 | cell 2 |
|
|
60454
|
-
/// ```
|
|
60455
|
-
({
|
|
60456
|
-
defineNodes: [{
|
|
60457
|
-
name: "Table",
|
|
60458
|
-
block: true
|
|
60459
|
-
}, {
|
|
60460
|
-
name: "TableHeader",
|
|
60461
|
-
style: {
|
|
60462
|
-
"TableHeader/...": tags.heading
|
|
60463
|
-
}
|
|
60464
|
-
}, "TableRow", {
|
|
60465
|
-
name: "TableCell",
|
|
60466
|
-
style: tags.content
|
|
60467
|
-
}, {
|
|
60468
|
-
name: "TableDelimiter",
|
|
60469
|
-
style: tags.processingInstruction
|
|
60470
|
-
}],
|
|
60471
|
-
parseBlock: [{
|
|
60472
|
-
name: "Table",
|
|
60473
|
-
leaf(_, leaf) {
|
|
60474
|
-
return hasPipe(leaf.content, 0) ? new TableParser() : null;
|
|
60475
|
-
},
|
|
60476
|
-
endLeaf(cx, line, leaf) {
|
|
60477
|
-
if (leaf.parsers.some(p => p instanceof TableParser) || !hasPipe(line.text, line.basePos)) return false;
|
|
60478
|
-
let next = cx.scanLine(cx.absoluteLineEnd + 1).text;
|
|
60479
|
-
return delimiterLine.test(next) && parseRow(cx, line.text, line.basePos) == parseRow(cx, next, line.basePos);
|
|
60480
|
-
},
|
|
60481
|
-
before: "SetextHeading"
|
|
60482
|
-
}]
|
|
60483
|
-
});
|
|
60484
|
-
class TaskParser {
|
|
60485
|
-
nextLine() {
|
|
60486
|
-
return false;
|
|
60487
|
-
}
|
|
60488
|
-
finish(cx, leaf) {
|
|
60489
|
-
cx.addLeafElement(leaf, cx.elt("Task", leaf.start, leaf.start + leaf.content.length, [cx.elt("TaskMarker", leaf.start, leaf.start + 3), ...cx.parser.parseInline(leaf.content.slice(3), leaf.start + 3)]));
|
|
60490
|
-
return true;
|
|
60491
|
-
}
|
|
60492
|
-
}
|
|
60493
|
-
/// Extension providing
|
|
60494
|
-
/// [GFM-style](https://github.github.com/gfm/#task-list-items-extension-)
|
|
60495
|
-
/// task list items, where list items can be prefixed with `[ ]` or
|
|
60496
|
-
/// `[x]` to add a checkbox.
|
|
60497
|
-
({
|
|
60498
|
-
defineNodes: [{
|
|
60499
|
-
name: "Task",
|
|
60500
|
-
block: true,
|
|
60501
|
-
style: tags.list
|
|
60502
|
-
}, {
|
|
60503
|
-
name: "TaskMarker",
|
|
60504
|
-
style: tags.atom
|
|
60505
|
-
}],
|
|
60506
|
-
parseBlock: [{
|
|
60507
|
-
name: "TaskList",
|
|
60508
|
-
leaf(cx, leaf) {
|
|
60509
|
-
return /^\[[ xX]\][ \t]/.test(leaf.content) && cx.parentType().name == "ListItem" ? new TaskParser() : null;
|
|
60510
|
-
},
|
|
60511
|
-
after: "SetextHeading"
|
|
60512
|
-
}]
|
|
60513
|
-
});
|
|
60514
|
-
function parseSubSuper(ch, node, mark) {
|
|
60515
|
-
return (cx, next, pos) => {
|
|
60516
|
-
if (next != ch || cx.char(pos + 1) == ch) return -1;
|
|
60517
|
-
let elts = [cx.elt(mark, pos, pos + 1)];
|
|
60518
|
-
for (let i = pos + 1; i < cx.end; i++) {
|
|
60519
|
-
let next = cx.char(i);
|
|
60520
|
-
if (next == ch) return cx.addElement(cx.elt(node, pos, i + 1, elts.concat(cx.elt(mark, i, i + 1))));
|
|
60521
|
-
if (next == 92 /* '\\' */) elts.push(cx.elt("Escape", i, i++ + 2));
|
|
60522
|
-
if (space(next)) break;
|
|
60523
|
-
}
|
|
60524
|
-
return -1;
|
|
60525
|
-
};
|
|
60526
|
-
}
|
|
60527
60336
|
/// Extension providing
|
|
60528
60337
|
/// [Pandoc-style](https://pandoc.org/MANUAL.html#superscripts-and-subscripts)
|
|
60529
60338
|
/// superscript using `^` markers.
|
|
@@ -60534,12 +60343,7 @@
|
|
|
60534
60343
|
}, {
|
|
60535
60344
|
name: "SuperscriptMark",
|
|
60536
60345
|
style: tags.processingInstruction
|
|
60537
|
-
}]
|
|
60538
|
-
parseInline: [{
|
|
60539
|
-
name: "Superscript",
|
|
60540
|
-
parse: parseSubSuper(94 /* '^' */, "Superscript", "SuperscriptMark")
|
|
60541
|
-
}]
|
|
60542
|
-
});
|
|
60346
|
+
}]});
|
|
60543
60347
|
/// Extension providing
|
|
60544
60348
|
/// [Pandoc-style](https://pandoc.org/MANUAL.html#superscripts-and-subscripts)
|
|
60545
60349
|
/// subscript using `~` markers.
|
|
@@ -60550,28 +60354,7 @@
|
|
|
60550
60354
|
}, {
|
|
60551
60355
|
name: "SubscriptMark",
|
|
60552
60356
|
style: tags.processingInstruction
|
|
60553
|
-
}]
|
|
60554
|
-
parseInline: [{
|
|
60555
|
-
name: "Subscript",
|
|
60556
|
-
parse: parseSubSuper(126 /* '~' */, "Subscript", "SubscriptMark")
|
|
60557
|
-
}]
|
|
60558
|
-
});
|
|
60559
|
-
/// Extension that parses two colons with only letters, underscores,
|
|
60560
|
-
/// and numbers between them as `Emoji` nodes.
|
|
60561
|
-
({
|
|
60562
|
-
defineNodes: [{
|
|
60563
|
-
name: "Emoji",
|
|
60564
|
-
style: tags.character
|
|
60565
|
-
}],
|
|
60566
|
-
parseInline: [{
|
|
60567
|
-
name: "Emoji",
|
|
60568
|
-
parse(cx, next, pos) {
|
|
60569
|
-
let match;
|
|
60570
|
-
if (next != 58 /* ':' */ || !(match = /^[a-zA-Z_0-9]+:/.exec(cx.slice(pos + 1, cx.end)))) return -1;
|
|
60571
|
-
return cx.addElement(cx.elt("Emoji", pos, pos + 1 + match[0].length));
|
|
60572
|
-
}
|
|
60573
|
-
}]
|
|
60574
|
-
});
|
|
60357
|
+
}]});
|
|
60575
60358
|
|
|
60576
60359
|
/**
|
|
60577
60360
|
* @typedef {import('@lezer/common').Tree} Tree
|
|
@@ -60646,7 +60429,7 @@
|
|
|
60646
60429
|
from,
|
|
60647
60430
|
to,
|
|
60648
60431
|
message: 'First item is accessed via [1]',
|
|
60649
|
-
severity: '
|
|
60432
|
+
severity: 'warning',
|
|
60650
60433
|
type: RULE_NAME,
|
|
60651
60434
|
actions: [{
|
|
60652
60435
|
name: 'fix',
|
|
@@ -60793,7 +60576,6 @@
|
|
|
60793
60576
|
darkGrey: '#2f3d58',
|
|
60794
60577
|
grey: '#404a5c',
|
|
60795
60578
|
midGrey: '#576071',
|
|
60796
|
-
lightGrey: '#c5d1e5',
|
|
60797
60579
|
offWhite: '#d9e0f5',
|
|
60798
60580
|
snowWhite: '#eaf1ff',
|
|
60799
60581
|
white: '#ffffff',
|
|
@@ -61705,7 +61487,7 @@
|
|
|
61705
61487
|
};
|
|
61706
61488
|
|
|
61707
61489
|
/**
|
|
61708
|
-
* marked v15.0.
|
|
61490
|
+
* marked v15.0.7 - a markdown parser
|
|
61709
61491
|
* Copyright (c) 2011-2025, Christopher Jeffrey. (MIT Licensed)
|
|
61710
61492
|
* https://github.com/markedjs/marked
|
|
61711
61493
|
*/
|
|
@@ -61821,12 +61603,22 @@
|
|
|
61821
61603
|
const hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
61822
61604
|
const heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
61823
61605
|
const bullet = /(?:[*+-]|\d{1,9}[.)])/;
|
|
61824
|
-
const
|
|
61606
|
+
const lheadingCore = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
61607
|
+
const lheading = edit(lheadingCore).replace(/bull/g, bullet) // lists can interrupt
|
|
61608
|
+
.replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt
|
|
61609
|
+
.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
|
|
61610
|
+
.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
|
|
61611
|
+
.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
|
|
61612
|
+
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
|
|
61613
|
+
.replace(/\|table/g, '') // table not in commonmark
|
|
61614
|
+
.getRegex();
|
|
61615
|
+
const lheadingGfm = edit(lheadingCore).replace(/bull/g, bullet) // lists can interrupt
|
|
61825
61616
|
.replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt
|
|
61826
61617
|
.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
|
|
61827
61618
|
.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
|
|
61828
61619
|
.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
|
|
61829
61620
|
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
|
|
61621
|
+
.replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/) // table can interrupt
|
|
61830
61622
|
.getRegex();
|
|
61831
61623
|
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
|
|
61832
61624
|
const blockText = /^[^\n]+/;
|
|
@@ -61879,6 +61671,7 @@
|
|
|
61879
61671
|
.getRegex();
|
|
61880
61672
|
const blockGfm = {
|
|
61881
61673
|
...blockNormal,
|
|
61674
|
+
lheading: lheadingGfm,
|
|
61882
61675
|
table: gfmTable,
|
|
61883
61676
|
paragraph: edit(_paragraph).replace('hr', hr).replace('heading', ' {0,3}#{1,6}(?:\\s|$)').replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs
|
|
61884
61677
|
.replace('table', gfmTable) // interrupt paragraphs with table
|
|
@@ -65051,7 +64844,6 @@
|
|
|
65051
64844
|
* @enum { String }
|
|
65052
64845
|
*/
|
|
65053
64846
|
const LOAD_STATES = {
|
|
65054
|
-
LOADING: 'loading',
|
|
65055
64847
|
LOADED: 'loaded',
|
|
65056
64848
|
ERROR: 'error'
|
|
65057
64849
|
};
|
|
@@ -65261,6 +65053,8 @@
|
|
|
65261
65053
|
const overflowY = style.overflowY || style.overflow;
|
|
65262
65054
|
return (overflowY === 'auto' || overflowY === 'scroll') && el.scrollHeight > el.clientHeight;
|
|
65263
65055
|
}
|
|
65056
|
+
const EMPTY_OBJECT = {};
|
|
65057
|
+
const EMPTY_ARRAY$2 = [];
|
|
65264
65058
|
|
|
65265
65059
|
/**
|
|
65266
65060
|
* Custom hook to scroll an element within a scrollable container.
|
|
@@ -65275,8 +65069,8 @@
|
|
|
65275
65069
|
* @param {Array} [flagRefs] - An array of refs that are used as flags to control when to scroll.
|
|
65276
65070
|
*/
|
|
65277
65071
|
function useScrollIntoView(scrolledElementRef, deps, scrollOptions, flagRefs) {
|
|
65278
|
-
const _scrollOptions = scrollOptions;
|
|
65279
|
-
const _flagRefs = flagRefs;
|
|
65072
|
+
const _scrollOptions = scrollOptions || EMPTY_OBJECT;
|
|
65073
|
+
const _flagRefs = flagRefs || EMPTY_ARRAY$2;
|
|
65280
65074
|
p(() => {
|
|
65281
65075
|
// return early if flags are not raised, or component is not mounted
|
|
65282
65076
|
if (some(_flagRefs, ref => !ref.current) || !scrolledElementRef.current) {
|
|
@@ -70371,6 +70165,59 @@
|
|
|
70371
70165
|
return data.filter(isValidDocument);
|
|
70372
70166
|
}
|
|
70373
70167
|
|
|
70168
|
+
/**
|
|
70169
|
+
* @param {Object} props
|
|
70170
|
+
* @param {string} props.url
|
|
70171
|
+
* @param {string} props.fileName
|
|
70172
|
+
* @param {Function} props.onError
|
|
70173
|
+
* @param {string} props.errorMessageId
|
|
70174
|
+
* @returns {import("preact").JSX.Element}
|
|
70175
|
+
*/
|
|
70176
|
+
function PdfRenderer(props) {
|
|
70177
|
+
const {
|
|
70178
|
+
url,
|
|
70179
|
+
onError,
|
|
70180
|
+
errorMessageId
|
|
70181
|
+
} = props;
|
|
70182
|
+
const [pdfObjectUrl, setPdfObjectUrl] = h(null);
|
|
70183
|
+
const [hasError, setHasError] = h(false);
|
|
70184
|
+
p(() => {
|
|
70185
|
+
let objectUrl = null;
|
|
70186
|
+
const fetchPdf = async () => {
|
|
70187
|
+
try {
|
|
70188
|
+
const response = await fetch(url);
|
|
70189
|
+
if (!response.ok) {
|
|
70190
|
+
setHasError(true);
|
|
70191
|
+
onError();
|
|
70192
|
+
return;
|
|
70193
|
+
}
|
|
70194
|
+
const blob = await response.blob();
|
|
70195
|
+
objectUrl = URL.createObjectURL(blob);
|
|
70196
|
+
setPdfObjectUrl(objectUrl);
|
|
70197
|
+
} catch {
|
|
70198
|
+
setHasError(true);
|
|
70199
|
+
onError();
|
|
70200
|
+
}
|
|
70201
|
+
};
|
|
70202
|
+
fetchPdf();
|
|
70203
|
+
return () => {
|
|
70204
|
+
if (objectUrl) {
|
|
70205
|
+
URL.revokeObjectURL(objectUrl);
|
|
70206
|
+
}
|
|
70207
|
+
};
|
|
70208
|
+
}, [url, onError]);
|
|
70209
|
+
return o(k$2, {
|
|
70210
|
+
children: [pdfObjectUrl ? o("embed", {
|
|
70211
|
+
src: pdfObjectUrl,
|
|
70212
|
+
type: "application/pdf",
|
|
70213
|
+
class: `fjs-${type$k}-pdf-viewer`
|
|
70214
|
+
}) : null, hasError ? o(Errors, {
|
|
70215
|
+
id: errorMessageId,
|
|
70216
|
+
errors: ['Unable to download document']
|
|
70217
|
+
}) : null]
|
|
70218
|
+
});
|
|
70219
|
+
}
|
|
70220
|
+
|
|
70374
70221
|
/**
|
|
70375
70222
|
*
|
|
70376
70223
|
* @param {Object} props
|
|
@@ -70433,14 +70280,12 @@
|
|
|
70433
70280
|
maxHeight
|
|
70434
70281
|
},
|
|
70435
70282
|
"aria-describedby": hasError ? errorMessageId : undefined,
|
|
70436
|
-
children:
|
|
70437
|
-
|
|
70438
|
-
|
|
70439
|
-
|
|
70440
|
-
|
|
70441
|
-
|
|
70442
|
-
errors: [errorMessage]
|
|
70443
|
-
}) : null]
|
|
70283
|
+
children: o(PdfRenderer, {
|
|
70284
|
+
url: fullUrl,
|
|
70285
|
+
fileName: metadata.fileName,
|
|
70286
|
+
onError: () => setHasError(true),
|
|
70287
|
+
errorMessageId: errorMessageId
|
|
70288
|
+
})
|
|
70444
70289
|
});
|
|
70445
70290
|
}
|
|
70446
70291
|
return o("div", {
|
|
@@ -74139,7 +73984,7 @@
|
|
|
74139
73984
|
Ye = function (n, o) {
|
|
74140
73985
|
var l = o || {},
|
|
74141
73986
|
c = {};
|
|
74142
|
-
return n ===
|
|
73987
|
+
return n === void 0 && (n = {}), n.on = function (d, h) {
|
|
74143
73988
|
return c[d] ? c[d].push(h) : c[d] = [h], n;
|
|
74144
73989
|
}, n.once = function (d, h) {
|
|
74145
73990
|
return h._once = true, n.on(d, h), n;
|
|
@@ -74198,11 +74043,11 @@
|
|
|
74198
74043
|
...t
|
|
74199
74044
|
});
|
|
74200
74045
|
function ne(t) {
|
|
74201
|
-
if (t.touches !==
|
|
74202
|
-
if (t.which !==
|
|
74203
|
-
if (t.buttons !==
|
|
74046
|
+
if (t.touches !== void 0) return t.touches.length;
|
|
74047
|
+
if (t.which !== void 0 && t.which !== 0) return t.which;
|
|
74048
|
+
if (t.buttons !== void 0) return t.buttons;
|
|
74204
74049
|
const n = t.button;
|
|
74205
|
-
if (n !==
|
|
74050
|
+
if (n !== void 0) return n & 1 ? 1 : n & 2 ? 3 : n & 4 ? 2 : 0;
|
|
74206
74051
|
}
|
|
74207
74052
|
const Ae = t => {
|
|
74208
74053
|
const n = t.getBoundingClientRect();
|
|
@@ -74280,7 +74125,7 @@
|
|
|
74280
74125
|
D({});
|
|
74281
74126
|
return;
|
|
74282
74127
|
}
|
|
74283
|
-
if (e.clientX !==
|
|
74128
|
+
if (e.clientX !== void 0 && Math.abs(e.clientX - S) <= (s.slideFactorX || 0) && e.clientY !== void 0 && Math.abs(e.clientY - C) <= (s.slideFactorY || 0)) return;
|
|
74284
74129
|
if (s.ignoreInputTextSelection) {
|
|
74285
74130
|
const {
|
|
74286
74131
|
clientX: O = 0,
|
|
@@ -74362,7 +74207,7 @@
|
|
|
74362
74207
|
}
|
|
74363
74208
|
function P(e, r) {
|
|
74364
74209
|
let i;
|
|
74365
|
-
return r !==
|
|
74210
|
+
return r !== void 0 ? i = r : o ? i = E : i = T(a || c), e === l && i === X;
|
|
74366
74211
|
}
|
|
74367
74212
|
function J(e, r, i) {
|
|
74368
74213
|
let u = e;
|
|
@@ -74489,6 +74334,18 @@
|
|
|
74489
74334
|
label: 'context',
|
|
74490
74335
|
detail: 'block',
|
|
74491
74336
|
type: 'keyword'
|
|
74337
|
+
}), snippetCompletion$1('null', {
|
|
74338
|
+
label: 'null',
|
|
74339
|
+
detail: 'literal',
|
|
74340
|
+
type: 'keyword'
|
|
74341
|
+
}), snippetCompletion$1('true', {
|
|
74342
|
+
label: 'true',
|
|
74343
|
+
detail: 'literal',
|
|
74344
|
+
type: 'keyword'
|
|
74345
|
+
}), snippetCompletion$1('false', {
|
|
74346
|
+
label: 'false',
|
|
74347
|
+
detail: 'literal',
|
|
74348
|
+
type: 'keyword'
|
|
74492
74349
|
})];
|
|
74493
74350
|
function _extends$6() {
|
|
74494
74351
|
_extends$6 = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -74542,9 +74399,27 @@
|
|
|
74542
74399
|
after: 'InExpressions',
|
|
74543
74400
|
keyword: 'return'
|
|
74544
74401
|
})];
|
|
74545
|
-
const dontComplete = ['StringLiteral', 'Identifier', 'LineComment', 'BlockComment', 'PathExpression'];
|
|
74402
|
+
const dontComplete = ['StringLiteral', 'Identifier', 'LineComment', 'BlockComment', 'PathExpression', 'Context', 'Key', 'ParameterName'];
|
|
74403
|
+
const doComplete = ['Expr', 'ContextEntry'];
|
|
74404
|
+
function ifExpression(completionSource) {
|
|
74405
|
+
const allNodes = [...dontComplete, ...doComplete];
|
|
74406
|
+
return context => {
|
|
74407
|
+
const {
|
|
74408
|
+
state,
|
|
74409
|
+
pos
|
|
74410
|
+
} = context;
|
|
74411
|
+
const match = matchUp(syntaxTree(state).resolveInner(pos, -1), allNodes);
|
|
74412
|
+
if (match) {
|
|
74413
|
+
const [_, name] = match;
|
|
74414
|
+
if (dontComplete.includes(name)) {
|
|
74415
|
+
return null;
|
|
74416
|
+
}
|
|
74417
|
+
}
|
|
74418
|
+
return completionSource(context);
|
|
74419
|
+
};
|
|
74420
|
+
}
|
|
74546
74421
|
function snippetCompletion(snippets) {
|
|
74547
|
-
return
|
|
74422
|
+
return ifExpression(completeFromList(snippets.map(s => _extends$6({}, s, {
|
|
74548
74423
|
type: 'text'
|
|
74549
74424
|
}))));
|
|
74550
74425
|
}
|
|
@@ -74574,10 +74449,12 @@
|
|
|
74574
74449
|
nodeNames = [nodeNames];
|
|
74575
74450
|
}
|
|
74576
74451
|
for (; node; node = node.parent) {
|
|
74577
|
-
|
|
74578
|
-
|
|
74452
|
+
const nodeType = node.type;
|
|
74453
|
+
const matchedName = nodeNames.find(name => name && nodeType.is(name));
|
|
74454
|
+
if (matchedName) {
|
|
74455
|
+
return [node, matchedName];
|
|
74579
74456
|
}
|
|
74580
|
-
if (
|
|
74457
|
+
if (nodeType.isTop) {
|
|
74581
74458
|
break;
|
|
74582
74459
|
}
|
|
74583
74460
|
}
|
|
@@ -74595,10 +74472,11 @@
|
|
|
74595
74472
|
state,
|
|
74596
74473
|
pos
|
|
74597
74474
|
} = context;
|
|
74598
|
-
const
|
|
74599
|
-
if (!
|
|
74475
|
+
const match = matchUp(syntaxTree(state).resolveInner(pos, -1), nodes);
|
|
74476
|
+
if (!match) {
|
|
74600
74477
|
return null;
|
|
74601
74478
|
}
|
|
74479
|
+
const [node] = match;
|
|
74602
74480
|
if (matchLeft(node, pos, [keyword, before])) {
|
|
74603
74481
|
return null;
|
|
74604
74482
|
}
|
|
@@ -75051,9 +74929,14 @@
|
|
|
75051
74929
|
* @typedef { 'expression' | 'unaryTests' } Dialect
|
|
75052
74930
|
*/
|
|
75053
74931
|
|
|
74932
|
+
/**
|
|
74933
|
+
* @typedef { 'camunda' | undefined } ParserDialect
|
|
74934
|
+
*/
|
|
74935
|
+
|
|
75054
74936
|
/**
|
|
75055
74937
|
* @param { {
|
|
75056
74938
|
* dialect?: Dialect,
|
|
74939
|
+
* parserDialect?: ParserDialect,
|
|
75057
74940
|
* context?: Record<string, any>,
|
|
75058
74941
|
* completions?: import('@codemirror/autocomplete').CompletionSource[]
|
|
75059
74942
|
* } } options
|
|
@@ -75069,7 +74952,7 @@
|
|
|
75069
74952
|
*
|
|
75070
74953
|
* @return {Record<string, any>}
|
|
75071
74954
|
*/
|
|
75072
|
-
function createContext(variables
|
|
74955
|
+
function createContext(variables) {
|
|
75073
74956
|
return variables.slice().reverse().reduce((context, builtin) => {
|
|
75074
74957
|
context[builtin.name] = () => {};
|
|
75075
74958
|
return context;
|
|
@@ -75077,7 +74960,8 @@
|
|
|
75077
74960
|
}
|
|
75078
74961
|
|
|
75079
74962
|
/**
|
|
75080
|
-
* @typedef { '
|
|
74963
|
+
* @typedef { import('../language').Dialect } Dialect
|
|
74964
|
+
* @typedef { import('../language').ParserDialect } ParserDialect
|
|
75081
74965
|
* @typedef { import('..').Variable } Variable
|
|
75082
74966
|
*/
|
|
75083
74967
|
|
|
@@ -75092,10 +74976,15 @@
|
|
|
75092
74976
|
const variablesFacet$1 = Facet.define();
|
|
75093
74977
|
|
|
75094
74978
|
/**
|
|
75095
|
-
* @type {Facet<
|
|
74979
|
+
* @type {Facet<Dialect>}
|
|
75096
74980
|
*/
|
|
75097
74981
|
const dialectFacet = Facet.define();
|
|
75098
74982
|
|
|
74983
|
+
/**
|
|
74984
|
+
* @type {Facet<ParserDialect>}
|
|
74985
|
+
*/
|
|
74986
|
+
const parserDialectFacet = Facet.define();
|
|
74987
|
+
|
|
75099
74988
|
/**
|
|
75100
74989
|
* @typedef {object} Variable
|
|
75101
74990
|
* @property {string} name name or key of the variable
|
|
@@ -75110,6 +74999,7 @@
|
|
|
75110
74999
|
/**
|
|
75111
75000
|
* @typedef { {
|
|
75112
75001
|
* dialect?: import('../language').Dialect,
|
|
75002
|
+
* parserDialect?: import('../language').ParserDialect,
|
|
75113
75003
|
* variables?: Variable[],
|
|
75114
75004
|
* builtins?: Variable[]
|
|
75115
75005
|
* } } CoreConfig
|
|
@@ -75125,6 +75015,7 @@
|
|
|
75125
75015
|
*/
|
|
75126
75016
|
function configure({
|
|
75127
75017
|
dialect = 'expression',
|
|
75018
|
+
parserDialect,
|
|
75128
75019
|
variables = [],
|
|
75129
75020
|
builtins = [],
|
|
75130
75021
|
completions: completions$1$1 = completions$1({
|
|
@@ -75133,8 +75024,9 @@
|
|
|
75133
75024
|
})
|
|
75134
75025
|
}) {
|
|
75135
75026
|
const context = createContext([...variables, ...builtins]);
|
|
75136
|
-
return [dialectFacet.of(dialect), builtinsFacet.of(builtins), variablesFacet$1.of(variables), language({
|
|
75027
|
+
return [dialectFacet.of(dialect), builtinsFacet.of(builtins), variablesFacet$1.of(variables), parserDialectFacet.of(parserDialect), language({
|
|
75137
75028
|
dialect,
|
|
75029
|
+
parserDialect,
|
|
75138
75030
|
context,
|
|
75139
75031
|
completions: completions$1$1
|
|
75140
75032
|
})];
|
|
@@ -75149,10 +75041,12 @@
|
|
|
75149
75041
|
const builtins = state.facet(builtinsFacet)[0];
|
|
75150
75042
|
const variables = state.facet(variablesFacet$1)[0];
|
|
75151
75043
|
const dialect = state.facet(dialectFacet)[0];
|
|
75044
|
+
const parserDialect = state.facet(parserDialectFacet)[0];
|
|
75152
75045
|
return {
|
|
75153
75046
|
builtins,
|
|
75154
75047
|
variables,
|
|
75155
|
-
dialect
|
|
75048
|
+
dialect,
|
|
75049
|
+
parserDialect
|
|
75156
75050
|
};
|
|
75157
75051
|
}
|
|
75158
75052
|
var camundaTags = [{
|
|
@@ -75193,16 +75087,16 @@
|
|
|
75193
75087
|
description: "<p>Returns the given value as a string representation.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">string(from: Any): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">string(1.1)\n// "1.1"\n\nstring(date("2012-12-25"))\n// "2012-12-25"\n</code></pre>\n"
|
|
75194
75088
|
}, {
|
|
75195
75089
|
name: "number(from)",
|
|
75196
|
-
description: "<p>Parses the given string to a number.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">number(from: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">number("1500.5")\n// 1500.5\n</code></pre>\n"
|
|
75090
|
+
description: "<p>Parses the given string to a number.</p>\n<p>Returns <code>null</code> if the string is not a number.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">number(from: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">number("1500.5")\n// 1500.5\n</code></pre>\n"
|
|
75197
75091
|
}, {
|
|
75198
75092
|
name: "context(entries)",
|
|
75199
75093
|
description: "<p>Constructs a context of the given list of key-value pairs. It is the reverse function to <a href=\"feel-built-in-functions-context.md#get-entriescontext\">get entries()</a>.</p>\n<p>Each key-value pair must be a context with two entries: <code>key</code> and <code>value</code>. The entry with name <code>key</code> must have a value of the type <code>string</code>.</p>\n<p>It might override context entries if the keys are equal. The entries are overridden in the same order as the contexts in the given list.</p>\n<p>Returns <code>null</code> if one of the entries is not a context or if a context doesn't contain the required entries.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">context(entries: list<context>): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">context([{"key":"a", "value":1}, {"key":"b", "value":2}])\n// {a:1, b:2}\n</code></pre>\n"
|
|
75200
75094
|
}, {
|
|
75201
75095
|
name: "date(from)",
|
|
75202
|
-
description: "<p>Returns a date from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date(from: string): date\n</code></pre>\n<p>Parses the given string into a date.</p>\n<pre><code class=\"language-feel\">date(from: date and time): date\n</code></pre>\n<p>Extracts the date component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date("2018-04-29")\n// date("2018-04-29")\n\ndate(date and time("2012-12-25T11:00:00"))\n// date("2012-12-25")\n</code></pre>\n"
|
|
75096
|
+
description: "<p>Returns a date from the given value.</p>\n<p>Returns <code>null</code> if the string is not a valid calendar date. For example, <code>"2024-06-31"</code> is invalid because June has\nonly 30 days.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date(from: string): date\n</code></pre>\n<p>Parses the given string into a date.</p>\n<pre><code class=\"language-feel\">date(from: date and time): date\n</code></pre>\n<p>Extracts the date component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date("2018-04-29")\n// date("2018-04-29")\n\ndate(date and time("2012-12-25T11:00:00"))\n// date("2012-12-25")\n</code></pre>\n"
|
|
75203
75097
|
}, {
|
|
75204
75098
|
name: "date(year, month, day)",
|
|
75205
|
-
description: "<p>Returns a date from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date(year: number, month: number, day: number): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date(2012, 12, 25)\n// date("2012-12-25")\n</code></pre>\n"
|
|
75099
|
+
description: "<p>Returns a date from the given components.</p>\n<p>Returns <code>null</code> if the components don't represent a valid calendar date. For example, <code>2024,6,31</code> is invalid because\nJune has only 30 days.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date(year: number, month: number, day: number): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date(2012, 12, 25)\n// date("2012-12-25")\n</code></pre>\n"
|
|
75206
75100
|
}, {
|
|
75207
75101
|
name: "time(from)",
|
|
75208
75102
|
description: "<p>Returns a time from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">time(from: string): time\n</code></pre>\n<p>Parses the given string into a time.</p>\n<pre><code class=\"language-feel\">time(from: date and time): time\n</code></pre>\n<p>Extracts the time component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">time("12:00:00")\n// time("12:00:00")\n\ntime(date and time("2012-12-25T11:00:00"))\n// time("11:00:00")\n</code></pre>\n"
|
|
@@ -75214,7 +75108,7 @@
|
|
|
75214
75108
|
description: "<p>Returns a time from the given components, including a timezone offset.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">time(hour: number, minute: number, second: number, offset: days and time duration): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">time(14, 30, 0, duration("PT1H"))\n// time("14:30:00+01:00")\n</code></pre>\n"
|
|
75215
75109
|
}, {
|
|
75216
75110
|
name: "date and time(from)",
|
|
75217
|
-
description: "<p>Parses the given string into a date and time.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date and time(from: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date and time("2018-04-29T09:30:00")\n// date and time("2018-04-29T09:30:00")\n</code></pre>\n"
|
|
75111
|
+
description: "<p>Parses the given string into a date and time.</p>\n<p>Returns <code>null</code> if the string is not a valid calendar date. For example, <code>"2024-06-31T10:00:00"</code> is invalid because\nJune has only 30 days.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date and time(from: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date and time("2018-04-29T09:30:00")\n// date and time("2018-04-29T09:30:00")\n</code></pre>\n"
|
|
75218
75112
|
}, {
|
|
75219
75113
|
name: "date and time(date, time)",
|
|
75220
75114
|
description: "<p>Returns a date and time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date and time(date: date, time: time): date and time\n</code></pre>\n<pre><code class=\"language-feel\">date and time(date: date and time, time: time): date and time\n</code></pre>\n<p>Returns a date and time value that consists of the date component of <code>date</code> combined with <code>time</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date and time(date("2012-12-24"),time("T23:59:00"))\n// date and time("2012-12-24T23:59:00")\n\ndate and time(date and time("2012-12-25T11:00:00"),time("T23:59:00"))\n// date and time("2012-12-25T23:59:00")\n</code></pre>\n"
|
|
@@ -75311,6 +75205,12 @@
|
|
|
75311
75205
|
}, {
|
|
75312
75206
|
name: "string join(list, delimiter, prefix, suffix)",
|
|
75313
75207
|
description: "<p><em>Camunda Extension</em></p>\n<p>Joins a list of strings into a single string. This is similar to\nJava's <a href=\"https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)\">joining</a>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p>The resulting string starts with <code>prefix</code>, contains a <code>delimiter</code> between each element, and ends\nwith <code>suffix</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">string join(list: list<string>, delimiter: string, prefix: string, suffix: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">string join(["a","b","c"], ", ", "[", "]")\n// "[a, b, c]"\n</code></pre>\n"
|
|
75208
|
+
}, {
|
|
75209
|
+
name: "is empty(list)",
|
|
75210
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns <code>true</code> if the given list is empty. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">is empty(list: list): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">is empty([])\n// true\n\nis empty([1,2,3])\n// false\n</code></pre>\n"
|
|
75211
|
+
}, {
|
|
75212
|
+
name: "partition(list, size)",
|
|
75213
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns consecutive sublists of a list, each of the same size (the final list may be smaller).</p>\n<p>If <code>size</code> is less than <code>0</code>, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">partition(list: list, size: number): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">partition([1,2,3,4,5], 2)\n// [[1,2], [3,4], [5]]\n\npartition([], 2)\n// []\n\npartition([1,2], 0)\n// null\n</code></pre>\n"
|
|
75314
75214
|
}, {
|
|
75315
75215
|
name: "decimal(n, scale)",
|
|
75316
75216
|
description: "<p>Rounds the given value at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">decimal(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">decimal(1/3, 2)\n// .33\n\ndecimal(1.5, 0)\n// 2\n</code></pre>\n"
|
|
@@ -75445,10 +75345,10 @@
|
|
|
75445
75345
|
description: "<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">coincides(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">coincides([1..5], [1..5])\n// true\n\ncoincides((1..5], [1..5))\n// false\n\ncoincides([1..5], [2..6])\n// false\n</code></pre>\n"
|
|
75446
75346
|
}, {
|
|
75447
75347
|
name: "substring(string, start position)",
|
|
75448
|
-
description: "<p>Returns a substring of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">substring(string: string, start position: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">substring("foobar", 3)\n// "obar"\n</code></pre>\n"
|
|
75348
|
+
description: "<p>Returns a substring of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">substring(string: string, start position: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">substring("foobar", 3)\n// "obar"\n\nsubstring("foobar", -2)\n// "ar"\n</code></pre>\n"
|
|
75449
75349
|
}, {
|
|
75450
75350
|
name: "substring(string, start position, length)",
|
|
75451
|
-
description: "<p>Returns a substring of the given value starting at <code>start position</code
|
|
75351
|
+
description: "<p>Returns a substring of the given value, starting at <code>start position</code> with the given <code>length</code>. If <code>length</code> is greater than\nthe remaining characters of the value, it returns all characters from <code>start position</code> until the end.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">substring(string: string, start position: number, length: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">substring("foobar", 3, 3)\n// "oba"\n\nsubstring("foobar", -3, 2)\n// "ba"\n\nsubstring("foobar", 3, 10)\n// "obar"\n</code></pre>\n"
|
|
75452
75352
|
}, {
|
|
75453
75353
|
name: "string length(string)",
|
|
75454
75354
|
description: "<p>Returns the number of characters in the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">string length(string: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">string length("foo")\n// 3\n</code></pre>\n"
|
|
@@ -75491,6 +75391,18 @@
|
|
|
75491
75391
|
}, {
|
|
75492
75392
|
name: "extract(string, pattern)",
|
|
75493
75393
|
description: "<p><em>Camunda Extension</em></p>\n<p>Returns all matches of the pattern in the given string. Returns an empty list if the pattern doesn't\nmatch.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">extract(string: string, pattern: string): list<string>\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">extract("references are 1234, 1256, 1378", "12[0-9]*")\n// ["1234","1256"]\n</code></pre>\n"
|
|
75394
|
+
}, {
|
|
75395
|
+
name: "trim(string)",
|
|
75396
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string without leading and trailing spaces.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">trim(string: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">trim(" hello world ")\n// "hello world"\n\ntrim("hello world ")\n// "hello world"\n</code></pre>\n"
|
|
75397
|
+
}, {
|
|
75398
|
+
name: "uuid()",
|
|
75399
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">uuid(): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">uuid()\n// "7793aab1-d761-4d38-916b-b7270e309894"\n</code></pre>\n"
|
|
75400
|
+
}, {
|
|
75401
|
+
name: "to base64(value)",
|
|
75402
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string encoded in Base64 format.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">to base64(value: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">to base64("FEEL")\n// "RkVFTA=="\n</code></pre>\n"
|
|
75403
|
+
}, {
|
|
75404
|
+
name: "is blank(string)",
|
|
75405
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns <code>true</code> if the given string is blank (empty or contains only whitespaces).</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">is blank(string: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">is blank("")\n// true\n\nis blank(" ")\n// true\n\nis blank("hello world")\n// false\n</code></pre>\n"
|
|
75494
75406
|
}, {
|
|
75495
75407
|
name: "now()",
|
|
75496
75408
|
description: "<p>Returns the current date and time including the timezone.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">now(): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">now()\n// date and time("2020-07-31T14:27:30@Europe/Berlin")\n</code></pre>\n"
|
|
@@ -75515,18 +75427,6 @@
|
|
|
75515
75427
|
}, {
|
|
75516
75428
|
name: "last day of month(date)",
|
|
75517
75429
|
description: "<p><em>Camunda Extension</em></p>\n<p>Takes the month of the given date or date-time value and returns the last day of this month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">last day of month(date: date): date\n</code></pre>\n<pre><code class=\"language-feel\">last day of month(date: date and time): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">last day of month(date("2022-10-01"))\n// date("2022-10-31"))\n\nlast day of month(date and time("2022-10-16T12:00:00"))\n// date("2022-10-31"))\n</code></pre>\n"
|
|
75518
|
-
}, {
|
|
75519
|
-
name: "is empty(list)",
|
|
75520
|
-
description: "<p><em>Camunda Extension</em></p>\n<p>Returns true if the given list is empty. Otherwise, returns false.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">is empty(list: list): boolean</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">is empty([])\n// true\n\nis empty([1,2,3])\n// false\n</code></pre>"
|
|
75521
|
-
}, {
|
|
75522
|
-
name: "trim(string)",
|
|
75523
|
-
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string without leading and trailing spaces.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">trim(string: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">trim(\" hello world \")\n// \"hello world\"\n\ntrim(\"hello world \")\n// \"hello world\"\n</code></pre>"
|
|
75524
|
-
}, {
|
|
75525
|
-
name: "uuid()",
|
|
75526
|
-
description: "<p><em>Camunda Extension</em></p>\n<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">uuid(): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">uuid()\n// \"7793aab1-d761-4d38-916b-b7270e309894\"\n</code></pre>"
|
|
75527
|
-
}, {
|
|
75528
|
-
name: "to base64(string)",
|
|
75529
|
-
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string encoded in Base64 format.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">to base64(value: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">to base64(\"FEEL\")\n// \"RkVFTA==\"\n</code></pre>"
|
|
75530
75430
|
}];
|
|
75531
75431
|
|
|
75532
75432
|
/**
|
|
@@ -75572,6 +75472,11 @@
|
|
|
75572
75472
|
* @typedef { import('./core').Variable } Variable
|
|
75573
75473
|
*/
|
|
75574
75474
|
|
|
75475
|
+
/**
|
|
75476
|
+
* @typedef { import('./language').Dialect } Dialect
|
|
75477
|
+
* @typedef { import('./language').ParserDialect } ParserDialect
|
|
75478
|
+
*/
|
|
75479
|
+
|
|
75575
75480
|
/**
|
|
75576
75481
|
* @typedef {object} Builtin
|
|
75577
75482
|
* @property {string} name
|
|
@@ -75588,6 +75493,7 @@
|
|
|
75588
75493
|
* @param {DOMNode} config.container
|
|
75589
75494
|
* @param {Extension[]} [config.extensions]
|
|
75590
75495
|
* @param {Dialect} [config.dialect='expression']
|
|
75496
|
+
* @param {ParserDialect} [config.parserDialect]
|
|
75591
75497
|
* @param {DOMNode|String} [config.tooltipContainer]
|
|
75592
75498
|
* @param {Function} [config.onChange]
|
|
75593
75499
|
* @param {Function} [config.onKeyDown]
|
|
@@ -75596,12 +75502,11 @@
|
|
|
75596
75502
|
* @param {String} [config.value]
|
|
75597
75503
|
* @param {Variable[]} [config.variables]
|
|
75598
75504
|
* @param {Variable[]} [config.builtins]
|
|
75599
|
-
*
|
|
75600
|
-
* @returns {Object} editor
|
|
75601
75505
|
*/
|
|
75602
75506
|
function FeelEditor({
|
|
75603
75507
|
extensions: editorExtensions = [],
|
|
75604
75508
|
dialect = 'expression',
|
|
75509
|
+
parserDialect,
|
|
75605
75510
|
container,
|
|
75606
75511
|
contentAttributes = {},
|
|
75607
75512
|
tooltipContainer,
|
|
@@ -75641,7 +75546,8 @@
|
|
|
75641
75546
|
const extensions = [autocompletion(), coreConf.of(configure({
|
|
75642
75547
|
dialect,
|
|
75643
75548
|
builtins,
|
|
75644
|
-
variables
|
|
75549
|
+
variables,
|
|
75550
|
+
parserDialect
|
|
75645
75551
|
})), bracketMatching(), indentOnInput(), closeBrackets(), EditorView.contentAttributes.of(contentAttributes), changeHandler, keyHandler, keymap.of([...defaultKeymap]), linter, lintHandler, tooltipLayout, placeholderConf.of(placeholder(placeholder$1)), theme, ...editorExtensions];
|
|
75646
75552
|
if (readOnly) {
|
|
75647
75553
|
extensions.push(EditorView.editable.of(false));
|
|
@@ -75708,14 +75614,10 @@
|
|
|
75708
75614
|
* @param {Variable[]} variables
|
|
75709
75615
|
*/
|
|
75710
75616
|
FeelEditor.prototype.setVariables = function (variables) {
|
|
75711
|
-
const
|
|
75712
|
-
dialect,
|
|
75713
|
-
builtins
|
|
75714
|
-
} = get(this._cmEditor.state);
|
|
75617
|
+
const config = get(this._cmEditor.state);
|
|
75715
75618
|
this._cmEditor.dispatch({
|
|
75716
75619
|
effects: [coreConf.reconfigure(configure({
|
|
75717
|
-
|
|
75718
|
-
builtins,
|
|
75620
|
+
...config,
|
|
75719
75621
|
variables
|
|
75720
75622
|
}))]
|
|
75721
75623
|
});
|
|
@@ -75747,9 +75649,9 @@
|
|
|
75747
75649
|
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
75748
75650
|
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
75749
75651
|
var _element$getRootNode;
|
|
75750
|
-
return element === null || element ===
|
|
75652
|
+
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
75751
75653
|
} : function (element) {
|
|
75752
|
-
return element === null || element ===
|
|
75654
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
75753
75655
|
};
|
|
75754
75656
|
|
|
75755
75657
|
/**
|
|
@@ -75762,13 +75664,13 @@
|
|
|
75762
75664
|
*/
|
|
75763
75665
|
var isInert = function isInert(node, lookUp) {
|
|
75764
75666
|
var _node$getAttribute;
|
|
75765
|
-
if (lookUp ===
|
|
75667
|
+
if (lookUp === void 0) {
|
|
75766
75668
|
lookUp = true;
|
|
75767
75669
|
}
|
|
75768
75670
|
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
75769
75671
|
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
75770
75672
|
// if it's `null` (not specified) or 'false', it's an active element
|
|
75771
|
-
var inertAtt = node === null || node ===
|
|
75673
|
+
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
75772
75674
|
var inert = inertAtt === '' || inertAtt === 'true';
|
|
75773
75675
|
|
|
75774
75676
|
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
@@ -75791,7 +75693,7 @@
|
|
|
75791
75693
|
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
75792
75694
|
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
75793
75695
|
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
75794
|
-
var attValue = node === null || node ===
|
|
75696
|
+
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
75795
75697
|
return attValue === '' || attValue === 'true';
|
|
75796
75698
|
};
|
|
75797
75699
|
|
|
@@ -76043,22 +75945,22 @@
|
|
|
76043
75945
|
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
76044
75946
|
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
76045
75947
|
var nodeRoot = node && getRootNode(node);
|
|
76046
|
-
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot ===
|
|
75948
|
+
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
76047
75949
|
|
|
76048
75950
|
// in some cases, a detached node will return itself as the root instead of a document or
|
|
76049
75951
|
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
76050
75952
|
var attached = false;
|
|
76051
75953
|
if (nodeRoot && nodeRoot !== node) {
|
|
76052
75954
|
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
76053
|
-
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !==
|
|
75955
|
+
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
76054
75956
|
while (!attached && nodeRootHost) {
|
|
76055
75957
|
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
76056
75958
|
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
76057
75959
|
// which means we need to get the host's host and check if that parent host is contained
|
|
76058
75960
|
// in (i.e. attached to) the document
|
|
76059
75961
|
nodeRoot = getRootNode(nodeRootHost);
|
|
76060
|
-
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 ===
|
|
76061
|
-
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !==
|
|
75962
|
+
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
75963
|
+
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
76062
75964
|
}
|
|
76063
75965
|
}
|
|
76064
75966
|
return attached;
|
|
@@ -76344,7 +76246,7 @@
|
|
|
76344
76246
|
if (typeof input !== "object" || input === null) return input;
|
|
76345
76247
|
var prim = input[Symbol.toPrimitive];
|
|
76346
76248
|
if (prim !== undefined) {
|
|
76347
|
-
var res = prim.call(input, hint
|
|
76249
|
+
var res = prim.call(input, hint);
|
|
76348
76250
|
if (typeof res !== "object") return res;
|
|
76349
76251
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
76350
76252
|
}
|
|
@@ -76385,10 +76287,10 @@
|
|
|
76385
76287
|
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
76386
76288
|
};
|
|
76387
76289
|
var isEscapeEvent = function isEscapeEvent(e) {
|
|
76388
|
-
return (e === null || e ===
|
|
76290
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;
|
|
76389
76291
|
};
|
|
76390
76292
|
var isTabEvent = function isTabEvent(e) {
|
|
76391
|
-
return (e === null || e ===
|
|
76293
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
|
|
76392
76294
|
};
|
|
76393
76295
|
|
|
76394
76296
|
// checks for TAB by default
|
|
@@ -76429,7 +76331,7 @@
|
|
|
76429
76331
|
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
76430
76332
|
params[_key - 1] = arguments[_key];
|
|
76431
76333
|
}
|
|
76432
|
-
return typeof value === 'function' ? value.apply(
|
|
76334
|
+
return typeof value === 'function' ? value.apply(void 0, params) : value;
|
|
76433
76335
|
};
|
|
76434
76336
|
var getActualTarget = function getActualTarget(event) {
|
|
76435
76337
|
// NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
|
|
@@ -76448,8 +76350,8 @@
|
|
|
76448
76350
|
var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
76449
76351
|
// SSR: a live trap shouldn't be created in this type of environment so this
|
|
76450
76352
|
// should be safe code to execute if the `document` option isn't specified
|
|
76451
|
-
var doc = (userOptions === null || userOptions ===
|
|
76452
|
-
var trapStack = (userOptions === null || userOptions ===
|
|
76353
|
+
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
|
76354
|
+
var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;
|
|
76453
76355
|
var config = _objectSpread2({
|
|
76454
76356
|
returnFocusOnDeactivate: true,
|
|
76455
76357
|
escapeDeactivates: true,
|
|
@@ -76520,7 +76422,7 @@
|
|
|
76520
76422
|
* if the element isn't found.
|
|
76521
76423
|
*/
|
|
76522
76424
|
var findContainerIndex = function findContainerIndex(element, event) {
|
|
76523
|
-
var composedPath = typeof (event === null || event ===
|
|
76425
|
+
var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;
|
|
76524
76426
|
// NOTE: search `containerGroups` because it's possible a group contains no tabbable
|
|
76525
76427
|
// nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
|
|
76526
76428
|
// and we still need to find the element in there
|
|
@@ -76532,7 +76434,7 @@
|
|
|
76532
76434
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
76533
76435
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
76534
76436
|
// look inside web components even if open)
|
|
76535
|
-
composedPath === null || composedPath ===
|
|
76437
|
+
composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {
|
|
76536
76438
|
return node === element;
|
|
76537
76439
|
});
|
|
76538
76440
|
});
|
|
@@ -76557,7 +76459,7 @@
|
|
|
76557
76459
|
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
76558
76460
|
params[_key2 - 1] = arguments[_key2];
|
|
76559
76461
|
}
|
|
76560
|
-
optionValue = optionValue.apply(
|
|
76462
|
+
optionValue = optionValue.apply(void 0, params);
|
|
76561
76463
|
}
|
|
76562
76464
|
if (optionValue === true) {
|
|
76563
76465
|
optionValue = undefined; // use default value
|
|
@@ -76738,7 +76640,7 @@
|
|
|
76738
76640
|
var target = _ref2.target,
|
|
76739
76641
|
event = _ref2.event,
|
|
76740
76642
|
_ref2$isBackward = _ref2.isBackward,
|
|
76741
|
-
isBackward = _ref2$isBackward ===
|
|
76643
|
+
isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;
|
|
76742
76644
|
target = target || getActualTarget(event);
|
|
76743
76645
|
updateTabbableNodes();
|
|
76744
76646
|
var destinationNode = null;
|
|
@@ -77115,14 +77017,14 @@
|
|
|
77115
77017
|
state.active = true;
|
|
77116
77018
|
state.paused = false;
|
|
77117
77019
|
state.nodeFocusedBeforeActivation = doc.activeElement;
|
|
77118
|
-
onActivate === null || onActivate ===
|
|
77020
|
+
onActivate === null || onActivate === void 0 ? void 0 : onActivate();
|
|
77119
77021
|
var finishActivation = function finishActivation() {
|
|
77120
77022
|
if (checkCanFocusTrap) {
|
|
77121
77023
|
updateTabbableNodes();
|
|
77122
77024
|
}
|
|
77123
77025
|
addListeners();
|
|
77124
77026
|
updateObservedNodes();
|
|
77125
|
-
onPostActivate === null || onPostActivate ===
|
|
77027
|
+
onPostActivate === null || onPostActivate === void 0 ? void 0 : onPostActivate();
|
|
77126
77028
|
};
|
|
77127
77029
|
if (checkCanFocusTrap) {
|
|
77128
77030
|
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
@@ -77151,13 +77053,13 @@
|
|
|
77151
77053
|
var onPostDeactivate = getOption(options, 'onPostDeactivate');
|
|
77152
77054
|
var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
|
|
77153
77055
|
var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
|
|
77154
|
-
onDeactivate === null || onDeactivate ===
|
|
77056
|
+
onDeactivate === null || onDeactivate === void 0 ? void 0 : onDeactivate();
|
|
77155
77057
|
var finishDeactivation = function finishDeactivation() {
|
|
77156
77058
|
delay(function () {
|
|
77157
77059
|
if (returnFocus) {
|
|
77158
77060
|
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
77159
77061
|
}
|
|
77160
|
-
onPostDeactivate === null || onPostDeactivate ===
|
|
77062
|
+
onPostDeactivate === null || onPostDeactivate === void 0 ? void 0 : onPostDeactivate();
|
|
77161
77063
|
});
|
|
77162
77064
|
};
|
|
77163
77065
|
if (returnFocus && checkCanReturnFocus) {
|
|
@@ -77174,10 +77076,10 @@
|
|
|
77174
77076
|
var onPause = getOption(pauseOptions, 'onPause');
|
|
77175
77077
|
var onPostPause = getOption(pauseOptions, 'onPostPause');
|
|
77176
77078
|
state.paused = true;
|
|
77177
|
-
onPause === null || onPause ===
|
|
77079
|
+
onPause === null || onPause === void 0 ? void 0 : onPause();
|
|
77178
77080
|
removeListeners();
|
|
77179
77081
|
updateObservedNodes();
|
|
77180
|
-
onPostPause === null || onPostPause ===
|
|
77082
|
+
onPostPause === null || onPostPause === void 0 ? void 0 : onPostPause();
|
|
77181
77083
|
return this;
|
|
77182
77084
|
},
|
|
77183
77085
|
unpause: function unpause(unpauseOptions) {
|
|
@@ -77187,11 +77089,11 @@
|
|
|
77187
77089
|
var onUnpause = getOption(unpauseOptions, 'onUnpause');
|
|
77188
77090
|
var onPostUnpause = getOption(unpauseOptions, 'onPostUnpause');
|
|
77189
77091
|
state.paused = false;
|
|
77190
|
-
onUnpause === null || onUnpause ===
|
|
77092
|
+
onUnpause === null || onUnpause === void 0 ? void 0 : onUnpause();
|
|
77191
77093
|
updateTabbableNodes();
|
|
77192
77094
|
addListeners();
|
|
77193
77095
|
updateObservedNodes();
|
|
77194
|
-
onPostUnpause === null || onPostUnpause ===
|
|
77096
|
+
onPostUnpause === null || onPostUnpause === void 0 ? void 0 : onPostUnpause();
|
|
77195
77097
|
return this;
|
|
77196
77098
|
},
|
|
77197
77099
|
updateContainerElements: function updateContainerElements(containerElements) {
|
|
@@ -77283,7 +77185,7 @@
|
|
|
77283
77185
|
DIV_BY_ZERO = NAME + 'Division by zero',
|
|
77284
77186
|
// The shared prototype object.
|
|
77285
77187
|
P = {},
|
|
77286
|
-
UNDEFINED =
|
|
77188
|
+
UNDEFINED = void 0,
|
|
77287
77189
|
NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
77288
77190
|
|
|
77289
77191
|
/*
|
|
@@ -83587,19 +83489,19 @@
|
|
|
83587
83489
|
errors: {}
|
|
83588
83490
|
});
|
|
83589
83491
|
|
|
83590
|
-
/**
|
|
83591
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
83592
|
-
*
|
|
83593
|
-
* @example
|
|
83594
|
-
*
|
|
83595
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
83596
|
-
* // ...
|
|
83597
|
-
* });
|
|
83598
|
-
*
|
|
83599
|
-
* @param {Object} context
|
|
83600
|
-
* @param {boolean} [context.focus]
|
|
83601
|
-
*
|
|
83602
|
-
* @returns void
|
|
83492
|
+
/**
|
|
83493
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
83494
|
+
*
|
|
83495
|
+
* @example
|
|
83496
|
+
*
|
|
83497
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
83498
|
+
* // ...
|
|
83499
|
+
* });
|
|
83500
|
+
*
|
|
83501
|
+
* @param {Object} context
|
|
83502
|
+
* @param {boolean} [context.focus]
|
|
83503
|
+
*
|
|
83504
|
+
* @returns void
|
|
83603
83505
|
*/
|
|
83604
83506
|
|
|
83605
83507
|
const EventContext = G({
|
|
@@ -83616,20 +83518,20 @@
|
|
|
83616
83518
|
getTooltipForId: () => {}
|
|
83617
83519
|
});
|
|
83618
83520
|
|
|
83619
|
-
/**
|
|
83620
|
-
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
83621
|
-
*
|
|
83622
|
-
* @example
|
|
83623
|
-
* ```jsx
|
|
83624
|
-
* function TextField(props) {
|
|
83625
|
-
* const tooltip = useTooltipContext('input1', element);
|
|
83626
|
-
* }
|
|
83627
|
-
* ```
|
|
83628
|
-
*
|
|
83629
|
-
* @param {string} id
|
|
83630
|
-
* @param {object} element
|
|
83631
|
-
*
|
|
83632
|
-
* @returns {string}
|
|
83521
|
+
/**
|
|
83522
|
+
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
83523
|
+
*
|
|
83524
|
+
* @example
|
|
83525
|
+
* ```jsx
|
|
83526
|
+
* function TextField(props) {
|
|
83527
|
+
* const tooltip = useTooltipContext('input1', element);
|
|
83528
|
+
* }
|
|
83529
|
+
* ```
|
|
83530
|
+
*
|
|
83531
|
+
* @param {string} id
|
|
83532
|
+
* @param {object} element
|
|
83533
|
+
*
|
|
83534
|
+
* @returns {string}
|
|
83633
83535
|
*/
|
|
83634
83536
|
function useTooltipContext(id, element) {
|
|
83635
83537
|
const {
|
|
@@ -83781,20 +83683,20 @@
|
|
|
83781
83683
|
return `bio-properties-panel-${id}`;
|
|
83782
83684
|
}
|
|
83783
83685
|
|
|
83784
|
-
/**
|
|
83785
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
83786
|
-
*
|
|
83787
|
-
* @example
|
|
83788
|
-
* ```jsx
|
|
83789
|
-
* function TextField(props) {
|
|
83790
|
-
* const description = useDescriptionContext('input1', element);
|
|
83791
|
-
* }
|
|
83792
|
-
* ```
|
|
83793
|
-
*
|
|
83794
|
-
* @param {string} id
|
|
83795
|
-
* @param {object} element
|
|
83796
|
-
*
|
|
83797
|
-
* @returns {string}
|
|
83686
|
+
/**
|
|
83687
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
83688
|
+
*
|
|
83689
|
+
* @example
|
|
83690
|
+
* ```jsx
|
|
83691
|
+
* function TextField(props) {
|
|
83692
|
+
* const description = useDescriptionContext('input1', element);
|
|
83693
|
+
* }
|
|
83694
|
+
* ```
|
|
83695
|
+
*
|
|
83696
|
+
* @param {string} id
|
|
83697
|
+
* @param {object} element
|
|
83698
|
+
*
|
|
83699
|
+
* @returns {string}
|
|
83798
83700
|
*/
|
|
83799
83701
|
function useDescriptionContext(id, element) {
|
|
83800
83702
|
const {
|
|
@@ -83815,11 +83717,11 @@
|
|
|
83815
83717
|
return errors;
|
|
83816
83718
|
}
|
|
83817
83719
|
|
|
83818
|
-
/**
|
|
83819
|
-
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
83820
|
-
*
|
|
83821
|
-
* @param {string} event
|
|
83822
|
-
* @param {Function} callback
|
|
83720
|
+
/**
|
|
83721
|
+
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
83722
|
+
*
|
|
83723
|
+
* @param {string} event
|
|
83724
|
+
* @param {Function} callback
|
|
83823
83725
|
*/
|
|
83824
83726
|
function useEvent(event, callback, eventBus) {
|
|
83825
83727
|
const eventContext = q$1(EventContext);
|
|
@@ -83849,20 +83751,20 @@
|
|
|
83849
83751
|
}, [callback, event, eventBus]);
|
|
83850
83752
|
}
|
|
83851
83753
|
|
|
83852
|
-
/**
|
|
83853
|
-
* Creates a state that persists in the global LayoutContext.
|
|
83854
|
-
*
|
|
83855
|
-
* @example
|
|
83856
|
-
* ```jsx
|
|
83857
|
-
* function Group(props) {
|
|
83858
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
83859
|
-
* }
|
|
83860
|
-
* ```
|
|
83861
|
-
*
|
|
83862
|
-
* @param {(string|number)[]} path
|
|
83863
|
-
* @param {any} [defaultValue]
|
|
83864
|
-
*
|
|
83865
|
-
* @returns {[ any, Function ]}
|
|
83754
|
+
/**
|
|
83755
|
+
* Creates a state that persists in the global LayoutContext.
|
|
83756
|
+
*
|
|
83757
|
+
* @example
|
|
83758
|
+
* ```jsx
|
|
83759
|
+
* function Group(props) {
|
|
83760
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
83761
|
+
* }
|
|
83762
|
+
* ```
|
|
83763
|
+
*
|
|
83764
|
+
* @param {(string|number)[]} path
|
|
83765
|
+
* @param {any} [defaultValue]
|
|
83766
|
+
*
|
|
83767
|
+
* @returns {[ any, Function ]}
|
|
83866
83768
|
*/
|
|
83867
83769
|
function useLayoutState(path, defaultValue) {
|
|
83868
83770
|
const {
|
|
@@ -83876,11 +83778,11 @@
|
|
|
83876
83778
|
return [layoutForKey, setState];
|
|
83877
83779
|
}
|
|
83878
83780
|
|
|
83879
|
-
/**
|
|
83880
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
83881
|
-
* state on updates.
|
|
83882
|
-
*
|
|
83883
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
83781
|
+
/**
|
|
83782
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
83783
|
+
* state on updates.
|
|
83784
|
+
*
|
|
83785
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
83884
83786
|
*/
|
|
83885
83787
|
|
|
83886
83788
|
function usePrevious(value) {
|
|
@@ -83891,12 +83793,12 @@
|
|
|
83891
83793
|
return ref.current;
|
|
83892
83794
|
}
|
|
83893
83795
|
|
|
83894
|
-
/**
|
|
83895
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
83896
|
-
*
|
|
83897
|
-
* @param {string} id
|
|
83898
|
-
*
|
|
83899
|
-
* @returns {import('preact').Ref}
|
|
83796
|
+
/**
|
|
83797
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
83798
|
+
*
|
|
83799
|
+
* @param {string} id
|
|
83800
|
+
*
|
|
83801
|
+
* @returns {import('preact').Ref}
|
|
83900
83802
|
*/
|
|
83901
83803
|
function useShowEntryEvent(id) {
|
|
83902
83804
|
const {
|
|
@@ -83927,20 +83829,20 @@
|
|
|
83927
83829
|
return ref;
|
|
83928
83830
|
}
|
|
83929
83831
|
|
|
83930
|
-
/**
|
|
83931
|
-
* @callback setSticky
|
|
83932
|
-
* @param {boolean} value
|
|
83832
|
+
/**
|
|
83833
|
+
* @callback setSticky
|
|
83834
|
+
* @param {boolean} value
|
|
83933
83835
|
*/
|
|
83934
83836
|
|
|
83935
|
-
/**
|
|
83936
|
-
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
83937
|
-
* If sticky is observered setSticky(true) will be called.
|
|
83938
|
-
* If sticky mode is left, setSticky(false) will be called.
|
|
83939
|
-
*
|
|
83940
|
-
*
|
|
83941
|
-
* @param {Object} ref
|
|
83942
|
-
* @param {string} scrollContainerSelector
|
|
83943
|
-
* @param {setSticky} setSticky
|
|
83837
|
+
/**
|
|
83838
|
+
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
83839
|
+
* If sticky is observered setSticky(true) will be called.
|
|
83840
|
+
* If sticky mode is left, setSticky(false) will be called.
|
|
83841
|
+
*
|
|
83842
|
+
*
|
|
83843
|
+
* @param {Object} ref
|
|
83844
|
+
* @param {string} scrollContainerSelector
|
|
83845
|
+
* @param {setSticky} setSticky
|
|
83944
83846
|
*/
|
|
83945
83847
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
83946
83848
|
const [scrollContainer, setScrollContainer] = h(query(scrollContainerSelector));
|
|
@@ -83994,19 +83896,19 @@
|
|
|
83994
83896
|
}, [ref.current, scrollContainer, setSticky]);
|
|
83995
83897
|
}
|
|
83996
83898
|
|
|
83997
|
-
/**
|
|
83998
|
-
* Creates a static function reference with changing body.
|
|
83999
|
-
* This is necessary when external libraries require a callback function
|
|
84000
|
-
* that has references to state variables.
|
|
84001
|
-
*
|
|
84002
|
-
* Usage:
|
|
84003
|
-
* const callback = useStaticCallback((val) => {val === currentState});
|
|
84004
|
-
*
|
|
84005
|
-
* The `callback` reference is static and can be safely used in external
|
|
84006
|
-
* libraries or as a prop that does not cause rerendering of children.
|
|
84007
|
-
*
|
|
84008
|
-
* @param {Function} callback function with changing reference
|
|
84009
|
-
* @returns {Function} static function reference
|
|
83899
|
+
/**
|
|
83900
|
+
* Creates a static function reference with changing body.
|
|
83901
|
+
* This is necessary when external libraries require a callback function
|
|
83902
|
+
* that has references to state variables.
|
|
83903
|
+
*
|
|
83904
|
+
* Usage:
|
|
83905
|
+
* const callback = useStaticCallback((val) => {val === currentState});
|
|
83906
|
+
*
|
|
83907
|
+
* The `callback` reference is static and can be safely used in external
|
|
83908
|
+
* libraries or as a prop that does not cause rerendering of children.
|
|
83909
|
+
*
|
|
83910
|
+
* @param {Function} callback function with changing reference
|
|
83911
|
+
* @returns {Function} static function reference
|
|
84010
83912
|
*/
|
|
84011
83913
|
function useStaticCallback(callback) {
|
|
84012
83914
|
const callbackRef = _$1(callback);
|
|
@@ -84147,13 +84049,13 @@
|
|
|
84147
84049
|
return null;
|
|
84148
84050
|
}
|
|
84149
84051
|
|
|
84150
|
-
/**
|
|
84151
|
-
* @typedef { {
|
|
84152
|
-
* text: (element: object) => string,
|
|
84153
|
-
* icon?: (element: Object) => import('preact').Component
|
|
84154
|
-
* } } PlaceholderDefinition
|
|
84155
|
-
*
|
|
84156
|
-
* @param { PlaceholderDefinition } props
|
|
84052
|
+
/**
|
|
84053
|
+
* @typedef { {
|
|
84054
|
+
* text: (element: object) => string,
|
|
84055
|
+
* icon?: (element: Object) => import('preact').Component
|
|
84056
|
+
* } } PlaceholderDefinition
|
|
84057
|
+
*
|
|
84058
|
+
* @param { PlaceholderDefinition } props
|
|
84157
84059
|
*/
|
|
84158
84060
|
function Placeholder(props) {
|
|
84159
84061
|
const {
|
|
@@ -84190,9 +84092,9 @@
|
|
|
84190
84092
|
}
|
|
84191
84093
|
const noop$6 = () => {};
|
|
84192
84094
|
|
|
84193
|
-
/**
|
|
84194
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
84195
|
-
* Set Focus inside when the editor is ready.
|
|
84095
|
+
/**
|
|
84096
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
84097
|
+
* Set Focus inside when the editor is ready.
|
|
84196
84098
|
*/
|
|
84197
84099
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
84198
84100
|
const [buffer, setBuffer] = h(undefined);
|
|
@@ -84292,9 +84194,9 @@
|
|
|
84292
84194
|
});
|
|
84293
84195
|
const noop$5 = () => {};
|
|
84294
84196
|
|
|
84295
|
-
/**
|
|
84296
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
84297
|
-
* Set Focus inside when the editor is ready.
|
|
84197
|
+
/**
|
|
84198
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
84199
|
+
* Set Focus inside when the editor is ready.
|
|
84298
84200
|
*/
|
|
84299
84201
|
const useBufferedFocus = function (editor, ref) {
|
|
84300
84202
|
const [buffer, setBuffer] = h(undefined);
|
|
@@ -84343,10 +84245,10 @@
|
|
|
84343
84245
|
p(() => {
|
|
84344
84246
|
let editor;
|
|
84345
84247
|
|
|
84346
|
-
/* Trigger FEEL toggle when
|
|
84347
|
-
*
|
|
84348
|
-
* - `backspace` is pressed
|
|
84349
|
-
* - AND the cursor is at the beginning of the input
|
|
84248
|
+
/* Trigger FEEL toggle when
|
|
84249
|
+
*
|
|
84250
|
+
* - `backspace` is pressed
|
|
84251
|
+
* - AND the cursor is at the beginning of the input
|
|
84350
84252
|
*/
|
|
84351
84253
|
const onKeyDown = e => {
|
|
84352
84254
|
if (e.key !== 'Backspace' || !editor) {
|
|
@@ -84435,10 +84337,10 @@
|
|
|
84435
84337
|
}
|
|
84436
84338
|
const noop$4 = () => {};
|
|
84437
84339
|
|
|
84438
|
-
/**
|
|
84439
|
-
* @param {Object} props
|
|
84440
|
-
* @param {Object} props.label
|
|
84441
|
-
* @param {String} props.feel
|
|
84340
|
+
/**
|
|
84341
|
+
* @param {Object} props
|
|
84342
|
+
* @param {Object} props.label
|
|
84343
|
+
* @param {String} props.feel
|
|
84442
84344
|
*/
|
|
84443
84345
|
function FeelIcon(props) {
|
|
84444
84346
|
const {
|
|
@@ -84472,22 +84374,22 @@
|
|
|
84472
84374
|
source: null
|
|
84473
84375
|
});
|
|
84474
84376
|
|
|
84475
|
-
/**
|
|
84476
|
-
* Add a dragger that calls back the passed function with
|
|
84477
|
-
* { event, delta } on drag.
|
|
84478
|
-
*
|
|
84479
|
-
* @example
|
|
84480
|
-
*
|
|
84481
|
-
* function dragMove(event, delta) {
|
|
84482
|
-
* // we are dragging (!!)
|
|
84483
|
-
* }
|
|
84484
|
-
*
|
|
84485
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
84486
|
-
*
|
|
84487
|
-
* @param {Function} fn
|
|
84488
|
-
* @param {Element} [dragPreview]
|
|
84489
|
-
*
|
|
84490
|
-
* @return {Function} drag start callback function
|
|
84377
|
+
/**
|
|
84378
|
+
* Add a dragger that calls back the passed function with
|
|
84379
|
+
* { event, delta } on drag.
|
|
84380
|
+
*
|
|
84381
|
+
* @example
|
|
84382
|
+
*
|
|
84383
|
+
* function dragMove(event, delta) {
|
|
84384
|
+
* // we are dragging (!!)
|
|
84385
|
+
* }
|
|
84386
|
+
*
|
|
84387
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
84388
|
+
*
|
|
84389
|
+
* @param {Function} fn
|
|
84390
|
+
* @param {Element} [dragPreview]
|
|
84391
|
+
*
|
|
84392
|
+
* @return {Function} drag start callback function
|
|
84491
84393
|
*/
|
|
84492
84394
|
function createDragger(fn, dragPreview) {
|
|
84493
84395
|
let self;
|
|
@@ -84541,23 +84443,23 @@
|
|
|
84541
84443
|
}
|
|
84542
84444
|
const noop$3 = () => {};
|
|
84543
84445
|
|
|
84544
|
-
/**
|
|
84545
|
-
* A generic popup component.
|
|
84546
|
-
*
|
|
84547
|
-
* @param {Object} props
|
|
84548
|
-
* @param {HTMLElement} [props.container]
|
|
84549
|
-
* @param {string} [props.className]
|
|
84550
|
-
* @param {boolean} [props.delayInitialFocus]
|
|
84551
|
-
* @param {{x: number, y: number}} [props.position]
|
|
84552
|
-
* @param {number} [props.width]
|
|
84553
|
-
* @param {number} [props.height]
|
|
84554
|
-
* @param {Function} props.onClose
|
|
84555
|
-
* @param {Function} [props.onPostActivate]
|
|
84556
|
-
* @param {Function} [props.onPostDeactivate]
|
|
84557
|
-
* @param {boolean} [props.returnFocus]
|
|
84558
|
-
* @param {boolean} [props.closeOnEscape]
|
|
84559
|
-
* @param {string} props.title
|
|
84560
|
-
* @param {Ref} [ref]
|
|
84446
|
+
/**
|
|
84447
|
+
* A generic popup component.
|
|
84448
|
+
*
|
|
84449
|
+
* @param {Object} props
|
|
84450
|
+
* @param {HTMLElement} [props.container]
|
|
84451
|
+
* @param {string} [props.className]
|
|
84452
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
84453
|
+
* @param {{x: number, y: number}} [props.position]
|
|
84454
|
+
* @param {number} [props.width]
|
|
84455
|
+
* @param {number} [props.height]
|
|
84456
|
+
* @param {Function} props.onClose
|
|
84457
|
+
* @param {Function} [props.onPostActivate]
|
|
84458
|
+
* @param {Function} [props.onPostDeactivate]
|
|
84459
|
+
* @param {boolean} [props.returnFocus]
|
|
84460
|
+
* @param {boolean} [props.closeOnEscape]
|
|
84461
|
+
* @param {string} props.title
|
|
84462
|
+
* @param {Ref} [ref]
|
|
84561
84463
|
*/
|
|
84562
84464
|
function PopupComponent(props, globalRef) {
|
|
84563
84465
|
const {
|
|
@@ -84775,12 +84677,12 @@
|
|
|
84775
84677
|
const FEEL_POPUP_WIDTH = 700;
|
|
84776
84678
|
const FEEL_POPUP_HEIGHT = 250;
|
|
84777
84679
|
|
|
84778
|
-
/**
|
|
84779
|
-
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
84780
|
-
* - `feelPopup.open` - fired before the popup is mounted
|
|
84781
|
-
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
84782
|
-
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
84783
|
-
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
84680
|
+
/**
|
|
84681
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
84682
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
84683
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
84684
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
84685
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
84784
84686
|
*/
|
|
84785
84687
|
function FEELPopupRoot(props) {
|
|
84786
84688
|
const {
|
|
@@ -85007,11 +84909,11 @@
|
|
|
85007
84909
|
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
85008
84910
|
}
|
|
85009
84911
|
|
|
85010
|
-
/**
|
|
85011
|
-
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
85012
|
-
*
|
|
85013
|
-
* @param {Function} effect
|
|
85014
|
-
* @param {Array} deps
|
|
84912
|
+
/**
|
|
84913
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
84914
|
+
*
|
|
84915
|
+
* @param {Function} effect
|
|
84916
|
+
* @param {Array} deps
|
|
85015
84917
|
*/
|
|
85016
84918
|
function useUpdateEffect(effect, deps) {
|
|
85017
84919
|
const isMounted = _$1(false);
|
|
@@ -85088,19 +84990,19 @@
|
|
|
85088
84990
|
});
|
|
85089
84991
|
}
|
|
85090
84992
|
|
|
85091
|
-
/**
|
|
85092
|
-
* @param {Object} props
|
|
85093
|
-
* @param {Object} props.element
|
|
85094
|
-
* @param {String} props.id
|
|
85095
|
-
* @param {String} props.description
|
|
85096
|
-
* @param {String} props.label
|
|
85097
|
-
* @param {String} props.switcherLabel
|
|
85098
|
-
* @param {Boolean} props.inline
|
|
85099
|
-
* @param {Function} props.getValue
|
|
85100
|
-
* @param {Function} props.setValue
|
|
85101
|
-
* @param {Function} props.onFocus
|
|
85102
|
-
* @param {Function} props.onBlur
|
|
85103
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
84993
|
+
/**
|
|
84994
|
+
* @param {Object} props
|
|
84995
|
+
* @param {Object} props.element
|
|
84996
|
+
* @param {String} props.id
|
|
84997
|
+
* @param {String} props.description
|
|
84998
|
+
* @param {String} props.label
|
|
84999
|
+
* @param {String} props.switcherLabel
|
|
85000
|
+
* @param {Boolean} props.inline
|
|
85001
|
+
* @param {Function} props.getValue
|
|
85002
|
+
* @param {Function} props.setValue
|
|
85003
|
+
* @param {Function} props.onFocus
|
|
85004
|
+
* @param {Function} props.onBlur
|
|
85005
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
85104
85006
|
*/
|
|
85105
85007
|
function ToggleSwitchEntry(props) {
|
|
85106
85008
|
const {
|
|
@@ -85207,22 +85109,22 @@
|
|
|
85207
85109
|
});
|
|
85208
85110
|
}
|
|
85209
85111
|
|
|
85210
|
-
/**
|
|
85211
|
-
* @param {Object} props
|
|
85212
|
-
* @param {Boolean} props.debounce
|
|
85213
|
-
* @param {String} props.description
|
|
85214
|
-
* @param {Boolean} props.disabled
|
|
85215
|
-
* @param {Object} props.element
|
|
85216
|
-
* @param {Function} props.getValue
|
|
85217
|
-
* @param {String} props.id
|
|
85218
|
-
* @param {String} props.label
|
|
85219
|
-
* @param {String} props.max
|
|
85220
|
-
* @param {String} props.min
|
|
85221
|
-
* @param {Function} props.setValue
|
|
85222
|
-
* @param {Function} props.onFocus
|
|
85223
|
-
* @param {Function} props.onBlur
|
|
85224
|
-
* @param {String} props.step
|
|
85225
|
-
* @param {Function} props.validate
|
|
85112
|
+
/**
|
|
85113
|
+
* @param {Object} props
|
|
85114
|
+
* @param {Boolean} props.debounce
|
|
85115
|
+
* @param {String} props.description
|
|
85116
|
+
* @param {Boolean} props.disabled
|
|
85117
|
+
* @param {Object} props.element
|
|
85118
|
+
* @param {Function} props.getValue
|
|
85119
|
+
* @param {String} props.id
|
|
85120
|
+
* @param {String} props.label
|
|
85121
|
+
* @param {String} props.max
|
|
85122
|
+
* @param {String} props.min
|
|
85123
|
+
* @param {Function} props.setValue
|
|
85124
|
+
* @param {Function} props.onFocus
|
|
85125
|
+
* @param {Function} props.onBlur
|
|
85126
|
+
* @param {String} props.step
|
|
85127
|
+
* @param {Function} props.validate
|
|
85226
85128
|
*/
|
|
85227
85129
|
function NumberFieldEntry(props) {
|
|
85228
85130
|
const {
|
|
@@ -85707,26 +85609,26 @@
|
|
|
85707
85609
|
});
|
|
85708
85610
|
});
|
|
85709
85611
|
|
|
85710
|
-
/**
|
|
85711
|
-
* @param {Object} props
|
|
85712
|
-
* @param {Object} props.element
|
|
85713
|
-
* @param {String} props.id
|
|
85714
|
-
* @param {String} props.description
|
|
85715
|
-
* @param {Boolean} props.debounce
|
|
85716
|
-
* @param {Boolean} props.disabled
|
|
85717
|
-
* @param {Boolean} props.feel
|
|
85718
|
-
* @param {String} props.label
|
|
85719
|
-
* @param {Function} props.getValue
|
|
85720
|
-
* @param {Function} props.setValue
|
|
85721
|
-
* @param {Function} props.tooltipContainer
|
|
85722
|
-
* @param {Function} props.validate
|
|
85723
|
-
* @param {Function} props.show
|
|
85724
|
-
* @param {Function} props.example
|
|
85725
|
-
* @param {Function} props.variables
|
|
85726
|
-
* @param {Function} props.onFocus
|
|
85727
|
-
* @param {Function} props.onBlur
|
|
85728
|
-
* @param {string} [props.placeholder]
|
|
85729
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
85612
|
+
/**
|
|
85613
|
+
* @param {Object} props
|
|
85614
|
+
* @param {Object} props.element
|
|
85615
|
+
* @param {String} props.id
|
|
85616
|
+
* @param {String} props.description
|
|
85617
|
+
* @param {Boolean} props.debounce
|
|
85618
|
+
* @param {Boolean} props.disabled
|
|
85619
|
+
* @param {Boolean} props.feel
|
|
85620
|
+
* @param {String} props.label
|
|
85621
|
+
* @param {Function} props.getValue
|
|
85622
|
+
* @param {Function} props.setValue
|
|
85623
|
+
* @param {Function} props.tooltipContainer
|
|
85624
|
+
* @param {Function} props.validate
|
|
85625
|
+
* @param {Function} props.show
|
|
85626
|
+
* @param {Function} props.example
|
|
85627
|
+
* @param {Function} props.variables
|
|
85628
|
+
* @param {Function} props.onFocus
|
|
85629
|
+
* @param {Function} props.onBlur
|
|
85630
|
+
* @param {string} [props.placeholder]
|
|
85631
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
85730
85632
|
*/
|
|
85731
85633
|
function FeelEntry(props) {
|
|
85732
85634
|
const {
|
|
@@ -85813,27 +85715,27 @@
|
|
|
85813
85715
|
});
|
|
85814
85716
|
}
|
|
85815
85717
|
|
|
85816
|
-
/**
|
|
85817
|
-
* @param {Object} props
|
|
85818
|
-
* @param {Object} props.element
|
|
85819
|
-
* @param {String} props.id
|
|
85820
|
-
* @param {String} props.description
|
|
85821
|
-
* @param {Boolean} props.debounce
|
|
85822
|
-
* @param {Boolean} props.disabled
|
|
85823
|
-
* @param {String} props.max
|
|
85824
|
-
* @param {String} props.min
|
|
85825
|
-
* @param {String} props.step
|
|
85826
|
-
* @param {Boolean} props.feel
|
|
85827
|
-
* @param {String} props.label
|
|
85828
|
-
* @param {Function} props.getValue
|
|
85829
|
-
* @param {Function} props.setValue
|
|
85830
|
-
* @param {Function} props.tooltipContainer
|
|
85831
|
-
* @param {Function} props.validate
|
|
85832
|
-
* @param {Function} props.show
|
|
85833
|
-
* @param {Function} props.example
|
|
85834
|
-
* @param {Function} props.variables
|
|
85835
|
-
* @param {Function} props.onFocus
|
|
85836
|
-
* @param {Function} props.onBlur
|
|
85718
|
+
/**
|
|
85719
|
+
* @param {Object} props
|
|
85720
|
+
* @param {Object} props.element
|
|
85721
|
+
* @param {String} props.id
|
|
85722
|
+
* @param {String} props.description
|
|
85723
|
+
* @param {Boolean} props.debounce
|
|
85724
|
+
* @param {Boolean} props.disabled
|
|
85725
|
+
* @param {String} props.max
|
|
85726
|
+
* @param {String} props.min
|
|
85727
|
+
* @param {String} props.step
|
|
85728
|
+
* @param {Boolean} props.feel
|
|
85729
|
+
* @param {String} props.label
|
|
85730
|
+
* @param {Function} props.getValue
|
|
85731
|
+
* @param {Function} props.setValue
|
|
85732
|
+
* @param {Function} props.tooltipContainer
|
|
85733
|
+
* @param {Function} props.validate
|
|
85734
|
+
* @param {Function} props.show
|
|
85735
|
+
* @param {Function} props.example
|
|
85736
|
+
* @param {Function} props.variables
|
|
85737
|
+
* @param {Function} props.onFocus
|
|
85738
|
+
* @param {Function} props.onBlur
|
|
85837
85739
|
*/
|
|
85838
85740
|
function FeelNumberEntry(props) {
|
|
85839
85741
|
return o(FeelEntry, {
|
|
@@ -85843,24 +85745,24 @@
|
|
|
85843
85745
|
});
|
|
85844
85746
|
}
|
|
85845
85747
|
|
|
85846
|
-
/**
|
|
85847
|
-
* @param {Object} props
|
|
85848
|
-
* @param {Object} props.element
|
|
85849
|
-
* @param {String} props.id
|
|
85850
|
-
* @param {String} props.description
|
|
85851
|
-
* @param {Boolean} props.debounce
|
|
85852
|
-
* @param {Boolean} props.disabled
|
|
85853
|
-
* @param {Boolean} props.feel
|
|
85854
|
-
* @param {String} props.label
|
|
85855
|
-
* @param {Function} props.getValue
|
|
85856
|
-
* @param {Function} props.setValue
|
|
85857
|
-
* @param {Function} props.tooltipContainer
|
|
85858
|
-
* @param {Function} props.validate
|
|
85859
|
-
* @param {Function} props.show
|
|
85860
|
-
* @param {Function} props.example
|
|
85861
|
-
* @param {Function} props.variables
|
|
85862
|
-
* @param {Function} props.onFocus
|
|
85863
|
-
* @param {Function} props.onBlur
|
|
85748
|
+
/**
|
|
85749
|
+
* @param {Object} props
|
|
85750
|
+
* @param {Object} props.element
|
|
85751
|
+
* @param {String} props.id
|
|
85752
|
+
* @param {String} props.description
|
|
85753
|
+
* @param {Boolean} props.debounce
|
|
85754
|
+
* @param {Boolean} props.disabled
|
|
85755
|
+
* @param {Boolean} props.feel
|
|
85756
|
+
* @param {String} props.label
|
|
85757
|
+
* @param {Function} props.getValue
|
|
85758
|
+
* @param {Function} props.setValue
|
|
85759
|
+
* @param {Function} props.tooltipContainer
|
|
85760
|
+
* @param {Function} props.validate
|
|
85761
|
+
* @param {Function} props.show
|
|
85762
|
+
* @param {Function} props.example
|
|
85763
|
+
* @param {Function} props.variables
|
|
85764
|
+
* @param {Function} props.onFocus
|
|
85765
|
+
* @param {Function} props.onBlur
|
|
85864
85766
|
*/
|
|
85865
85767
|
function FeelToggleSwitchEntry(props) {
|
|
85866
85768
|
return o(FeelEntry, {
|
|
@@ -85870,26 +85772,26 @@
|
|
|
85870
85772
|
});
|
|
85871
85773
|
}
|
|
85872
85774
|
|
|
85873
|
-
/**
|
|
85874
|
-
* @param {Object} props
|
|
85875
|
-
* @param {Object} props.element
|
|
85876
|
-
* @param {String} props.id
|
|
85877
|
-
* @param {String} props.description
|
|
85878
|
-
* @param {String} props.hostLanguage
|
|
85879
|
-
* @param {Boolean} props.singleLine
|
|
85880
|
-
* @param {Boolean} props.debounce
|
|
85881
|
-
* @param {Boolean} props.disabled
|
|
85882
|
-
* @param {Boolean} props.feel
|
|
85883
|
-
* @param {String} props.label
|
|
85884
|
-
* @param {Function} props.getValue
|
|
85885
|
-
* @param {Function} props.setValue
|
|
85886
|
-
* @param {Function} props.tooltipContainer
|
|
85887
|
-
* @param {Function} props.validate
|
|
85888
|
-
* @param {Function} props.show
|
|
85889
|
-
* @param {Function} props.example
|
|
85890
|
-
* @param {Function} props.variables
|
|
85891
|
-
* @param {Function} props.onFocus
|
|
85892
|
-
* @param {Function} props.onBlur
|
|
85775
|
+
/**
|
|
85776
|
+
* @param {Object} props
|
|
85777
|
+
* @param {Object} props.element
|
|
85778
|
+
* @param {String} props.id
|
|
85779
|
+
* @param {String} props.description
|
|
85780
|
+
* @param {String} props.hostLanguage
|
|
85781
|
+
* @param {Boolean} props.singleLine
|
|
85782
|
+
* @param {Boolean} props.debounce
|
|
85783
|
+
* @param {Boolean} props.disabled
|
|
85784
|
+
* @param {Boolean} props.feel
|
|
85785
|
+
* @param {String} props.label
|
|
85786
|
+
* @param {Function} props.getValue
|
|
85787
|
+
* @param {Function} props.setValue
|
|
85788
|
+
* @param {Function} props.tooltipContainer
|
|
85789
|
+
* @param {Function} props.validate
|
|
85790
|
+
* @param {Function} props.show
|
|
85791
|
+
* @param {Function} props.example
|
|
85792
|
+
* @param {Function} props.variables
|
|
85793
|
+
* @param {Function} props.onFocus
|
|
85794
|
+
* @param {Function} props.onBlur
|
|
85893
85795
|
*/
|
|
85894
85796
|
function FeelTemplatingEntry(props) {
|
|
85895
85797
|
return o(FeelEntry, {
|
|
@@ -85957,85 +85859,85 @@
|
|
|
85957
85859
|
const DEFAULT_DESCRIPTION = {};
|
|
85958
85860
|
const DEFAULT_TOOLTIP = {};
|
|
85959
85861
|
|
|
85960
|
-
/**
|
|
85961
|
-
* @typedef { {
|
|
85962
|
-
* component: import('preact').Component,
|
|
85963
|
-
* id: String,
|
|
85964
|
-
* isEdited?: Function
|
|
85965
|
-
* } } EntryDefinition
|
|
85966
|
-
*
|
|
85967
|
-
* @typedef { {
|
|
85968
|
-
* autoFocusEntry: String,
|
|
85969
|
-
* autoOpen?: Boolean,
|
|
85970
|
-
* entries: Array<EntryDefinition>,
|
|
85971
|
-
* id: String,
|
|
85972
|
-
* label: String,
|
|
85973
|
-
* remove: (event: MouseEvent) => void
|
|
85974
|
-
* } } ListItemDefinition
|
|
85975
|
-
*
|
|
85976
|
-
* @typedef { {
|
|
85977
|
-
* add: (event: MouseEvent) => void,
|
|
85978
|
-
* component: import('preact').Component,
|
|
85979
|
-
* element: Object,
|
|
85980
|
-
* id: String,
|
|
85981
|
-
* items: Array<ListItemDefinition>,
|
|
85982
|
-
* label: String,
|
|
85983
|
-
* shouldOpen?: Boolean
|
|
85984
|
-
* } } ListGroupDefinition
|
|
85985
|
-
*
|
|
85986
|
-
* @typedef { {
|
|
85987
|
-
* component?: import('preact').Component,
|
|
85988
|
-
* entries: Array<EntryDefinition>,
|
|
85989
|
-
* id: String,
|
|
85990
|
-
* label: String,
|
|
85991
|
-
* shouldOpen?: Boolean
|
|
85992
|
-
* } } GroupDefinition
|
|
85993
|
-
*
|
|
85994
|
-
* @typedef { {
|
|
85995
|
-
* [id: String]: GetDescriptionFunction
|
|
85996
|
-
* } } DescriptionConfig
|
|
85997
|
-
*
|
|
85998
|
-
* @typedef { {
|
|
85999
|
-
* [id: String]: GetTooltipFunction
|
|
86000
|
-
* } } TooltipConfig
|
|
86001
|
-
*
|
|
86002
|
-
* @callback { {
|
|
86003
|
-
* @param {string} id
|
|
86004
|
-
* @param {Object} element
|
|
86005
|
-
* @returns {string}
|
|
86006
|
-
* } } GetDescriptionFunction
|
|
86007
|
-
*
|
|
86008
|
-
* @callback { {
|
|
86009
|
-
* @param {string} id
|
|
86010
|
-
* @param {Object} element
|
|
86011
|
-
* @returns {string}
|
|
86012
|
-
* } } GetTooltipFunction
|
|
86013
|
-
*
|
|
86014
|
-
* @typedef { {
|
|
86015
|
-
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
86016
|
-
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
86017
|
-
* } } PlaceholderProvider
|
|
86018
|
-
*
|
|
85862
|
+
/**
|
|
85863
|
+
* @typedef { {
|
|
85864
|
+
* component: import('preact').Component,
|
|
85865
|
+
* id: String,
|
|
85866
|
+
* isEdited?: Function
|
|
85867
|
+
* } } EntryDefinition
|
|
85868
|
+
*
|
|
85869
|
+
* @typedef { {
|
|
85870
|
+
* autoFocusEntry: String,
|
|
85871
|
+
* autoOpen?: Boolean,
|
|
85872
|
+
* entries: Array<EntryDefinition>,
|
|
85873
|
+
* id: String,
|
|
85874
|
+
* label: String,
|
|
85875
|
+
* remove: (event: MouseEvent) => void
|
|
85876
|
+
* } } ListItemDefinition
|
|
85877
|
+
*
|
|
85878
|
+
* @typedef { {
|
|
85879
|
+
* add: (event: MouseEvent) => void,
|
|
85880
|
+
* component: import('preact').Component,
|
|
85881
|
+
* element: Object,
|
|
85882
|
+
* id: String,
|
|
85883
|
+
* items: Array<ListItemDefinition>,
|
|
85884
|
+
* label: String,
|
|
85885
|
+
* shouldOpen?: Boolean
|
|
85886
|
+
* } } ListGroupDefinition
|
|
85887
|
+
*
|
|
85888
|
+
* @typedef { {
|
|
85889
|
+
* component?: import('preact').Component,
|
|
85890
|
+
* entries: Array<EntryDefinition>,
|
|
85891
|
+
* id: String,
|
|
85892
|
+
* label: String,
|
|
85893
|
+
* shouldOpen?: Boolean
|
|
85894
|
+
* } } GroupDefinition
|
|
85895
|
+
*
|
|
85896
|
+
* @typedef { {
|
|
85897
|
+
* [id: String]: GetDescriptionFunction
|
|
85898
|
+
* } } DescriptionConfig
|
|
85899
|
+
*
|
|
85900
|
+
* @typedef { {
|
|
85901
|
+
* [id: String]: GetTooltipFunction
|
|
85902
|
+
* } } TooltipConfig
|
|
85903
|
+
*
|
|
85904
|
+
* @callback { {
|
|
85905
|
+
* @param {string} id
|
|
85906
|
+
* @param {Object} element
|
|
85907
|
+
* @returns {string}
|
|
85908
|
+
* } } GetDescriptionFunction
|
|
85909
|
+
*
|
|
85910
|
+
* @callback { {
|
|
85911
|
+
* @param {string} id
|
|
85912
|
+
* @param {Object} element
|
|
85913
|
+
* @returns {string}
|
|
85914
|
+
* } } GetTooltipFunction
|
|
85915
|
+
*
|
|
85916
|
+
* @typedef { {
|
|
85917
|
+
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
85918
|
+
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
85919
|
+
* } } PlaceholderProvider
|
|
85920
|
+
*
|
|
86019
85921
|
*/
|
|
86020
85922
|
|
|
86021
|
-
/**
|
|
86022
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
86023
|
-
* data from implementor to describe *what* will be rendered.
|
|
86024
|
-
*
|
|
86025
|
-
* @param {Object} props
|
|
86026
|
-
* @param {Object|Array} props.element
|
|
86027
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
86028
|
-
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
86029
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
86030
|
-
* @param {Object} [props.layoutConfig]
|
|
86031
|
-
* @param {Function} [props.layoutChanged]
|
|
86032
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
86033
|
-
* @param {Function} [props.descriptionLoaded]
|
|
86034
|
-
* @param {TooltipConfig} [props.tooltipConfig]
|
|
86035
|
-
* @param {Function} [props.tooltipLoaded]
|
|
86036
|
-
* @param {HTMLElement} [props.feelPopupContainer]
|
|
86037
|
-
* @param {Function} [props.getFeelPopupLinks]
|
|
86038
|
-
* @param {Object} [props.eventBus]
|
|
85923
|
+
/**
|
|
85924
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
85925
|
+
* data from implementor to describe *what* will be rendered.
|
|
85926
|
+
*
|
|
85927
|
+
* @param {Object} props
|
|
85928
|
+
* @param {Object|Array} props.element
|
|
85929
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
85930
|
+
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
85931
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
85932
|
+
* @param {Object} [props.layoutConfig]
|
|
85933
|
+
* @param {Function} [props.layoutChanged]
|
|
85934
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
85935
|
+
* @param {Function} [props.descriptionLoaded]
|
|
85936
|
+
* @param {TooltipConfig} [props.tooltipConfig]
|
|
85937
|
+
* @param {Function} [props.tooltipLoaded]
|
|
85938
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
85939
|
+
* @param {Function} [props.getFeelPopupLinks]
|
|
85940
|
+
* @param {Object} [props.eventBus]
|
|
86039
85941
|
*/
|
|
86040
85942
|
function PropertiesPanel$1(props) {
|
|
86041
85943
|
const {
|
|
@@ -86208,11 +86110,11 @@
|
|
|
86208
86110
|
|
|
86209
86111
|
// hooks //////////////////
|
|
86210
86112
|
|
|
86211
|
-
/**
|
|
86212
|
-
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
86213
|
-
*
|
|
86214
|
-
* @param {Function} effect
|
|
86215
|
-
* @param {Array} deps
|
|
86113
|
+
/**
|
|
86114
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
86115
|
+
*
|
|
86116
|
+
* @param {Function} effect
|
|
86117
|
+
* @param {Array} deps
|
|
86216
86118
|
*/
|
|
86217
86119
|
function useUpdateLayoutEffect(effect, deps) {
|
|
86218
86120
|
const isMounted = _$1(false);
|
|
@@ -86225,20 +86127,20 @@
|
|
|
86225
86127
|
}, deps);
|
|
86226
86128
|
}
|
|
86227
86129
|
|
|
86228
|
-
/**
|
|
86229
|
-
* @typedef { {
|
|
86230
|
-
* [key: string]: string;
|
|
86231
|
-
* } } TranslateReplacements
|
|
86130
|
+
/**
|
|
86131
|
+
* @typedef { {
|
|
86132
|
+
* [key: string]: string;
|
|
86133
|
+
* } } TranslateReplacements
|
|
86232
86134
|
*/
|
|
86233
86135
|
|
|
86234
|
-
/**
|
|
86235
|
-
* A simple translation stub to be used for multi-language support.
|
|
86236
|
-
* Can be easily replaced with a more sophisticated solution.
|
|
86237
|
-
*
|
|
86238
|
-
* @param {string} template to interpolate
|
|
86239
|
-
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
86240
|
-
*
|
|
86241
|
-
* @return {string} the translated string
|
|
86136
|
+
/**
|
|
86137
|
+
* A simple translation stub to be used for multi-language support.
|
|
86138
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
86139
|
+
*
|
|
86140
|
+
* @param {string} template to interpolate
|
|
86141
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
86142
|
+
*
|
|
86143
|
+
* @return {string} the translated string
|
|
86242
86144
|
*/
|
|
86243
86145
|
function translateFallback(template, replacements) {
|
|
86244
86146
|
replacements = replacements || {};
|
|
@@ -86347,8 +86249,8 @@
|
|
|
86347
86249
|
}
|
|
86348
86250
|
const noop$1 = () => {};
|
|
86349
86251
|
|
|
86350
|
-
/**
|
|
86351
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
86252
|
+
/**
|
|
86253
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
86352
86254
|
*/
|
|
86353
86255
|
function ListGroup(props) {
|
|
86354
86256
|
const {
|
|
@@ -86539,18 +86441,18 @@
|
|
|
86539
86441
|
});
|
|
86540
86442
|
}
|
|
86541
86443
|
|
|
86542
|
-
/**
|
|
86543
|
-
* @param {Object} props
|
|
86544
|
-
* @param {Object} props.element
|
|
86545
|
-
* @param {String} props.id
|
|
86546
|
-
* @param {String} props.description
|
|
86547
|
-
* @param {String} props.label
|
|
86548
|
-
* @param {Function} props.getValue
|
|
86549
|
-
* @param {Function} props.setValue
|
|
86550
|
-
* @param {Function} props.onFocus
|
|
86551
|
-
* @param {Function} props.onBlur
|
|
86552
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
86553
|
-
* @param {boolean} [props.disabled]
|
|
86444
|
+
/**
|
|
86445
|
+
* @param {Object} props
|
|
86446
|
+
* @param {Object} props.element
|
|
86447
|
+
* @param {String} props.id
|
|
86448
|
+
* @param {String} props.description
|
|
86449
|
+
* @param {String} props.label
|
|
86450
|
+
* @param {Function} props.getValue
|
|
86451
|
+
* @param {Function} props.setValue
|
|
86452
|
+
* @param {Function} props.onFocus
|
|
86453
|
+
* @param {Function} props.onBlur
|
|
86454
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
86455
|
+
* @param {boolean} [props.disabled]
|
|
86554
86456
|
*/
|
|
86555
86457
|
function CheckboxEntry(props) {
|
|
86556
86458
|
const {
|
|
@@ -86670,20 +86572,20 @@
|
|
|
86670
86572
|
});
|
|
86671
86573
|
}
|
|
86672
86574
|
|
|
86673
|
-
/**
|
|
86674
|
-
* @param {object} props
|
|
86675
|
-
* @param {object} props.element
|
|
86676
|
-
* @param {string} props.id
|
|
86677
|
-
* @param {string} [props.description]
|
|
86678
|
-
* @param {string} props.label
|
|
86679
|
-
* @param {Function} props.getValue
|
|
86680
|
-
* @param {Function} props.setValue
|
|
86681
|
-
* @param {Function} props.onFocus
|
|
86682
|
-
* @param {Function} props.onBlur
|
|
86683
|
-
* @param {Function} props.getOptions
|
|
86684
|
-
* @param {boolean} [props.disabled]
|
|
86685
|
-
* @param {Function} [props.validate]
|
|
86686
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
86575
|
+
/**
|
|
86576
|
+
* @param {object} props
|
|
86577
|
+
* @param {object} props.element
|
|
86578
|
+
* @param {string} props.id
|
|
86579
|
+
* @param {string} [props.description]
|
|
86580
|
+
* @param {string} props.label
|
|
86581
|
+
* @param {Function} props.getValue
|
|
86582
|
+
* @param {Function} props.setValue
|
|
86583
|
+
* @param {Function} props.onFocus
|
|
86584
|
+
* @param {Function} props.onBlur
|
|
86585
|
+
* @param {Function} props.getOptions
|
|
86586
|
+
* @param {boolean} [props.disabled]
|
|
86587
|
+
* @param {Function} [props.validate]
|
|
86588
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
86687
86589
|
*/
|
|
86688
86590
|
function SelectEntry(props) {
|
|
86689
86591
|
const {
|
|
@@ -86974,20 +86876,20 @@
|
|
|
86974
86876
|
});
|
|
86975
86877
|
}
|
|
86976
86878
|
|
|
86977
|
-
/**
|
|
86978
|
-
* @param {Object} props
|
|
86979
|
-
* @param {Object} props.element
|
|
86980
|
-
* @param {String} props.id
|
|
86981
|
-
* @param {String} props.description
|
|
86982
|
-
* @param {Boolean} props.debounce
|
|
86983
|
-
* @param {Boolean} props.disabled
|
|
86984
|
-
* @param {String} props.label
|
|
86985
|
-
* @param {Function} props.getValue
|
|
86986
|
-
* @param {Function} props.setValue
|
|
86987
|
-
* @param {Function} props.onFocus
|
|
86988
|
-
* @param {Function} props.onBlur
|
|
86989
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
86990
|
-
* @param {Function} props.validate
|
|
86879
|
+
/**
|
|
86880
|
+
* @param {Object} props
|
|
86881
|
+
* @param {Object} props.element
|
|
86882
|
+
* @param {String} props.id
|
|
86883
|
+
* @param {String} props.description
|
|
86884
|
+
* @param {Boolean} props.debounce
|
|
86885
|
+
* @param {Boolean} props.disabled
|
|
86886
|
+
* @param {String} props.label
|
|
86887
|
+
* @param {Function} props.getValue
|
|
86888
|
+
* @param {Function} props.setValue
|
|
86889
|
+
* @param {Function} props.onFocus
|
|
86890
|
+
* @param {Function} props.onBlur
|
|
86891
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
86892
|
+
* @param {Function} props.validate
|
|
86991
86893
|
*/
|
|
86992
86894
|
function TextfieldEntry(props) {
|
|
86993
86895
|
const {
|
|
@@ -87062,20 +86964,20 @@
|
|
|
87062
86964
|
this._eventBus = eventBus;
|
|
87063
86965
|
}
|
|
87064
86966
|
|
|
87065
|
-
/**
|
|
87066
|
-
* Check if the FEEL popup is open.
|
|
87067
|
-
* @return {Boolean}
|
|
86967
|
+
/**
|
|
86968
|
+
* Check if the FEEL popup is open.
|
|
86969
|
+
* @return {Boolean}
|
|
87068
86970
|
*/
|
|
87069
86971
|
isOpen() {
|
|
87070
86972
|
return this._eventBus.fire('feelPopup._isOpen');
|
|
87071
86973
|
}
|
|
87072
86974
|
|
|
87073
|
-
/**
|
|
87074
|
-
* Open the FEEL popup.
|
|
87075
|
-
*
|
|
87076
|
-
* @param {String} entryId
|
|
87077
|
-
* @param {Object} popupConfig
|
|
87078
|
-
* @param {HTMLElement} sourceElement
|
|
86975
|
+
/**
|
|
86976
|
+
* Open the FEEL popup.
|
|
86977
|
+
*
|
|
86978
|
+
* @param {String} entryId
|
|
86979
|
+
* @param {Object} popupConfig
|
|
86980
|
+
* @param {HTMLElement} sourceElement
|
|
87079
86981
|
*/
|
|
87080
86982
|
open(entryId, popupConfig, sourceElement) {
|
|
87081
86983
|
return this._eventBus.fire('feelPopup._open', {
|
|
@@ -87085,8 +86987,8 @@
|
|
|
87085
86987
|
});
|
|
87086
86988
|
}
|
|
87087
86989
|
|
|
87088
|
-
/**
|
|
87089
|
-
* Close the FEEL popup.
|
|
86990
|
+
/**
|
|
86991
|
+
* Close the FEEL popup.
|
|
87090
86992
|
*/
|
|
87091
86993
|
close() {
|
|
87092
86994
|
return this._eventBus.fire('feelPopup._close');
|
|
@@ -87493,7 +87395,7 @@
|
|
|
87493
87395
|
editField,
|
|
87494
87396
|
id
|
|
87495
87397
|
} = props;
|
|
87496
|
-
|
|
87398
|
+
useService('debounce');
|
|
87497
87399
|
const formLayoutValidator = useService('formLayoutValidator');
|
|
87498
87400
|
const validate = T$2(value => {
|
|
87499
87401
|
return formLayoutValidator.validateField(field, value ? parseInt(value) : null);
|
|
@@ -87519,7 +87421,6 @@
|
|
|
87519
87421
|
...asArray(16).filter(i => i >= MIN_COLUMNS).map(asOption)];
|
|
87520
87422
|
};
|
|
87521
87423
|
return SelectEntry({
|
|
87522
|
-
debounce,
|
|
87523
87424
|
element: field,
|
|
87524
87425
|
id,
|
|
87525
87426
|
label: 'Columns',
|
|
@@ -89964,7 +89865,6 @@
|
|
|
89964
89865
|
path: ['nonCollapsedItems'],
|
|
89965
89866
|
label: 'Number of non-collapsing items',
|
|
89966
89867
|
min: 1,
|
|
89967
|
-
defaultValue: 5,
|
|
89968
89868
|
props
|
|
89969
89869
|
});
|
|
89970
89870
|
entries.push(nonCollapseItemsEntry);
|
|
@@ -90990,12 +90890,10 @@
|
|
|
90990
90890
|
editField
|
|
90991
90891
|
}), ...TextEntry({
|
|
90992
90892
|
field,
|
|
90993
|
-
editField
|
|
90994
|
-
getService
|
|
90893
|
+
editField
|
|
90995
90894
|
}), ...HtmlEntry({
|
|
90996
90895
|
field,
|
|
90997
|
-
editField
|
|
90998
|
-
getService
|
|
90896
|
+
editField
|
|
90999
90897
|
}), ...IFrameUrlEntry({
|
|
91000
90898
|
field,
|
|
91001
90899
|
editField
|
|
@@ -91315,12 +91213,11 @@
|
|
|
91315
91213
|
id,
|
|
91316
91214
|
onChange
|
|
91317
91215
|
} = props;
|
|
91318
|
-
|
|
91216
|
+
useService('debounce');
|
|
91319
91217
|
const setValue = validationType => {
|
|
91320
91218
|
onChange('validationType')(validationType || undefined);
|
|
91321
91219
|
};
|
|
91322
91220
|
return SelectEntry({
|
|
91323
|
-
debounce,
|
|
91324
91221
|
element: field,
|
|
91325
91222
|
getValue: getValue('validationType'),
|
|
91326
91223
|
id,
|
|
@@ -92365,8 +92262,8 @@
|
|
|
92365
92262
|
*/
|
|
92366
92263
|
this.value = empty;
|
|
92367
92264
|
if (/\\[sWDnr]|\n|\r|\[\^/.test(query)) return new MultilineRegExpCursor(text, query, options, from, to);
|
|
92368
|
-
this.re = new RegExp(query, baseFlags + ((options === null || options ===
|
|
92369
|
-
this.test = options === null || options ===
|
|
92265
|
+
this.re = new RegExp(query, baseFlags + ((options === null || options === void 0 ? void 0 : options.ignoreCase) ? "i" : ""));
|
|
92266
|
+
this.test = options === null || options === void 0 ? void 0 : options.test;
|
|
92370
92267
|
this.iter = text.iter();
|
|
92371
92268
|
let startLine = text.lineAt(from);
|
|
92372
92269
|
this.curLineStart = startLine.from;
|
|
@@ -92456,8 +92353,8 @@
|
|
|
92456
92353
|
this.done = false;
|
|
92457
92354
|
this.value = empty;
|
|
92458
92355
|
this.matchPos = toCharEnd(text, from);
|
|
92459
|
-
this.re = new RegExp(query, baseFlags + ((options === null || options ===
|
|
92460
|
-
this.test = options === null || options ===
|
|
92356
|
+
this.re = new RegExp(query, baseFlags + ((options === null || options === void 0 ? void 0 : options.ignoreCase) ? "i" : ""));
|
|
92357
|
+
this.test = options === null || options === void 0 ? void 0 : options.test;
|
|
92461
92358
|
this.flat = FlattenedDoc.get(text, from, this.chunkEnd(from + 5000 /* Chunk.Base */));
|
|
92462
92359
|
}
|
|
92463
92360
|
chunkEnd(pos) {
|
|
@@ -93196,10 +93093,10 @@
|
|
|
93196
93093
|
if (fallback && !selText) return fallback;
|
|
93197
93094
|
let config = state.facet(searchConfigFacet);
|
|
93198
93095
|
return new SearchQuery({
|
|
93199
|
-
search: ((_a = fallback === null || fallback ===
|
|
93200
|
-
caseSensitive: (_b = fallback === null || fallback ===
|
|
93201
|
-
literal: (_c = fallback === null || fallback ===
|
|
93202
|
-
wholeWord: (_d = fallback === null || fallback ===
|
|
93096
|
+
search: ((_a = fallback === null || fallback === void 0 ? void 0 : fallback.literal) !== null && _a !== void 0 ? _a : config.literal) ? selText : selText.replace(/\n/g, "\\n"),
|
|
93097
|
+
caseSensitive: (_b = fallback === null || fallback === void 0 ? void 0 : fallback.caseSensitive) !== null && _b !== void 0 ? _b : config.caseSensitive,
|
|
93098
|
+
literal: (_c = fallback === null || fallback === void 0 ? void 0 : fallback.literal) !== null && _c !== void 0 ? _c : config.literal,
|
|
93099
|
+
wholeWord: (_d = fallback === null || fallback === void 0 ? void 0 : fallback.wholeWord) !== null && _d !== void 0 ? _d : config.wholeWord
|
|
93203
93100
|
});
|
|
93204
93101
|
}
|
|
93205
93102
|
/**
|
|
@@ -93599,25 +93496,130 @@
|
|
|
93599
93496
|
override: [completions]
|
|
93600
93497
|
})];
|
|
93601
93498
|
}
|
|
93499
|
+
|
|
93500
|
+
/**
|
|
93501
|
+
* @param {import('@codemirror/autocomplete').CompletionContext} context
|
|
93502
|
+
*/
|
|
93602
93503
|
function completions(context) {
|
|
93603
93504
|
const variables = context.state.facet(variablesFacet)[0];
|
|
93604
|
-
|
|
93605
|
-
|
|
93505
|
+
/** @type {import('@codemirror/autocomplete').Completion[]} */
|
|
93506
|
+
const objectOptions = variables.map(label => ({
|
|
93507
|
+
displayLabel: `"${label}"`,
|
|
93508
|
+
label: `"${label}": `,
|
|
93509
|
+
type: 'variable',
|
|
93510
|
+
apply: (view, completion, from, to) => {
|
|
93511
|
+
const doc = view.state.doc;
|
|
93512
|
+
const beforeChar = doc.sliceString(from - 1, from);
|
|
93513
|
+
const line = doc.lineAt(from);
|
|
93514
|
+
const indentation = /^\s*/.exec(line.text)[0];
|
|
93515
|
+
const baseInsert = completion.label;
|
|
93516
|
+
if (beforeChar === '{') {
|
|
93517
|
+
const insert = `\n ${indentation}${baseInsert},\n`;
|
|
93518
|
+
view.dispatch({
|
|
93519
|
+
changes: {
|
|
93520
|
+
from,
|
|
93521
|
+
to,
|
|
93522
|
+
insert
|
|
93523
|
+
},
|
|
93524
|
+
selection: {
|
|
93525
|
+
anchor: from + insert.length - 2
|
|
93526
|
+
}
|
|
93527
|
+
});
|
|
93528
|
+
} else if (beforeChar === ',') {
|
|
93529
|
+
const insert = `\n${indentation}${baseInsert},`;
|
|
93530
|
+
view.dispatch({
|
|
93531
|
+
changes: {
|
|
93532
|
+
from,
|
|
93533
|
+
to,
|
|
93534
|
+
insert
|
|
93535
|
+
},
|
|
93536
|
+
selection: {
|
|
93537
|
+
anchor: from + insert.length - 1
|
|
93538
|
+
}
|
|
93539
|
+
});
|
|
93540
|
+
} else {
|
|
93541
|
+
const insert = `${baseInsert},`;
|
|
93542
|
+
view.dispatch({
|
|
93543
|
+
changes: {
|
|
93544
|
+
from,
|
|
93545
|
+
to,
|
|
93546
|
+
insert
|
|
93547
|
+
},
|
|
93548
|
+
selection: {
|
|
93549
|
+
anchor: from + insert.length - 1
|
|
93550
|
+
}
|
|
93551
|
+
});
|
|
93552
|
+
}
|
|
93553
|
+
}
|
|
93554
|
+
}));
|
|
93555
|
+
/** @type {import('@codemirror/autocomplete').Completion[]} */
|
|
93556
|
+
const propertyNameOptions = variables.map(label => ({
|
|
93557
|
+
label,
|
|
93606
93558
|
type: 'variable'
|
|
93607
93559
|
}));
|
|
93560
|
+
/** @type {import('@codemirror/autocomplete').Completion[]} */
|
|
93561
|
+
const propertyValueOptions = [{
|
|
93562
|
+
label: 'true',
|
|
93563
|
+
type: 'constant keyword',
|
|
93564
|
+
boost: 3
|
|
93565
|
+
}, {
|
|
93566
|
+
label: 'false',
|
|
93567
|
+
type: 'constant keyword',
|
|
93568
|
+
boost: 2
|
|
93569
|
+
}, {
|
|
93570
|
+
label: 'null',
|
|
93571
|
+
type: 'constant keyword',
|
|
93572
|
+
boost: 1
|
|
93573
|
+
}, {
|
|
93574
|
+
displayLabel: '[ .. ]',
|
|
93575
|
+
label: '[ ]',
|
|
93576
|
+
apply: (view, completion, from, to) => {
|
|
93577
|
+
view.dispatch({
|
|
93578
|
+
changes: {
|
|
93579
|
+
from,
|
|
93580
|
+
to,
|
|
93581
|
+
insert: completion.label
|
|
93582
|
+
},
|
|
93583
|
+
selection: {
|
|
93584
|
+
anchor: from + 2
|
|
93585
|
+
}
|
|
93586
|
+
});
|
|
93587
|
+
}
|
|
93588
|
+
}, {
|
|
93589
|
+
displayLabel: '{ .. }',
|
|
93590
|
+
label: '{ }',
|
|
93591
|
+
apply: (view, completion, from, to) => {
|
|
93592
|
+
view.dispatch({
|
|
93593
|
+
changes: {
|
|
93594
|
+
from,
|
|
93595
|
+
to,
|
|
93596
|
+
insert: completion.label
|
|
93597
|
+
},
|
|
93598
|
+
selection: {
|
|
93599
|
+
anchor: from + 2
|
|
93600
|
+
}
|
|
93601
|
+
});
|
|
93602
|
+
}
|
|
93603
|
+
}];
|
|
93604
|
+
let finalOptions = [];
|
|
93608
93605
|
let nodeBefore = syntaxTree(context.state).resolve(context.pos, -1);
|
|
93609
|
-
|
|
93610
|
-
|
|
93606
|
+
let word = context.matchBefore(/\w*/);
|
|
93607
|
+
if (['Object', '{'].includes(nodeBefore.type.name)) {
|
|
93608
|
+
finalOptions = objectOptions;
|
|
93609
|
+
}
|
|
93611
93610
|
if (nodeBefore.type.name === 'PropertyName') {
|
|
93612
93611
|
context.explicit = true;
|
|
93612
|
+
finalOptions = propertyNameOptions;
|
|
93613
|
+
}
|
|
93614
|
+
if (['Property', '[', 'Array'].includes(nodeBefore.type.name)) {
|
|
93615
|
+
finalOptions = propertyValueOptions;
|
|
93613
93616
|
}
|
|
93614
|
-
let word = context.matchBefore(/\w*/);
|
|
93615
93617
|
if (word.from == word.to && !context.explicit) {
|
|
93616
93618
|
return null;
|
|
93617
93619
|
}
|
|
93618
93620
|
return {
|
|
93619
93621
|
from: word.from,
|
|
93620
|
-
options
|
|
93622
|
+
options: finalOptions
|
|
93621
93623
|
};
|
|
93622
93624
|
}
|
|
93623
93625
|
|