@blaze-cms/plugin-google-maps-fe 0.146.0-translations.6 → 0.147.0-rc-eagle.2
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/GoogleMaps/GoogleMaps.js +67 -90
- package/lib/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsFactory.js +21 -21
- package/lib/GoogleMaps/GoogleMapsFactory.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsHtml.js +9 -11
- package/lib/GoogleMaps/GoogleMapsHtml.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsRender.js +43 -37
- package/lib/GoogleMaps/GoogleMapsRender.js.map +1 -1
- package/lib/GoogleMaps/helpers/add-zoom-listener.js +5 -8
- package/lib/GoogleMaps/helpers/add-zoom-listener.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-map-shapes.js +47 -47
- package/lib/GoogleMaps/helpers/build-map-shapes.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-map-type-ids.js +4 -5
- package/lib/GoogleMaps/helpers/build-map-type-ids.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-query.js +22 -26
- package/lib/GoogleMaps/helpers/build-query.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-shapes-configs.js +84 -111
- package/lib/GoogleMaps/helpers/build-shapes-configs.js.map +1 -1
- package/lib/GoogleMaps/helpers/get-center-coordinates.js +20 -23
- package/lib/GoogleMaps/helpers/get-center-coordinates.js.map +1 -1
- package/lib/GoogleMaps/helpers/get-image-ids.js +9 -18
- package/lib/GoogleMaps/helpers/get-image-ids.js.map +1 -1
- package/lib/GoogleMaps/helpers/get-path.js +13 -16
- package/lib/GoogleMaps/helpers/get-path.js.map +1 -1
- package/lib/GoogleMaps/helpers/index.js +14 -15
- package/lib/GoogleMaps/helpers/index.js.map +1 -1
- package/lib/GoogleMaps/helpers/set-map-options.js +41 -44
- package/lib/GoogleMaps/helpers/set-map-options.js.map +1 -1
- package/lib/GoogleMaps/helpers/set-shapes.js +175 -242
- package/lib/GoogleMaps/helpers/set-shapes.js.map +1 -1
- package/lib/GoogleMaps/hooks/index.js +4 -5
- package/lib/GoogleMaps/hooks/index.js.map +1 -1
- package/lib/GoogleMaps/hooks/use-get-entity-schemas.js +14 -20
- package/lib/GoogleMaps/hooks/use-get-entity-schemas.js.map +1 -1
- package/lib/GoogleMaps/hooks/use-get-images.js +21 -22
- package/lib/GoogleMaps/hooks/use-get-images.js.map +1 -1
- package/lib/GoogleMaps/index.js +2 -3
- package/lib/GoogleMaps/index.js.map +1 -1
- package/lib/GoogleMaps/queries.js +49 -21
- package/lib/GoogleMaps/queries.js.map +1 -1
- package/lib/constants.js +35 -36
- package/lib/constants.js.map +1 -1
- package/lib/index.js +13 -43
- package/lib/index.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMaps.js +3 -1
- package/lib-es/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsFactory.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsHtml.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsRender.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/add-zoom-listener.js +1 -1
- package/lib-es/GoogleMaps/helpers/add-zoom-listener.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-map-shapes.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-map-type-ids.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-query.js +3 -1
- package/lib-es/GoogleMaps/helpers/build-query.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-shapes-configs.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/get-center-coordinates.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/get-image-ids.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/get-path.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/index.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/set-map-options.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/set-shapes.js +1 -1
- package/lib-es/GoogleMaps/helpers/set-shapes.js.map +1 -1
- package/lib-es/GoogleMaps/hooks/index.js.map +1 -1
- package/lib-es/GoogleMaps/hooks/use-get-entity-schemas.js.map +1 -1
- package/lib-es/GoogleMaps/hooks/use-get-images.js.map +1 -1
- package/lib-es/GoogleMaps/index.js.map +1 -1
- package/lib-es/GoogleMaps/queries.js.map +1 -1
- package/lib-es/constants.js.map +1 -1
- package/lib-es/index.js +1 -1
- package/lib-es/index.js.map +1 -1
- package/package.json +22 -14
- package/src/GoogleMaps/GoogleMaps.js +4 -1
- package/src/GoogleMaps/helpers/add-zoom-listener.js +1 -1
- package/src/GoogleMaps/helpers/build-query.js +3 -1
- package/src/GoogleMaps/helpers/set-shapes.js +1 -1
- package/src/GoogleMaps/hooks/use-get-entity-schemas.js +5 -1
- package/src/GoogleMaps/hooks/use-get-images.js +5 -1
- package/CHANGELOG.md +0 -1821
- package/babel.config.js +0 -3
- package/jest.config.js +0 -3
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.keys.js");
|
|
4
|
-
require("core-js/modules/es.symbol.js");
|
|
5
|
-
require("core-js/modules/es.array.filter.js");
|
|
6
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
7
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
8
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
9
|
-
require("core-js/modules/es.object.define-property.js");
|
|
10
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
11
4
|
Object.defineProperty(exports, "__esModule", {
|
|
12
5
|
value: true
|
|
13
6
|
});
|
|
14
|
-
exports
|
|
7
|
+
exports.default = void 0;
|
|
15
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
require("core-js/modules/es.array.for-each.js");
|
|
17
|
-
require("core-js/modules/es.object.to-string.js");
|
|
18
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
19
|
-
require("core-js/modules/es.array.is-array.js");
|
|
20
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2
|
|
22
|
-
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
+
const getLatLonValues = (keys, data) => {
|
|
23
12
|
if (keys.length === 1) return data[keys];
|
|
24
|
-
|
|
13
|
+
const key = keys.shift();
|
|
25
14
|
return getLatLonValues(keys, data[key]);
|
|
26
15
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
const getLatLong = (latProp, lonProp, shape, data) => {
|
|
17
|
+
const {
|
|
18
|
+
latitude,
|
|
19
|
+
longitude
|
|
20
|
+
} = shape;
|
|
30
21
|
if (!latProp || !lonProp) return {
|
|
31
|
-
latitude
|
|
32
|
-
longitude
|
|
22
|
+
latitude,
|
|
23
|
+
longitude
|
|
33
24
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
const latKeys = latProp.split('.');
|
|
26
|
+
const lonKeys = lonProp.split('.');
|
|
27
|
+
const lat = getLatLonValues(latKeys, data);
|
|
28
|
+
const lon = getLatLonValues(lonKeys, data);
|
|
38
29
|
return {
|
|
39
30
|
latitude: lat,
|
|
40
31
|
longitude: lon
|
|
41
32
|
};
|
|
42
33
|
};
|
|
43
|
-
|
|
34
|
+
const buildMapShapes = (shapesOptions, shapesData) => {
|
|
44
35
|
if (!shapesData) return [];
|
|
45
|
-
|
|
46
|
-
shapesOptions.forEach(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
const mapShapes = [];
|
|
37
|
+
shapesOptions.forEach(shape => {
|
|
38
|
+
const {
|
|
39
|
+
shapeKey,
|
|
40
|
+
entityOptions,
|
|
41
|
+
shapeOptions
|
|
42
|
+
} = shape;
|
|
43
|
+
const {
|
|
44
|
+
dataSummaries,
|
|
45
|
+
enableInfoPane
|
|
46
|
+
} = entityOptions;
|
|
47
|
+
const shapeData = Array.isArray(shapesData[shapeKey]) ? shapesData[shapeKey] : shapesData[shapeKey].results;
|
|
53
48
|
if (!shapeData) return;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
49
|
+
const {
|
|
50
|
+
latProp,
|
|
51
|
+
lonProp
|
|
52
|
+
} = entityOptions;
|
|
53
|
+
shapeData.forEach(data => {
|
|
54
|
+
const {
|
|
55
|
+
url
|
|
56
|
+
} = data;
|
|
57
|
+
const {
|
|
58
|
+
latitude,
|
|
59
|
+
longitude
|
|
60
|
+
} = getLatLong(latProp, lonProp, shapeOptions, data);
|
|
61
|
+
const formatedShape = _objectSpread(_objectSpread({}, shapeOptions), {}, {
|
|
62
|
+
latitude,
|
|
63
|
+
longitude,
|
|
64
|
+
dataSummaries,
|
|
65
|
+
enableInfoPane,
|
|
66
|
+
url,
|
|
67
67
|
shapeData: data
|
|
68
68
|
});
|
|
69
69
|
mapShapes.push(formatedShape);
|
|
@@ -71,5 +71,5 @@ var buildMapShapes = function buildMapShapes(shapesOptions, shapesData) {
|
|
|
71
71
|
});
|
|
72
72
|
return mapShapes;
|
|
73
73
|
};
|
|
74
|
-
var _default = exports
|
|
74
|
+
var _default = exports.default = buildMapShapes;
|
|
75
75
|
//# sourceMappingURL=build-map-shapes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-map-shapes.js","names":["getLatLonValues","keys","data","length","key","shift","getLatLong","latProp","lonProp","shape","latitude","longitude","latKeys","split","lonKeys","lat","lon","buildMapShapes","shapesOptions","shapesData","mapShapes","forEach","shapeKey","entityOptions","shapeOptions","dataSummaries","enableInfoPane","shapeData","Array","isArray","results","url","
|
|
1
|
+
{"version":3,"file":"build-map-shapes.js","names":["getLatLonValues","keys","data","length","key","shift","getLatLong","latProp","lonProp","shape","latitude","longitude","latKeys","split","lonKeys","lat","lon","buildMapShapes","shapesOptions","shapesData","mapShapes","forEach","shapeKey","entityOptions","shapeOptions","dataSummaries","enableInfoPane","shapeData","Array","isArray","results","url","formatedShape","_objectSpread","push","_default","exports","default"],"sources":["../../../src/GoogleMaps/helpers/build-map-shapes.js"],"sourcesContent":["const getLatLonValues = (keys, data) => {\n if (keys.length === 1) return data[keys];\n const key = keys.shift();\n return getLatLonValues(keys, data[key]);\n};\n\nconst getLatLong = (latProp, lonProp, shape, data) => {\n const { latitude, longitude } = shape;\n\n if (!latProp || !lonProp) return { latitude, longitude };\n const latKeys = latProp.split('.');\n const lonKeys = lonProp.split('.');\n const lat = getLatLonValues(latKeys, data);\n const lon = getLatLonValues(lonKeys, data);\n\n return { latitude: lat, longitude: lon };\n};\n\nconst buildMapShapes = (shapesOptions, shapesData) => {\n if (!shapesData) return [];\n const mapShapes = [];\n shapesOptions.forEach(shape => {\n const { shapeKey, entityOptions, shapeOptions } = shape;\n const { dataSummaries, enableInfoPane } = entityOptions;\n\n const shapeData = Array.isArray(shapesData[shapeKey])\n ? shapesData[shapeKey]\n : shapesData[shapeKey].results;\n if (!shapeData) return;\n const { latProp, lonProp } = entityOptions;\n\n shapeData.forEach(data => {\n const { url } = data;\n const { latitude, longitude } = getLatLong(latProp, lonProp, shapeOptions, data);\n\n const formatedShape = {\n ...shapeOptions,\n latitude,\n longitude,\n dataSummaries,\n enableInfoPane,\n url,\n shapeData: data\n };\n\n mapShapes.push(formatedShape);\n });\n });\n\n return mapShapes;\n};\n\nexport default buildMapShapes;\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,eAAe,GAAGA,CAACC,IAAI,EAAEC,IAAI,KAAK;EACtC,IAAID,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOD,IAAI,CAACD,IAAI,CAAC;EACxC,MAAMG,GAAG,GAAGH,IAAI,CAACI,KAAK,CAAC,CAAC;EACxB,OAAOL,eAAe,CAACC,IAAI,EAAEC,IAAI,CAACE,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAME,UAAU,GAAGA,CAACC,OAAO,EAAEC,OAAO,EAAEC,KAAK,EAAEP,IAAI,KAAK;EACpD,MAAM;IAAEQ,QAAQ;IAAEC;EAAU,CAAC,GAAGF,KAAK;EAErC,IAAI,CAACF,OAAO,IAAI,CAACC,OAAO,EAAE,OAAO;IAAEE,QAAQ;IAAEC;EAAU,CAAC;EACxD,MAAMC,OAAO,GAAGL,OAAO,CAACM,KAAK,CAAC,GAAG,CAAC;EAClC,MAAMC,OAAO,GAAGN,OAAO,CAACK,KAAK,CAAC,GAAG,CAAC;EAClC,MAAME,GAAG,GAAGf,eAAe,CAACY,OAAO,EAAEV,IAAI,CAAC;EAC1C,MAAMc,GAAG,GAAGhB,eAAe,CAACc,OAAO,EAAEZ,IAAI,CAAC;EAE1C,OAAO;IAAEQ,QAAQ,EAAEK,GAAG;IAAEJ,SAAS,EAAEK;EAAI,CAAC;AAC1C,CAAC;AAED,MAAMC,cAAc,GAAGA,CAACC,aAAa,EAAEC,UAAU,KAAK;EACpD,IAAI,CAACA,UAAU,EAAE,OAAO,EAAE;EAC1B,MAAMC,SAAS,GAAG,EAAE;EACpBF,aAAa,CAACG,OAAO,CAACZ,KAAK,IAAI;IAC7B,MAAM;MAAEa,QAAQ;MAAEC,aAAa;MAAEC;IAAa,CAAC,GAAGf,KAAK;IACvD,MAAM;MAAEgB,aAAa;MAAEC;IAAe,CAAC,GAAGH,aAAa;IAEvD,MAAMI,SAAS,GAAGC,KAAK,CAACC,OAAO,CAACV,UAAU,CAACG,QAAQ,CAAC,CAAC,GACjDH,UAAU,CAACG,QAAQ,CAAC,GACpBH,UAAU,CAACG,QAAQ,CAAC,CAACQ,OAAO;IAChC,IAAI,CAACH,SAAS,EAAE;IAChB,MAAM;MAAEpB,OAAO;MAAEC;IAAQ,CAAC,GAAGe,aAAa;IAE1CI,SAAS,CAACN,OAAO,CAACnB,IAAI,IAAI;MACxB,MAAM;QAAE6B;MAAI,CAAC,GAAG7B,IAAI;MACpB,MAAM;QAAEQ,QAAQ;QAAEC;MAAU,CAAC,GAAGL,UAAU,CAACC,OAAO,EAAEC,OAAO,EAAEgB,YAAY,EAAEtB,IAAI,CAAC;MAEhF,MAAM8B,aAAa,GAAAC,aAAA,CAAAA,aAAA,KACdT,YAAY;QACfd,QAAQ;QACRC,SAAS;QACTc,aAAa;QACbC,cAAc;QACdK,GAAG;QACHJ,SAAS,EAAEzB;MAAI,EAChB;MAEDkB,SAAS,CAACc,IAAI,CAACF,aAAa,CAAC;IAC/B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOZ,SAAS;AAClB,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEapB,cAAc","ignoreList":[]}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var _constants = require("../../constants");
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const buildMapTypeIds = (enableSatelliteView, enableTerrainScreen) => {
|
|
9
|
+
const mapTypeIds = [_constants.ROADMAP];
|
|
11
10
|
if (enableSatelliteView) mapTypeIds.push(_constants.SATELLITE);
|
|
12
11
|
if (enableTerrainScreen) mapTypeIds.push(_constants.TERRAIN);
|
|
13
12
|
return mapTypeIds;
|
|
14
13
|
};
|
|
15
|
-
var _default = exports
|
|
14
|
+
var _default = exports.default = buildMapTypeIds;
|
|
16
15
|
//# sourceMappingURL=build-map-type-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-map-type-ids.js","names":["_constants","require","buildMapTypeIds","enableSatelliteView","enableTerrainScreen","mapTypeIds","ROADMAP","push","SATELLITE","TERRAIN","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-map-type-ids.js"],"sourcesContent":["import { ROADMAP, SATELLITE, TERRAIN } from '../../constants';\n\nconst buildMapTypeIds = (enableSatelliteView, enableTerrainScreen) => {\n const mapTypeIds = [ROADMAP];\n if (enableSatelliteView) mapTypeIds.push(SATELLITE);\n if (enableTerrainScreen) mapTypeIds.push(TERRAIN);\n return mapTypeIds;\n};\n\nexport default buildMapTypeIds;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-map-type-ids.js","names":["_constants","require","buildMapTypeIds","enableSatelliteView","enableTerrainScreen","mapTypeIds","ROADMAP","push","SATELLITE","TERRAIN","_default","exports","default"],"sources":["../../../src/GoogleMaps/helpers/build-map-type-ids.js"],"sourcesContent":["import { ROADMAP, SATELLITE, TERRAIN } from '../../constants';\n\nconst buildMapTypeIds = (enableSatelliteView, enableTerrainScreen) => {\n const mapTypeIds = [ROADMAP];\n if (enableSatelliteView) mapTypeIds.push(SATELLITE);\n if (enableTerrainScreen) mapTypeIds.push(TERRAIN);\n return mapTypeIds;\n};\n\nexport default buildMapTypeIds;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,MAAMC,eAAe,GAAGA,CAACC,mBAAmB,EAAEC,mBAAmB,KAAK;EACpE,MAAMC,UAAU,GAAG,CAACC,kBAAO,CAAC;EAC5B,IAAIH,mBAAmB,EAAEE,UAAU,CAACE,IAAI,CAACC,oBAAS,CAAC;EACnD,IAAIJ,mBAAmB,EAAEC,UAAU,CAACE,IAAI,CAACE,kBAAO,CAAC;EACjD,OAAOJ,UAAU;AACnB,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,eAAe","ignoreList":[]}
|
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
var
|
|
10
|
-
require("
|
|
11
|
-
require("core-js/modules/es.array.map.js");
|
|
12
|
-
require("core-js/modules/es.array.concat.js");
|
|
13
|
-
require("core-js/modules/es.array.slice.js");
|
|
14
|
-
require("core-js/modules/es.array.index-of.js");
|
|
15
|
-
require("core-js/modules/es.string.trim.js");
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _lodash = _interopRequireDefault(require("lodash.upperfirst"));
|
|
9
|
+
var _lodash2 = _interopRequireDefault(require("lodash.camelcase"));
|
|
16
10
|
var _queries = require("../queries");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
const buildQuery = entityConfigs => {
|
|
12
|
+
const entityIds = [];
|
|
13
|
+
const rawQueryStringified = '';
|
|
14
|
+
const queryString = entityConfigs.map(entityConfig => {
|
|
15
|
+
const {
|
|
16
|
+
action,
|
|
17
|
+
ids,
|
|
18
|
+
entity,
|
|
19
|
+
propsQuery,
|
|
20
|
+
shapeKey,
|
|
21
|
+
filtersObject
|
|
22
|
+
} = entityConfig;
|
|
27
23
|
if (!action) return '';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
entityIds.push
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
const formatedEntity = (0, _lodash.default)((0, _lodash2.default)(entity));
|
|
25
|
+
const filterQueryKey = action.indexOf('Published') !== -1 ? `Published${formatedEntity}` : formatedEntity;
|
|
26
|
+
entityIds.push(...ids);
|
|
27
|
+
const props = propsQuery.trim() || 'id';
|
|
28
|
+
const singleItemQuery = filtersObject ? (0, _queries.generateFiltersQuery)(shapeKey, props, JSON.stringify(filtersObject), filterQueryKey) : (0, _queries.generateIdsQuery)(shapeKey, props, action, ids);
|
|
33
29
|
return singleItemQuery;
|
|
34
30
|
}).join(' ');
|
|
35
31
|
return {
|
|
36
32
|
query: queryString ? (0, _queries.generateQuery)(queryString) : '',
|
|
37
33
|
ids: entityIds,
|
|
38
|
-
rawQueryStringified
|
|
34
|
+
rawQueryStringified
|
|
39
35
|
};
|
|
40
36
|
};
|
|
41
|
-
var _default = exports
|
|
37
|
+
var _default = exports.default = buildQuery;
|
|
42
38
|
//# sourceMappingURL=build-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-query.js","names":["
|
|
1
|
+
{"version":3,"file":"build-query.js","names":["_lodash","_interopRequireDefault","require","_lodash2","_queries","buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","upperFirst","camelcase","filterQueryKey","indexOf","push","props","trim","singleItemQuery","generateFiltersQuery","JSON","stringify","generateIdsQuery","join","query","generateQuery","_default","exports","default"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import upperFirst from 'lodash.upperfirst';\nimport camelcase from 'lodash.camelcase';\nimport { generateQuery, generateIdsQuery, generateFiltersQuery } from '../queries';\n\nconst buildQuery = entityConfigs => {\n const entityIds = [];\n const rawQueryStringified = '';\n const queryString = entityConfigs\n .map(entityConfig => {\n const { action, ids, entity, propsQuery, shapeKey, filtersObject } = entityConfig;\n if (!action) return '';\n const formatedEntity = upperFirst(camelcase(entity));\n const filterQueryKey =\n action.indexOf('Published') !== -1 ? `Published${formatedEntity}` : formatedEntity;\n\n entityIds.push(...ids);\n const props = propsQuery.trim() || 'id';\n const singleItemQuery = filtersObject\n ? generateFiltersQuery(shapeKey, props, JSON.stringify(filtersObject), filterQueryKey)\n : generateIdsQuery(shapeKey, props, action, ids);\n\n return singleItemQuery;\n })\n .join(' ');\n\n return {\n query: queryString ? generateQuery(queryString) : '',\n ids: entityIds,\n rawQueryStringified\n };\n};\n\nexport default buildQuery;\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,MAAMG,UAAU,GAAGC,aAAa,IAAI;EAClC,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,mBAAmB,GAAG,EAAE;EAC9B,MAAMC,WAAW,GAAGH,aAAa,CAC9BI,GAAG,CAACC,YAAY,IAAI;IACnB,MAAM;MAAEC,MAAM;MAAEC,GAAG;MAAEC,MAAM;MAAEC,UAAU;MAAEC,QAAQ;MAAEC;IAAc,CAAC,GAAGN,YAAY;IACjF,IAAI,CAACC,MAAM,EAAE,OAAO,EAAE;IACtB,MAAMM,cAAc,GAAG,IAAAC,eAAU,EAAC,IAAAC,gBAAS,EAACN,MAAM,CAAC,CAAC;IACpD,MAAMO,cAAc,GAClBT,MAAM,CAACU,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,YAAYJ,cAAc,EAAE,GAAGA,cAAc;IAEpFX,SAAS,CAACgB,IAAI,CAAC,GAAGV,GAAG,CAAC;IACtB,MAAMW,KAAK,GAAGT,UAAU,CAACU,IAAI,CAAC,CAAC,IAAI,IAAI;IACvC,MAAMC,eAAe,GAAGT,aAAa,GACjC,IAAAU,6BAAoB,EAACX,QAAQ,EAAEQ,KAAK,EAAEI,IAAI,CAACC,SAAS,CAACZ,aAAa,CAAC,EAAEI,cAAc,CAAC,GACpF,IAAAS,yBAAgB,EAACd,QAAQ,EAAEQ,KAAK,EAAEZ,MAAM,EAAEC,GAAG,CAAC;IAElD,OAAOa,eAAe;EACxB,CAAC,CAAC,CACDK,IAAI,CAAC,GAAG,CAAC;EAEZ,OAAO;IACLC,KAAK,EAAEvB,WAAW,GAAG,IAAAwB,sBAAa,EAACxB,WAAW,CAAC,GAAG,EAAE;IACpDI,GAAG,EAAEN,SAAS;IACdC;EACF,CAAC;AACH,CAAC;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa/B,UAAU","ignoreList":[]}
|
|
@@ -1,151 +1,124 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.js");
|
|
4
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
5
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
6
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
7
|
-
require("core-js/modules/es.object.define-property.js");
|
|
8
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
9
4
|
Object.defineProperty(exports, "__esModule", {
|
|
10
5
|
value: true
|
|
11
6
|
});
|
|
12
|
-
exports
|
|
7
|
+
exports.default = void 0;
|
|
13
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
require("core-js/modules/es.string.trim.js");
|
|
16
|
-
require("core-js/modules/es.array.reduce.js");
|
|
17
|
-
require("core-js/modules/es.object.to-string.js");
|
|
18
|
-
require("core-js/modules/es.array.includes.js");
|
|
19
|
-
require("core-js/modules/es.string.includes.js");
|
|
20
|
-
require("core-js/modules/es.array.concat.js");
|
|
21
|
-
require("core-js/modules/es.array.filter.js");
|
|
22
|
-
require("core-js/modules/es.object.keys.js");
|
|
23
|
-
require("core-js/modules/es.array.map.js");
|
|
24
|
-
require("core-js/modules/es.array.find.js");
|
|
25
|
-
require("core-js/modules/es.array.for-each.js");
|
|
26
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
27
9
|
var _lodash = _interopRequireDefault(require("lodash.flatten"));
|
|
28
10
|
var _constants = require("../../constants");
|
|
29
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
dynamicProperties = _entityData$dynamicPr === void 0 ? {} : _entityData$dynamicPr;
|
|
48
|
-
var _Object$keys$filter = Object.keys(dynamicProperties).filter(function (prop) {
|
|
49
|
-
return prop === _constants.URL;
|
|
50
|
-
}),
|
|
51
|
-
_Object$keys$filter2 = (0, _slicedToArray2["default"])(_Object$keys$filter, 1),
|
|
52
|
-
url = _Object$keys$filter2[0];
|
|
53
|
-
var hasImage = !!Object.keys(properties).filter(function (prop) {
|
|
54
|
-
return prop === _constants.IMAGE_ID;
|
|
55
|
-
}).length;
|
|
56
|
-
var updatedPropsQuery = hasImage ? "".concat(propsQuery, " ").concat(_constants.IMAGE_ID) : propsQuery;
|
|
57
|
-
updatedPropsQuery = url ? "".concat(updatedPropsQuery, " ").concat(_constants.URL) : updatedPropsQuery;
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
const getPropValues = properties => properties.reduce((acc, property) => {
|
|
14
|
+
if (property.includes('.')) {
|
|
15
|
+
const [relationName, relationProp] = property.split('.');
|
|
16
|
+
return `${acc} ${relationName} { ${relationProp} }`;
|
|
17
|
+
}
|
|
18
|
+
return `${acc} ${property}`;
|
|
19
|
+
}, '').trim();
|
|
20
|
+
const getUpdatedPropsQuery = (propsQuery, entityData) => {
|
|
21
|
+
const {
|
|
22
|
+
properties = {},
|
|
23
|
+
dynamicProperties = {}
|
|
24
|
+
} = entityData;
|
|
25
|
+
const [url] = Object.keys(dynamicProperties).filter(prop => prop === _constants.URL);
|
|
26
|
+
const hasImage = !!Object.keys(properties).filter(prop => prop === _constants.IMAGE_ID).length;
|
|
27
|
+
let updatedPropsQuery = hasImage ? `${propsQuery} ${_constants.IMAGE_ID}` : propsQuery;
|
|
28
|
+
updatedPropsQuery = url ? `${updatedPropsQuery} ${_constants.URL}` : updatedPropsQuery;
|
|
58
29
|
return updatedPropsQuery;
|
|
59
30
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
filterKey = _filter$split2[0],
|
|
64
|
-
filterValue = _filter$split2[1];
|
|
65
|
-
var filterKeyword = "".concat(filterKey, ".keyword");
|
|
31
|
+
const buildFilterQueryString = filter => {
|
|
32
|
+
const [filterKey, filterValue] = filter.split('/');
|
|
33
|
+
const filterKeyword = `${filterKey}.keyword`;
|
|
66
34
|
return {
|
|
67
35
|
bool: {
|
|
68
36
|
should: [{
|
|
69
|
-
match:
|
|
37
|
+
match: {
|
|
38
|
+
[filterKeyword]: filterValue
|
|
39
|
+
}
|
|
70
40
|
}]
|
|
71
41
|
}
|
|
72
42
|
};
|
|
73
43
|
};
|
|
74
|
-
|
|
44
|
+
const buildFilters = filters => {
|
|
75
45
|
if (!filters || !filters.length) return null;
|
|
76
|
-
|
|
46
|
+
const filterQueryProps = filters.map(buildFilterQueryString);
|
|
77
47
|
return {
|
|
78
48
|
bool: {
|
|
79
49
|
should: filterQueryProps
|
|
80
50
|
}
|
|
81
51
|
};
|
|
82
52
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
displayItems =
|
|
86
|
-
filterBy
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
53
|
+
const buiildShapeProps = (shape, shapeKey, dataSummaries, parentId, entityData, entityGroup) => {
|
|
54
|
+
const {
|
|
55
|
+
displayItems = [],
|
|
56
|
+
filterBy
|
|
57
|
+
} = shape;
|
|
58
|
+
const {
|
|
59
|
+
latProp,
|
|
60
|
+
lonProp,
|
|
61
|
+
entity
|
|
62
|
+
} = entityGroup;
|
|
63
|
+
const {
|
|
64
|
+
actions,
|
|
65
|
+
relations
|
|
66
|
+
} = entityData;
|
|
67
|
+
const action = actions ? actions.getAllPublished || actions.getAll : '';
|
|
68
|
+
const dataSummaryProps = dataSummaries.reduce((acc, {
|
|
69
|
+
propsToDisplay
|
|
70
|
+
}) => {
|
|
71
|
+
const propsToDisplayValues = (0, _lodash.default)(propsToDisplay.map(({
|
|
72
|
+
propertiesToDisplay
|
|
73
|
+
}) => propertiesToDisplay));
|
|
74
|
+
const propsToDisplayString = getPropValues(propsToDisplayValues);
|
|
75
|
+
return `${acc} ${propsToDisplayString}`;
|
|
101
76
|
}, '').trim();
|
|
102
|
-
|
|
77
|
+
const ids = [];
|
|
103
78
|
displayItems.length ? ids.push(displayItems[0]) : ids.push(parentId);
|
|
104
|
-
|
|
105
|
-
|
|
79
|
+
const filtersObject = buildFilters(filterBy);
|
|
80
|
+
let propsQuery = dataSummaryProps ? `${dataSummaryProps}` : '';
|
|
106
81
|
propsQuery = getUpdatedPropsQuery(propsQuery, entityData);
|
|
107
82
|
if (latProp && lonProp) {
|
|
108
|
-
propsQuery =
|
|
83
|
+
propsQuery = `${propsQuery} ${formatProp(latProp, relations)} ${formatProp(lonProp, relations)}`;
|
|
109
84
|
}
|
|
110
|
-
if (ids.length && !propsQuery.includes(_constants.ID)) propsQuery =
|
|
85
|
+
if (ids.length && !propsQuery.includes(_constants.ID)) propsQuery = `${propsQuery.trim()} ${_constants.ID}`;
|
|
111
86
|
return {
|
|
112
|
-
shapeKey
|
|
113
|
-
entity
|
|
114
|
-
propsQuery
|
|
115
|
-
ids
|
|
116
|
-
action
|
|
117
|
-
filtersObject
|
|
87
|
+
shapeKey,
|
|
88
|
+
entity,
|
|
89
|
+
propsQuery,
|
|
90
|
+
ids,
|
|
91
|
+
action,
|
|
92
|
+
filtersObject
|
|
118
93
|
};
|
|
119
94
|
};
|
|
120
|
-
|
|
121
|
-
var relations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
95
|
+
const formatProp = (prop, relations = []) => {
|
|
122
96
|
if (!prop.includes('.')) return prop;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
var localField = _ref3.localField;
|
|
129
|
-
return localField === mainProp;
|
|
130
|
-
}) ? 'id ' : '';
|
|
131
|
-
return "".concat(mainProp, "{").concat(idProp).concat(nestedProp, "}");
|
|
97
|
+
const [mainProp, nestedProp] = prop.split('.');
|
|
98
|
+
const idProp = relations.find(({
|
|
99
|
+
localField
|
|
100
|
+
}) => localField === mainProp) ? 'id ' : '';
|
|
101
|
+
return `${mainProp}{${idProp}${nestedProp}}`;
|
|
132
102
|
};
|
|
133
|
-
|
|
103
|
+
const buildShapesConfig = (schemas, entityGroups, parent) => {
|
|
134
104
|
if (!schemas || !entityGroups) return [];
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
105
|
+
const {
|
|
106
|
+
itemId,
|
|
107
|
+
itemEntity
|
|
108
|
+
} = parent;
|
|
109
|
+
const shapeGroups = [];
|
|
110
|
+
entityGroups.forEach((entityGroup, i) => {
|
|
111
|
+
const {
|
|
112
|
+
entity,
|
|
113
|
+
shapes,
|
|
114
|
+
dataSummaries = []
|
|
115
|
+
} = entityGroup;
|
|
116
|
+
const parentId = entity === itemEntity && itemId;
|
|
144
117
|
if (!entity) return null;
|
|
145
|
-
|
|
146
|
-
shapes.filter(Boolean).forEach(
|
|
147
|
-
|
|
148
|
-
|
|
118
|
+
const entityData = schemas[entity] || {};
|
|
119
|
+
shapes.filter(Boolean).forEach((shape, shapeIndex) => {
|
|
120
|
+
const shapeKey = `shape${i}${shapeIndex}`;
|
|
121
|
+
const shapeValues = buiildShapeProps(shape, shapeKey, dataSummaries, parentId, entityData, entityGroup);
|
|
149
122
|
shapeGroups.push(_objectSpread(_objectSpread({}, shapeValues), {}, {
|
|
150
123
|
shapeOptions: shape,
|
|
151
124
|
entityOptions: entityGroup
|
|
@@ -154,5 +127,5 @@ var buildShapesConfig = function buildShapesConfig(schemas, entityGroups, parent
|
|
|
154
127
|
});
|
|
155
128
|
return shapeGroups;
|
|
156
129
|
};
|
|
157
|
-
var _default = exports
|
|
130
|
+
var _default = exports.default = buildShapesConfig;
|
|
158
131
|
//# sourceMappingURL=build-shapes-configs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-shapes-configs.js","names":["_lodash","_interopRequireDefault","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getPropValues","properties","reduce","acc","property","includes","_property$split","split","_property$split2","_slicedToArray2","relationName","relationProp","concat","trim","getUpdatedPropsQuery","propsQuery","entityData","_entityData$propertie","_entityData$dynamicPr","dynamicProperties","_Object$keys$filter","prop","URL","_Object$keys$filter2","url","hasImage","IMAGE_ID","updatedPropsQuery","buildFilterQueryString","_filter$split","_filter$split2","filterKey","filterValue","filterKeyword","bool","should","match","buildFilters","filters","filterQueryProps","map","buiildShapeProps","shape","shapeKey","dataSummaries","parentId","entityGroup","_shape$displayItems","displayItems","filterBy","latProp","lonProp","entity","actions","relations","action","getAllPublished","getAll","dataSummaryProps","_ref","propsToDisplay","propsToDisplayValues","flatten","_ref2","propertiesToDisplay","propsToDisplayString","ids","filtersObject","formatProp","ID","undefined","_prop$split","_prop$split2","mainProp","nestedProp","idProp","find","_ref3","localField","buildShapesConfig","schemas","entityGroups","parent","itemId","itemEntity","shapeGroups","i","shapes","_entityGroup$dataSumm","Boolean","shapeIndex","shapeValues","shapeOptions","entityOptions","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-shapes-configs.js"],"sourcesContent":["import flatten from 'lodash.flatten';\nimport { IMAGE_ID, URL, ID } from '../../constants';\n\nconst getPropValues = properties =>\n properties\n .reduce((acc, property) => {\n if (property.includes('.')) {\n const [relationName, relationProp] = property.split('.');\n return `${acc} ${relationName} { ${relationProp} }`;\n }\n return `${acc} ${property}`;\n }, '')\n .trim();\n\nconst getUpdatedPropsQuery = (propsQuery, entityData) => {\n const { properties = {}, dynamicProperties = {} } = entityData;\n\n const [url] = Object.keys(dynamicProperties).filter(prop => prop === URL);\n const hasImage = !!Object.keys(properties).filter(prop => prop === IMAGE_ID).length;\n\n let updatedPropsQuery = hasImage ? `${propsQuery} ${IMAGE_ID}` : propsQuery;\n updatedPropsQuery = url ? `${updatedPropsQuery} ${URL}` : updatedPropsQuery;\n\n return updatedPropsQuery;\n};\n\nconst buildFilterQueryString = filter => {\n const [filterKey, filterValue] = filter.split('/');\n const filterKeyword = `${filterKey}.keyword`;\n return { bool: { should: [{ match: { [filterKeyword]: filterValue } }] } };\n};\n\nconst buildFilters = filters => {\n if (!filters || !filters.length) return null;\n const filterQueryProps = filters.map(buildFilterQueryString);\n return { bool: { should: filterQueryProps } };\n};\n\nconst buiildShapeProps = (shape, shapeKey, dataSummaries, parentId, entityData, entityGroup) => {\n const { displayItems = [], filterBy } = shape;\n const { latProp, lonProp, entity } = entityGroup;\n const { actions, relations } = entityData;\n const action = actions ? actions.getAllPublished || actions.getAll : '';\n\n const dataSummaryProps = dataSummaries\n .reduce((acc, { propsToDisplay }) => {\n const propsToDisplayValues = flatten(\n propsToDisplay.map(({ propertiesToDisplay }) => propertiesToDisplay)\n );\n const propsToDisplayString = getPropValues(propsToDisplayValues);\n\n return `${acc} ${propsToDisplayString}`;\n }, '')\n .trim();\n const ids = [];\n displayItems.length ? ids.push(displayItems[0]) : ids.push(parentId);\n\n const filtersObject = buildFilters(filterBy);\n let propsQuery = dataSummaryProps ? `${dataSummaryProps}` : '';\n propsQuery = getUpdatedPropsQuery(propsQuery, entityData);\n if (latProp && lonProp) {\n propsQuery = `${propsQuery} ${formatProp(latProp, relations)} ${formatProp(\n lonProp,\n relations\n )}`;\n }\n if (ids.length && !propsQuery.includes(ID)) propsQuery = `${propsQuery.trim()} ${ID}`;\n\n return {\n shapeKey,\n entity,\n propsQuery,\n ids,\n action,\n filtersObject\n };\n};\n\nconst formatProp = (prop, relations = []) => {\n if (!prop.includes('.')) return prop;\n\n const [mainProp, nestedProp] = prop.split('.');\n const idProp = relations.find(({ localField }) => localField === mainProp) ? 'id ' : '';\n return `${mainProp}{${idProp}${nestedProp}}`;\n};\n\nconst buildShapesConfig = (schemas, entityGroups, parent) => {\n if (!schemas || !entityGroups) return [];\n const { itemId, itemEntity } = parent;\n const shapeGroups = [];\n entityGroups.forEach((entityGroup, i) => {\n const { entity, shapes, dataSummaries = [] } = entityGroup;\n const parentId = entity === itemEntity && itemId;\n if (!entity) return null;\n const entityData = schemas[entity] || {};\n\n shapes.filter(Boolean).forEach((shape, shapeIndex) => {\n const shapeKey = `shape${i}${shapeIndex}`;\n const shapeValues = buiildShapeProps(\n shape,\n shapeKey,\n dataSummaries,\n parentId,\n entityData,\n entityGroup\n );\n shapeGroups.push({ ...shapeValues, shapeOptions: shape, entityOptions: entityGroup });\n });\n });\n\n return shapeGroups;\n};\n\nexport default buildShapesConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAAoD,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,W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AAK;MACpD,IAAM/C,QAAQ,WAAA/B,MAAA,CAAW0E,CAAC,EAAA1E,MAAA,CAAG8E,UAAU,CAAE;MACzC,IAAMC,WAAW,GAAGlD,gBAAgB,CAClCC,KAAK,EACLC,QAAQ,EACRC,aAAa,EACbC,QAAQ,EACR7B,UAAU,EACV8B,WACF,CAAC;MACDuC,WAAW,CAAC/F,IAAI,CAAAE,aAAA,CAAAA,aAAA,KAAMmG,WAAW;QAAEC,YAAY,EAAElD,KAAK;QAAEmD,aAAa,EAAE/C;MAAW,EAAE,CAAC;IACvF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOuC,WAAW;AACpB,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,cAEahB,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"build-shapes-configs.js","names":["_lodash","_interopRequireDefault","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","getPropValues","properties","reduce","acc","property","includes","relationName","relationProp","split","trim","getUpdatedPropsQuery","propsQuery","entityData","dynamicProperties","url","prop","URL","hasImage","IMAGE_ID","updatedPropsQuery","buildFilterQueryString","filterKey","filterValue","filterKeyword","bool","should","match","buildFilters","filters","filterQueryProps","map","buiildShapeProps","shape","shapeKey","dataSummaries","parentId","entityGroup","displayItems","filterBy","latProp","lonProp","entity","actions","relations","action","getAllPublished","getAll","dataSummaryProps","propsToDisplay","propsToDisplayValues","flatten","propertiesToDisplay","propsToDisplayString","ids","filtersObject","formatProp","ID","mainProp","nestedProp","idProp","find","localField","buildShapesConfig","schemas","entityGroups","parent","itemId","itemEntity","shapeGroups","i","shapes","Boolean","shapeIndex","shapeValues","shapeOptions","entityOptions","_default","exports"],"sources":["../../../src/GoogleMaps/helpers/build-shapes-configs.js"],"sourcesContent":["import flatten from 'lodash.flatten';\nimport { IMAGE_ID, URL, ID } from '../../constants';\n\nconst getPropValues = properties =>\n properties\n .reduce((acc, property) => {\n if (property.includes('.')) {\n const [relationName, relationProp] = property.split('.');\n return `${acc} ${relationName} { ${relationProp} }`;\n }\n return `${acc} ${property}`;\n }, '')\n .trim();\n\nconst getUpdatedPropsQuery = (propsQuery, entityData) => {\n const { properties = {}, dynamicProperties = {} } = entityData;\n\n const [url] = Object.keys(dynamicProperties).filter(prop => prop === URL);\n const hasImage = !!Object.keys(properties).filter(prop => prop === IMAGE_ID).length;\n\n let updatedPropsQuery = hasImage ? `${propsQuery} ${IMAGE_ID}` : propsQuery;\n updatedPropsQuery = url ? `${updatedPropsQuery} ${URL}` : updatedPropsQuery;\n\n return updatedPropsQuery;\n};\n\nconst buildFilterQueryString = filter => {\n const [filterKey, filterValue] = filter.split('/');\n const filterKeyword = `${filterKey}.keyword`;\n return { bool: { should: [{ match: { [filterKeyword]: filterValue } }] } };\n};\n\nconst buildFilters = filters => {\n if (!filters || !filters.length) return null;\n const filterQueryProps = filters.map(buildFilterQueryString);\n return { bool: { should: filterQueryProps } };\n};\n\nconst buiildShapeProps = (shape, shapeKey, dataSummaries, parentId, entityData, entityGroup) => {\n const { displayItems = [], filterBy } = shape;\n const { latProp, lonProp, entity } = entityGroup;\n const { actions, relations } = entityData;\n const action = actions ? actions.getAllPublished || actions.getAll : '';\n\n const dataSummaryProps = dataSummaries\n .reduce((acc, { propsToDisplay }) => {\n const propsToDisplayValues = flatten(\n propsToDisplay.map(({ propertiesToDisplay }) => propertiesToDisplay)\n );\n const propsToDisplayString = getPropValues(propsToDisplayValues);\n\n return `${acc} ${propsToDisplayString}`;\n }, '')\n .trim();\n const ids = [];\n displayItems.length ? ids.push(displayItems[0]) : ids.push(parentId);\n\n const filtersObject = buildFilters(filterBy);\n let propsQuery = dataSummaryProps ? `${dataSummaryProps}` : '';\n propsQuery = getUpdatedPropsQuery(propsQuery, entityData);\n if (latProp && lonProp) {\n propsQuery = `${propsQuery} ${formatProp(latProp, relations)} ${formatProp(\n lonProp,\n relations\n )}`;\n }\n if (ids.length && !propsQuery.includes(ID)) propsQuery = `${propsQuery.trim()} ${ID}`;\n\n return {\n shapeKey,\n entity,\n propsQuery,\n ids,\n action,\n filtersObject\n };\n};\n\nconst formatProp = (prop, relations = []) => {\n if (!prop.includes('.')) return prop;\n\n const [mainProp, nestedProp] = prop.split('.');\n const idProp = relations.find(({ localField }) => localField === mainProp) ? 'id ' : '';\n return `${mainProp}{${idProp}${nestedProp}}`;\n};\n\nconst buildShapesConfig = (schemas, entityGroups, parent) => {\n if (!schemas || !entityGroups) return [];\n const { itemId, itemEntity } = parent;\n const shapeGroups = [];\n entityGroups.forEach((entityGroup, i) => {\n const { entity, shapes, dataSummaries = [] } = entityGroup;\n const parentId = entity === itemEntity && itemId;\n if (!entity) return null;\n const entityData = schemas[entity] || {};\n\n shapes.filter(Boolean).forEach((shape, shapeIndex) => {\n const shapeKey = `shape${i}${shapeIndex}`;\n const shapeValues = buiildShapeProps(\n shape,\n shapeKey,\n dataSummaries,\n parentId,\n entityData,\n entityGroup\n );\n shapeGroups.push({ ...shapeValues, shapeOptions: shape, entityOptions: entityGroup });\n });\n });\n\n return shapeGroups;\n};\n\nexport default buildShapesConfig;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAAoD,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,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