@zohodesk/dot 1.0.0-beta.260 → 1.0.0-beta.261
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/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.261
|
|
6
|
+
|
|
7
|
+
- **TextEditor** - pre tag css style reverted.
|
|
8
|
+
- **FreezeLayer** - useDragger implementation reverted.
|
|
9
|
+
|
|
5
10
|
# 1.0.0-beta.260
|
|
6
11
|
|
|
7
12
|
- **TextEditor** - pre tag css style added.
|
|
@@ -8,7 +8,7 @@ import { useZIndex } from '@zohodesk/components/lib/Provider/ZindexProvider';
|
|
|
8
8
|
import cssJSLogic from './css/cssJSLogic';
|
|
9
9
|
import useFreezeLayer from './useFreezeLayer';
|
|
10
10
|
import style from './css/FreezeLayer.module.css';
|
|
11
|
-
import useDragger from '../Hooks/Dragger/useDragger';
|
|
11
|
+
// import useDragger from '../Hooks/Dragger/useDragger';
|
|
12
12
|
export default function FreezeLayer(props) {
|
|
13
13
|
let {
|
|
14
14
|
isActive: propsActive,
|
|
@@ -25,7 +25,7 @@ export default function FreezeLayer(props) {
|
|
|
25
25
|
customStyle
|
|
26
26
|
} = props;
|
|
27
27
|
const finalStyle = mergeStyle(style, customStyle);
|
|
28
|
-
const dragRef = useRef(null);
|
|
28
|
+
// const dragRef = useRef(null);
|
|
29
29
|
const {
|
|
30
30
|
freezeClass
|
|
31
31
|
} = cssJSLogic({
|
|
@@ -41,16 +41,8 @@ export default function FreezeLayer(props) {
|
|
|
41
41
|
isActive: propsActive,
|
|
42
42
|
onClick
|
|
43
43
|
});
|
|
44
|
-
let refEle = forwardRef || dragRef;
|
|
45
|
-
useDragger({
|
|
46
|
-
ParentRef: refEle,
|
|
47
|
-
boundaryLimit: {
|
|
48
|
-
top: 0,
|
|
49
|
-
left: 50,
|
|
50
|
-
right: 50,
|
|
51
|
-
bottom: 50
|
|
52
|
-
}
|
|
53
|
-
});
|
|
44
|
+
// let refEle = forwardRef || dragRef;
|
|
45
|
+
// useDragger({ ParentRef: refEle, boundaryLimit: { top: 0, left: 50, right: 50, bottom: 50 } });
|
|
54
46
|
return /*#__PURE__*/React.createElement(VelocityAnimationGroup, {
|
|
55
47
|
name: animationName && animationName,
|
|
56
48
|
isActive: isActive,
|
|
@@ -61,7 +53,7 @@ export default function FreezeLayer(props) {
|
|
|
61
53
|
} : {},
|
|
62
54
|
className: freezeClass,
|
|
63
55
|
onClick: handleClick,
|
|
64
|
-
ref:
|
|
56
|
+
ref: forwardRef
|
|
65
57
|
}, children && /*#__PURE__*/React.createElement(React.Fragment, null, childAnimationName ? /*#__PURE__*/React.createElement(VelocityAnimationGroup, {
|
|
66
58
|
name: childAnimationName,
|
|
67
59
|
isActive: isChildActive,
|
|
@@ -188,16 +188,17 @@ export default class TextEditor extends Component {
|
|
|
188
188
|
if (!global.editor[id]) {
|
|
189
189
|
global.editor[id] = editorObj;
|
|
190
190
|
}
|
|
191
|
-
const css = 'pre {white-space: pre-wrap}',
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
style.type = 'text/css';
|
|
195
|
-
if (style.styleSheet) {
|
|
196
|
-
|
|
197
|
-
} else {
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
head.appendChild(style);
|
|
191
|
+
// const css = 'pre {white-space: pre-wrap}',
|
|
192
|
+
// head = editorObj.doc.head || editorObj.doc.getElementsByTagName('head')[0],
|
|
193
|
+
// style = document.createElement('style');
|
|
194
|
+
// style.type = 'text/css';
|
|
195
|
+
// if (style.styleSheet) {
|
|
196
|
+
// style.styleSheet.cssText = css;
|
|
197
|
+
// } else {
|
|
198
|
+
// style.appendChild(editorObj.doc.createTextNode(css));
|
|
199
|
+
// }
|
|
200
|
+
// head.appendChild(style);
|
|
201
|
+
|
|
201
202
|
editorCallback && editorCallback(editorObj);
|
|
202
203
|
const iframe = selectn('iframe.contentDocument.body', editorObj) || null;
|
|
203
204
|
const iframeHead = selectn('iframe.contentDocument.head', editorObj) || null;
|
|
@@ -15,10 +15,10 @@ var _ZindexProvider = require("@zohodesk/components/lib/Provider/ZindexProvider"
|
|
|
15
15
|
var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
16
16
|
var _useFreezeLayer2 = _interopRequireDefault(require("./useFreezeLayer"));
|
|
17
17
|
var _FreezeLayerModule = _interopRequireDefault(require("./css/FreezeLayer.module.css"));
|
|
18
|
-
var _useDragger = _interopRequireDefault(require("../Hooks/Dragger/useDragger"));
|
|
19
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
// import useDragger from '../Hooks/Dragger/useDragger';
|
|
22
22
|
function FreezeLayer(props) {
|
|
23
23
|
var propsActive = props.isActive,
|
|
24
24
|
children = props.children,
|
|
@@ -33,7 +33,7 @@ function FreezeLayer(props) {
|
|
|
33
33
|
needAutoZindex = props.needAutoZindex,
|
|
34
34
|
customStyle = props.customStyle;
|
|
35
35
|
var finalStyle = (0, _utils.mergeStyle)(_FreezeLayerModule["default"], customStyle);
|
|
36
|
-
|
|
36
|
+
// const dragRef = useRef(null);
|
|
37
37
|
var _cssJSLogic = (0, _cssJSLogic2["default"])({
|
|
38
38
|
props: props,
|
|
39
39
|
style: finalStyle
|
|
@@ -47,16 +47,8 @@ function FreezeLayer(props) {
|
|
|
47
47
|
isActive = _useFreezeLayer.isActive,
|
|
48
48
|
isChildActive = _useFreezeLayer.isChildActive,
|
|
49
49
|
handleClick = _useFreezeLayer.handleClick;
|
|
50
|
-
|
|
51
|
-
(0,
|
|
52
|
-
ParentRef: refEle,
|
|
53
|
-
boundaryLimit: {
|
|
54
|
-
top: 0,
|
|
55
|
-
left: 50,
|
|
56
|
-
right: 50,
|
|
57
|
-
bottom: 50
|
|
58
|
-
}
|
|
59
|
-
});
|
|
50
|
+
// let refEle = forwardRef || dragRef;
|
|
51
|
+
// useDragger({ ParentRef: refEle, boundaryLimit: { top: 0, left: 50, right: 50, bottom: 50 } });
|
|
60
52
|
return /*#__PURE__*/_react["default"].createElement(_VelocityAnimationGroup["default"], {
|
|
61
53
|
name: animationName && animationName,
|
|
62
54
|
isActive: isActive,
|
|
@@ -67,7 +59,7 @@ function FreezeLayer(props) {
|
|
|
67
59
|
} : {},
|
|
68
60
|
className: freezeClass,
|
|
69
61
|
onClick: handleClick,
|
|
70
|
-
ref:
|
|
62
|
+
ref: forwardRef
|
|
71
63
|
}, children && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, childAnimationName ? /*#__PURE__*/_react["default"].createElement(_VelocityAnimationGroup["default"], {
|
|
72
64
|
name: childAnimationName,
|
|
73
65
|
isActive: isChildActive,
|
|
@@ -215,16 +215,17 @@ var TextEditor = /*#__PURE__*/function (_Component) {
|
|
|
215
215
|
if (!global.editor[id]) {
|
|
216
216
|
global.editor[id] = editorObj;
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
style.type = 'text/css';
|
|
222
|
-
if (style.styleSheet) {
|
|
223
|
-
|
|
224
|
-
} else {
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
head.appendChild(style);
|
|
218
|
+
// const css = 'pre {white-space: pre-wrap}',
|
|
219
|
+
// head = editorObj.doc.head || editorObj.doc.getElementsByTagName('head')[0],
|
|
220
|
+
// style = document.createElement('style');
|
|
221
|
+
// style.type = 'text/css';
|
|
222
|
+
// if (style.styleSheet) {
|
|
223
|
+
// style.styleSheet.cssText = css;
|
|
224
|
+
// } else {
|
|
225
|
+
// style.appendChild(editorObj.doc.createTextNode(css));
|
|
226
|
+
// }
|
|
227
|
+
// head.appendChild(style);
|
|
228
|
+
|
|
228
229
|
editorCallback && editorCallback(editorObj);
|
|
229
230
|
var iframe = (0, _selectn["default"])('iframe.contentDocument.body', editorObj) || null;
|
|
230
231
|
var iframeHead = (0, _selectn["default"])('iframe.contentDocument.head', editorObj) || null;
|