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.
@@ -921,7 +921,7 @@ var Property = function Property(props) {
921
921
  /**
922
922
  * Radio Button
923
923
  */
924
- var RadioButton = function RadioButton(props) {
924
+ var RadioButton$1 = function RadioButton(props) {
925
925
  var id = props.id,
926
926
  name = props.name,
927
927
  label = props.label,
@@ -1076,7 +1076,9 @@ var FORMATS$1 = {
1076
1076
  IMG: 'IMG',
1077
1077
  COLOR: 'COLOR',
1078
1078
  TOKENS: 'TOKENS',
1079
- PASSWORD: 'PASSWORD'
1079
+ PASSWORD: 'PASSWORD',
1080
+ RADIO: 'RADIO',
1081
+ CHECKBOX: 'CHECKBOX'
1080
1082
  };
1081
1083
 
1082
1084
  /**
@@ -5696,7 +5698,9 @@ var MultiSelectionEditor = function MultiSelectionEditor(_ref10) {
5696
5698
  onChange = _ref10.onChange;
5697
5699
  var id = field.id,
5698
5700
  label = field.label,
5699
- options = field.options;
5701
+ options = field.options,
5702
+ _field$format = field.format,
5703
+ format = _field$format === void 0 ? FORMATS$1.CHECKBOX : _field$format;
5700
5704
  function change(v) {
5701
5705
  var index = value.indexOf(v);
5702
5706
  if (index >= 0) {
@@ -5714,13 +5718,32 @@ var MultiSelectionEditor = function MultiSelectionEditor(_ref10) {
5714
5718
  className: "multiselection-editor"
5715
5719
  }, /*#__PURE__*/React.createElement("label", null, label), buildOptions().map(function (option) {
5716
5720
  var checked = value.includes(option.value);
5717
- return /*#__PURE__*/React.createElement(CheckBox, {
5718
- value: checked,
5719
- label: option.label,
5720
- onChange: function onChange() {
5721
- return change(option.value);
5722
- }
5723
- });
5721
+ switch (format) {
5722
+ case FORMATS$1.CHECKBOX:
5723
+ return /*#__PURE__*/React.createElement(CheckBox, {
5724
+ value: checked,
5725
+ label: option.label,
5726
+ onChange: function onChange() {
5727
+ return change(option.value);
5728
+ }
5729
+ });
5730
+ case FORMATS$1.RADIO:
5731
+ return /*#__PURE__*/React.createElement(RadioButton, {
5732
+ value: checked,
5733
+ label: option.label,
5734
+ onChange: function onChange() {
5735
+ return change(option.value);
5736
+ }
5737
+ });
5738
+ default:
5739
+ return /*#__PURE__*/React.createElement(CheckBox, {
5740
+ value: checked,
5741
+ label: option.label,
5742
+ onChange: function onChange() {
5743
+ return change(option.value);
5744
+ }
5745
+ });
5746
+ }
5724
5747
  }));
5725
5748
  };
5726
5749
 
@@ -10862,5 +10885,5 @@ var isFunction = function isFunction(value) {
10862
10885
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
10863
10886
  };
10864
10887
 
10865
- export { Accordion, Avatar, Button, Calendar, CheckBox, Chip, Chips, CircularProgress, CollectionAPI$1 as CollectionAPI, CollectionAPI as CollectionAPI2, CollectionContext$1 as CollectionContext, CollectionContext as CollectionContext2, CollectionEditor$2 as CollectionEditor, CollectionFilters$1 as CollectionFilters, CollectionPage$1 as CollectionPage, CollectionPage as CollectionPage2, CollectionTree, ColorField, Content, ContentEditor, ContentForm, ContentViewer, CreateContentDialog, DataTable, DateRange, Dialog, DropDown, DynamicForm, EditContentDialog, EmptyMessage, FORMATS$1 as FORMATS, FieldEditor, FileExplorer, FilesGrid, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MultiSelector, Page, PageContext, PageProvider, PasswordEditor, PasswordField, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, Switch2, TASK_STATES, TEXTFORMATS, TYPES$1 as TYPES, Tab, TabbedContentEditor, TabbedTablePage, TabbedView, TableEditor$2 as TableEditor, TablePage, TablePage2, Tabs, TaskContext, TaskContextProvider, TaskMonitor, TaskProgress, Text, TextArea, TextField, Thumbnail, ToggleButton, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction };
10888
+ export { Accordion, Avatar, Button, Calendar, CheckBox, Chip, Chips, CircularProgress, CollectionAPI$1 as CollectionAPI, CollectionAPI as CollectionAPI2, CollectionContext$1 as CollectionContext, CollectionContext as CollectionContext2, CollectionEditor$2 as CollectionEditor, CollectionFilters$1 as CollectionFilters, CollectionPage$1 as CollectionPage, CollectionPage as CollectionPage2, CollectionTree, ColorField, Content, ContentEditor, ContentForm, ContentViewer, CreateContentDialog, DataTable, DateRange, Dialog, DropDown, DynamicForm, EditContentDialog, EmptyMessage, FORMATS$1 as FORMATS, FieldEditor, FileExplorer, FilesGrid, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MultiSelector, Page, PageContext, PageProvider, PasswordEditor, PasswordField, Planner, Property, RadioButton$1 as RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, Switch2, TASK_STATES, TEXTFORMATS, TYPES$1 as TYPES, Tab, TabbedContentEditor, TabbedTablePage, TabbedView, TableEditor$2 as TableEditor, TablePage, TablePage2, Tabs, TaskContext, TaskContextProvider, TaskMonitor, TaskProgress, Text, TextArea, TextField, Thumbnail, ToggleButton, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction };
10866
10889
  //# sourceMappingURL=index.modern.js.map