@bpmn-io/form-js-viewer 1.8.7 → 1.8.8

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.es.js CHANGED
@@ -582,40 +582,6 @@ function prefixId(id, formId, indexes) {
582
582
  return result;
583
583
  }
584
584
 
585
- const type$h = 'button';
586
- function Button(props) {
587
- const {
588
- disabled,
589
- onFocus,
590
- onBlur,
591
- field
592
- } = props;
593
- const {
594
- action = 'submit'
595
- } = field;
596
- return jsx("div", {
597
- class: formFieldClasses(type$h),
598
- children: jsx("button", {
599
- class: "fjs-button",
600
- type: action,
601
- disabled: disabled,
602
- onFocus: () => onFocus && onFocus(),
603
- onBlur: () => onBlur && onBlur(),
604
- children: field.label
605
- })
606
- });
607
- }
608
- Button.config = {
609
- type: type$h,
610
- keyed: false,
611
- label: 'Button',
612
- group: 'action',
613
- create: (options = {}) => ({
614
- action: 'submit',
615
- ...options
616
- })
617
- };
618
-
619
585
  const FormRenderContext = createContext({
620
586
  Empty: props => {
621
587
  return null;
@@ -1689,6 +1655,43 @@ function useCleanupMultiSelectValue(props) {
1689
1655
  }, [field, options, onChange, memoizedValues, loadState]);
1690
1656
  }
1691
1657
 
1658
+ const type$h = 'button';
1659
+ function Button(props) {
1660
+ const {
1661
+ disabled,
1662
+ onFocus,
1663
+ onBlur,
1664
+ field
1665
+ } = props;
1666
+ const {
1667
+ action = 'submit'
1668
+ } = field;
1669
+ const evaluatedLabel = useSingleLineTemplateEvaluation(field.label || '', {
1670
+ debug: true
1671
+ });
1672
+ return jsx("div", {
1673
+ class: formFieldClasses(type$h),
1674
+ children: jsx("button", {
1675
+ class: "fjs-button",
1676
+ type: action,
1677
+ disabled: disabled,
1678
+ onFocus: () => onFocus && onFocus(),
1679
+ onBlur: () => onBlur && onBlur(),
1680
+ children: evaluatedLabel
1681
+ })
1682
+ });
1683
+ }
1684
+ Button.config = {
1685
+ type: type$h,
1686
+ keyed: false,
1687
+ label: 'Button',
1688
+ group: 'action',
1689
+ create: (options = {}) => ({
1690
+ action: 'submit',
1691
+ ...options
1692
+ })
1693
+ };
1694
+
1692
1695
  function Description(props) {
1693
1696
  const {
1694
1697
  description,
@@ -5724,7 +5727,7 @@ class FormFields {
5724
5727
  }
5725
5728
  }
5726
5729
 
5727
- const EXPRESSION_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'conditional.hide', 'description', 'label', 'source', 'readonly', 'text', 'validate.min', 'validate.max', 'validate.minLength', 'validate.maxLength', 'valuesExpression', 'url', 'dataSource', 'columnsExpression'];
5730
+ const EXPRESSION_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'conditional.hide', 'description', 'label', 'source', 'readonly', 'text', 'validate.min', 'validate.max', 'validate.minLength', 'validate.maxLength', 'valuesExpression', 'url', 'dataSource', 'columnsExpression', 'expression'];
5728
5731
  const TEMPLATE_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'description', 'label', 'source', 'text', 'content', 'url'];
5729
5732
 
5730
5733
  /**
@@ -6933,7 +6936,10 @@ const RepetitionScaffold = props => {
6933
6936
  const localExpressionContextInfo = useMemo(() => ({
6934
6937
  data: parentExpressionContextInfo.data,
6935
6938
  this: itemValue,
6936
- parent: buildExpressionContext(parentExpressionContextInfo),
6939
+ parent: buildExpressionContext({
6940
+ ...parentExpressionContextInfo,
6941
+ data: parentExpressionContextInfo.this
6942
+ }),
6937
6943
  i: [...parentExpressionContextInfo.i, itemIndex + 1]
6938
6944
  }), [itemIndex, parentExpressionContextInfo, itemValue]);
6939
6945
  return !showRemove ? jsx(LocalExpressionContext.Provider, {
@@ -7845,13 +7851,11 @@ class FieldFactory {
7845
7851
  if (config.repeatable) {
7846
7852
  this._enforceDefaultPath(field);
7847
7853
  }
7848
- if (field.path) {
7849
- this._pathRegistry.claimPath(this._pathRegistry.getValuePath(field), {
7850
- isRepeatable: config.repeatable,
7851
- claimerId: field.id,
7852
- knownAncestorIds: getAncestryList(_parent, this._formFieldRegistry)
7853
- });
7854
- }
7854
+ this._pathRegistry.claimPath(this._pathRegistry.getValuePath(field), {
7855
+ isRepeatable: config.repeatable,
7856
+ claimerId: field.id,
7857
+ knownAncestorIds: getAncestryList(_parent, this._formFieldRegistry)
7858
+ });
7855
7859
  }
7856
7860
  return field;
7857
7861
  }