@bpmn-io/form-js-playground 1.8.0 → 1.8.2

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.
@@ -304,22 +304,22 @@
304
304
  * Expose `parse`.
305
305
  */
306
306
 
307
- var domify$3 = parse$5;
307
+ var domify$4 = parse$4;
308
308
 
309
309
  /**
310
310
  * Tests for browser support.
311
311
  */
312
312
 
313
- var innerHTMLBug$2 = false;
314
- var bugTestDiv$3;
313
+ var innerHTMLBug$1 = false;
314
+ var bugTestDiv$1;
315
315
  if (typeof document !== 'undefined') {
316
- bugTestDiv$3 = document.createElement('div');
316
+ bugTestDiv$1 = document.createElement('div');
317
317
  // Setup
318
- bugTestDiv$3.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
318
+ bugTestDiv$1.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
319
319
  // Make sure that link elements get serialized correctly by innerHTML
320
320
  // This requires a wrapper element in IE
321
- innerHTMLBug$2 = !bugTestDiv$3.getElementsByTagName('link').length;
322
- bugTestDiv$3 = undefined;
321
+ innerHTMLBug$1 = !bugTestDiv$1.getElementsByTagName('link').length;
322
+ bugTestDiv$1 = undefined;
323
323
  }
324
324
 
325
325
  /**
@@ -332,7 +332,7 @@
332
332
  col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
333
333
  // for script/link/style tags to work in IE6-8, you have to wrap
334
334
  // in a div with a non-whitespace character in front, ha!
335
- _default: innerHTMLBug$2 ? [1, 'X<div>', '</div>'] : [0, '', '']
335
+ _default: innerHTMLBug$1 ? [1, 'X<div>', '</div>'] : [0, '', '']
336
336
  };
337
337
  map$1$1.td = map$1$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
338
338
  map$1$1.option = map$1$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
@@ -350,7 +350,7 @@
350
350
  * @api private
351
351
  */
352
352
 
353
- function parse$5(html, doc) {
353
+ function parse$4(html, doc) {
354
354
  if ('string' != typeof html) throw new TypeError('String expected');
355
355
 
356
356
  // default to the global `document` object
@@ -559,7 +559,7 @@
559
559
  }
560
560
  function createOverlay(label) {
561
561
  var markup = OVERLAY_HTML.replace('{label}', label);
562
- return domify$3(markup);
562
+ return domify$4(markup);
563
563
  }
564
564
  function preventDrop(event) {
565
565
  event.preventDefault();
@@ -1306,7 +1306,7 @@
1306
1306
  *
1307
1307
  * @return {Array} transformed collection
1308
1308
  */
1309
- function map$3(collection, fn) {
1309
+ function map$2(collection, fn) {
1310
1310
  let result = [];
1311
1311
  forEach$1(collection, function (val, key) {
1312
1312
  result.push(fn(val, key));
@@ -1322,7 +1322,7 @@
1322
1322
  * @return {Array}
1323
1323
  */
1324
1324
  function values(collection) {
1325
- return map$3(collection, val => val);
1325
+ return map$2(collection, val => val);
1326
1326
  }
1327
1327
 
1328
1328
  /**
@@ -1349,7 +1349,7 @@
1349
1349
  extractor = toExtractor$1(extractor);
1350
1350
  let grouped = {};
1351
1351
  forEach$1(collections, c => groupBy$1(c, extractor, grouped));
1352
- let result = map$3(grouped, function (val, key) {
1352
+ let result = map$2(grouped, function (val, key) {
1353
1353
  return val[0];
1354
1354
  });
1355
1355
  return result;
@@ -1581,7 +1581,7 @@
1581
1581
  // Minus zero?
1582
1582
  n = n === 0 && 1 / n < 0 ? '-0' : String(n);
1583
1583
  }
1584
- parse$4(x, n);
1584
+ parse$3(x, n);
1585
1585
  }
1586
1586
 
1587
1587
  // Retain a reference to this Big constructor.
@@ -1607,7 +1607,7 @@
1607
1607
  * x {Big} A Big number instance.
1608
1608
  * n {number|string} A numeric value.
1609
1609
  */
1610
- function parse$4(x, n) {
1610
+ function parse$3(x, n) {
1611
1611
  var e, i, nl;
1612
1612
  if (!NUMERIC$1.test(n)) {
1613
1613
  throw Error(INVALID$4 + 'number');
@@ -8632,16 +8632,18 @@
8632
8632
  * @typedef { import('./index.js').ModuleDeclaration } ModuleDeclaration
8633
8633
  * @typedef { import('./index.js').ModuleDefinition } ModuleDefinition
8634
8634
  * @typedef { import('./index.js').InjectorContext } InjectorContext
8635
+ *
8636
+ * @typedef { import('./index.js').TypedDeclaration<any, any> } TypedDeclaration
8635
8637
  */
8636
8638
 
8637
8639
  /**
8638
8640
  * Create a new injector with the given modules.
8639
8641
  *
8640
8642
  * @param {ModuleDefinition[]} modules
8641
- * @param {InjectorContext} [parent]
8643
+ * @param {InjectorContext} [_parent]
8642
8644
  */
8643
- function Injector(modules, parent) {
8644
- parent = parent || {
8645
+ function Injector(modules, _parent) {
8646
+ const parent = _parent || /** @type InjectorContext */{
8645
8647
  get: function (name, strict) {
8646
8648
  currentlyResolving.push(name);
8647
8649
  if (strict === false) {
@@ -8670,11 +8672,11 @@
8670
8672
  * @return {any}
8671
8673
  */
8672
8674
  function get(name, strict) {
8673
- if (!providers[name] && name.indexOf('.') !== -1) {
8675
+ if (!providers[name] && name.includes('.')) {
8674
8676
  const parts = name.split('.');
8675
- let pivot = get(parts.shift());
8677
+ let pivot = get( /** @type { string } */parts.shift());
8676
8678
  while (parts.length) {
8677
- pivot = pivot[parts.shift()];
8679
+ pivot = pivot[/** @type { string } */parts.shift()];
8678
8680
  }
8679
8681
  return pivot;
8680
8682
  }
@@ -8704,6 +8706,10 @@
8704
8706
  throw error(`Cannot invoke "${fn}". Expected a function!`);
8705
8707
  }
8706
8708
  }
8709
+
8710
+ /**
8711
+ * @type {string[]}
8712
+ */
8707
8713
  const inject = fn.$inject || parseAnnotations(fn);
8708
8714
  const dependencies = inject.map(dep => {
8709
8715
  if (hasOwnProp(locals, dep)) {
@@ -8714,7 +8720,7 @@
8714
8720
  });
8715
8721
  return {
8716
8722
  fn: fn,
8717
- dependencies: dependencies
8723
+ dependencies
8718
8724
  };
8719
8725
  }
8720
8726
 
@@ -8734,7 +8740,7 @@
8734
8740
  } = fnDef(type);
8735
8741
 
8736
8742
  // instantiate var args constructor
8737
- const Constructor = Function.prototype.bind.apply(fn, [null].concat(dependencies));
8743
+ const Constructor = Function.prototype.bind.call(fn, null, ...dependencies);
8738
8744
  return new Constructor();
8739
8745
  }
8740
8746
 
@@ -8888,12 +8894,14 @@
8888
8894
  if (key === '__init__' || key === '__depends__') {
8889
8895
  return;
8890
8896
  }
8891
- if (moduleDefinition[key][2] === 'private') {
8892
- providers[key] = moduleDefinition[key];
8897
+ const typeDeclaration = /** @type { TypedDeclaration } */
8898
+ moduleDefinition[key];
8899
+ if (typeDeclaration[2] === 'private') {
8900
+ providers[key] = typeDeclaration;
8893
8901
  return;
8894
8902
  }
8895
- const type = moduleDefinition[key][0];
8896
- const value = moduleDefinition[key][1];
8903
+ const type = typeDeclaration[0];
8904
+ const value = typeDeclaration[1];
8897
8905
  providers[key] = [factoryMap[type], arrayUnwrap(type, value), type];
8898
8906
  });
8899
8907
  return createInitializer(moduleDefinition, self);
@@ -11372,7 +11380,7 @@
11372
11380
  }, zone || mergedZone, next];
11373
11381
  }, [{}, null, 1]).slice(0, 2);
11374
11382
  }
11375
- function parse$3(s, ...patterns) {
11383
+ function parse$2(s, ...patterns) {
11376
11384
  if (s == null) {
11377
11385
  return [null, null];
11378
11386
  }
@@ -11543,26 +11551,26 @@
11543
11551
  */
11544
11552
 
11545
11553
  function parseISODate(s) {
11546
- return parse$3(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]);
11554
+ return parse$2(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]);
11547
11555
  }
11548
11556
  function parseRFC2822Date(s) {
11549
- return parse$3(preprocessRFC2822(s), [rfc2822, extractRFC2822]);
11557
+ return parse$2(preprocessRFC2822(s), [rfc2822, extractRFC2822]);
11550
11558
  }
11551
11559
  function parseHTTPDate(s) {
11552
- return parse$3(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]);
11560
+ return parse$2(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]);
11553
11561
  }
11554
11562
  function parseISODuration(s) {
11555
- return parse$3(s, [isoDuration, extractISODuration]);
11563
+ return parse$2(s, [isoDuration, extractISODuration]);
11556
11564
  }
11557
11565
  const extractISOTimeOnly = combineExtractors(extractISOTime);
11558
11566
  function parseISOTimeOnly(s) {
11559
- return parse$3(s, [isoTimeOnly, extractISOTimeOnly]);
11567
+ return parse$2(s, [isoTimeOnly, extractISOTimeOnly]);
11560
11568
  }
11561
11569
  const sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);
11562
11570
  const sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);
11563
11571
  const extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);
11564
11572
  function parseSQL(s) {
11565
- return parse$3(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);
11573
+ return parse$2(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);
11566
11574
  }
11567
11575
 
11568
11576
  const INVALID$3 = "Invalid Duration";
@@ -57497,6 +57505,8 @@
57497
57505
  * var sum = eventBus.fire('sum', 1, 2);
57498
57506
  * console.log(sum); // 3
57499
57507
  * ```
57508
+ *
57509
+ * @template [EventMap=null]
57500
57510
  */
57501
57511
  function EventBus$1() {
57502
57512
  /**
@@ -57510,6 +57520,8 @@
57510
57520
  }
57511
57521
 
57512
57522
  /**
57523
+ * @overlord
57524
+ *
57513
57525
  * Register an event listener for events with the given name.
57514
57526
  *
57515
57527
  * The callback will be invoked with `event, ...additionalArguments`
@@ -57528,6 +57540,25 @@
57528
57540
  * @param {EventBusEventCallback<T>} callback
57529
57541
  * @param {any} [that] callback context
57530
57542
  */
57543
+ /**
57544
+ * Register an event listener for events with the given name.
57545
+ *
57546
+ * The callback will be invoked with `event, ...additionalArguments`
57547
+ * that have been passed to {@link EventBus#fire}.
57548
+ *
57549
+ * Returning false from a listener will prevent the events default action
57550
+ * (if any is specified). To stop an event from being processed further in
57551
+ * other listeners execute {@link Event#stopPropagation}.
57552
+ *
57553
+ * Returning anything but `undefined` from a listener will stop the listener propagation.
57554
+ *
57555
+ * @template {keyof EventMap} EventName
57556
+ *
57557
+ * @param {EventName} events to subscribe to
57558
+ * @param {number} [priority=1000] listen priority
57559
+ * @param {EventBusEventCallback<EventMap[EventName]>} callback
57560
+ * @param {any} [that] callback context
57561
+ */
57531
57562
  EventBus$1.prototype.on = function (events, priority, callback, that) {
57532
57563
  events = isArray$7(events) ? events : [events];
57533
57564
  if (isFunction$4(priority)) {
@@ -57558,6 +57589,8 @@
57558
57589
  };
57559
57590
 
57560
57591
  /**
57592
+ * @overlord
57593
+ *
57561
57594
  * Register an event listener that is called only once.
57562
57595
  *
57563
57596
  * @template T
@@ -57567,6 +57600,16 @@
57567
57600
  * @param {EventBusEventCallback<T>} callback
57568
57601
  * @param {any} [that] callback context
57569
57602
  */
57603
+ /**
57604
+ * Register an event listener that is called only once.
57605
+ *
57606
+ * @template {keyof EventMap} EventName
57607
+ *
57608
+ * @param {EventName} events to subscribe to
57609
+ * @param {number} [priority=1000] listen priority
57610
+ * @param {EventBusEventCallback<EventMap[EventName]>} callback
57611
+ * @param {any} [that] callback context
57612
+ */
57570
57613
  EventBus$1.prototype.once = function (events, priority, callback, that) {
57571
57614
  var self = this;
57572
57615
  if (isFunction$4(priority)) {
@@ -59492,7 +59535,7 @@
59492
59535
  *
59493
59536
  * @return {Array} transformed collection
59494
59537
  */
59495
- function map$2(collection, fn) {
59538
+ function map$1(collection, fn) {
59496
59539
  let result = [];
59497
59540
  forEach(collection, function (val, key) {
59498
59541
  result.push(fn(val, key));
@@ -59524,7 +59567,7 @@
59524
59567
  extractor = toExtractor(extractor);
59525
59568
  let grouped = {};
59526
59569
  forEach(collections, c => groupBy(c, extractor, grouped));
59527
- let result = map$2(grouped, function (val, key) {
59570
+ let result = map$1(grouped, function (val, key) {
59528
59571
  return val[0];
59529
59572
  });
59530
59573
  return result;
@@ -59562,7 +59605,7 @@
59562
59605
  // not inserted, append (!)
59563
59606
  sorted.push(entry);
59564
59607
  });
59565
- return map$2(sorted, e => e.v);
59608
+ return map$1(sorted, e => e.v);
59566
59609
  }
59567
59610
 
59568
59611
  /**
@@ -60252,6 +60295,69 @@
60252
60295
  return e in r && !(e in i) && r[e] in i && (e = r[e]), i[e];
60253
60296
  }
60254
60297
 
60298
+ const wrapMap = {
60299
+ legend: [1, '<fieldset>', '</fieldset>'],
60300
+ tr: [2, '<table><tbody>', '</tbody></table>'],
60301
+ col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
60302
+ _default: [0, '', '']
60303
+ };
60304
+ wrapMap.td = wrapMap.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
60305
+ wrapMap.option = wrapMap.optgroup = [1, '<select multiple="multiple">', '</select>'];
60306
+ wrapMap.thead = wrapMap.tbody = wrapMap.colgroup = wrapMap.caption = wrapMap.tfoot = [1, '<table>', '</table>'];
60307
+ wrapMap.polyline = wrapMap.ellipse = wrapMap.polygon = wrapMap.circle = wrapMap.text = wrapMap.line = wrapMap.path = wrapMap.rect = wrapMap.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">', '</svg>'];
60308
+ function domify$2(htmlString, document = globalThis.document) {
60309
+ if (typeof htmlString !== 'string') {
60310
+ throw new TypeError('String expected');
60311
+ }
60312
+
60313
+ // Handle comment nodes
60314
+ const commentMatch = /^<!--(.*?)-->$/s.exec(htmlString);
60315
+ if (commentMatch) {
60316
+ return document.createComment(commentMatch[1]);
60317
+ }
60318
+ const tagName = /<([\w:]+)/.exec(htmlString)?.[1];
60319
+ if (!tagName) {
60320
+ return document.createTextNode(htmlString);
60321
+ }
60322
+ htmlString = htmlString.trim();
60323
+
60324
+ // Body support
60325
+ if (tagName === 'body') {
60326
+ const element = document.createElement('html');
60327
+ element.innerHTML = htmlString;
60328
+ const {
60329
+ lastChild
60330
+ } = element;
60331
+ lastChild.remove();
60332
+ return lastChild;
60333
+ }
60334
+
60335
+ // Wrap map
60336
+ let [depth, prefix, suffix] = Object.hasOwn(wrapMap, tagName) ? wrapMap[tagName] : wrapMap._default;
60337
+ let element = document.createElement('div');
60338
+ element.innerHTML = prefix + htmlString + suffix;
60339
+ while (depth--) {
60340
+ element = element.lastChild;
60341
+ }
60342
+
60343
+ // One element
60344
+ if (element.firstChild === element.lastChild) {
60345
+ const {
60346
+ firstChild
60347
+ } = element;
60348
+ firstChild.remove();
60349
+ return firstChild;
60350
+ }
60351
+
60352
+ // Several elements
60353
+ const fragment = document.createDocumentFragment();
60354
+ fragment.append(...element.childNodes);
60355
+ return fragment;
60356
+ }
60357
+ var domify_1 = domify$2;
60358
+
60359
+ var domify$3 = /*@__PURE__*/getDefaultExportFromCjs(domify_1);
60360
+
60255
60361
  function _mergeNamespaces$1(n, m) {
60256
60362
  m.forEach(function (e) {
60257
60363
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -60474,102 +60580,9 @@
60474
60580
  var event = /*#__PURE__*/_mergeNamespaces$1({
60475
60581
  __proto__: null,
60476
60582
  bind: bind_1,
60477
- unbind: unbind_1,
60478
- 'default': componentEvent
60583
+ default: componentEvent,
60584
+ unbind: unbind_1
60479
60585
  }, [componentEvent]);
60480
-
60481
- /**
60482
- * Expose `parse`.
60483
- */
60484
-
60485
- var domify$2 = parse$2;
60486
-
60487
- /**
60488
- * Tests for browser support.
60489
- */
60490
-
60491
- var innerHTMLBug$1 = false;
60492
- var bugTestDiv$2;
60493
- if (typeof document !== 'undefined') {
60494
- bugTestDiv$2 = document.createElement('div');
60495
- // Setup
60496
- bugTestDiv$2.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
60497
- // Make sure that link elements get serialized correctly by innerHTML
60498
- // This requires a wrapper element in IE
60499
- innerHTMLBug$1 = !bugTestDiv$2.getElementsByTagName('link').length;
60500
- bugTestDiv$2 = undefined;
60501
- }
60502
-
60503
- /**
60504
- * Wrap map from jquery.
60505
- */
60506
-
60507
- var map$1 = {
60508
- legend: [1, '<fieldset>', '</fieldset>'],
60509
- tr: [2, '<table><tbody>', '</tbody></table>'],
60510
- col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
60511
- // for script/link/style tags to work in IE6-8, you have to wrap
60512
- // in a div with a non-whitespace character in front, ha!
60513
- _default: innerHTMLBug$1 ? [1, 'X<div>', '</div>'] : [0, '', '']
60514
- };
60515
- map$1.td = map$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
60516
- map$1.option = map$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
60517
- map$1.thead = map$1.tbody = map$1.colgroup = map$1.caption = map$1.tfoot = [1, '<table>', '</table>'];
60518
- map$1.polyline = map$1.ellipse = map$1.polygon = map$1.circle = map$1.text = map$1.line = map$1.path = map$1.rect = map$1.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">', '</svg>'];
60519
-
60520
- /**
60521
- * Parse `html` and return a DOM Node instance, which could be a TextNode,
60522
- * HTML DOM Node of some kind (<div> for example), or a DocumentFragment
60523
- * instance, depending on the contents of the `html` string.
60524
- *
60525
- * @param {String} html - HTML string to "domify"
60526
- * @param {Document} doc - The `document` instance to create the Node for
60527
- * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance
60528
- * @api private
60529
- */
60530
-
60531
- function parse$2(html, doc) {
60532
- if ('string' != typeof html) throw new TypeError('String expected');
60533
-
60534
- // default to the global `document` object
60535
- if (!doc) doc = document;
60536
-
60537
- // tag name
60538
- var m = /<([\w:]+)/.exec(html);
60539
- if (!m) return doc.createTextNode(html);
60540
- html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace
60541
-
60542
- var tag = m[1];
60543
-
60544
- // body support
60545
- if (tag == 'body') {
60546
- var el = doc.createElement('html');
60547
- el.innerHTML = html;
60548
- return el.removeChild(el.lastChild);
60549
- }
60550
-
60551
- // wrap map
60552
- var wrap = Object.prototype.hasOwnProperty.call(map$1, tag) ? map$1[tag] : map$1._default;
60553
- var depth = wrap[0];
60554
- var prefix = wrap[1];
60555
- var suffix = wrap[2];
60556
- var el = doc.createElement('div');
60557
- el.innerHTML = prefix + html + suffix;
60558
- while (depth--) el = el.lastChild;
60559
-
60560
- // one element
60561
- if (el.firstChild == el.lastChild) {
60562
- return el.removeChild(el.firstChild);
60563
- }
60564
-
60565
- // several elements
60566
- var fragment = doc.createDocumentFragment();
60567
- while (el.firstChild) {
60568
- fragment.appendChild(el.removeChild(el.firstChild));
60569
- }
60570
- return fragment;
60571
- }
60572
- var domify$1$1 = domify$2;
60573
60586
  function query(selector, el) {
60574
60587
  el = el || document;
60575
60588
  return el.querySelector(selector);
@@ -60795,15 +60808,15 @@
60795
60808
  */
60796
60809
 
60797
60810
  var innerHTMLBug = false;
60798
- var bugTestDiv$1;
60811
+ var bugTestDiv;
60799
60812
  if (typeof document !== 'undefined') {
60800
- bugTestDiv$1 = document.createElement('div');
60813
+ bugTestDiv = document.createElement('div');
60801
60814
  // Setup
60802
- bugTestDiv$1.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
60815
+ bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
60803
60816
  // Make sure that link elements get serialized correctly by innerHTML
60804
60817
  // This requires a wrapper element in IE
60805
- innerHTMLBug = !bugTestDiv$1.getElementsByTagName('link').length;
60806
- bugTestDiv$1 = undefined;
60818
+ innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
60819
+ bugTestDiv = undefined;
60807
60820
  }
60808
60821
 
60809
60822
  /**
@@ -64169,6 +64182,8 @@
64169
64182
  * var sum = eventBus.fire('sum', 1, 2);
64170
64183
  * console.log(sum); // 3
64171
64184
  * ```
64185
+ *
64186
+ * @template [EventMap=null]
64172
64187
  */
64173
64188
  function EventBus() {
64174
64189
  /**
@@ -64182,6 +64197,8 @@
64182
64197
  }
64183
64198
 
64184
64199
  /**
64200
+ * @overlord
64201
+ *
64185
64202
  * Register an event listener for events with the given name.
64186
64203
  *
64187
64204
  * The callback will be invoked with `event, ...additionalArguments`
@@ -64200,6 +64217,25 @@
64200
64217
  * @param {EventBusEventCallback<T>} callback
64201
64218
  * @param {any} [that] callback context
64202
64219
  */
64220
+ /**
64221
+ * Register an event listener for events with the given name.
64222
+ *
64223
+ * The callback will be invoked with `event, ...additionalArguments`
64224
+ * that have been passed to {@link EventBus#fire}.
64225
+ *
64226
+ * Returning false from a listener will prevent the events default action
64227
+ * (if any is specified). To stop an event from being processed further in
64228
+ * other listeners execute {@link Event#stopPropagation}.
64229
+ *
64230
+ * Returning anything but `undefined` from a listener will stop the listener propagation.
64231
+ *
64232
+ * @template {keyof EventMap} EventName
64233
+ *
64234
+ * @param {EventName} events to subscribe to
64235
+ * @param {number} [priority=1000] listen priority
64236
+ * @param {EventBusEventCallback<EventMap[EventName]>} callback
64237
+ * @param {any} [that] callback context
64238
+ */
64203
64239
  EventBus.prototype.on = function (events, priority, callback, that) {
64204
64240
  events = isArray(events) ? events : [events];
64205
64241
  if (isFunction(priority)) {
@@ -64230,6 +64266,8 @@
64230
64266
  };
64231
64267
 
64232
64268
  /**
64269
+ * @overlord
64270
+ *
64233
64271
  * Register an event listener that is called only once.
64234
64272
  *
64235
64273
  * @template T
@@ -64239,6 +64277,16 @@
64239
64277
  * @param {EventBusEventCallback<T>} callback
64240
64278
  * @param {any} [that] callback context
64241
64279
  */
64280
+ /**
64281
+ * Register an event listener that is called only once.
64282
+ *
64283
+ * @template {keyof EventMap} EventName
64284
+ *
64285
+ * @param {EventName} events to subscribe to
64286
+ * @param {number} [priority=1000] listen priority
64287
+ * @param {EventBusEventCallback<EventMap[EventName]>} callback
64288
+ * @param {any} [that] callback context
64289
+ */
64242
64290
  EventBus.prototype.once = function (events, priority, callback, that) {
64243
64291
  var self = this;
64244
64292
  if (isFunction(priority)) {
@@ -66917,9 +66965,9 @@
66917
66965
  };
66918
66966
 
66919
66967
  /**
66920
- * Returns the number of actions that are currently registered
66968
+ * Returns the identifiers of all currently registered editor actions
66921
66969
  *
66922
- * @return {number}
66970
+ * @return {string[]}
66923
66971
  */
66924
66972
  EditorActions.prototype.getActions = function () {
66925
66973
  return Object.keys(this._actions);
@@ -67167,7 +67215,7 @@
67167
67215
  if (event.defaultPrevented) {
67168
67216
  return true;
67169
67217
  }
67170
- return isInput(event.target) && this._isModifiedKeyIgnored(event);
67218
+ return (isInput(event.target) || isButton(event.target) && isKey([' ', 'Enter'], event)) && this._isModifiedKeyIgnored(event);
67171
67219
  };
67172
67220
  Keyboard.prototype._isModifiedKeyIgnored = function (event) {
67173
67221
  if (!isCmd(event)) {
@@ -67264,6 +67312,9 @@
67264
67312
  function isInput(target) {
67265
67313
  return target && (matches$1(target, 'input, textarea') || target.contentEditable === 'true');
67266
67314
  }
67315
+ function isButton(target) {
67316
+ return target && matches$1(target, 'button, input[type=submit], input[type=button], a[href], [aria-role=button]');
67317
+ }
67267
67318
  var LOW_PRIORITY$1 = 500;
67268
67319
 
67269
67320
  /**
@@ -70333,7 +70384,7 @@
70333
70384
  event.stopPropagation();
70334
70385
  }
70335
70386
  function emptyCanvas() {
70336
- return domify$1$1('<canvas width="0" height="0" />');
70387
+ return domify$3('<canvas width="0" height="0" />');
70337
70388
  }
70338
70389
  const noop$3 = () => {};
70339
70390
 
@@ -72957,6 +73008,14 @@
72957
73008
  function isValidDotPath(path) {
72958
73009
  return /^\w+(\.\w+)*$/.test(path);
72959
73010
  }
73011
+
73012
+ /**
73013
+ * @param {string} path
73014
+ */
73015
+ function isProhibitedPath(path) {
73016
+ const prohibitedSegments = ['__proto__', 'prototype', 'constructor'];
73017
+ return path.split('.').some(segment => prohibitedSegments.includes(segment));
73018
+ }
72960
73019
  const LABELED_NON_INPUTS = ['button', 'group', 'dynamiclist', 'iframe', 'table'];
72961
73020
  const INPUTS = ['checkbox', 'checklist', 'datetime', 'number', 'radio', 'select', 'taglist', 'textfield', 'textarea'];
72962
73021
  const OPTIONS_INPUTS = ['checklist', 'radio', 'select', 'taglist'];
@@ -73178,7 +73237,7 @@
73178
73237
  } = propertiesPanelConfig || {};
73179
73238
  this._eventBus = eventBus;
73180
73239
  this._injector = injector;
73181
- this._container = domify$1$1('<div class="fjs-properties-container" input-handle-modified-keys="y,z"></div>');
73240
+ this._container = domify$3('<div class="fjs-properties-container" input-handle-modified-keys="y,z"></div>');
73182
73241
  if (parent) {
73183
73242
  this.attachTo(parent);
73184
73243
  }
@@ -73884,6 +73943,9 @@
73884
73943
  if (hasIntegerPathSegment(value)) {
73885
73944
  return 'Must not contain numerical path segments.';
73886
73945
  }
73946
+ if (isProhibitedPath(value)) {
73947
+ return 'Must not be a prohibited path.';
73948
+ }
73887
73949
  const replacements = {
73888
73950
  [field.id]: value.split('.')
73889
73951
  };
@@ -73975,11 +74037,15 @@
73975
74037
  }
73976
74038
 
73977
74039
  // Check for integer segments in the path
73978
- const hasIntegerPathSegment = value.split('.').some(segment => /^\d+$/.test(segment));
73979
- if (hasIntegerPathSegment) {
74040
+ if (hasIntegerPathSegment(value)) {
73980
74041
  return 'Must not contain numerical path segments.';
73981
74042
  }
73982
74043
 
74044
+ // Check for special prohibited paths
74045
+ if (isProhibitedPath(value)) {
74046
+ return 'Must not be a prohibited path.';
74047
+ }
74048
+
73983
74049
  // Check for path collisions
73984
74050
  const options = {
73985
74051
  replacements: {
@@ -79173,16 +79239,6 @@
79173
79239
  ClassList.prototype.has = ClassList.prototype.contains = function (name) {
79174
79240
  return this.list.contains(name);
79175
79241
  };
79176
- var bugTestDiv;
79177
- if (typeof document !== 'undefined') {
79178
- bugTestDiv = document.createElement('div');
79179
- // Setup
79180
- bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
79181
- // Make sure that link elements get serialized correctly by innerHTML
79182
- // This requires a wrapper element in IE
79183
- !bugTestDiv.getElementsByTagName('link').length;
79184
- bugTestDiv = undefined;
79185
- }
79186
79242
 
79187
79243
  const NO_LINT_CLS = 'fjs-cm-no-lint';
79188
79244
 
@@ -79205,13 +79261,13 @@
79205
79261
  const placeholderLinterExtension = createPlaceholderLinterExtension();
79206
79262
  let container = null;
79207
79263
  function createState(doc, variables = []) {
79208
- const extensions = [basicSetup, languageCompartment, tabSizeCompartment, lintGutter(), linter$1(jsonParseLinter()), placeholderLinterExtension, autocompletionConfCompartment.of(variablesFacet.of(variables)), autocompletionExtension(), keymap.of([indentWithTab]), editorPlaceholder ? placeholder(editorPlaceholder) : [], EditorView.updateListener.of(update => {
79264
+ const extensions = [basicSetup, languageCompartment, tabSizeCompartment, lintGutter(), linter$1(jsonParseLinter()), placeholderLinterExtension, autocompletionConfCompartment.of(variablesFacet.of(variables)), autocompletionExtension(), keymap.of([indentWithTab]), editorPlaceholder ? placeholder(editorPlaceholder) : [], EditorState.readOnly.of(readonly), EditorView.updateListener.of(update => {
79209
79265
  if (update.docChanged) {
79210
79266
  emitter.emit('changed', {
79211
79267
  value: update.state.doc.toString()
79212
79268
  });
79213
79269
  }
79214
- }), EditorView.editable.of(!readonly), EditorView.contentAttributes.of(contentAttributes)];
79270
+ }), EditorView.contentAttributes.of(contentAttributes)];
79215
79271
  return EditorState.create({
79216
79272
  doc,
79217
79273
  extensions
@@ -79348,7 +79404,8 @@
79348
79404
  viewerAdditionalModules,
79349
79405
  editorAdditionalModules,
79350
79406
  propertiesPanel: propertiesPanelConfig,
79351
- apiLinkTarget
79407
+ apiLinkTarget,
79408
+ onInit
79352
79409
  } = config;
79353
79410
  const {
79354
79411
  display: displayActions = true
@@ -79515,7 +79572,8 @@
79515
79572
  setSchema: setSchema,
79516
79573
  setData: setData
79517
79574
  };
79518
- }, [apiLinkTarget]);
79575
+ onInit();
79576
+ }, [apiLinkTarget, onInit]);
79519
79577
 
79520
79578
  // separate effect for state to avoid re-creating the api object every time
79521
79579
  y(() => {
@@ -79641,12 +79699,16 @@
79641
79699
  return fn(...args);
79642
79700
  };
79643
79701
  };
79702
+ const onInit = function () {
79703
+ emitter.emit('formPlayground.init');
79704
+ };
79644
79705
  container.addEventListener('dragover', handleDrop);
79645
79706
  S$1(e(PlaygroundRoot, {
79646
79707
  initialSchema: initialSchema,
79647
79708
  initialData: initialData,
79648
79709
  emit: emitter.emit,
79649
79710
  apiLinkTarget: this,
79711
+ onInit: onInit,
79650
79712
  ...rest
79651
79713
  }), container);
79652
79714
  this.on = emitter.on;