@bpmn-io/form-js-editor 1.13.2 → 1.14.1-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.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Ids from 'ids';
2
- import { FormFieldRegistry as FormFieldRegistry$1, iconsByType, Label as Label$3, IFrame, Text as Text$1, Html, Table, ExpressionField, DocumentPreview, FormFields, sanitizeImageSource, getAncestryList, FormContext, FormRenderContext, FormComponent, getScrollContainer, Importer, PathRegistry, FormLayouter, FieldFactory, FeelExpressionLanguage, OPTIONS_SOURCES, OPTIONS_SOURCES_PATHS, clone, runRecursively, getSchemaVariables, DATETIME_SUBTYPES, DATE_LABEL_PATH, TIME_LABEL_PATH, DATETIME_SUBTYPE_PATH, DATETIME_SUBTYPES_LABELS, TIME_SERIALISING_FORMAT_PATH, TIME_SERIALISING_FORMATS, TIME_INTERVAL_PATH, TIME_USE24H_PATH, DATE_DISALLOW_PAST_PATH, TIME_SERIALISINGFORMAT_LABELS, getOptionsSource, OPTIONS_SOURCES_DEFAULTS, OPTIONS_SOURCES_LABELS, SECURITY_ATTRIBUTES_DEFINITIONS, createFormContainer, createInjector, MarkdownRendererModule, schemaVersion } from '@bpmn-io/form-js-viewer';
2
+ import { FormFieldRegistry as FormFieldRegistry$1, iconsByType, Label as Label$3, IFrame, Text as Text$1, Html, Table, ExpressionField, DocumentPreview, FormFields, sanitizeImageSource, getAncestryList, FormContext, FormRenderContext, FormComponent, getScrollContainer, FieldFactory, FormLayouter, PathRegistry, Importer, FeelExpressionLanguage, OPTIONS_SOURCES, OPTIONS_SOURCES_PATHS, clone, runRecursively, getSchemaVariables, DATETIME_SUBTYPES, DATE_LABEL_PATH, TIME_LABEL_PATH, TIME_USE24H_PATH, DATETIME_SUBTYPE_PATH, DATETIME_SUBTYPES_LABELS, TIME_INTERVAL_PATH, TIME_SERIALISING_FORMAT_PATH, DATE_DISALLOW_PAST_PATH, TIME_SERIALISING_FORMATS, TIME_SERIALISINGFORMAT_LABELS, getOptionsSource, OPTIONS_SOURCES_DEFAULTS, OPTIONS_SOURCES_LABELS, SECURITY_ATTRIBUTES_DEFINITIONS, createFormContainer, createInjector, MarkdownRendererModule, schemaVersion } from '@bpmn-io/form-js-viewer';
3
3
  export { schemaVersion } from '@bpmn-io/form-js-viewer';
4
4
  import { isArray, isFunction, isNumber, bind, assign, debounce, forEach, isString, uniqueBy, isObject, get, isDefined, set as set$1, reduce, without, isNil, has } from 'min-dash';
5
5
  import classnames from 'classnames';
@@ -1598,10 +1598,10 @@ function Palette(props) {
1598
1598
  return jsx(PaletteEntry, {
1599
1599
  getPaletteIcon: getPaletteIcon,
1600
1600
  ...entry
1601
- });
1601
+ }, entry.type);
1602
1602
  })
1603
1603
  })]
1604
- })), groups.length == 0 && jsx("div", {
1604
+ }, id)), groups.length == 0 && jsx("div", {
1605
1605
  class: "fjs-palette-no-entries",
1606
1606
  children: "No components found."
1607
1607
  })]
@@ -1678,15 +1678,17 @@ function getPaletteIcon(entry) {
1678
1678
  } = entry;
1679
1679
  let Icon;
1680
1680
  if (iconUrl) {
1681
- Icon = () => jsx("img", {
1682
- class: "fjs-field-icon-image",
1683
- width: 36,
1684
- style: {
1685
- margin: 'auto'
1686
- },
1687
- alt: label,
1688
- src: sanitizeImageSource(iconUrl)
1689
- });
1681
+ Icon = function Icon() {
1682
+ return jsx("img", {
1683
+ class: "fjs-field-icon-image",
1684
+ width: 36,
1685
+ style: {
1686
+ margin: 'auto'
1687
+ },
1688
+ alt: label,
1689
+ src: sanitizeImageSource(iconUrl)
1690
+ });
1691
+ };
1690
1692
  } else {
1691
1693
  Icon = icon || iconsByType(type);
1692
1694
  }
@@ -1706,9 +1708,9 @@ const InjectedRendersRoot = () => {
1706
1708
  return jsx(Fragment, {
1707
1709
  children: injectedRenderers.map(({
1708
1710
  Renderer
1709
- }) => jsx(Renderer, {
1711
+ }, index) => jsx(Renderer, {
1710
1712
  ...injectedProps
1711
- }))
1713
+ }, index))
1712
1714
  });
1713
1715
  };
1714
1716
 
@@ -9054,11 +9056,13 @@ function getPropertiesPanelHeaderProvider(options = {}) {
9054
9056
  const fieldDefinition = formFields.get(type).config;
9055
9057
  const Icon = fieldDefinition.icon || iconsByType(type);
9056
9058
  if (Icon) {
9057
- return () => jsx(Icon, {
9058
- width: "36",
9059
- height: "36",
9060
- viewBox: "0 0 54 54"
9061
- });
9059
+ return function IconComponent() {
9060
+ return jsx(Icon, {
9061
+ width: "36",
9062
+ height: "36",
9063
+ viewBox: "0 0 54 54"
9064
+ });
9065
+ };
9062
9066
  } else if (fieldDefinition.iconUrl) {
9063
9067
  return getPaletteIcon({
9064
9068
  iconUrl: fieldDefinition.iconUrl,
@@ -9424,7 +9428,7 @@ function Columns(props) {
9424
9428
  editField,
9425
9429
  id
9426
9430
  } = props;
9427
- const debounce = useService('debounce');
9431
+ useService('debounce');
9428
9432
  const formLayoutValidator = useService('formLayoutValidator');
9429
9433
  const validate = useCallback(value => {
9430
9434
  return formLayoutValidator.validateField(field, value ? parseInt(value) : null);
@@ -9450,7 +9454,6 @@ function Columns(props) {
9450
9454
  ...asArray(16).filter(i => i >= MIN_COLUMNS).map(asOption)];
9451
9455
  };
9452
9456
  return SelectEntry({
9453
- debounce,
9454
9457
  element: field,
9455
9458
  id,
9456
9459
  label: 'Columns',
@@ -10556,8 +10559,7 @@ function IFrameHeightEntry(props) {
10556
10559
  })];
10557
10560
  }
10558
10561
 
10559
- const HTTPS_PATTERN = /^(https):\/\/*/i; // eslint-disable-line no-useless-escape
10560
-
10562
+ const HTTPS_PATTERN = /^(https):\/\/*/i;
10561
10563
  function IFrameUrlEntry(props) {
10562
10564
  const {
10563
10565
  editField,
@@ -10618,6 +10620,7 @@ function getTooltip$1() {
10618
10620
  children: ["Not all external sources can be displayed in the iFrame. Read more about it in the", ' ', jsx("a", {
10619
10621
  target: "_blank",
10620
10622
  href: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options",
10623
+ rel: "noreferrer",
10621
10624
  children: "X-FRAME-OPTIONS documentation"
10622
10625
  }), "."]
10623
10626
  })]
@@ -10733,6 +10736,7 @@ const description$4 = jsxs(Fragment$1, {
10733
10736
  children: ["Supports markdown and templating.", ' ', jsx("a", {
10734
10737
  href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-text/",
10735
10738
  target: "_blank",
10739
+ rel: "noreferrer",
10736
10740
  children: "Learn more"
10737
10741
  })]
10738
10742
  });
@@ -10789,6 +10793,7 @@ const description$3 = jsxs(Fragment$1, {
10789
10793
  children: ["Supports HTML, styling, and templating. Styles are automatically scoped to the HTML component.", ' ', jsx("a", {
10790
10794
  href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-html/",
10791
10795
  target: "_blank",
10796
+ rel: "noreferrer",
10792
10797
  children: "Learn more"
10793
10798
  })]
10794
10799
  });
@@ -11928,7 +11933,6 @@ function RepeatableEntry(props) {
11928
11933
  path: ['nonCollapsedItems'],
11929
11934
  label: 'Number of non-collapsing items',
11930
11935
  min: 1,
11931
- defaultValue: 5,
11932
11936
  props
11933
11937
  });
11934
11938
  entries.push(nonCollapseItemsEntry);
@@ -12653,6 +12657,7 @@ const description$2 = jsxs(Fragment$1, {
12653
12657
  children: ["A comma-separated list of", ' ', jsx("a", {
12654
12658
  href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers",
12655
12659
  target: "_blank",
12660
+ rel: "noreferrer",
12656
12661
  children: "file type specifiers"
12657
12662
  })]
12658
12663
  });
@@ -12824,9 +12829,9 @@ function EndpointKey(props) {
12824
12829
  }), jsxs("p", {
12825
12830
  children: ["The string must contain ", jsx("code", {
12826
12831
  children: '{ documentId }'
12827
- }), ", which will be replaced with the document ID from the document's reference."]
12832
+ }), ", which will be replaced with the document ID from the document\u2018s reference."]
12828
12833
  }), jsx("p", {
12829
- children: "If you're using the Camunda Tasklist, this variable is automatically added to the context for you."
12834
+ children: "If you\u2018re using the Camunda Tasklist, this variable is automatically added to the context for you."
12830
12835
  }), jsxs("p", {
12831
12836
  children: ["For more details, see the", ' ', jsx("a", {
12832
12837
  href: "https://docs.camunda.io/docs/next/components/modeler/forms/form-element-library/forms-element-library-document-preview/",
@@ -12969,13 +12974,9 @@ function GeneralGroup(field, editField, getService) {
12969
12974
  editField
12970
12975
  }), ...TextEntry({
12971
12976
  field,
12972
- editField,
12973
- getService
12974
- }), ...HtmlEntry({
12977
+ editField}), ...HtmlEntry({
12975
12978
  field,
12976
- editField,
12977
- getService
12978
- }), ...IFrameUrlEntry({
12979
+ editField}), ...IFrameUrlEntry({
12979
12980
  field,
12980
12981
  editField
12981
12982
  }), ...IFrameHeightEntry({
@@ -13297,12 +13298,11 @@ function ValidationType(props) {
13297
13298
  id,
13298
13299
  onChange
13299
13300
  } = props;
13300
- const debounce = useService('debounce');
13301
+ useService('debounce');
13301
13302
  const setValue = validationType => {
13302
13303
  onChange('validationType')(validationType || undefined);
13303
13304
  };
13304
13305
  return SelectEntry({
13305
- debounce,
13306
13306
  element: field,
13307
13307
  getValue: getValue('validationType'),
13308
13308
  id,
@@ -13578,6 +13578,7 @@ function getTooltip() {
13578
13578
  children: ["Allow the iframe to access more functionality of your browser, details regarding the various options can be found in the", ' ', jsx("a", {
13579
13579
  target: "_blank",
13580
13580
  href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe",
13581
+ rel: "noreferrer",
13581
13582
  children: "MDN iFrame documentation."
13582
13583
  })]
13583
13584
  })