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