@fonixtree/magic-design 1.0.200 → 1.0.202

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.
@@ -31,6 +31,8 @@ var _mobx = require("../../../../../mobx");
31
31
 
32
32
  var _locale = require("../../../../../locale");
33
33
 
34
+ var _androidUtil = require("../../../../../utils/androidUtil");
35
+
34
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
37
 
36
38
  var __extends = void 0 && (void 0).__extends || function () {
@@ -151,10 +153,13 @@ function (_super) {
151
153
  autoplay = false;
152
154
  }
153
155
 
156
+ var hasAppBack = (0, _androidUtil.browserVersion)().isDitoApp && (0, _androidUtil.browserVersion)().isDitoMain || window.magicDesign.designMode;
154
157
  return /*#__PURE__*/_react["default"].createElement("div", {
155
158
  className: "m-search-banner-mobile"
156
159
  }, /*#__PURE__*/_react["default"].createElement("div", {
157
- className: "search-bar"
160
+ className: (0, _classnames["default"])('search-bar', {
161
+ with_app_back: hasAppBack
162
+ })
158
163
  }, /*#__PURE__*/_react["default"].createElement("div", {
159
164
  className: "right"
160
165
  }, data.content && ((_a = data.content.box) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement("div", {
@@ -9,9 +9,13 @@
9
9
  flex-direction: row-reverse;
10
10
  align-items: center;
11
11
  justify-content: space-between;
12
- width: 100%;
13
12
  position: absolute;
14
13
  z-index: 2;
14
+ width: 100%;
15
+ }
16
+ .m-search-banner-mobile .search-bar.with_app_back {
17
+ width: calc(100% - 0.7rem);
18
+ margin-left: 0.7rem;
15
19
  }
16
20
  .m-search-banner-mobile .search-bar .right {
17
21
  display: flex;
@@ -76,6 +76,8 @@
76
76
  display: flex;
77
77
  align-items: center;
78
78
  justify-content: center;
79
+ margin-left: 13px;
80
+ margin-top: 8px;
79
81
  }
80
82
  }
81
83
  }
@@ -201,13 +201,14 @@ var Renderer = function Renderer(props) {
201
201
  };
202
202
  };
203
203
 
204
+ console.log('window.magicDesign.designMode', window.magicDesign.designMode);
204
205
  return /*#__PURE__*/_react["default"].createElement("div", {
205
206
  className: "render_wrap",
206
207
  magic_design: "",
207
208
  style: __assign({
208
209
  background: pageBackground
209
210
  }, getRestStyle())
210
- }, floors.length > 0 && device === 'mobile' && /*#__PURE__*/_react["default"].createElement("div", {
211
+ }, floors.length > 0 && device === 'mobile' && window.magicDesign.designMode && /*#__PURE__*/_react["default"].createElement("div", {
211
212
  className: "btn_app_back"
212
213
  }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
213
214
  color: "#fff",
@@ -27,7 +27,8 @@ var browserVersion = function browserVersion() {
27
27
  isDitoApp: u.indexOf('mydito') > -1,
28
28
  ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
29
29
  ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
30
- isAshitaApp: u.indexOf('app/ASHITA-APP') > -1
30
+ isAshitaApp: u.indexOf('app/ASHITA-APP') > -1,
31
+ isDitoMain: ['/', '/main/home'].includes(window.location.pathname)
31
32
  };
32
33
  };
33
34
 
@@ -31,6 +31,8 @@ var _mobx = require("../../../../../mobx");
31
31
 
32
32
  var _locale = require("../../../../../locale");
33
33
 
34
+ var _androidUtil = require("../../../../../utils/androidUtil");
35
+
34
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
37
 
36
38
  var __extends = void 0 && (void 0).__extends || function () {
@@ -151,10 +153,13 @@ function (_super) {
151
153
  autoplay = false;
152
154
  }
153
155
 
156
+ var hasAppBack = (0, _androidUtil.browserVersion)().isDitoApp && (0, _androidUtil.browserVersion)().isDitoMain || window.magicDesign.designMode;
154
157
  return /*#__PURE__*/_react["default"].createElement("div", {
155
158
  className: "m-search-banner-mobile"
156
159
  }, /*#__PURE__*/_react["default"].createElement("div", {
157
- className: "search-bar"
160
+ className: (0, _classnames["default"])('search-bar', {
161
+ with_app_back: hasAppBack
162
+ })
158
163
  }, /*#__PURE__*/_react["default"].createElement("div", {
159
164
  className: "right"
160
165
  }, data.content && ((_a = data.content.box) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement("div", {
@@ -9,9 +9,13 @@
9
9
  flex-direction: row-reverse;
10
10
  align-items: center;
11
11
  justify-content: space-between;
12
- width: 100%;
13
12
  position: absolute;
14
13
  z-index: 2;
14
+ width: 100%;
15
+ }
16
+ .m-search-banner-mobile .search-bar.with_app_back {
17
+ width: calc(100% - 0.7rem);
18
+ margin-left: 0.7rem;
15
19
  }
16
20
  .m-search-banner-mobile .search-bar .right {
17
21
  display: flex;
@@ -76,6 +76,8 @@
76
76
  display: flex;
77
77
  align-items: center;
78
78
  justify-content: center;
79
+ margin-left: 13px;
80
+ margin-top: 8px;
79
81
  }
80
82
  }
81
83
  }
@@ -201,13 +201,14 @@ var Renderer = function Renderer(props) {
201
201
  };
202
202
  };
203
203
 
204
+ console.log('window.magicDesign.designMode', window.magicDesign.designMode);
204
205
  return /*#__PURE__*/_react["default"].createElement("div", {
205
206
  className: "render_wrap",
206
207
  magic_design: "",
207
208
  style: __assign({
208
209
  background: pageBackground
209
210
  }, getRestStyle())
210
- }, floors.length > 0 && device === 'mobile' && /*#__PURE__*/_react["default"].createElement("div", {
211
+ }, floors.length > 0 && device === 'mobile' && window.magicDesign.designMode && /*#__PURE__*/_react["default"].createElement("div", {
211
212
  className: "btn_app_back"
212
213
  }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
213
214
  color: "#fff",
@@ -27,7 +27,8 @@ var browserVersion = function browserVersion() {
27
27
  isDitoApp: u.indexOf('mydito') > -1,
28
28
  ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
29
29
  ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
30
- isAshitaApp: u.indexOf('app/ASHITA-APP') > -1
30
+ isAshitaApp: u.indexOf('app/ASHITA-APP') > -1,
31
+ isDitoMain: ['/', '/main/home'].includes(window.location.pathname)
31
32
  };
32
33
  };
33
34
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.200",
4
+ "version": "1.0.202",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",