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