@pega/cosmos-react-demos 7.11.4-10 → 7.11.4-11

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.
@@ -1,7 +1,9 @@
1
1
  export declare class MockLatLng {
2
- lat: number;
3
- lng: number;
2
+ longitude: number;
3
+ latitude: number;
4
4
  constructor(lat: number, lng: number);
5
+ lat(): number;
6
+ lng(): number;
5
7
  }
6
8
  export declare const setUpMapsAPI: () => void;
7
9
  export declare const tearDownMapsAPI: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"locationTestUtils.d.ts","sourceRoot":"","sources":["../../../src/core/Location/locationTestUtils.ts"],"names":[],"mappings":"AA+BA,qBAAa,UAAU;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;gBACA,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAIrC;AAaD,eAAO,MAAM,YAAY,YA2BxB,CAAC;AAEF,eAAO,MAAM,eAAe,YAE3B,CAAC"}
1
+ {"version":3,"file":"locationTestUtils.d.ts","sourceRoot":"","sources":["../../../src/core/Location/locationTestUtils.ts"],"names":[],"mappings":"AA+BA,qBAAa,UAAU;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;gBACL,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAKpC,GAAG;IAIH,GAAG;CAGJ;AAyBD,eAAO,MAAM,YAAY,YAoCxB,CAAC;AAEF,eAAO,MAAM,eAAe,YAE3B,CAAC"}
@@ -25,11 +25,17 @@ class MockBounds {
25
25
  }
26
26
  }
27
27
  export class MockLatLng {
28
- lat;
29
- lng;
28
+ longitude;
29
+ latitude;
30
30
  constructor(lat, lng) {
31
- this.lat = lat;
32
- this.lng = lng;
31
+ this.latitude = lat;
32
+ this.longitude = lng;
33
+ }
34
+ lat() {
35
+ return this.latitude;
36
+ }
37
+ lng() {
38
+ return this.longitude;
33
39
  }
34
40
  }
35
41
  class MockDirectionsService {
@@ -41,6 +47,15 @@ class MockDirectionsRenderer {
41
47
  setDirections() { }
42
48
  setMap() { }
43
49
  }
50
+ class MockAutocompleteService {
51
+ getPlacePredictions() { }
52
+ }
53
+ class MockGeocoder {
54
+ geocode() { }
55
+ }
56
+ class MockPlacesService {
57
+ getDetails() { }
58
+ }
44
59
  export const setUpMapsAPI = () => {
45
60
  global.google = {
46
61
  maps: {
@@ -50,6 +65,9 @@ export const setUpMapsAPI = () => {
50
65
  DirectionsService: MockDirectionsService,
51
66
  DirectionsRenderer: MockDirectionsRenderer,
52
67
  LatLng: MockLatLng,
68
+ Geocoder: MockGeocoder,
69
+ GeocoderLocationType: { GEOMETRIC_CENTER: 'GEOMETRIC_CENTER' },
70
+ GeocoderStatus: { OK: 'OK', ERROR: 'ERROR' },
53
71
  TravelMode: {
54
72
  DRIVING: 'driving'
55
73
  },
@@ -59,6 +77,13 @@ export const setUpMapsAPI = () => {
59
77
  },
60
78
  places: {
61
79
  Autocomplete: class Autocomplete {
80
+ },
81
+ AutocompleteService: MockAutocompleteService,
82
+ AutocompleteSessionToken: class AutocompleteSessionToken {
83
+ },
84
+ PlacesService: MockPlacesService,
85
+ PlacesServiceStatus: {
86
+ OK: 'OK'
62
87
  }
63
88
  },
64
89
  marker: {}
@@ -1 +1 @@
1
- {"version":3,"file":"locationTestUtils.js","sourceRoot":"","sources":["../../../src/core/Location/locationTestUtils.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,OAAO;IACX,WAAW,CAAa;IACxB,SAAS,CAAa;IACtB,OAAO,CAAa;IAEpB,YAAY,OAAoB;QAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5C,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAClC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,GAAG,E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AAE;SACX;KAC0B,CAAC;IAE7B,MAAM,CAAC,SAAS,CAAC,WAA2B,GAAG;QAC9C,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAsB,CAAC;KACvE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,CAAC,MAAM,GAAG,SAAqC,CAAC;AACxD,CAAC,CAAC","sourcesContent":["/* eslint-disable class-methods-use-this */\nclass MockMap {\n addListener: () => void;\n setCenter: () => void;\n setZoom: () => void;\n\n constructor(element: HTMLElement) {\n const newEl = document.createElement('div');\n newEl.setAttribute('role', 'map');\n element.appendChild(newEl);\n this.addListener = () => {};\n this.setCenter = () => {};\n this.setZoom = () => {};\n }\n}\n\nclass MockMarker {\n config: any;\n constructor(config?: any) {\n this.config = config;\n }\n}\n\nclass MockBounds {\n extend: () => void;\n\n constructor() {\n this.extend = () => {};\n }\n}\n\nexport class MockLatLng {\n lat: number;\n lng: number;\n constructor(lat: number, lng: number) {\n this.lat = lat;\n this.lng = lng;\n }\n}\n\nclass MockDirectionsService {\n route() {\n return Promise.resolve();\n }\n}\n\nclass MockDirectionsRenderer {\n setDirections() {}\n setMap() {}\n}\n\nexport const setUpMapsAPI = () => {\n global.google = {\n maps: {\n Map: MockMap,\n Marker: MockMarker,\n LatLngBounds: MockBounds,\n DirectionsService: MockDirectionsService,\n DirectionsRenderer: MockDirectionsRenderer,\n LatLng: MockLatLng,\n\n TravelMode: {\n DRIVING: 'driving'\n },\n event: {\n removeListener: () => {},\n clearInstanceListeners: () => {}\n },\n places: {\n Autocomplete: class Autocomplete {}\n },\n marker: {}\n }\n } as unknown as typeof google;\n\n (global.navigator.permissions as Permissions) = {\n query: () => Promise.resolve({ state: 'granted' } as PermissionStatus)\n };\n};\n\nexport const tearDownMapsAPI = () => {\n global.google = undefined as unknown as typeof google;\n};\n"]}
1
+ {"version":3,"file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C,MAAM,GAAG,SAAqC,CAAC;AACxD,CAAC,CAAC","sourcesContent":["/* eslint-disable class-methods-use-this */\nclass MockMap {\n addListener: () => void;\n setCenter: () => void;\n setZoom: () => void;\n\n constructor(element: HTMLElement) {\n const newEl = document.createElement('div');\n newEl.setAttribute('role', 'map');\n element.appendChild(newEl);\n this.addListener = () => {};\n this.setCenter = () => {};\n this.setZoom = () => {};\n }\n}\n\nclass MockMarker {\n config: any;\n constructor(config?: any) {\n this.config = config;\n }\n}\n\nclass MockBounds {\n extend: () => void;\n\n constructor() {\n this.extend = () => {};\n }\n}\n\nexport class MockLatLng {\n longitude: number;\n latitude: number;\n constructor(lat: number, lng: number) {\n this.latitude = lat;\n this.longitude = lng;\n }\n\n lat() {\n return this.latitude;\n }\n\n lng() {\n return this.longitude;\n }\n}\n\nclass MockDirectionsService {\n route() {\n return Promise.resolve();\n }\n}\n\nclass MockDirectionsRenderer {\n setDirections() {}\n setMap() {}\n}\n\nclass MockAutocompleteService {\n getPlacePredictions() {}\n}\n\nclass MockGeocoder {\n geocode() {}\n}\n\nclass MockPlacesService {\n getDetails() {}\n}\n\nexport const setUpMapsAPI = () => {\n global.google = {\n maps: {\n Map: MockMap,\n Marker: MockMarker,\n LatLngBounds: MockBounds,\n DirectionsService: MockDirectionsService,\n DirectionsRenderer: MockDirectionsRenderer,\n LatLng: MockLatLng,\n Geocoder: MockGeocoder,\n GeocoderLocationType: { GEOMETRIC_CENTER: 'GEOMETRIC_CENTER' },\n GeocoderStatus: { OK: 'OK', ERROR: 'ERROR' },\n\n TravelMode: {\n DRIVING: 'driving'\n },\n event: {\n removeListener: () => {},\n clearInstanceListeners: () => {}\n },\n places: {\n Autocomplete: class Autocomplete {},\n AutocompleteService: MockAutocompleteService,\n AutocompleteSessionToken: class AutocompleteSessionToken {},\n PlacesService: MockPlacesService,\n PlacesServiceStatus: {\n OK: 'OK'\n }\n },\n marker: {}\n }\n } as unknown as typeof google;\n\n (global.navigator.permissions as Permissions) = {\n query: () => Promise.resolve({ state: 'granted' } as PermissionStatus)\n };\n};\n\nexport const tearDownMapsAPI = () => {\n global.google = undefined as unknown as typeof google;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-demos",
3
- "version": "7.11.4-10",
3
+ "version": "7.11.4-11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pegasystems/cosmos-react.git",
@@ -20,12 +20,12 @@
20
20
  "build": "tsc -b tsconfig.build.json && tsc -b tsconfig.build-preserve.json"
21
21
  },
22
22
  "dependencies": {
23
- "@pega/cosmos-react-condition-builder": "7.11.4-10",
24
- "@pega/cosmos-react-core": "7.11.4-10",
25
- "@pega/cosmos-react-dnd": "7.11.4-10",
26
- "@pega/cosmos-react-rte": "7.11.4-10",
27
- "@pega/cosmos-react-social": "7.11.4-10",
28
- "@pega/cosmos-react-work": "7.11.4-10",
23
+ "@pega/cosmos-react-condition-builder": "7.11.4-11",
24
+ "@pega/cosmos-react-core": "7.11.4-11",
25
+ "@pega/cosmos-react-dnd": "7.11.4-11",
26
+ "@pega/cosmos-react-rte": "7.11.4-11",
27
+ "@pega/cosmos-react-social": "7.11.4-11",
28
+ "@pega/cosmos-react-work": "7.11.4-11",
29
29
  "@storybook/addon-actions": "~8.2.9",
30
30
  "@storybook/react": "~8.2.9",
31
31
  "@types/dompurify": "^3.0.5",