@bpmn-io/form-js-editor 1.10.0 → 1.11.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +120 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +120 -12
- package/dist/index.es.js.map +1 -1
- package/dist/types/features/properties-panel/entries/AcceptEntry.d.ts +10 -0
- package/dist/types/features/properties-panel/entries/MultipleEntry.d.ts +10 -0
- package/dist/types/features/properties-panel/entries/index.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -8985,7 +8985,7 @@ function isProhibitedPath(path) {
|
|
|
8985
8985
|
return path.split('.').some(segment => prohibitedSegments.includes(segment));
|
|
8986
8986
|
}
|
|
8987
8987
|
const LABELED_NON_INPUTS = ['button', 'group', 'dynamiclist', 'iframe', 'table'];
|
|
8988
|
-
const INPUTS = ['checkbox', 'checklist', 'datetime', 'number', 'radio', 'select', 'taglist', 'textfield', 'textarea'];
|
|
8988
|
+
const INPUTS = ['checkbox', 'checklist', 'datetime', 'number', 'radio', 'select', 'taglist', 'textfield', 'textarea', 'filepicker'];
|
|
8989
8989
|
const OPTIONS_INPUTS = ['checklist', 'radio', 'select', 'taglist'];
|
|
8990
8990
|
function hasEntryConfigured(formFieldDefinition, entryId) {
|
|
8991
8991
|
const {
|
|
@@ -9478,7 +9478,7 @@ function DescriptionEntry(props) {
|
|
|
9478
9478
|
editField: editField,
|
|
9479
9479
|
field: field,
|
|
9480
9480
|
isEdited: isEdited$6,
|
|
9481
|
-
isDefaultVisible: field => INPUTS.includes(field.type)
|
|
9481
|
+
isDefaultVisible: field => field.type !== 'filepicker' && INPUTS.includes(field.type)
|
|
9482
9482
|
});
|
|
9483
9483
|
return entries;
|
|
9484
9484
|
}
|
|
@@ -9530,26 +9530,26 @@ function DefaultValueEntry(props) {
|
|
|
9530
9530
|
return matchers(field);
|
|
9531
9531
|
};
|
|
9532
9532
|
}
|
|
9533
|
-
const
|
|
9533
|
+
const defaultValueBase = {
|
|
9534
9534
|
editField,
|
|
9535
9535
|
field,
|
|
9536
9536
|
id: 'defaultValue',
|
|
9537
9537
|
label: 'Default value'
|
|
9538
9538
|
};
|
|
9539
9539
|
entries.push({
|
|
9540
|
-
...
|
|
9540
|
+
...defaultValueBase,
|
|
9541
9541
|
component: DefaultValueCheckbox,
|
|
9542
9542
|
isEdited: isEdited$3,
|
|
9543
9543
|
isDefaultVisible: isDefaultVisible(field => field.type === 'checkbox')
|
|
9544
9544
|
});
|
|
9545
9545
|
entries.push({
|
|
9546
|
-
...
|
|
9546
|
+
...defaultValueBase,
|
|
9547
9547
|
component: DefaultValueNumber,
|
|
9548
9548
|
isEdited: isEdited,
|
|
9549
9549
|
isDefaultVisible: isDefaultVisible(field => field.type === 'number')
|
|
9550
9550
|
});
|
|
9551
9551
|
entries.push({
|
|
9552
|
-
...
|
|
9552
|
+
...defaultValueBase,
|
|
9553
9553
|
component: DefaultValueSingleSelect,
|
|
9554
9554
|
isEdited: isEdited$3,
|
|
9555
9555
|
isDefaultVisible: isDefaultVisible(field => field.type === 'radio' || field.type === 'select')
|
|
@@ -9558,13 +9558,13 @@ function DefaultValueEntry(props) {
|
|
|
9558
9558
|
// todo(Skaiir): implement a multiselect equivalent (cf. https://github.com/bpmn-io/form-js/issues/265)
|
|
9559
9559
|
|
|
9560
9560
|
entries.push({
|
|
9561
|
-
...
|
|
9561
|
+
...defaultValueBase,
|
|
9562
9562
|
component: DefaultValueTextfield,
|
|
9563
9563
|
isEdited: isEdited,
|
|
9564
9564
|
isDefaultVisible: isDefaultVisible(field => field.type === 'textfield')
|
|
9565
9565
|
});
|
|
9566
9566
|
entries.push({
|
|
9567
|
-
...
|
|
9567
|
+
...defaultValueBase,
|
|
9568
9568
|
component: DefaultValueTextarea,
|
|
9569
9569
|
isEdited: isEdited$1,
|
|
9570
9570
|
isDefaultVisible: isDefaultVisible(field => field.type === 'textarea')
|
|
@@ -10646,7 +10646,7 @@ function Text(props) {
|
|
|
10646
10646
|
};
|
|
10647
10647
|
return FeelTemplatingEntry({
|
|
10648
10648
|
debounce,
|
|
10649
|
-
description: description$
|
|
10649
|
+
description: description$2,
|
|
10650
10650
|
element: field,
|
|
10651
10651
|
getValue,
|
|
10652
10652
|
id,
|
|
@@ -10656,7 +10656,7 @@ function Text(props) {
|
|
|
10656
10656
|
variables
|
|
10657
10657
|
});
|
|
10658
10658
|
}
|
|
10659
|
-
const description$
|
|
10659
|
+
const description$2 = jsxs(Fragment$1, {
|
|
10660
10660
|
children: ["Supports markdown and templating.", ' ', jsx("a", {
|
|
10661
10661
|
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-text/",
|
|
10662
10662
|
target: "_blank",
|
|
@@ -10698,7 +10698,7 @@ function Content(props) {
|
|
|
10698
10698
|
};
|
|
10699
10699
|
return FeelTemplatingEntry({
|
|
10700
10700
|
debounce,
|
|
10701
|
-
description,
|
|
10701
|
+
description: description$1,
|
|
10702
10702
|
element: field,
|
|
10703
10703
|
getValue,
|
|
10704
10704
|
id,
|
|
@@ -10712,7 +10712,7 @@ function Content(props) {
|
|
|
10712
10712
|
|
|
10713
10713
|
// helpers //////////
|
|
10714
10714
|
|
|
10715
|
-
const description = jsxs(Fragment$1, {
|
|
10715
|
+
const description$1 = jsxs(Fragment$1, {
|
|
10716
10716
|
children: ["Supports HTML, styling, and templating. Styles are automatically scoped to the HTML component.", ' ', jsx("a", {
|
|
10717
10717
|
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-html/",
|
|
10718
10718
|
target: "_blank",
|
|
@@ -12528,6 +12528,108 @@ function VersionTag(props) {
|
|
|
12528
12528
|
});
|
|
12529
12529
|
}
|
|
12530
12530
|
|
|
12531
|
+
function AcceptEntry(props) {
|
|
12532
|
+
const {
|
|
12533
|
+
editField,
|
|
12534
|
+
field
|
|
12535
|
+
} = props;
|
|
12536
|
+
const entries = [];
|
|
12537
|
+
entries.push({
|
|
12538
|
+
id: 'accept',
|
|
12539
|
+
component: Accept,
|
|
12540
|
+
editField: editField,
|
|
12541
|
+
field: field,
|
|
12542
|
+
isEdited: isEdited$6,
|
|
12543
|
+
isDefaultVisible: field => field.type === 'filepicker'
|
|
12544
|
+
});
|
|
12545
|
+
return entries;
|
|
12546
|
+
}
|
|
12547
|
+
function Accept(props) {
|
|
12548
|
+
const {
|
|
12549
|
+
editField,
|
|
12550
|
+
field,
|
|
12551
|
+
id
|
|
12552
|
+
} = props;
|
|
12553
|
+
const debounce = useService('debounce');
|
|
12554
|
+
const variables = useVariables().map(name => ({
|
|
12555
|
+
name
|
|
12556
|
+
}));
|
|
12557
|
+
const path = ['accept'];
|
|
12558
|
+
const getValue = () => {
|
|
12559
|
+
return get(field, path, '');
|
|
12560
|
+
};
|
|
12561
|
+
const setValue = value => {
|
|
12562
|
+
return editField(field, path, value);
|
|
12563
|
+
};
|
|
12564
|
+
return FeelTemplatingEntry({
|
|
12565
|
+
debounce,
|
|
12566
|
+
element: field,
|
|
12567
|
+
getValue,
|
|
12568
|
+
id,
|
|
12569
|
+
label: 'Supported file formats',
|
|
12570
|
+
singleLine: true,
|
|
12571
|
+
setValue,
|
|
12572
|
+
variables,
|
|
12573
|
+
description
|
|
12574
|
+
});
|
|
12575
|
+
}
|
|
12576
|
+
|
|
12577
|
+
// helpers //////////
|
|
12578
|
+
|
|
12579
|
+
const description = jsxs(Fragment$1, {
|
|
12580
|
+
children: ["A comma-separated list of", ' ', jsx("a", {
|
|
12581
|
+
href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers",
|
|
12582
|
+
target: "_blank",
|
|
12583
|
+
children: "file type specifiers"
|
|
12584
|
+
})]
|
|
12585
|
+
});
|
|
12586
|
+
|
|
12587
|
+
function MultipleEntry(props) {
|
|
12588
|
+
const {
|
|
12589
|
+
editField,
|
|
12590
|
+
field
|
|
12591
|
+
} = props;
|
|
12592
|
+
const entries = [];
|
|
12593
|
+
entries.push({
|
|
12594
|
+
id: 'multiple',
|
|
12595
|
+
component: Multiple,
|
|
12596
|
+
editField: editField,
|
|
12597
|
+
field: field,
|
|
12598
|
+
isEdited: isEdited$6,
|
|
12599
|
+
isDefaultVisible: field => field.type === 'filepicker'
|
|
12600
|
+
});
|
|
12601
|
+
return entries;
|
|
12602
|
+
}
|
|
12603
|
+
function Multiple(props) {
|
|
12604
|
+
const {
|
|
12605
|
+
editField,
|
|
12606
|
+
field,
|
|
12607
|
+
id
|
|
12608
|
+
} = props;
|
|
12609
|
+
const debounce = useService('debounce');
|
|
12610
|
+
const variables = useVariables().map(name => ({
|
|
12611
|
+
name
|
|
12612
|
+
}));
|
|
12613
|
+
const path = ['multiple'];
|
|
12614
|
+
const getValue = () => {
|
|
12615
|
+
return get(field, path, '');
|
|
12616
|
+
};
|
|
12617
|
+
const setValue = value => {
|
|
12618
|
+
return editField(field, path, value);
|
|
12619
|
+
};
|
|
12620
|
+
return FeelToggleSwitchEntry({
|
|
12621
|
+
debounce,
|
|
12622
|
+
element: field,
|
|
12623
|
+
feel: 'optional',
|
|
12624
|
+
getValue,
|
|
12625
|
+
id,
|
|
12626
|
+
label: 'Select multiple files',
|
|
12627
|
+
inline: true,
|
|
12628
|
+
setValue,
|
|
12629
|
+
variables
|
|
12630
|
+
});
|
|
12631
|
+
}
|
|
12632
|
+
|
|
12531
12633
|
function GeneralGroup(field, editField, getService) {
|
|
12532
12634
|
const entries = [...IdEntry({
|
|
12533
12635
|
field,
|
|
@@ -12594,6 +12696,12 @@ function GeneralGroup(field, editField, getService) {
|
|
|
12594
12696
|
}), ...SelectEntries({
|
|
12595
12697
|
field,
|
|
12596
12698
|
editField
|
|
12699
|
+
}), ...AcceptEntry({
|
|
12700
|
+
field,
|
|
12701
|
+
editField
|
|
12702
|
+
}), ...MultipleEntry({
|
|
12703
|
+
field,
|
|
12704
|
+
editField
|
|
12597
12705
|
}), ...DisabledEntry({
|
|
12598
12706
|
field,
|
|
12599
12707
|
editField
|