@mjhls/mjh-framework 1.0.0 → 1.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.
- package/README.md +7 -4
- package/dist/index.es.js +23 -108
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +26 -109
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,12 +15,15 @@ npm install --save mjh-framework
|
|
|
15
15
|
```jsx
|
|
16
16
|
import React, { Component } from 'react'
|
|
17
17
|
|
|
18
|
-
import
|
|
18
|
+
import { NavMagazine, DeckQueue } from 'mjh-framework'
|
|
19
19
|
|
|
20
|
-
class
|
|
21
|
-
render
|
|
20
|
+
export default class App extends Component {
|
|
21
|
+
render() {
|
|
22
22
|
return (
|
|
23
|
-
<
|
|
23
|
+
<div>
|
|
24
|
+
<NavMagazine />
|
|
25
|
+
<DeckQueue />
|
|
26
|
+
</div>
|
|
24
27
|
)
|
|
25
28
|
}
|
|
26
29
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,113 +1,28 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (insertAt === 'top') {
|
|
15
|
-
if (head.firstChild) {
|
|
16
|
-
head.insertBefore(style, head.firstChild);
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
} else {
|
|
21
|
-
head.appendChild(style);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (style.styleSheet) {
|
|
25
|
-
style.styleSheet.cssText = css;
|
|
26
|
-
} else {
|
|
27
|
-
style.appendChild(document.createTextNode(css));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var css = "/* add css styles here (optional) */\n\n.styles_test__3OKZ1 {\n display: inline-block;\n margin: 2em auto;\n border: 2px solid #000;\n font-size: 2em;\n}\n";
|
|
32
|
-
var styles = { "test": "styles_test__3OKZ1" };
|
|
33
|
-
styleInject(css);
|
|
34
|
-
|
|
35
|
-
var classCallCheck = function (instance, Constructor) {
|
|
36
|
-
if (!(instance instanceof Constructor)) {
|
|
37
|
-
throw new TypeError("Cannot call a class as a function");
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var createClass = function () {
|
|
42
|
-
function defineProperties(target, props) {
|
|
43
|
-
for (var i = 0; i < props.length; i++) {
|
|
44
|
-
var descriptor = props[i];
|
|
45
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
46
|
-
descriptor.configurable = true;
|
|
47
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
48
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return function (Constructor, protoProps, staticProps) {
|
|
53
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
54
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
55
|
-
return Constructor;
|
|
56
|
-
};
|
|
57
|
-
}();
|
|
58
|
-
|
|
59
|
-
var inherits = function (subClass, superClass) {
|
|
60
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
61
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
-
constructor: {
|
|
66
|
-
value: subClass,
|
|
67
|
-
enumerable: false,
|
|
68
|
-
writable: true,
|
|
69
|
-
configurable: true
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
var possibleConstructorReturn = function (self, call) {
|
|
76
|
-
if (!self) {
|
|
77
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var NavMagazine = function NavMagazine() {
|
|
4
|
+
return React.createElement(
|
|
5
|
+
'div',
|
|
6
|
+
null,
|
|
7
|
+
React.createElement(
|
|
8
|
+
'h1',
|
|
9
|
+
null,
|
|
10
|
+
'Magazine Navigation'
|
|
11
|
+
)
|
|
12
|
+
);
|
|
81
13
|
};
|
|
82
14
|
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
value: function render() {
|
|
94
|
-
var text = this.props.text;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return React.createElement(
|
|
98
|
-
'div',
|
|
99
|
-
{ className: styles.test },
|
|
100
|
-
'Example Component: ',
|
|
101
|
-
text
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
}]);
|
|
105
|
-
return ExampleComponent;
|
|
106
|
-
}(Component);
|
|
107
|
-
|
|
108
|
-
ExampleComponent.propTypes = {
|
|
109
|
-
text: PropTypes.string
|
|
15
|
+
var DeckQueue = function DeckQueue() {
|
|
16
|
+
return React.createElement(
|
|
17
|
+
'div',
|
|
18
|
+
null,
|
|
19
|
+
React.createElement(
|
|
20
|
+
'h1',
|
|
21
|
+
null,
|
|
22
|
+
'Dect Queue'
|
|
23
|
+
)
|
|
24
|
+
);
|
|
110
25
|
};
|
|
111
26
|
|
|
112
|
-
export
|
|
27
|
+
export { NavMagazine, DeckQueue };
|
|
113
28
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/navigation/NavMagazine.js","../src/deck/DeckQueue.js"],"sourcesContent":["import React from 'react'\r\n\r\nexport const NavMagazine = () => {\r\n return (\r\n <div>\r\n <h1>Magazine Navigation</h1>\r\n </div>\r\n )\r\n}\r\n","import React from 'react'\r\n\r\nexport const DeckQueue = () => {\r\n return (\r\n <div>\r\n <h1>Dect Queue</h1>\r\n </div>\r\n )\r\n}\r\n"],"names":["NavMagazine","DeckQueue"],"mappings":";;IAEaA,cAAc,SAAdA,WAAc,GAAM;SAE7B;;;;;;;;GADF;CADK;;ICAMC,YAAY,SAAZA,SAAY,GAAM;SAE3B;;;;;;;;GADF;CADK;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,118 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var React__default = _interopDefault(React);
|
|
7
|
-
var PropTypes = _interopDefault(require('prop-types'));
|
|
8
|
-
|
|
9
|
-
function styleInject(css, ref) {
|
|
10
|
-
if ( ref === void 0 ) ref = {};
|
|
11
|
-
var insertAt = ref.insertAt;
|
|
12
|
-
|
|
13
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
14
|
-
|
|
15
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
16
|
-
var style = document.createElement('style');
|
|
17
|
-
style.type = 'text/css';
|
|
18
|
-
|
|
19
|
-
if (insertAt === 'top') {
|
|
20
|
-
if (head.firstChild) {
|
|
21
|
-
head.insertBefore(style, head.firstChild);
|
|
22
|
-
} else {
|
|
23
|
-
head.appendChild(style);
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
head.appendChild(style);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (style.styleSheet) {
|
|
30
|
-
style.styleSheet.cssText = css;
|
|
31
|
-
} else {
|
|
32
|
-
style.appendChild(document.createTextNode(css));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var css = "/* add css styles here (optional) */\n\n.styles_test__3OKZ1 {\n display: inline-block;\n margin: 2em auto;\n border: 2px solid #000;\n font-size: 2em;\n}\n";
|
|
37
|
-
var styles = { "test": "styles_test__3OKZ1" };
|
|
38
|
-
styleInject(css);
|
|
39
|
-
|
|
40
|
-
var classCallCheck = function (instance, Constructor) {
|
|
41
|
-
if (!(instance instanceof Constructor)) {
|
|
42
|
-
throw new TypeError("Cannot call a class as a function");
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
var createClass = function () {
|
|
47
|
-
function defineProperties(target, props) {
|
|
48
|
-
for (var i = 0; i < props.length; i++) {
|
|
49
|
-
var descriptor = props[i];
|
|
50
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
51
|
-
descriptor.configurable = true;
|
|
52
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
53
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
56
4
|
|
|
57
|
-
|
|
58
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
59
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
60
|
-
return Constructor;
|
|
61
|
-
};
|
|
62
|
-
}();
|
|
63
|
-
|
|
64
|
-
var inherits = function (subClass, superClass) {
|
|
65
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
66
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
70
|
-
constructor: {
|
|
71
|
-
value: subClass,
|
|
72
|
-
enumerable: false,
|
|
73
|
-
writable: true,
|
|
74
|
-
configurable: true
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var possibleConstructorReturn = function (self, call) {
|
|
81
|
-
if (!self) {
|
|
82
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
83
|
-
}
|
|
5
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
84
6
|
|
|
85
|
-
|
|
7
|
+
var React = _interopDefault(require('react'));
|
|
8
|
+
|
|
9
|
+
var NavMagazine = function NavMagazine() {
|
|
10
|
+
return React.createElement(
|
|
11
|
+
'div',
|
|
12
|
+
null,
|
|
13
|
+
React.createElement(
|
|
14
|
+
'h1',
|
|
15
|
+
null,
|
|
16
|
+
'Magazine Navigation'
|
|
17
|
+
)
|
|
18
|
+
);
|
|
86
19
|
};
|
|
87
20
|
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
value: function render() {
|
|
99
|
-
var text = this.props.text;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return React__default.createElement(
|
|
103
|
-
'div',
|
|
104
|
-
{ className: styles.test },
|
|
105
|
-
'Example Component: ',
|
|
106
|
-
text
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
}]);
|
|
110
|
-
return ExampleComponent;
|
|
111
|
-
}(React.Component);
|
|
112
|
-
|
|
113
|
-
ExampleComponent.propTypes = {
|
|
114
|
-
text: PropTypes.string
|
|
21
|
+
var DeckQueue = function DeckQueue() {
|
|
22
|
+
return React.createElement(
|
|
23
|
+
'div',
|
|
24
|
+
null,
|
|
25
|
+
React.createElement(
|
|
26
|
+
'h1',
|
|
27
|
+
null,
|
|
28
|
+
'Dect Queue'
|
|
29
|
+
)
|
|
30
|
+
);
|
|
115
31
|
};
|
|
116
32
|
|
|
117
|
-
|
|
33
|
+
exports.NavMagazine = NavMagazine;
|
|
34
|
+
exports.DeckQueue = DeckQueue;
|
|
118
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/navigation/NavMagazine.js","../src/deck/DeckQueue.js"],"sourcesContent":["import React from 'react'\r\n\r\nexport const NavMagazine = () => {\r\n return (\r\n <div>\r\n <h1>Magazine Navigation</h1>\r\n </div>\r\n )\r\n}\r\n","import React from 'react'\r\n\r\nexport const DeckQueue = () => {\r\n return (\r\n <div>\r\n <h1>Dect Queue</h1>\r\n </div>\r\n )\r\n}\r\n"],"names":["NavMagazine","DeckQueue"],"mappings":";;;;;;;;IAEaA,cAAc,SAAdA,WAAc,GAAM;SAE7B;;;;;;;;GADF;CADK;;ICAMC,YAAY,SAAZA,SAAY,GAAM;SAE3B;;;;;;;;GADF;CADK;;;;;"}
|