@fonixtree/magic-design 0.1.66 → 0.1.68

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.
@@ -7,8 +7,6 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
10
- var _uuid = require("uuid");
11
-
12
10
  var _pc = _interopRequireDefault(require("./pc"));
13
11
 
14
12
  var _mobile = _interopRequireDefault(require("./mobile"));
@@ -68,31 +66,29 @@ function (_super) {
68
66
 
69
67
  function Video() {
70
68
  return _super !== null && _super.apply(this, arguments) || this;
71
- }
69
+ } // componentWillMount() {
70
+ // console.log('--video WillMount');
71
+ // // 兼容新开发的功能: video新增播放按钮 的设置
72
+ // const { nodeData } = this.props;
73
+ // if (nodeData.groupSource && nodeData.groupSource.length > 0) {
74
+ // nodeData.groupSource.forEach(group => {
75
+ // if (!group.playIcon) {
76
+ // console.log('--video add group.playIcon ');
77
+ // group.playIcon = {
78
+ // open: true,
79
+ // parentId: group.id,
80
+ // id: uuidv4(),
81
+ // type: 'PLAY',
82
+ // size: 48,
83
+ // pcSize: 60,
84
+ // iconType: 'light-playicon-01',
85
+ // iconColor: 'Light',
86
+ // };
87
+ // }
88
+ // });
89
+ // }
90
+ // }
72
91
 
73
- Video.prototype.componentWillMount = function () {
74
- console.log('--video WillMount'); // 兼容新开发的功能: video新增播放按钮 的设置
75
-
76
- var nodeData = this.props.nodeData;
77
-
78
- if (nodeData.groupSource && nodeData.groupSource.length > 0) {
79
- nodeData.groupSource.forEach(function (group) {
80
- if (!group.playIcon) {
81
- console.log('--video add group.playIcon ');
82
- group.playIcon = {
83
- open: true,
84
- parentId: group.id,
85
- id: (0, _uuid.v4)(),
86
- type: 'PLAY',
87
- size: 48,
88
- pcSize: 60,
89
- iconType: 'light-playicon-01',
90
- iconColor: 'Light'
91
- };
92
- }
93
- });
94
- }
95
- };
96
92
 
97
93
  Video.prototype.render = function () {
98
94
  var nodeData = this.props.nodeData; // console.log('---Video', nodeData);
@@ -614,8 +614,8 @@ function (_super) {
614
614
  var pageData = props.pageData,
615
615
  config = props.config,
616
616
  outputType = props.outputType,
617
- locale = props.locale;
618
- (0, _commonUtil.compatibleNewPageData)(pageData);
617
+ locale = props.locale; // console.log('constructor-- pageData', pageData);
618
+
619
619
  var MPageData = pageData.childNodes || [];
620
620
  _this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
621
621
 
@@ -666,6 +666,12 @@ function (_super) {
666
666
  var pageData = nextProps.pageData,
667
667
  config = nextProps.config;
668
668
  var MPageData = pageData.childNodes || [];
669
+ console.log('componentWillReceiveProps-- pageData', pageData);
670
+
671
+ if (pageData === null || pageData === void 0 ? void 0 : pageData.childNodes) {
672
+ (0, _commonUtil.compatibleNewPageData)(pageData);
673
+ }
674
+
669
675
  this.history = new _History["default"](MPageData);
670
676
  this.setState({
671
677
  MPageData: MPageData
@@ -786,7 +786,6 @@ var compatibleNewPageData = function compatibleNewPageData(pageData) {
786
786
  console.log('--compatibleNewPageData -- video ');
787
787
  child.groupSource.forEach(function (group) {
788
788
  if (!group.playIcon) {
789
- console.log('--compatibleNewPageData -- video add group.playIcon ');
790
789
  group.playIcon = {
791
790
  open: true,
792
791
  parentId: group.id,
@@ -799,6 +798,7 @@ var compatibleNewPageData = function compatibleNewPageData(pageData) {
799
798
  };
800
799
  }
801
800
  });
801
+ console.log('--compatibleNewPageData -- video add group.playIcon ', child.groupSource);
802
802
  }
803
803
  });
804
804
  }
@@ -7,8 +7,6 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
10
- var _uuid = require("uuid");
11
-
12
10
  var _pc = _interopRequireDefault(require("./pc"));
13
11
 
14
12
  var _mobile = _interopRequireDefault(require("./mobile"));
@@ -68,31 +66,29 @@ function (_super) {
68
66
 
69
67
  function Video() {
70
68
  return _super !== null && _super.apply(this, arguments) || this;
71
- }
69
+ } // componentWillMount() {
70
+ // console.log('--video WillMount');
71
+ // // 兼容新开发的功能: video新增播放按钮 的设置
72
+ // const { nodeData } = this.props;
73
+ // if (nodeData.groupSource && nodeData.groupSource.length > 0) {
74
+ // nodeData.groupSource.forEach(group => {
75
+ // if (!group.playIcon) {
76
+ // console.log('--video add group.playIcon ');
77
+ // group.playIcon = {
78
+ // open: true,
79
+ // parentId: group.id,
80
+ // id: uuidv4(),
81
+ // type: 'PLAY',
82
+ // size: 48,
83
+ // pcSize: 60,
84
+ // iconType: 'light-playicon-01',
85
+ // iconColor: 'Light',
86
+ // };
87
+ // }
88
+ // });
89
+ // }
90
+ // }
72
91
 
73
- Video.prototype.componentWillMount = function () {
74
- console.log('--video WillMount'); // 兼容新开发的功能: video新增播放按钮 的设置
75
-
76
- var nodeData = this.props.nodeData;
77
-
78
- if (nodeData.groupSource && nodeData.groupSource.length > 0) {
79
- nodeData.groupSource.forEach(function (group) {
80
- if (!group.playIcon) {
81
- console.log('--video add group.playIcon ');
82
- group.playIcon = {
83
- open: true,
84
- parentId: group.id,
85
- id: (0, _uuid.v4)(),
86
- type: 'PLAY',
87
- size: 48,
88
- pcSize: 60,
89
- iconType: 'light-playicon-01',
90
- iconColor: 'Light'
91
- };
92
- }
93
- });
94
- }
95
- };
96
92
 
97
93
  Video.prototype.render = function () {
98
94
  var nodeData = this.props.nodeData; // console.log('---Video', nodeData);
@@ -614,8 +614,8 @@ function (_super) {
614
614
  var pageData = props.pageData,
615
615
  config = props.config,
616
616
  outputType = props.outputType,
617
- locale = props.locale;
618
- (0, _commonUtil.compatibleNewPageData)(pageData);
617
+ locale = props.locale; // console.log('constructor-- pageData', pageData);
618
+
619
619
  var MPageData = pageData.childNodes || [];
620
620
  _this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
621
621
 
@@ -666,6 +666,12 @@ function (_super) {
666
666
  var pageData = nextProps.pageData,
667
667
  config = nextProps.config;
668
668
  var MPageData = pageData.childNodes || [];
669
+ console.log('componentWillReceiveProps-- pageData', pageData);
670
+
671
+ if (pageData === null || pageData === void 0 ? void 0 : pageData.childNodes) {
672
+ (0, _commonUtil.compatibleNewPageData)(pageData);
673
+ }
674
+
669
675
  this.history = new _History["default"](MPageData);
670
676
  this.setState({
671
677
  MPageData: MPageData
@@ -786,7 +786,6 @@ var compatibleNewPageData = function compatibleNewPageData(pageData) {
786
786
  console.log('--compatibleNewPageData -- video ');
787
787
  child.groupSource.forEach(function (group) {
788
788
  if (!group.playIcon) {
789
- console.log('--compatibleNewPageData -- video add group.playIcon ');
790
789
  group.playIcon = {
791
790
  open: true,
792
791
  parentId: group.id,
@@ -799,6 +798,7 @@ var compatibleNewPageData = function compatibleNewPageData(pageData) {
799
798
  };
800
799
  }
801
800
  });
801
+ console.log('--compatibleNewPageData -- video add group.playIcon ', child.groupSource);
802
802
  }
803
803
  });
804
804
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.66",
4
+ "version": "0.1.68",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",