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