ywana-core8 0.0.868 → 0.0.869

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
@@ -930,7 +930,7 @@ var Property = function Property(props) {
930
930
  /**
931
931
  * Radio Button
932
932
  */
933
- var RadioButton = function RadioButton(props) {
933
+ var RadioButton$1 = function RadioButton(props) {
934
934
  var id = props.id,
935
935
  name = props.name,
936
936
  label = props.label,
@@ -1085,7 +1085,9 @@ var FORMATS$1 = {
1085
1085
  IMG: 'IMG',
1086
1086
  COLOR: 'COLOR',
1087
1087
  TOKENS: 'TOKENS',
1088
- PASSWORD: 'PASSWORD'
1088
+ PASSWORD: 'PASSWORD',
1089
+ RADIO: 'RADIO',
1090
+ CHECKBOX: 'CHECKBOX'
1089
1091
  };
1090
1092
 
1091
1093
  /**
@@ -5705,7 +5707,9 @@ var MultiSelectionEditor = function MultiSelectionEditor(_ref10) {
5705
5707
  onChange = _ref10.onChange;
5706
5708
  var id = field.id,
5707
5709
  label = field.label,
5708
- options = field.options;
5710
+ options = field.options,
5711
+ _field$format = field.format,
5712
+ format = _field$format === void 0 ? FORMATS$1.CHECKBOX : _field$format;
5709
5713
  function change(v) {
5710
5714
  var index = value.indexOf(v);
5711
5715
  if (index >= 0) {
@@ -5723,13 +5727,32 @@ var MultiSelectionEditor = function MultiSelectionEditor(_ref10) {
5723
5727
  className: "multiselection-editor"
5724
5728
  }, /*#__PURE__*/React__default["default"].createElement("label", null, label), buildOptions().map(function (option) {
5725
5729
  var checked = value.includes(option.value);
5726
- return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
5727
- value: checked,
5728
- label: option.label,
5729
- onChange: function onChange() {
5730
- return change(option.value);
5731
- }
5732
- });
5730
+ switch (format) {
5731
+ case FORMATS$1.CHECKBOX:
5732
+ return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
5733
+ value: checked,
5734
+ label: option.label,
5735
+ onChange: function onChange() {
5736
+ return change(option.value);
5737
+ }
5738
+ });
5739
+ case FORMATS$1.RADIO:
5740
+ return /*#__PURE__*/React__default["default"].createElement(RadioButton, {
5741
+ value: checked,
5742
+ label: option.label,
5743
+ onChange: function onChange() {
5744
+ return change(option.value);
5745
+ }
5746
+ });
5747
+ default:
5748
+ return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
5749
+ value: checked,
5750
+ label: option.label,
5751
+ onChange: function onChange() {
5752
+ return change(option.value);
5753
+ }
5754
+ });
5755
+ }
5733
5756
  }));
5734
5757
  };
5735
5758
 
@@ -10929,7 +10952,7 @@ exports.PasswordEditor = PasswordEditor;
10929
10952
  exports.PasswordField = PasswordField;
10930
10953
  exports.Planner = Planner;
10931
10954
  exports.Property = Property;
10932
- exports.RadioButton = RadioButton;
10955
+ exports.RadioButton = RadioButton$1;
10933
10956
  exports.ResetPasswordBox = ResetPasswordBox;
10934
10957
  exports.Section = Section;
10935
10958
  exports.Session = Session;