wapplr 1.0.45 → 1.0.49

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.
@@ -44,22 +44,35 @@ function createDefaultContentManager() {
44
44
  contents = contentManager.contents;
45
45
  content = contentName && contents[contentName] ? (0, _objectSpread2["default"])({}, contents[contentName]) : null;
46
46
 
47
- if (!(content && content.request)) {
47
+ if (!contentManager.firstRequest) {
48
48
  _context.next = 8;
49
49
  break;
50
50
  }
51
51
 
52
52
  _context.next = 8;
53
- return content.request({
53
+ return contentManager.firstRequest({
54
54
  wapp: wapp,
55
55
  req: req,
56
56
  res: res
57
57
  });
58
58
 
59
59
  case 8:
60
+ if (!(content && content.request)) {
61
+ _context.next = 11;
62
+ break;
63
+ }
64
+
65
+ _context.next = 11;
66
+ return content.request({
67
+ wapp: wapp,
68
+ req: req,
69
+ res: res
70
+ });
71
+
72
+ case 11:
60
73
  return _context.abrupt("return", content);
61
74
 
62
- case 9:
75
+ case 12:
63
76
  case "end":
64
77
  return _context.stop();
65
78
  }
@@ -211,6 +224,9 @@ function createDefaultContentManager() {
211
224
  }),
212
225
  getComponent: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _utils.defaultDescriptor), {}, {
213
226
  value: defaultGetComponent
227
+ }),
228
+ firstRequest: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _utils.defaultDescriptor), {}, {
229
+ value: null
214
230
  })
215
231
  });
216
232
  return contentManager;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const tokens = {"log":"log_22skC","logo":"log_1z5J7"};
6
- tokens._getCss = function () {return `/* imported from log.css */ .log_22skC { display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 16px; width: 100%; height: 100%; position: absolute; } .log_1z5J7 { height: 128px; max-width: 100%; } .log_22skC > div { width: 100%; text-align: center; } `;};
5
+ const tokens = {"log":"log_3MWuJ","logo":"log_36siB"};
6
+ tokens._getCss = function () {return `/* imported from log.css */ .log_3MWuJ { display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 16px; width: 100%; height: 100%; position: absolute; } .log_36siB { height: 128px; max-width: 100%; } .log_3MWuJ > div { width: 100%; text-align: center; } `;};
7
7
  tokens._module = (typeof module !== "undefined") ? module : {id:"./common/log/log_css.js"};
8
8
  exports["default"] = tokens;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const tokens = {"logo":"logo_nn0MV","icon":"logo_1jj_J","svg":"logo_Kj3Lv"};
6
- tokens._getCss = function () {return `/* imported from logo.css */ .logo_nn0MV { height: 100%; width: auto; display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; } .logo_1jj_J { height: 90%; width: auto; } .logo_Kj3Lv { height: 100%; width: auto; display: -ms-flexbox; display: flex; max-width: 100%; } .logo_Kj3Lv path{ fill: currentColor; } `;};
5
+ const tokens = {"logo":"logo_d_fdf","icon":"logo_1Trfm","svg":"logo_X5kuq"};
6
+ tokens._getCss = function () {return `/* imported from logo.css */ .logo_d_fdf { height: 100%; width: auto; display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; } .logo_1Trfm { height: 90%; width: auto; } .logo_X5kuq { height: 100%; width: auto; display: -ms-flexbox; display: flex; max-width: 100%; } .logo_X5kuq path{ fill: currentColor; } `;};
7
7
  tokens._module = (typeof module !== "undefined") ? module : {id:"./common/logo/logo_css.js"};
8
8
  exports["default"] = tokens;
@@ -144,7 +144,7 @@ function createDefaultRequestManager() {
144
144
  response = _context.sent;
145
145
 
146
146
  case 21:
147
- if (response && response.data) {
147
+ if (response && response.data && !response.errors && !response.error) {
148
148
  response = response.data;
149
149
  }
150
150
 
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const tokens = {"app":"app_1jDDh"};
6
- tokens._getCss = function () {return `/* imported from app.css */ body { margin: 0; padding: 0; max-width: 100vw; overflow-x: hidden; } * { -webkit-box-sizing: border-box; box-sizing: border-box; } .app_1jDDh { font-size: 14px; color: rgba(0,0,0,0.87); display: block; position: relative; overflow-x: hidden; } div.app_1jDDh > * { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } @media (orientation: portrait) { .app_1jDDh { max-width: 100vh; } } `;};
5
+ const tokens = {"app":"app_TgHI7"};
6
+ tokens._getCss = function () {return `/* imported from app.css */ body { margin: 0; padding: 0; max-width: 100vw; overflow-x: hidden; } * { -webkit-box-sizing: border-box; box-sizing: border-box; } .app_TgHI7 { font-size: 14px; color: rgba(0,0,0,0.87); display: block; position: relative; overflow-x: hidden; } div.app_TgHI7 > * { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } @media (orientation: portrait) { .app_TgHI7 { max-width: 100vh; } } `;};
7
7
  tokens._module = (typeof module !== "undefined") ? module : {id:"./common/template/app_css.js"};
8
8
  exports["default"] = tokens;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const tokens = {"page":"template_2Xa8-","header":"template_3YAtu","sticky":"template_3VZZR","innerHeader":"template_368k6","logo":"template_K8VJE","content":"template_2Fgqj","footer":"template_21lie","menu":"template_1BoA5","button":"template_3ZxC8","copyright":"template_3bU4k"};
6
- tokens._getCss = function () {return `/* imported from template.css */ .template_2Xa8- { display: block; position: relative; overflow-x: hidden; overflow-y: hidden; min-height: 100vh; max-width: 100vw; } .template_3YAtu { display: block; position: fixed; width: 100%; height: 64px; padding: 6px; background: white; z-index: 1; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; -o-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; } .template_3YAtu.template_3VZZR { -webkit-box-shadow: 0 2px 3px rgba(62, 62, 62, 0.15); box-shadow: 0 2px 3px rgba(62, 62, 62, 0.15); } .template_368k6 { display: block; width: 100%; height: 100%; position: relative; overflow: hidden; } .template_3YAtu .template_K8VJE { height: 52px; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; -o-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; margin-top: 100%; } .template_3YAtu.template_3VZZR .template_K8VJE { margin-top: 0; } .template_2Fgqj { min-height: 100vh; position: relative; padding-top: 64px; } .template_21lie { display: -ms-flexbox; display: flex; min-height: 128px; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; } .template_1BoA5 { } .template_1BoA5 > div { } .template_21lie .template_1BoA5 { -ms-flex-pack: center; justify-content: center; display: -ms-flexbox; display: flex; } .template_21lie .template_1BoA5 > div { display: inline-block; } .template_3ZxC8 { color: rgba(0, 0, 0, 0.87); padding: 6px 16px; font-size: 14px; font-size: 0.875rem; min-width: 64px; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; -o-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; line-height: 1.75; border-radius: 4px; letter-spacing: 0.02857em; text-transform: uppercase; font-weight: bold; border: 0; cursor: pointer; margin: 0; display: -ms-inline-flexbox; display: inline-flex; outline: 0; position: relative; -ms-flex-align: center; align-items: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; vertical-align: middle; -ms-flex-pack: center; justify-content: center; text-decoration: none; background-color: transparent; text-align: center; } a.template_3ZxC8 { text-decoration: none; } .template_3bU4k { font-size: 12px; margin: 24px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } `;};
5
+ const tokens = {"page":"template_3HXPB","header":"template_3ck2q","sticky":"template_2Nz4A","innerHeader":"template_3nJPj","logo":"template_rKBgA","content":"template_1zK-k","footer":"template_3Rlwa","menu":"template_1r1_q","button":"template_1iINl","copyright":"template_3y44t"};
6
+ tokens._getCss = function () {return `/* imported from template.css */ .template_3HXPB { display: block; position: relative; overflow-x: hidden; overflow-y: hidden; min-height: 100vh; max-width: 100vw; } .template_3ck2q { display: block; position: fixed; width: 100%; height: 64px; padding: 6px; background: white; z-index: 1; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; -o-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; } .template_3ck2q.template_2Nz4A { -webkit-box-shadow: 0 2px 3px rgba(62, 62, 62, 0.15); box-shadow: 0 2px 3px rgba(62, 62, 62, 0.15); } .template_3nJPj { display: block; width: 100%; height: 100%; position: relative; overflow: hidden; } .template_3ck2q .template_rKBgA { height: 52px; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; -o-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; margin-top: 100%; } .template_3ck2q.template_2Nz4A .template_rKBgA { margin-top: 0; } .template_1zK-k { min-height: 100vh; position: relative; padding-top: 64px; } .template_3Rlwa { display: -ms-flexbox; display: flex; min-height: 128px; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; } .template_1r1_q { } .template_1r1_q > div { } .template_3Rlwa .template_1r1_q { -ms-flex-pack: center; justify-content: center; display: -ms-flexbox; display: flex; } .template_3Rlwa .template_1r1_q > div { display: inline-block; } .template_1iINl { color: rgba(0, 0, 0, 0.87); padding: 6px 16px; font-size: 14px; font-size: 0.875rem; min-width: 64px; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; -o-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; line-height: 1.75; border-radius: 4px; letter-spacing: 0.02857em; text-transform: uppercase; font-weight: bold; border: 0; cursor: pointer; margin: 0; display: -ms-inline-flexbox; display: inline-flex; outline: 0; position: relative; -ms-flex-align: center; align-items: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; vertical-align: middle; -ms-flex-pack: center; justify-content: center; text-decoration: none; background-color: transparent; text-align: center; } a.template_1iINl { text-decoration: none; } .template_3y44t { font-size: 12px; margin: 24px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } `;};
7
7
  tokens._module = (typeof module !== "undefined") ? module : {id:"./common/template/template_css.js"};
8
8
  exports["default"] = tokens;
@@ -30,7 +30,7 @@ function html(_ref) {
30
30
  _config$appStyle = config.appStyle,
31
31
  appStyle = _config$appStyle === void 0 ? style : _config$appStyle;
32
32
  var _res$wappResponse = res.wappResponse,
33
- state = _res$wappResponse.state,
33
+ store = _res$wappResponse.store,
34
34
  _res$wappResponse$con = _res$wappResponse.content,
35
35
  content = _res$wappResponse$con === void 0 ? {} : _res$wappResponse$con,
36
36
  _res$wappResponse$sta = _res$wappResponse.statusCode,
@@ -39,6 +39,7 @@ function html(_ref) {
39
39
  containerElementId = _res$wappResponse$con2 === void 0 ? "app" : _res$wappResponse$con2,
40
40
  _res$wappResponse$app = _res$wappResponse.appStateName,
41
41
  appStateName = _res$wappResponse$app === void 0 ? "APP_STATE" : _res$wappResponse$app;
42
+ var state = store ? store.getState() : {};
42
43
  var _content$render = content.render,
43
44
  render = _content$render === void 0 ? "" : _content$render,
44
45
  _content$title = content.title,
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "files": [
23
23
  "dist/*"
24
24
  ],
25
- "version": "1.0.45",
25
+ "version": "1.0.49",
26
26
  "main": "dist/server",
27
27
  "browser": "dist/client",
28
28
  "repository": {