@evlop/commons 1.0.236 → 1.0.238
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/actions/restApi.js +8 -1
- package/dist/src/actions/restApi.js.map +1 -1
- package/dist/src/adapters/getUserToken/index.js +7 -18
- package/dist/src/adapters/getUserToken/index.js.map +1 -1
- package/dist/src/adapters/getUserToken/index.native.js +9 -20
- package/dist/src/adapters/getUserToken/index.native.js.map +1 -1
- package/dist/src/classes/Model.js +5 -14
- package/dist/src/classes/Model.js.map +1 -1
- package/dist/src/components/hoc/withSettings.js +1 -12
- package/dist/src/components/hoc/withSettings.js.map +1 -1
- package/dist/src/components/hoc/withSettings.native.js +2 -13
- package/dist/src/components/hoc/withSettings.native.js.map +1 -1
- package/dist/src/constants/iconInfo/index.js +4 -5
- package/dist/src/constants/iconInfo/index.js.map +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
- package/dist/src/contexts/EDLContext.d.ts +7 -0
- package/dist/src/contexts/EDLContext.d.ts.map +1 -0
- package/dist/src/contexts/EDLContext.js +10 -0
- package/dist/src/contexts/EDLContext.js.map +1 -0
- package/dist/src/data-sources/collection.js +3 -12
- package/dist/src/data-sources/collection.js.map +1 -1
- package/dist/src/data-sources/collectionRecord.js +3 -12
- package/dist/src/data-sources/collectionRecord.js.map +1 -1
- package/dist/src/data-sources/listUrl.js +3 -12
- package/dist/src/data-sources/listUrl.js.map +1 -1
- package/dist/src/data-sources/url.js +3 -12
- package/dist/src/data-sources/url.js.map +1 -1
- package/dist/src/edl/BlockRenderer.d.ts +9 -0
- package/dist/src/edl/BlockRenderer.d.ts.map +1 -0
- package/dist/src/edl/BlockRenderer.js +102 -0
- package/dist/src/edl/BlockRenderer.js.map +1 -0
- package/dist/src/edl/DataSourceLoader.d.ts +7 -0
- package/dist/src/edl/DataSourceLoader.d.ts.map +1 -0
- package/dist/src/edl/DataSourceLoader.js +13 -0
- package/dist/src/edl/DataSourceLoader.js.map +1 -0
- package/dist/src/edl/elements/DataSource.d.ts +8 -0
- package/dist/src/edl/elements/DataSource.d.ts.map +1 -0
- package/dist/src/edl/elements/DataSource.js +19 -0
- package/dist/src/edl/elements/DataSource.js.map +1 -0
- package/dist/src/edl/elements/Fragment.d.ts +9 -0
- package/dist/src/edl/elements/Fragment.d.ts.map +1 -0
- package/dist/src/edl/elements/Fragment.js +14 -0
- package/dist/src/edl/elements/Fragment.js.map +1 -0
- package/dist/src/edl/elements/UseEffect.d.ts +10 -0
- package/dist/src/edl/elements/UseEffect.d.ts.map +1 -0
- package/dist/src/edl/elements/UseEffect.js +28 -0
- package/dist/src/edl/elements/UseEffect.js.map +1 -0
- package/dist/src/edl/elements/index.d.ts +17 -0
- package/dist/src/edl/elements/index.d.ts.map +1 -0
- package/dist/src/edl/elements/index.js +16 -0
- package/dist/src/edl/elements/index.js.map +1 -0
- package/dist/src/edl/index.d.ts +28 -0
- package/dist/src/edl/index.d.ts.map +1 -0
- package/dist/src/edl/index.js +107 -0
- package/dist/src/edl/index.js.map +1 -0
- package/dist/src/edl/localStorage.app.d.ts +6 -0
- package/dist/src/edl/localStorage.app.d.ts.map +1 -0
- package/dist/src/edl/localStorage.app.js +14 -0
- package/dist/src/edl/localStorage.app.js.map +1 -0
- package/dist/src/edl/localStorage.d.ts +6 -0
- package/dist/src/edl/localStorage.d.ts.map +1 -0
- package/dist/src/edl/localStorage.js +10 -0
- package/dist/src/edl/localStorage.js.map +1 -0
- package/dist/src/edl/parser.d.ts +3 -0
- package/dist/src/edl/parser.d.ts.map +1 -0
- package/dist/src/edl/parser.js +166 -0
- package/dist/src/edl/parser.js.map +1 -0
- package/dist/src/helpers/functions.js +1 -1
- package/dist/src/helpers/functions.js.map +1 -1
- package/dist/src/helpers/handlebarHelpers.js +1 -1
- package/dist/src/helpers/handlebarHelpers.js.map +1 -1
- package/dist/src/helpers/handlebarHelpers.test.d.ts.map +1 -1
- package/dist/src/helpers/handlebarHelpers.test.js +1 -1
- package/dist/src/helpers/handlebarHelpers.test.js.map +1 -1
- package/dist/src/helpers/iconHelper.js +7 -13
- package/dist/src/helpers/iconHelper.js.map +1 -1
- package/dist/src/helpers/pathHelper.js +1 -1
- package/dist/src/helpers/pathHelper.js.map +1 -1
- package/dist/src/helpers/themeHelpers.js +23 -3
- package/dist/src/helpers/themeHelpers.js.map +1 -1
- package/dist/src/hooks/useAction.js +3 -12
- package/dist/src/hooks/useAction.js.map +1 -1
- package/dist/src/hooks/useActionable.d.ts +1 -0
- package/dist/src/hooks/useActionable.d.ts.map +1 -1
- package/dist/src/hooks/useActionable.js +3 -1
- package/dist/src/hooks/useActionable.js.map +1 -1
- package/dist/src/hooks/useComponentConfigProps.js +1 -1
- package/dist/src/hooks/useComponentConfigProps.js.map +1 -1
- package/dist/src/hooks/useDataSource.js +1 -1
- package/dist/src/hooks/useDataSource.js.map +1 -1
- package/dist/src/hooks/useNavigator.js +1 -1
- package/dist/src/hooks/useNavigator.js.map +1 -1
- package/dist/src/hooks/useParams.js +1 -1
- package/dist/src/hooks/useParams.js.map +1 -1
- package/dist/src/hooks/useTranslation.js +2 -5
- package/dist/src/hooks/useTranslation.js.map +1 -1
- package/dist/src/middlewares/dataSourceMiddleware.js +11 -22
- package/dist/src/middlewares/dataSourceMiddleware.js.map +1 -1
- package/dist/src/middlewares/restApiMiddleware.js +5 -5
- package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
- package/dist/src/providers/I18nProvider.js +11 -14
- package/dist/src/providers/I18nProvider.js.map +1 -1
- package/dist/src/providers/Scope.js +4 -1
- package/dist/src/providers/Scope.js.map +1 -1
- package/dist/src/reducers/adminMenus.js +1 -1
- package/dist/src/reducers/adminMenus.js.map +1 -1
- package/dist/src/reducers/collection.js +66 -15
- package/dist/src/reducers/collection.js.map +1 -1
- package/dist/src/reducers/components.js +28 -7
- package/dist/src/reducers/components.js.map +1 -1
- package/dist/src/reducers/config/index.js +16 -4
- package/dist/src/reducers/config/index.js.map +1 -1
- package/dist/src/reducers/context.js +5 -16
- package/dist/src/reducers/context.js.map +1 -1
- package/dist/src/reducers/dataSource.js +14 -2
- package/dist/src/reducers/dataSource.js.map +1 -1
- package/dist/src/reducers/files.js +18 -4
- package/dist/src/reducers/files.js.map +1 -1
- package/dist/src/reducers/fonts.js +15 -6
- package/dist/src/reducers/fonts.js.map +1 -1
- package/dist/src/reducers/icons.js +3 -12
- package/dist/src/reducers/icons.js.map +1 -1
- package/dist/src/reducers/modals.js +1 -1
- package/dist/src/reducers/modals.js.map +1 -1
- package/dist/src/reducers/pages/index.js +69 -27
- package/dist/src/reducers/pages/index.js.map +1 -1
- package/dist/src/reducers/routes.js +19 -21
- package/dist/src/reducers/routes.js.map +1 -1
- package/dist/src/reducers/search.js +4 -1
- package/dist/src/reducers/search.js.map +1 -1
- package/dist/src/reducers/session.js +21 -4
- package/dist/src/reducers/session.js.map +1 -1
- package/dist/src/reducers/user.js +12 -2
- package/dist/src/reducers/user.js.map +1 -1
- package/dist/src/services/SessionManager.js +4 -1
- package/dist/src/services/SessionManager.js.map +1 -1
- package/package.json +1 -1
@@ -1,15 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
3
|
-
var t = {};
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
-
t[p] = s[p];
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
-
t[p[i]] = s[p[i]];
|
10
|
-
}
|
11
|
-
return t;
|
12
|
-
};
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
3
|
exports.updateContext = exports.resetContext = exports.addContext = exports.setContext = exports.RESET_CONTEXT = exports.ADD_CONTEXT = exports.SET_CONTEXT = void 0;
|
15
4
|
const change_case_1 = require("change-case");
|
@@ -37,15 +26,15 @@ let initialState = {};
|
|
37
26
|
const context = (state = initialState, action) => {
|
38
27
|
switch (action.type) {
|
39
28
|
case exports.SET_CONTEXT:
|
40
|
-
return
|
29
|
+
return { ...action.context };
|
41
30
|
case exports.ADD_CONTEXT:
|
42
|
-
return
|
31
|
+
return { ...state, [action.name]: action.data };
|
43
32
|
case exports.RESET_CONTEXT:
|
44
33
|
if (action.name) {
|
45
|
-
const
|
46
|
-
return
|
34
|
+
const { [action.name]: contextToRemove, ...remainingContext } = state;
|
35
|
+
return { ...remainingContext };
|
47
36
|
}
|
48
|
-
return
|
37
|
+
return { ...initialState };
|
49
38
|
default:
|
50
39
|
return state;
|
51
40
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/reducers/context.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/reducers/context.tsx"],"names":[],"mappings":";;;AAAA,6CAAwC;AAE3B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,aAAa,GAAG,eAAe,CAAC;AAEtC,MAAM,UAAU,GAAG,CAAC,OAAO,GAAC,EAAE,EAAC,EAAE,CAAA,CAAC;IACrC,IAAI,EAAE,mBAAW;IACjB,OAAO;CACV,CAAC,CAAC;AAHU,QAAA,UAAU,cAGpB;AAEI,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,GAAC,EAAE,EAAC,EAAE,CAAA,CAAC;IACxC,IAAI,EAAE,mBAAW;IACjB,IAAI,EAAE,IAAI,IAAI,uBAAS,CAAC,IAAI,CAAC;IAC7B,IAAI;CACP,CAAC,CAAC;AAJU,QAAA,UAAU,cAIpB;AAEI,MAAM,YAAY,GAAG,CAAC,IAAI,EAAC,EAAE,CAAA,CAAC;IACjC,IAAI,EAAE,qBAAa;IACnB,IAAI,EAAE,IAAI,IAAI,uBAAS,CAAC,IAAI,CAAC;CAChC,CAAC,CAAC;AAHU,QAAA,YAAY,gBAGtB;AAEU,QAAA,aAAa,GAAG,kBAAU,CAAC;AAExC,IAAI,YAAY,GAAO,EACtB,CAAC;AAEF,MAAM,OAAO,GAAI,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC7C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,mBAAW;YACZ,OAAO,EAAC,GAAG,MAAM,CAAC,OAAO,EAAC,CAAC;QAC/B,KAAK,mBAAW;YACZ,OAAO,EAAC,GAAG,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAC,MAAM,CAAC,IAAI,EAAC,CAAC;QACjD,KAAK,qBAAa;YACd,IAAG,MAAM,CAAC,IAAI,EAAE;gBACZ,MAAM,EAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAC,GAAG,KAAK,CAAC;gBACpE,OAAO,EAAC,GAAG,gBAAgB,EAAC,CAAC;aAChC;YAAC,OAAO,EAAC,GAAG,YAAY,EAAC,CAAC;QAC/B;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -34,11 +34,23 @@ exports.default = (state = initialState, action) => {
|
|
34
34
|
switch (action.type) {
|
35
35
|
case exports.REGISTER_DATA_SOURCE: {
|
36
36
|
const { dataSource } = action;
|
37
|
-
return
|
37
|
+
return {
|
38
|
+
...state,
|
39
|
+
dataSources: {
|
40
|
+
...state.dataSources,
|
41
|
+
[dataSource.identifier]: dataSource
|
42
|
+
},
|
43
|
+
};
|
38
44
|
}
|
39
45
|
case exports.DATA_SOURCE_UPDATE_DATA: {
|
40
46
|
const { key, data } = action;
|
41
|
-
return
|
47
|
+
return {
|
48
|
+
...state,
|
49
|
+
data: {
|
50
|
+
...state.data,
|
51
|
+
[key]: data,
|
52
|
+
}
|
53
|
+
};
|
42
54
|
}
|
43
55
|
default:
|
44
56
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataSource.js","sourceRoot":"","sources":["../../../src/reducers/dataSource.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AACpD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,0BAA0B,GAAG,4BAA4B,CAAC;AAC1D,QAAA,+BAA+B,GAAG,iCAAiC,CAAC;AACpE,QAAA,mCAAmC,GAAG,qCAAqC,CAAC;AAC5E,QAAA,6BAA6B,GAAG,+BAA+B,CAAC;AAChE,QAAA,6BAA6B,GAAG,+BAA+B,CAAC;AAChE,QAAA,4BAA4B,GAAG,8BAA8B,CAAC;AAU1E,CAAC;AAEF,SAAgB,kBAAkB,CAAC,UAAuB;IACtD,OAAO;QACH,IAAI,EAAE,4BAAoB;QAC1B,UAAU;KACb,CAAC;AACN,CAAC;AALD,gDAKC;AAED,SAAgB,UAAU,CAAC,GAAW,EAAE,IAAS;IAC7C,OAAO;QACH,IAAI,EAAE,+BAAuB;QAC7B,GAAG;QACH,IAAI;KACP,CAAC;AACN,CAAC;AAND,gCAMC;AAED,IAAI,YAAY,GAAO;IACnB,WAAW,EAAE,EAAE;IACf,IAAI,EAAE,EAAE;CACX,CAAC;AAGF,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,4BAAoB,CAAC,CAAA;YACtB,MAAM,EAAC,UAAU,EAAC,GAAG,MAAM,CAAC;YAC5B,
|
1
|
+
{"version":3,"file":"dataSource.js","sourceRoot":"","sources":["../../../src/reducers/dataSource.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AACpD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B;AACL,CAAC,CAAA"}
|
@@ -70,13 +70,27 @@ const initialState = {
|
|
70
70
|
const files = (state = initialState, action) => {
|
71
71
|
switch (action.type) {
|
72
72
|
case exports.GET_FILES_REQUEST:
|
73
|
-
return
|
73
|
+
return {
|
74
|
+
...state,
|
75
|
+
files: [...state.files],
|
76
|
+
loading: true,
|
77
|
+
};
|
74
78
|
case exports.GET_FILES_SUCCESS:
|
75
|
-
return
|
79
|
+
return {
|
80
|
+
...state,
|
81
|
+
loading: false,
|
82
|
+
loaded: true,
|
83
|
+
files: [...action.response]
|
84
|
+
};
|
76
85
|
case exports.UPLOAD_FILE_REQUEST:
|
77
|
-
return
|
86
|
+
return {
|
87
|
+
...state,
|
88
|
+
files: [{ etag: Math.random(), loading: true }, ...state.files]
|
89
|
+
};
|
78
90
|
case exports.UPLOAD_FILE_FAILURE:
|
79
|
-
return
|
91
|
+
return {
|
92
|
+
...state,
|
93
|
+
};
|
80
94
|
default:
|
81
95
|
return state;
|
82
96
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/reducers/files.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAAyC;AACzC,kDAA0B;AAEb,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AACxC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AACxC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAExC,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAEtD,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,MAAM,YAAY,GAAG,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,QAAQ,EAAE,oBAAoB;IAC9B,KAAK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AE,CAAC,CAAC;IACjD,QAAQ,EAAE,sBAAsB;IAChC,KAAK,EAAE,CAAC,gCAAwB,EAAE,gCAAwB,EAAE,gCAAwB,CAAC;IACrF,MAAM,EAAE,gBAAG;IACX,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;IACtB,aAAa,EAAE,IAAI;CACtB,CAAC,CAAC;AANU,QAAA,cAAc,kBAMxB;AAEH,MAAM,YAAY,GAAO;IACrB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,EAAE;CACZ,CAAC;AACF,MAAM,KAAK,GAAG,CAAC,KAAK,GAAE,YAAY,EAAE,MAAM,EAAC,EAAE;IACzC,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,yBAAiB;YAClB,OAAM;gBACF,GAAG,KAAK;gBACR,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;gBACvB,OAAO,EAAE,IAAI;aAChB,CAAC;QACN,KAAK,yBAAiB;YAClB,OAAO;gBACH,GAAG,KAAK;gBACR,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;aAC9B,CAAC;QACN,KAAK,2BAAmB;YACpB,OAAO;gBACH,GAAG,KAAK;gBACR,KAAK,EAAE,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;aAChE,CAAC;QACN,KAAK,2BAAmB;YACpB,OAAO;gBACH,GAAG,KAAK;aACX,CAAC;QACN;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
@@ -46,16 +46,22 @@ let initialState = {
|
|
46
46
|
exports.default = (state = initialState, action) => {
|
47
47
|
switch (action.type) {
|
48
48
|
case exports.REGISTER_WEB_FONTS: {
|
49
|
-
return
|
49
|
+
return {
|
50
|
+
...state,
|
51
|
+
webFonts: [
|
50
52
|
...state.webFonts,
|
51
53
|
...action.fonts
|
52
|
-
]
|
54
|
+
],
|
55
|
+
};
|
53
56
|
}
|
54
57
|
case exports.REGISTER_APP_FONTS: {
|
55
|
-
return
|
58
|
+
return {
|
59
|
+
...state,
|
60
|
+
appFonts: [
|
56
61
|
...state.appFonts,
|
57
62
|
...action.fonts
|
58
|
-
]
|
63
|
+
],
|
64
|
+
};
|
59
65
|
}
|
60
66
|
case exports.ACTIVATE_FONT: {
|
61
67
|
let fontToActivate = action.font;
|
@@ -65,10 +71,13 @@ exports.default = (state = initialState, action) => {
|
|
65
71
|
if (!fontToActivate) {
|
66
72
|
return state;
|
67
73
|
}
|
68
|
-
return
|
74
|
+
return {
|
75
|
+
...state,
|
76
|
+
activeFonts: [
|
69
77
|
...state.activeFonts,
|
70
78
|
fontToActivate
|
71
|
-
]
|
79
|
+
]
|
80
|
+
};
|
72
81
|
}
|
73
82
|
default:
|
74
83
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/reducers/fonts.tsx"],"names":[],"mappings":";;;;;;AAAA,2EAAmD;AAEtC,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,aAAa,GAAG,eAAe,CAAC;AAEhC,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAQnE,SAAgB,gBAAgB,CAAC,KAAY;IACzC,OAAO;QACH,IAAI,EAAE,0BAAkB;QACxB,KAAK;KACR,CAAC;AACN,CAAC;AALD,4CAKC;AAED,SAAgB,gBAAgB,CAAC,KAAY;IACzC,OAAO;QACH,IAAI,EAAE,0BAAkB;QACxB,KAAK;KACR,CAAC;AACN,CAAC;AALD,4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AChB,oBAAoB,EAAE,KAAK;IAC3B,mBAAmB,EAAE,KAAK;IAC1B,WAAW,EAAX,qBAAW;IACX,QAAQ,EAAC,EAAE;IACX,QAAQ,EAAC;QACL,GAAG,qBAAW;KACjB;IACD,WAAW,EAAC,EAAE;CACjB,CAAC;AAGF,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,0BAAkB,CAAC,CAAA;YACpB,OAAO;gBACH,GAAG,KAAK;gBACR,QAAQ,EAAE;oBACN,GAAG,KAAK,CAAC,QAAQ;oBACjB,GAAG,MAAM,CAAC,KAAK;iBAClB;aACJ,CAAA;SACJ;QAED,KAAK,0BAAkB,CAAC,CAAA;YACpB,OAAO;gBACH,GAAG,KAAK;gBACR,QAAQ,EAAE;oBACN,GAAG,KAAK,CAAC,QAAQ;oBACjB,GAAG,MAAM,CAAC,KAAK;iBAClB;aACJ,CAAA;SACJ;QACD,KAAK,qBAAa,CAAC,CAAA;YACf,IAAI,cAAc,GAAiB,MAAM,CAAC,IAAI,CAAC;YAE/C,IAAG,OAAO,cAAc,KAAK,QAAQ,EAAC;gBAClC,cAAc,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAA;aACvE;YAED,IAAG,CAAC,cAAc,EAAC;gBACf,OAAO,KAAK,CAAC;aAChB;YAED,OAAM;gBACF,GAAG,KAAK;gBACR,WAAW,EAAC;oBACR,GAAG,KAAK,CAAC,WAAW;oBACpB,cAAc;iBACjB;aACJ,CAAC;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
@@ -1,13 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
3
|
exports.fetchIcons = exports.registerIcons = exports.registerIcon = exports.REGISTER_ICONS = exports.REGISTER_ICON = void 0;
|
13
4
|
const lodash_1 = require("lodash");
|
@@ -29,10 +20,10 @@ function registerIcons(icons) {
|
|
29
20
|
}
|
30
21
|
exports.registerIcons = registerIcons;
|
31
22
|
function fetchIcons() {
|
32
|
-
return (dispatch) =>
|
33
|
-
const icons =
|
23
|
+
return async (dispatch) => {
|
24
|
+
const icons = await helpers_1.getIcons();
|
34
25
|
dispatch(registerIcons(icons));
|
35
|
-
}
|
26
|
+
};
|
36
27
|
}
|
37
28
|
exports.fetchIcons = fetchIcons;
|
38
29
|
let initialState = [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":";;;AAAA,mCAA+C;AAC/C,wCAAsC;AAEzB,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAE/C,SAAgB,YAAY,CAAC,IAAS;IAClC,OAAO;QACH,IAAI,EAAE,qBAAa;QACnB,IAAI;KACP,CAAC;AACN,CAAC;AALD,oCAKC;AAED,SAAgB,aAAa,CAAC,KAAY;IACtC,OAAO;QACH,IAAI,EAAE,sBAAc;QACpB,KAAK;KACR,CAAC;AACN,CAAC;AALD,sCAKC;AAED,SAAgB,UAAU;IACtB,OAAO,KAAK,EAAE,QAAkB,EAAC,EAAE;QAC/B,MAAM,KAAK,GAAG,MAAM,kBAAQ,EAAE,CAAC;QAC/B,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACnC,CAAC,CAAA;AACL,CAAC;AALD,gCAKC;AAED,IAAI,YAAY,GAAO,EACtB,CAAC;AAEF,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,qBAAa,CAAC,CAAA;YACf,MAAM,QAAQ,GAAG,eAAM,CAAC,CAAC,GAAG,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;YACtD,eAAM,CAAC,QAAQ,EAAE,cAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,QAAQ,CAAC;SACnB;QACD,KAAK,sBAAc,CAAC,CAAA;YAChB,MAAM,QAAQ,GAAG,eAAM,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;YAC1D,eAAM,CAAC,QAAQ,EAAE,cAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,QAAQ,CAAC;SACnB;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
@@ -49,7 +49,7 @@ exports.default = (state = initialState, action) => {
|
|
49
49
|
return lodash_1.sortBy(newState, 'zIndex');
|
50
50
|
}
|
51
51
|
case exports.UPDATE_MODAL: {
|
52
|
-
const newState = state.map(m => m.id === action.id ?
|
52
|
+
const newState = state.map(m => m.id === action.id ? { ...m, ...action.modalUpdates } : m);
|
53
53
|
// sort modals by zIndex
|
54
54
|
return lodash_1.sortBy(newState, 'zIndex');
|
55
55
|
}
|
@@ -1 +1 @@
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(this && this.__rest) || function (s, e) {
|
3
|
-
var t = {};
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
-
t[p] = s[p];
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
-
t[p[i]] = s[p[i]];
|
10
|
-
}
|
11
|
-
return t;
|
12
|
-
};
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
4
|
};
|
@@ -31,14 +20,23 @@ const pages = function (state = initialState, action) {
|
|
31
20
|
switch (action.type) {
|
32
21
|
case REST_FIND_PAGE_SUCCESS:
|
33
22
|
case REST_LIST_PAGES_SUCCESS: {
|
34
|
-
const
|
35
|
-
const records = data.map(item => (
|
23
|
+
const { data, ...metaData } = action.response;
|
24
|
+
const records = data.map(item => ({ id: item._id, ...item }));
|
36
25
|
const { [action.identifier]: oldRecordState = {}, collection = {} } = state;
|
37
|
-
const newCollection =
|
26
|
+
const newCollection = { ...collection };
|
38
27
|
records.forEach(item => {
|
39
28
|
newCollection[item.id] = item;
|
40
29
|
});
|
41
|
-
return
|
30
|
+
return {
|
31
|
+
...state,
|
32
|
+
collection: newCollection,
|
33
|
+
[action.identifier]: {
|
34
|
+
isLoading: false,
|
35
|
+
data: records,
|
36
|
+
...metaData
|
37
|
+
},
|
38
|
+
isLoading: state.isLoading - 1,
|
39
|
+
};
|
42
40
|
}
|
43
41
|
case REST_FIND_ID_PAGE_SUCCESS:
|
44
42
|
case REST_UPDATE_PAGE_SUCCESS:
|
@@ -46,9 +44,9 @@ const pages = function (state = initialState, action) {
|
|
46
44
|
const { [action.identifier]: oldRecordState = {}, collection = {} } = state;
|
47
45
|
const { data: oldData = [] } = oldRecordState;
|
48
46
|
const newData = [...oldData];
|
49
|
-
const newCollection =
|
47
|
+
const newCollection = { ...collection };
|
50
48
|
const record = action.response;
|
51
|
-
const item =
|
49
|
+
const item = { id: record._id, ...record };
|
52
50
|
const itemIndex = newData.findIndex(_item => _item.id === item.id);
|
53
51
|
if (itemIndex > -1) {
|
54
52
|
newData.splice(itemIndex, 1, item);
|
@@ -57,7 +55,15 @@ const pages = function (state = initialState, action) {
|
|
57
55
|
newData.splice(0, 0, item);
|
58
56
|
}
|
59
57
|
newCollection[item.id] = item;
|
60
|
-
return
|
58
|
+
return {
|
59
|
+
...state,
|
60
|
+
collection: newCollection,
|
61
|
+
[action.identifier]: {
|
62
|
+
...oldRecordState,
|
63
|
+
data: newData,
|
64
|
+
},
|
65
|
+
isLoading: state.isLoading - 1,
|
66
|
+
};
|
61
67
|
}
|
62
68
|
case REST_DELETE_PAGE_SUCCESS: {
|
63
69
|
const { [action.identifier]: oldRecordState = {}, collection = {} } = state;
|
@@ -67,38 +73,67 @@ const pages = function (state = initialState, action) {
|
|
67
73
|
if (itemIndex > -1) {
|
68
74
|
newData.splice(itemIndex, 1);
|
69
75
|
}
|
70
|
-
const newCollection =
|
76
|
+
const newCollection = { ...collection };
|
71
77
|
delete newCollection[action.pathParams.id];
|
72
|
-
return
|
78
|
+
return {
|
79
|
+
...state,
|
80
|
+
collection: newCollection,
|
81
|
+
[action.identifier]: {
|
82
|
+
...oldRecordState,
|
83
|
+
data: newData,
|
84
|
+
},
|
85
|
+
isLoading: state.isLoading - 1,
|
86
|
+
};
|
73
87
|
}
|
74
88
|
case REST_QUERY_PAGE_RUNNING: {
|
75
89
|
const { [action.identifier]: oldRecordState = {} } = state;
|
76
|
-
return
|
90
|
+
return {
|
91
|
+
...state,
|
92
|
+
[action.identifier]: {
|
93
|
+
...oldRecordState,
|
94
|
+
isLoading: true,
|
95
|
+
},
|
96
|
+
isLoading: state.isLoading + 1,
|
97
|
+
};
|
77
98
|
}
|
78
99
|
case REST_QUERY_PAGE_FAILED: {
|
79
100
|
const { [action.identifier]: oldRecordState = {} } = state;
|
80
|
-
return
|
101
|
+
return {
|
102
|
+
...state,
|
103
|
+
[action.identifier]: {
|
104
|
+
...oldRecordState,
|
105
|
+
isLoading: false,
|
106
|
+
},
|
107
|
+
isLoading: state.isLoading - 1,
|
108
|
+
};
|
81
109
|
}
|
82
110
|
case PAGE_BLOCKS_UPDATED: {
|
83
111
|
const { records: oldRecordState = {}, collection = {} } = state;
|
84
112
|
const { data: oldData = [] } = oldRecordState;
|
85
113
|
const newData = [...oldData];
|
86
|
-
const newCollection =
|
114
|
+
const newCollection = { ...collection };
|
87
115
|
const newBlocks = action.blocks;
|
88
116
|
const pageId = action.pageId;
|
89
117
|
const itemIndex = newData.findIndex(_item => _item.id === pageId);
|
90
118
|
if (itemIndex > -1) {
|
91
|
-
const newItem =
|
119
|
+
const newItem = { ...newData[itemIndex], blocks: newBlocks };
|
92
120
|
newData.splice(itemIndex, 1, newItem);
|
93
121
|
newCollection[pageId] = newItem;
|
94
122
|
}
|
95
|
-
return
|
123
|
+
return {
|
124
|
+
...state,
|
125
|
+
collection: newCollection,
|
126
|
+
records: {
|
127
|
+
...oldRecordState,
|
128
|
+
data: newData,
|
129
|
+
},
|
130
|
+
};
|
96
131
|
}
|
97
132
|
case PAGE_DATA_UPDATED: {
|
98
133
|
const { records: oldRecordState = {}, collection = {} } = state;
|
99
134
|
const { data: oldData = [] } = oldRecordState;
|
100
135
|
const newData = [...oldData];
|
101
|
-
const newCollection =
|
136
|
+
const newCollection = { ...collection };
|
102
137
|
const updates = action.updates;
|
103
138
|
const pageId = action.pageId;
|
104
139
|
const itemIndex = newData.findIndex(_item => _item.id === pageId);
|
@@ -107,7 +142,14 @@ const pages = function (state = initialState, action) {
|
|
107
142
|
newData.splice(itemIndex, 1, newItem);
|
108
143
|
newCollection[pageId] = newItem;
|
109
144
|
}
|
110
|
-
return
|
145
|
+
return {
|
146
|
+
...state,
|
147
|
+
collection: newCollection,
|
148
|
+
records: {
|
149
|
+
...oldRecordState,
|
150
|
+
data: newData,
|
151
|
+
},
|
152
|
+
};
|
111
153
|
}
|
112
154
|
default:
|
113
155
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAChC,kEAA+C;AAE/C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAC9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,MAAM,YAAY,GAAO,sBAAiB,CAAA;AAC1C,MAAM,KAAK,GAAG,UAAU,KAAK,GAAG,YAAY,EAAE,MAAW;IACjD,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,sBAAsB,CAAC;QAC5B,KAAK,uBAAuB,CAAC,CAAC;YAC1B,MAAM,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAA,EAAE,CAAA,CAAC,EAAC,EAAE,EAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,EAAC,CAAC,CAAC,CAAC;YACzD,MAAM,EAAC,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,c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AAE;oBACL,GAAG,cAAc;oBACjB,IAAI,EAAE,OAAO;iBAChB;aACJ,CAAC;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AAET,CAAC,CAAC;AAEF,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;AAErB,kBAAe,KAAK,CAAC"}
|
@@ -1,15 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
3
|
-
var t = {};
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
-
t[p] = s[p];
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
-
t[p[i]] = s[p[i]];
|
10
|
-
}
|
11
|
-
return t;
|
12
|
-
};
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
3
|
exports.getPath = exports.getPageRouteName = exports.getPagePath = exports.unregisterAdminPage = exports.registerAdminPage = exports.unregisterSitePage = exports.registerSitePage = exports.unregisterPageType = exports.registerPageType = exports.ROUTE_404 = exports.PAGE_EDITOR = exports.VIEW_PAGE = exports.SITE_PAGE = exports.ROUTE_TYPE_PATH = exports.UNREGISTER_PAGE_TYPE = exports.UNREGISTER_PAGE_ROUTE = exports.REGISTER_PAGE_TYPE = exports.REGISTER_PAGE_ROUTE = void 0;
|
15
4
|
const lodash_1 = require("lodash");
|
@@ -102,10 +91,7 @@ function getPath(type, options) {
|
|
102
91
|
if (type === exports.VIEW_PAGE)
|
103
92
|
return options.slug || options.id;
|
104
93
|
const { routes: { site, admin } } = getState();
|
105
|
-
const adminRoutesMapped = admin.map((
|
106
|
-
var { path } = _a, routeProps = __rest(_a, ["path"]);
|
107
|
-
return (Object.assign(Object.assign({}, routeProps), { path: `/admin${path}` }));
|
108
|
-
});
|
94
|
+
const adminRoutesMapped = admin.map(({ path, ...routeProps }) => ({ ...routeProps, path: `/admin${path}` }));
|
109
95
|
const routes = [...site, ...adminRoutesMapped];
|
110
96
|
const route = routes.find(({ id }) => id === routeId);
|
111
97
|
if (route) {
|
@@ -134,7 +120,7 @@ exports.default = (state = initialState, action) => {
|
|
134
120
|
const { id, key, data } = action;
|
135
121
|
const { [key]: oldRoutes } = state;
|
136
122
|
const newRoutes = [...oldRoutes];
|
137
|
-
const routeData =
|
123
|
+
const routeData = { id, exact: true, ...data };
|
138
124
|
const existingIndex = newRoutes.findIndex(r => r.id === id);
|
139
125
|
if (existingIndex > -1) {
|
140
126
|
newRoutes.splice(existingIndex, 1, routeData);
|
@@ -142,21 +128,33 @@ exports.default = (state = initialState, action) => {
|
|
142
128
|
else {
|
143
129
|
newRoutes.push(routeData);
|
144
130
|
}
|
145
|
-
return
|
131
|
+
return {
|
132
|
+
...state,
|
133
|
+
[key]: newRoutes
|
134
|
+
};
|
146
135
|
}
|
147
136
|
case exports.UNREGISTER_PAGE_ROUTE: {
|
148
137
|
const { id, key } = action;
|
149
138
|
const { [key]: oldRoutes } = state;
|
150
139
|
const newRoutes = oldRoutes.filter(route => route.id !== id);
|
151
|
-
return
|
140
|
+
return {
|
141
|
+
...state,
|
142
|
+
[key]: newRoutes
|
143
|
+
};
|
152
144
|
}
|
153
145
|
case exports.REGISTER_PAGE_TYPE:
|
154
|
-
return
|
146
|
+
return {
|
147
|
+
...state,
|
148
|
+
pageTypes: [
|
155
149
|
...state.pageTypes,
|
156
150
|
action.pageType,
|
157
|
-
]
|
151
|
+
]
|
152
|
+
};
|
158
153
|
case exports.UNREGISTER_PAGE_TYPE:
|
159
|
-
return
|
154
|
+
return {
|
155
|
+
...state,
|
156
|
+
pageTypes: state.pageTypes.filter(pageType => pageType !== action.pageType)
|
157
|
+
};
|
160
158
|
default:
|
161
159
|
return state;
|
162
160
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/reducers/routes.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/reducers/routes.tsx"],"names":[],"mappings":";;;AAAA,mCAAiC;AACjC,sDAAqD;AAExC,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAE9C,QAAA,eAAe,GAAG,MAAM,CAAC;AACzB,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,SAAS,GAAG,aAAa,CAAC;AAC1B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,SAAS,GAAG,WAAW,CAAC;AAErC,SAAgB,gBAAgB,CAAC,QAAQ;IACrC,OAAO;QACH,IAAI,EAAE,0BAAkB;QACxB,QAAQ,EAAE,QAAQ;KACrB,CAAC;AACN,CAAC;AALD,4CAKC;AAED,SAAgB,kBAAkB,CAAC,QAAQ;IACvC,OAAO;QACH,IAAI,EAAE,4BAAoB;QAC1B,QAAQ,EAAE,QAAQ;KACrB,CAAC;AACN,CAAC;AALD,gDAKC;AAED,SAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI;IACrC,OAAO;QACH,IAAI,EAAE,2BAAmB;QACzB,EAAE;QACF,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI;KACb,CAAC;AACN,CAAC;AAPD,4CAOC;AAED,SAAgB,kBAAkB,CAAC,EAAE;IACjC,OAAO;QACH,IAAI,EAAE,6BAAqB;QAC3B,EAAE;QACF,GAAG,EAAE,MAAM;KACd,CAAC;AACN,CAAC;AAND,gDAMC;AAED,SAAgB,iBAAiB,CAAC,EAAE,EAAE,IAAI;IACtC,OAAO;QACH,IAAI,EAAE,2BAAmB;QACzB,EAAE;QACF,GAAG,EAAE,OAAO;QACZ,IAAI,EAA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E,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;YAC7D,OAAO;gBACH,GAAG,KAAK;gBACR,CAAC,GAAG,CAAC,EAAE,SAAS;aACnB,CAAC;SACL;QACD,KAAK,0BAAkB;YACnB,OAAM;gBACF,GAAG,KAAK;gBACR,SAAS,EAAC;oBACN,GAAG,KAAK,CAAC,SAAS;oBAClB,MAAM,CAAC,QAAQ;iBAClB;aACJ,CAAC;QACN,KAAK,4BAAoB;YACrB,OAAO;gBACH,GAAG,KAAK;gBACR,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC;aAC9E,CAAC;QACN;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
@@ -17,7 +17,10 @@ exports.getSuggestions = getSuggestions;
|
|
17
17
|
exports.default = (state = initialState, action) => {
|
18
18
|
switch (action.type) {
|
19
19
|
case exports.GET_SUGGESTION_SUCCESS:
|
20
|
-
return
|
20
|
+
return {
|
21
|
+
...state,
|
22
|
+
suggestions: action.response.hits.hits.map(hit => ({ id: hit._id, _type: hit._type, ...hit._source })),
|
23
|
+
};
|
21
24
|
default:
|
22
25
|
return state;
|
23
26
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/reducers/search.tsx"],"names":[],"mappings":";;;AAAA,qDAAyC;AAG5B,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAClD,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAClD,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,IAAI,YAAY,GAAO,EAAE,CAAC;AAEnB,MAAM,cAAc,GAAG,CAAC,IAAI,EAAC,EAAE,CAAA,CAAC;IACnC,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAC,CAAC,8BAAsB,EAAC,8BAAsB,EAAE,8BAAsB,CAAC;IAC7E,MAAM,EAAE,gBAAG;IACX,IAAI;IACJ,aAAa,EAAE,IAAI;CACtB,CAAC,CAAC;AANU,QAAA,cAAc,kBAMxB;AAEH,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,8BAAsB;YACvB,
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/reducers/search.tsx"],"names":[],"mappings":";;;AAAA,qDAAyC;AAG5B,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAClD,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAClD,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,IAAI,YAAY,GAAO,EAAE,CAAC;AAEnB,MAAM,cAAc,GAAG,CAAC,IAAI,EAAC,EAAE,CAAA,CAAC;IACnC,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAC,CAAC,8BAAsB,EAAC,8BAAsB,EAAE,8BAAsB,CAAC;IAC7E,MAAM,EAAE,gBAAG;IACX,IAAI;IACJ,aAAa,EAAE,IAAI;CACtB,CAAC,CAAC;AANU,QAAA,cAAc,kBAMxB;AAEH,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,8BAAsB;YACvB,OAAO;gBACH,GAAG,KAAK;gBACR,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA,EAAE,CAAA,CAAC,EAAC,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,OAAO,EAAC,CAAC,CAAC;aACrG,CAAC;QACN;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
@@ -49,7 +49,14 @@ const session = (state = initialState, action) => {
|
|
49
49
|
// if values has not changed return current state, no update required
|
50
50
|
if (state.data[key] === value)
|
51
51
|
return state;
|
52
|
-
return
|
52
|
+
return {
|
53
|
+
...state,
|
54
|
+
data: {
|
55
|
+
...state.data,
|
56
|
+
[key]: value
|
57
|
+
},
|
58
|
+
pendingUpdates: [...state.pendingUpdates, key],
|
59
|
+
};
|
53
60
|
}
|
54
61
|
case exports.SET_SESSION_VALUE: {
|
55
62
|
const { values } = action;
|
@@ -57,12 +64,19 @@ const session = (state = initialState, action) => {
|
|
57
64
|
const updates = lodash_1.reduce(values, (previous, value, key) => {
|
58
65
|
if (state.data[key] === value)
|
59
66
|
return previous;
|
60
|
-
return
|
67
|
+
return { ...previous, [key]: value };
|
61
68
|
}, {});
|
62
69
|
// if the updates is empty, return current state, no update required
|
63
70
|
if (lodash_1.isEmpty(updates))
|
64
71
|
return state;
|
65
|
-
return
|
72
|
+
return {
|
73
|
+
...state,
|
74
|
+
data: {
|
75
|
+
...state.data,
|
76
|
+
...updates,
|
77
|
+
},
|
78
|
+
pendingUpdates: [...state.pendingUpdates, lodash_1.keys(updates)],
|
79
|
+
};
|
66
80
|
}
|
67
81
|
case exports.SESSION_UPDATE_REMOTE_SUCCESS: {
|
68
82
|
const { data: values } = action;
|
@@ -76,7 +90,10 @@ const session = (state = initialState, action) => {
|
|
76
90
|
// if the updates is empty, return current state, no update required
|
77
91
|
if (lodash_1.isEmpty(updatedKeys))
|
78
92
|
return state;
|
79
|
-
return
|
93
|
+
return {
|
94
|
+
...state,
|
95
|
+
pendingUpdates: lodash_1.difference(state.pendingUpdates, updatedKeys),
|
96
|
+
};
|
80
97
|
}
|
81
98
|
case exports.RESET_SESSION:
|
82
99
|
return generateEmptyState();
|