@blaze-cms/plugin-google-maps-fe 0.125.0-alpha.1 → 0.125.0-alpha.13
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/CHANGELOG.md +24 -0
- package/lib/GoogleMaps/GoogleMaps.js +24 -71
- package/lib/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsFactory.js +8 -24
- package/lib/GoogleMaps/GoogleMapsFactory.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsHtml.js +0 -6
- package/lib/GoogleMaps/GoogleMapsHtml.js.map +1 -1
- package/lib/GoogleMaps/GoogleMapsRender.js +12 -33
- package/lib/GoogleMaps/GoogleMapsRender.js.map +1 -1
- package/lib/GoogleMaps/helpers/add-zoom-listener.js +0 -6
- package/lib/GoogleMaps/helpers/add-zoom-listener.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-map-shapes.js +7 -33
- package/lib/GoogleMaps/helpers/build-map-shapes.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-map-type-ids.js +0 -4
- package/lib/GoogleMaps/helpers/build-map-type-ids.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-query.js +5 -17
- package/lib/GoogleMaps/helpers/build-query.js.map +1 -1
- package/lib/GoogleMaps/helpers/build-shapes-configs.js +25 -70
- package/lib/GoogleMaps/helpers/build-shapes-configs.js.map +1 -1
- package/lib/GoogleMaps/helpers/get-center-coordinates.js +2 -11
- package/lib/GoogleMaps/helpers/get-center-coordinates.js.map +1 -1
- package/lib/GoogleMaps/helpers/get-image-ids.js +1 -13
- package/lib/GoogleMaps/helpers/get-image-ids.js.map +1 -1
- package/lib/GoogleMaps/helpers/get-path.js +1 -6
- package/lib/GoogleMaps/helpers/get-path.js.map +1 -1
- package/lib/GoogleMaps/helpers/index.js +0 -9
- package/lib/GoogleMaps/helpers/index.js.map +1 -1
- package/lib/GoogleMaps/helpers/set-map-options.js +21 -33
- package/lib/GoogleMaps/helpers/set-map-options.js.map +1 -1
- package/lib/GoogleMaps/helpers/set-shapes.js +30 -112
- package/lib/GoogleMaps/helpers/set-shapes.js.map +1 -1
- package/lib/GoogleMaps/hooks/index.js +0 -4
- package/lib/GoogleMaps/hooks/index.js.map +1 -1
- package/lib/GoogleMaps/hooks/use-get-entity-schemas.js +8 -19
- package/lib/GoogleMaps/hooks/use-get-entity-schemas.js.map +1 -1
- package/lib/GoogleMaps/hooks/use-get-images.js +12 -19
- package/lib/GoogleMaps/hooks/use-get-images.js.map +1 -1
- package/lib/GoogleMaps/index.js +0 -4
- package/lib/GoogleMaps/index.js.map +1 -1
- package/lib/GoogleMaps/queries.js +0 -17
- package/lib/GoogleMaps/queries.js.map +1 -1
- package/lib/constants.js +0 -1
- package/lib/constants.js.map +1 -1
- package/lib/index.js +0 -21
- package/lib/index.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMaps.js +14 -25
- package/lib-es/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsFactory.js +4 -7
- package/lib-es/GoogleMaps/GoogleMapsFactory.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsHtml.js +0 -2
- package/lib-es/GoogleMaps/GoogleMapsHtml.js.map +1 -1
- package/lib-es/GoogleMaps/GoogleMapsRender.js +5 -8
- package/lib-es/GoogleMaps/GoogleMapsRender.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/add-zoom-listener.js +0 -2
- package/lib-es/GoogleMaps/helpers/add-zoom-listener.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-map-shapes.js +0 -8
- package/lib-es/GoogleMaps/helpers/build-map-shapes.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-map-type-ids.js +0 -2
- package/lib-es/GoogleMaps/helpers/build-map-type-ids.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-query.js +0 -2
- package/lib-es/GoogleMaps/helpers/build-query.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/build-shapes-configs.js +0 -14
- package/lib-es/GoogleMaps/helpers/build-shapes-configs.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/get-center-coordinates.js +0 -2
- package/lib-es/GoogleMaps/helpers/get-center-coordinates.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/get-image-ids.js +0 -1
- package/lib-es/GoogleMaps/helpers/get-image-ids.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/get-path.js +0 -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 +2 -8
- package/lib-es/GoogleMaps/helpers/set-map-options.js.map +1 -1
- package/lib-es/GoogleMaps/helpers/set-shapes.js +5 -41
- 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 +0 -2
- package/lib-es/GoogleMaps/hooks/use-get-entity-schemas.js.map +1 -1
- package/lib-es/GoogleMaps/hooks/use-get-images.js +0 -2
- 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 +0 -6
- package/lib-es/GoogleMaps/queries.js.map +1 -1
- package/lib-es/constants.js.map +1 -1
- package/lib-es/index.js +1 -3
- package/lib-es/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,53 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.keys.js");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.symbol.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.array.filter.js");
|
|
8
|
-
|
|
9
6
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
|
-
|
|
11
7
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
12
|
-
|
|
13
8
|
require("core-js/modules/es.object.define-properties.js");
|
|
14
|
-
|
|
15
9
|
require("core-js/modules/es.object.define-property.js");
|
|
16
|
-
|
|
17
10
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
-
|
|
19
11
|
Object.defineProperty(exports, "__esModule", {
|
|
20
12
|
value: true
|
|
21
13
|
});
|
|
22
14
|
exports["default"] = void 0;
|
|
23
|
-
|
|
24
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.string.split.js");
|
|
29
|
-
|
|
30
16
|
require("core-js/modules/es.array.for-each.js");
|
|
31
|
-
|
|
32
17
|
require("core-js/modules/es.object.to-string.js");
|
|
33
|
-
|
|
34
18
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
35
|
-
|
|
36
19
|
require("core-js/modules/es.array.is-array.js");
|
|
37
|
-
|
|
38
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39
|
-
|
|
40
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41
|
-
|
|
42
22
|
var getLatLonValues = function getLatLonValues(keys, data) {
|
|
43
23
|
if (keys.length === 1) return data[keys];
|
|
44
24
|
var key = keys.shift();
|
|
45
25
|
return getLatLonValues(keys, data[key]);
|
|
46
26
|
};
|
|
47
|
-
|
|
48
27
|
var getLatLong = function getLatLong(latProp, lonProp, shape, data) {
|
|
49
28
|
var latitude = shape.latitude,
|
|
50
|
-
|
|
29
|
+
longitude = shape.longitude;
|
|
51
30
|
if (!latProp || !lonProp) return {
|
|
52
31
|
latitude: latitude,
|
|
53
32
|
longitude: longitude
|
|
@@ -61,27 +40,24 @@ var getLatLong = function getLatLong(latProp, lonProp, shape, data) {
|
|
|
61
40
|
longitude: lon
|
|
62
41
|
};
|
|
63
42
|
};
|
|
64
|
-
|
|
65
43
|
var buildMapShapes = function buildMapShapes(shapesOptions, shapesData) {
|
|
66
44
|
if (!shapesData) return [];
|
|
67
45
|
var mapShapes = [];
|
|
68
46
|
shapesOptions.forEach(function (shape) {
|
|
69
47
|
var shapeKey = shape.shapeKey,
|
|
70
|
-
|
|
71
|
-
|
|
48
|
+
entityOptions = shape.entityOptions,
|
|
49
|
+
shapeOptions = shape.shapeOptions;
|
|
72
50
|
var dataSummaries = entityOptions.dataSummaries,
|
|
73
|
-
|
|
51
|
+
enableInfoPane = entityOptions.enableInfoPane;
|
|
74
52
|
var shapeData = Array.isArray(shapesData[shapeKey]) ? shapesData[shapeKey] : shapesData[shapeKey].results;
|
|
75
53
|
if (!shapeData) return;
|
|
76
54
|
var latProp = entityOptions.latProp,
|
|
77
|
-
|
|
55
|
+
lonProp = entityOptions.lonProp;
|
|
78
56
|
shapeData.forEach(function (data) {
|
|
79
57
|
var url = data.url;
|
|
80
|
-
|
|
81
58
|
var _getLatLong = getLatLong(latProp, lonProp, shapeOptions, data),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
59
|
+
latitude = _getLatLong.latitude,
|
|
60
|
+
longitude = _getLatLong.longitude;
|
|
85
61
|
var formatedShape = _objectSpread(_objectSpread({}, shapeOptions), {}, {
|
|
86
62
|
latitude: latitude,
|
|
87
63
|
longitude: longitude,
|
|
@@ -90,13 +66,11 @@ var buildMapShapes = function buildMapShapes(shapesOptions, shapesData) {
|
|
|
90
66
|
url: url,
|
|
91
67
|
shapeData: data
|
|
92
68
|
});
|
|
93
|
-
|
|
94
69
|
mapShapes.push(formatedShape);
|
|
95
70
|
});
|
|
96
71
|
});
|
|
97
72
|
return mapShapes;
|
|
98
73
|
};
|
|
99
|
-
|
|
100
74
|
var _default = buildMapShapes;
|
|
101
75
|
exports["default"] = _default;
|
|
102
76
|
//# 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","formatedShape","push"],"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":"
|
|
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","push"],"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,IAAMA,eAAe,GA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e,YAAY;IAC7C,IAAQC,aAAa,GAAqBF,aAAa,CAA/CE,aAAa;MAAEC,cAAc,GAAKH,aAAa,CAAhCG,cAAc;IAErC,IAAMC,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,IAAQpB,OAAO,GAAcgB,aAAa,CAAlChB,OAAO;MAAEC,OAAO,GAAKe,aAAa,CAAzBf,OAAO;IAExBmB,SAAS,CAACN,OAAO,CAAC,UAAAnB,IAAI,EAAI;MACxB,IAAQ6B,GAAG,GAAK7B,IAAI,CAAZ6B,GAAG;MACX,kBAAgCzB,UAAU,CAACC,OAAO,EAAEC,OAAO,EAAEgB,YAAY,EAAEtB,IAAI,CAAC;QAAxEQ,QAAQ,eAARA,QAAQ;QAAEC,SAAS,eAATA,SAAS;MAE3B,IAAMqB,aAAa,mCACdR,YAAY;QACfd,QAAQ,EAARA,QAAQ;QACRC,SAAS,EAATA,SAAS;QACTc,aAAa,EAAbA,aAAa;QACbC,cAAc,EAAdA,cAAc;QACdK,GAAG,EAAHA,GAAG;QACHJ,SAAS,EAAEzB;MAAI,EAChB;MAEDkB,SAAS,CAACa,IAAI,CAACD,aAAa,CAAC;IAC/B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOZ,SAAS;AAClB,CAAC;AAAC,eAEaH,cAAc;AAAA"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _constants = require("../../constants");
|
|
11
|
-
|
|
12
9
|
var buildMapTypeIds = function buildMapTypeIds(enableSatelliteView, enableTerrainScreen) {
|
|
13
10
|
var mapTypeIds = [_constants.ROADMAP];
|
|
14
11
|
if (enableSatelliteView) mapTypeIds.push(_constants.SATELLITE);
|
|
15
12
|
if (enableTerrainScreen) mapTypeIds.push(_constants.TERRAIN);
|
|
16
13
|
return mapTypeIds;
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var _default = buildMapTypeIds;
|
|
20
16
|
exports["default"] = _default;
|
|
21
17
|
//# sourceMappingURL=build-map-type-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-map-type-ids.js","names":["buildMapTypeIds","enableSatelliteView","enableTerrainScreen","mapTypeIds","ROADMAP","push","SATELLITE","TERRAIN"],"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":["buildMapTypeIds","enableSatelliteView","enableTerrainScreen","mapTypeIds","ROADMAP","push","SATELLITE","TERRAIN"],"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;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,mBAAmB,EAAEC,mBAAmB,EAAK;EACpE,IAAMC,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,eAEaH,eAAe;AAAA"}
|
|
@@ -1,40 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
10
|
require("core-js/modules/es.array.join.js");
|
|
15
|
-
|
|
16
11
|
require("core-js/modules/es.array.map.js");
|
|
17
|
-
|
|
18
12
|
require("core-js/modules/es.array.concat.js");
|
|
19
|
-
|
|
20
13
|
require("core-js/modules/es.array.slice.js");
|
|
21
|
-
|
|
22
14
|
require("core-js/modules/es.array.index-of.js");
|
|
23
|
-
|
|
24
15
|
require("core-js/modules/es.string.trim.js");
|
|
25
|
-
|
|
26
16
|
var _queries = require("../queries");
|
|
27
|
-
|
|
28
17
|
var buildQuery = function buildQuery(entityConfigs) {
|
|
29
18
|
var entityIds = [];
|
|
30
19
|
var rawQueryStringified = '';
|
|
31
20
|
var queryString = entityConfigs.map(function (entityConfig) {
|
|
32
21
|
var action = entityConfig.action,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
ids = entityConfig.ids,
|
|
23
|
+
entity = entityConfig.entity,
|
|
24
|
+
propsQuery = entityConfig.propsQuery,
|
|
25
|
+
shapeKey = entityConfig.shapeKey,
|
|
26
|
+
filtersObject = entityConfig.filtersObject;
|
|
38
27
|
if (!action) return '';
|
|
39
28
|
var formatedEntity = "".concat(entity[0].toUpperCase()).concat(entity.slice(1));
|
|
40
29
|
var filterQueryKey = action.indexOf('Published') !== -1 ? "Published".concat(formatedEntity) : formatedEntity;
|
|
@@ -49,7 +38,6 @@ var buildQuery = function buildQuery(entityConfigs) {
|
|
|
49
38
|
rawQueryStringified: rawQueryStringified
|
|
50
39
|
};
|
|
51
40
|
};
|
|
52
|
-
|
|
53
41
|
var _default = buildQuery;
|
|
54
42
|
exports["default"] = _default;
|
|
55
43
|
//# sourceMappingURL=build-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-query.js","names":["buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","toUpperCase","slice","filterQueryKey","indexOf","push","props","trim","singleItemQuery","generateFiltersQuery","JSON","stringify","generateIdsQuery","join","query","generateQuery"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import { 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 = `${entity[0].toUpperCase()}${entity.slice(1)}`;\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":"
|
|
1
|
+
{"version":3,"file":"build-query.js","names":["buildQuery","entityConfigs","entityIds","rawQueryStringified","queryString","map","entityConfig","action","ids","entity","propsQuery","shapeKey","filtersObject","formatedEntity","toUpperCase","slice","filterQueryKey","indexOf","push","props","trim","singleItemQuery","generateFiltersQuery","JSON","stringify","generateIdsQuery","join","query","generateQuery"],"sources":["../../../src/GoogleMaps/helpers/build-query.js"],"sourcesContent":["import { 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 = `${entity[0].toUpperCase()}${entity.slice(1)}`;\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;AAEA,IAAMA,UAAU,GAAG,SAAbA,UAAU,CAAGC,aAAa,EAAI;EAClC,IAAMC,SAAS,GAAG,EAAE;EACpB,IAAMC,mBAAmB,GAAG,EAAE;EAC9B,IAAMC,WAAW,GAAGH,aAAa,CAC9BI,GAAG,CAAC,UAAAC,YAAY,EAAI;IACnB,IAAQC,MAAM,GAAuDD,YAAY,CAAzEC,MAAM;MAAEC,GAAG,GAAkDF,YAAY,CAAjEE,GAAG;MAAEC,MAAM,GAA0CH,YAAY,CAA5DG,MAAM;MAAEC,UAAU,GAA8BJ,YAAY,CAApDI,UAAU;MAAEC,QAAQ,GAAoBL,YAAY,CAAxCK,QAAQ;MAAEC,aAAa,GAAKN,YAAY,CAA9BM,aAAa;IAChE,IAAI,CAACL,MAAM,EAAE,OAAO,EAAE;IACtB,IAAMM,cAAc,aAAMJ,MAAM,CAAC,CAAC,CAAC,CAACK,WAAW,EAAE,SAAGL,MAAM,CAACM,KAAK,CAAC,CAAC,CAAC,CAAE;IACrE,IAAMC,cAAc,GAClBT,MAAM,CAACU,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,sBAAeJ,cAAc,IAAKA,cAAc;IAEpFX,SAAS,CAACgB,IAAI,OAAdhB,SAAS,sCAASM,GAAG,EAAC;IACtB,IAAMW,KAAK,GAAGT,UAAU,CAACU,IAAI,EAAE,IAAI,IAAI;IACvC,IAAMC,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,mBAAmB,EAAnBA;EACF,CAAC;AACH,CAAC;AAAC,eAEaH,UAAU;AAAA"}
|
|
@@ -1,89 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.symbol.js");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
8
|
-
|
|
9
6
|
require("core-js/modules/es.object.define-properties.js");
|
|
10
|
-
|
|
11
7
|
require("core-js/modules/es.object.define-property.js");
|
|
12
|
-
|
|
13
8
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
14
|
-
|
|
15
9
|
Object.defineProperty(exports, "__esModule", {
|
|
16
10
|
value: true
|
|
17
11
|
});
|
|
18
12
|
exports["default"] = void 0;
|
|
19
|
-
|
|
20
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
-
|
|
22
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
23
|
-
|
|
24
15
|
require("core-js/modules/es.string.trim.js");
|
|
25
|
-
|
|
26
16
|
require("core-js/modules/es.array.reduce.js");
|
|
27
|
-
|
|
28
17
|
require("core-js/modules/es.object.to-string.js");
|
|
29
|
-
|
|
30
18
|
require("core-js/modules/es.array.includes.js");
|
|
31
|
-
|
|
32
19
|
require("core-js/modules/es.string.includes.js");
|
|
33
|
-
|
|
34
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
35
|
-
|
|
36
|
-
require("core-js/modules/es.string.split.js");
|
|
37
|
-
|
|
38
20
|
require("core-js/modules/es.array.concat.js");
|
|
39
|
-
|
|
40
21
|
require("core-js/modules/es.array.filter.js");
|
|
41
|
-
|
|
42
22
|
require("core-js/modules/es.object.keys.js");
|
|
43
|
-
|
|
44
23
|
require("core-js/modules/es.array.map.js");
|
|
45
|
-
|
|
46
24
|
require("core-js/modules/es.array.find.js");
|
|
47
|
-
|
|
48
25
|
require("core-js/modules/es.array.for-each.js");
|
|
49
|
-
|
|
50
26
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
51
|
-
|
|
52
27
|
var _lodash = _interopRequireDefault(require("lodash.flatten"));
|
|
53
|
-
|
|
54
28
|
var _constants = require("../../constants");
|
|
55
|
-
|
|
56
29
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
57
|
-
|
|
58
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
59
|
-
|
|
60
31
|
var getPropValues = function getPropValues(properties) {
|
|
61
32
|
return properties.reduce(function (acc, property) {
|
|
62
33
|
if (property.includes('.')) {
|
|
63
34
|
var _property$split = property.split('.'),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
35
|
+
_property$split2 = (0, _slicedToArray2["default"])(_property$split, 2),
|
|
36
|
+
relationName = _property$split2[0],
|
|
37
|
+
relationProp = _property$split2[1];
|
|
68
38
|
return "".concat(acc, " ").concat(relationName, " { ").concat(relationProp, " }");
|
|
69
39
|
}
|
|
70
|
-
|
|
71
40
|
return "".concat(acc, " ").concat(property);
|
|
72
41
|
}, '').trim();
|
|
73
42
|
};
|
|
74
|
-
|
|
75
43
|
var getUpdatedPropsQuery = function getUpdatedPropsQuery(propsQuery, entityData) {
|
|
76
44
|
var _entityData$propertie = entityData.properties,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
45
|
+
properties = _entityData$propertie === void 0 ? {} : _entityData$propertie,
|
|
46
|
+
_entityData$dynamicPr = entityData.dynamicProperties,
|
|
47
|
+
dynamicProperties = _entityData$dynamicPr === void 0 ? {} : _entityData$dynamicPr;
|
|
81
48
|
var _Object$keys$filter = Object.keys(dynamicProperties).filter(function (prop) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
49
|
+
return prop === _constants.URL;
|
|
50
|
+
}),
|
|
51
|
+
_Object$keys$filter2 = (0, _slicedToArray2["default"])(_Object$keys$filter, 1),
|
|
52
|
+
url = _Object$keys$filter2[0];
|
|
87
53
|
var hasImage = !!Object.keys(properties).filter(function (prop) {
|
|
88
54
|
return prop === _constants.IMAGE_ID;
|
|
89
55
|
}).length;
|
|
@@ -91,13 +57,11 @@ var getUpdatedPropsQuery = function getUpdatedPropsQuery(propsQuery, entityData)
|
|
|
91
57
|
updatedPropsQuery = url ? "".concat(updatedPropsQuery, " ").concat(_constants.URL) : updatedPropsQuery;
|
|
92
58
|
return updatedPropsQuery;
|
|
93
59
|
};
|
|
94
|
-
|
|
95
60
|
var buildFilterQueryString = function buildFilterQueryString(filter) {
|
|
96
61
|
var _filter$split = filter.split('/'),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
62
|
+
_filter$split2 = (0, _slicedToArray2["default"])(_filter$split, 2),
|
|
63
|
+
filterKey = _filter$split2[0],
|
|
64
|
+
filterValue = _filter$split2[1];
|
|
101
65
|
var filterKeyword = "".concat(filterKey, ".keyword");
|
|
102
66
|
return {
|
|
103
67
|
bool: {
|
|
@@ -107,7 +71,6 @@ var buildFilterQueryString = function buildFilterQueryString(filter) {
|
|
|
107
71
|
}
|
|
108
72
|
};
|
|
109
73
|
};
|
|
110
|
-
|
|
111
74
|
var buildFilters = function buildFilters(filters) {
|
|
112
75
|
if (!filters || !filters.length) return null;
|
|
113
76
|
var filterQueryProps = filters.map(buildFilterQueryString);
|
|
@@ -117,16 +80,15 @@ var buildFilters = function buildFilters(filters) {
|
|
|
117
80
|
}
|
|
118
81
|
};
|
|
119
82
|
};
|
|
120
|
-
|
|
121
83
|
var buiildShapeProps = function buiildShapeProps(shape, shapeKey, dataSummaries, parentId, entityData, entityGroup) {
|
|
122
84
|
var _shape$displayItems = shape.displayItems,
|
|
123
|
-
|
|
124
|
-
|
|
85
|
+
displayItems = _shape$displayItems === void 0 ? [] : _shape$displayItems,
|
|
86
|
+
filterBy = shape.filterBy;
|
|
125
87
|
var latProp = entityGroup.latProp,
|
|
126
|
-
|
|
127
|
-
|
|
88
|
+
lonProp = entityGroup.lonProp,
|
|
89
|
+
entity = entityGroup.entity;
|
|
128
90
|
var actions = entityData.actions,
|
|
129
|
-
|
|
91
|
+
relations = entityData.relations;
|
|
130
92
|
var action = actions ? actions.getAllPublished || actions.getAll : '';
|
|
131
93
|
var dataSummaryProps = dataSummaries.reduce(function (acc, _ref) {
|
|
132
94
|
var propsToDisplay = _ref.propsToDisplay;
|
|
@@ -142,11 +104,9 @@ var buiildShapeProps = function buiildShapeProps(shape, shapeKey, dataSummaries,
|
|
|
142
104
|
var filtersObject = buildFilters(filterBy);
|
|
143
105
|
var propsQuery = dataSummaryProps ? "".concat(dataSummaryProps) : '';
|
|
144
106
|
propsQuery = getUpdatedPropsQuery(propsQuery, entityData);
|
|
145
|
-
|
|
146
107
|
if (latProp && lonProp) {
|
|
147
108
|
propsQuery = "".concat(propsQuery, " ").concat(formatProp(latProp, relations), " ").concat(formatProp(lonProp, relations));
|
|
148
109
|
}
|
|
149
|
-
|
|
150
110
|
if (ids.length && !propsQuery.includes(_constants.ID)) propsQuery = "".concat(propsQuery.trim(), " ").concat(_constants.ID);
|
|
151
111
|
return {
|
|
152
112
|
shapeKey: shapeKey,
|
|
@@ -157,33 +117,29 @@ var buiildShapeProps = function buiildShapeProps(shape, shapeKey, dataSummaries,
|
|
|
157
117
|
filtersObject: filtersObject
|
|
158
118
|
};
|
|
159
119
|
};
|
|
160
|
-
|
|
161
120
|
var formatProp = function formatProp(prop) {
|
|
162
121
|
var relations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
163
122
|
if (!prop.includes('.')) return prop;
|
|
164
|
-
|
|
165
123
|
var _prop$split = prop.split('.'),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
124
|
+
_prop$split2 = (0, _slicedToArray2["default"])(_prop$split, 2),
|
|
125
|
+
mainProp = _prop$split2[0],
|
|
126
|
+
nestedProp = _prop$split2[1];
|
|
170
127
|
var idProp = relations.find(function (_ref3) {
|
|
171
128
|
var localField = _ref3.localField;
|
|
172
129
|
return localField === mainProp;
|
|
173
130
|
}) ? 'id ' : '';
|
|
174
131
|
return "".concat(mainProp, "{").concat(idProp).concat(nestedProp, "}");
|
|
175
132
|
};
|
|
176
|
-
|
|
177
133
|
var buildShapesConfig = function buildShapesConfig(schemas, entityGroups, parent) {
|
|
178
134
|
if (!schemas || !entityGroups) return [];
|
|
179
135
|
var itemId = parent.itemId,
|
|
180
|
-
|
|
136
|
+
itemEntity = parent.itemEntity;
|
|
181
137
|
var shapeGroups = [];
|
|
182
138
|
entityGroups.forEach(function (entityGroup, i) {
|
|
183
139
|
var entity = entityGroup.entity,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
140
|
+
shapes = entityGroup.shapes,
|
|
141
|
+
_entityGroup$dataSumm = entityGroup.dataSummaries,
|
|
142
|
+
dataSummaries = _entityGroup$dataSumm === void 0 ? [] : _entityGroup$dataSumm;
|
|
187
143
|
var parentId = entity === itemEntity && itemId;
|
|
188
144
|
if (!entity) return null;
|
|
189
145
|
var entityData = schemas[entity] || {};
|
|
@@ -198,7 +154,6 @@ var buildShapesConfig = function buildShapesConfig(schemas, entityGroups, parent
|
|
|
198
154
|
});
|
|
199
155
|
return shapeGroups;
|
|
200
156
|
};
|
|
201
|
-
|
|
202
157
|
var _default = buildShapesConfig;
|
|
203
158
|
exports["default"] = _default;
|
|
204
159
|
//# sourceMappingURL=build-shapes-configs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-shapes-configs.js","names":["getPropValues","properties","reduce","acc","property","includes","split","relationName","relationProp","trim","getUpdatedPropsQuery","propsQuery","entityData","dynamicProperties","Object","keys","filter","prop","URL","url","hasImage","IMAGE_ID","length","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","push","filtersObject","formatProp","ID","mainProp","nestedProp","idProp","find","localField","buildShapesConfig","schemas","entityGroups","parent","itemId","itemEntity","shapeGroups","forEach","i","shapes","Boolean","shapeIndex","shapeValues","shapeOptions","entityOptions"],"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":"
|
|
1
|
+
{"version":3,"file":"build-shapes-configs.js","names":["getPropValues","properties","reduce","acc","property","includes","split","relationName","relationProp","trim","getUpdatedPropsQuery","propsQuery","entityData","dynamicProperties","Object","keys","filter","prop","URL","url","hasImage","IMAGE_ID","length","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","push","filtersObject","formatProp","ID","mainProp","nestedProp","idProp","find","localField","buildShapesConfig","schemas","entityGroups","parent","itemId","itemEntity","shapeGroups","forEach","i","shapes","Boolean","shapeIndex","shapeValues","shapeOptions","entityOptions"],"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;AACA;AAAoD;AAAA;AAEpD,IAAMA,aAAa,GAAG,SAAhBA,aAAa,CAAGC,UAAU;EAAA,OAC9BA,UAAU,CACPC,MAAM,CAAC,UAACC,GAAG,EAAEC,QAAQ,EAAK;IACzB,IAAIA,QAAQ,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;MAC1B,sBAAqCD,QAAQ,CAACE,KAAK,CAAC,GAAG,CAAC;QAAA;QAAjDC,YAAY;QAAEC,YAAY;MACjC,iBAAUL,GAAG,cAAII,YAAY,gBAAMC,YAAY;IACjD;IACA,iBAAUL,GAAG,cAAIC,QAAQ;EAC3B,CAAC,EAAE,EAAE,CAAC,CACLK,IAAI,EAAE;AAAA;AAEX,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoB,CAAIC,UAAU,EAAEC,UAAU,EAAK;EACvD,4BAAoDA,UAAU,CAAtDX,UAAU;IAAVA,UAAU,sCAAG,CAAC,CAAC;IAAA,wBAA6BW,UAAU,CAArCC,iBAAiB;IAAjBA,iBAAiB,sCAAG,CAAC,CAAC;EAE/C,0BAAcC,MAAM,CAACC,IAAI,CAACF,iBAAiB,CAAC,CAACG,MAAM,CAAC,UAAAC,IAAI;MAAA,OAAIA,IAAI,KAAKC,cAAG;IAAA,EAAC;IAAA;IAAlEC,GAAG;EACV,IAAMC,QAAQ,GAAG,CAAC,CAACN,MAAM,CAACC,IAAI,CAACd,UAAU,CAAC,CAACe,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,KAAKI,mBAAQ;EAAA,EAAC,CAACC,MAAM;EAEnF,IAAIC,iBAAiB,GAAGH,QAAQ,aAAMT,UAAU,cAAIU,mBAAQ,IAAKV,UAAU;EAC3EY,i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ExC+B,MAAM,CAAC5D,MAAM,CAAC6D,OAAO,CAAC,CAACH,OAAO,CAAC,UAACtC,KAAK,EAAE0C,UAAU,EAAK;MACpD,IAAMzC,QAAQ,kBAAWsC,CAAC,SAAGG,UAAU,CAAE;MACzC,IAAMC,WAAW,GAAG5C,gBAAgB,CAClCC,KAAK,EACLC,QAAQ,EACRC,aAAa,EACbC,QAAQ,EACR3B,UAAU,EACV4B,WAAW,CACZ;MACDiC,WAAW,CAACf,IAAI,iCAAMqB,WAAW;QAAEC,YAAY,EAAE5C,KAAK;QAAE6C,aAAa,EAAEzC;MAAW,GAAG;IACvF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOiC,WAAW;AACpB,CAAC;AAAC,eAEaN,iBAAiB;AAAA"}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
require("core-js/modules/es.array.filter.js");
|
|
13
|
-
|
|
14
10
|
require("core-js/modules/es.object.to-string.js");
|
|
15
|
-
|
|
16
11
|
require("core-js/modules/es.array.for-each.js");
|
|
17
|
-
|
|
18
12
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
19
|
-
|
|
20
13
|
var _lodash = _interopRequireDefault(require("lodash.isnumber"));
|
|
21
|
-
|
|
22
14
|
var getCenterCoordinates = function getCenterCoordinates(mapShapes, otherProps) {
|
|
23
15
|
var centerCoordinates = [];
|
|
24
16
|
var centerLatitude = otherProps.centerLatitude,
|
|
25
|
-
|
|
17
|
+
centerLongitude = otherProps.centerLongitude;
|
|
26
18
|
var useDefaultCenter = centerLatitude !== 0 && centerLongitude !== 0 && (0, _lodash["default"])(centerLatitude) && (0, _lodash["default"])(centerLongitude);
|
|
27
19
|
if (useDefaultCenter) return [{
|
|
28
20
|
latitude: centerLatitude,
|
|
@@ -35,7 +27,7 @@ var getCenterCoordinates = function getCenterCoordinates(mapShapes, otherProps)
|
|
|
35
27
|
var shapesForCenter = useAsCenterShapes.length ? useAsCenterShapes : mapShapes;
|
|
36
28
|
shapesForCenter.forEach(function (_ref2) {
|
|
37
29
|
var latitude = _ref2.latitude,
|
|
38
|
-
|
|
30
|
+
longitude = _ref2.longitude;
|
|
39
31
|
if ((0, _lodash["default"])(latitude) && (0, _lodash["default"])(longitude)) centerCoordinates.push({
|
|
40
32
|
latitude: latitude,
|
|
41
33
|
longitude: longitude
|
|
@@ -43,7 +35,6 @@ var getCenterCoordinates = function getCenterCoordinates(mapShapes, otherProps)
|
|
|
43
35
|
});
|
|
44
36
|
return centerCoordinates;
|
|
45
37
|
};
|
|
46
|
-
|
|
47
38
|
var _default = getCenterCoordinates;
|
|
48
39
|
exports["default"] = _default;
|
|
49
40
|
//# sourceMappingURL=get-center-coordinates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-center-coordinates.js","names":["getCenterCoordinates","mapShapes","otherProps","centerCoordinates","centerLatitude","centerLongitude","useDefaultCenter","isNumber","latitude","longitude","useAsCenterShapes","filter","useAsCenter","shapesForCenter","length","forEach","push"],"sources":["../../../src/GoogleMaps/helpers/get-center-coordinates.js"],"sourcesContent":["import isNumber from 'lodash.isnumber';\n\nconst getCenterCoordinates = (mapShapes, otherProps) => {\n const centerCoordinates = [];\n\n const { centerLatitude, centerLongitude } = otherProps;\n const useDefaultCenter =\n centerLatitude !== 0 &&\n centerLongitude !== 0 &&\n isNumber(centerLatitude) &&\n isNumber(centerLongitude);\n\n if (useDefaultCenter) return [{ latitude: centerLatitude, longitude: centerLongitude }];\n\n const useAsCenterShapes = mapShapes.filter(({ useAsCenter }) => useAsCenter);\n const shapesForCenter = useAsCenterShapes.length ? useAsCenterShapes : mapShapes;\n shapesForCenter.forEach(({ latitude, longitude }) => {\n if (isNumber(latitude) && isNumber(longitude)) centerCoordinates.push({ latitude, longitude });\n });\n\n return centerCoordinates;\n};\n\nexport default getCenterCoordinates;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-center-coordinates.js","names":["getCenterCoordinates","mapShapes","otherProps","centerCoordinates","centerLatitude","centerLongitude","useDefaultCenter","isNumber","latitude","longitude","useAsCenterShapes","filter","useAsCenter","shapesForCenter","length","forEach","push"],"sources":["../../../src/GoogleMaps/helpers/get-center-coordinates.js"],"sourcesContent":["import isNumber from 'lodash.isnumber';\n\nconst getCenterCoordinates = (mapShapes, otherProps) => {\n const centerCoordinates = [];\n\n const { centerLatitude, centerLongitude } = otherProps;\n const useDefaultCenter =\n centerLatitude !== 0 &&\n centerLongitude !== 0 &&\n isNumber(centerLatitude) &&\n isNumber(centerLongitude);\n\n if (useDefaultCenter) return [{ latitude: centerLatitude, longitude: centerLongitude }];\n\n const useAsCenterShapes = mapShapes.filter(({ useAsCenter }) => useAsCenter);\n const shapesForCenter = useAsCenterShapes.length ? useAsCenterShapes : mapShapes;\n shapesForCenter.forEach(({ latitude, longitude }) => {\n if (isNumber(latitude) && isNumber(longitude)) centerCoordinates.push({ latitude, longitude });\n });\n\n return centerCoordinates;\n};\n\nexport default getCenterCoordinates;\n"],"mappings":";;;;;;;;;;;;AAAA;AAEA,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAoB,CAAIC,SAAS,EAAEC,UAAU,EAAK;EACtD,IAAMC,iBAAiB,GAAG,EAAE;EAE5B,IAAQC,cAAc,GAAsBF,UAAU,CAA9CE,cAAc;IAAEC,eAAe,GAAKH,UAAU,CAA9BG,eAAe;EACvC,IAAMC,gBAAgB,GACpBF,cAAc,KAAK,CAAC,IACpBC,eAAe,KAAK,CAAC,IACrB,IAAAE,kBAAQ,EAACH,cAAc,CAAC,IACxB,IAAAG,kBAAQ,EAACF,eAAe,CAAC;EAE3B,IAAIC,gBAAgB,EAAE,OAAO,CAAC;IAAEE,QAAQ,EAAEJ,cAAc;IAAEK,SAAS,EAAEJ;EAAgB,CAAC,CAAC;EAEvF,IAAMK,iBAAiB,GAAGT,SAAS,CAACU,MAAM,CAAC;IAAA,IAAGC,WAAW,QAAXA,WAAW;IAAA,OAAOA,WAAW;EAAA,EAAC;EAC5E,IAAMC,eAAe,GAAGH,iBAAiB,CAACI,MAAM,GAAGJ,iBAAiB,GAAGT,SAAS;EAChFY,eAAe,CAACE,OAAO,CAAC,iBAA6B;IAAA,IAA1BP,QAAQ,SAARA,QAAQ;MAAEC,SAAS,SAATA,SAAS;IAC5C,IAAI,IAAAF,kBAAQ,EAACC,QAAQ,CAAC,IAAI,IAAAD,kBAAQ,EAACE,SAAS,CAAC,EAAEN,iBAAiB,CAACa,IAAI,CAAC;MAAER,QAAQ,EAARA,QAAQ;MAAEC,SAAS,EAATA;IAAU,CAAC,CAAC;EAChG,CAAC,CAAC;EAEF,OAAON,iBAAiB;AAC1B,CAAC;AAAC,eAEaH,oBAAoB;AAAA"}
|
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
10
|
require("core-js/modules/es.array.for-each.js");
|
|
15
|
-
|
|
16
11
|
require("core-js/modules/es.object.to-string.js");
|
|
17
|
-
|
|
18
12
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
19
|
-
|
|
20
13
|
require("core-js/modules/es.array.iterator.js");
|
|
21
|
-
|
|
22
14
|
require("core-js/modules/es.set.js");
|
|
23
|
-
|
|
24
15
|
require("core-js/modules/es.string.iterator.js");
|
|
25
|
-
|
|
26
16
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
27
|
-
|
|
28
17
|
var getImageIds = function getImageIds(mapShapes) {
|
|
29
18
|
var ids = [];
|
|
30
19
|
mapShapes.forEach(function (_ref) {
|
|
31
20
|
var shapeData = _ref.shapeData,
|
|
32
|
-
|
|
21
|
+
imageId = _ref.imageId;
|
|
33
22
|
if (imageId) ids.push(imageId);
|
|
34
23
|
if (shapeData.imageId) ids.push(shapeData.imageId);
|
|
35
24
|
});
|
|
36
25
|
return (0, _toConsumableArray2["default"])(new Set(ids));
|
|
37
26
|
};
|
|
38
|
-
|
|
39
27
|
var _default = getImageIds;
|
|
40
28
|
exports["default"] = _default;
|
|
41
29
|
//# sourceMappingURL=get-image-ids.js.map
|