@mjhls/mjh-framework 1.0.79 → 1.0.81
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 +172 -172
- package/dist/index.es.js +38 -22
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +37 -21
- package/dist/index.js.map +1 -1
- package/package.json +81 -81
package/README.md
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
|
|
2
|
-
# mjh-framework v. 1.0.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
> Foundation Framework
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install --save @mjhls/mjh-framework
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
import React, { Component } from 'react'
|
|
19
|
-
|
|
20
|
-
import { NavMagazine, DeckQueue } from 'mjh-framework'
|
|
21
|
-
|
|
22
|
-
export default class App extends Component {
|
|
23
|
-
render() {
|
|
24
|
-
return (
|
|
25
|
-
<div>
|
|
26
|
-
<NavMagazine />
|
|
27
|
-
<DeckQueue />
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Publish new updates to the npm registry
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npm publish
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## For getting updates in the template without publishing each time a change is made in the framework
|
|
41
|
-
|
|
42
|
-
Link react and react-dom of the template repo, so that it can be used by the framework.
|
|
43
|
-
This is to avoid the error arising due to multiple instances of React.
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
cd ../mjh-template/node_modules/react
|
|
47
|
-
|
|
48
|
-
yarn link
|
|
49
|
-
|
|
50
|
-
cd ../react-dom
|
|
51
|
-
|
|
52
|
-
yarn link
|
|
53
|
-
|
|
54
|
-
cd ../../../mjh-framework
|
|
55
|
-
|
|
56
|
-
yarn link react && yarn link react-dom
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Link the framework repo so that it can be used in the template
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npm link
|
|
63
|
-
|
|
64
|
-
cd ../mjh-template
|
|
65
|
-
|
|
66
|
-
npm link @mjhls/mjh-framework
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Components and "props"
|
|
70
|
-
|
|
71
|
-
### Deck Components
|
|
72
|
-
|
|
73
|
-
- #### DeckContent
|
|
74
|
-
|
|
75
|
-
##### Props
|
|
76
|
-
|
|
77
|
-
- mapping
|
|
78
|
-
- dataRecord
|
|
79
|
-
- query
|
|
80
|
-
- params
|
|
81
|
-
- pointer
|
|
82
|
-
- pointerArray
|
|
83
|
-
- defaultImage
|
|
84
|
-
|
|
85
|
-
- #### DeckQueue
|
|
86
|
-
##### Props
|
|
87
|
-
- page
|
|
88
|
-
- dataRecord
|
|
89
|
-
- query
|
|
90
|
-
- params
|
|
91
|
-
- pointer
|
|
92
|
-
- pointerArray
|
|
93
|
-
|
|
94
|
-
### Layout Components
|
|
95
|
-
|
|
96
|
-
- #### Column1
|
|
97
|
-
- #### Column2
|
|
98
|
-
##### Props
|
|
99
|
-
- rightItems
|
|
100
|
-
- #### Column3
|
|
101
|
-
##### Props
|
|
102
|
-
- leftItems
|
|
103
|
-
- rightItems
|
|
104
|
-
##### Common Props (Column1, Column2, Column3)
|
|
105
|
-
- title
|
|
106
|
-
- children
|
|
107
|
-
- #### Header
|
|
108
|
-
##### Props
|
|
109
|
-
- title
|
|
110
|
-
- keyword
|
|
111
|
-
- description
|
|
112
|
-
- #### LeftNav
|
|
113
|
-
##### Props
|
|
114
|
-
- leftItems
|
|
115
|
-
- #### AccordionPanel
|
|
116
|
-
##### Props
|
|
117
|
-
- accordionClassName
|
|
118
|
-
- data
|
|
119
|
-
|
|
120
|
-
### Navigation Components
|
|
121
|
-
|
|
122
|
-
- #### NavMagazine
|
|
123
|
-
##### Props
|
|
124
|
-
- logo
|
|
125
|
-
- dataObject
|
|
126
|
-
- #### NavNative
|
|
127
|
-
##### Props
|
|
128
|
-
- logo
|
|
129
|
-
- dataObject
|
|
130
|
-
- #### NavNormal
|
|
131
|
-
##### Props
|
|
132
|
-
- logo
|
|
133
|
-
- dataObject
|
|
134
|
-
- variant
|
|
135
|
-
- #### NavDvm
|
|
136
|
-
##### Props
|
|
137
|
-
- logo
|
|
138
|
-
- dataObject
|
|
139
|
-
- subNavHeads
|
|
140
|
-
|
|
141
|
-
### Template Components
|
|
142
|
-
|
|
143
|
-
- #### TemplateNormal
|
|
144
|
-
##### Props
|
|
145
|
-
- config
|
|
146
|
-
- title
|
|
147
|
-
- keywords
|
|
148
|
-
- description
|
|
149
|
-
- website
|
|
150
|
-
|
|
151
|
-
### Ad Components
|
|
152
|
-
|
|
153
|
-
- #### AD300x250
|
|
154
|
-
- #### AD300x250x600
|
|
155
|
-
- #### AD728x90
|
|
156
|
-
##### Common Props
|
|
157
|
-
- networkID
|
|
158
|
-
- adUnit
|
|
159
|
-
|
|
160
|
-
### Serializers
|
|
161
|
-
|
|
162
|
-
- #### getSerializers (function)
|
|
163
|
-
##### arguments
|
|
164
|
-
- client
|
|
165
|
-
##### types
|
|
166
|
-
- youtube
|
|
167
|
-
- figure
|
|
168
|
-
- slideshow
|
|
169
|
-
|
|
170
|
-
## License
|
|
171
|
-
|
|
172
|
-
MIT © [mjh-framework](https://github.com/mjh-framework)
|
|
1
|
+
|
|
2
|
+
# mjh-framework v. 1.0.81
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
> Foundation Framework
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install --save @mjhls/mjh-framework
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```jsx
|
|
18
|
+
import React, { Component } from 'react'
|
|
19
|
+
|
|
20
|
+
import { NavMagazine, DeckQueue } from 'mjh-framework'
|
|
21
|
+
|
|
22
|
+
export default class App extends Component {
|
|
23
|
+
render() {
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
<NavMagazine />
|
|
27
|
+
<DeckQueue />
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Publish new updates to the npm registry
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm publish
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## For getting updates in the template without publishing each time a change is made in the framework
|
|
41
|
+
|
|
42
|
+
Link react and react-dom of the template repo, so that it can be used by the framework.
|
|
43
|
+
This is to avoid the error arising due to multiple instances of React.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd ../mjh-template/node_modules/react
|
|
47
|
+
|
|
48
|
+
yarn link
|
|
49
|
+
|
|
50
|
+
cd ../react-dom
|
|
51
|
+
|
|
52
|
+
yarn link
|
|
53
|
+
|
|
54
|
+
cd ../../../mjh-framework
|
|
55
|
+
|
|
56
|
+
yarn link react && yarn link react-dom
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Link the framework repo so that it can be used in the template
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm link
|
|
63
|
+
|
|
64
|
+
cd ../mjh-template
|
|
65
|
+
|
|
66
|
+
npm link @mjhls/mjh-framework
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Components and "props"
|
|
70
|
+
|
|
71
|
+
### Deck Components
|
|
72
|
+
|
|
73
|
+
- #### DeckContent
|
|
74
|
+
|
|
75
|
+
##### Props
|
|
76
|
+
|
|
77
|
+
- mapping
|
|
78
|
+
- dataRecord
|
|
79
|
+
- query
|
|
80
|
+
- params
|
|
81
|
+
- pointer
|
|
82
|
+
- pointerArray
|
|
83
|
+
- defaultImage
|
|
84
|
+
|
|
85
|
+
- #### DeckQueue
|
|
86
|
+
##### Props
|
|
87
|
+
- page
|
|
88
|
+
- dataRecord
|
|
89
|
+
- query
|
|
90
|
+
- params
|
|
91
|
+
- pointer
|
|
92
|
+
- pointerArray
|
|
93
|
+
|
|
94
|
+
### Layout Components
|
|
95
|
+
|
|
96
|
+
- #### Column1
|
|
97
|
+
- #### Column2
|
|
98
|
+
##### Props
|
|
99
|
+
- rightItems
|
|
100
|
+
- #### Column3
|
|
101
|
+
##### Props
|
|
102
|
+
- leftItems
|
|
103
|
+
- rightItems
|
|
104
|
+
##### Common Props (Column1, Column2, Column3)
|
|
105
|
+
- title
|
|
106
|
+
- children
|
|
107
|
+
- #### Header
|
|
108
|
+
##### Props
|
|
109
|
+
- title
|
|
110
|
+
- keyword
|
|
111
|
+
- description
|
|
112
|
+
- #### LeftNav
|
|
113
|
+
##### Props
|
|
114
|
+
- leftItems
|
|
115
|
+
- #### AccordionPanel
|
|
116
|
+
##### Props
|
|
117
|
+
- accordionClassName
|
|
118
|
+
- data
|
|
119
|
+
|
|
120
|
+
### Navigation Components
|
|
121
|
+
|
|
122
|
+
- #### NavMagazine
|
|
123
|
+
##### Props
|
|
124
|
+
- logo
|
|
125
|
+
- dataObject
|
|
126
|
+
- #### NavNative
|
|
127
|
+
##### Props
|
|
128
|
+
- logo
|
|
129
|
+
- dataObject
|
|
130
|
+
- #### NavNormal
|
|
131
|
+
##### Props
|
|
132
|
+
- logo
|
|
133
|
+
- dataObject
|
|
134
|
+
- variant
|
|
135
|
+
- #### NavDvm
|
|
136
|
+
##### Props
|
|
137
|
+
- logo
|
|
138
|
+
- dataObject
|
|
139
|
+
- subNavHeads
|
|
140
|
+
|
|
141
|
+
### Template Components
|
|
142
|
+
|
|
143
|
+
- #### TemplateNormal
|
|
144
|
+
##### Props
|
|
145
|
+
- config
|
|
146
|
+
- title
|
|
147
|
+
- keywords
|
|
148
|
+
- description
|
|
149
|
+
- website
|
|
150
|
+
|
|
151
|
+
### Ad Components
|
|
152
|
+
|
|
153
|
+
- #### AD300x250
|
|
154
|
+
- #### AD300x250x600
|
|
155
|
+
- #### AD728x90
|
|
156
|
+
##### Common Props
|
|
157
|
+
- networkID
|
|
158
|
+
- adUnit
|
|
159
|
+
|
|
160
|
+
### Serializers
|
|
161
|
+
|
|
162
|
+
- #### getSerializers (function)
|
|
163
|
+
##### arguments
|
|
164
|
+
- client
|
|
165
|
+
##### types
|
|
166
|
+
- youtube
|
|
167
|
+
- figure
|
|
168
|
+
- slideshow
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
MIT © [mjh-framework](https://github.com/mjh-framework)
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { Component, useState, useEffect,
|
|
1
|
+
import React__default, { Component, useState, useEffect, createElement, createContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Container from 'react-bootstrap/Container';
|
|
@@ -3933,14 +3933,14 @@ var DeckContent = function (_React$Component) {
|
|
|
3933
3933
|
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
3934
3934
|
|
|
3935
3935
|
// please leave this for later debug purpose : Yong Jun.
|
|
3936
|
-
/* console.log('page change reported', {
|
|
3937
|
-
currentPage: currentPage,
|
|
3938
|
-
pageNumber: pageNumber,
|
|
3939
|
-
pathname: pathname,
|
|
3940
|
-
path: path,
|
|
3941
|
-
newPath: newPath,
|
|
3942
|
-
firstPage: pageNumber === 1,
|
|
3943
|
-
queryString: queryString
|
|
3936
|
+
/* console.log('page change reported', {
|
|
3937
|
+
currentPage: currentPage,
|
|
3938
|
+
pageNumber: pageNumber,
|
|
3939
|
+
pathname: pathname,
|
|
3940
|
+
path: path,
|
|
3941
|
+
newPath: newPath,
|
|
3942
|
+
firstPage: pageNumber === 1,
|
|
3943
|
+
queryString: queryString
|
|
3944
3944
|
}) */
|
|
3945
3945
|
|
|
3946
3946
|
pageview(newPath);
|
|
@@ -5480,14 +5480,14 @@ var TaxonomyCard = function TaxonomyCard(props) {
|
|
|
5480
5480
|
);
|
|
5481
5481
|
};
|
|
5482
5482
|
|
|
5483
|
-
/*
|
|
5484
|
-
GROQ query -
|
|
5485
|
-
*[_type == "article" && references(*[_type == 'documentGroup' && name == 'test']._id)][0...10]{
|
|
5486
|
-
title,
|
|
5487
|
-
published,
|
|
5488
|
-
"thumbnail": thumbnail.asset->url,
|
|
5489
|
-
"url": url.current
|
|
5490
|
-
}
|
|
5483
|
+
/*
|
|
5484
|
+
GROQ query -
|
|
5485
|
+
*[_type == "article" && references(*[_type == 'documentGroup' && name == 'test']._id)][0...10]{
|
|
5486
|
+
title,
|
|
5487
|
+
published,
|
|
5488
|
+
"thumbnail": thumbnail.asset->url,
|
|
5489
|
+
"url": url.current
|
|
5490
|
+
}
|
|
5491
5491
|
*/
|
|
5492
5492
|
var GroupDeck = function GroupDeck(props) {
|
|
5493
5493
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
@@ -5682,10 +5682,10 @@ var getYoutubeId = createCommonjsModule(function (module, exports) {
|
|
|
5682
5682
|
}));
|
|
5683
5683
|
});
|
|
5684
5684
|
|
|
5685
|
-
/*
|
|
5686
|
-
GROQ query -
|
|
5687
|
-
accepts an array of title, URL
|
|
5688
|
-
`http://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
5685
|
+
/*
|
|
5686
|
+
GROQ query -
|
|
5687
|
+
accepts an array of title, URL
|
|
5688
|
+
`http://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
5689
5689
|
*/
|
|
5690
5690
|
var YoutubeGroup = function YoutubeGroup(props) {
|
|
5691
5691
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
@@ -6193,11 +6193,27 @@ var SocialShare = function SocialShare(props) {
|
|
|
6193
6193
|
shareSummary = props.shareSummary,
|
|
6194
6194
|
shareSubject = props.shareSubject,
|
|
6195
6195
|
shareImage = props.shareImage,
|
|
6196
|
-
size = props.size
|
|
6196
|
+
size = props.size,
|
|
6197
|
+
siteName = props.siteName,
|
|
6198
|
+
twitterSiteName = props.twitterSiteName;
|
|
6197
6199
|
|
|
6198
6200
|
return React__default.createElement(
|
|
6199
6201
|
React__default.Fragment,
|
|
6200
6202
|
null,
|
|
6203
|
+
React__default.createElement(
|
|
6204
|
+
Head,
|
|
6205
|
+
null,
|
|
6206
|
+
React__default.createElement('meta', { property: 'og:url', content: shareUrl }),
|
|
6207
|
+
React__default.createElement('meta', { property: 'og:title', content: shareTitle }),
|
|
6208
|
+
React__default.createElement('meta', { property: 'og:image', content: shareImage }),
|
|
6209
|
+
React__default.createElement('meta', { property: 'og:site_name', content: siteName }),
|
|
6210
|
+
React__default.createElement('meta', { property: 'og:description', content: shareSummary }),
|
|
6211
|
+
React__default.createElement('meta', { name: 'twitter:card', content: 'summary' }),
|
|
6212
|
+
React__default.createElement('meta', { name: 'twitter:title', content: shareTitle }),
|
|
6213
|
+
React__default.createElement('meta', { name: 'twitter:image', content: shareImage }),
|
|
6214
|
+
React__default.createElement('meta', { name: 'twitter:site', content: twitterSiteName }),
|
|
6215
|
+
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary })
|
|
6216
|
+
),
|
|
6201
6217
|
React__default.createElement(
|
|
6202
6218
|
FacebookShareButton,
|
|
6203
6219
|
{ url: shareUrl, quote: shareTitle },
|