@bpd-library/components 2.0.6 → 2.0.7
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/dist/molecules/map/index.d.ts +1 -0
- package/dist/molecules/map/index.js +1 -0
- package/dist/molecules/map/index.js.map +1 -1
- package/dist/molecules/map/utilities/extend-map-theme.d.ts +2 -0
- package/dist/molecules/map/utilities/extend-map-theme.js +17 -0
- package/dist/molecules/map/utilities/extend-map-theme.js.map +1 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/map/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC","sourcesContent":["export * from './utilities/fit-bounds';\nexport { setDefaultKmPadding } from './utilities/mapbox/search/search';\nexport * from './store';\nexport * from './hooks';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/map/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC","sourcesContent":["export * from './utilities/fit-bounds';\nexport * from './utilities/extend-map-theme';\nexport { setDefaultKmPadding } from './utilities/mapbox/search/search';\nexport * from './store';\nexport * from './hooks';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { h } from '@atomify/jsx';
|
|
2
|
+
export const extendMapTheme = (...mapThemes) => {
|
|
3
|
+
const newTheme = {
|
|
4
|
+
polygon: { settings: [] },
|
|
5
|
+
pointer: { settings: [], cluster: (total) => h("span", null, total) },
|
|
6
|
+
};
|
|
7
|
+
mapThemes.forEach(({ polygon, pointer }) => {
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
(polygon === null || polygon === void 0 ? void 0 : polygon.settings.length) && ((_b = (_a = newTheme.polygon) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.push(...polygon.settings));
|
|
10
|
+
(pointer === null || pointer === void 0 ? void 0 : pointer.settings.length) && ((_d = (_c = newTheme.pointer) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d.push(...pointer.settings));
|
|
11
|
+
if ((pointer === null || pointer === void 0 ? void 0 : pointer.cluster) && newTheme.pointer) {
|
|
12
|
+
newTheme.pointer.cluster = pointer.cluster;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return newTheme;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=extend-map-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extend-map-theme.js","sourceRoot":"","sources":["../../../../src/molecules/map/utilities/extend-map-theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAGjC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAG,SAA2C,EAAY,EAAE;IACvF,MAAM,QAAQ,GAAa;QACvB,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACzB,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAO,KAAK,CAAQ,EAAE;KACtE,CAAC;IAEF,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;;QACvC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,MAAM,kBAAI,QAAQ,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAC,CAAC;QAClF,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,MAAM,kBAAI,QAAQ,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAC,CAAC;QAClF,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,QAAQ,CAAC,OAAO,EAAE;YACtC,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SAC9C;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import { h } from '@atomify/jsx';\nimport { MapTheme, MapThemeExtension } from '@bpd-library/types';\n\nexport const extendMapTheme = (...mapThemes: (MapTheme | MapThemeExtension)[]): MapTheme => {\n const newTheme: MapTheme = {\n polygon: { settings: [] },\n pointer: { settings: [], cluster: (total) => <span>{total}</span> },\n };\n\n mapThemes.forEach(({ polygon, pointer }) => {\n polygon?.settings.length && newTheme.polygon?.settings?.push(...polygon.settings);\n pointer?.settings.length && newTheme.pointer?.settings?.push(...pointer.settings);\n if (pointer?.cluster && newTheme.pointer) {\n newTheme.pointer.cluster = pointer.cluster;\n }\n });\n\n return newTheme;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpd-library/components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Description",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "27010efb4969e8fffb3c078a3d5d0cb28db2aac2",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@atomify/core": "2.4.1",
|
|
52
52
|
"@atomify/hooks": "1.1.11",
|
|
53
53
|
"@atomify/jsx": "1.7.1",
|
|
54
54
|
"@atomify/kit": "1.1.11",
|
|
55
|
-
"@bpd-library/types": "^2.0.
|
|
56
|
-
"@bpd-library/utilities": "^2.0.
|
|
55
|
+
"@bpd-library/types": "^2.0.7",
|
|
56
|
+
"@bpd-library/utilities": "^2.0.7",
|
|
57
57
|
"@mapbox/mapbox-gl-geocoder": "^4.7.0",
|
|
58
58
|
"@mapbox/mapbox-gl-language": "^0.10.1",
|
|
59
59
|
"@turf/helpers": "^6.5.0",
|