@bpmn-io/properties-panel 3.35.1 → 3.36.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/properties-panel.css +6 -0
- package/dist/index.esm.js +68 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1532,3 +1532,9 @@ textarea.bio-properties-panel-input {
|
|
|
1532
1532
|
.bio-properties-panel-feel-popup .cm-gutters .cm-lineNumbers .cm-gutterElement {
|
|
1533
1533
|
text-align: center;
|
|
1534
1534
|
}
|
|
1535
|
+
|
|
1536
|
+
/* Checkbox Group */
|
|
1537
|
+
.bio-properties-panel-checkbox-group .bio-properties-panel-checkbox-group-entries > .bio-properties-panel-entry {
|
|
1538
|
+
margin: 0;
|
|
1539
|
+
padding: 0;
|
|
1540
|
+
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1687,6 +1687,73 @@ function prefixId$8(id) {
|
|
|
1687
1687
|
return `bio-properties-panel-${id}`;
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
|
+
/**
|
|
1691
|
+
* @param {Object} props
|
|
1692
|
+
* @param {Object} props.element
|
|
1693
|
+
* @param {String} props.id
|
|
1694
|
+
* @param {String} props.label
|
|
1695
|
+
* @param {Array<{label: String, value: *}>} props.options
|
|
1696
|
+
* @param {Function} props.getValue
|
|
1697
|
+
* @param {Function} props.setValue
|
|
1698
|
+
* @param {String} [props.description]
|
|
1699
|
+
* @param {string|import('preact').Component} [props.tooltip]
|
|
1700
|
+
* @param {boolean} [props.disabled]
|
|
1701
|
+
* @param {Function} [props.onFocus]
|
|
1702
|
+
* @param {Function} [props.onBlur]
|
|
1703
|
+
*/
|
|
1704
|
+
function CheckboxGroup(props) {
|
|
1705
|
+
const {
|
|
1706
|
+
element,
|
|
1707
|
+
id,
|
|
1708
|
+
label,
|
|
1709
|
+
description,
|
|
1710
|
+
tooltip,
|
|
1711
|
+
options = [],
|
|
1712
|
+
getValue,
|
|
1713
|
+
setValue,
|
|
1714
|
+
disabled,
|
|
1715
|
+
onFocus,
|
|
1716
|
+
onBlur
|
|
1717
|
+
} = props;
|
|
1718
|
+
const value = getValue(element) || [];
|
|
1719
|
+
const handleOptionChange = (optionValue, checked) => {
|
|
1720
|
+
const newValue = checked ? [...value, optionValue] : value.filter(v => v !== optionValue);
|
|
1721
|
+
setValue(newValue);
|
|
1722
|
+
};
|
|
1723
|
+
return jsxs("div", {
|
|
1724
|
+
class: "bio-properties-panel-entry bio-properties-panel-checkbox-group",
|
|
1725
|
+
"data-entry-id": id,
|
|
1726
|
+
children: [jsx("div", {
|
|
1727
|
+
class: "bio-properties-panel-group-header",
|
|
1728
|
+
children: jsx("p", {
|
|
1729
|
+
class: "bio-properties-panel-label",
|
|
1730
|
+
children: jsx(TooltipWrapper, {
|
|
1731
|
+
value: tooltip,
|
|
1732
|
+
forId: id,
|
|
1733
|
+
element: element,
|
|
1734
|
+
children: label
|
|
1735
|
+
})
|
|
1736
|
+
})
|
|
1737
|
+
}), jsx("div", {
|
|
1738
|
+
class: "bio-properties-panel-checkbox-group-entries",
|
|
1739
|
+
children: options.map(option => jsx(CheckboxEntry, {
|
|
1740
|
+
id: `${id}-${option.value}`,
|
|
1741
|
+
label: option.label,
|
|
1742
|
+
setValue: checked => handleOptionChange(option.value, checked),
|
|
1743
|
+
getValue: () => value.includes(option.value),
|
|
1744
|
+
disabled: disabled,
|
|
1745
|
+
onFocus: onFocus,
|
|
1746
|
+
onBlur: onBlur,
|
|
1747
|
+
element: element
|
|
1748
|
+
}, option.value))
|
|
1749
|
+
}), jsx(Description, {
|
|
1750
|
+
forId: id,
|
|
1751
|
+
element: element,
|
|
1752
|
+
value: description
|
|
1753
|
+
})]
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1690
1757
|
/**
|
|
1691
1758
|
* Button to open popups.
|
|
1692
1759
|
*
|
|
@@ -4692,5 +4759,5 @@ var index = {
|
|
|
4692
4759
|
feelPopupRenderer: ['type', FeelPopupRenderer]
|
|
4693
4760
|
};
|
|
4694
4761
|
|
|
4695
|
-
export { ArrowIcon, CheckboxEntry, CloseIcon, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelLanguageContext, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, LaunchIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, OpenPopupIcon, Placeholder, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$8 as isCheckboxEntryEdited, isEdited$5 as isFeelEntryEdited, isEdited$6 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$7 as isToggleSwitchEntryEdited, useDebounce, useDescriptionContext, useElementVisible, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
|
|
4762
|
+
export { ArrowIcon, CheckboxEntry, CheckboxGroup, CloseIcon, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelLanguageContext, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, LaunchIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, OpenPopupIcon, Placeholder, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$8 as isCheckboxEntryEdited, isEdited$5 as isFeelEntryEdited, isEdited$6 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$7 as isToggleSwitchEntryEdited, useDebounce, useDescriptionContext, useElementVisible, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
|
|
4696
4763
|
//# sourceMappingURL=index.esm.js.map
|