ywana-core8 0.0.245 → 0.0.249

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.
@@ -205,13 +205,24 @@ var Button$1 = function Button(_ref) {
205
205
 
206
206
  var SiteContext = React.createContext({});
207
207
 
208
+ var TEXTFORMATS = {
209
+ NONE: '',
210
+ NUMERIC: 'numeric',
211
+ DATE: 'date',
212
+ TIME: 'time',
213
+ EMAIL: 'email',
214
+ HTML: 'HTML',
215
+ URL: 'URL'
216
+ };
208
217
  /**
209
218
  * Text
210
219
  */
211
220
 
212
221
  var Text$1 = function Text(_ref) {
213
- var children = _ref.children;
222
+ var format = _ref.format,
223
+ children = _ref.children;
214
224
  var site = useContext(SiteContext);
225
+ var value = children;
215
226
 
216
227
  if (site) {
217
228
  var lang = site.lang,
@@ -219,10 +230,18 @@ var Text$1 = function Text(_ref) {
219
230
  dictionary = _site$dictionary === void 0 ? {} : _site$dictionary;
220
231
  var term = dictionary[children];
221
232
  var text = term ? term[lang] : children;
222
- return text ? /*#__PURE__*/React.createElement("span", null, text) : '';
233
+ if (text) value = text;
234
+ }
235
+
236
+ var formatter = Intl.NumberFormat();
237
+
238
+ switch (format) {
239
+ case TEXTFORMATS.NUMERIC:
240
+ value = formatter.format(children);
241
+ break;
223
242
  }
224
243
 
225
- return children ? /*#__PURE__*/React.createElement("span", null, children) : '';
244
+ return children ? /*#__PURE__*/React.createElement("span", null, value) : '';
226
245
  };
227
246
 
228
247
  /**
@@ -1108,6 +1127,7 @@ var DropDown = function DropDown(props) {
1108
1127
  }
1109
1128
  }
1110
1129
 
1130
+ console.log('dropdown', id, 'predictive', predictive);
1111
1131
  return /*#__PURE__*/React.createElement("div", {
1112
1132
  className: "dropdown"
1113
1133
  }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
@@ -3472,7 +3492,7 @@ var StringEditor = function StringEditor(_ref6) {
3472
3492
  onChange: change,
3473
3493
  options: buildOptions(),
3474
3494
  readOnly: !editable,
3475
- canFilter: predictive
3495
+ predictive: predictive
3476
3496
  }) : /*#__PURE__*/React.createElement(TextField, {
3477
3497
  outlined: outlined,
3478
3498
  id: id,
@@ -5768,5 +5788,5 @@ var isFunction = function isFunction(value) {
5768
5788
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
5769
5789
  };
5770
5790
 
5771
- export { Avatar, Button$1 as Button, CheckBox, Chip, Chips, CircularProgress, CollectionContext, CollectionEditor$1 as CollectionEditor, CollectionPage, Content, ContentEditor, ContentForm, CreateContentDialog$1 as CreateContentDialog, DataTable, Dialog, DropDown, EditContentDialog, FORMATS, FieldEditor, Form, HTTPClient, Header, Icon, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, Page, PageContext, PageProvider, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, TYPES, Tab, TabbedContentEditor, TablePage, Tabs, Text$1 as Text, TextArea, TextField, Thumbnail, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadButton, UploadDialog, UploadFile, Uploader, Viewer, WaitScreen, isFunction };
5791
+ export { Avatar, Button$1 as Button, CheckBox, Chip, Chips, CircularProgress, CollectionContext, CollectionEditor$1 as CollectionEditor, CollectionPage, Content, ContentEditor, ContentForm, CreateContentDialog$1 as CreateContentDialog, DataTable, Dialog, DropDown, EditContentDialog, FORMATS, FieldEditor, Form, HTTPClient, Header, Icon, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, Page, PageContext, PageProvider, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, TEXTFORMATS, TYPES, Tab, TabbedContentEditor, TablePage, Tabs, Text$1 as Text, TextArea, TextField, Thumbnail, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadButton, UploadDialog, UploadFile, Uploader, Viewer, WaitScreen, isFunction };
5772
5792
  //# sourceMappingURL=index.modern.js.map