ywana-core8 0.0.387 → 0.0.390
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 +27 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +27 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +30 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/domain/ContentEditor.js +2 -0
- package/src/domain/ContentEditor.test.js +6 -5
- package/src/domain/ContentType.js +1 -0
- package/src/html/color.js +17 -0
- package/src/html/color.test.js +19 -0
- package/src/html/color1.css +3 -0
- package/src/widgets/login/LoginBox.js +2 -1
package/dist/index.cjs
CHANGED
@@ -6,6 +6,7 @@ var momentRange = require('moment-range');
|
|
6
6
|
var ResumableJS = require('resumablejs');
|
7
7
|
var reactNotificationsComponent = require('react-notifications-component');
|
8
8
|
require('react-notifications-component/dist/theme.css');
|
9
|
+
var reactColor = require('react-color');
|
9
10
|
var equal = require('deep-equal');
|
10
11
|
|
11
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
@@ -1204,7 +1205,8 @@ var FORMATS = {
|
|
1204
1205
|
EMAIL: 'email',
|
1205
1206
|
HTML: 'HTML',
|
1206
1207
|
URL: 'URL',
|
1207
|
-
IMG: 'IMG'
|
1208
|
+
IMG: 'IMG',
|
1209
|
+
COLOR: 'COLOR'
|
1208
1210
|
};
|
1209
1211
|
/**
|
1210
1212
|
* CHECK
|
@@ -2113,6 +2115,8 @@ var LoginBox = function LoginBox(_ref) {
|
|
2113
2115
|
title = _ref.title,
|
2114
2116
|
_ref$userLabel = _ref.userLabel,
|
2115
2117
|
userLabel = _ref$userLabel === void 0 ? "User" : _ref$userLabel,
|
2118
|
+
_ref$userValue = _ref.userValue,
|
2119
|
+
userValue = _ref$userValue === void 0 ? "" : _ref$userValue,
|
2116
2120
|
_ref$passwordLabel = _ref.passwordLabel,
|
2117
2121
|
passwordLabel = _ref$passwordLabel === void 0 ? "Password" : _ref$passwordLabel,
|
2118
2122
|
_ref$passwordValue = _ref.passwordValue,
|
@@ -2126,7 +2130,7 @@ var LoginBox = function LoginBox(_ref) {
|
|
2126
2130
|
message = _ref.message,
|
2127
2131
|
loading = _ref.loading;
|
2128
2132
|
|
2129
|
-
var _useState = React.useState(
|
2133
|
+
var _useState = React.useState(userValue),
|
2130
2134
|
user = _useState[0],
|
2131
2135
|
setUser = _useState[1];
|
2132
2136
|
|
@@ -3718,6 +3722,21 @@ var NumberField = function NumberField(_ref3) {
|
|
3718
3722
|
});
|
3719
3723
|
};
|
3720
3724
|
|
3725
|
+
var ColorField = function ColorField(props) {
|
3726
|
+
var id = props.id,
|
3727
|
+
onChange = props.onChange;
|
3728
|
+
|
3729
|
+
function change(color) {
|
3730
|
+
if (onChange) onChange(id, color.hex);
|
3731
|
+
}
|
3732
|
+
|
3733
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
3734
|
+
className: "color-field"
|
3735
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactColor.CirclePicker, {
|
3736
|
+
onChangeComplete: change
|
3737
|
+
}));
|
3738
|
+
};
|
3739
|
+
|
3721
3740
|
/**
|
3722
3741
|
* Content Editor
|
3723
3742
|
*/
|
@@ -4074,6 +4093,12 @@ var StringEditor = function StringEditor(_ref6) {
|
|
4074
4093
|
|
4075
4094
|
function renderFormat(format, options) {
|
4076
4095
|
switch (format) {
|
4096
|
+
case FORMATS.COLOR:
|
4097
|
+
return /*#__PURE__*/React__default["default"].createElement(ColorField, {
|
4098
|
+
id: id,
|
4099
|
+
onChange: change
|
4100
|
+
});
|
4101
|
+
|
4077
4102
|
case FORMATS.HTML:
|
4078
4103
|
return /*#__PURE__*/React__default["default"].createElement(Editor, {
|
4079
4104
|
id: id,
|