@blateral/b.kit 2.0.0-beta.9.10 → 2.0.0-beta.9.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.
Files changed (41) hide show
  1. package/lib/components/blocks/Alert.d.ts.map +1 -1
  2. package/lib/components/blocks/EventBlock.d.ts.map +1 -1
  3. package/lib/components/blocks/Image.d.ts +1 -0
  4. package/lib/components/blocks/Image.d.ts.map +1 -1
  5. package/lib/components/blocks/IntroBlock.d.ts.map +1 -1
  6. package/lib/components/blocks/JobCard.d.ts.map +1 -1
  7. package/lib/components/blocks/PromotionCard.d.ts.map +1 -1
  8. package/lib/components/blocks/Tag.d.ts.map +1 -1
  9. package/lib/components/blocks/VideoCard.d.ts.map +1 -1
  10. package/lib/components/buttons/Button.d.ts.map +1 -1
  11. package/lib/components/buttons/ButtonGhost.d.ts.map +1 -1
  12. package/lib/components/buttons/Control.d.ts.map +1 -1
  13. package/lib/components/buttons/Pointer.d.ts.map +1 -1
  14. package/lib/components/buttons/QuicknavButton.d.ts.map +1 -1
  15. package/lib/components/fields/CompactForm.d.ts.map +1 -1
  16. package/lib/components/fields/Datepicker.d.ts.map +1 -1
  17. package/lib/components/fields/SearchInput.d.ts.map +1 -1
  18. package/lib/components/fields/SelectDropdown.d.ts.map +1 -1
  19. package/lib/components/fields/Textarea.d.ts.map +1 -1
  20. package/lib/components/fields/Textfield.d.ts.map +1 -1
  21. package/lib/components/sections/Accordion.d.ts.map +1 -1
  22. package/lib/components/sections/CardList.d.ts.map +1 -1
  23. package/lib/components/sections/Map.d.ts.map +1 -1
  24. package/lib/components/sections/SocialWall.d.ts.map +1 -1
  25. package/lib/components/sections/Table.d.ts.map +1 -1
  26. package/lib/components/sections/events/EventDetail.d.ts.map +1 -1
  27. package/lib/components/sections/navigation/skeletons/BarLogo.d.ts.map +1 -1
  28. package/lib/components/sections/news/NewsIntro.d.ts.map +1 -1
  29. package/lib/components/typography/Copy.d.ts.map +1 -1
  30. package/lib/index.d.ts +1 -0
  31. package/lib/index.d.ts.map +1 -1
  32. package/lib/index.es.js +1 -1
  33. package/lib/index.es.js.map +1 -1
  34. package/lib/index.js +1 -1
  35. package/lib/index.js.map +1 -1
  36. package/lib/utils/hexRgbConverter.d.ts.map +1 -1
  37. package/lib/utils/useLeafletMap.d.ts +41 -0
  38. package/lib/utils/useLeafletMap.d.ts.map +1 -0
  39. package/package.json +7 -3
  40. package/lib/components/blocks/LeafletMap.d.ts +0 -42
  41. package/lib/components/blocks/LeafletMap.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hexRgbConverter.d.ts","sourceRoot":"","sources":["../../src/utils/hexRgbConverter.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,QAAS,MAAM,uCAGpC,CAAC"}
1
+ {"version":3,"file":"hexRgbConverter.d.ts","sourceRoot":"","sources":["../../src/utils/hexRgbConverter.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAAS,MAAM,uCAQpC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /// <reference types="react" />
2
+ export interface LeafletMapSettings {
3
+ center: [number, number];
4
+ zoom: number;
5
+ touchZoom: boolean;
6
+ scrollWheelZoom: boolean;
7
+ onlyScrollOnFocus: boolean;
8
+ url: string;
9
+ attribution: string;
10
+ markers: Array<LeafletMapMarker>;
11
+ activeMarkerId?: string;
12
+ fitBoundsPadding: [number, number];
13
+ onMarkerClick?: (markerId: string) => void;
14
+ onActiveMarkerChanged?: (props: {
15
+ markerId: string;
16
+ }) => void;
17
+ onReady?: () => void;
18
+ }
19
+ export interface LeafletMapMarker {
20
+ id: string;
21
+ position: [number, number];
22
+ icon?: {
23
+ url: string;
24
+ size: [number, number];
25
+ anchor: [number, number];
26
+ sizeActive: [number, number];
27
+ anchorActive: [number, number];
28
+ };
29
+ popup?: {
30
+ text: string;
31
+ };
32
+ }
33
+ declare const useLeafletMap: (settings: Partial<LeafletMapSettings>) => {
34
+ setContainer: import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>;
35
+ flyToActive: (zoom?: number | undefined) => void;
36
+ flyToPosition: (position?: [number, number] | undefined, zoom?: number | undefined) => void;
37
+ showAllMarkers: () => void;
38
+ isLoaded: boolean;
39
+ };
40
+ export default useLeafletMap;
41
+ //# sourceMappingURL=useLeafletMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLeafletMap.d.ts","sourceRoot":"","sources":["../../src/utils/useLeafletMap.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAEzB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAClC,CAAC;IACF,KAAK,CAAC,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;CACL;AAED,QAAA,MAAM,aAAa,aAAc,QAAQ,kBAAkB,CAAC;;;;;;CAwM3D,CAAC;AAEF,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blateral/b.kit",
3
- "version": "2.0.0-beta.9.10",
3
+ "version": "2.0.0-beta.9.13",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -9,7 +9,7 @@
9
9
  "lib"
10
10
  ],
11
11
  "scripts": {
12
- "build": "rollup -c",
12
+ "build": "yarn test && rollup -c",
13
13
  "watch": "rollup -c -w",
14
14
  "storybook": "start-storybook -s ./public -p 9000 -c .storybook --no-manager-cache",
15
15
  "deploy-storybook": "yarn storybook-to-ghpages",
@@ -20,7 +20,8 @@
20
20
  "deploy": "yarn tc && yarn build && yarn publish",
21
21
  "deploy-patch": "yarn tc && yarn build && yarn publish --tag patch",
22
22
  "deploy-beta": "yarn tc && yarn build && yarn publish --tag beta",
23
- "prepare": "npx husky install && npx yalc --version"
23
+ "prepare": "npx husky install && npx yalc --version",
24
+ "test": "jest"
24
25
  },
25
26
  "repository": {
26
27
  "type": "git",
@@ -43,6 +44,7 @@
43
44
  "@storybook/react": "6.4.22",
44
45
  "@storybook/storybook-deployer": "^2.8.11",
45
46
  "@storybook/theming": "^6.4.22",
47
+ "@types/jest": "^27.5.1",
46
48
  "@types/react": "^18.0.8",
47
49
  "@types/react-datepicker": "4.3.4",
48
50
  "@types/react-dom": "^18.0.0",
@@ -59,6 +61,7 @@
59
61
  "eslint-plugin-react-hooks": "4.5.0",
60
62
  "formik": "^2.2.9",
61
63
  "husky": "^7.0.0",
64
+ "jest": "^28.1.0",
62
65
  "leaflet": "1.7.1",
63
66
  "react": "^18.1.0",
64
67
  "react-datepicker": "4.6.0",
@@ -73,6 +76,7 @@
73
76
  "schema-dts": "^1.0.0",
74
77
  "slick-carousel": "1.8.1",
75
78
  "styled-components": "5.3.5",
79
+ "ts-jest": "^28.0.3",
76
80
  "ttypescript": "1.5.13",
77
81
  "typescript": "^4.6.3"
78
82
  },
@@ -1,42 +0,0 @@
1
- import React, { FC } from 'react';
2
- export interface LeafletMapMarker {
3
- id: string;
4
- position: [number, number];
5
- icon?: {
6
- url: string;
7
- size: [number, number];
8
- anchor: [number, number];
9
- sizeActive: [number, number];
10
- anchorActive: [number, number];
11
- };
12
- popup?: {
13
- text: string;
14
- };
15
- }
16
- declare const LeafletMap: FC<{
17
- containerRef?: React.MutableRefObject<HTMLDivElement | null>;
18
- onReady?: (props: {
19
- goTo: (position?: [number, number], zoom?: number) => void;
20
- showAll: () => void;
21
- }) => void;
22
- url?: string;
23
- attribution?: string;
24
- activeMarkerId?: string;
25
- markers?: Array<LeafletMapMarker>;
26
- center: [number, number];
27
- zoom?: number;
28
- touchZoom?: boolean;
29
- scrollWheelZoom?: boolean;
30
- onlyScrollOnFocus?: boolean;
31
- fitBoundsPadding?: [number, number];
32
- onMarkerClick?: (markerId: string) => void;
33
- onFlyToClick?: (goTo: (zoom?: number) => void) => void;
34
- flyToControl?: React.ReactNode;
35
- onActiveMarkerChanged?: (props: {
36
- markerId: string;
37
- goTo: (zoom?: number) => void;
38
- }) => void;
39
- className?: string;
40
- }>;
41
- export default LeafletMap;
42
- //# sourceMappingURL=LeafletMap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LeafletMap.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/LeafletMap.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAsB/D,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE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