@plurid/plurid-ui-state-react 0.0.0-0 → 0.0.0-10
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/distribution/data/interfaces/index.d.ts +15 -0
- package/distribution/index.d.ts +1 -0
- package/distribution/index.es.js +240 -457
- package/distribution/index.es.js.map +1 -1
- package/distribution/index.js +247 -462
- package/distribution/index.js.map +1 -1
- package/distribution/modules/head/index.d.ts +29 -6
- package/distribution/modules/notifications/index.d.ts +27 -6
- package/distribution/modules/shortcuts/index.d.ts +23 -6
- package/distribution/modules/sitting/index.d.ts +37 -6
- package/distribution/modules/themes/index.d.ts +33 -6
- package/package.json +22 -17
- package/distribution/modules/head/actions/index.d.ts +0 -5
- package/distribution/modules/head/initial/index.d.ts +0 -3
- package/distribution/modules/head/reducer/index.d.ts +0 -4
- package/distribution/modules/head/resolvers/index.d.ts +0 -5
- package/distribution/modules/head/selectors/index.d.ts +0 -6
- package/distribution/modules/head/types/index.d.ts +0 -21
- package/distribution/modules/notifications/actions/index.d.ts +0 -7
- package/distribution/modules/notifications/initial/index.d.ts +0 -3
- package/distribution/modules/notifications/reducer/index.d.ts +0 -3
- package/distribution/modules/notifications/resolvers/index.d.ts +0 -7
- package/distribution/modules/notifications/selectors/index.d.ts +0 -6
- package/distribution/modules/notifications/types/index.d.ts +0 -31
- package/distribution/modules/shortcuts/actions/index.d.ts +0 -5
- package/distribution/modules/shortcuts/initial/index.d.ts +0 -3
- package/distribution/modules/shortcuts/reducer/index.d.ts +0 -3
- package/distribution/modules/shortcuts/resolvers/index.d.ts +0 -7
- package/distribution/modules/shortcuts/selectors/index.d.ts +0 -6
- package/distribution/modules/shortcuts/types/index.d.ts +0 -9
- package/distribution/modules/sitting/actions/index.d.ts +0 -6
- package/distribution/modules/sitting/initial/index.d.ts +0 -3
- package/distribution/modules/sitting/reducer/index.d.ts +0 -4
- package/distribution/modules/sitting/resolvers/index.d.ts +0 -6
- package/distribution/modules/sitting/selectors/index.d.ts +0 -7
- package/distribution/modules/sitting/types/index.d.ts +0 -15
- package/distribution/modules/themes/actions/index.d.ts +0 -5
- package/distribution/modules/themes/initial/index.d.ts +0 -3
- package/distribution/modules/themes/reducer/index.d.ts +0 -4
- package/distribution/modules/themes/resolvers/index.d.ts +0 -5
- package/distribution/modules/themes/selectors/index.d.ts +0 -7
- package/distribution/modules/themes/types/index.d.ts +0 -15
package/distribution/index.js
CHANGED
|
@@ -1,499 +1,284 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("immer");
|
|
4
|
+
|
|
5
|
+
var toolkit = require("@reduxjs/toolkit");
|
|
6
|
+
|
|
7
|
+
var pluridThemes = require("@plurid/plurid-themes");
|
|
8
|
+
|
|
9
|
+
const initialState$4 = {
|
|
10
|
+
title: "",
|
|
11
|
+
description: "",
|
|
12
|
+
ogTitle: "",
|
|
13
|
+
ogImage: "",
|
|
14
|
+
ogURL: "",
|
|
15
|
+
ogDescription: "",
|
|
16
|
+
canonicalURL: "",
|
|
17
|
+
styles: [],
|
|
18
|
+
scripts: []
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const name$4 = "head";
|
|
22
|
+
|
|
23
|
+
const factory$4 = (state = initialState$4) => toolkit.createSlice({
|
|
24
|
+
name: name$4,
|
|
25
|
+
initialState: state,
|
|
26
|
+
reducers: {
|
|
27
|
+
setHead: (state, action) => {
|
|
28
|
+
state = Object.assign(Object.assign({}, state), action);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const slice$4 = factory$4();
|
|
2
34
|
|
|
3
|
-
|
|
35
|
+
const actions$4 = slice$4.actions;
|
|
4
36
|
|
|
5
|
-
|
|
37
|
+
const getHead = state => state.head;
|
|
6
38
|
|
|
7
|
-
const
|
|
8
|
-
|
|
39
|
+
const selectors$4 = {
|
|
40
|
+
getHead: getHead
|
|
41
|
+
};
|
|
9
42
|
|
|
10
|
-
|
|
43
|
+
const reducer$4 = slice$4.reducer;
|
|
44
|
+
|
|
45
|
+
var index$4 = Object.freeze({
|
|
11
46
|
__proto__: null,
|
|
12
|
-
|
|
47
|
+
actions: actions$4,
|
|
48
|
+
factory: factory$4,
|
|
49
|
+
getHead: getHead,
|
|
50
|
+
initialState: initialState$4,
|
|
51
|
+
name: name$4,
|
|
52
|
+
reducer: reducer$4,
|
|
53
|
+
selectors: selectors$4,
|
|
54
|
+
slice: slice$4
|
|
13
55
|
});
|
|
14
56
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// #endregion external
|
|
65
|
-
// #endregion imports
|
|
66
|
-
// #region module
|
|
67
|
-
const reducer = (state = initialState, action) => {
|
|
68
|
-
switch (action.type) {
|
|
69
|
-
case SET_HEAD:
|
|
70
|
-
return resolvers.setHead(state, action);
|
|
71
|
-
default:
|
|
72
|
-
return Object.assign({}, state);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const metareducer = (initialState) => (state = initialState, action) => reducer(state, action);
|
|
76
|
-
// #endregion exports
|
|
77
|
-
|
|
78
|
-
// #endregion external
|
|
79
|
-
// #endregion imports
|
|
80
|
-
// #region module
|
|
81
|
-
const getHeadData = (state) => state.head;
|
|
82
|
-
const selectors = {
|
|
83
|
-
getHeadData,
|
|
84
|
-
};
|
|
85
|
-
// #endregion exports
|
|
86
|
-
|
|
87
|
-
// #region imports
|
|
88
|
-
// #endregion exports
|
|
89
|
-
|
|
90
|
-
var index$1 = /*#__PURE__*/Object.freeze({
|
|
91
|
-
__proto__: null,
|
|
92
|
-
actions: actions,
|
|
93
|
-
initialState: initialState,
|
|
94
|
-
reducer: reducer,
|
|
95
|
-
metareducer: metareducer,
|
|
96
|
-
selectors: selectors,
|
|
97
|
-
Types: index
|
|
57
|
+
const initialState$3 = [];
|
|
58
|
+
|
|
59
|
+
const name$3 = "notifications";
|
|
60
|
+
|
|
61
|
+
const factory$3 = (state = initialState$3) => toolkit.createSlice({
|
|
62
|
+
name: name$3,
|
|
63
|
+
initialState: state,
|
|
64
|
+
reducers: {
|
|
65
|
+
new: (state, action) => {
|
|
66
|
+
const id = Math.random() + "";
|
|
67
|
+
const text = action.payload;
|
|
68
|
+
const newNotification = {
|
|
69
|
+
id: id,
|
|
70
|
+
text: text
|
|
71
|
+
};
|
|
72
|
+
return [ ...state, newNotification ];
|
|
73
|
+
},
|
|
74
|
+
add: (state, action) => {
|
|
75
|
+
const id = action.payload.id || Math.random() + "";
|
|
76
|
+
const newNotification = Object.assign(Object.assign({}, action.payload), {
|
|
77
|
+
id: id
|
|
78
|
+
});
|
|
79
|
+
const existingNotification = state.find((notification => notification.id === newNotification.id));
|
|
80
|
+
if (existingNotification) {
|
|
81
|
+
const newState = state.map((notification => {
|
|
82
|
+
if (notification.id === newNotification.id) {
|
|
83
|
+
return newNotification;
|
|
84
|
+
}
|
|
85
|
+
return notification;
|
|
86
|
+
}));
|
|
87
|
+
return newState;
|
|
88
|
+
}
|
|
89
|
+
return [ ...state, newNotification ];
|
|
90
|
+
},
|
|
91
|
+
update: (state, action) => {
|
|
92
|
+
const newState = state.map((message => {
|
|
93
|
+
if (message.id === action.payload.id) {
|
|
94
|
+
const newNotification = Object.assign({}, action.payload);
|
|
95
|
+
return newNotification;
|
|
96
|
+
}
|
|
97
|
+
return Object.assign({}, message);
|
|
98
|
+
}));
|
|
99
|
+
return newState;
|
|
100
|
+
},
|
|
101
|
+
remove: (state, action) => {
|
|
102
|
+
const newState = state.filter((message => message.id !== action.payload));
|
|
103
|
+
return newState;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
98
106
|
});
|
|
99
107
|
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
108
|
+
const slice$3 = factory$3();
|
|
109
|
+
|
|
110
|
+
const actions$3 = slice$3.actions;
|
|
111
|
+
|
|
112
|
+
const getAll = state => state.notifications;
|
|
113
|
+
|
|
114
|
+
const selectors$3 = {
|
|
115
|
+
getAll: getAll
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const reducer$3 = slice$3.reducer;
|
|
104
119
|
|
|
105
|
-
var index$
|
|
120
|
+
var index$3 = Object.freeze({
|
|
106
121
|
__proto__: null,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
122
|
+
actions: actions$3,
|
|
123
|
+
factory: factory$3,
|
|
124
|
+
initialState: initialState$3,
|
|
125
|
+
name: name$3,
|
|
126
|
+
reducer: reducer$3,
|
|
127
|
+
selectors: selectors$3,
|
|
128
|
+
slice: slice$3
|
|
110
129
|
});
|
|
111
130
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return {
|
|
130
|
-
type: REMOVE_NOTIFICATION,
|
|
131
|
-
payload,
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
const actions$1 = {
|
|
135
|
-
addNotification,
|
|
136
|
-
updateNotification,
|
|
137
|
-
removeNotification,
|
|
138
|
-
};
|
|
139
|
-
// #endregion exports
|
|
140
|
-
|
|
141
|
-
// #endregion external
|
|
142
|
-
// #endregion imports
|
|
143
|
-
// #region module
|
|
144
|
-
const initialState$1 = [];
|
|
145
|
-
// #endregion exports
|
|
146
|
-
|
|
147
|
-
// #endregion external
|
|
148
|
-
// #endregion imports
|
|
149
|
-
// #region module
|
|
150
|
-
const addNotification$1 = (state, action) => {
|
|
151
|
-
const newNotification = Object.assign({}, action.payload);
|
|
152
|
-
return [
|
|
153
|
-
...state,
|
|
154
|
-
newNotification,
|
|
155
|
-
];
|
|
156
|
-
};
|
|
157
|
-
const updateNotification$1 = (state, action) => {
|
|
158
|
-
const updatedState = state.map(notification => {
|
|
159
|
-
if (notification.id === action.payload.id) {
|
|
160
|
-
const newNotification = Object.assign({}, action.payload);
|
|
161
|
-
return newNotification;
|
|
162
|
-
}
|
|
163
|
-
return Object.assign({}, notification);
|
|
164
|
-
});
|
|
165
|
-
return [
|
|
166
|
-
...updatedState,
|
|
167
|
-
];
|
|
168
|
-
};
|
|
169
|
-
const removeNotification$1 = (state, action) => {
|
|
170
|
-
const updatedState = state.filter(notification => notification.id !== action.payload.id);
|
|
171
|
-
return [
|
|
172
|
-
...updatedState,
|
|
173
|
-
];
|
|
174
|
-
};
|
|
175
|
-
const resolvers$1 = {
|
|
176
|
-
addNotification: addNotification$1,
|
|
177
|
-
updateNotification: updateNotification$1,
|
|
178
|
-
removeNotification: removeNotification$1,
|
|
179
|
-
};
|
|
180
|
-
// #endregion exports
|
|
181
|
-
|
|
182
|
-
// #region imports
|
|
183
|
-
// #endregion external
|
|
184
|
-
// #endregion imports
|
|
185
|
-
// #region module
|
|
186
|
-
const reducer$1 = (state = initialState$1, action) => {
|
|
187
|
-
switch (action.type) {
|
|
188
|
-
case ADD_NOTIFICATION:
|
|
189
|
-
return resolvers$1.addNotification(state, action);
|
|
190
|
-
case UPDATE_NOTIFICATION:
|
|
191
|
-
return resolvers$1.updateNotification(state, action);
|
|
192
|
-
case REMOVE_NOTIFICATION:
|
|
193
|
-
return resolvers$1.removeNotification(state, action);
|
|
194
|
-
default:
|
|
195
|
-
return [
|
|
196
|
-
...state,
|
|
197
|
-
];
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
// #endregion exports
|
|
201
|
-
|
|
202
|
-
// #endregion external
|
|
203
|
-
// #endregion imports
|
|
204
|
-
// #region module
|
|
205
|
-
const getAll = (state) => state.notifications;
|
|
206
|
-
const selectors$1 = {
|
|
207
|
-
getAll,
|
|
208
|
-
};
|
|
209
|
-
// #endregion exports
|
|
210
|
-
|
|
211
|
-
// #region imports
|
|
212
|
-
// #endregion exports
|
|
213
|
-
|
|
214
|
-
var index$3 = /*#__PURE__*/Object.freeze({
|
|
215
|
-
__proto__: null,
|
|
216
|
-
actions: actions$1,
|
|
217
|
-
initialState: initialState$1,
|
|
218
|
-
reducer: reducer$1,
|
|
219
|
-
selectors: selectors$1,
|
|
220
|
-
Types: index$2
|
|
131
|
+
const initialState$2 = {
|
|
132
|
+
global: true
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const name$2 = "shortcuts";
|
|
136
|
+
|
|
137
|
+
const factory$2 = (state = initialState$2) => toolkit.createSlice({
|
|
138
|
+
name: name$2,
|
|
139
|
+
initialState: state,
|
|
140
|
+
reducers: {
|
|
141
|
+
setGlobalShortcuts: (state, action) => {
|
|
142
|
+
state.global = action.payload;
|
|
143
|
+
},
|
|
144
|
+
toggleGlobalShortcuts: (state, _action) => {
|
|
145
|
+
state.global = !state.global;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
221
148
|
});
|
|
222
149
|
|
|
223
|
-
|
|
224
|
-
const TOGGLE_GLOBAL_SHORTCUTS = 'TOGGLE_GLOBAL_SHORTCUTS';
|
|
225
|
-
// #endregion module
|
|
150
|
+
const slice$2 = factory$2();
|
|
226
151
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
});
|
|
152
|
+
const actions$2 = slice$2.actions;
|
|
153
|
+
|
|
154
|
+
const getGlobal = state => state.shortcuts.global;
|
|
231
155
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
payload,
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
const actions$2 = {
|
|
243
|
-
toggleGlobalShortcuts,
|
|
244
|
-
};
|
|
245
|
-
// #endregion exports
|
|
246
|
-
|
|
247
|
-
// #endregion external
|
|
248
|
-
// #endregion imports
|
|
249
|
-
// #region module
|
|
250
|
-
const initialState$2 = {
|
|
251
|
-
global: true,
|
|
252
|
-
};
|
|
253
|
-
// #endregion exports
|
|
254
|
-
|
|
255
|
-
// #endregion external
|
|
256
|
-
// #endregion imports
|
|
257
|
-
// #region module
|
|
258
|
-
const toggleGlobalShortcuts$1 = (state, action) => {
|
|
259
|
-
const global = action.payload
|
|
260
|
-
? action.payload
|
|
261
|
-
: !state.global;
|
|
262
|
-
return Object.assign(Object.assign({}, state), { global });
|
|
263
|
-
};
|
|
264
|
-
const resolvers$2 = {
|
|
265
|
-
toggleGlobalShortcuts: toggleGlobalShortcuts$1,
|
|
266
|
-
};
|
|
267
|
-
// #endregion exports
|
|
268
|
-
|
|
269
|
-
// #region imports
|
|
270
|
-
// #endregion external
|
|
271
|
-
// #endregion imports
|
|
272
|
-
// #region module
|
|
273
|
-
const reducer$2 = (state = initialState$2, action) => {
|
|
274
|
-
switch (action.type) {
|
|
275
|
-
case TOGGLE_GLOBAL_SHORTCUTS:
|
|
276
|
-
return resolvers$2.toggleGlobalShortcuts(state, action);
|
|
277
|
-
default:
|
|
278
|
-
return Object.assign({}, state);
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
// #endregion exports
|
|
282
|
-
|
|
283
|
-
// #endregion external
|
|
284
|
-
// #endregion imports
|
|
285
|
-
// #region module
|
|
286
|
-
const getGlobal = (state) => state.shortcuts.global;
|
|
287
|
-
const selectors$2 = {
|
|
288
|
-
getGlobal,
|
|
289
|
-
};
|
|
290
|
-
// #endregion exports
|
|
291
|
-
|
|
292
|
-
// #region imports
|
|
293
|
-
// #endregion exports
|
|
294
|
-
|
|
295
|
-
var index$5 = /*#__PURE__*/Object.freeze({
|
|
156
|
+
const selectors$2 = {
|
|
157
|
+
getGlobal: getGlobal
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const reducer$2 = slice$2.reducer;
|
|
161
|
+
|
|
162
|
+
var index$2 = Object.freeze({
|
|
296
163
|
__proto__: null,
|
|
297
164
|
actions: actions$2,
|
|
165
|
+
factory: factory$2,
|
|
298
166
|
initialState: initialState$2,
|
|
167
|
+
name: name$2,
|
|
299
168
|
reducer: reducer$2,
|
|
300
169
|
selectors: selectors$2,
|
|
301
|
-
|
|
170
|
+
slice: slice$2
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const initialState$1 = {
|
|
174
|
+
currentLink: "",
|
|
175
|
+
tray: false
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const name$1 = "sitting";
|
|
179
|
+
|
|
180
|
+
const factory$1 = (state = initialState$1) => toolkit.createSlice({
|
|
181
|
+
name: name$1,
|
|
182
|
+
initialState: state,
|
|
183
|
+
reducers: {
|
|
184
|
+
setSittingCurrentLink: (state, action) => {
|
|
185
|
+
const currentLink = action.payload;
|
|
186
|
+
return Object.assign(Object.assign({}, state), {
|
|
187
|
+
currentLink: currentLink
|
|
188
|
+
});
|
|
189
|
+
},
|
|
190
|
+
setSittingTray: (state, action) => {
|
|
191
|
+
state.tray = action.payload;
|
|
192
|
+
},
|
|
193
|
+
toggleSittingTray: (state, _action) => {
|
|
194
|
+
state.tray = !state.tray;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
302
197
|
});
|
|
303
198
|
|
|
304
|
-
|
|
305
|
-
const SET_SITTING_CURRENT_LINK = 'SET_SITTING_CURRENT_LINK';
|
|
306
|
-
const TOGGLE_SITTING_TRAY = 'TOGGLE_SITTING_TRAY';
|
|
307
|
-
// #endregion module
|
|
199
|
+
const slice$1 = factory$1();
|
|
308
200
|
|
|
309
|
-
|
|
201
|
+
const actions$1 = slice$1.actions;
|
|
202
|
+
|
|
203
|
+
const getCurrentLink = state => state.sitting.currentLink;
|
|
204
|
+
|
|
205
|
+
const getTray = state => state.sitting.tray;
|
|
206
|
+
|
|
207
|
+
const selectors$1 = {
|
|
208
|
+
getCurrentLink: getCurrentLink,
|
|
209
|
+
getTray: getTray
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const reducer$1 = slice$1.reducer;
|
|
213
|
+
|
|
214
|
+
var index$1 = Object.freeze({
|
|
310
215
|
__proto__: null,
|
|
311
|
-
|
|
312
|
-
|
|
216
|
+
actions: actions$1,
|
|
217
|
+
factory: factory$1,
|
|
218
|
+
initialState: initialState$1,
|
|
219
|
+
name: name$1,
|
|
220
|
+
reducer: reducer$1,
|
|
221
|
+
selectors: selectors$1,
|
|
222
|
+
slice: slice$1
|
|
313
223
|
});
|
|
314
224
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
// #endregion imports
|
|
338
|
-
// #region module
|
|
339
|
-
const initialState$3 = {
|
|
340
|
-
currentLink: '',
|
|
341
|
-
tray: false,
|
|
342
|
-
};
|
|
343
|
-
// #endregion exports
|
|
344
|
-
|
|
345
|
-
// #endregion external
|
|
346
|
-
// #endregion imports
|
|
347
|
-
// #region module
|
|
348
|
-
const setSittingCurrentLink$1 = (state, action) => {
|
|
349
|
-
const currentLink = action.payload;
|
|
350
|
-
return Object.assign(Object.assign({}, state), { currentLink });
|
|
351
|
-
};
|
|
352
|
-
const toggleSittingTray$1 = (state, action) => {
|
|
353
|
-
if (typeof action.payload === 'boolean') {
|
|
354
|
-
return Object.assign(Object.assign({}, state), { tray: action.payload });
|
|
355
|
-
}
|
|
356
|
-
return Object.assign(Object.assign({}, state), { tray: !state.tray });
|
|
357
|
-
};
|
|
358
|
-
const resolvers$3 = {
|
|
359
|
-
setSittingCurrentLink: setSittingCurrentLink$1,
|
|
360
|
-
toggleSittingTray: toggleSittingTray$1,
|
|
361
|
-
};
|
|
362
|
-
// #endregion exports
|
|
363
|
-
|
|
364
|
-
// #region imports
|
|
365
|
-
// #endregion external
|
|
366
|
-
// #endregion imports
|
|
367
|
-
// #region module
|
|
368
|
-
const reducer$3 = (state = initialState$3, action) => {
|
|
369
|
-
switch (action.type) {
|
|
370
|
-
case SET_SITTING_CURRENT_LINK:
|
|
371
|
-
return resolvers$3.setSittingCurrentLink(state, action);
|
|
372
|
-
case TOGGLE_SITTING_TRAY:
|
|
373
|
-
return resolvers$3.toggleSittingTray(state, action);
|
|
374
|
-
default:
|
|
375
|
-
return Object.assign({}, state);
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
const metareducer$1 = (initialState) => (state = initialState, action) => reducer$3(state, action);
|
|
379
|
-
// #endregion exports
|
|
380
|
-
|
|
381
|
-
// #endregion external
|
|
382
|
-
// #endregion imports
|
|
383
|
-
// #region module
|
|
384
|
-
const getCurrentLink = (state) => state.sitting.currentLink;
|
|
385
|
-
const getTray = (state) => state.sitting.tray;
|
|
386
|
-
const selectors$3 = {
|
|
387
|
-
getCurrentLink,
|
|
388
|
-
getTray,
|
|
389
|
-
};
|
|
390
|
-
// #endregion exports
|
|
391
|
-
|
|
392
|
-
// #region imports
|
|
393
|
-
// #endregion exports
|
|
394
|
-
|
|
395
|
-
var index$7 = /*#__PURE__*/Object.freeze({
|
|
396
|
-
__proto__: null,
|
|
397
|
-
actions: actions$3,
|
|
398
|
-
initialState: initialState$3,
|
|
399
|
-
reducer: reducer$3,
|
|
400
|
-
metareducer: metareducer$1,
|
|
401
|
-
selectors: selectors$3,
|
|
402
|
-
Types: index$6
|
|
225
|
+
const initialState = {
|
|
226
|
+
general: Object.assign({}, pluridThemes.plurid),
|
|
227
|
+
interaction: Object.assign({}, pluridThemes.plurid)
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const name = "themes";
|
|
231
|
+
|
|
232
|
+
const factory = (state = initialState) => toolkit.createSlice({
|
|
233
|
+
name: name,
|
|
234
|
+
initialState: state,
|
|
235
|
+
reducers: {
|
|
236
|
+
setTheme: (state, action) => {
|
|
237
|
+
const {type: type, theme: theme} = action.payload;
|
|
238
|
+
state[type] = theme;
|
|
239
|
+
},
|
|
240
|
+
setGeneralTheme: (state, action) => {
|
|
241
|
+
state.general = action.payload;
|
|
242
|
+
},
|
|
243
|
+
setInteractionTheme: (state, action) => {
|
|
244
|
+
state.interaction = action.payload;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
403
247
|
});
|
|
404
248
|
|
|
405
|
-
|
|
406
|
-
// #endregion imports
|
|
407
|
-
// #region module
|
|
408
|
-
const SET_THEME = 'SET_THEME';
|
|
409
|
-
// #endregion module
|
|
249
|
+
const slice = factory();
|
|
410
250
|
|
|
411
|
-
|
|
412
|
-
__proto__: null,
|
|
413
|
-
SET_THEME: SET_THEME
|
|
414
|
-
});
|
|
251
|
+
const actions = slice.actions;
|
|
415
252
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
};
|
|
429
|
-
// #endregion exports
|
|
430
|
-
|
|
431
|
-
// #region imports
|
|
432
|
-
// #endregion external
|
|
433
|
-
// #endregion imports
|
|
434
|
-
// #region module
|
|
435
|
-
const initialState$4 = {
|
|
436
|
-
general: Object.assign({}, pluridThemes.plurid),
|
|
437
|
-
interaction: Object.assign({}, pluridThemes.plurid),
|
|
438
|
-
};
|
|
439
|
-
// #endregion exports
|
|
440
|
-
|
|
441
|
-
// #endregion external
|
|
442
|
-
// #endregion imports
|
|
443
|
-
// #region module
|
|
444
|
-
const setTheme$1 = (state, action) => {
|
|
445
|
-
const { type, theme, } = action.payload;
|
|
446
|
-
const newState = Object.assign({}, state);
|
|
447
|
-
newState[type] = Object.assign({}, theme);
|
|
448
|
-
return newState;
|
|
449
|
-
};
|
|
450
|
-
const resolvers$4 = {
|
|
451
|
-
setTheme: setTheme$1,
|
|
452
|
-
};
|
|
453
|
-
// #endregion exports
|
|
454
|
-
|
|
455
|
-
// #region imports
|
|
456
|
-
// #endregion external
|
|
457
|
-
// #endregion imports
|
|
458
|
-
// #region module
|
|
459
|
-
const reducer$4 = (state = initialState$4, action) => {
|
|
460
|
-
switch (action.type) {
|
|
461
|
-
case SET_THEME:
|
|
462
|
-
return resolvers$4.setTheme(state, action);
|
|
463
|
-
default:
|
|
464
|
-
return Object.assign({}, state);
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
const metareducer$2 = (initialState) => (state = initialState, action) => reducer$4(state, action);
|
|
468
|
-
// #endregion exports
|
|
469
|
-
|
|
470
|
-
// #endregion external
|
|
471
|
-
// #endregion imports
|
|
472
|
-
// #region module
|
|
473
|
-
const getGeneralTheme = (state) => state.themes.general;
|
|
474
|
-
const getInteractionTheme = (state) => state.themes.interaction;
|
|
475
|
-
const selectors$4 = {
|
|
476
|
-
getGeneralTheme,
|
|
477
|
-
getInteractionTheme,
|
|
478
|
-
};
|
|
479
|
-
// #endregion exports
|
|
480
|
-
|
|
481
|
-
// #region imports
|
|
482
|
-
// #endregion exports
|
|
483
|
-
|
|
484
|
-
var index$9 = /*#__PURE__*/Object.freeze({
|
|
253
|
+
const getGeneralTheme = state => state.themes.general;
|
|
254
|
+
|
|
255
|
+
const getInteractionTheme = state => state.themes.interaction;
|
|
256
|
+
|
|
257
|
+
const selectors = {
|
|
258
|
+
getGeneralTheme: getGeneralTheme,
|
|
259
|
+
getInteractionTheme: getInteractionTheme
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const reducer = slice.reducer;
|
|
263
|
+
|
|
264
|
+
var index = Object.freeze({
|
|
485
265
|
__proto__: null,
|
|
486
|
-
actions: actions
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
266
|
+
actions: actions,
|
|
267
|
+
factory: factory,
|
|
268
|
+
initialState: initialState,
|
|
269
|
+
name: name,
|
|
270
|
+
reducer: reducer,
|
|
271
|
+
selectors: selectors,
|
|
272
|
+
slice: slice
|
|
492
273
|
});
|
|
493
274
|
|
|
494
|
-
exports.head = index$
|
|
275
|
+
exports.head = index$4;
|
|
276
|
+
|
|
495
277
|
exports.notifications = index$3;
|
|
496
|
-
|
|
497
|
-
exports.
|
|
498
|
-
|
|
278
|
+
|
|
279
|
+
exports.shortcuts = index$2;
|
|
280
|
+
|
|
281
|
+
exports.sitting = index$1;
|
|
282
|
+
|
|
283
|
+
exports.themes = index;
|
|
499
284
|
//# sourceMappingURL=index.js.map
|