@bpmn-io/form-js-viewer 1.7.2 → 1.7.3
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/LICENSE +22 -22
- package/README.md +189 -189
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +15 -15
- package/dist/index.es.js.map +1 -1
- package/dist/types/types.d.ts +35 -35
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -6624,9 +6624,9 @@ class RepeatRenderManager {
|
|
|
6624
6624
|
};
|
|
6625
6625
|
const parentExpressionContextInfo = useContext(LocalExpressionContext);
|
|
6626
6626
|
return jsx(Fragment, {
|
|
6627
|
-
children: displayValues.map((
|
|
6628
|
-
|
|
6629
|
-
|
|
6627
|
+
children: displayValues.map((itemValue, itemIndex) => jsx(RepetitionScaffold, {
|
|
6628
|
+
itemIndex: itemIndex,
|
|
6629
|
+
itemValue: itemValue,
|
|
6630
6630
|
parentExpressionContextInfo: parentExpressionContextInfo,
|
|
6631
6631
|
repeaterField: repeaterField,
|
|
6632
6632
|
RowsRenderer: RowsRenderer,
|
|
@@ -6634,7 +6634,7 @@ class RepeatRenderManager {
|
|
|
6634
6634
|
onDeleteItem: onDeleteItem,
|
|
6635
6635
|
showRemove: showRemove,
|
|
6636
6636
|
...restProps
|
|
6637
|
-
},
|
|
6637
|
+
}, itemIndex))
|
|
6638
6638
|
});
|
|
6639
6639
|
}
|
|
6640
6640
|
RepeatFooter(props) {
|
|
@@ -6731,8 +6731,8 @@ class RepeatRenderManager {
|
|
|
6731
6731
|
* Individual repetition of a repeated field and context scaffolding.
|
|
6732
6732
|
*
|
|
6733
6733
|
* @param {Object} props
|
|
6734
|
-
* @param {number} props.
|
|
6735
|
-
* @param {Object} props.
|
|
6734
|
+
* @param {number} props.itemIndex
|
|
6735
|
+
* @param {Object} props.itemValue
|
|
6736
6736
|
* @param {Object} props.parentExpressionContextInfo
|
|
6737
6737
|
* @param {Object} props.repeaterField
|
|
6738
6738
|
* @param {Function} props.RowsRenderer
|
|
@@ -6743,8 +6743,8 @@ class RepeatRenderManager {
|
|
|
6743
6743
|
|
|
6744
6744
|
const RepetitionScaffold = props => {
|
|
6745
6745
|
const {
|
|
6746
|
-
|
|
6747
|
-
|
|
6746
|
+
itemIndex,
|
|
6747
|
+
itemValue,
|
|
6748
6748
|
parentExpressionContextInfo,
|
|
6749
6749
|
repeaterField,
|
|
6750
6750
|
RowsRenderer,
|
|
@@ -6757,15 +6757,15 @@ const RepetitionScaffold = props => {
|
|
|
6757
6757
|
...restProps,
|
|
6758
6758
|
indexes: {
|
|
6759
6759
|
...(indexes || {}),
|
|
6760
|
-
[repeaterField.id]:
|
|
6760
|
+
[repeaterField.id]: itemIndex
|
|
6761
6761
|
}
|
|
6762
|
-
}), [
|
|
6762
|
+
}), [itemIndex, indexes, repeaterField.id, restProps]);
|
|
6763
6763
|
const localExpressionContextInfo = useMemo(() => ({
|
|
6764
6764
|
data: parentExpressionContextInfo.data,
|
|
6765
|
-
this:
|
|
6765
|
+
this: itemValue,
|
|
6766
6766
|
parent: buildExpressionContext(parentExpressionContextInfo),
|
|
6767
|
-
i: [...parentExpressionContextInfo.i,
|
|
6768
|
-
}), [
|
|
6767
|
+
i: [...parentExpressionContextInfo.i, itemIndex + 1]
|
|
6768
|
+
}), [itemIndex, parentExpressionContextInfo, itemValue]);
|
|
6769
6769
|
return !showRemove ? jsx(LocalExpressionContext.Provider, {
|
|
6770
6770
|
value: localExpressionContextInfo,
|
|
6771
6771
|
children: jsx(RowsRenderer, {
|
|
@@ -6784,8 +6784,8 @@ const RepetitionScaffold = props => {
|
|
|
6784
6784
|
}), jsx("button", {
|
|
6785
6785
|
type: "button",
|
|
6786
6786
|
class: "fjs-repeat-row-remove",
|
|
6787
|
-
"aria-label": `Remove list item ${
|
|
6788
|
-
onClick: () => onDeleteItem(
|
|
6787
|
+
"aria-label": `Remove list item ${itemIndex + 1}`,
|
|
6788
|
+
onClick: () => onDeleteItem(itemIndex),
|
|
6789
6789
|
children: jsx("div", {
|
|
6790
6790
|
class: "fjs-repeat-row-remove-icon-container",
|
|
6791
6791
|
children: jsx(DeleteSvg, {})
|