hexo-component-inferno 2.0.0 → 2.0.2

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.
Files changed (89) hide show
  1. package/lib/core/migrate.js +10 -28
  2. package/lib/core/migrate.test.js +10 -12
  3. package/lib/core/schema.js +33 -109
  4. package/lib/core/schema.test.js +2 -6
  5. package/lib/core/view.js +3 -10
  6. package/lib/core/view.test.js +0 -7
  7. package/lib/hexo/filter/locals.js +3 -18
  8. package/lib/hexo/filter/locals.test.js +2 -19
  9. package/lib/hexo/generator/assets.js +2 -8
  10. package/lib/hexo/generator/assets.test.js +0 -4
  11. package/lib/hexo/generator/categories.test.js +0 -3
  12. package/lib/hexo/generator/category.js +1 -6
  13. package/lib/hexo/generator/category.test.js +0 -5
  14. package/lib/hexo/generator/insight.js +1 -9
  15. package/lib/hexo/generator/insight.test.js +0 -3
  16. package/lib/hexo/generator/manifest.js +0 -3
  17. package/lib/hexo/generator/manifest.test.js +0 -3
  18. package/lib/hexo/generator/tags.test.js +0 -3
  19. package/lib/hexo/helper/cdn.js +6 -19
  20. package/lib/hexo/helper/cdn.test.js +0 -3
  21. package/lib/hexo/helper/page.test.js +0 -3
  22. package/lib/hexo/tag/message.js +0 -8
  23. package/lib/hexo/tag/message.test.js +0 -7
  24. package/lib/hexo/tag/tabs.js +17 -48
  25. package/lib/hexo/tag/tabs.test.js +0 -8
  26. package/lib/util/cache.js +0 -11
  27. package/lib/util/cache.test.js +0 -4
  28. package/lib/util/classname.js +0 -3
  29. package/lib/util/classname.test.js +0 -1
  30. package/lib/util/yaml.js +2 -7
  31. package/lib/util/yaml.test.js +0 -4
  32. package/lib/view/comment/changyan.js +12 -31
  33. package/lib/view/comment/disqus.js +11 -32
  34. package/lib/view/comment/disqusjs.js +22 -43
  35. package/lib/view/comment/facebook.js +9 -28
  36. package/lib/view/comment/gitalk.js +28 -49
  37. package/lib/view/comment/gitment.js +15 -37
  38. package/lib/view/comment/isso.js +6 -27
  39. package/lib/view/comment/livere.js +6 -27
  40. package/lib/view/comment/twikoo.js +14 -33
  41. package/lib/view/comment/utterances.js +17 -45
  42. package/lib/view/comment/valine.js +39 -60
  43. package/lib/view/comment/waline.js +45 -66
  44. package/lib/view/common/article_media.js +11 -28
  45. package/lib/view/donate/afdian.js +9 -30
  46. package/lib/view/donate/alipay.js +9 -30
  47. package/lib/view/donate/buymeacoffee.js +9 -30
  48. package/lib/view/donate/patreon.js +9 -30
  49. package/lib/view/donate/paypal.js +10 -31
  50. package/lib/view/donate/wechat.js +9 -30
  51. package/lib/view/misc/article_licensing.js +21 -43
  52. package/lib/view/misc/meta.js +7 -34
  53. package/lib/view/misc/open_graph.js +25 -67
  54. package/lib/view/misc/paginator.js +12 -36
  55. package/lib/view/misc/structured_data.js +16 -43
  56. package/lib/view/misc/web_app.js +15 -49
  57. package/lib/view/plugin/baidu_analytics.js +7 -28
  58. package/lib/view/plugin/bing_webmaster.js +7 -28
  59. package/lib/view/plugin/busuanzi.js +6 -26
  60. package/lib/view/plugin/cnzz.js +9 -30
  61. package/lib/view/plugin/cookie_consent.js +28 -49
  62. package/lib/view/plugin/gallery.js +10 -31
  63. package/lib/view/plugin/google_analytics.js +7 -28
  64. package/lib/view/plugin/hotjar.js +7 -28
  65. package/lib/view/plugin/katex.js +11 -32
  66. package/lib/view/plugin/mathjax.js +7 -28
  67. package/lib/view/plugin/outdated_browser.js +10 -31
  68. package/lib/view/plugin/progressbar.js +7 -28
  69. package/lib/view/plugin/statcounter.js +10 -31
  70. package/lib/view/plugin/twitter_conversion_tracking.js +7 -28
  71. package/lib/view/search/algolia.js +14 -35
  72. package/lib/view/search/baidu.js +9 -28
  73. package/lib/view/search/google_cse.js +10 -30
  74. package/lib/view/search/insight.js +9 -28
  75. package/lib/view/share/addthis.js +6 -27
  76. package/lib/view/share/addtoany.js +6 -25
  77. package/lib/view/share/bdshare.js +6 -25
  78. package/lib/view/share/sharejs.js +8 -27
  79. package/lib/view/share/sharethis.js +6 -27
  80. package/lib/view/widget/adsense.js +11 -32
  81. package/lib/view/widget/archives.js +24 -51
  82. package/lib/view/widget/categories.js +23 -57
  83. package/lib/view/widget/followit.js +12 -31
  84. package/lib/view/widget/links.js +10 -32
  85. package/lib/view/widget/recent_posts.js +14 -36
  86. package/lib/view/widget/subscribe_email.js +12 -31
  87. package/lib/view/widget/tags.js +16 -39
  88. package/lib/view/widget/toc.js +26 -66
  89. package/package.json +1 -1
@@ -1,41 +1,30 @@
1
1
  "use strict";
2
2
 
3
3
  var _inferno = require("inferno");
4
-
5
4
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
6
-
7
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
-
9
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
-
6
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
7
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
-
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
10
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
-
15
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
-
17
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
-
19
13
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
-
21
14
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
-
23
15
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
-
25
16
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
-
27
17
  /**
28
18
  * External links widget JSX component.
29
19
  * @module view/widget/links
30
20
  */
31
21
  var _require = require('url'),
32
- URL = _require.URL;
33
-
22
+ URL = _require.URL;
34
23
  var _require2 = require('inferno'),
35
- Component = _require2.Component;
36
-
24
+ Component = _require2.Component;
37
25
  var _require3 = require('../../util/cache'),
38
- cacheComponent = _require3.cacheComponent;
26
+ cacheComponent = _require3.cacheComponent;
27
+
39
28
  /**
40
29
  * External links widget JSX component.
41
30
  *
@@ -50,25 +39,19 @@ var _require3 = require('../../util/cache'),
50
39
  * }
51
40
  * }} />
52
41
  */
53
-
54
-
55
42
  var Links = /*#__PURE__*/function (_Component) {
56
43
  _inherits(Links, _Component);
57
-
58
44
  var _super = _createSuper(Links);
59
-
60
45
  function Links() {
61
46
  _classCallCheck(this, Links);
62
-
63
47
  return _super.apply(this, arguments);
64
48
  }
65
-
66
49
  _createClass(Links, [{
67
50
  key: "render",
68
51
  value: function render() {
69
52
  var _this$props = this.props,
70
- title = _this$props.title,
71
- links = _this$props.links;
53
+ title = _this$props.title,
54
+ links = _this$props.links;
72
55
  return (0, _inferno.createVNode)(1, "div", "card widget", (0, _inferno.createVNode)(1, "div", "card-content", (0, _inferno.createVNode)(1, "div", "menu", [(0, _inferno.createVNode)(1, "h3", "menu-label", title, 0), (0, _inferno.createVNode)(1, "ul", "menu-list", Object.keys(links).map(function (i) {
73
56
  var hostname = links[i];
74
57
  if (_typeof(hostname) === 'object') hostname = !hostname.hide_hostname;else try {
@@ -84,7 +67,6 @@ var Links = /*#__PURE__*/function (_Component) {
84
67
  });
85
68
  }
86
69
  }]);
87
-
88
70
  return Links;
89
71
  }(Component);
90
72
  /**
@@ -102,16 +84,12 @@ var Links = /*#__PURE__*/function (_Component) {
102
84
  * }}
103
85
  * helper={{ __: function() {...} }} />
104
86
  */
105
-
106
-
107
87
  Links.Cacheable = cacheComponent(Links, 'widget.links', function (props) {
108
88
  var helper = props.helper,
109
- widget = props.widget;
110
-
89
+ widget = props.widget;
111
90
  if (!Object.keys(widget.links).length) {
112
91
  return null;
113
92
  }
114
-
115
93
  return {
116
94
  title: helper.__('widget.links'),
117
95
  links: widget.links
@@ -1,40 +1,29 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  var _inferno = require("inferno");
6
-
7
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
-
9
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
-
6
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
7
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
-
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
10
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
-
15
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
-
17
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
-
19
13
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
-
21
14
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
-
23
15
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
-
25
16
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
-
27
17
  /**
28
18
  * Recent posts widget JSX component.
29
19
  * @module view/widget/recent_posts
30
20
  */
31
21
  var _require = require('inferno'),
32
- Component = _require.Component;
33
-
22
+ Component = _require.Component;
34
23
  var _require2 = require('../../util/cache'),
35
- cacheComponent = _require2.cacheComponent;
36
-
24
+ cacheComponent = _require2.cacheComponent;
37
25
  var ArticleMedia = require('../common/article_media');
26
+
38
27
  /**
39
28
  * Recent posts widget JSX component.
40
29
  *
@@ -52,25 +41,19 @@ var ArticleMedia = require('../common/article_media');
52
41
  * }
53
42
  * ]} />
54
43
  */
55
-
56
-
57
44
  var RecentPosts = /*#__PURE__*/function (_Component) {
58
45
  _inherits(RecentPosts, _Component);
59
-
60
46
  var _super = _createSuper(RecentPosts);
61
-
62
47
  function RecentPosts() {
63
48
  _classCallCheck(this, RecentPosts);
64
-
65
49
  return _super.apply(this, arguments);
66
50
  }
67
-
68
51
  _createClass(RecentPosts, [{
69
52
  key: "render",
70
53
  value: function render() {
71
54
  var _this$props = this.props,
72
- title = _this$props.title,
73
- posts = _this$props.posts;
55
+ title = _this$props.title,
56
+ posts = _this$props.posts;
74
57
  return (0, _inferno.createVNode)(1, "div", "card widget", (0, _inferno.createVNode)(1, "div", "card-content", [(0, _inferno.createVNode)(1, "h3", "menu-label", title, 0), posts.map(function (post) {
75
58
  return (0, _inferno.createComponentVNode)(2, ArticleMedia, {
76
59
  "thumbnail": post.thumbnail,
@@ -85,7 +68,6 @@ var RecentPosts = /*#__PURE__*/function (_Component) {
85
68
  });
86
69
  }
87
70
  }]);
88
-
89
71
  return RecentPosts;
90
72
  }(Component);
91
73
  /**
@@ -106,22 +88,18 @@ var RecentPosts = /*#__PURE__*/function (_Component) {
106
88
  * }}
107
89
  * limit={5} />
108
90
  */
109
-
110
-
111
91
  RecentPosts.Cacheable = cacheComponent(RecentPosts, 'widget.recentposts', function (props) {
112
92
  var site = props.site,
113
- helper = props.helper,
114
- _props$limit = props.limit,
115
- limit = _props$limit === void 0 ? 5 : _props$limit;
93
+ helper = props.helper,
94
+ _props$limit = props.limit,
95
+ limit = _props$limit === void 0 ? 5 : _props$limit;
116
96
  var url_for = helper.url_for,
117
- __ = helper.__,
118
- date_xml = helper.date_xml,
119
- date = helper.date;
120
-
97
+ __ = helper.__,
98
+ date_xml = helper.date_xml,
99
+ date = helper.date;
121
100
  if (!site.posts.length) {
122
101
  return null;
123
102
  }
124
-
125
103
  var posts = site.posts.sort('date', -1).limit(limit).map(function (post) {
126
104
  return {
127
105
  url: url_for(post.link || post.path),
@@ -1,38 +1,28 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  var _inferno = require("inferno");
6
-
7
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
-
9
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
-
6
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
7
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
-
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
10
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
-
15
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
-
17
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
-
19
13
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
-
21
14
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
-
23
15
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
-
25
16
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
-
27
17
  /**
28
18
  * Google FeedBurner widget JSX component.
29
19
  * @module view/widget/subscribe_email
30
20
  */
31
21
  var _require = require('inferno'),
32
- Component = _require.Component;
33
-
22
+ Component = _require.Component;
34
23
  var _require2 = require('../../util/cache'),
35
- cacheComponent = _require2.cacheComponent;
24
+ cacheComponent = _require2.cacheComponent;
25
+
36
26
  /**
37
27
  * Google FeedBurner widget JSX component.
38
28
  *
@@ -44,27 +34,21 @@ var _require2 = require('../../util/cache'),
44
34
  * feedburnerId="******"
45
35
  * buttonTitle="Subscribe now" />
46
36
  */
47
-
48
-
49
37
  var SubscribeEmail = /*#__PURE__*/function (_Component) {
50
38
  _inherits(SubscribeEmail, _Component);
51
-
52
39
  var _super = _createSuper(SubscribeEmail);
53
-
54
40
  function SubscribeEmail() {
55
41
  _classCallCheck(this, SubscribeEmail);
56
-
57
42
  return _super.apply(this, arguments);
58
43
  }
59
-
60
44
  _createClass(SubscribeEmail, [{
61
45
  key: "render",
62
46
  value: function render() {
63
47
  var _this$props = this.props,
64
- title = _this$props.title,
65
- description = _this$props.description,
66
- feedburnerId = _this$props.feedburnerId,
67
- buttonTitle = _this$props.buttonTitle;
48
+ title = _this$props.title,
49
+ description = _this$props.description,
50
+ feedburnerId = _this$props.feedburnerId,
51
+ buttonTitle = _this$props.buttonTitle;
68
52
  return (0, _inferno.createVNode)(1, "div", "card widget", (0, _inferno.createVNode)(1, "div", "card-content", (0, _inferno.createVNode)(1, "div", "menu", [(0, _inferno.createVNode)(1, "h3", "menu-label", title, 0), (0, _inferno.createVNode)(1, "form", null, [(0, _inferno.createVNode)(64, "input", null, null, 1, {
69
53
  "type": "hidden",
70
54
  "value": feedburnerId,
@@ -90,7 +74,6 @@ var SubscribeEmail = /*#__PURE__*/function (_Component) {
90
74
  });
91
75
  }
92
76
  }]);
93
-
94
77
  return SubscribeEmail;
95
78
  }(Component);
96
79
  /**
@@ -108,13 +91,11 @@ var SubscribeEmail = /*#__PURE__*/function (_Component) {
108
91
  * }}
109
92
  * helper={{ __: function() {...} }} />
110
93
  */
111
-
112
-
113
94
  SubscribeEmail.Cacheable = cacheComponent(SubscribeEmail, 'widget.subscribeemail', function (props) {
114
95
  var helper = props.helper,
115
- widget = props.widget;
96
+ widget = props.widget;
116
97
  var feedburner_id = widget.feedburner_id,
117
- description = widget.description;
98
+ description = widget.description;
118
99
  return {
119
100
  description: description,
120
101
  feedburnerId: feedburner_id,
@@ -1,38 +1,28 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  var _inferno = require("inferno");
6
-
7
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
-
9
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
-
6
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
7
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
-
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
10
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
-
15
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
-
17
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
-
19
13
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
-
21
14
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
-
23
15
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
-
25
16
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
-
27
17
  /**
28
18
  * Tags widget JSX component.
29
19
  * @module view/widget/tags
30
20
  */
31
21
  var _require = require('inferno'),
32
- Component = _require.Component;
33
-
22
+ Component = _require.Component;
34
23
  var _require2 = require('../../util/cache'),
35
- cacheComponent = _require2.cacheComponent;
24
+ cacheComponent = _require2.cacheComponent;
25
+
36
26
  /**
37
27
  * Tags widget JSX component.
38
28
  *
@@ -48,26 +38,20 @@ var _require2 = require('../../util/cache'),
48
38
  * }
49
39
  * ]} />
50
40
  */
51
-
52
-
53
41
  var Tags = /*#__PURE__*/function (_Component) {
54
42
  _inherits(Tags, _Component);
55
-
56
43
  var _super = _createSuper(Tags);
57
-
58
44
  function Tags() {
59
45
  _classCallCheck(this, Tags);
60
-
61
46
  return _super.apply(this, arguments);
62
47
  }
63
-
64
48
  _createClass(Tags, [{
65
49
  key: "render",
66
50
  value: function render() {
67
51
  var _this$props = this.props,
68
- tags = _this$props.tags,
69
- title = _this$props.title,
70
- showCount = _this$props.showCount;
52
+ tags = _this$props.tags,
53
+ title = _this$props.title,
54
+ showCount = _this$props.showCount;
71
55
  return (0, _inferno.createVNode)(1, "div", "card widget", (0, _inferno.createVNode)(1, "div", "card-content", (0, _inferno.createVNode)(1, "div", "menu", [(0, _inferno.createVNode)(1, "h3", "menu-label", title, 0), (0, _inferno.createVNode)(1, "div", "field is-grouped is-grouped-multiline", tags.map(function (tag) {
72
56
  return (0, _inferno.createVNode)(1, "div", "control", (0, _inferno.createVNode)(1, "a", "tags has-addons", [(0, _inferno.createVNode)(1, "span", "tag", tag.name, 0), showCount ? (0, _inferno.createVNode)(1, "span", "tag", tag.count, 0) : null], 0, {
73
57
  "href": tag.url
@@ -77,7 +61,6 @@ var Tags = /*#__PURE__*/function (_Component) {
77
61
  });
78
62
  }
79
63
  }]);
80
-
81
64
  return Tags;
82
65
  }(Component);
83
66
  /**
@@ -102,33 +85,27 @@ var Tags = /*#__PURE__*/function (_Component) {
102
85
  * show_count: true
103
86
  * }} />
104
87
  */
105
-
106
-
107
88
  Tags.Cacheable = cacheComponent(Tags, 'widget.tags', function (props) {
108
89
  var helper = props.helper,
109
- _props$widget = props.widget,
110
- widget = _props$widget === void 0 ? {} : _props$widget;
90
+ _props$widget = props.widget,
91
+ widget = _props$widget === void 0 ? {} : _props$widget;
111
92
  var _widget$order_by = widget.order_by,
112
- order_by = _widget$order_by === void 0 ? 'name' : _widget$order_by,
113
- amount = widget.amount,
114
- _widget$show_count = widget.show_count,
115
- show_count = _widget$show_count === void 0 ? true : _widget$show_count;
93
+ order_by = _widget$order_by === void 0 ? 'name' : _widget$order_by,
94
+ amount = widget.amount,
95
+ _widget$show_count = widget.show_count,
96
+ show_count = _widget$show_count === void 0 ? true : _widget$show_count;
116
97
  var tags = props.tags || props.site.tags;
117
98
  var url_for = helper.url_for,
118
- _p = helper._p;
119
-
99
+ _p = helper._p;
120
100
  if (!tags || !tags.length) {
121
101
  return null;
122
102
  }
123
-
124
103
  tags = tags.sort(order_by).filter(function (tag) {
125
104
  return tag.length;
126
105
  });
127
-
128
106
  if (amount) {
129
107
  tags = tags.limit(amount);
130
108
  }
131
-
132
109
  return {
133
110
  showCount: show_count,
134
111
  title: _p('common.tag', Infinity),