@corpsmap/corpsmap 3.2.77 → 3.2.79
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/lib/dev.js +70 -297
- package/lib/prod.js +70 -297
- package/package.json +2 -2
- package/src/application-bundles/map-layers-bundle.js +38 -33
- package/src/application-bundles/notification-bundle.js +35 -31
- package/src/application-bundles/south-region-bundle.js +48 -41
- package/src/application-bundles-old/ui-bundle.js +239 -179
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import v4 from
|
|
1
|
+
import { v4 } from "uuid/v4";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
name:
|
|
4
|
+
name: "notifications",
|
|
5
5
|
|
|
6
|
-
getReducer(){
|
|
7
|
-
const initialData = {}
|
|
6
|
+
getReducer() {
|
|
7
|
+
const initialData = {};
|
|
8
8
|
|
|
9
9
|
return (state = initialData, { type, payload }) => {
|
|
10
|
-
if(payload && payload.notification){
|
|
10
|
+
if (payload && payload.notification) {
|
|
11
11
|
const uid = v4();
|
|
12
12
|
payload.notification.uid = uid;
|
|
13
13
|
return Object.assign({}, state, {
|
|
14
|
-
[uid]: payload.notification
|
|
15
|
-
})
|
|
14
|
+
[uid]: payload.notification,
|
|
15
|
+
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
switch(type){
|
|
19
|
-
case
|
|
20
|
-
case
|
|
18
|
+
switch (type) {
|
|
19
|
+
case "NOTIFICATIONS_FIRED":
|
|
20
|
+
case "NOTIFICATIONS_DISMISSED":
|
|
21
21
|
return Object.assign({}, state, payload);
|
|
22
22
|
default:
|
|
23
23
|
return state;
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
doNotificationsFire:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
doNotificationsFire:
|
|
29
|
+
(options) =>
|
|
30
|
+
({ dispatch, store }) => {
|
|
31
|
+
const uid = v4();
|
|
32
|
+
options.uid = uid;
|
|
33
|
+
dispatch({
|
|
34
|
+
type: "NOTIFICATIONS_FIRED",
|
|
35
|
+
payload: {
|
|
36
|
+
[uid]: options,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
},
|
|
38
40
|
|
|
39
|
-
doNotificationsDismiss:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
doNotificationsDismiss:
|
|
42
|
+
(uid) =>
|
|
43
|
+
({ dispatch, store }) => {
|
|
44
|
+
const state = store.selectNotifications();
|
|
45
|
+
delete state[uid];
|
|
46
|
+
dispatch({
|
|
47
|
+
type: "NOTIFICATIONS_DISMISSED",
|
|
48
|
+
payload: state,
|
|
49
|
+
});
|
|
50
|
+
},
|
|
47
51
|
|
|
48
52
|
selectNotifications: (state) => {
|
|
49
53
|
return state.notifications;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import v4 from "uuid/v4";
|
|
1
|
+
import { v4 } from "uuid/v4";
|
|
2
2
|
import { createSelector } from "redux-bundler";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -23,51 +23,59 @@ export default {
|
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
25
|
|
|
26
|
-
doSouthRegionOpen:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
doSouthRegionOpen:
|
|
27
|
+
(options) =>
|
|
28
|
+
({ dispatch, store }) => {
|
|
29
|
+
const children = store.selectSouthRegionChildrenObj();
|
|
30
|
+
const uid = v4();
|
|
31
|
+
options.uid = uid;
|
|
32
|
+
dispatch({
|
|
33
|
+
type: "SOUTH_REGION_OPENED",
|
|
34
|
+
payload: {
|
|
35
|
+
children: { ...children, [uid]: options },
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
doSouthRegionClose:
|
|
40
|
+
() =>
|
|
41
|
+
({ dispatch, store }) => {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: "SOUTH_REGION_CLOSED",
|
|
44
|
+
payload: {
|
|
45
|
+
children: {},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
},
|
|
45
49
|
|
|
46
|
-
doSouthRegionCloseTab:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
doSouthRegionCloseTab:
|
|
51
|
+
(uid) =>
|
|
52
|
+
({ dispatch, store }) => {
|
|
53
|
+
const children = store.selectSouthRegionChildrenObj();
|
|
54
|
+
delete children[uid];
|
|
55
|
+
dispatch({
|
|
56
|
+
type: "SOUTH_REGION_TAB_CLOSED",
|
|
57
|
+
payload: {
|
|
58
|
+
children: { ...children },
|
|
59
|
+
_shouldTryToCloseRegion: true,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
},
|
|
57
63
|
|
|
58
|
-
doSouthRegionTryClose:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
doSouthRegionTryClose:
|
|
65
|
+
() =>
|
|
66
|
+
({ dispatch, store }) => {
|
|
67
|
+
dispatch({
|
|
68
|
+
type: "SOUTH_REGION_TRY_CLOSE",
|
|
69
|
+
payload: { _shouldTryToCloseRegion: false },
|
|
70
|
+
});
|
|
71
|
+
const children = store.selectSouthRegionChildren();
|
|
72
|
+
if (!children.length) store.doSouthRegionClose();
|
|
73
|
+
},
|
|
66
74
|
|
|
67
75
|
selectSouthRegionChildrenObj: (state) => {
|
|
68
76
|
return state.southRegion.children;
|
|
69
77
|
},
|
|
70
|
-
|
|
78
|
+
|
|
71
79
|
selectSouthRegionChildren: createSelector(
|
|
72
80
|
"selectSouthRegionChildrenObj",
|
|
73
81
|
(children) => {
|
|
@@ -84,5 +92,4 @@ export default {
|
|
|
84
92
|
if (state.southRegion._shouldTryToCloseRegion)
|
|
85
93
|
return { actionCreator: "doSouthRegionTryClose" };
|
|
86
94
|
},
|
|
87
|
-
|
|
88
95
|
};
|