@bpmn-io/form-js-editor 1.14.0 → 1.15.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 +4 -0
- package/dist/assets/properties-panel.css +4 -0
- package/dist/index.cjs +100 -211
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +101 -212
- package/dist/index.es.js.map +1 -1
- package/dist/types/features/properties-panel/entries/index.d.ts +0 -1
- package/dist/types/features/properties-panel/groups/index.d.ts +0 -1
- package/package.json +5 -5
- package/dist/types/features/properties-panel/entries/EndpointKey.d.ts +0 -10
- package/dist/types/features/properties-panel/groups/DownloadSettings.d.ts +0 -12
|
@@ -2303,6 +2303,10 @@ textarea.bio-properties-panel-input {
|
|
|
2303
2303
|
padding-left: 4px;
|
|
2304
2304
|
}
|
|
2305
2305
|
|
|
2306
|
+
.bio-properties-panel-feel-popup .bio-properties-panel-input {
|
|
2307
|
+
border: none;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2306
2310
|
.bio-properties-panel-feel-popup .cm-gutters {
|
|
2307
2311
|
background-color: var(--feel-popup-gutters-background-color);
|
|
2308
2312
|
border: none;
|
|
@@ -1502,6 +1502,10 @@ textarea.bio-properties-panel-input {
|
|
|
1502
1502
|
padding-left: 4px;
|
|
1503
1503
|
}
|
|
1504
1504
|
|
|
1505
|
+
.bio-properties-panel-feel-popup .bio-properties-panel-input {
|
|
1506
|
+
border: none;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1505
1509
|
.bio-properties-panel-feel-popup .cm-gutters {
|
|
1506
1510
|
background-color: var(--feel-popup-gutters-background-color);
|
|
1507
1511
|
border: none;
|
package/dist/index.cjs
CHANGED
|
@@ -5598,7 +5598,7 @@ function TooltipWrapper(props) {
|
|
|
5598
5598
|
return jsxRuntime.jsx(Tooltip, {
|
|
5599
5599
|
...props,
|
|
5600
5600
|
value: value,
|
|
5601
|
-
forId:
|
|
5601
|
+
forId: `bio-properties-panel-${forId}`
|
|
5602
5602
|
});
|
|
5603
5603
|
}
|
|
5604
5604
|
function Tooltip(props) {
|
|
@@ -5609,71 +5609,52 @@ function Tooltip(props) {
|
|
|
5609
5609
|
direction = 'right',
|
|
5610
5610
|
position
|
|
5611
5611
|
} = props;
|
|
5612
|
-
const [visible,
|
|
5613
|
-
|
|
5612
|
+
const [visible, setVisible] = hooks.useState(false);
|
|
5613
|
+
|
|
5614
|
+
// Tooltip will be shown after SHOW_DELAY ms from hovering over the source element.
|
|
5615
|
+
const SHOW_DELAY = 200;
|
|
5614
5616
|
let timeout = null;
|
|
5615
5617
|
const wrapperRef = hooks.useRef(null);
|
|
5616
5618
|
const tooltipRef = hooks.useRef(null);
|
|
5617
|
-
const
|
|
5618
|
-
|
|
5619
|
-
if (
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
}
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
}
|
|
5619
|
+
const show = (_, delay) => {
|
|
5620
|
+
if (visible) return;
|
|
5621
|
+
if (delay) {
|
|
5622
|
+
timeout = setTimeout(() => {
|
|
5623
|
+
setVisible(true);
|
|
5624
|
+
}, SHOW_DELAY);
|
|
5625
|
+
} else {
|
|
5626
|
+
setVisible(true);
|
|
5626
5627
|
}
|
|
5627
5628
|
};
|
|
5628
|
-
const
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
};
|
|
5632
|
-
const hideTooltipViaEscape = e => {
|
|
5633
|
-
e.code === 'Escape' && hideTooltip();
|
|
5629
|
+
const hide = () => {
|
|
5630
|
+
clearTimeout(timeout);
|
|
5631
|
+
setVisible(false);
|
|
5634
5632
|
};
|
|
5635
|
-
const
|
|
5636
|
-
|
|
5637
|
-
y
|
|
5633
|
+
const handleMouseLeave = ({
|
|
5634
|
+
relatedTarget
|
|
5638
5635
|
}) => {
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5636
|
+
// Don't hide the tooltip when moving mouse between the wrapper and the tooltip.
|
|
5637
|
+
if (relatedTarget === wrapperRef.current || relatedTarget === tooltipRef.current || relatedTarget?.parentElement === tooltipRef.current) {
|
|
5638
|
+
return;
|
|
5639
|
+
}
|
|
5640
|
+
hide();
|
|
5642
5641
|
};
|
|
5643
|
-
|
|
5642
|
+
const handleFocusOut = e => {
|
|
5644
5643
|
const {
|
|
5645
|
-
|
|
5646
|
-
} =
|
|
5647
|
-
|
|
5644
|
+
target
|
|
5645
|
+
} = e;
|
|
5646
|
+
|
|
5647
|
+
// Don't hide the tooltip if the wrapper or the tooltip itself is clicked.
|
|
5648
|
+
const isHovered = target.matches(':hover') || tooltipRef.current?.matches(':hover');
|
|
5649
|
+
if (target === wrapperRef.current && isHovered) {
|
|
5650
|
+
e.stopPropagation();
|
|
5648
5651
|
return;
|
|
5649
5652
|
}
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
}) && !(isFocused && focusedViaKeyboard)) {
|
|
5656
|
-
hideTooltip();
|
|
5657
|
-
}
|
|
5658
|
-
};
|
|
5659
|
-
const hideFocusedTooltip = e => {
|
|
5660
|
-
const {
|
|
5661
|
-
relatedTarget
|
|
5662
|
-
} = e;
|
|
5663
|
-
const isTooltipChild = el => !!el.closest('.bio-properties-panel-tooltip');
|
|
5664
|
-
if (visible && !isHovered(wrapperRef.current) && relatedTarget && !isTooltipChild(relatedTarget)) {
|
|
5665
|
-
hideTooltip();
|
|
5666
|
-
}
|
|
5667
|
-
};
|
|
5668
|
-
document.addEventListener('wheel', hideHoveredTooltip);
|
|
5669
|
-
document.addEventListener('focusout', hideFocusedTooltip);
|
|
5670
|
-
document.addEventListener('mousemove', hideHoveredTooltip);
|
|
5671
|
-
return () => {
|
|
5672
|
-
document.removeEventListener('wheel', hideHoveredTooltip);
|
|
5673
|
-
document.removeEventListener('mousemove', hideHoveredTooltip);
|
|
5674
|
-
document.removeEventListener('focusout', hideFocusedTooltip);
|
|
5675
|
-
};
|
|
5676
|
-
}, [wrapperRef.current, visible, focusedViaKeyboard]);
|
|
5653
|
+
hide();
|
|
5654
|
+
};
|
|
5655
|
+
const hideTooltipViaEscape = e => {
|
|
5656
|
+
e.code === 'Escape' && hide();
|
|
5657
|
+
};
|
|
5677
5658
|
const renderTooltip = () => {
|
|
5678
5659
|
return jsxRuntime.jsxs("div", {
|
|
5679
5660
|
class: `bio-properties-panel-tooltip ${direction}`,
|
|
@@ -5683,6 +5664,7 @@ function Tooltip(props) {
|
|
|
5683
5664
|
style: position || getTooltipPosition(wrapperRef.current),
|
|
5684
5665
|
ref: tooltipRef,
|
|
5685
5666
|
onClick: e => e.stopPropagation(),
|
|
5667
|
+
onMouseLeave: handleMouseLeave,
|
|
5686
5668
|
children: [jsxRuntime.jsx("div", {
|
|
5687
5669
|
class: "bio-properties-panel-tooltip-content",
|
|
5688
5670
|
children: value
|
|
@@ -5695,39 +5677,23 @@ function Tooltip(props) {
|
|
|
5695
5677
|
class: "bio-properties-panel-tooltip-wrapper",
|
|
5696
5678
|
tabIndex: "0",
|
|
5697
5679
|
ref: wrapperRef,
|
|
5698
|
-
onMouseEnter:
|
|
5699
|
-
onMouseLeave:
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
},
|
|
5703
|
-
onFocus: showTooltip,
|
|
5680
|
+
onMouseEnter: e => show(e, true),
|
|
5681
|
+
onMouseLeave: handleMouseLeave,
|
|
5682
|
+
onFocus: show,
|
|
5683
|
+
onBlur: handleFocusOut,
|
|
5704
5684
|
onKeyDown: hideTooltipViaEscape,
|
|
5705
5685
|
children: [props.children, visible ? parent ? React.createPortal(renderTooltip(), parent.current) : renderTooltip() : null]
|
|
5706
5686
|
});
|
|
5707
5687
|
}
|
|
5708
5688
|
|
|
5709
5689
|
// helper
|
|
5710
|
-
|
|
5711
|
-
const {
|
|
5712
|
-
top,
|
|
5713
|
-
right,
|
|
5714
|
-
bottom,
|
|
5715
|
-
left
|
|
5716
|
-
} = bounds;
|
|
5717
|
-
return x >= left && x <= right && y >= top && y <= bottom;
|
|
5718
|
-
}
|
|
5690
|
+
|
|
5719
5691
|
function getTooltipPosition(refElement) {
|
|
5720
5692
|
const refPosition = refElement.getBoundingClientRect();
|
|
5721
5693
|
const right = `calc(100% - ${refPosition.x}px)`;
|
|
5722
5694
|
const top = `${refPosition.top - 10}px`;
|
|
5723
5695
|
return `right: ${right}; top: ${top};`;
|
|
5724
5696
|
}
|
|
5725
|
-
function isHovered(element) {
|
|
5726
|
-
return element.matches(':hover');
|
|
5727
|
-
}
|
|
5728
|
-
function prefixId$9(id) {
|
|
5729
|
-
return `bio-properties-panel-${id}`;
|
|
5730
|
-
}
|
|
5731
5697
|
|
|
5732
5698
|
/**
|
|
5733
5699
|
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
@@ -7250,6 +7216,7 @@ function FeelTextfieldComponent(props) {
|
|
|
7250
7216
|
label,
|
|
7251
7217
|
hostLanguage,
|
|
7252
7218
|
onInput,
|
|
7219
|
+
onBlur,
|
|
7253
7220
|
onError,
|
|
7254
7221
|
placeholder,
|
|
7255
7222
|
feel,
|
|
@@ -7315,6 +7282,12 @@ function FeelTextfieldComponent(props) {
|
|
|
7315
7282
|
setFocus(-1);
|
|
7316
7283
|
}
|
|
7317
7284
|
};
|
|
7285
|
+
const handleOnBlur = e => {
|
|
7286
|
+
if (onBlur) {
|
|
7287
|
+
onBlur(e);
|
|
7288
|
+
}
|
|
7289
|
+
setLocalValue(e.target.value.trim());
|
|
7290
|
+
};
|
|
7318
7291
|
const handleLint = useStaticCallback((lint = []) => {
|
|
7319
7292
|
const syntaxError = lint.some(report => report.type === 'Syntax Error');
|
|
7320
7293
|
if (syntaxError) {
|
|
@@ -7436,6 +7409,7 @@ function FeelTextfieldComponent(props) {
|
|
|
7436
7409
|
...props,
|
|
7437
7410
|
popupOpen: popuOpen,
|
|
7438
7411
|
onInput: handleLocalInput,
|
|
7412
|
+
onBlur: handleOnBlur,
|
|
7439
7413
|
contentAttributes: {
|
|
7440
7414
|
'id': prefixId$5(id),
|
|
7441
7415
|
'aria-label': label
|
|
@@ -8734,6 +8708,12 @@ function TextArea(props) {
|
|
|
8734
8708
|
autoResize && resizeToContents(e.target);
|
|
8735
8709
|
setLocalValue(e.target.value);
|
|
8736
8710
|
};
|
|
8711
|
+
const handleOnBlur = e => {
|
|
8712
|
+
if (onBlur) {
|
|
8713
|
+
onBlur(e);
|
|
8714
|
+
}
|
|
8715
|
+
setLocalValue(e.target.value.trim());
|
|
8716
|
+
};
|
|
8737
8717
|
hooks.useLayoutEffect(() => {
|
|
8738
8718
|
autoResize && resizeToContents(ref.current);
|
|
8739
8719
|
}, []);
|
|
@@ -8765,7 +8745,7 @@ function TextArea(props) {
|
|
|
8765
8745
|
class: classnames('bio-properties-panel-input', monospace ? 'bio-properties-panel-input-monospace' : '', autoResize ? 'auto-resize' : ''),
|
|
8766
8746
|
onInput: handleInput,
|
|
8767
8747
|
onFocus: onFocus,
|
|
8768
|
-
onBlur:
|
|
8748
|
+
onBlur: handleOnBlur,
|
|
8769
8749
|
placeholder: placeholder,
|
|
8770
8750
|
rows: rows,
|
|
8771
8751
|
value: localValue,
|
|
@@ -8883,6 +8863,12 @@ function Textfield(props) {
|
|
|
8883
8863
|
const handleInputCallback = hooks.useMemo(() => {
|
|
8884
8864
|
return debounce(target => onInput(target.value.length ? target.value : undefined));
|
|
8885
8865
|
}, [onInput, debounce]);
|
|
8866
|
+
const handleOnBlur = e => {
|
|
8867
|
+
if (onBlur) {
|
|
8868
|
+
onBlur(e);
|
|
8869
|
+
}
|
|
8870
|
+
setLocalValue(e.target.value.trim());
|
|
8871
|
+
};
|
|
8886
8872
|
const handleInput = e => {
|
|
8887
8873
|
handleInputCallback(e.target);
|
|
8888
8874
|
setLocalValue(e.target.value);
|
|
@@ -8915,7 +8901,7 @@ function Textfield(props) {
|
|
|
8915
8901
|
class: "bio-properties-panel-input",
|
|
8916
8902
|
onInput: handleInput,
|
|
8917
8903
|
onFocus: onFocus,
|
|
8918
|
-
onBlur:
|
|
8904
|
+
onBlur: handleOnBlur,
|
|
8919
8905
|
placeholder: placeholder,
|
|
8920
8906
|
value: localValue
|
|
8921
8907
|
})]
|
|
@@ -9448,7 +9434,7 @@ function Columns(props) {
|
|
|
9448
9434
|
editField,
|
|
9449
9435
|
id
|
|
9450
9436
|
} = props;
|
|
9451
|
-
|
|
9437
|
+
useService('debounce');
|
|
9452
9438
|
const formLayoutValidator = useService('formLayoutValidator');
|
|
9453
9439
|
const validate = hooks.useCallback(value => {
|
|
9454
9440
|
return formLayoutValidator.validateField(field, value ? parseInt(value) : null);
|
|
@@ -9474,7 +9460,6 @@ function Columns(props) {
|
|
|
9474
9460
|
...asArray(16).filter(i => i >= MIN_COLUMNS).map(asOption)];
|
|
9475
9461
|
};
|
|
9476
9462
|
return SelectEntry({
|
|
9477
|
-
debounce,
|
|
9478
9463
|
element: field,
|
|
9479
9464
|
id,
|
|
9480
9465
|
label: 'Columns',
|
|
@@ -10550,7 +10535,7 @@ function Height(props) {
|
|
|
10550
10535
|
id,
|
|
10551
10536
|
getValue,
|
|
10552
10537
|
setValue,
|
|
10553
|
-
validate: validate$
|
|
10538
|
+
validate: validate$9
|
|
10554
10539
|
});
|
|
10555
10540
|
}
|
|
10556
10541
|
|
|
@@ -10560,7 +10545,7 @@ function Height(props) {
|
|
|
10560
10545
|
* @param {number|void} value
|
|
10561
10546
|
* @returns {string|null}
|
|
10562
10547
|
*/
|
|
10563
|
-
const validate$
|
|
10548
|
+
const validate$9 = value => {
|
|
10564
10549
|
if (typeof value !== 'number') {
|
|
10565
10550
|
return 'A number is required.';
|
|
10566
10551
|
}
|
|
@@ -10624,7 +10609,7 @@ function Url(props) {
|
|
|
10624
10609
|
setValue,
|
|
10625
10610
|
singleLine: true,
|
|
10626
10611
|
tooltip: getTooltip$1(),
|
|
10627
|
-
validate: validate$
|
|
10612
|
+
validate: validate$8,
|
|
10628
10613
|
variables
|
|
10629
10614
|
});
|
|
10630
10615
|
}
|
|
@@ -10652,7 +10637,7 @@ function getTooltip$1() {
|
|
|
10652
10637
|
* @param {string|void} value
|
|
10653
10638
|
* @returns {string|null}
|
|
10654
10639
|
*/
|
|
10655
|
-
const validate$
|
|
10640
|
+
const validate$8 = value => {
|
|
10656
10641
|
if (!value || value.startsWith('=')) {
|
|
10657
10642
|
return;
|
|
10658
10643
|
}
|
|
@@ -10743,7 +10728,7 @@ function Text(props) {
|
|
|
10743
10728
|
};
|
|
10744
10729
|
return FeelTemplatingEntry({
|
|
10745
10730
|
debounce,
|
|
10746
|
-
description: description$
|
|
10731
|
+
description: description$3,
|
|
10747
10732
|
element: field,
|
|
10748
10733
|
getValue,
|
|
10749
10734
|
id,
|
|
@@ -10753,7 +10738,7 @@ function Text(props) {
|
|
|
10753
10738
|
variables
|
|
10754
10739
|
});
|
|
10755
10740
|
}
|
|
10756
|
-
const description$
|
|
10741
|
+
const description$3 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
10757
10742
|
children: ["Supports markdown and templating.", ' ', jsxRuntime.jsx("a", {
|
|
10758
10743
|
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-text/",
|
|
10759
10744
|
target: "_blank",
|
|
@@ -10796,13 +10781,13 @@ function Content(props) {
|
|
|
10796
10781
|
};
|
|
10797
10782
|
return FeelTemplatingEntry({
|
|
10798
10783
|
debounce,
|
|
10799
|
-
description: description$
|
|
10784
|
+
description: description$2,
|
|
10800
10785
|
element: field,
|
|
10801
10786
|
getValue,
|
|
10802
10787
|
id,
|
|
10803
10788
|
label: 'Content',
|
|
10804
10789
|
hostLanguage: 'html',
|
|
10805
|
-
validate: validate$
|
|
10790
|
+
validate: validate$7,
|
|
10806
10791
|
setValue,
|
|
10807
10792
|
variables
|
|
10808
10793
|
});
|
|
@@ -10810,7 +10795,7 @@ function Content(props) {
|
|
|
10810
10795
|
|
|
10811
10796
|
// helpers //////////
|
|
10812
10797
|
|
|
10813
|
-
const description$
|
|
10798
|
+
const description$2 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
10814
10799
|
children: ["Supports HTML, styling, and templating. Styles are automatically scoped to the HTML component.", ' ', jsxRuntime.jsx("a", {
|
|
10815
10800
|
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-html/",
|
|
10816
10801
|
target: "_blank",
|
|
@@ -10823,7 +10808,7 @@ const description$3 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
|
10823
10808
|
* @param {string|void} value
|
|
10824
10809
|
* @returns {string|null}
|
|
10825
10810
|
*/
|
|
10826
|
-
const validate$
|
|
10811
|
+
const validate$7 = value => {
|
|
10827
10812
|
// allow empty state
|
|
10828
10813
|
if (typeof value !== 'string' || value === '') {
|
|
10829
10814
|
return null;
|
|
@@ -11662,7 +11647,7 @@ function InputValuesKey(props) {
|
|
|
11662
11647
|
id,
|
|
11663
11648
|
label: 'Input values key',
|
|
11664
11649
|
setValue,
|
|
11665
|
-
validate: validate$
|
|
11650
|
+
validate: validate$6
|
|
11666
11651
|
});
|
|
11667
11652
|
}
|
|
11668
11653
|
|
|
@@ -11672,7 +11657,7 @@ function InputValuesKey(props) {
|
|
|
11672
11657
|
* @param {string|void} value
|
|
11673
11658
|
* @returns {string|null}
|
|
11674
11659
|
*/
|
|
11675
|
-
const validate$
|
|
11660
|
+
const validate$6 = value => {
|
|
11676
11661
|
if (typeof value !== 'string' || value.length === 0) {
|
|
11677
11662
|
return 'Must not be empty.';
|
|
11678
11663
|
}
|
|
@@ -11698,7 +11683,14 @@ function StaticOptionsSourceEntry(props) {
|
|
|
11698
11683
|
editField(field, formJsViewer.OPTIONS_SOURCES_PATHS[formJsViewer.OPTIONS_SOURCES.STATIC], arrayAdd(values, values.length, entry));
|
|
11699
11684
|
};
|
|
11700
11685
|
const removeEntry = entry => {
|
|
11701
|
-
|
|
11686
|
+
if (field.defaultValue === entry.value) {
|
|
11687
|
+
editField(field, {
|
|
11688
|
+
values: minDash.without(values, entry),
|
|
11689
|
+
defaultValue: undefined
|
|
11690
|
+
});
|
|
11691
|
+
} else {
|
|
11692
|
+
editField(field, formJsViewer.OPTIONS_SOURCES_PATHS[formJsViewer.OPTIONS_SOURCES.STATIC], minDash.without(values, entry));
|
|
11693
|
+
}
|
|
11702
11694
|
};
|
|
11703
11695
|
const validateFactory = (key, getValue) => {
|
|
11704
11696
|
return value => {
|
|
@@ -11954,7 +11946,6 @@ function RepeatableEntry(props) {
|
|
|
11954
11946
|
path: ['nonCollapsedItems'],
|
|
11955
11947
|
label: 'Number of non-collapsing items',
|
|
11956
11948
|
min: 1,
|
|
11957
|
-
defaultValue: 5,
|
|
11958
11949
|
props
|
|
11959
11950
|
});
|
|
11960
11951
|
entries.push(nonCollapseItemsEntry);
|
|
@@ -12115,7 +12106,7 @@ function Source(props) {
|
|
|
12115
12106
|
setValue,
|
|
12116
12107
|
singleLine: true,
|
|
12117
12108
|
variables,
|
|
12118
|
-
validate: validate$
|
|
12109
|
+
validate: validate$5
|
|
12119
12110
|
});
|
|
12120
12111
|
}
|
|
12121
12112
|
|
|
@@ -12125,7 +12116,7 @@ function Source(props) {
|
|
|
12125
12116
|
* @param {string|void} value
|
|
12126
12117
|
* @returns {string|null}
|
|
12127
12118
|
*/
|
|
12128
|
-
const validate$
|
|
12119
|
+
const validate$5 = value => {
|
|
12129
12120
|
if (!minDash.isString(value) || value.length === 0) {
|
|
12130
12121
|
return 'Must not be empty.';
|
|
12131
12122
|
}
|
|
@@ -12229,7 +12220,7 @@ function RowCount(props) {
|
|
|
12229
12220
|
id,
|
|
12230
12221
|
getValue,
|
|
12231
12222
|
setValue,
|
|
12232
|
-
validate: validate$
|
|
12223
|
+
validate: validate$4
|
|
12233
12224
|
});
|
|
12234
12225
|
}
|
|
12235
12226
|
|
|
@@ -12239,7 +12230,7 @@ function RowCount(props) {
|
|
|
12239
12230
|
* @param {string|void} value
|
|
12240
12231
|
* @returns {string|null}
|
|
12241
12232
|
*/
|
|
12242
|
-
const validate$
|
|
12233
|
+
const validate$4 = value => {
|
|
12243
12234
|
if (minDash.isNil(value)) {
|
|
12244
12235
|
return null;
|
|
12245
12236
|
}
|
|
@@ -12413,7 +12404,7 @@ function ColumnsExpression(props) {
|
|
|
12413
12404
|
setValue,
|
|
12414
12405
|
singleLine: true,
|
|
12415
12406
|
variables,
|
|
12416
|
-
validate: validate$
|
|
12407
|
+
validate: validate$3
|
|
12417
12408
|
});
|
|
12418
12409
|
}
|
|
12419
12410
|
|
|
@@ -12423,7 +12414,7 @@ function ColumnsExpression(props) {
|
|
|
12423
12414
|
* @param {string|void} value
|
|
12424
12415
|
* @returns {string|null}
|
|
12425
12416
|
*/
|
|
12426
|
-
const validate$
|
|
12417
|
+
const validate$3 = value => {
|
|
12427
12418
|
if (!minDash.isString(value) || value.length === 0 || value === '=') {
|
|
12428
12419
|
return 'Must not be empty.';
|
|
12429
12420
|
}
|
|
@@ -12521,7 +12512,7 @@ function Key(props) {
|
|
|
12521
12512
|
id,
|
|
12522
12513
|
label: 'Key',
|
|
12523
12514
|
setValue,
|
|
12524
|
-
validate: validate$
|
|
12515
|
+
validate: validate$2
|
|
12525
12516
|
});
|
|
12526
12517
|
}
|
|
12527
12518
|
|
|
@@ -12531,7 +12522,7 @@ function Key(props) {
|
|
|
12531
12522
|
* @param {string|void} value
|
|
12532
12523
|
* @returns {string|null}
|
|
12533
12524
|
*/
|
|
12534
|
-
function validate$
|
|
12525
|
+
function validate$2(value) {
|
|
12535
12526
|
if (!minDash.isString(value) || value.length === 0) {
|
|
12536
12527
|
return 'Must not be empty.';
|
|
12537
12528
|
}
|
|
@@ -12669,13 +12660,13 @@ function Accept(props) {
|
|
|
12669
12660
|
singleLine: true,
|
|
12670
12661
|
setValue,
|
|
12671
12662
|
variables,
|
|
12672
|
-
description: description$
|
|
12663
|
+
description: description$1
|
|
12673
12664
|
});
|
|
12674
12665
|
}
|
|
12675
12666
|
|
|
12676
12667
|
// helpers //////////
|
|
12677
12668
|
|
|
12678
|
-
const description$
|
|
12669
|
+
const description$1 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12679
12670
|
children: ["A comma-separated list of", ' ', jsxRuntime.jsx("a", {
|
|
12680
12671
|
href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers",
|
|
12681
12672
|
target: "_blank",
|
|
@@ -12796,85 +12787,6 @@ function DocumentsDataSource(props) {
|
|
|
12796
12787
|
setValue,
|
|
12797
12788
|
variables,
|
|
12798
12789
|
tooltip,
|
|
12799
|
-
validate: validate$2
|
|
12800
|
-
});
|
|
12801
|
-
}
|
|
12802
|
-
|
|
12803
|
-
// helpers //////////
|
|
12804
|
-
|
|
12805
|
-
/**
|
|
12806
|
-
* @param {string|undefined} value
|
|
12807
|
-
* @returns {string|null}
|
|
12808
|
-
*/
|
|
12809
|
-
const validate$2 = value => {
|
|
12810
|
-
if (typeof value !== 'string' || value.length === 0) {
|
|
12811
|
-
return 'The document data source is required.';
|
|
12812
|
-
}
|
|
12813
|
-
};
|
|
12814
|
-
|
|
12815
|
-
function EndpointKeyEntry(props) {
|
|
12816
|
-
const {
|
|
12817
|
-
editField,
|
|
12818
|
-
field
|
|
12819
|
-
} = props;
|
|
12820
|
-
const entries = [];
|
|
12821
|
-
entries.push({
|
|
12822
|
-
id: 'endpointKey',
|
|
12823
|
-
component: EndpointKey,
|
|
12824
|
-
editField: editField,
|
|
12825
|
-
field: field,
|
|
12826
|
-
isEdited: isEdited$6,
|
|
12827
|
-
isDefaultVisible: field => field.type === 'documentPreview'
|
|
12828
|
-
});
|
|
12829
|
-
return entries;
|
|
12830
|
-
}
|
|
12831
|
-
function EndpointKey(props) {
|
|
12832
|
-
const {
|
|
12833
|
-
editField,
|
|
12834
|
-
field,
|
|
12835
|
-
id
|
|
12836
|
-
} = props;
|
|
12837
|
-
const debounce = useService('debounce');
|
|
12838
|
-
const variables = useVariables().map(name => ({
|
|
12839
|
-
name
|
|
12840
|
-
}));
|
|
12841
|
-
const path = ['endpointKey'];
|
|
12842
|
-
const getValue = () => {
|
|
12843
|
-
return minDash.get(field, path, '');
|
|
12844
|
-
};
|
|
12845
|
-
const setValue = value => {
|
|
12846
|
-
return editField(field, path, value);
|
|
12847
|
-
};
|
|
12848
|
-
const tooltip = jsxRuntime.jsxs("div", {
|
|
12849
|
-
children: [jsxRuntime.jsx("p", {
|
|
12850
|
-
children: "Enter a context key that generates a string with the API endpoint to download a document."
|
|
12851
|
-
}), jsxRuntime.jsxs("p", {
|
|
12852
|
-
children: ["The string must contain ", jsxRuntime.jsx("code", {
|
|
12853
|
-
children: '{ documentId }'
|
|
12854
|
-
}), ", which will be replaced with the document ID from the document\u2018s reference."]
|
|
12855
|
-
}), jsxRuntime.jsx("p", {
|
|
12856
|
-
children: "If you\u2018re using the Camunda Tasklist, this variable is automatically added to the context for you."
|
|
12857
|
-
}), jsxRuntime.jsxs("p", {
|
|
12858
|
-
children: ["For more details, see the", ' ', jsxRuntime.jsx("a", {
|
|
12859
|
-
href: "https://docs.camunda.io/docs/next/components/modeler/forms/form-element-library/forms-element-library-document-preview/",
|
|
12860
|
-
rel: "noopener noreferrer",
|
|
12861
|
-
target: "_blank",
|
|
12862
|
-
children: "Camunda documentation"
|
|
12863
|
-
})]
|
|
12864
|
-
})]
|
|
12865
|
-
});
|
|
12866
|
-
return FeelTemplatingEntry({
|
|
12867
|
-
debounce,
|
|
12868
|
-
element: field,
|
|
12869
|
-
getValue,
|
|
12870
|
-
id,
|
|
12871
|
-
label: 'Document URL',
|
|
12872
|
-
feel: 'required',
|
|
12873
|
-
singleLine: true,
|
|
12874
|
-
setValue,
|
|
12875
|
-
variables,
|
|
12876
|
-
description: description$1,
|
|
12877
|
-
tooltip,
|
|
12878
12790
|
validate: validate$1
|
|
12879
12791
|
});
|
|
12880
12792
|
}
|
|
@@ -12887,12 +12799,9 @@ function EndpointKey(props) {
|
|
|
12887
12799
|
*/
|
|
12888
12800
|
const validate$1 = value => {
|
|
12889
12801
|
if (typeof value !== 'string' || value.length === 0) {
|
|
12890
|
-
return 'The document
|
|
12802
|
+
return 'The document data source is required.';
|
|
12891
12803
|
}
|
|
12892
12804
|
};
|
|
12893
|
-
const description$1 = jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
12894
|
-
children: "Define an API URL for downloading a document"
|
|
12895
|
-
});
|
|
12896
12805
|
|
|
12897
12806
|
function MaxHeightEntry(props) {
|
|
12898
12807
|
const {
|
|
@@ -12996,13 +12905,9 @@ function GeneralGroup(field, editField, getService) {
|
|
|
12996
12905
|
editField
|
|
12997
12906
|
}), ...TextEntry({
|
|
12998
12907
|
field,
|
|
12999
|
-
editField,
|
|
13000
|
-
getService
|
|
13001
|
-
}), ...HtmlEntry({
|
|
12908
|
+
editField}), ...HtmlEntry({
|
|
13002
12909
|
field,
|
|
13003
|
-
editField,
|
|
13004
|
-
getService
|
|
13005
|
-
}), ...IFrameUrlEntry({
|
|
12910
|
+
editField}), ...IFrameUrlEntry({
|
|
13006
12911
|
field,
|
|
13007
12912
|
editField
|
|
13008
12913
|
}), ...IFrameHeightEntry({
|
|
@@ -13324,12 +13229,11 @@ function ValidationType(props) {
|
|
|
13324
13229
|
id,
|
|
13325
13230
|
onChange
|
|
13326
13231
|
} = props;
|
|
13327
|
-
|
|
13232
|
+
useService('debounce');
|
|
13328
13233
|
const setValue = validationType => {
|
|
13329
13234
|
onChange('validationType')(validationType || undefined);
|
|
13330
13235
|
};
|
|
13331
13236
|
return SelectEntry({
|
|
13332
|
-
debounce,
|
|
13333
13237
|
element: field,
|
|
13334
13238
|
getValue: getValue('validationType'),
|
|
13335
13239
|
id,
|
|
@@ -13679,21 +13583,6 @@ const TOOLTIP_TEXT = `"List of items" defines a constant, predefined set of form
|
|
|
13679
13583
|
"Expression" defines options that are populated from a FEEL expression.
|
|
13680
13584
|
`;
|
|
13681
13585
|
|
|
13682
|
-
function DownloadSettings(field, editField) {
|
|
13683
|
-
const entries = [...EndpointKeyEntry({
|
|
13684
|
-
field,
|
|
13685
|
-
editField
|
|
13686
|
-
})];
|
|
13687
|
-
if (!entries.length) {
|
|
13688
|
-
return null;
|
|
13689
|
-
}
|
|
13690
|
-
return {
|
|
13691
|
-
id: 'downloadSettings',
|
|
13692
|
-
label: 'Download settings',
|
|
13693
|
-
entries
|
|
13694
|
-
};
|
|
13695
|
-
}
|
|
13696
|
-
|
|
13697
13586
|
class PropertiesProvider {
|
|
13698
13587
|
constructor(propertiesPanel, injector) {
|
|
13699
13588
|
this._injector = injector;
|
|
@@ -13729,7 +13618,7 @@ class PropertiesProvider {
|
|
|
13729
13618
|
return groups;
|
|
13730
13619
|
}
|
|
13731
13620
|
const getService = (type, strict = true) => this._injector.get(type, strict);
|
|
13732
|
-
groups = [...groups, GeneralGroup(field, editField, getService),
|
|
13621
|
+
groups = [...groups, GeneralGroup(field, editField, getService), ...OptionsGroups(field, editField, getService), ...TableHeaderGroups(field, editField), SecurityAttributesGroup(field, editField), ConditionGroup(field, editField), LayoutGroup(field, editField), AppearanceGroup(field, editField), SerializationGroup(field, editField), ConstraintsGroup(field, editField), ValidationGroup(field, editField), CustomPropertiesGroup(field, editField)].filter(group => group != null);
|
|
13733
13622
|
this._filterVisibleEntries(groups, field, getService);
|
|
13734
13623
|
|
|
13735
13624
|
// contract: if a group has no entries or items, it should not be displayed at all
|