@bpmn-io/form-js-editor 1.11.3 → 1.12.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/assets/form-js-editor.css +5 -1
- package/dist/assets/properties-panel.css +1509 -1505
- package/dist/index.cjs +523 -509
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +524 -510
- package/dist/index.es.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -2293,13 +2293,17 @@ function Element$1(props) {
|
|
|
2293
2293
|
ref.current.focus();
|
|
2294
2294
|
}
|
|
2295
2295
|
}, [selection, field]);
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2296
|
+
const onClick = hooks.useCallback(event => {
|
|
2297
|
+
// TODO(nikku): refactor this to use proper DOM delegation
|
|
2298
|
+
const fieldEl = event.target.closest('[data-id]');
|
|
2299
|
+
if (!fieldEl) {
|
|
2300
|
+
return;
|
|
2301
|
+
}
|
|
2302
|
+
const id = fieldEl.dataset.id;
|
|
2303
|
+
if (id === field.id) {
|
|
2304
|
+
selection.toggle(field);
|
|
2305
|
+
}
|
|
2306
|
+
}, [field, selection]);
|
|
2303
2307
|
const isSelected = selection.isSelected(field);
|
|
2304
2308
|
const classString = hooks.useMemo(() => {
|
|
2305
2309
|
const classes = [];
|
|
@@ -2691,6 +2695,34 @@ class Renderer {
|
|
|
2691
2695
|
container,
|
|
2692
2696
|
compact = false
|
|
2693
2697
|
} = renderConfig;
|
|
2698
|
+
eventBus.on('form.init', function () {
|
|
2699
|
+
// emit <canvas.init> so dependent components can hook in
|
|
2700
|
+
// this is required to register keyboard bindings
|
|
2701
|
+
eventBus.fire('canvas.init', {
|
|
2702
|
+
svg: container,
|
|
2703
|
+
viewport: null
|
|
2704
|
+
});
|
|
2705
|
+
});
|
|
2706
|
+
|
|
2707
|
+
// focus container on over if no selection
|
|
2708
|
+
container.addEventListener('mouseover', function () {
|
|
2709
|
+
if (document.activeElement === document.body) {
|
|
2710
|
+
container.focus({
|
|
2711
|
+
preventScroll: true
|
|
2712
|
+
});
|
|
2713
|
+
}
|
|
2714
|
+
});
|
|
2715
|
+
|
|
2716
|
+
// ensure we focus the container if the users clicks
|
|
2717
|
+
// inside; this follows input focus handling closely
|
|
2718
|
+
container.addEventListener('click', function (event) {
|
|
2719
|
+
// force focus when clicking container
|
|
2720
|
+
if (!container.contains(document.activeElement)) {
|
|
2721
|
+
container.focus({
|
|
2722
|
+
preventScroll: true
|
|
2723
|
+
});
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2694
2726
|
const App = () => {
|
|
2695
2727
|
const [state, setState] = hooks.useState(formEditor._getState());
|
|
2696
2728
|
const formEditorContext = {
|
|
@@ -3128,8 +3160,8 @@ function isRedo(event) {
|
|
|
3128
3160
|
|
|
3129
3161
|
var KEYDOWN_EVENT = 'keyboard.keydown',
|
|
3130
3162
|
KEYUP_EVENT = 'keyboard.keyup';
|
|
3131
|
-
var HANDLE_MODIFIER_ATTRIBUTE = 'input-handle-modified-keys';
|
|
3132
3163
|
var DEFAULT_PRIORITY$2 = 1000;
|
|
3164
|
+
var compatMessage = 'Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661';
|
|
3133
3165
|
|
|
3134
3166
|
/**
|
|
3135
3167
|
* A keyboard abstraction that may be activated and
|
|
@@ -3149,16 +3181,16 @@ var DEFAULT_PRIORITY$2 = 1000;
|
|
|
3149
3181
|
*
|
|
3150
3182
|
* All events contain one field which is node.
|
|
3151
3183
|
*
|
|
3152
|
-
*
|
|
3153
|
-
* `keyboard.
|
|
3184
|
+
* Specify the initial keyboard binding state via the
|
|
3185
|
+
* `keyboard.bind=true|false` configuration option.
|
|
3154
3186
|
*
|
|
3155
3187
|
* @param {Object} config
|
|
3156
|
-
* @param {
|
|
3188
|
+
* @param {boolean} [config.bind]
|
|
3157
3189
|
* @param {EventBus} eventBus
|
|
3158
3190
|
*/
|
|
3159
3191
|
function Keyboard(config, eventBus) {
|
|
3160
3192
|
var self = this;
|
|
3161
|
-
this._config = config || {};
|
|
3193
|
+
this._config = config = config || {};
|
|
3162
3194
|
this._eventBus = eventBus;
|
|
3163
3195
|
this._keydownHandler = this._keydownHandler.bind(this);
|
|
3164
3196
|
this._keyupHandler = this._keyupHandler.bind(this);
|
|
@@ -3168,16 +3200,16 @@ function Keyboard(config, eventBus) {
|
|
|
3168
3200
|
self._fire('destroy');
|
|
3169
3201
|
self.unbind();
|
|
3170
3202
|
});
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3203
|
+
if (config.bindTo) {
|
|
3204
|
+
console.error('unsupported configuration <keyboard.bindTo>', new Error(compatMessage));
|
|
3205
|
+
}
|
|
3206
|
+
var bind = config && config.bind !== false;
|
|
3207
|
+
eventBus.on('canvas.init', function (event) {
|
|
3208
|
+
self._target = event.svg;
|
|
3209
|
+
if (bind) {
|
|
3210
|
+
self.bind();
|
|
3177
3211
|
}
|
|
3178
|
-
|
|
3179
|
-
eventBus.on('detach', function () {
|
|
3180
|
-
self.unbind();
|
|
3212
|
+
self._fire('init');
|
|
3181
3213
|
});
|
|
3182
3214
|
}
|
|
3183
3215
|
Keyboard.$inject = ['config.keyboard', 'eventBus'];
|
|
@@ -3201,35 +3233,29 @@ Keyboard.prototype._keyHandler = function (event, type) {
|
|
|
3201
3233
|
}
|
|
3202
3234
|
};
|
|
3203
3235
|
Keyboard.prototype._isEventIgnored = function (event) {
|
|
3204
|
-
|
|
3205
|
-
return true;
|
|
3206
|
-
}
|
|
3207
|
-
return (isInput(event.target) || isButton(event.target) && isKey([' ', 'Enter'], event)) && this._isModifiedKeyIgnored(event);
|
|
3208
|
-
};
|
|
3209
|
-
Keyboard.prototype._isModifiedKeyIgnored = function (event) {
|
|
3210
|
-
if (!isCmd(event)) {
|
|
3211
|
-
return true;
|
|
3212
|
-
}
|
|
3213
|
-
var allowedModifiers = this._getAllowedModifiers(event.target);
|
|
3214
|
-
return allowedModifiers.indexOf(event.key) === -1;
|
|
3215
|
-
};
|
|
3216
|
-
Keyboard.prototype._getAllowedModifiers = function (element) {
|
|
3217
|
-
var modifierContainer = minDom.closest(element, '[' + HANDLE_MODIFIER_ATTRIBUTE + ']', true);
|
|
3218
|
-
if (!modifierContainer || this._node && !this._node.contains(modifierContainer)) {
|
|
3219
|
-
return [];
|
|
3220
|
-
}
|
|
3221
|
-
return modifierContainer.getAttribute(HANDLE_MODIFIER_ATTRIBUTE).split(',');
|
|
3236
|
+
return false;
|
|
3222
3237
|
};
|
|
3223
3238
|
|
|
3224
3239
|
/**
|
|
3225
3240
|
* Bind keyboard events to the given DOM node.
|
|
3226
3241
|
*
|
|
3242
|
+
* @overlord
|
|
3243
|
+
* @deprecated No longer in use since version 15.0.0.
|
|
3244
|
+
*
|
|
3227
3245
|
* @param {EventTarget} node
|
|
3228
3246
|
*/
|
|
3247
|
+
/**
|
|
3248
|
+
* Bind keyboard events to the canvas node.
|
|
3249
|
+
*/
|
|
3229
3250
|
Keyboard.prototype.bind = function (node) {
|
|
3251
|
+
// legacy <node> argument provided
|
|
3252
|
+
if (node) {
|
|
3253
|
+
console.error('unsupported argument <node>', new Error(compatMessage));
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3230
3256
|
// make sure that the keyboard is only bound once to the DOM
|
|
3231
3257
|
this.unbind();
|
|
3232
|
-
this._node =
|
|
3258
|
+
node = this._node = this._target;
|
|
3233
3259
|
|
|
3234
3260
|
// bind key events
|
|
3235
3261
|
minDom.event.bind(node, 'keydown', this._keydownHandler);
|
|
@@ -3296,15 +3322,6 @@ Keyboard.prototype.isCmd = isCmd;
|
|
|
3296
3322
|
Keyboard.prototype.isShift = isShift;
|
|
3297
3323
|
Keyboard.prototype.isKey = isKey;
|
|
3298
3324
|
|
|
3299
|
-
// helpers ///////
|
|
3300
|
-
|
|
3301
|
-
function isInput(target) {
|
|
3302
|
-
return target && (minDom.matches(target, 'input, textarea') || target.contentEditable === 'true');
|
|
3303
|
-
}
|
|
3304
|
-
function isButton(target) {
|
|
3305
|
-
return target && minDom.matches(target, 'button, input[type=submit], input[type=button], a[href], [aria-role=button]');
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
3325
|
var LOW_PRIORITY$1 = 500;
|
|
3309
3326
|
|
|
3310
3327
|
/**
|
|
@@ -3468,7 +3485,7 @@ class FormEditorKeyboardBindings {
|
|
|
3468
3485
|
const {
|
|
3469
3486
|
keyEvent
|
|
3470
3487
|
} = context;
|
|
3471
|
-
if (
|
|
3488
|
+
if (isUndo(keyEvent)) {
|
|
3472
3489
|
editorActions.trigger('undo');
|
|
3473
3490
|
return true;
|
|
3474
3491
|
}
|
|
@@ -3481,7 +3498,7 @@ class FormEditorKeyboardBindings {
|
|
|
3481
3498
|
const {
|
|
3482
3499
|
keyEvent
|
|
3483
3500
|
} = context;
|
|
3484
|
-
if (
|
|
3501
|
+
if (isRedo(keyEvent)) {
|
|
3485
3502
|
editorActions.trigger('redo');
|
|
3486
3503
|
return true;
|
|
3487
3504
|
}
|
|
@@ -5296,6 +5313,21 @@ ArrowIcon.defaultProps = {
|
|
|
5296
5313
|
width: "16",
|
|
5297
5314
|
height: "16"
|
|
5298
5315
|
};
|
|
5316
|
+
var CloseIcon = function CloseIcon(props) {
|
|
5317
|
+
return jsxRuntime.jsx("svg", {
|
|
5318
|
+
...props,
|
|
5319
|
+
children: jsxRuntime.jsx("path", {
|
|
5320
|
+
fillRule: "evenodd",
|
|
5321
|
+
d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
|
|
5322
|
+
fill: "currentColor"
|
|
5323
|
+
})
|
|
5324
|
+
});
|
|
5325
|
+
};
|
|
5326
|
+
CloseIcon.defaultProps = {
|
|
5327
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5328
|
+
width: "16",
|
|
5329
|
+
height: "16"
|
|
5330
|
+
};
|
|
5299
5331
|
var CreateIcon = function CreateIcon(props) {
|
|
5300
5332
|
return jsxRuntime.jsx("svg", {
|
|
5301
5333
|
...props,
|
|
@@ -5383,26 +5415,17 @@ FeelIcon$1.defaultProps = {
|
|
|
5383
5415
|
fill: "none",
|
|
5384
5416
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5385
5417
|
};
|
|
5386
|
-
var
|
|
5418
|
+
var LaunchIcon = function LaunchIcon(props) {
|
|
5387
5419
|
return jsxRuntime.jsxs("svg", {
|
|
5388
5420
|
...props,
|
|
5389
5421
|
children: [jsxRuntime.jsx("path", {
|
|
5390
|
-
d: "
|
|
5391
|
-
}), jsxRuntime.jsx("circle", {
|
|
5392
|
-
cx: "16",
|
|
5393
|
-
cy: "23.5",
|
|
5394
|
-
r: "1.5"
|
|
5395
|
-
}), jsxRuntime.jsx("path", {
|
|
5396
|
-
d: "M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9Z"
|
|
5422
|
+
d: "M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2Z"
|
|
5397
5423
|
}), jsxRuntime.jsx("path", {
|
|
5398
|
-
|
|
5399
|
-
fill: "none"
|
|
5400
|
-
},
|
|
5401
|
-
d: "M0 0h32v32H0z"
|
|
5424
|
+
d: "M20 2v2h6.586L18 12.586 19.414 14 28 5.414V12h2V2H20z"
|
|
5402
5425
|
})]
|
|
5403
5426
|
});
|
|
5404
5427
|
};
|
|
5405
|
-
|
|
5428
|
+
LaunchIcon.defaultProps = {
|
|
5406
5429
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5407
5430
|
viewBox: "0 0 32 32"
|
|
5408
5431
|
};
|
|
@@ -5424,21 +5447,6 @@ PopupIcon.defaultProps = {
|
|
|
5424
5447
|
height: "16",
|
|
5425
5448
|
viewBox: "0 0 32 32"
|
|
5426
5449
|
};
|
|
5427
|
-
var CloseIcon = function CloseIcon(props) {
|
|
5428
|
-
return jsxRuntime.jsx("svg", {
|
|
5429
|
-
...props,
|
|
5430
|
-
children: jsxRuntime.jsx("path", {
|
|
5431
|
-
fillRule: "evenodd",
|
|
5432
|
-
d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
|
|
5433
|
-
fill: "currentColor"
|
|
5434
|
-
})
|
|
5435
|
-
});
|
|
5436
|
-
};
|
|
5437
|
-
CloseIcon.defaultProps = {
|
|
5438
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5439
|
-
width: "16",
|
|
5440
|
-
height: "16"
|
|
5441
|
-
};
|
|
5442
5450
|
function Header(props) {
|
|
5443
5451
|
const {
|
|
5444
5452
|
element,
|
|
@@ -5477,7 +5485,7 @@ function Header(props) {
|
|
|
5477
5485
|
}), jsxRuntime.jsx("div", {
|
|
5478
5486
|
class: "bio-properties-panel-header-actions",
|
|
5479
5487
|
children: documentationRef ? jsxRuntime.jsx("a", {
|
|
5480
|
-
rel: "
|
|
5488
|
+
rel: "noreferrer",
|
|
5481
5489
|
class: "bio-properties-panel-header-link",
|
|
5482
5490
|
href: documentationRef,
|
|
5483
5491
|
title: "Open documentation",
|
|
@@ -5495,19 +5503,19 @@ const ErrorsContext = preact.createContext({
|
|
|
5495
5503
|
errors: {}
|
|
5496
5504
|
});
|
|
5497
5505
|
|
|
5498
|
-
/**
|
|
5499
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
5500
|
-
*
|
|
5501
|
-
* @example
|
|
5502
|
-
*
|
|
5503
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
5504
|
-
* // ...
|
|
5505
|
-
* });
|
|
5506
|
-
*
|
|
5507
|
-
* @param {Object} context
|
|
5508
|
-
* @param {boolean} [context.focus]
|
|
5509
|
-
*
|
|
5510
|
-
* @returns void
|
|
5506
|
+
/**
|
|
5507
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
5508
|
+
*
|
|
5509
|
+
* @example
|
|
5510
|
+
*
|
|
5511
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
5512
|
+
* // ...
|
|
5513
|
+
* });
|
|
5514
|
+
*
|
|
5515
|
+
* @param {Object} context
|
|
5516
|
+
* @param {boolean} [context.focus]
|
|
5517
|
+
*
|
|
5518
|
+
* @returns void
|
|
5511
5519
|
*/
|
|
5512
5520
|
|
|
5513
5521
|
const EventContext = preact.createContext({
|
|
@@ -5524,20 +5532,20 @@ const TooltipContext = preact.createContext({
|
|
|
5524
5532
|
getTooltipForId: () => {}
|
|
5525
5533
|
});
|
|
5526
5534
|
|
|
5527
|
-
/**
|
|
5528
|
-
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
5529
|
-
*
|
|
5530
|
-
* @example
|
|
5531
|
-
* ```jsx
|
|
5532
|
-
* function TextField(props) {
|
|
5533
|
-
* const tooltip = useTooltipContext('input1', element);
|
|
5534
|
-
* }
|
|
5535
|
-
* ```
|
|
5536
|
-
*
|
|
5537
|
-
* @param {string} id
|
|
5538
|
-
* @param {object} element
|
|
5539
|
-
*
|
|
5540
|
-
* @returns {string}
|
|
5535
|
+
/**
|
|
5536
|
+
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
5537
|
+
*
|
|
5538
|
+
* @example
|
|
5539
|
+
* ```jsx
|
|
5540
|
+
* function TextField(props) {
|
|
5541
|
+
* const tooltip = useTooltipContext('input1', element);
|
|
5542
|
+
* }
|
|
5543
|
+
* ```
|
|
5544
|
+
*
|
|
5545
|
+
* @param {string} id
|
|
5546
|
+
* @param {object} element
|
|
5547
|
+
*
|
|
5548
|
+
* @returns {string}
|
|
5541
5549
|
*/
|
|
5542
5550
|
function useTooltipContext(id, element) {
|
|
5543
5551
|
const {
|
|
@@ -5689,20 +5697,20 @@ function prefixId$9(id) {
|
|
|
5689
5697
|
return `bio-properties-panel-${id}`;
|
|
5690
5698
|
}
|
|
5691
5699
|
|
|
5692
|
-
/**
|
|
5693
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
5694
|
-
*
|
|
5695
|
-
* @example
|
|
5696
|
-
* ```jsx
|
|
5697
|
-
* function TextField(props) {
|
|
5698
|
-
* const description = useDescriptionContext('input1', element);
|
|
5699
|
-
* }
|
|
5700
|
-
* ```
|
|
5701
|
-
*
|
|
5702
|
-
* @param {string} id
|
|
5703
|
-
* @param {object} element
|
|
5704
|
-
*
|
|
5705
|
-
* @returns {string}
|
|
5700
|
+
/**
|
|
5701
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
5702
|
+
*
|
|
5703
|
+
* @example
|
|
5704
|
+
* ```jsx
|
|
5705
|
+
* function TextField(props) {
|
|
5706
|
+
* const description = useDescriptionContext('input1', element);
|
|
5707
|
+
* }
|
|
5708
|
+
* ```
|
|
5709
|
+
*
|
|
5710
|
+
* @param {string} id
|
|
5711
|
+
* @param {object} element
|
|
5712
|
+
*
|
|
5713
|
+
* @returns {string}
|
|
5706
5714
|
*/
|
|
5707
5715
|
function useDescriptionContext(id, element) {
|
|
5708
5716
|
const {
|
|
@@ -5723,11 +5731,11 @@ function useErrors() {
|
|
|
5723
5731
|
return errors;
|
|
5724
5732
|
}
|
|
5725
5733
|
|
|
5726
|
-
/**
|
|
5727
|
-
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
5728
|
-
*
|
|
5729
|
-
* @param {string} event
|
|
5730
|
-
* @param {Function} callback
|
|
5734
|
+
/**
|
|
5735
|
+
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
5736
|
+
*
|
|
5737
|
+
* @param {string} event
|
|
5738
|
+
* @param {Function} callback
|
|
5731
5739
|
*/
|
|
5732
5740
|
function useEvent(event, callback, eventBus) {
|
|
5733
5741
|
const eventContext = hooks.useContext(EventContext);
|
|
@@ -5757,20 +5765,20 @@ function useEvent(event, callback, eventBus) {
|
|
|
5757
5765
|
}, [callback, event, eventBus]);
|
|
5758
5766
|
}
|
|
5759
5767
|
|
|
5760
|
-
/**
|
|
5761
|
-
* Creates a state that persists in the global LayoutContext.
|
|
5762
|
-
*
|
|
5763
|
-
* @example
|
|
5764
|
-
* ```jsx
|
|
5765
|
-
* function Group(props) {
|
|
5766
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
5767
|
-
* }
|
|
5768
|
-
* ```
|
|
5769
|
-
*
|
|
5770
|
-
* @param {(string|number)[]} path
|
|
5771
|
-
* @param {any} [defaultValue]
|
|
5772
|
-
*
|
|
5773
|
-
* @returns {[ any, Function ]}
|
|
5768
|
+
/**
|
|
5769
|
+
* Creates a state that persists in the global LayoutContext.
|
|
5770
|
+
*
|
|
5771
|
+
* @example
|
|
5772
|
+
* ```jsx
|
|
5773
|
+
* function Group(props) {
|
|
5774
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
5775
|
+
* }
|
|
5776
|
+
* ```
|
|
5777
|
+
*
|
|
5778
|
+
* @param {(string|number)[]} path
|
|
5779
|
+
* @param {any} [defaultValue]
|
|
5780
|
+
*
|
|
5781
|
+
* @returns {[ any, Function ]}
|
|
5774
5782
|
*/
|
|
5775
5783
|
function useLayoutState(path, defaultValue) {
|
|
5776
5784
|
const {
|
|
@@ -5784,11 +5792,11 @@ function useLayoutState(path, defaultValue) {
|
|
|
5784
5792
|
return [layoutForKey, setState];
|
|
5785
5793
|
}
|
|
5786
5794
|
|
|
5787
|
-
/**
|
|
5788
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
5789
|
-
* state on updates.
|
|
5790
|
-
*
|
|
5791
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
5795
|
+
/**
|
|
5796
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
5797
|
+
* state on updates.
|
|
5798
|
+
*
|
|
5799
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
5792
5800
|
*/
|
|
5793
5801
|
|
|
5794
5802
|
function usePrevious(value) {
|
|
@@ -5799,12 +5807,12 @@ function usePrevious(value) {
|
|
|
5799
5807
|
return ref.current;
|
|
5800
5808
|
}
|
|
5801
5809
|
|
|
5802
|
-
/**
|
|
5803
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
5804
|
-
*
|
|
5805
|
-
* @param {string} id
|
|
5806
|
-
*
|
|
5807
|
-
* @returns {import('preact').Ref}
|
|
5810
|
+
/**
|
|
5811
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
5812
|
+
*
|
|
5813
|
+
* @param {string} id
|
|
5814
|
+
*
|
|
5815
|
+
* @returns {import('preact').Ref}
|
|
5808
5816
|
*/
|
|
5809
5817
|
function useShowEntryEvent(id) {
|
|
5810
5818
|
const {
|
|
@@ -5835,20 +5843,20 @@ function useShowEntryEvent(id) {
|
|
|
5835
5843
|
return ref;
|
|
5836
5844
|
}
|
|
5837
5845
|
|
|
5838
|
-
/**
|
|
5839
|
-
* @callback setSticky
|
|
5840
|
-
* @param {boolean} value
|
|
5846
|
+
/**
|
|
5847
|
+
* @callback setSticky
|
|
5848
|
+
* @param {boolean} value
|
|
5841
5849
|
*/
|
|
5842
5850
|
|
|
5843
|
-
/**
|
|
5844
|
-
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
5845
|
-
* If sticky is observered setSticky(true) will be called.
|
|
5846
|
-
* If sticky mode is left, setSticky(false) will be called.
|
|
5847
|
-
*
|
|
5848
|
-
*
|
|
5849
|
-
* @param {Object} ref
|
|
5850
|
-
* @param {string} scrollContainerSelector
|
|
5851
|
-
* @param {setSticky} setSticky
|
|
5851
|
+
/**
|
|
5852
|
+
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
5853
|
+
* If sticky is observered setSticky(true) will be called.
|
|
5854
|
+
* If sticky mode is left, setSticky(false) will be called.
|
|
5855
|
+
*
|
|
5856
|
+
*
|
|
5857
|
+
* @param {Object} ref
|
|
5858
|
+
* @param {string} scrollContainerSelector
|
|
5859
|
+
* @param {setSticky} setSticky
|
|
5852
5860
|
*/
|
|
5853
5861
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
5854
5862
|
const [scrollContainer, setScrollContainer] = hooks.useState(minDom.query(scrollContainerSelector));
|
|
@@ -5902,19 +5910,19 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
|
|
|
5902
5910
|
}, [ref.current, scrollContainer, setSticky]);
|
|
5903
5911
|
}
|
|
5904
5912
|
|
|
5905
|
-
/**
|
|
5906
|
-
* Creates a static function reference with changing body.
|
|
5907
|
-
* This is necessary when external libraries require a callback function
|
|
5908
|
-
* that has references to state variables.
|
|
5909
|
-
*
|
|
5910
|
-
* Usage:
|
|
5911
|
-
* const callback = useStaticCallback((val) => {val === currentState});
|
|
5912
|
-
*
|
|
5913
|
-
* The `callback` reference is static and can be safely used in external
|
|
5914
|
-
* libraries or as a prop that does not cause rerendering of children.
|
|
5915
|
-
*
|
|
5916
|
-
* @param {Function} callback function with changing reference
|
|
5917
|
-
* @returns {Function} static function reference
|
|
5913
|
+
/**
|
|
5914
|
+
* Creates a static function reference with changing body.
|
|
5915
|
+
* This is necessary when external libraries require a callback function
|
|
5916
|
+
* that has references to state variables.
|
|
5917
|
+
*
|
|
5918
|
+
* Usage:
|
|
5919
|
+
* const callback = useStaticCallback((val) => {val === currentState});
|
|
5920
|
+
*
|
|
5921
|
+
* The `callback` reference is static and can be safely used in external
|
|
5922
|
+
* libraries or as a prop that does not cause rerendering of children.
|
|
5923
|
+
*
|
|
5924
|
+
* @param {Function} callback function with changing reference
|
|
5925
|
+
* @returns {Function} static function reference
|
|
5918
5926
|
*/
|
|
5919
5927
|
function useStaticCallback(callback) {
|
|
5920
5928
|
const callbackRef = hooks.useRef(callback);
|
|
@@ -6055,13 +6063,13 @@ function DataMarker(props) {
|
|
|
6055
6063
|
return null;
|
|
6056
6064
|
}
|
|
6057
6065
|
|
|
6058
|
-
/**
|
|
6059
|
-
* @typedef { {
|
|
6060
|
-
* text: (element: object) => string,
|
|
6061
|
-
* icon?: (element: Object) => import('preact').Component
|
|
6062
|
-
* } } PlaceholderDefinition
|
|
6063
|
-
*
|
|
6064
|
-
* @param { PlaceholderDefinition } props
|
|
6066
|
+
/**
|
|
6067
|
+
* @typedef { {
|
|
6068
|
+
* text: (element: object) => string,
|
|
6069
|
+
* icon?: (element: Object) => import('preact').Component
|
|
6070
|
+
* } } PlaceholderDefinition
|
|
6071
|
+
*
|
|
6072
|
+
* @param { PlaceholderDefinition } props
|
|
6065
6073
|
*/
|
|
6066
6074
|
function Placeholder(props) {
|
|
6067
6075
|
const {
|
|
@@ -6098,9 +6106,9 @@ function Description$1(props) {
|
|
|
6098
6106
|
}
|
|
6099
6107
|
const noop$6 = () => {};
|
|
6100
6108
|
|
|
6101
|
-
/**
|
|
6102
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6103
|
-
* Set Focus inside when the editor is ready.
|
|
6109
|
+
/**
|
|
6110
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6111
|
+
* Set Focus inside when the editor is ready.
|
|
6104
6112
|
*/
|
|
6105
6113
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
6106
6114
|
const [buffer, setBuffer] = hooks.useState(undefined);
|
|
@@ -6200,9 +6208,9 @@ const CodeEditor$1 = React.forwardRef((props, ref) => {
|
|
|
6200
6208
|
});
|
|
6201
6209
|
const noop$5 = () => {};
|
|
6202
6210
|
|
|
6203
|
-
/**
|
|
6204
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6205
|
-
* Set Focus inside when the editor is ready.
|
|
6211
|
+
/**
|
|
6212
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6213
|
+
* Set Focus inside when the editor is ready.
|
|
6206
6214
|
*/
|
|
6207
6215
|
const useBufferedFocus = function (editor, ref) {
|
|
6208
6216
|
const [buffer, setBuffer] = hooks.useState(undefined);
|
|
@@ -6251,10 +6259,10 @@ const CodeEditor = React.forwardRef((props, ref) => {
|
|
|
6251
6259
|
hooks.useEffect(() => {
|
|
6252
6260
|
let editor;
|
|
6253
6261
|
|
|
6254
|
-
/* Trigger FEEL toggle when
|
|
6255
|
-
*
|
|
6256
|
-
* - `backspace` is pressed
|
|
6257
|
-
* - AND the cursor is at the beginning of the input
|
|
6262
|
+
/* Trigger FEEL toggle when
|
|
6263
|
+
*
|
|
6264
|
+
* - `backspace` is pressed
|
|
6265
|
+
* - AND the cursor is at the beginning of the input
|
|
6258
6266
|
*/
|
|
6259
6267
|
const onKeyDown = e => {
|
|
6260
6268
|
if (e.key !== 'Backspace' || !editor) {
|
|
@@ -6343,10 +6351,10 @@ function FeelIndicator(props) {
|
|
|
6343
6351
|
}
|
|
6344
6352
|
const noop$4 = () => {};
|
|
6345
6353
|
|
|
6346
|
-
/**
|
|
6347
|
-
* @param {Object} props
|
|
6348
|
-
* @param {Object} props.label
|
|
6349
|
-
* @param {String} props.feel
|
|
6354
|
+
/**
|
|
6355
|
+
* @param {Object} props
|
|
6356
|
+
* @param {Object} props.label
|
|
6357
|
+
* @param {String} props.feel
|
|
6350
6358
|
*/
|
|
6351
6359
|
function FeelIcon(props) {
|
|
6352
6360
|
const {
|
|
@@ -6380,22 +6388,22 @@ const FeelPopupContext = preact.createContext({
|
|
|
6380
6388
|
source: null
|
|
6381
6389
|
});
|
|
6382
6390
|
|
|
6383
|
-
/**
|
|
6384
|
-
* Add a dragger that calls back the passed function with
|
|
6385
|
-
* { event, delta } on drag.
|
|
6386
|
-
*
|
|
6387
|
-
* @example
|
|
6388
|
-
*
|
|
6389
|
-
* function dragMove(event, delta) {
|
|
6390
|
-
* // we are dragging (!!)
|
|
6391
|
-
* }
|
|
6392
|
-
*
|
|
6393
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
6394
|
-
*
|
|
6395
|
-
* @param {Function} fn
|
|
6396
|
-
* @param {Element} [dragPreview]
|
|
6397
|
-
*
|
|
6398
|
-
* @return {Function} drag start callback function
|
|
6391
|
+
/**
|
|
6392
|
+
* Add a dragger that calls back the passed function with
|
|
6393
|
+
* { event, delta } on drag.
|
|
6394
|
+
*
|
|
6395
|
+
* @example
|
|
6396
|
+
*
|
|
6397
|
+
* function dragMove(event, delta) {
|
|
6398
|
+
* // we are dragging (!!)
|
|
6399
|
+
* }
|
|
6400
|
+
*
|
|
6401
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
6402
|
+
*
|
|
6403
|
+
* @param {Function} fn
|
|
6404
|
+
* @param {Element} [dragPreview]
|
|
6405
|
+
*
|
|
6406
|
+
* @return {Function} drag start callback function
|
|
6399
6407
|
*/
|
|
6400
6408
|
function createDragger(fn, dragPreview) {
|
|
6401
6409
|
let self;
|
|
@@ -6449,23 +6457,23 @@ function emptyCanvas() {
|
|
|
6449
6457
|
}
|
|
6450
6458
|
const noop$3 = () => {};
|
|
6451
6459
|
|
|
6452
|
-
/**
|
|
6453
|
-
* A generic popup component.
|
|
6454
|
-
*
|
|
6455
|
-
* @param {Object} props
|
|
6456
|
-
* @param {HTMLElement} [props.container]
|
|
6457
|
-
* @param {string} [props.className]
|
|
6458
|
-
* @param {boolean} [props.delayInitialFocus]
|
|
6459
|
-
* @param {{x: number, y: number}} [props.position]
|
|
6460
|
-
* @param {number} [props.width]
|
|
6461
|
-
* @param {number} [props.height]
|
|
6462
|
-
* @param {Function} props.onClose
|
|
6463
|
-
* @param {Function} [props.onPostActivate]
|
|
6464
|
-
* @param {Function} [props.onPostDeactivate]
|
|
6465
|
-
* @param {boolean} [props.returnFocus]
|
|
6466
|
-
* @param {boolean} [props.closeOnEscape]
|
|
6467
|
-
* @param {string} props.title
|
|
6468
|
-
* @param {Ref} [ref]
|
|
6460
|
+
/**
|
|
6461
|
+
* A generic popup component.
|
|
6462
|
+
*
|
|
6463
|
+
* @param {Object} props
|
|
6464
|
+
* @param {HTMLElement} [props.container]
|
|
6465
|
+
* @param {string} [props.className]
|
|
6466
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
6467
|
+
* @param {{x: number, y: number}} [props.position]
|
|
6468
|
+
* @param {number} [props.width]
|
|
6469
|
+
* @param {number} [props.height]
|
|
6470
|
+
* @param {Function} props.onClose
|
|
6471
|
+
* @param {Function} [props.onPostActivate]
|
|
6472
|
+
* @param {Function} [props.onPostDeactivate]
|
|
6473
|
+
* @param {boolean} [props.returnFocus]
|
|
6474
|
+
* @param {boolean} [props.closeOnEscape]
|
|
6475
|
+
* @param {string} props.title
|
|
6476
|
+
* @param {Ref} [ref]
|
|
6469
6477
|
*/
|
|
6470
6478
|
function PopupComponent(props, globalRef) {
|
|
6471
6479
|
const {
|
|
@@ -6683,12 +6691,12 @@ function getContainerNode(node) {
|
|
|
6683
6691
|
const FEEL_POPUP_WIDTH = 700;
|
|
6684
6692
|
const FEEL_POPUP_HEIGHT = 250;
|
|
6685
6693
|
|
|
6686
|
-
/**
|
|
6687
|
-
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
6688
|
-
* - `feelPopup.open` - fired before the popup is mounted
|
|
6689
|
-
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
6690
|
-
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
6691
|
-
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
6694
|
+
/**
|
|
6695
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
6696
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
6697
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
6698
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
6699
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
6692
6700
|
*/
|
|
6693
6701
|
function FEELPopupRoot(props) {
|
|
6694
6702
|
const {
|
|
@@ -6698,7 +6706,8 @@ function FEELPopupRoot(props) {
|
|
|
6698
6706
|
on() {},
|
|
6699
6707
|
off() {}
|
|
6700
6708
|
},
|
|
6701
|
-
popupContainer
|
|
6709
|
+
popupContainer,
|
|
6710
|
+
getPopupLinks = () => []
|
|
6702
6711
|
} = props;
|
|
6703
6712
|
const prevElement = usePrevious(element);
|
|
6704
6713
|
const [popupConfig, setPopupConfig] = hooks.useState({});
|
|
@@ -6773,6 +6782,7 @@ function FEELPopupRoot(props) {
|
|
|
6773
6782
|
children: [open && jsxRuntime.jsx(FeelPopupComponent, {
|
|
6774
6783
|
onClose: handleClose,
|
|
6775
6784
|
container: popupContainer,
|
|
6785
|
+
getLinks: getPopupLinks,
|
|
6776
6786
|
sourceElement: sourceElement,
|
|
6777
6787
|
emit: emit,
|
|
6778
6788
|
...popupConfig
|
|
@@ -6782,6 +6792,7 @@ function FEELPopupRoot(props) {
|
|
|
6782
6792
|
function FeelPopupComponent(props) {
|
|
6783
6793
|
const {
|
|
6784
6794
|
container,
|
|
6795
|
+
getLinks,
|
|
6785
6796
|
id,
|
|
6786
6797
|
hostLanguage,
|
|
6787
6798
|
onInput,
|
|
@@ -6852,24 +6863,24 @@ function FeelPopupComponent(props) {
|
|
|
6852
6863
|
height: FEEL_POPUP_HEIGHT,
|
|
6853
6864
|
width: FEEL_POPUP_WIDTH,
|
|
6854
6865
|
ref: popupRef,
|
|
6855
|
-
children: [jsxRuntime.
|
|
6866
|
+
children: [jsxRuntime.jsx(Popup.Title, {
|
|
6856
6867
|
title: title,
|
|
6857
6868
|
emit: emit,
|
|
6858
6869
|
showCloseButton: true,
|
|
6859
6870
|
closeButtonTooltip: "Save and close",
|
|
6860
6871
|
onClose: onClose,
|
|
6861
6872
|
draggable: true,
|
|
6862
|
-
children:
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
})
|
|
6873
|
+
children: jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
6874
|
+
children: getLinks(type).map((link, index) => {
|
|
6875
|
+
return jsxRuntime.jsxs("a", {
|
|
6876
|
+
rel: "noreferrer",
|
|
6877
|
+
href: link.href,
|
|
6878
|
+
target: "_blank",
|
|
6879
|
+
class: "bio-properties-panel-feel-popup__title-link",
|
|
6880
|
+
children: [link.title, jsxRuntime.jsx(LaunchIcon, {})]
|
|
6881
|
+
}, index);
|
|
6882
|
+
})
|
|
6883
|
+
})
|
|
6873
6884
|
}), jsxRuntime.jsx(Popup.Body, {
|
|
6874
6885
|
children: jsxRuntime.jsxs("div", {
|
|
6875
6886
|
onKeyDownCapture: onKeyDownCapture,
|
|
@@ -6912,11 +6923,11 @@ function autoCompletionOpen(element) {
|
|
|
6912
6923
|
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
6913
6924
|
}
|
|
6914
6925
|
|
|
6915
|
-
/**
|
|
6916
|
-
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
6917
|
-
*
|
|
6918
|
-
* @param {Function} effect
|
|
6919
|
-
* @param {Array} deps
|
|
6926
|
+
/**
|
|
6927
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
6928
|
+
*
|
|
6929
|
+
* @param {Function} effect
|
|
6930
|
+
* @param {Array} deps
|
|
6920
6931
|
*/
|
|
6921
6932
|
function useUpdateEffect(effect, deps) {
|
|
6922
6933
|
const isMounted = hooks.useRef(false);
|
|
@@ -6993,19 +7004,19 @@ function ToggleSwitch(props) {
|
|
|
6993
7004
|
});
|
|
6994
7005
|
}
|
|
6995
7006
|
|
|
6996
|
-
/**
|
|
6997
|
-
* @param {Object} props
|
|
6998
|
-
* @param {Object} props.element
|
|
6999
|
-
* @param {String} props.id
|
|
7000
|
-
* @param {String} props.description
|
|
7001
|
-
* @param {String} props.label
|
|
7002
|
-
* @param {String} props.switcherLabel
|
|
7003
|
-
* @param {Boolean} props.inline
|
|
7004
|
-
* @param {Function} props.getValue
|
|
7005
|
-
* @param {Function} props.setValue
|
|
7006
|
-
* @param {Function} props.onFocus
|
|
7007
|
-
* @param {Function} props.onBlur
|
|
7008
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
7007
|
+
/**
|
|
7008
|
+
* @param {Object} props
|
|
7009
|
+
* @param {Object} props.element
|
|
7010
|
+
* @param {String} props.id
|
|
7011
|
+
* @param {String} props.description
|
|
7012
|
+
* @param {String} props.label
|
|
7013
|
+
* @param {String} props.switcherLabel
|
|
7014
|
+
* @param {Boolean} props.inline
|
|
7015
|
+
* @param {Function} props.getValue
|
|
7016
|
+
* @param {Function} props.setValue
|
|
7017
|
+
* @param {Function} props.onFocus
|
|
7018
|
+
* @param {Function} props.onBlur
|
|
7019
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
7009
7020
|
*/
|
|
7010
7021
|
function ToggleSwitchEntry(props) {
|
|
7011
7022
|
const {
|
|
@@ -7112,22 +7123,22 @@ function NumberField(props) {
|
|
|
7112
7123
|
});
|
|
7113
7124
|
}
|
|
7114
7125
|
|
|
7115
|
-
/**
|
|
7116
|
-
* @param {Object} props
|
|
7117
|
-
* @param {Boolean} props.debounce
|
|
7118
|
-
* @param {String} props.description
|
|
7119
|
-
* @param {Boolean} props.disabled
|
|
7120
|
-
* @param {Object} props.element
|
|
7121
|
-
* @param {Function} props.getValue
|
|
7122
|
-
* @param {String} props.id
|
|
7123
|
-
* @param {String} props.label
|
|
7124
|
-
* @param {String} props.max
|
|
7125
|
-
* @param {String} props.min
|
|
7126
|
-
* @param {Function} props.setValue
|
|
7127
|
-
* @param {Function} props.onFocus
|
|
7128
|
-
* @param {Function} props.onBlur
|
|
7129
|
-
* @param {String} props.step
|
|
7130
|
-
* @param {Function} props.validate
|
|
7126
|
+
/**
|
|
7127
|
+
* @param {Object} props
|
|
7128
|
+
* @param {Boolean} props.debounce
|
|
7129
|
+
* @param {String} props.description
|
|
7130
|
+
* @param {Boolean} props.disabled
|
|
7131
|
+
* @param {Object} props.element
|
|
7132
|
+
* @param {Function} props.getValue
|
|
7133
|
+
* @param {String} props.id
|
|
7134
|
+
* @param {String} props.label
|
|
7135
|
+
* @param {String} props.max
|
|
7136
|
+
* @param {String} props.min
|
|
7137
|
+
* @param {Function} props.setValue
|
|
7138
|
+
* @param {Function} props.onFocus
|
|
7139
|
+
* @param {Function} props.onBlur
|
|
7140
|
+
* @param {String} props.step
|
|
7141
|
+
* @param {Function} props.validate
|
|
7131
7142
|
*/
|
|
7132
7143
|
function NumberFieldEntry(props) {
|
|
7133
7144
|
const {
|
|
@@ -7612,26 +7623,26 @@ React.forwardRef((props, ref) => {
|
|
|
7612
7623
|
});
|
|
7613
7624
|
});
|
|
7614
7625
|
|
|
7615
|
-
/**
|
|
7616
|
-
* @param {Object} props
|
|
7617
|
-
* @param {Object} props.element
|
|
7618
|
-
* @param {String} props.id
|
|
7619
|
-
* @param {String} props.description
|
|
7620
|
-
* @param {Boolean} props.debounce
|
|
7621
|
-
* @param {Boolean} props.disabled
|
|
7622
|
-
* @param {Boolean} props.feel
|
|
7623
|
-
* @param {String} props.label
|
|
7624
|
-
* @param {Function} props.getValue
|
|
7625
|
-
* @param {Function} props.setValue
|
|
7626
|
-
* @param {Function} props.tooltipContainer
|
|
7627
|
-
* @param {Function} props.validate
|
|
7628
|
-
* @param {Function} props.show
|
|
7629
|
-
* @param {Function} props.example
|
|
7630
|
-
* @param {Function} props.variables
|
|
7631
|
-
* @param {Function} props.onFocus
|
|
7632
|
-
* @param {Function} props.onBlur
|
|
7633
|
-
* @param {string} [props.placeholder]
|
|
7634
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
7626
|
+
/**
|
|
7627
|
+
* @param {Object} props
|
|
7628
|
+
* @param {Object} props.element
|
|
7629
|
+
* @param {String} props.id
|
|
7630
|
+
* @param {String} props.description
|
|
7631
|
+
* @param {Boolean} props.debounce
|
|
7632
|
+
* @param {Boolean} props.disabled
|
|
7633
|
+
* @param {Boolean} props.feel
|
|
7634
|
+
* @param {String} props.label
|
|
7635
|
+
* @param {Function} props.getValue
|
|
7636
|
+
* @param {Function} props.setValue
|
|
7637
|
+
* @param {Function} props.tooltipContainer
|
|
7638
|
+
* @param {Function} props.validate
|
|
7639
|
+
* @param {Function} props.show
|
|
7640
|
+
* @param {Function} props.example
|
|
7641
|
+
* @param {Function} props.variables
|
|
7642
|
+
* @param {Function} props.onFocus
|
|
7643
|
+
* @param {Function} props.onBlur
|
|
7644
|
+
* @param {string} [props.placeholder]
|
|
7645
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
7635
7646
|
*/
|
|
7636
7647
|
function FeelEntry(props) {
|
|
7637
7648
|
const {
|
|
@@ -7718,27 +7729,27 @@ function FeelEntry(props) {
|
|
|
7718
7729
|
});
|
|
7719
7730
|
}
|
|
7720
7731
|
|
|
7721
|
-
/**
|
|
7722
|
-
* @param {Object} props
|
|
7723
|
-
* @param {Object} props.element
|
|
7724
|
-
* @param {String} props.id
|
|
7725
|
-
* @param {String} props.description
|
|
7726
|
-
* @param {Boolean} props.debounce
|
|
7727
|
-
* @param {Boolean} props.disabled
|
|
7728
|
-
* @param {String} props.max
|
|
7729
|
-
* @param {String} props.min
|
|
7730
|
-
* @param {String} props.step
|
|
7731
|
-
* @param {Boolean} props.feel
|
|
7732
|
-
* @param {String} props.label
|
|
7733
|
-
* @param {Function} props.getValue
|
|
7734
|
-
* @param {Function} props.setValue
|
|
7735
|
-
* @param {Function} props.tooltipContainer
|
|
7736
|
-
* @param {Function} props.validate
|
|
7737
|
-
* @param {Function} props.show
|
|
7738
|
-
* @param {Function} props.example
|
|
7739
|
-
* @param {Function} props.variables
|
|
7740
|
-
* @param {Function} props.onFocus
|
|
7741
|
-
* @param {Function} props.onBlur
|
|
7732
|
+
/**
|
|
7733
|
+
* @param {Object} props
|
|
7734
|
+
* @param {Object} props.element
|
|
7735
|
+
* @param {String} props.id
|
|
7736
|
+
* @param {String} props.description
|
|
7737
|
+
* @param {Boolean} props.debounce
|
|
7738
|
+
* @param {Boolean} props.disabled
|
|
7739
|
+
* @param {String} props.max
|
|
7740
|
+
* @param {String} props.min
|
|
7741
|
+
* @param {String} props.step
|
|
7742
|
+
* @param {Boolean} props.feel
|
|
7743
|
+
* @param {String} props.label
|
|
7744
|
+
* @param {Function} props.getValue
|
|
7745
|
+
* @param {Function} props.setValue
|
|
7746
|
+
* @param {Function} props.tooltipContainer
|
|
7747
|
+
* @param {Function} props.validate
|
|
7748
|
+
* @param {Function} props.show
|
|
7749
|
+
* @param {Function} props.example
|
|
7750
|
+
* @param {Function} props.variables
|
|
7751
|
+
* @param {Function} props.onFocus
|
|
7752
|
+
* @param {Function} props.onBlur
|
|
7742
7753
|
*/
|
|
7743
7754
|
function FeelNumberEntry(props) {
|
|
7744
7755
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -7748,24 +7759,24 @@ function FeelNumberEntry(props) {
|
|
|
7748
7759
|
});
|
|
7749
7760
|
}
|
|
7750
7761
|
|
|
7751
|
-
/**
|
|
7752
|
-
* @param {Object} props
|
|
7753
|
-
* @param {Object} props.element
|
|
7754
|
-
* @param {String} props.id
|
|
7755
|
-
* @param {String} props.description
|
|
7756
|
-
* @param {Boolean} props.debounce
|
|
7757
|
-
* @param {Boolean} props.disabled
|
|
7758
|
-
* @param {Boolean} props.feel
|
|
7759
|
-
* @param {String} props.label
|
|
7760
|
-
* @param {Function} props.getValue
|
|
7761
|
-
* @param {Function} props.setValue
|
|
7762
|
-
* @param {Function} props.tooltipContainer
|
|
7763
|
-
* @param {Function} props.validate
|
|
7764
|
-
* @param {Function} props.show
|
|
7765
|
-
* @param {Function} props.example
|
|
7766
|
-
* @param {Function} props.variables
|
|
7767
|
-
* @param {Function} props.onFocus
|
|
7768
|
-
* @param {Function} props.onBlur
|
|
7762
|
+
/**
|
|
7763
|
+
* @param {Object} props
|
|
7764
|
+
* @param {Object} props.element
|
|
7765
|
+
* @param {String} props.id
|
|
7766
|
+
* @param {String} props.description
|
|
7767
|
+
* @param {Boolean} props.debounce
|
|
7768
|
+
* @param {Boolean} props.disabled
|
|
7769
|
+
* @param {Boolean} props.feel
|
|
7770
|
+
* @param {String} props.label
|
|
7771
|
+
* @param {Function} props.getValue
|
|
7772
|
+
* @param {Function} props.setValue
|
|
7773
|
+
* @param {Function} props.tooltipContainer
|
|
7774
|
+
* @param {Function} props.validate
|
|
7775
|
+
* @param {Function} props.show
|
|
7776
|
+
* @param {Function} props.example
|
|
7777
|
+
* @param {Function} props.variables
|
|
7778
|
+
* @param {Function} props.onFocus
|
|
7779
|
+
* @param {Function} props.onBlur
|
|
7769
7780
|
*/
|
|
7770
7781
|
function FeelToggleSwitchEntry(props) {
|
|
7771
7782
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -7775,26 +7786,26 @@ function FeelToggleSwitchEntry(props) {
|
|
|
7775
7786
|
});
|
|
7776
7787
|
}
|
|
7777
7788
|
|
|
7778
|
-
/**
|
|
7779
|
-
* @param {Object} props
|
|
7780
|
-
* @param {Object} props.element
|
|
7781
|
-
* @param {String} props.id
|
|
7782
|
-
* @param {String} props.description
|
|
7783
|
-
* @param {String} props.hostLanguage
|
|
7784
|
-
* @param {Boolean} props.singleLine
|
|
7785
|
-
* @param {Boolean} props.debounce
|
|
7786
|
-
* @param {Boolean} props.disabled
|
|
7787
|
-
* @param {Boolean} props.feel
|
|
7788
|
-
* @param {String} props.label
|
|
7789
|
-
* @param {Function} props.getValue
|
|
7790
|
-
* @param {Function} props.setValue
|
|
7791
|
-
* @param {Function} props.tooltipContainer
|
|
7792
|
-
* @param {Function} props.validate
|
|
7793
|
-
* @param {Function} props.show
|
|
7794
|
-
* @param {Function} props.example
|
|
7795
|
-
* @param {Function} props.variables
|
|
7796
|
-
* @param {Function} props.onFocus
|
|
7797
|
-
* @param {Function} props.onBlur
|
|
7789
|
+
/**
|
|
7790
|
+
* @param {Object} props
|
|
7791
|
+
* @param {Object} props.element
|
|
7792
|
+
* @param {String} props.id
|
|
7793
|
+
* @param {String} props.description
|
|
7794
|
+
* @param {String} props.hostLanguage
|
|
7795
|
+
* @param {Boolean} props.singleLine
|
|
7796
|
+
* @param {Boolean} props.debounce
|
|
7797
|
+
* @param {Boolean} props.disabled
|
|
7798
|
+
* @param {Boolean} props.feel
|
|
7799
|
+
* @param {String} props.label
|
|
7800
|
+
* @param {Function} props.getValue
|
|
7801
|
+
* @param {Function} props.setValue
|
|
7802
|
+
* @param {Function} props.tooltipContainer
|
|
7803
|
+
* @param {Function} props.validate
|
|
7804
|
+
* @param {Function} props.show
|
|
7805
|
+
* @param {Function} props.example
|
|
7806
|
+
* @param {Function} props.variables
|
|
7807
|
+
* @param {Function} props.onFocus
|
|
7808
|
+
* @param {Function} props.onBlur
|
|
7798
7809
|
*/
|
|
7799
7810
|
function FeelTemplatingEntry(props) {
|
|
7800
7811
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -7862,84 +7873,85 @@ const DEFAULT_LAYOUT = {};
|
|
|
7862
7873
|
const DEFAULT_DESCRIPTION = {};
|
|
7863
7874
|
const DEFAULT_TOOLTIP = {};
|
|
7864
7875
|
|
|
7865
|
-
/**
|
|
7866
|
-
* @typedef { {
|
|
7867
|
-
* component: import('preact').Component,
|
|
7868
|
-
* id: String,
|
|
7869
|
-
* isEdited?: Function
|
|
7870
|
-
* } } EntryDefinition
|
|
7871
|
-
*
|
|
7872
|
-
* @typedef { {
|
|
7873
|
-
* autoFocusEntry: String,
|
|
7874
|
-
* autoOpen?: Boolean,
|
|
7875
|
-
* entries: Array<EntryDefinition>,
|
|
7876
|
-
* id: String,
|
|
7877
|
-
* label: String,
|
|
7878
|
-
* remove: (event: MouseEvent) => void
|
|
7879
|
-
* } } ListItemDefinition
|
|
7880
|
-
*
|
|
7881
|
-
* @typedef { {
|
|
7882
|
-
* add: (event: MouseEvent) => void,
|
|
7883
|
-
* component: import('preact').Component,
|
|
7884
|
-
* element: Object,
|
|
7885
|
-
* id: String,
|
|
7886
|
-
* items: Array<ListItemDefinition>,
|
|
7887
|
-
* label: String,
|
|
7888
|
-
* shouldOpen?: Boolean
|
|
7889
|
-
* } } ListGroupDefinition
|
|
7890
|
-
*
|
|
7891
|
-
* @typedef { {
|
|
7892
|
-
* component?: import('preact').Component,
|
|
7893
|
-
* entries: Array<EntryDefinition>,
|
|
7894
|
-
* id: String,
|
|
7895
|
-
* label: String,
|
|
7896
|
-
* shouldOpen?: Boolean
|
|
7897
|
-
* } } GroupDefinition
|
|
7898
|
-
*
|
|
7899
|
-
* @typedef { {
|
|
7900
|
-
* [id: String]: GetDescriptionFunction
|
|
7901
|
-
* } } DescriptionConfig
|
|
7902
|
-
*
|
|
7903
|
-
* @typedef { {
|
|
7904
|
-
* [id: String]: GetTooltipFunction
|
|
7905
|
-
* } } TooltipConfig
|
|
7906
|
-
*
|
|
7907
|
-
* @callback { {
|
|
7908
|
-
* @param {string} id
|
|
7909
|
-
* @param {Object} element
|
|
7910
|
-
* @returns {string}
|
|
7911
|
-
* } } GetDescriptionFunction
|
|
7912
|
-
*
|
|
7913
|
-
* @callback { {
|
|
7914
|
-
* @param {string} id
|
|
7915
|
-
* @param {Object} element
|
|
7916
|
-
* @returns {string}
|
|
7917
|
-
* } } GetTooltipFunction
|
|
7918
|
-
*
|
|
7919
|
-
* @typedef { {
|
|
7920
|
-
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
7921
|
-
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
7922
|
-
* } } PlaceholderProvider
|
|
7923
|
-
*
|
|
7876
|
+
/**
|
|
7877
|
+
* @typedef { {
|
|
7878
|
+
* component: import('preact').Component,
|
|
7879
|
+
* id: String,
|
|
7880
|
+
* isEdited?: Function
|
|
7881
|
+
* } } EntryDefinition
|
|
7882
|
+
*
|
|
7883
|
+
* @typedef { {
|
|
7884
|
+
* autoFocusEntry: String,
|
|
7885
|
+
* autoOpen?: Boolean,
|
|
7886
|
+
* entries: Array<EntryDefinition>,
|
|
7887
|
+
* id: String,
|
|
7888
|
+
* label: String,
|
|
7889
|
+
* remove: (event: MouseEvent) => void
|
|
7890
|
+
* } } ListItemDefinition
|
|
7891
|
+
*
|
|
7892
|
+
* @typedef { {
|
|
7893
|
+
* add: (event: MouseEvent) => void,
|
|
7894
|
+
* component: import('preact').Component,
|
|
7895
|
+
* element: Object,
|
|
7896
|
+
* id: String,
|
|
7897
|
+
* items: Array<ListItemDefinition>,
|
|
7898
|
+
* label: String,
|
|
7899
|
+
* shouldOpen?: Boolean
|
|
7900
|
+
* } } ListGroupDefinition
|
|
7901
|
+
*
|
|
7902
|
+
* @typedef { {
|
|
7903
|
+
* component?: import('preact').Component,
|
|
7904
|
+
* entries: Array<EntryDefinition>,
|
|
7905
|
+
* id: String,
|
|
7906
|
+
* label: String,
|
|
7907
|
+
* shouldOpen?: Boolean
|
|
7908
|
+
* } } GroupDefinition
|
|
7909
|
+
*
|
|
7910
|
+
* @typedef { {
|
|
7911
|
+
* [id: String]: GetDescriptionFunction
|
|
7912
|
+
* } } DescriptionConfig
|
|
7913
|
+
*
|
|
7914
|
+
* @typedef { {
|
|
7915
|
+
* [id: String]: GetTooltipFunction
|
|
7916
|
+
* } } TooltipConfig
|
|
7917
|
+
*
|
|
7918
|
+
* @callback { {
|
|
7919
|
+
* @param {string} id
|
|
7920
|
+
* @param {Object} element
|
|
7921
|
+
* @returns {string}
|
|
7922
|
+
* } } GetDescriptionFunction
|
|
7923
|
+
*
|
|
7924
|
+
* @callback { {
|
|
7925
|
+
* @param {string} id
|
|
7926
|
+
* @param {Object} element
|
|
7927
|
+
* @returns {string}
|
|
7928
|
+
* } } GetTooltipFunction
|
|
7929
|
+
*
|
|
7930
|
+
* @typedef { {
|
|
7931
|
+
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
7932
|
+
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
7933
|
+
* } } PlaceholderProvider
|
|
7934
|
+
*
|
|
7924
7935
|
*/
|
|
7925
7936
|
|
|
7926
|
-
/**
|
|
7927
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
7928
|
-
* data from implementor to describe *what* will be rendered.
|
|
7929
|
-
*
|
|
7930
|
-
* @param {Object} props
|
|
7931
|
-
* @param {Object|Array} props.element
|
|
7932
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
7933
|
-
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
7934
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
7935
|
-
* @param {Object} [props.layoutConfig]
|
|
7936
|
-
* @param {Function} [props.layoutChanged]
|
|
7937
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
7938
|
-
* @param {Function} [props.descriptionLoaded]
|
|
7939
|
-
* @param {TooltipConfig} [props.tooltipConfig]
|
|
7940
|
-
* @param {Function} [props.tooltipLoaded]
|
|
7941
|
-
* @param {HTMLElement} [props.feelPopupContainer]
|
|
7942
|
-
* @param {
|
|
7937
|
+
/**
|
|
7938
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
7939
|
+
* data from implementor to describe *what* will be rendered.
|
|
7940
|
+
*
|
|
7941
|
+
* @param {Object} props
|
|
7942
|
+
* @param {Object|Array} props.element
|
|
7943
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
7944
|
+
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
7945
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
7946
|
+
* @param {Object} [props.layoutConfig]
|
|
7947
|
+
* @param {Function} [props.layoutChanged]
|
|
7948
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
7949
|
+
* @param {Function} [props.descriptionLoaded]
|
|
7950
|
+
* @param {TooltipConfig} [props.tooltipConfig]
|
|
7951
|
+
* @param {Function} [props.tooltipLoaded]
|
|
7952
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
7953
|
+
* @param {Function} [props.getFeelPopupLinks]
|
|
7954
|
+
* @param {Object} [props.eventBus]
|
|
7943
7955
|
*/
|
|
7944
7956
|
function PropertiesPanel$1(props) {
|
|
7945
7957
|
const {
|
|
@@ -7954,6 +7966,7 @@ function PropertiesPanel$1(props) {
|
|
|
7954
7966
|
tooltipConfig,
|
|
7955
7967
|
tooltipLoaded,
|
|
7956
7968
|
feelPopupContainer,
|
|
7969
|
+
getFeelPopupLinks,
|
|
7957
7970
|
eventBus
|
|
7958
7971
|
} = props;
|
|
7959
7972
|
|
|
@@ -8058,6 +8071,7 @@ function PropertiesPanel$1(props) {
|
|
|
8058
8071
|
element: element,
|
|
8059
8072
|
eventBus: eventBus,
|
|
8060
8073
|
popupContainer: feelPopupContainer,
|
|
8074
|
+
getPopupLinks: getFeelPopupLinks,
|
|
8061
8075
|
children: jsxRuntime.jsxs("div", {
|
|
8062
8076
|
class: "bio-properties-panel",
|
|
8063
8077
|
children: [jsxRuntime.jsx(Header, {
|
|
@@ -8110,11 +8124,11 @@ function createTooltipContext(overrides = {}) {
|
|
|
8110
8124
|
|
|
8111
8125
|
// hooks //////////////////
|
|
8112
8126
|
|
|
8113
|
-
/**
|
|
8114
|
-
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
8115
|
-
*
|
|
8116
|
-
* @param {Function} effect
|
|
8117
|
-
* @param {Array} deps
|
|
8127
|
+
/**
|
|
8128
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
8129
|
+
*
|
|
8130
|
+
* @param {Function} effect
|
|
8131
|
+
* @param {Array} deps
|
|
8118
8132
|
*/
|
|
8119
8133
|
function useUpdateLayoutEffect(effect, deps) {
|
|
8120
8134
|
const isMounted = hooks.useRef(false);
|
|
@@ -8127,20 +8141,20 @@ function useUpdateLayoutEffect(effect, deps) {
|
|
|
8127
8141
|
}, deps);
|
|
8128
8142
|
}
|
|
8129
8143
|
|
|
8130
|
-
/**
|
|
8131
|
-
* @typedef { {
|
|
8132
|
-
* [key: string]: string;
|
|
8133
|
-
* } } TranslateReplacements
|
|
8144
|
+
/**
|
|
8145
|
+
* @typedef { {
|
|
8146
|
+
* [key: string]: string;
|
|
8147
|
+
* } } TranslateReplacements
|
|
8134
8148
|
*/
|
|
8135
8149
|
|
|
8136
|
-
/**
|
|
8137
|
-
* A simple translation stub to be used for multi-language support.
|
|
8138
|
-
* Can be easily replaced with a more sophisticated solution.
|
|
8139
|
-
*
|
|
8140
|
-
* @param {string} template to interpolate
|
|
8141
|
-
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
8142
|
-
*
|
|
8143
|
-
* @return {string} the translated string
|
|
8150
|
+
/**
|
|
8151
|
+
* A simple translation stub to be used for multi-language support.
|
|
8152
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
8153
|
+
*
|
|
8154
|
+
* @param {string} template to interpolate
|
|
8155
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
8156
|
+
*
|
|
8157
|
+
* @return {string} the translated string
|
|
8144
8158
|
*/
|
|
8145
8159
|
function translateFallback(template, replacements) {
|
|
8146
8160
|
replacements = replacements || {};
|
|
@@ -8249,8 +8263,8 @@ function ListItem(props) {
|
|
|
8249
8263
|
}
|
|
8250
8264
|
const noop$1 = () => {};
|
|
8251
8265
|
|
|
8252
|
-
/**
|
|
8253
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
8266
|
+
/**
|
|
8267
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
8254
8268
|
*/
|
|
8255
8269
|
function ListGroup(props) {
|
|
8256
8270
|
const {
|
|
@@ -8441,18 +8455,18 @@ function Checkbox(props) {
|
|
|
8441
8455
|
});
|
|
8442
8456
|
}
|
|
8443
8457
|
|
|
8444
|
-
/**
|
|
8445
|
-
* @param {Object} props
|
|
8446
|
-
* @param {Object} props.element
|
|
8447
|
-
* @param {String} props.id
|
|
8448
|
-
* @param {String} props.description
|
|
8449
|
-
* @param {String} props.label
|
|
8450
|
-
* @param {Function} props.getValue
|
|
8451
|
-
* @param {Function} props.setValue
|
|
8452
|
-
* @param {Function} props.onFocus
|
|
8453
|
-
* @param {Function} props.onBlur
|
|
8454
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
8455
|
-
* @param {boolean} [props.disabled]
|
|
8458
|
+
/**
|
|
8459
|
+
* @param {Object} props
|
|
8460
|
+
* @param {Object} props.element
|
|
8461
|
+
* @param {String} props.id
|
|
8462
|
+
* @param {String} props.description
|
|
8463
|
+
* @param {String} props.label
|
|
8464
|
+
* @param {Function} props.getValue
|
|
8465
|
+
* @param {Function} props.setValue
|
|
8466
|
+
* @param {Function} props.onFocus
|
|
8467
|
+
* @param {Function} props.onBlur
|
|
8468
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
8469
|
+
* @param {boolean} [props.disabled]
|
|
8456
8470
|
*/
|
|
8457
8471
|
function CheckboxEntry(props) {
|
|
8458
8472
|
const {
|
|
@@ -8572,20 +8586,20 @@ function Select(props) {
|
|
|
8572
8586
|
});
|
|
8573
8587
|
}
|
|
8574
8588
|
|
|
8575
|
-
/**
|
|
8576
|
-
* @param {object} props
|
|
8577
|
-
* @param {object} props.element
|
|
8578
|
-
* @param {string} props.id
|
|
8579
|
-
* @param {string} [props.description]
|
|
8580
|
-
* @param {string} props.label
|
|
8581
|
-
* @param {Function} props.getValue
|
|
8582
|
-
* @param {Function} props.setValue
|
|
8583
|
-
* @param {Function} props.onFocus
|
|
8584
|
-
* @param {Function} props.onBlur
|
|
8585
|
-
* @param {Function} props.getOptions
|
|
8586
|
-
* @param {boolean} [props.disabled]
|
|
8587
|
-
* @param {Function} [props.validate]
|
|
8588
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
8589
|
+
/**
|
|
8590
|
+
* @param {object} props
|
|
8591
|
+
* @param {object} props.element
|
|
8592
|
+
* @param {string} props.id
|
|
8593
|
+
* @param {string} [props.description]
|
|
8594
|
+
* @param {string} props.label
|
|
8595
|
+
* @param {Function} props.getValue
|
|
8596
|
+
* @param {Function} props.setValue
|
|
8597
|
+
* @param {Function} props.onFocus
|
|
8598
|
+
* @param {Function} props.onBlur
|
|
8599
|
+
* @param {Function} props.getOptions
|
|
8600
|
+
* @param {boolean} [props.disabled]
|
|
8601
|
+
* @param {Function} [props.validate]
|
|
8602
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
8589
8603
|
*/
|
|
8590
8604
|
function SelectEntry(props) {
|
|
8591
8605
|
const {
|
|
@@ -8876,20 +8890,20 @@ function Textfield(props) {
|
|
|
8876
8890
|
});
|
|
8877
8891
|
}
|
|
8878
8892
|
|
|
8879
|
-
/**
|
|
8880
|
-
* @param {Object} props
|
|
8881
|
-
* @param {Object} props.element
|
|
8882
|
-
* @param {String} props.id
|
|
8883
|
-
* @param {String} props.description
|
|
8884
|
-
* @param {Boolean} props.debounce
|
|
8885
|
-
* @param {Boolean} props.disabled
|
|
8886
|
-
* @param {String} props.label
|
|
8887
|
-
* @param {Function} props.getValue
|
|
8888
|
-
* @param {Function} props.setValue
|
|
8889
|
-
* @param {Function} props.onFocus
|
|
8890
|
-
* @param {Function} props.onBlur
|
|
8891
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
8892
|
-
* @param {Function} props.validate
|
|
8893
|
+
/**
|
|
8894
|
+
* @param {Object} props
|
|
8895
|
+
* @param {Object} props.element
|
|
8896
|
+
* @param {String} props.id
|
|
8897
|
+
* @param {String} props.description
|
|
8898
|
+
* @param {Boolean} props.debounce
|
|
8899
|
+
* @param {Boolean} props.disabled
|
|
8900
|
+
* @param {String} props.label
|
|
8901
|
+
* @param {Function} props.getValue
|
|
8902
|
+
* @param {Function} props.setValue
|
|
8903
|
+
* @param {Function} props.onFocus
|
|
8904
|
+
* @param {Function} props.onBlur
|
|
8905
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
8906
|
+
* @param {Function} props.validate
|
|
8893
8907
|
*/
|
|
8894
8908
|
function TextfieldEntry(props) {
|
|
8895
8909
|
const {
|
|
@@ -8964,20 +8978,20 @@ class FeelPopupModule {
|
|
|
8964
8978
|
this._eventBus = eventBus;
|
|
8965
8979
|
}
|
|
8966
8980
|
|
|
8967
|
-
/**
|
|
8968
|
-
* Check if the FEEL popup is open.
|
|
8969
|
-
* @return {Boolean}
|
|
8981
|
+
/**
|
|
8982
|
+
* Check if the FEEL popup is open.
|
|
8983
|
+
* @return {Boolean}
|
|
8970
8984
|
*/
|
|
8971
8985
|
isOpen() {
|
|
8972
8986
|
return this._eventBus.fire('feelPopup._isOpen');
|
|
8973
8987
|
}
|
|
8974
8988
|
|
|
8975
|
-
/**
|
|
8976
|
-
* Open the FEEL popup.
|
|
8977
|
-
*
|
|
8978
|
-
* @param {String} entryId
|
|
8979
|
-
* @param {Object} popupConfig
|
|
8980
|
-
* @param {HTMLElement} sourceElement
|
|
8989
|
+
/**
|
|
8990
|
+
* Open the FEEL popup.
|
|
8991
|
+
*
|
|
8992
|
+
* @param {String} entryId
|
|
8993
|
+
* @param {Object} popupConfig
|
|
8994
|
+
* @param {HTMLElement} sourceElement
|
|
8981
8995
|
*/
|
|
8982
8996
|
open(entryId, popupConfig, sourceElement) {
|
|
8983
8997
|
return this._eventBus.fire('feelPopup._open', {
|
|
@@ -8987,8 +9001,8 @@ class FeelPopupModule {
|
|
|
8987
9001
|
});
|
|
8988
9002
|
}
|
|
8989
9003
|
|
|
8990
|
-
/**
|
|
8991
|
-
* Close the FEEL popup.
|
|
9004
|
+
/**
|
|
9005
|
+
* Close the FEEL popup.
|
|
8992
9006
|
*/
|
|
8993
9007
|
close() {
|
|
8994
9008
|
return this._eventBus.fire('feelPopup._close');
|
|
@@ -13588,7 +13602,7 @@ class FormEditor {
|
|
|
13588
13602
|
* @type {Element}
|
|
13589
13603
|
*/
|
|
13590
13604
|
this._container = formJsViewer.createFormContainer();
|
|
13591
|
-
this._container.setAttribute('
|
|
13605
|
+
this._container.setAttribute('tabindex', '0');
|
|
13592
13606
|
const {
|
|
13593
13607
|
container,
|
|
13594
13608
|
exporter,
|