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.
- package/dist/index.cjs +25 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +25 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +25 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +1 -1
- package/src/html/index.js +1 -1
- package/src/html/label.css +0 -0
- package/src/html/label.js +29 -0
- package/src/html/label.test.js +0 -0
- package/src/html/property.test.js +0 -1
- package/src/html/text.js +25 -9
- package/src/html/text.test.js +11 -0
- package/src/html/textfield.js +2 -0
package/dist/index.modern.js
CHANGED
@@ -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
|
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
|
-
|
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,
|
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
|
-
|
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
|