@vonaffenfels/contentful-teasermanager 1.2.17 → 1.2.19
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/.babelrc +19 -19
- package/.nvmrc +1 -1
- package/dist/TestStory.js +94 -0
- package/dist/TestStory2.js +94 -0
- package/dist/TestStory3.js +94 -0
- package/dist/index.html +12 -0
- package/dist/index.js +119884 -0
- package/package.json +3 -3
- package/postcss.config.js +6 -6
- package/src/components/Contentful/ConfigScreen.js +154 -154
- package/src/components/Contentful/Dialog/NewestArticles.js +198 -198
- package/src/components/Contentful/Dialog.js +87 -87
- package/src/components/Contentful/EntryEditor.js +196 -196
- package/src/components/Contentful/Page.js +9 -9
- package/src/components/NoAccess.js +12 -12
- package/src/components/Teasermanager/Timeline.js +179 -179
- package/src/components/Teasermanager/Timeline.module.css +89 -89
- package/src/components/Teasermanager.js +269 -269
- package/src/components/Teasermanager.module.css +137 -137
- package/src/dev.js +5 -5
- package/src/hooks/useDebounce.js +20 -20
- package/src/hooks/useOnScreen.js +23 -23
- package/src/icons/remove.svg +7 -7
- package/src/index.html +11 -11
- package/src/index.js +51 -51
- package/src/lib/contentfulClient.js +12 -12
- package/src/lib/runLoaders.js +46 -46
- package/src/scss/index.scss +11 -11
- package/tailwind.config.js +5 -5
- package/webpack.config.dev.js +25 -25
- package/webpack.config.js +174 -174
package/tailwind.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
content: [
|
|
3
|
-
'./src/**/*.js',
|
|
4
|
-
'../../@base/slate-editor/src/dev/testComponents/**/*.js',
|
|
5
|
-
],
|
|
1
|
+
module.exports = {
|
|
2
|
+
content: [
|
|
3
|
+
'./src/**/*.js',
|
|
4
|
+
'../../@base/slate-editor/src/dev/testComponents/**/*.js',
|
|
5
|
+
],
|
|
6
6
|
};
|
package/webpack.config.dev.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
let config = require("./webpack.config")({
|
|
3
|
-
componentImportRoot: "@vonaffenfels/slate-editor/src/dev/testComponents",
|
|
4
|
-
relativePathToComponents: path.resolve(__dirname + "../../../@base/slate-editor/src/dev/testComponents"),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
config.entry.index = './src/dev.js';
|
|
9
|
-
|
|
10
|
-
config.mode = "development";
|
|
11
|
-
config.watch = true;
|
|
12
|
-
config.watchOptions = {ignored: ['dist/**', 'node_modules/**']};
|
|
13
|
-
config.cache = {type: "memory"};
|
|
14
|
-
|
|
15
|
-
config.output.publicPath = "/dist/";
|
|
16
|
-
config.devtool = 'inline-source-map';
|
|
17
|
-
|
|
18
|
-
config.devServer = {
|
|
19
|
-
static: path.join(__dirname, 'dist'),
|
|
20
|
-
compress: true,
|
|
21
|
-
historyApiFallback: true,
|
|
22
|
-
port: process.env.PORT || 5842,
|
|
23
|
-
devMiddleware: {writeToDisk: true},
|
|
24
|
-
};
|
|
25
|
-
|
|
1
|
+
const path = require('path');
|
|
2
|
+
let config = require("./webpack.config")({
|
|
3
|
+
componentImportRoot: "@vonaffenfels/slate-editor/src/dev/testComponents",
|
|
4
|
+
relativePathToComponents: path.resolve(__dirname + "../../../@base/slate-editor/src/dev/testComponents"),
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
config.entry.index = './src/dev.js';
|
|
9
|
+
|
|
10
|
+
config.mode = "development";
|
|
11
|
+
config.watch = true;
|
|
12
|
+
config.watchOptions = {ignored: ['dist/**', 'node_modules/**']};
|
|
13
|
+
config.cache = {type: "memory"};
|
|
14
|
+
|
|
15
|
+
config.output.publicPath = "/dist/";
|
|
16
|
+
config.devtool = 'inline-source-map';
|
|
17
|
+
|
|
18
|
+
config.devServer = {
|
|
19
|
+
static: path.join(__dirname, 'dist'),
|
|
20
|
+
compress: true,
|
|
21
|
+
historyApiFallback: true,
|
|
22
|
+
port: process.env.PORT || 5842,
|
|
23
|
+
devMiddleware: {writeToDisk: true},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
26
|
module.exports = config;
|
package/webpack.config.js
CHANGED
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
3
|
-
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
4
|
-
const webpack = require("webpack");
|
|
5
|
-
const {readFileSync} = require("fs");
|
|
6
|
-
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
7
|
-
|
|
8
|
-
module.exports = ({
|
|
9
|
-
outPath = path.resolve(__dirname, 'dist'),
|
|
10
|
-
babelConfig = JSON.parse(readFileSync("../../.babelrc").toString()),
|
|
11
|
-
componentImportRoot = "@vonaffenfels/slate-editor/src/dev/testComponents",
|
|
12
|
-
relativePathToComponents = path.resolve(__dirname + "../../../@base/slate-editor/src/dev/testComponents"),
|
|
13
|
-
postCssConfig = {
|
|
14
|
-
plugins: {
|
|
15
|
-
'postcss-import': {},
|
|
16
|
-
tailwindcss: {},
|
|
17
|
-
autoprefixer: {},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
transpilePaths = [],
|
|
21
|
-
}) => {
|
|
22
|
-
return {
|
|
23
|
-
mode: 'production',
|
|
24
|
-
entry: {index: './src/index.js'},
|
|
25
|
-
module: {
|
|
26
|
-
rules: [
|
|
27
|
-
{
|
|
28
|
-
test: /componentLoader.js/i,
|
|
29
|
-
use: [
|
|
30
|
-
{
|
|
31
|
-
loader: "@vonaffenfels/slate-editor/componentLoader.js",
|
|
32
|
-
options: {
|
|
33
|
-
componentRoot: relativePathToComponents,
|
|
34
|
-
componentImportRoot: componentImportRoot,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
loader: 'babel-loader',
|
|
39
|
-
options: babelConfig,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
test: /\.(js|jsx)$/,
|
|
45
|
-
include: [
|
|
46
|
-
path.resolve(__dirname, 'src'),
|
|
47
|
-
relativePathToComponents,
|
|
48
|
-
...transpilePaths,
|
|
49
|
-
],
|
|
50
|
-
use: [
|
|
51
|
-
{
|
|
52
|
-
loader: 'babel-loader',
|
|
53
|
-
options: babelConfig,
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
test: /\.s[ac]ss$/i,
|
|
59
|
-
include: path.resolve(__dirname, 'src', 'scss'),
|
|
60
|
-
use: [
|
|
61
|
-
"style-loader",
|
|
62
|
-
{
|
|
63
|
-
loader: 'css-loader',
|
|
64
|
-
options: {importLoaders: 1},
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
loader: 'postcss-loader',
|
|
68
|
-
options: {postcssOptions: postCssConfig},
|
|
69
|
-
},
|
|
70
|
-
"sass-loader",
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
test: /module\.css$/i,
|
|
75
|
-
use: [
|
|
76
|
-
'style-loader',
|
|
77
|
-
{
|
|
78
|
-
loader: 'css-loader',
|
|
79
|
-
options: {
|
|
80
|
-
importLoaders: 1,
|
|
81
|
-
modules: {exportLocalsConvention: "camelCase"},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
loader: 'postcss-loader',
|
|
86
|
-
options: {postcssOptions: postCssConfig},
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
test: /\.css$/i,
|
|
92
|
-
exclude: [/module\.css$/i],
|
|
93
|
-
use: [
|
|
94
|
-
'style-loader',
|
|
95
|
-
{
|
|
96
|
-
loader: 'css-loader',
|
|
97
|
-
options: {importLoaders: 1},
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
loader: 'postcss-loader',
|
|
101
|
-
options: {postcssOptions: postCssConfig},
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
test: /\.svg$/,
|
|
107
|
-
resourceQuery: {not: [/url/]}, // exclude react component if *.svg?url
|
|
108
|
-
use: [
|
|
109
|
-
{
|
|
110
|
-
loader: '@svgr/webpack',
|
|
111
|
-
options: {
|
|
112
|
-
dimensions: false,
|
|
113
|
-
svgo: false,
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
'url-loader',
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
test: /\.svg$/,
|
|
121
|
-
resourceQuery: /url/, // include if *.svg?url
|
|
122
|
-
use: [
|
|
123
|
-
{
|
|
124
|
-
loader: 'file-loader',
|
|
125
|
-
options: {
|
|
126
|
-
name: '[name].[ext]',
|
|
127
|
-
outputPath: 'svgs/',
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
test: /\.(woff(2)?|ttf|eot|png)(\?v=\d+\.\d+\.\d+)?$/,
|
|
134
|
-
use: [
|
|
135
|
-
{
|
|
136
|
-
loader: 'file-loader',
|
|
137
|
-
options: {
|
|
138
|
-
name: '[name].[ext]',
|
|
139
|
-
outputPath: 'fonts/',
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
test: /\.(graphql|gql)$/,
|
|
146
|
-
loader: 'raw-loader',
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
},
|
|
150
|
-
plugins: [
|
|
151
|
-
new CleanWebpackPlugin(),
|
|
152
|
-
new HtmlWebpackPlugin({template: path.join(__dirname, 'src', 'index.html')}),
|
|
153
|
-
new MiniCssExtractPlugin({}),
|
|
154
|
-
new webpack.DefinePlugin({'process': JSON.stringify({env: process.env})}),
|
|
155
|
-
],
|
|
156
|
-
resolve: {
|
|
157
|
-
extensions: ['.json', '.js', '.jsx'],
|
|
158
|
-
fallback: {
|
|
159
|
-
stream: false,
|
|
160
|
-
path: false,
|
|
161
|
-
timers: false,
|
|
162
|
-
fs: false,
|
|
163
|
-
zlib: false,
|
|
164
|
-
crypto: false,
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
output: {
|
|
168
|
-
filename: '[name].js',
|
|
169
|
-
libraryTarget: "umd",
|
|
170
|
-
publicPath: "/",
|
|
171
|
-
globalObject: "this",
|
|
172
|
-
path: outPath,
|
|
173
|
-
},
|
|
174
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
3
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
4
|
+
const webpack = require("webpack");
|
|
5
|
+
const {readFileSync} = require("fs");
|
|
6
|
+
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
7
|
+
|
|
8
|
+
module.exports = ({
|
|
9
|
+
outPath = path.resolve(__dirname, 'dist'),
|
|
10
|
+
babelConfig = JSON.parse(readFileSync("../../.babelrc").toString()),
|
|
11
|
+
componentImportRoot = "@vonaffenfels/slate-editor/src/dev/testComponents",
|
|
12
|
+
relativePathToComponents = path.resolve(__dirname + "../../../@base/slate-editor/src/dev/testComponents"),
|
|
13
|
+
postCssConfig = {
|
|
14
|
+
plugins: {
|
|
15
|
+
'postcss-import': {},
|
|
16
|
+
tailwindcss: {},
|
|
17
|
+
autoprefixer: {},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
transpilePaths = [],
|
|
21
|
+
}) => {
|
|
22
|
+
return {
|
|
23
|
+
mode: 'production',
|
|
24
|
+
entry: {index: './src/index.js'},
|
|
25
|
+
module: {
|
|
26
|
+
rules: [
|
|
27
|
+
{
|
|
28
|
+
test: /componentLoader.js/i,
|
|
29
|
+
use: [
|
|
30
|
+
{
|
|
31
|
+
loader: "@vonaffenfels/slate-editor/componentLoader.js",
|
|
32
|
+
options: {
|
|
33
|
+
componentRoot: relativePathToComponents,
|
|
34
|
+
componentImportRoot: componentImportRoot,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
loader: 'babel-loader',
|
|
39
|
+
options: babelConfig,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
test: /\.(js|jsx)$/,
|
|
45
|
+
include: [
|
|
46
|
+
path.resolve(__dirname, 'src'),
|
|
47
|
+
relativePathToComponents,
|
|
48
|
+
...transpilePaths,
|
|
49
|
+
],
|
|
50
|
+
use: [
|
|
51
|
+
{
|
|
52
|
+
loader: 'babel-loader',
|
|
53
|
+
options: babelConfig,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
test: /\.s[ac]ss$/i,
|
|
59
|
+
include: path.resolve(__dirname, 'src', 'scss'),
|
|
60
|
+
use: [
|
|
61
|
+
"style-loader",
|
|
62
|
+
{
|
|
63
|
+
loader: 'css-loader',
|
|
64
|
+
options: {importLoaders: 1},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
loader: 'postcss-loader',
|
|
68
|
+
options: {postcssOptions: postCssConfig},
|
|
69
|
+
},
|
|
70
|
+
"sass-loader",
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
test: /module\.css$/i,
|
|
75
|
+
use: [
|
|
76
|
+
'style-loader',
|
|
77
|
+
{
|
|
78
|
+
loader: 'css-loader',
|
|
79
|
+
options: {
|
|
80
|
+
importLoaders: 1,
|
|
81
|
+
modules: {exportLocalsConvention: "camelCase"},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
loader: 'postcss-loader',
|
|
86
|
+
options: {postcssOptions: postCssConfig},
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
test: /\.css$/i,
|
|
92
|
+
exclude: [/module\.css$/i],
|
|
93
|
+
use: [
|
|
94
|
+
'style-loader',
|
|
95
|
+
{
|
|
96
|
+
loader: 'css-loader',
|
|
97
|
+
options: {importLoaders: 1},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
loader: 'postcss-loader',
|
|
101
|
+
options: {postcssOptions: postCssConfig},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
test: /\.svg$/,
|
|
107
|
+
resourceQuery: {not: [/url/]}, // exclude react component if *.svg?url
|
|
108
|
+
use: [
|
|
109
|
+
{
|
|
110
|
+
loader: '@svgr/webpack',
|
|
111
|
+
options: {
|
|
112
|
+
dimensions: false,
|
|
113
|
+
svgo: false,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
'url-loader',
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
test: /\.svg$/,
|
|
121
|
+
resourceQuery: /url/, // include if *.svg?url
|
|
122
|
+
use: [
|
|
123
|
+
{
|
|
124
|
+
loader: 'file-loader',
|
|
125
|
+
options: {
|
|
126
|
+
name: '[name].[ext]',
|
|
127
|
+
outputPath: 'svgs/',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
test: /\.(woff(2)?|ttf|eot|png)(\?v=\d+\.\d+\.\d+)?$/,
|
|
134
|
+
use: [
|
|
135
|
+
{
|
|
136
|
+
loader: 'file-loader',
|
|
137
|
+
options: {
|
|
138
|
+
name: '[name].[ext]',
|
|
139
|
+
outputPath: 'fonts/',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
test: /\.(graphql|gql)$/,
|
|
146
|
+
loader: 'raw-loader',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
plugins: [
|
|
151
|
+
new CleanWebpackPlugin(),
|
|
152
|
+
new HtmlWebpackPlugin({template: path.join(__dirname, 'src', 'index.html')}),
|
|
153
|
+
new MiniCssExtractPlugin({}),
|
|
154
|
+
new webpack.DefinePlugin({'process': JSON.stringify({env: process.env})}),
|
|
155
|
+
],
|
|
156
|
+
resolve: {
|
|
157
|
+
extensions: ['.json', '.js', '.jsx'],
|
|
158
|
+
fallback: {
|
|
159
|
+
stream: false,
|
|
160
|
+
path: false,
|
|
161
|
+
timers: false,
|
|
162
|
+
fs: false,
|
|
163
|
+
zlib: false,
|
|
164
|
+
crypto: false,
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
output: {
|
|
168
|
+
filename: '[name].js',
|
|
169
|
+
libraryTarget: "umd",
|
|
170
|
+
publicPath: "/",
|
|
171
|
+
globalObject: "this",
|
|
172
|
+
path: outPath,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
175
|
};
|