@plurid/plurid-ui-state-react 0.0.0-11 → 0.0.0-12

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.
@@ -1,274 +0,0 @@
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;
36
-
37
- const selectors$4 = {
38
- getHead: getHead
39
- };
40
-
41
- const reducer$4 = slice$4.reducer;
42
-
43
- var index$4 = Object.freeze({
44
- __proto__: null,
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
53
- });
54
-
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
- }
104
- });
105
-
106
- const slice$3 = factory$3();
107
-
108
- const actions$3 = slice$3.actions;
109
-
110
- const getAll = state => state.notifications;
111
-
112
- const selectors$3 = {
113
- getAll: getAll
114
- };
115
-
116
- const reducer$3 = slice$3.reducer;
117
-
118
- var index$3 = Object.freeze({
119
- __proto__: null,
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
127
- });
128
-
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
- }
146
- });
147
-
148
- const slice$2 = factory$2();
149
-
150
- const actions$2 = slice$2.actions;
151
-
152
- const getGlobal = state => state.shortcuts.global;
153
-
154
- const selectors$2 = {
155
- getGlobal: getGlobal
156
- };
157
-
158
- const reducer$2 = slice$2.reducer;
159
-
160
- var index$2 = Object.freeze({
161
- __proto__: null,
162
- actions: actions$2,
163
- factory: factory$2,
164
- initialState: initialState$2,
165
- name: name$2,
166
- reducer: reducer$2,
167
- selectors: selectors$2,
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
- }
195
- });
196
-
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;
211
-
212
- var index$1 = Object.freeze({
213
- __proto__: null,
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
221
- });
222
-
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
- }
245
- });
246
-
247
- const slice = factory();
248
-
249
- const actions = slice.actions;
250
-
251
- const getGeneralTheme = state => state.themes.general;
252
-
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({
263
- __proto__: null,
264
- actions: actions,
265
- factory: factory,
266
- initialState: initialState,
267
- name: name,
268
- reducer: reducer,
269
- selectors: selectors,
270
- slice: slice
271
- });
272
-
273
- export { index$4 as head, index$3 as notifications, index$2 as shortcuts, index$1 as sitting, index as themes };
274
- //# sourceMappingURL=index.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":["../source/modules/head/index.ts","../source/modules/notifications/index.ts","../source/modules/shortcuts/index.ts","../source/modules/sitting/index.ts","../source/modules/themes/index.ts"],"sourcesContent":["// #region imports\n // #region libraries\n import {\n createSlice,\n PayloadAction,\n } from '@reduxjs/toolkit';\n // #endregion libraries\n\n\n // #region external\n import {\n StateWithSlice,\n } from '~data/interfaces';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nexport interface HeadState {\n title: string;\n description: string;\n canonicalURL: string;\n ogTitle: string;\n ogImage: string;\n ogURL: string;\n ogDescription: string;\n styles: string[];\n scripts: string[];\n}\n\n\nexport const initialState: HeadState = {\n title: '',\n description: '',\n ogTitle: '',\n ogImage: '',\n ogURL: '',\n ogDescription: '',\n canonicalURL: '',\n styles: [],\n scripts: [],\n};\n\nexport const name = 'head' as const;\n\n\nexport const factory = (\n state: HeadState = initialState,\n) => createSlice({\n name,\n initialState: state,\n reducers: {\n setHead: (\n state,\n action: PayloadAction<Partial<HeadState>>,\n ) => {\n state = {\n ...state,\n ...action,\n };\n },\n },\n});\n\nexport const slice = factory();\n// #endregion module\n\n\n\n// #region exports\nexport const actions = slice.actions;\n\n\nexport const getHead = (\n state: StateWithSlice<typeof name, HeadState>,\n): HeadState => state.head;\n\nexport const selectors = {\n getHead,\n};\n\n\nexport const reducer = slice.reducer;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n createSlice,\n PayloadAction,\n } from '@reduxjs/toolkit';\n // #endregion libraries\n\n\n // #region external\n import {\n Notification,\n AddNotificationPayload,\n StateWithSlice,\n } from '~data/interfaces';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nexport type NotificationsState = Notification[];\n\n\nexport const initialState: NotificationsState = [];\n\nexport const name = 'notifications' as const;\n\n\nexport const factory = (\n state: NotificationsState = initialState,\n) => createSlice({\n name,\n initialState: state,\n reducers: {\n new: (\n state,\n action: PayloadAction<string>,\n ) => {\n const id = Math.random() + '';\n const text = action.payload;\n\n const newNotification: Notification = {\n id,\n text,\n };\n\n return [\n ...state,\n newNotification,\n ];\n },\n add: (\n state,\n action: PayloadAction<AddNotificationPayload>,\n ) => {\n const id = action.payload.id || Math.random() + '';\n\n const newNotification: Notification = {\n ...action.payload,\n id,\n };\n\n const existingNotification = state.find(\n notification => notification.id === newNotification.id,\n );\n\n if (existingNotification) {\n const newState = state.map(notification => {\n if (notification.id === newNotification.id) {\n return newNotification;\n }\n\n return notification;\n });\n\n return newState;\n }\n\n return [\n ...state,\n newNotification,\n ];\n },\n update: (\n state,\n action: PayloadAction<Notification>,\n ) => {\n const newState = state.map(message => {\n if (message.id === action.payload.id) {\n const newNotification: Notification = {\n ...action.payload,\n };\n return newNotification;\n }\n\n return {\n ...message,\n };\n });\n\n return newState;\n },\n remove: (\n state,\n action: PayloadAction<string>,\n ) => {\n const newState = state.filter(\n message => message.id !== action.payload,\n );\n\n return newState;\n },\n },\n});\n\nexport const slice = factory();\n// #endregion module\n\n\n\n// #region exports\nexport const actions = slice.actions;\n\n\nconst getAll = (\n state: StateWithSlice<typeof name, NotificationsState>,\n) => state.notifications;\n\nexport const selectors = {\n getAll,\n};\n\n\nexport const reducer = slice.reducer;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n createSlice,\n PayloadAction,\n } from '@reduxjs/toolkit';\n // #endregion libraries\n\n\n // #region external\n import {\n StateWithSlice,\n } from '~data/interfaces';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nexport interface ShortcutsState {\n global: boolean;\n}\n\n\nexport const initialState: ShortcutsState = {\n global: true,\n};\n\nexport const name = 'shortcuts' as const;\n\n\nexport const factory = (\n state: ShortcutsState = initialState,\n) => createSlice({\n name,\n initialState: state,\n reducers: {\n setGlobalShortcuts: (\n state,\n action: PayloadAction<boolean>,\n ) => {\n state.global = action.payload;\n },\n toggleGlobalShortcuts: (\n state,\n _action: PayloadAction<void>,\n ) => {\n state.global = !state.global;\n },\n },\n});\n\nexport const slice = factory();\n// #endregion module\n\n\n\n// #region exports\nexport const actions = slice.actions;\n\n\nconst getGlobal = (\n state: StateWithSlice<typeof name, ShortcutsState>,\n) => state.shortcuts.global;\n\nexport const selectors = {\n getGlobal,\n};\n\n\nexport const reducer = slice.reducer;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n createSlice,\n PayloadAction,\n } from '@reduxjs/toolkit';\n // #endregion libraries\n\n\n // #region external\n import {\n StateWithSlice,\n } from '~data/interfaces';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nexport interface SittingState {\n currentLink: string;\n tray: boolean;\n}\n\n\nexport const initialState: SittingState = {\n currentLink: '',\n tray: false,\n};\n\nexport const name = 'sitting' as const;\n\n\nexport const factory = (\n state: SittingState = initialState,\n) => createSlice({\n name,\n initialState: state,\n reducers: {\n setSittingCurrentLink: (\n state,\n action: PayloadAction<string>,\n ) => {\n const currentLink = action.payload;\n\n return {\n ...state,\n currentLink,\n };\n },\n setSittingTray: (\n state,\n action: PayloadAction<boolean>,\n ) => {\n state.tray = action.payload;\n },\n toggleSittingTray: (\n state,\n _action: PayloadAction<void>,\n ) => {\n state.tray = !state.tray;\n }\n },\n});\n\nexport const slice = factory();\n// #endregion module\n\n\n\n// #region exports\nexport const actions = slice.actions;\n\n\nconst getCurrentLink = (\n state: StateWithSlice<typeof name, SittingState>,\n) => state.sitting.currentLink;\nconst getTray = (\n state: StateWithSlice<typeof name, SittingState>,\n) => state.sitting.tray;\n\nexport const selectors = {\n getCurrentLink,\n getTray,\n};\n\n\nexport const reducer = slice.reducer;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n createSlice,\n PayloadAction,\n } from '@reduxjs/toolkit';\n\n\n import {\n Theme,\n plurid,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n\n\n // #region external\n import {\n StateWithSlice,\n } from '~data/interfaces';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nexport interface ThemesState {\n general: Theme;\n interaction: Theme;\n}\n\n\nexport const initialState: ThemesState = {\n general: {\n ...plurid,\n },\n interaction: {\n ...plurid,\n },\n};\n\nexport const name = 'themes' as const;\n\n\nexport interface SetThemePayload {\n type: 'general' | 'interaction';\n theme: Theme;\n}\n\n\nexport const factory = (\n state: ThemesState = initialState,\n) => createSlice({\n name,\n initialState: state,\n reducers: {\n setTheme: (\n state,\n action: PayloadAction<SetThemePayload>,\n ) => {\n const {\n type,\n theme,\n } = action.payload;\n\n state[type] = theme;\n },\n setGeneralTheme: (\n state,\n action: PayloadAction<Theme>,\n ) => {\n state.general = action.payload;\n },\n setInteractionTheme: (\n state,\n action: PayloadAction<Theme>,\n ) => {\n state.interaction = action.payload;\n },\n },\n});\n\nexport const slice = factory();\n// #endregion module\n\n\n\n// #region exports\nexport const actions = slice.actions;\n\n\nconst getGeneralTheme = (\n state: StateWithSlice<typeof name, ThemesState>,\n) => state.themes.general;\nconst getInteractionTheme = (\n state: StateWithSlice<typeof name, ThemesState>,\n) => state.themes.interaction;\n\nexport const selectors = {\n getGeneralTheme,\n getInteractionTheme,\n};\n\n\nexport const reducer = slice.reducer;\n// #endregion exports\n"],"names":["initialState","title","description","ogTitle","ogImage","ogURL","ogDescription","canonicalURL","styles","scripts","name","factory","state","createSlice","reducers","setHead","action","Object","assign","slice","actions","getHead","head","selectors","reducer","new","id","Math","random","text","payload","newNotification","add","existingNotification","find","notification","newState","map","update","message","remove","filter","getAll","notifications","global","setGlobalShortcuts","toggleGlobalShortcuts","_action","getGlobal","shortcuts","currentLink","tray","setSittingCurrentLink","setSittingTray","toggleSittingTray","getCurrentLink","sitting","getTray","general","plurid","interaction","setTheme","type","theme","setGeneralTheme","setInteractionTheme","getGeneralTheme","themes","getInteractionTheme"],"mappings":";;;;;;AAgCO,MAAMA,iBAA0B;IACnCC,OAAO;IACP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EAJ,MAAMuC,OAAOnC,OAAOc;AAAO;QAE/BwB,mBAAmB,CACf1C,OACAmC;YAEAnC,MAAMuC,QAAQvC,MAAMuC;AAAI;;;;AAK7B,MAAMhC,UAAQR;;AAMd,MAAMS,YAAUD,QAAMC;;AAG7B,MAAMmC,iBACF3C,SACCA,MAAM4C,QAAQN;;AACnB,MAAMO,UACF7C,SACCA,MAAM4C,QAAQL;;AAEZ,MAAM5B,cAAY;IACrBgC;IACAE;;;AAIG,MAAMjC,YAAUL,QAAMK;;;;;;;;;;;;;ACxDtB,MAAMxB,eAA4B;IACrC0D,SAAOzC,OAAAC,OAAA,CAAA,GACAyC;IAEPC,aAAW3C,OAAAC,OAAA,CAAA,GACJyC;;;AAIJ,MAAMjD,OAAO;;AASb,MAAMC,UAAU,CACnBC,QAAqBZ,iBACpBa,YAAY;IACbH;IACAV,cAAcY;IACdE,UAAU;QACN+C,UAAU,CACNjD,OACAI;YAEA,OAAM8C,MACFA,MAAIC,OACJA,SACA/C,OAAOc;YAEXlB,MAAMkD,QAAQC;AAAK;QAEvBC,iBAAiB,CACbpD,OACAI;YAEAJ,MAAM8C,UAAU1C,OAAOc;AAAO;QAElCmC,qBAAqB,CACjBrD,OACAI;YAEAJ,MAAMgD,cAAc5C,OAAOc;AAAO;;;;AAKvC,MAAMX,QAAQR;;AAMd,MAAMS,UAAUD,MAAMC;;AAG7B,MAAM8C,kBACFtD,SACCA,MAAMuD,OAAOT;;AAClB,MAAMU,sBACFxD,SACCA,MAAMuD,OAAOP;;AAEX,MAAMrC,YAAY;IACrB2C;IACAE;;;AAIG,MAAM5C,UAAUL,MAAMK;;;;;;;;;;;;;"}
@@ -1,59 +0,0 @@
1
- import { PayloadAction } from '@reduxjs/toolkit';
2
- import { StateWithSlice } from "../../data/interfaces";
3
- export interface HeadState {
4
- title: string;
5
- description: string;
6
- canonicalURL: string;
7
- ogTitle: string;
8
- ogImage: string;
9
- ogURL: string;
10
- ogDescription: string;
11
- styles: string[];
12
- scripts: string[];
13
- }
14
- export declare const initialState: HeadState;
15
- export declare const name: "head";
16
- export declare const factory: (state?: HeadState) => import("@reduxjs/toolkit").Slice<HeadState, {
17
- setHead: (state: {
18
- title: string;
19
- description: string;
20
- canonicalURL: string;
21
- ogTitle: string;
22
- ogImage: string;
23
- ogURL: string;
24
- ogDescription: string;
25
- styles: string[];
26
- scripts: string[];
27
- }, action: PayloadAction<Partial<HeadState>>) => void;
28
- }, "head">;
29
- export declare const slice: import("@reduxjs/toolkit").Slice<HeadState, {
30
- setHead: (state: {
31
- title: string;
32
- description: string;
33
- canonicalURL: string;
34
- ogTitle: string;
35
- ogImage: string;
36
- ogURL: string;
37
- ogDescription: string;
38
- styles: string[];
39
- scripts: string[];
40
- }, action: PayloadAction<Partial<HeadState>>) => void;
41
- }, "head">;
42
- export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
43
- setHead: (state: {
44
- title: string;
45
- description: string;
46
- canonicalURL: string;
47
- ogTitle: string;
48
- ogImage: string;
49
- ogURL: string;
50
- ogDescription: string;
51
- styles: string[];
52
- scripts: string[];
53
- }, action: PayloadAction<Partial<HeadState>>) => void;
54
- }, "head">;
55
- export declare const getHead: (state: StateWithSlice<typeof name, HeadState>) => HeadState;
56
- export declare const selectors: {
57
- getHead: (state: StateWithSlice<typeof name, HeadState>) => HeadState;
58
- };
59
- export declare const reducer: Reducer<State>;
@@ -1,6 +0,0 @@
1
- import * as head from './head';
2
- import * as notifications from './notifications';
3
- import * as shortcuts from './shortcuts';
4
- import * as sitting from './sitting';
5
- import * as themes from './themes';
6
- export { head, notifications, shortcuts, sitting, themes, };
@@ -1,132 +0,0 @@
1
- import { PayloadAction } from '@reduxjs/toolkit';
2
- import { Notification, AddNotificationPayload, StateWithSlice } from "../../data/interfaces";
3
- export declare type NotificationsState = Notification[];
4
- export declare const initialState: NotificationsState;
5
- export declare const name: "notifications";
6
- export declare const factory: (state?: NotificationsState) => import("@reduxjs/toolkit").Slice<NotificationsState, {
7
- new: (state: {
8
- id: string;
9
- text: string;
10
- html?: boolean | undefined;
11
- react?: boolean | undefined;
12
- timeout?: number | undefined;
13
- wordBreak?: boolean | undefined;
14
- }[], action: PayloadAction<string>) => Notification[];
15
- add: (state: {
16
- id: string;
17
- text: string;
18
- html?: boolean | undefined;
19
- react?: boolean | undefined;
20
- timeout?: number | undefined;
21
- wordBreak?: boolean | undefined;
22
- }[], action: PayloadAction<AddNotificationPayload>) => Notification[];
23
- update: (state: {
24
- id: string;
25
- text: string;
26
- html?: boolean | undefined;
27
- react?: boolean | undefined;
28
- timeout?: number | undefined;
29
- wordBreak?: boolean | undefined;
30
- }[], action: PayloadAction<Notification>) => Notification[];
31
- remove: (state: {
32
- id: string;
33
- text: string;
34
- html?: boolean | undefined;
35
- react?: boolean | undefined;
36
- timeout?: number | undefined;
37
- wordBreak?: boolean | undefined;
38
- }[], action: PayloadAction<string>) => {
39
- id: string;
40
- text: string;
41
- html?: boolean | undefined;
42
- react?: boolean | undefined;
43
- timeout?: number | undefined;
44
- wordBreak?: boolean | undefined;
45
- }[];
46
- }, "notifications">;
47
- export declare const slice: import("@reduxjs/toolkit").Slice<NotificationsState, {
48
- new: (state: {
49
- id: string;
50
- text: string;
51
- html?: boolean | undefined;
52
- react?: boolean | undefined;
53
- timeout?: number | undefined;
54
- wordBreak?: boolean | undefined;
55
- }[], action: PayloadAction<string>) => Notification[];
56
- add: (state: {
57
- id: string;
58
- text: string;
59
- html?: boolean | undefined;
60
- react?: boolean | undefined;
61
- timeout?: number | undefined;
62
- wordBreak?: boolean | undefined;
63
- }[], action: PayloadAction<AddNotificationPayload>) => Notification[];
64
- update: (state: {
65
- id: string;
66
- text: string;
67
- html?: boolean | undefined;
68
- react?: boolean | undefined;
69
- timeout?: number | undefined;
70
- wordBreak?: boolean | undefined;
71
- }[], action: PayloadAction<Notification>) => Notification[];
72
- remove: (state: {
73
- id: string;
74
- text: string;
75
- html?: boolean | undefined;
76
- react?: boolean | undefined;
77
- timeout?: number | undefined;
78
- wordBreak?: boolean | undefined;
79
- }[], action: PayloadAction<string>) => {
80
- id: string;
81
- text: string;
82
- html?: boolean | undefined;
83
- react?: boolean | undefined;
84
- timeout?: number | undefined;
85
- wordBreak?: boolean | undefined;
86
- }[];
87
- }, "notifications">;
88
- export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
89
- new: (state: {
90
- id: string;
91
- text: string;
92
- html?: boolean | undefined;
93
- react?: boolean | undefined;
94
- timeout?: number | undefined;
95
- wordBreak?: boolean | undefined;
96
- }[], action: PayloadAction<string>) => Notification[];
97
- add: (state: {
98
- id: string;
99
- text: string;
100
- html?: boolean | undefined;
101
- react?: boolean | undefined;
102
- timeout?: number | undefined;
103
- wordBreak?: boolean | undefined;
104
- }[], action: PayloadAction<AddNotificationPayload>) => Notification[];
105
- update: (state: {
106
- id: string;
107
- text: string;
108
- html?: boolean | undefined;
109
- react?: boolean | undefined;
110
- timeout?: number | undefined;
111
- wordBreak?: boolean | undefined;
112
- }[], action: PayloadAction<Notification>) => Notification[];
113
- remove: (state: {
114
- id: string;
115
- text: string;
116
- html?: boolean | undefined;
117
- react?: boolean | undefined;
118
- timeout?: number | undefined;
119
- wordBreak?: boolean | undefined;
120
- }[], action: PayloadAction<string>) => {
121
- id: string;
122
- text: string;
123
- html?: boolean | undefined;
124
- react?: boolean | undefined;
125
- timeout?: number | undefined;
126
- wordBreak?: boolean | undefined;
127
- }[];
128
- }, "notifications">;
129
- export declare const selectors: {
130
- getAll: (state: StateWithSlice<typeof name, NotificationsState>) => NotificationsState;
131
- };
132
- export declare const reducer: Reducer<State>;
@@ -1,35 +0,0 @@
1
- import { PayloadAction } from '@reduxjs/toolkit';
2
- import { StateWithSlice } from "../../data/interfaces";
3
- export interface ShortcutsState {
4
- global: boolean;
5
- }
6
- export declare const initialState: ShortcutsState;
7
- export declare const name: "shortcuts";
8
- export declare const factory: (state?: ShortcutsState) => import("@reduxjs/toolkit").Slice<ShortcutsState, {
9
- setGlobalShortcuts: (state: {
10
- global: boolean;
11
- }, action: PayloadAction<boolean>) => void;
12
- toggleGlobalShortcuts: (state: {
13
- global: boolean;
14
- }, _action: PayloadAction<void>) => void;
15
- }, "shortcuts">;
16
- export declare const slice: import("@reduxjs/toolkit").Slice<ShortcutsState, {
17
- setGlobalShortcuts: (state: {
18
- global: boolean;
19
- }, action: PayloadAction<boolean>) => void;
20
- toggleGlobalShortcuts: (state: {
21
- global: boolean;
22
- }, _action: PayloadAction<void>) => void;
23
- }, "shortcuts">;
24
- export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
25
- setGlobalShortcuts: (state: {
26
- global: boolean;
27
- }, action: PayloadAction<boolean>) => void;
28
- toggleGlobalShortcuts: (state: {
29
- global: boolean;
30
- }, _action: PayloadAction<void>) => void;
31
- }, "shortcuts">;
32
- export declare const selectors: {
33
- getGlobal: (state: StateWithSlice<typeof name, ShortcutsState>) => boolean;
34
- };
35
- export declare const reducer: Reducer<State>;
@@ -1,64 +0,0 @@
1
- import { PayloadAction } from '@reduxjs/toolkit';
2
- import { StateWithSlice } from "../../data/interfaces";
3
- export interface SittingState {
4
- currentLink: string;
5
- tray: boolean;
6
- }
7
- export declare const initialState: SittingState;
8
- export declare const name: "sitting";
9
- export declare const factory: (state?: SittingState) => import("@reduxjs/toolkit").Slice<SittingState, {
10
- setSittingCurrentLink: (state: {
11
- currentLink: string;
12
- tray: boolean;
13
- }, action: PayloadAction<string>) => {
14
- currentLink: string;
15
- tray: boolean;
16
- };
17
- setSittingTray: (state: {
18
- currentLink: string;
19
- tray: boolean;
20
- }, action: PayloadAction<boolean>) => void;
21
- toggleSittingTray: (state: {
22
- currentLink: string;
23
- tray: boolean;
24
- }, _action: PayloadAction<void>) => void;
25
- }, "sitting">;
26
- export declare const slice: import("@reduxjs/toolkit").Slice<SittingState, {
27
- setSittingCurrentLink: (state: {
28
- currentLink: string;
29
- tray: boolean;
30
- }, action: PayloadAction<string>) => {
31
- currentLink: string;
32
- tray: boolean;
33
- };
34
- setSittingTray: (state: {
35
- currentLink: string;
36
- tray: boolean;
37
- }, action: PayloadAction<boolean>) => void;
38
- toggleSittingTray: (state: {
39
- currentLink: string;
40
- tray: boolean;
41
- }, _action: PayloadAction<void>) => void;
42
- }, "sitting">;
43
- export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
44
- setSittingCurrentLink: (state: {
45
- currentLink: string;
46
- tray: boolean;
47
- }, action: PayloadAction<string>) => {
48
- currentLink: string;
49
- tray: boolean;
50
- };
51
- setSittingTray: (state: {
52
- currentLink: string;
53
- tray: boolean;
54
- }, action: PayloadAction<boolean>) => void;
55
- toggleSittingTray: (state: {
56
- currentLink: string;
57
- tray: boolean;
58
- }, _action: PayloadAction<void>) => void;
59
- }, "sitting">;
60
- export declare const selectors: {
61
- getCurrentLink: (state: StateWithSlice<typeof name, SittingState>) => string;
62
- getTray: (state: StateWithSlice<typeof name, SittingState>) => boolean;
63
- };
64
- export declare const reducer: Reducer<State>;