trepur_components 0.2.58 → 0.2.61

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.
@@ -9,6 +9,8 @@ exports.default = void 0;
9
9
 
10
10
  require("core-js/modules/web.dom-collections.iterator.js");
11
11
 
12
+ require("core-js/modules/es.json.stringify.js");
13
+
12
14
  var _react = _interopRequireWildcard(require("react"));
13
15
 
14
16
  var _Input = _interopRequireDefault(require("../Input"));
@@ -46,6 +48,7 @@ const TextAndTitle = _ref => {
46
48
  withLiveUpdates = false,
47
49
  onSave
48
50
  } = _ref;
51
+ console.log('children: ', children);
49
52
  const [isInEditingMode, setIsInEditingMode] = (0, _react.useState)(false);
50
53
  const [titleText, setTitleText] = (0, _react.useState)(title);
51
54
  const [isHovering, setIsHovering] = (0, _react.useState)(false);
@@ -94,6 +97,19 @@ const TextAndTitle = _ref => {
94
97
  withLiveUpdates && setIsHovering(!isHovering);
95
98
  };
96
99
 
100
+ const destructChildren = children => {
101
+ let data = '';
102
+ children && children.map(child => {
103
+ const obj = JSON.parse(JSON.stringify(child));
104
+ console.log(obj);
105
+ obj.props.children[0].props.childen.map(item => {
106
+ console.log('item: ', item);
107
+ if (item.props) data += item.props.children;else data += item;
108
+ });
109
+ });
110
+ return data;
111
+ };
112
+
97
113
  return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
98
114
  id: id
99
115
  }, {
@@ -109,7 +125,7 @@ const TextAndTitle = _ref => {
109
125
  type: "text"
110
126
  }), /*#__PURE__*/_react.default.createElement(_Input.default, {
111
127
  classes: "py-4",
112
- value: '',
128
+ value: destructChildren(children),
113
129
  onChange: e => handleChange(e),
114
130
  type: "text"
115
131
  }), /*#__PURE__*/_react.default.createElement(_Button.default, {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.2.58",
5
+ "version": "0.2.61",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",