@itcase/storybook-config 1.0.16 → 1.0.18
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/components/EmailTemplatePreview/index.js +50 -0
- package/config/addonsReactVite.js +1 -1
- package/config/appearance.js +1 -1
- package/config/authorization.js +3 -3
- package/config/frameworkReact.js +2 -2
- package/config/mainConfig.js +1 -0
- package/config/staticDirsNextJs.js +1 -1
- package/config/staticDirsReact.js +1 -3
- package/config/staticDirsReactVite.js +1 -3
- package/package.json +25 -25
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
|
|
3
|
+
let BACKEND_URL = process.env.EMAIL_URL
|
|
4
|
+
|
|
5
|
+
if (process.env.NODE_ENV === 'production') {
|
|
6
|
+
BACKEND_URL = `${process.env.REST_BASE_URL}/storybook`
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function EmailTemplatePreview(props) {
|
|
10
|
+
const style = {
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: '100%',
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
top: '0',
|
|
15
|
+
right: '0',
|
|
16
|
+
bottom: '0',
|
|
17
|
+
left: '0',
|
|
18
|
+
overflow: 'hidden',
|
|
19
|
+
border: '0',
|
|
20
|
+
overflowX: 'hidden',
|
|
21
|
+
overflowY: 'hidden',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const emailPreviewIframe = document.getElementById('emailPreview')
|
|
26
|
+
const loaded = () => {
|
|
27
|
+
const email = emailPreviewIframe.getElementsByClassName('email-body').length
|
|
28
|
+
if (!email) {
|
|
29
|
+
alert(
|
|
30
|
+
'Need to run the backend server to display email templates, use: python manage.py runserver',
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
emailPreviewIframe.addEventListener('load', loaded, true)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<React.Fragment>
|
|
39
|
+
<iframe
|
|
40
|
+
width="100%"
|
|
41
|
+
height="100%"
|
|
42
|
+
id="emailPreview"
|
|
43
|
+
src={`${BACKEND_URL}${props.url}`}
|
|
44
|
+
style={style}
|
|
45
|
+
/>
|
|
46
|
+
</React.Fragment>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { EmailTemplatePreview }
|
package/config/appearance.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '../../../../src/config/appearance'
|
|
1
|
+
import '../../../../src/config/appearance'
|
package/config/authorization.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { USERS } from './users'
|
|
2
2
|
|
|
3
3
|
const AUTHORIZATION = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
profileUrl: `${process.env.REST_BASE_URL}/rest/profile/`,
|
|
5
|
+
signInUrl: `${process.env.REST_BASE_URL}/rest/sign-in/`,
|
|
6
|
+
values: USERS,
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { AUTHORIZATION }
|
package/config/frameworkReact.js
CHANGED
package/config/mainConfig.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/storybook-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Code style linter configuration presets",
|
|
6
6
|
"engines": {
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
"workerDirectory": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@itcase/config": "^1.0.
|
|
37
|
-
"@storybook/addon-designs": "^8.
|
|
36
|
+
"@itcase/config": "^1.0.7",
|
|
37
|
+
"@storybook/addon-designs": "^8.2.0",
|
|
38
38
|
"storybook-addon-source-link": "^0.2.1",
|
|
39
39
|
"@itcase/storybook-addon-auth": "^1.0.4",
|
|
40
|
-
"@storybook/addon-actions": "^8.5.
|
|
41
|
-
"@storybook/addon-controls": "^8.5.
|
|
42
|
-
"@storybook/addon-essentials": "^8.5.
|
|
43
|
-
"@storybook/addon-interactions": "^8.5.
|
|
44
|
-
"@storybook/addon-links": "^8.5.
|
|
45
|
-
"@storybook/react-vite": "^8.5.
|
|
40
|
+
"@storybook/addon-actions": "^8.5.5",
|
|
41
|
+
"@storybook/addon-controls": "^8.5.5",
|
|
42
|
+
"@storybook/addon-essentials": "^8.5.5",
|
|
43
|
+
"@storybook/addon-interactions": "^8.5.5",
|
|
44
|
+
"@storybook/addon-links": "^8.5.5",
|
|
45
|
+
"@storybook/react-vite": "^8.5.5",
|
|
46
46
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
47
|
-
"@storybook/addon-themes": "^8.5.
|
|
48
|
-
"@storybook/addon-viewport": "^8.5.
|
|
49
|
-
"@storybook/addon-webpack5-compiler-swc": "^2.
|
|
50
|
-
"@storybook/blocks": "^8.5.
|
|
51
|
-
"@storybook/manager-api": "^8.5.
|
|
52
|
-
"@storybook/nextjs": "^8.5.
|
|
53
|
-
"@storybook/preview-api": "^8.5.
|
|
54
|
-
"@storybook/react": "^8.5.
|
|
55
|
-
"@storybook/react-webpack5": "^8.5.
|
|
56
|
-
"@storybook/theming": "^8.5.
|
|
47
|
+
"@storybook/addon-themes": "^8.5.5",
|
|
48
|
+
"@storybook/addon-viewport": "^8.5.5",
|
|
49
|
+
"@storybook/addon-webpack5-compiler-swc": "^2.1.0",
|
|
50
|
+
"@storybook/blocks": "^8.5.5",
|
|
51
|
+
"@storybook/manager-api": "^8.5.5",
|
|
52
|
+
"@storybook/nextjs": "^8.5.5",
|
|
53
|
+
"@storybook/preview-api": "^8.5.5",
|
|
54
|
+
"@storybook/react": "^8.5.5",
|
|
55
|
+
"@storybook/react-webpack5": "^8.5.5",
|
|
56
|
+
"@storybook/theming": "^8.5.5",
|
|
57
57
|
"http-proxy-middleware": "^3.0.3",
|
|
58
58
|
"msw": "^2.7.0",
|
|
59
59
|
"msw-storybook-addon": "^2.0.4",
|
|
@@ -68,18 +68,18 @@
|
|
|
68
68
|
"@commitlint/cli": "^19.7.1",
|
|
69
69
|
"@commitlint/config-conventional": "^19.7.1",
|
|
70
70
|
"@itcase/common": "^1.2.17",
|
|
71
|
-
"@itcase/lint": "^1.0.
|
|
72
|
-
"@itcase/ui": "^1.3.
|
|
71
|
+
"@itcase/lint": "^1.0.40",
|
|
72
|
+
"@itcase/ui": "^1.3.25",
|
|
73
73
|
"@semantic-release/changelog": "^6.0.3",
|
|
74
74
|
"@semantic-release/git": "^10.0.1",
|
|
75
75
|
"@semantic-release/release-notes-generator": "14.0.3",
|
|
76
76
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
77
|
-
"eslint": "9.
|
|
77
|
+
"eslint": "9.20.1",
|
|
78
78
|
"husky": "^9.1.7",
|
|
79
79
|
"lint-staged": "^15.4.3",
|
|
80
|
-
"prettier": "^3.
|
|
81
|
-
"semantic-release": "^24.2.
|
|
82
|
-
"storybook": "^8.5.
|
|
80
|
+
"prettier": "^3.5.0",
|
|
81
|
+
"semantic-release": "^24.2.2",
|
|
82
|
+
"storybook": "^8.5.5",
|
|
83
83
|
"stylelint": "^16.14.1",
|
|
84
84
|
"typescript": "^5.7.3"
|
|
85
85
|
}
|