@wayke-se/components-react 3.0.0-beta.4 → 3.0.0-beta.5

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/esbuild/lib.js CHANGED
@@ -9,6 +9,7 @@ const shared = {
9
9
  bundle: true,
10
10
  minify: false,
11
11
  sourcemap: true,
12
+ splitting: false,
12
13
  logLevel: 'info',
13
14
  external: Object.keys(dependencies).concat(Object.keys(peerDependencies || {})),
14
15
  loader: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wayke-se/components-react",
3
- "version": "3.0.0-beta.4",
3
+ "version": "3.0.0-beta.5",
4
4
  "description": "Wayke Components React",
5
5
  "module": "dist/index.mjs",
6
6
  "main": "dist/index.js",
@@ -53,7 +53,7 @@
53
53
  "react": "^18.2.0",
54
54
  "react-dom": "^18.2.0",
55
55
  "rimraf": "^3.0.2",
56
- "styled-components": "^5.3.3",
56
+ "styled-components": "^5.3.5",
57
57
  "typescript": "^4.4.4"
58
58
  },
59
59
  "dependencies": {
@@ -64,7 +64,6 @@
64
64
  "graphql": "^16.0.1",
65
65
  "libphonenumber-js": "^1.9.42",
66
66
  "marked": "^4.0.3",
67
- "pannellum-react": "^1.2.4",
68
67
  "react-compound-slider": "^3.3.1",
69
68
  "react-lazy-load": "^4.0.1",
70
69
  "react-slick": "^0.29.0",
@@ -22,7 +22,6 @@ import { ButtonSecondary, ButtonContent } from '../Button/index';
22
22
  import Lightbox from '../Lightbox/index';
23
23
  import EmbededVideo from '../Video/EmbededVideo';
24
24
  import QuickNavEmbeded from '../Video/QuickNavEmbeded';
25
- import Sphere from '../Sphere/Sphere';
26
25
  import { notEmpty } from '../../utils/formats';
27
26
  import ThreeSixty from '../ThreeSixty/ThreeSixty';
28
27
  import { Media } from '../../@types/codegen';
@@ -132,36 +131,30 @@ const Gallery = ({ media, placeholderImage }: GalleryProps) => {
132
131
  beforeChange={beforeChange}
133
132
  >
134
133
  {!!media?.length ? (
135
- media.map((m, i) => (
136
- <Item key={m.files[0].url || i}>
137
- {m.type === 'image' && (
138
- <Image
139
- src={
140
- m.files[0].formats.filter(notEmpty).find((x) => x.format === '1170x')?.url
141
- }
142
- alt={`Bild ${i + 1}`}
143
- />
144
- )}
145
- {m.type === 'threesixty' && (
146
- <ThreeSixty
147
- urls={m.files.map((x) => x.url)}
148
- visible={i === index}
149
- onDisableNavigation={onDisableNavigation}
150
- navigationDisabled={navigationDisabled}
151
- />
152
- )}
153
- {m.type === 'embedded' && <EmbededVideo src={m.files[0].url} index={i + 1} />}
154
- {m.type === 'sphere' && (
155
- <Sphere
156
- visible={i === index}
157
- url={m.files[0].url}
158
- preview={m.files[0].url}
159
- onDisableNavigation={onDisableNavigation}
160
- navigationDisabled={navigationDisabled}
161
- />
162
- )}
163
- </Item>
164
- ))
134
+ media
135
+ .filter((x) => x.type !== 'sphere')
136
+ .map((m, i) => (
137
+ <Item key={m.files[0].url || i}>
138
+ {m.type === 'image' && (
139
+ <Image
140
+ src={
141
+ m.files[0].formats.filter(notEmpty).find((x) => x.format === '1170x')
142
+ ?.url
143
+ }
144
+ alt={`Bild ${i + 1}`}
145
+ />
146
+ )}
147
+ {m.type === 'threesixty' && (
148
+ <ThreeSixty
149
+ urls={m.files.map((x) => x.url)}
150
+ visible={i === index}
151
+ onDisableNavigation={onDisableNavigation}
152
+ navigationDisabled={navigationDisabled}
153
+ />
154
+ )}
155
+ {m.type === 'embedded' && <EmbededVideo src={m.files[0].url} index={i + 1} />}
156
+ </Item>
157
+ ))
165
158
  ) : (
166
159
  <Item key={placeholder}>
167
160
  <Image src={placeholder} alt={`Bild 1`} />
@@ -3,7 +3,6 @@ import React from 'react';
3
3
  import { Wrapper, UiBlock, Item, Img, CloseBtn } from './wrapper';
4
4
  import { IconCancel } from '../Icon/index';
5
5
  import EmbeddedVideoLightbox from '../Video/EmbeddedVideoLightbox';
6
- import SphereLightbox from '../Sphere/SphereLightbox';
7
6
  import ThreeSixtyLightbox from '../ThreeSixty/ThreeSixtLightbox';
8
7
  import { Media } from '../../@types/codegen';
9
8
 
@@ -31,16 +30,17 @@ const Lightbox = ({ index, media, onClose }: LightboxProps) => {
31
30
  return (
32
31
  <Wrapper ref={(ref) => ref?.focus()} onKeyDown={onKeyDown} tabIndex={0}>
33
32
  <UiBlock onClick={onClose} aria-hidden />
34
- {media.map((m, i) => (
35
- <Item key={i} ref={index === i ? onRef : undefined}>
36
- {m.type === 'image' && (
37
- <Img id={`lightbox-image-${i}`} src={m.files[0].url} alt={`Bild ${i + 1}`} />
38
- )}
39
- {m.type === 'threesixty' && <ThreeSixtyLightbox urls={m.files.map((x) => x.url)} />}
40
- {m.type === 'sphere' && <SphereLightbox url={m.files[0].url} />}
41
- {m.type === 'embedded' && <EmbeddedVideoLightbox url={m.files[0].url} />}
42
- </Item>
43
- ))}
33
+ {media
34
+ .filter((x) => x.type !== 'sphere')
35
+ .map((m, i) => (
36
+ <Item key={i} ref={index === i ? onRef : undefined}>
37
+ {m.type === 'image' && (
38
+ <Img id={`lightbox-image-${i}`} src={m.files[0].url} alt={`Bild ${i + 1}`} />
39
+ )}
40
+ {m.type === 'threesixty' && <ThreeSixtyLightbox urls={m.files.map((x) => x.url)} />}
41
+ {m.type === 'embedded' && <EmbeddedVideoLightbox url={m.files[0].url} />}
42
+ </Item>
43
+ ))}
44
44
  <CloseBtn onClick={onClose} title="Stäng">
45
45
  <IconCancel block />
46
46
  </CloseBtn>