ywana-core8 0.0.178 → 0.0.182
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/__reactpreview__/Wrapper.tsx +14 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +3 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +3 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/reactpreview.config.js +37 -0
- package/src/domain/ContentEditor.js +8 -3
- package/src/html/button.js +16 -2
- package/src/html/button.tsx +38 -0
- package/src/test.js +5 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
// You can import global CSS files here.
|
4
|
+
import '../src/css/html.css'
|
5
|
+
import '../src/css/theme.css'
|
6
|
+
import 'material-design-icons-iconfont/dist/material-design-icons.css'
|
7
|
+
|
8
|
+
|
9
|
+
// No-op wrapper.
|
10
|
+
export const Wrapper: React.FC = ({ children }) => {
|
11
|
+
|
12
|
+
|
13
|
+
return <div style={{ padding: "2rem" }}>{children}</div>;
|
14
|
+
};
|
package/dist/index.cjs
CHANGED
@@ -2716,6 +2716,7 @@ var TabbedContentEditor = function TabbedContentEditor(_ref2) {
|
|
2716
2716
|
}
|
2717
2717
|
|
2718
2718
|
var sections = content.sections();
|
2719
|
+
console.log("TabbedContentEditor", sections);
|
2719
2720
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
2720
2721
|
className: "content-editor tabbed"
|
2721
2722
|
}, /*#__PURE__*/React__default["default"].createElement(Tabs, {
|
@@ -2850,7 +2851,7 @@ var FieldEditor = function FieldEditor(_ref4) {
|
|
2850
2851
|
}
|
2851
2852
|
|
2852
2853
|
function renderField() {
|
2853
|
-
var value1 = field.value ? field.value : field["default"];
|
2854
|
+
var value1 = field.value || field.value === "" ? field.value : field["default"];
|
2854
2855
|
var isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden;
|
2855
2856
|
|
2856
2857
|
if (isHidden) {
|
@@ -3030,7 +3031,7 @@ var NumberEditor = function NumberEditor(_ref7) {
|
|
3030
3031
|
if (onChange) onChange(id, value);
|
3031
3032
|
}
|
3032
3033
|
|
3033
|
-
var val = value || field["default"];
|
3034
|
+
var val = value || value === "" ? value : field["default"];
|
3034
3035
|
var min = field.min;
|
3035
3036
|
var max = field.max;
|
3036
3037
|
var disabled = !editable;
|