@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/LICENSE CHANGED
@@ -1,23 +1,23 @@
1
- Copyright (c) 2021-present Camunda Services GmbH
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- this software and associated documentation files (the "Software"), to deal in the
5
- Software without restriction, including without limitation the rights to use, copy,
6
- modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7
- and to permit persons to whom the Software is furnished to do so, subject to the
8
- following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- The source code responsible for displaying the bpmn.io project watermark that
14
- links back to https://bpmn.io as part of rendered diagrams MUST NOT be
15
- removed or changed. When this software is being used in a website or application,
16
- the watermark must stay fully visible and not visually overlapped by other elements.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19
- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
20
- PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
1
+ Copyright (c) 2021-present Camunda Services GmbH
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in the
5
+ Software without restriction, including without limitation the rights to use, copy,
6
+ modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7
+ and to permit persons to whom the Software is furnished to do so, subject to the
8
+ following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ The source code responsible for displaying the bpmn.io project watermark that
14
+ links back to https://bpmn.io as part of rendered diagrams MUST NOT be
15
+ removed or changed. When this software is being used in a website or application,
16
+ the watermark must stay fully visible and not visually overlapped by other elements.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
20
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
23
  OR OTHER DEALINGS IN THE SOFTWARE.
package/dist/index.cjs CHANGED
@@ -602,40 +602,6 @@ function prefixId(id, formId, indexes) {
602
602
  return result;
603
603
  }
604
604
 
605
- const type$h = 'button';
606
- function Button(props) {
607
- const {
608
- disabled,
609
- onFocus,
610
- onBlur,
611
- field
612
- } = props;
613
- const {
614
- action = 'submit'
615
- } = field;
616
- return jsxRuntime.jsx("div", {
617
- class: formFieldClasses(type$h),
618
- children: jsxRuntime.jsx("button", {
619
- class: "fjs-button",
620
- type: action,
621
- disabled: disabled,
622
- onFocus: () => onFocus && onFocus(),
623
- onBlur: () => onBlur && onBlur(),
624
- children: field.label
625
- })
626
- });
627
- }
628
- Button.config = {
629
- type: type$h,
630
- keyed: false,
631
- label: 'Button',
632
- group: 'action',
633
- create: (options = {}) => ({
634
- action: 'submit',
635
- ...options
636
- })
637
- };
638
-
639
605
  const FormRenderContext = preact.createContext({
640
606
  Empty: props => {
641
607
  return null;
@@ -1709,6 +1675,43 @@ function useCleanupMultiSelectValue(props) {
1709
1675
  }, [field, options, onChange, memoizedValues, loadState]);
1710
1676
  }
1711
1677
 
1678
+ const type$h = 'button';
1679
+ function Button(props) {
1680
+ const {
1681
+ disabled,
1682
+ onFocus,
1683
+ onBlur,
1684
+ field
1685
+ } = props;
1686
+ const {
1687
+ action = 'submit'
1688
+ } = field;
1689
+ const evaluatedLabel = useSingleLineTemplateEvaluation(field.label || '', {
1690
+ debug: true
1691
+ });
1692
+ return jsxRuntime.jsx("div", {
1693
+ class: formFieldClasses(type$h),
1694
+ children: jsxRuntime.jsx("button", {
1695
+ class: "fjs-button",
1696
+ type: action,
1697
+ disabled: disabled,
1698
+ onFocus: () => onFocus && onFocus(),
1699
+ onBlur: () => onBlur && onBlur(),
1700
+ children: evaluatedLabel
1701
+ })
1702
+ });
1703
+ }
1704
+ Button.config = {
1705
+ type: type$h,
1706
+ keyed: false,
1707
+ label: 'Button',
1708
+ group: 'action',
1709
+ create: (options = {}) => ({
1710
+ action: 'submit',
1711
+ ...options
1712
+ })
1713
+ };
1714
+
1712
1715
  function Description(props) {
1713
1716
  const {
1714
1717
  description,
@@ -5744,7 +5747,7 @@ class FormFields {
5744
5747
  }
5745
5748
  }
5746
5749
 
5747
- 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'];
5750
+ 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'];
5748
5751
  const TEMPLATE_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'description', 'label', 'source', 'text', 'content', 'url'];
5749
5752
 
5750
5753
  /**
@@ -6953,7 +6956,10 @@ const RepetitionScaffold = props => {
6953
6956
  const localExpressionContextInfo = hooks.useMemo(() => ({
6954
6957
  data: parentExpressionContextInfo.data,
6955
6958
  this: itemValue,
6956
- parent: buildExpressionContext(parentExpressionContextInfo),
6959
+ parent: buildExpressionContext({
6960
+ ...parentExpressionContextInfo,
6961
+ data: parentExpressionContextInfo.this
6962
+ }),
6957
6963
  i: [...parentExpressionContextInfo.i, itemIndex + 1]
6958
6964
  }), [itemIndex, parentExpressionContextInfo, itemValue]);
6959
6965
  return !showRemove ? jsxRuntime.jsx(LocalExpressionContext.Provider, {
@@ -7865,13 +7871,11 @@ class FieldFactory {
7865
7871
  if (config.repeatable) {
7866
7872
  this._enforceDefaultPath(field);
7867
7873
  }
7868
- if (field.path) {
7869
- this._pathRegistry.claimPath(this._pathRegistry.getValuePath(field), {
7870
- isRepeatable: config.repeatable,
7871
- claimerId: field.id,
7872
- knownAncestorIds: getAncestryList(_parent, this._formFieldRegistry)
7873
- });
7874
- }
7874
+ this._pathRegistry.claimPath(this._pathRegistry.getValuePath(field), {
7875
+ isRepeatable: config.repeatable,
7876
+ claimerId: field.id,
7877
+ knownAncestorIds: getAncestryList(_parent, this._formFieldRegistry)
7878
+ });
7875
7879
  }
7876
7880
  return field;
7877
7881
  }