@bpmn-io/form-js-playground 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.
@@ -20124,11 +20124,17 @@
20124
20124
  children: [pre !== null && e$1("span", {
20125
20125
  class: "fjs-input-adornment border-right border-radius-left",
20126
20126
  onClick: onAdornmentClick,
20127
- children: [" ", pre, " "]
20127
+ children: [" ", isString$3(pre) ? e$1("span", {
20128
+ class: "fjs-input-adornment-text",
20129
+ children: pre
20130
+ }) : pre, " "]
20128
20131
  }), children, post !== null && e$1("span", {
20129
20132
  class: "fjs-input-adornment border-left border-radius-right",
20130
20133
  onClick: onAdornmentClick,
20131
- children: [" ", post, " "]
20134
+ children: [" ", isString$3(post) ? e$1("span", {
20135
+ class: "fjs-input-adornment-text",
20136
+ children: post
20137
+ }) : post, " "]
20132
20138
  })]
20133
20139
  });
20134
20140
  }
@@ -22453,21 +22459,23 @@
22453
22459
  d: "M15 13a2 2 0 00-2 2v24a2 2 0 002 2h24a2 2 0 002-2V15a2 2 0 00-2-2H15zm24 2H15v12.45l4.71-4.709a1.91 1.91 0 012.702 0l6.695 6.695 2.656-1.77a1.91 1.91 0 012.411.239L39 32.73V15zM15 39v-8.754c.06-.038.116-.083.168-.135l5.893-5.893 6.684 6.685a1.911 1.911 0 002.41.238l2.657-1.77 6.02 6.02c.052.051.108.097.168.135V39H15z",
22454
22460
  fill: "#000"
22455
22461
  }));
22456
- const iconsByType = {
22457
- button: ButtonIcon,
22458
- checkbox: CheckboxIcon,
22459
- checklist: ChecklistIcon,
22460
- columns: ColumnsIcon,
22461
- datetime: DatetimeIcon,
22462
- image: ImageIcon,
22463
- number: NumberIcon,
22464
- radio: RadioIcon,
22465
- select: SelectIcon,
22466
- taglist: TaglistIcon,
22467
- text: TextIcon,
22468
- textfield: TextfieldIcon,
22469
- textarea: TextareaIcon,
22470
- default: FormIcon
22462
+ const iconsByType = type => {
22463
+ return {
22464
+ button: ButtonIcon,
22465
+ checkbox: CheckboxIcon,
22466
+ checklist: ChecklistIcon,
22467
+ columns: ColumnsIcon,
22468
+ datetime: DatetimeIcon,
22469
+ image: ImageIcon,
22470
+ number: NumberIcon,
22471
+ radio: RadioIcon,
22472
+ select: SelectIcon,
22473
+ taglist: TaglistIcon,
22474
+ text: TextIcon,
22475
+ textfield: TextfieldIcon,
22476
+ textarea: TextareaIcon,
22477
+ default: FormIcon
22478
+ }[type];
22471
22479
  };
22472
22480
  const formFields = [Button, Checkbox$1, Checklist, Default, Image, Numberfield, Datetime, Radio, Select$1, Taglist, Text$2, Textfield$1, Textarea];
22473
22481
  class FormFields {
@@ -47301,7 +47309,7 @@
47301
47309
  type,
47302
47310
  text = ''
47303
47311
  } = props.field;
47304
- const Icon = iconsByType['text'];
47312
+ const Icon = iconsByType('text');
47305
47313
  if (!text) {
47306
47314
  return e$1("div", {
47307
47315
  class: editorFormFieldClasses(type),
@@ -47474,7 +47482,7 @@
47474
47482
  label,
47475
47483
  type
47476
47484
  }) => {
47477
- const Icon = iconsByType[type];
47485
+ const Icon = iconsByType(type);
47478
47486
  return e$1("div", {
47479
47487
  class: "fjs-palette-field fjs-drag-copy fjs-no-drop",
47480
47488
  "data-field-type": type,
@@ -47853,7 +47861,7 @@
47853
47861
  } = F$1(DragAndDropContext$1);
47854
47862
  function handleCloned(clone, original, type) {
47855
47863
  const fieldType = clone.dataset.fieldType;
47856
- const Icon = iconsByType[fieldType];
47864
+ const Icon = iconsByType(fieldType);
47857
47865
  const {
47858
47866
  label
47859
47867
  } = findPaletteEntry(fieldType);
@@ -52040,7 +52048,7 @@
52040
52048
  const {
52041
52049
  type
52042
52050
  } = field;
52043
- const Icon = iconsByType[type];
52051
+ const Icon = iconsByType(type);
52044
52052
  if (Icon) {
52045
52053
  return () => e$1(Icon, {
52046
52054
  width: "36",
@@ -53867,7 +53875,7 @@
53867
53875
  }
53868
53876
  const VALIDATION_TYPE_OPTIONS = {
53869
53877
  custom: {
53870
- value: undefined,
53878
+ value: '',
53871
53879
  label: 'Custom'
53872
53880
  },
53873
53881
  email: {
@@ -53884,7 +53892,7 @@
53884
53892
  type
53885
53893
  } = field;
53886
53894
  const validate = get(field, ['validate'], {});
53887
- const isCustomValidation = [undefined, VALIDATION_TYPE_OPTIONS.custom.value].includes(validate && validate.validationType);
53895
+ const isCustomValidation = [undefined, VALIDATION_TYPE_OPTIONS.custom.value].includes(validate.validationType);
53888
53896
  if (!(INPUTS.includes(type) && type !== 'checkbox' && type !== 'checklist' && type !== 'taglist')) {
53889
53897
  return null;
53890
53898
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-playground",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "A form-js playground",
5
5
  "files": [
6
6
  "dist"
@@ -44,8 +44,8 @@
44
44
  "url": "https://github.com/bpmn-io"
45
45
  },
46
46
  "dependencies": {
47
- "@bpmn-io/form-js-editor": "^0.12.0",
48
- "@bpmn-io/form-js-viewer": "^0.12.0",
47
+ "@bpmn-io/form-js-editor": "^0.12.1",
48
+ "@bpmn-io/form-js-viewer": "^0.12.1",
49
49
  "@codemirror/autocomplete": "^6.3.4",
50
50
  "@codemirror/commands": "^6.1.2",
51
51
  "@codemirror/lang-json": "^6.0.0",
@@ -70,5 +70,5 @@
70
70
  "rollup-plugin-css-only": "^4.0.0",
71
71
  "style-loader": "^3.3.0"
72
72
  },
73
- "gitHead": "a0f3d50d21422053ebd8aeb933fb026ccf8d9209"
73
+ "gitHead": "e4a01e3215209858258b2fb83dfc09b86fccc0db"
74
74
  }