@mjhls/mjh-framework 1.0.272 → 1.0.274
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 +171 -171
- package/dist/cjs/DeckContent.js +9 -9
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/Figure-fe3e9705.js +145 -0
- package/dist/cjs/{GridContent-df5951a1.js → GridContent-8d5a738c.js} +2 -2
- package/dist/cjs/GridContent.js +2 -2
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-47f04b2b.js → Normal-7ed9eee9.js} +29 -29
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +1 -1
- package/dist/cjs/{TaxonomyCard-e3566492.js → TaxonomyCard-b5074d6e.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +1 -1
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +2 -1
- package/dist/cjs/{YoutubeGroup-94e6efea.js → YoutubeGroup-78e6bcc3.js} +5 -437
- package/dist/cjs/YoutubeGroup.js +2 -1
- package/dist/cjs/{index-be0c82be.js → index-39beccb3.js} +2 -1
- package/dist/cjs/index.js +574 -686
- package/dist/esm/DeckContent.js +9 -9
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/Figure-d6e22818.js +140 -0
- package/dist/esm/{GridContent-8479e775.js → GridContent-b8b5f361.js} +1 -1
- package/dist/esm/GridContent.js +2 -2
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-3e5ad3d1.js → Normal-21cfb458.js} +29 -29
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-2d0ab635.js → TaxonomyCard-ee1a22ae.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +2 -1
- package/dist/esm/{YoutubeGroup-f59297bb.js → YoutubeGroup-a87b8967.js} +5 -437
- package/dist/esm/YoutubeGroup.js +2 -1
- package/dist/esm/{index-73819142.js → index-3849e3fe.js} +2 -1
- package/dist/esm/index.js +583 -695
- package/package.json +103 -103
package/README.md
CHANGED
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
# mjh-framework v. 1.0.
|
|
3
|
-
|
|
4
|
-
> Foundation Framework
|
|
5
|
-
|
|
6
|
-
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install --save @mjhls/mjh-framework
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
```jsx
|
|
17
|
-
import React, { Component } from 'react'
|
|
18
|
-
|
|
19
|
-
import { NavMagazine, DeckQueue } from 'mjh-framework'
|
|
20
|
-
|
|
21
|
-
export default class App extends Component {
|
|
22
|
-
render() {
|
|
23
|
-
return (
|
|
24
|
-
<div>
|
|
25
|
-
<NavMagazine />
|
|
26
|
-
<DeckQueue />
|
|
27
|
-
</div>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Publish new updates to the npm registry
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm publish
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## For getting updates in the template without publishing each time a change is made in the framework
|
|
40
|
-
|
|
41
|
-
Link react and react-dom of the template repo, so that it can be used by the framework.
|
|
42
|
-
This is to avoid the error arising due to multiple instances of React.
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
cd ../mjh-template/node_modules/react
|
|
46
|
-
|
|
47
|
-
yarn link
|
|
48
|
-
|
|
49
|
-
cd ../react-dom
|
|
50
|
-
|
|
51
|
-
yarn link
|
|
52
|
-
|
|
53
|
-
cd ../../../mjh-framework
|
|
54
|
-
|
|
55
|
-
yarn link react && yarn link react-dom
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Link the framework repo so that it can be used in the template
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
npm link
|
|
62
|
-
|
|
63
|
-
cd ../mjh-template
|
|
64
|
-
|
|
65
|
-
npm link @mjhls/mjh-framework
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Components and "props"
|
|
69
|
-
|
|
70
|
-
### Deck Components
|
|
71
|
-
|
|
72
|
-
- #### DeckContent
|
|
73
|
-
|
|
74
|
-
##### Props
|
|
75
|
-
|
|
76
|
-
- mapping
|
|
77
|
-
- dataRecord
|
|
78
|
-
- query
|
|
79
|
-
- params
|
|
80
|
-
- pointer
|
|
81
|
-
- pointerArray
|
|
82
|
-
- defaultImage
|
|
83
|
-
|
|
84
|
-
- #### DeckQueue
|
|
85
|
-
##### Props
|
|
86
|
-
- page
|
|
87
|
-
- dataRecord
|
|
88
|
-
- query
|
|
89
|
-
- params
|
|
90
|
-
- pointer
|
|
91
|
-
- pointerArray
|
|
92
|
-
|
|
93
|
-
### Layout Components
|
|
94
|
-
|
|
95
|
-
- #### Column1
|
|
96
|
-
- #### Column2
|
|
97
|
-
##### Props
|
|
98
|
-
- rightItems
|
|
99
|
-
- #### Column3
|
|
100
|
-
##### Props
|
|
101
|
-
- leftItems
|
|
102
|
-
- rightItems
|
|
103
|
-
##### Common Props (Column1, Column2, Column3)
|
|
104
|
-
- title
|
|
105
|
-
- children
|
|
106
|
-
- #### Header
|
|
107
|
-
##### Props
|
|
108
|
-
- title
|
|
109
|
-
- keyword
|
|
110
|
-
- description
|
|
111
|
-
- #### LeftNav
|
|
112
|
-
##### Props
|
|
113
|
-
- leftItems
|
|
114
|
-
- #### AccordionPanel
|
|
115
|
-
##### Props
|
|
116
|
-
- accordionClassName
|
|
117
|
-
- data
|
|
118
|
-
|
|
119
|
-
### Navigation Components
|
|
120
|
-
|
|
121
|
-
- #### NavMagazine
|
|
122
|
-
##### Props
|
|
123
|
-
- logo
|
|
124
|
-
- dataObject
|
|
125
|
-
- #### NavNative
|
|
126
|
-
##### Props
|
|
127
|
-
- logo
|
|
128
|
-
- dataObject
|
|
129
|
-
- #### NavNormal
|
|
130
|
-
##### Props
|
|
131
|
-
- logo
|
|
132
|
-
- dataObject
|
|
133
|
-
- variant
|
|
134
|
-
- #### NavDvm
|
|
135
|
-
##### Props
|
|
136
|
-
- logo
|
|
137
|
-
- dataObject
|
|
138
|
-
- subNavHeads
|
|
139
|
-
|
|
140
|
-
### Template Components
|
|
141
|
-
|
|
142
|
-
- #### TemplateNormal
|
|
143
|
-
##### Props
|
|
144
|
-
- config
|
|
145
|
-
- title
|
|
146
|
-
- keywords
|
|
147
|
-
- description
|
|
148
|
-
- website
|
|
149
|
-
|
|
150
|
-
### Ad Components
|
|
151
|
-
|
|
152
|
-
- #### AD300x250
|
|
153
|
-
- #### AD300x250x600
|
|
154
|
-
- #### AD728x90
|
|
155
|
-
##### Common Props
|
|
156
|
-
- networkID
|
|
157
|
-
- adUnit
|
|
158
|
-
|
|
159
|
-
### Serializers
|
|
160
|
-
|
|
161
|
-
- #### getSerializers (function)
|
|
162
|
-
##### arguments
|
|
163
|
-
- client
|
|
164
|
-
##### types
|
|
165
|
-
- youtube
|
|
166
|
-
- figure
|
|
167
|
-
- slideshow
|
|
168
|
-
|
|
169
|
-
## License
|
|
170
|
-
|
|
171
|
-
MIT © [mjh-framework](https://github.com/mjh-framework)
|
|
1
|
+
|
|
2
|
+
# mjh-framework v. 1.0.274
|
|
3
|
+
|
|
4
|
+
> Foundation Framework
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install --save @mjhls/mjh-framework
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```jsx
|
|
17
|
+
import React, { Component } from 'react'
|
|
18
|
+
|
|
19
|
+
import { NavMagazine, DeckQueue } from 'mjh-framework'
|
|
20
|
+
|
|
21
|
+
export default class App extends Component {
|
|
22
|
+
render() {
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<NavMagazine />
|
|
26
|
+
<DeckQueue />
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Publish new updates to the npm registry
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm publish
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## For getting updates in the template without publishing each time a change is made in the framework
|
|
40
|
+
|
|
41
|
+
Link react and react-dom of the template repo, so that it can be used by the framework.
|
|
42
|
+
This is to avoid the error arising due to multiple instances of React.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd ../mjh-template/node_modules/react
|
|
46
|
+
|
|
47
|
+
yarn link
|
|
48
|
+
|
|
49
|
+
cd ../react-dom
|
|
50
|
+
|
|
51
|
+
yarn link
|
|
52
|
+
|
|
53
|
+
cd ../../../mjh-framework
|
|
54
|
+
|
|
55
|
+
yarn link react && yarn link react-dom
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Link the framework repo so that it can be used in the template
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm link
|
|
62
|
+
|
|
63
|
+
cd ../mjh-template
|
|
64
|
+
|
|
65
|
+
npm link @mjhls/mjh-framework
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Components and "props"
|
|
69
|
+
|
|
70
|
+
### Deck Components
|
|
71
|
+
|
|
72
|
+
- #### DeckContent
|
|
73
|
+
|
|
74
|
+
##### Props
|
|
75
|
+
|
|
76
|
+
- mapping
|
|
77
|
+
- dataRecord
|
|
78
|
+
- query
|
|
79
|
+
- params
|
|
80
|
+
- pointer
|
|
81
|
+
- pointerArray
|
|
82
|
+
- defaultImage
|
|
83
|
+
|
|
84
|
+
- #### DeckQueue
|
|
85
|
+
##### Props
|
|
86
|
+
- page
|
|
87
|
+
- dataRecord
|
|
88
|
+
- query
|
|
89
|
+
- params
|
|
90
|
+
- pointer
|
|
91
|
+
- pointerArray
|
|
92
|
+
|
|
93
|
+
### Layout Components
|
|
94
|
+
|
|
95
|
+
- #### Column1
|
|
96
|
+
- #### Column2
|
|
97
|
+
##### Props
|
|
98
|
+
- rightItems
|
|
99
|
+
- #### Column3
|
|
100
|
+
##### Props
|
|
101
|
+
- leftItems
|
|
102
|
+
- rightItems
|
|
103
|
+
##### Common Props (Column1, Column2, Column3)
|
|
104
|
+
- title
|
|
105
|
+
- children
|
|
106
|
+
- #### Header
|
|
107
|
+
##### Props
|
|
108
|
+
- title
|
|
109
|
+
- keyword
|
|
110
|
+
- description
|
|
111
|
+
- #### LeftNav
|
|
112
|
+
##### Props
|
|
113
|
+
- leftItems
|
|
114
|
+
- #### AccordionPanel
|
|
115
|
+
##### Props
|
|
116
|
+
- accordionClassName
|
|
117
|
+
- data
|
|
118
|
+
|
|
119
|
+
### Navigation Components
|
|
120
|
+
|
|
121
|
+
- #### NavMagazine
|
|
122
|
+
##### Props
|
|
123
|
+
- logo
|
|
124
|
+
- dataObject
|
|
125
|
+
- #### NavNative
|
|
126
|
+
##### Props
|
|
127
|
+
- logo
|
|
128
|
+
- dataObject
|
|
129
|
+
- #### NavNormal
|
|
130
|
+
##### Props
|
|
131
|
+
- logo
|
|
132
|
+
- dataObject
|
|
133
|
+
- variant
|
|
134
|
+
- #### NavDvm
|
|
135
|
+
##### Props
|
|
136
|
+
- logo
|
|
137
|
+
- dataObject
|
|
138
|
+
- subNavHeads
|
|
139
|
+
|
|
140
|
+
### Template Components
|
|
141
|
+
|
|
142
|
+
- #### TemplateNormal
|
|
143
|
+
##### Props
|
|
144
|
+
- config
|
|
145
|
+
- title
|
|
146
|
+
- keywords
|
|
147
|
+
- description
|
|
148
|
+
- website
|
|
149
|
+
|
|
150
|
+
### Ad Components
|
|
151
|
+
|
|
152
|
+
- #### AD300x250
|
|
153
|
+
- #### AD300x250x600
|
|
154
|
+
- #### AD728x90
|
|
155
|
+
##### Common Props
|
|
156
|
+
- networkID
|
|
157
|
+
- adUnit
|
|
158
|
+
|
|
159
|
+
### Serializers
|
|
160
|
+
|
|
161
|
+
- #### getSerializers (function)
|
|
162
|
+
##### arguments
|
|
163
|
+
- client
|
|
164
|
+
##### types
|
|
165
|
+
- youtube
|
|
166
|
+
- figure
|
|
167
|
+
- slideshow
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT © [mjh-framework](https://github.com/mjh-framework)
|
package/dist/cjs/DeckContent.js
CHANGED
|
@@ -24,7 +24,7 @@ require('next/link');
|
|
|
24
24
|
var Router = require('next/router');
|
|
25
25
|
var Router__default = _interopDefault(Router);
|
|
26
26
|
require('react-dom');
|
|
27
|
-
var index$1 = require('./index-
|
|
27
|
+
var index$1 = require('./index-39beccb3.js');
|
|
28
28
|
var index$2 = require('./index-fa0fb52c.js');
|
|
29
29
|
var entities = require('./entities-310b46ee.js');
|
|
30
30
|
require('./slicedToArray-e38fb29d.js');
|
|
@@ -171,14 +171,14 @@ var DeckContent = function (_React$Component) {
|
|
|
171
171
|
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
172
172
|
|
|
173
173
|
// please leave this for later debug purpose : Yong Jun.
|
|
174
|
-
/* console.log('page change reported', {
|
|
175
|
-
currentPage: currentPage,
|
|
176
|
-
pageNumber: pageNumber,
|
|
177
|
-
pathname: pathname,
|
|
178
|
-
path: path,
|
|
179
|
-
newPath: newPath,
|
|
180
|
-
firstPage: pageNumber === 1,
|
|
181
|
-
queryString: queryString
|
|
174
|
+
/* console.log('page change reported', {
|
|
175
|
+
currentPage: currentPage,
|
|
176
|
+
pageNumber: pageNumber,
|
|
177
|
+
pathname: pathname,
|
|
178
|
+
path: path,
|
|
179
|
+
newPath: newPath,
|
|
180
|
+
firstPage: pageNumber === 1,
|
|
181
|
+
queryString: queryString
|
|
182
182
|
}) */
|
|
183
183
|
|
|
184
184
|
if (pageview) {
|
package/dist/cjs/DeckQueue.js
CHANGED
|
@@ -24,7 +24,7 @@ require('next/link');
|
|
|
24
24
|
var Router = require('next/router');
|
|
25
25
|
var Router__default = _interopDefault(Router);
|
|
26
26
|
require('react-dom');
|
|
27
|
-
var index$1 = require('./index-
|
|
27
|
+
var index$1 = require('./index-39beccb3.js');
|
|
28
28
|
var index$2 = require('./index-fa0fb52c.js');
|
|
29
29
|
var entities = require('./entities-310b46ee.js');
|
|
30
30
|
var get$1 = require('./get-1f91592f.js');
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
require('./_commonjsHelpers-06173234.js');
|
|
6
|
+
require('./_to-object-329a650b.js');
|
|
7
|
+
require('./web.dom.iterable-0998bdc3.js');
|
|
8
|
+
require('./core.get-iterator-method-e049ca4a.js');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var React__default = _interopDefault(React);
|
|
11
|
+
var index$1 = require('./index-39beccb3.js');
|
|
12
|
+
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
13
|
+
var reactBootstrap = require('react-bootstrap');
|
|
14
|
+
|
|
15
|
+
var urlFor = function urlFor(source, client) {
|
|
16
|
+
var builder = index$1.imageUrlBuilder(client);
|
|
17
|
+
return builder.image(source).auto('format');
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var compareProps = function compareProps(prevProps, nextProps) {
|
|
21
|
+
if (nextProps.node.asset && nextProps.node.asset._ref) {
|
|
22
|
+
return prevProps.node.asset._ref === nextProps.node.asset._ref;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var FigureComponent = function FigureComponent(props) {
|
|
27
|
+
var _useState = React.useState(false),
|
|
28
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
29
|
+
openImg = _useState2[0],
|
|
30
|
+
setOpenImg = _useState2[1];
|
|
31
|
+
|
|
32
|
+
var _useState3 = React.useState(''),
|
|
33
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
34
|
+
openImgSrc = _useState4[0],
|
|
35
|
+
setOpenImgSrc = _useState4[1];
|
|
36
|
+
|
|
37
|
+
var node = props.node,
|
|
38
|
+
client = props.client;
|
|
39
|
+
var caption = node.caption,
|
|
40
|
+
alt = node.alt,
|
|
41
|
+
blank = node.blank,
|
|
42
|
+
link = node.link,
|
|
43
|
+
_node$alignment = node.alignment,
|
|
44
|
+
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
45
|
+
var _node$widthP = node.widthP,
|
|
46
|
+
widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if (typeof window === 'undefined') {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var screenWidth = window.innerWidth;
|
|
54
|
+
|
|
55
|
+
if (client.clientConfig && client.clientConfig.defaultImageSize && widthP === 'auto') {
|
|
56
|
+
widthP = client.clientConfig.defaultImageSize;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var imageFloat = null;
|
|
60
|
+
if (screenWidth > 1000) {
|
|
61
|
+
var align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
62
|
+
imageFloat = align;
|
|
63
|
+
} else {
|
|
64
|
+
var _align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
65
|
+
imageFloat = _align;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var figureMargin = null;
|
|
69
|
+
if (imageFloat === 'none') {
|
|
70
|
+
figureMargin = '0 auto 1rem';
|
|
71
|
+
}
|
|
72
|
+
if (imageFloat === 'left') {
|
|
73
|
+
figureMargin = '0 1.5rem 1.5rem 0';
|
|
74
|
+
}
|
|
75
|
+
if (imageFloat === 'right') {
|
|
76
|
+
figureMargin = '0 0 1.5rem 1.5rem';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var imageWidth = null;
|
|
80
|
+
if (screenWidth > 1000) {
|
|
81
|
+
if (widthP === 'auto') {
|
|
82
|
+
if (imageFloat === 'none') {
|
|
83
|
+
imageWidth = 'auto';
|
|
84
|
+
} else {
|
|
85
|
+
imageWidth = '30%';
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
imageWidth = widthP + '%';
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
imageWidth = '100%';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (!node.asset) return null;
|
|
95
|
+
|
|
96
|
+
return React__default.createElement(
|
|
97
|
+
React__default.Fragment,
|
|
98
|
+
null,
|
|
99
|
+
imageWidth !== null && imageFloat !== null && React__default.createElement(
|
|
100
|
+
reactBootstrap.Figure,
|
|
101
|
+
{ className: 'd-block', style: { width: imageWidth, maxWidth: '100%', clear: 'both', float: imageFloat, margin: figureMargin } },
|
|
102
|
+
link ? React__default.createElement(
|
|
103
|
+
'a',
|
|
104
|
+
{ target: blank ? '_blank' : '_self', href: link },
|
|
105
|
+
React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', src: urlFor(node, client).url(), alt: alt && alt }),
|
|
106
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
107
|
+
) : React__default.createElement(
|
|
108
|
+
React__default.Fragment,
|
|
109
|
+
null,
|
|
110
|
+
React__default.createElement(reactBootstrap.Figure.Image, {
|
|
111
|
+
style: { width: '100%' },
|
|
112
|
+
className: 'figure-image',
|
|
113
|
+
src: urlFor(node, client).url(),
|
|
114
|
+
alt: alt && alt,
|
|
115
|
+
onClick: function onClick() {
|
|
116
|
+
setOpenImgSrc(urlFor(node, client).url());
|
|
117
|
+
setOpenImg(true);
|
|
118
|
+
}
|
|
119
|
+
}),
|
|
120
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
121
|
+
)
|
|
122
|
+
),
|
|
123
|
+
React__default.createElement(
|
|
124
|
+
'div',
|
|
125
|
+
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
126
|
+
React__default.createElement('img', { src: openImgSrc }),
|
|
127
|
+
React__default.createElement('a', {
|
|
128
|
+
className: 'lightbox-close',
|
|
129
|
+
onClick: function onClick() {
|
|
130
|
+
setOpenImgSrc('');
|
|
131
|
+
setOpenImg(false);
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
),
|
|
135
|
+
React__default.createElement(
|
|
136
|
+
'style',
|
|
137
|
+
{ jsx: 'true' },
|
|
138
|
+
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
139
|
+
)
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
var Figure = React__default.memo(FigureComponent, compareProps);
|
|
144
|
+
|
|
145
|
+
exports.default = Figure;
|
|
@@ -18,14 +18,14 @@ var visibilitySensor = require('./visibility-sensor-b72d9527.js');
|
|
|
18
18
|
require('next/link');
|
|
19
19
|
var Router = require('next/router');
|
|
20
20
|
var Router__default = _interopDefault(Router);
|
|
21
|
-
var index$1 = require('./index-
|
|
21
|
+
var index$1 = require('./index-39beccb3.js');
|
|
22
22
|
var index$2 = require('./index-fa0fb52c.js');
|
|
23
23
|
var entities = require('./entities-310b46ee.js');
|
|
24
24
|
var ADInfeed = require('./ADInfeed-f560c2f9.js');
|
|
25
25
|
var get$1 = require('./get-1f91592f.js');
|
|
26
26
|
|
|
27
27
|
var Dfp = React__default.lazy(function () {
|
|
28
|
-
return Promise
|
|
28
|
+
return new Promise(function (resolve) { resolve(require('./Dfp-7a5533f9.js')); });
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
var AD = function AD(props) {
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -20,7 +20,7 @@ require('./visibility-sensor-b72d9527.js');
|
|
|
20
20
|
require('next/link');
|
|
21
21
|
require('next/router');
|
|
22
22
|
require('react-dom');
|
|
23
|
-
require('./index-
|
|
23
|
+
require('./index-39beccb3.js');
|
|
24
24
|
require('./index-fa0fb52c.js');
|
|
25
25
|
require('./entities-310b46ee.js');
|
|
26
26
|
require('./slicedToArray-e38fb29d.js');
|
|
@@ -28,7 +28,7 @@ require('./AdSlot-f69a31ec.js');
|
|
|
28
28
|
require('./promise-b96c61f8.js');
|
|
29
29
|
require('./ADInfeed-f560c2f9.js');
|
|
30
30
|
require('./get-1f91592f.js');
|
|
31
|
-
var GridContent = require('./GridContent-
|
|
31
|
+
var GridContent = require('./GridContent-8d5a738c.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -11,7 +11,7 @@ var Col = _interopDefault(require('react-bootstrap/Col'));
|
|
|
11
11
|
var Card = _interopDefault(require('react-bootstrap/Card'));
|
|
12
12
|
require('next/link');
|
|
13
13
|
require('react-dom');
|
|
14
|
-
var index$1 = require('./index-
|
|
14
|
+
var index$1 = require('./index-39beccb3.js');
|
|
15
15
|
var index$2 = require('./index-fa0fb52c.js');
|
|
16
16
|
var Badge = _interopDefault(require('react-bootstrap/Badge'));
|
|
17
17
|
|
package/dist/cjs/IssueDeck.js
CHANGED
|
@@ -11,7 +11,7 @@ var Col = _interopDefault(require('react-bootstrap/Col'));
|
|
|
11
11
|
var Card = _interopDefault(require('react-bootstrap/Card'));
|
|
12
12
|
require('next/link');
|
|
13
13
|
require('react-dom');
|
|
14
|
-
var index$1 = require('./index-
|
|
14
|
+
var index$1 = require('./index-39beccb3.js');
|
|
15
15
|
var index$2 = require('./index-fa0fb52c.js');
|
|
16
16
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
17
17
|
|
package/dist/cjs/MasterDeck.js
CHANGED
|
@@ -24,7 +24,7 @@ require('next/link');
|
|
|
24
24
|
var Router = require('next/router');
|
|
25
25
|
var Router__default = _interopDefault(Router);
|
|
26
26
|
require('react-dom');
|
|
27
|
-
require('./index-
|
|
27
|
+
require('./index-39beccb3.js');
|
|
28
28
|
var promise = require('./promise-b96c61f8.js');
|
|
29
29
|
|
|
30
30
|
var MasterDeck = function (_React$Component) {
|
|
@@ -170,14 +170,14 @@ var MasterDeck = function (_React$Component) {
|
|
|
170
170
|
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
171
171
|
|
|
172
172
|
// please leave this for later debug purpose : Yong Jun.
|
|
173
|
-
/* console.log('page change reported', {
|
|
174
|
-
currentPage: currentPage,
|
|
175
|
-
pageNumber: pageNumber,
|
|
176
|
-
pathname: pathname,
|
|
177
|
-
path: path,
|
|
178
|
-
newPath: newPath,
|
|
179
|
-
firstPage: pageNumber === 1,
|
|
180
|
-
queryString: queryString
|
|
173
|
+
/* console.log('page change reported', {
|
|
174
|
+
currentPage: currentPage,
|
|
175
|
+
pageNumber: pageNumber,
|
|
176
|
+
pathname: pathname,
|
|
177
|
+
path: path,
|
|
178
|
+
newPath: newPath,
|
|
179
|
+
firstPage: pageNumber === 1,
|
|
180
|
+
queryString: queryString
|
|
181
181
|
}) */
|
|
182
182
|
|
|
183
183
|
if (pageview) {
|