@bpmn-io/form-js-editor 0.12.0 → 0.12.1

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.cjs CHANGED
@@ -717,7 +717,7 @@ function EditorText(props) {
717
717
  type,
718
718
  text = ''
719
719
  } = props.field;
720
- const Icon = formJsViewer.iconsByType['text'];
720
+ const Icon = formJsViewer.iconsByType('text');
721
721
  if (!text) {
722
722
  return jsxRuntime.jsx("div", {
723
723
  class: editorFormFieldClasses(type),
@@ -883,7 +883,7 @@ function Palette(props) {
883
883
  label,
884
884
  type
885
885
  }) => {
886
- const Icon = formJsViewer.iconsByType[type];
886
+ const Icon = formJsViewer.iconsByType(type);
887
887
  return jsxRuntime.jsxs("div", {
888
888
  class: "fjs-palette-field fjs-drag-copy fjs-no-drop",
889
889
  "data-field-type": type,
@@ -1264,7 +1264,7 @@ function CreatePreview(props) {
1264
1264
  } = hooks$1.useContext(DragAndDropContext$1);
1265
1265
  function handleCloned(clone, original, type) {
1266
1266
  const fieldType = clone.dataset.fieldType;
1267
- const Icon = formJsViewer.iconsByType[fieldType];
1267
+ const Icon = formJsViewer.iconsByType(fieldType);
1268
1268
  const {
1269
1269
  label
1270
1270
  } = findPaletteEntry(fieldType);
@@ -5487,7 +5487,7 @@ const PropertiesPanelHeaderProvider = {
5487
5487
  const {
5488
5488
  type
5489
5489
  } = field;
5490
- const Icon = formJsViewer.iconsByType[type];
5490
+ const Icon = formJsViewer.iconsByType(type);
5491
5491
  if (Icon) {
5492
5492
  return () => jsxRuntime.jsx(Icon, {
5493
5493
  width: "36",
@@ -7345,7 +7345,7 @@ function ConstraintsGroup(field, editField) {
7345
7345
 
7346
7346
  const VALIDATION_TYPE_OPTIONS = {
7347
7347
  custom: {
7348
- value: undefined,
7348
+ value: '',
7349
7349
  label: 'Custom'
7350
7350
  },
7351
7351
  email: {
@@ -7362,7 +7362,7 @@ function ValidationGroup(field, editField) {
7362
7362
  type
7363
7363
  } = field;
7364
7364
  const validate = minDash.get(field, ['validate'], {});
7365
- const isCustomValidation = [undefined, VALIDATION_TYPE_OPTIONS.custom.value].includes(validate && validate.validationType);
7365
+ const isCustomValidation = [undefined, VALIDATION_TYPE_OPTIONS.custom.value].includes(validate.validationType);
7366
7366
  if (!(INPUTS.includes(type) && type !== 'checkbox' && type !== 'checklist' && type !== 'taglist')) {
7367
7367
  return null;
7368
7368
  }