@terraware/web-components 4.2.16 → 4.2.17
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/components/PhotoChooser/index.d.ts +4 -0
- package/components/PhotoChooser/index.d.ts.map +1 -1
- package/components/PhotoChooser/index.js +73 -33
- package/components/VirtualWalkthrough/Annotation.d.ts +1 -1
- package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -1
- package/components/VirtualWalkthrough/Annotation.js +4 -4
- package/components/VirtualWalkthrough/AnnotationEditPane.d.ts +2 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.d.ts.map +1 -1
- package/components/VirtualWalkthrough/AnnotationEditPane.js +13 -2
- package/components/VirtualWalkthrough/AnnotationPanel.d.ts.map +1 -1
- package/components/VirtualWalkthrough/AnnotationPanel.js +3 -3
- package/package.json +1 -1
|
@@ -17,6 +17,10 @@ export type PhotoChooserProps = {
|
|
|
17
17
|
chooseFileText?: string;
|
|
18
18
|
replaceFileText?: string;
|
|
19
19
|
maxPhotos?: number;
|
|
20
|
+
existingPhotos?: string[];
|
|
21
|
+
onExistingPhotoRemoved?: (index: number) => void;
|
|
22
|
+
existingImagesLabel?: string;
|
|
23
|
+
newImagesLabel?: string;
|
|
20
24
|
};
|
|
21
25
|
export default function PhotoChooser(props: PhotoChooserProps): JSX.Element;
|
|
22
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PhotoChooser/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,GAAG,EAA+B,MAAM,OAAO,CAAC;AASrE,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE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AAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CA2L1E"}
|
|
@@ -19,7 +19,11 @@ export default function PhotoChooser(props) {
|
|
|
19
19
|
photoSelectedText,
|
|
20
20
|
chooseFileText,
|
|
21
21
|
replaceFileText,
|
|
22
|
-
maxPhotos
|
|
22
|
+
maxPhotos,
|
|
23
|
+
existingPhotos,
|
|
24
|
+
onExistingPhotoRemoved,
|
|
25
|
+
existingImagesLabel,
|
|
26
|
+
newImagesLabel
|
|
23
27
|
} = props;
|
|
24
28
|
const {
|
|
25
29
|
isMobile
|
|
@@ -45,6 +49,42 @@ export default function PhotoChooser(props) {
|
|
|
45
49
|
filesDataList.forEach(fileData => URL.revokeObjectURL(fileData));
|
|
46
50
|
};
|
|
47
51
|
}, [files]);
|
|
52
|
+
const renderThumbnail = ({
|
|
53
|
+
src,
|
|
54
|
+
alt,
|
|
55
|
+
onRemove,
|
|
56
|
+
id
|
|
57
|
+
}) => /*#__PURE__*/_jsxs(Box, {
|
|
58
|
+
position: "relative",
|
|
59
|
+
height: 122,
|
|
60
|
+
width: 122,
|
|
61
|
+
marginRight: isMobile ? theme.spacing(2) : theme.spacing(3),
|
|
62
|
+
marginTop: theme.spacing(1),
|
|
63
|
+
border: `1px solid ${theme.palette.TwClrBrdrTertiary}`,
|
|
64
|
+
children: [onRemove && /*#__PURE__*/_jsx(Button, {
|
|
65
|
+
icon: "iconTrashCan",
|
|
66
|
+
id: id,
|
|
67
|
+
onClick: onRemove,
|
|
68
|
+
size: "small",
|
|
69
|
+
style: {
|
|
70
|
+
position: 'absolute',
|
|
71
|
+
top: -10,
|
|
72
|
+
right: -10,
|
|
73
|
+
backgroundColor: theme.palette.TwClrBgDanger
|
|
74
|
+
}
|
|
75
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
76
|
+
height: "120px",
|
|
77
|
+
src: src,
|
|
78
|
+
alt: alt,
|
|
79
|
+
style: {
|
|
80
|
+
margin: 'auto auto',
|
|
81
|
+
objectFit: 'contain',
|
|
82
|
+
display: 'flex',
|
|
83
|
+
maxWidth: '120px',
|
|
84
|
+
maxHeight: '120px'
|
|
85
|
+
}
|
|
86
|
+
})]
|
|
87
|
+
}, id ?? src);
|
|
48
88
|
return /*#__PURE__*/_jsxs(Box, {
|
|
49
89
|
ref: divRef,
|
|
50
90
|
tabIndex: 0,
|
|
@@ -76,41 +116,41 @@ export default function PhotoChooser(props) {
|
|
|
76
116
|
width: 'auto'
|
|
77
117
|
}
|
|
78
118
|
}
|
|
79
|
-
}),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
119
|
+
}), existingPhotos && existingPhotos.length > 0 && /*#__PURE__*/_jsxs(Box, {
|
|
120
|
+
marginBottom: theme.spacing(2),
|
|
121
|
+
children: [existingImagesLabel && /*#__PURE__*/_jsx(Typography, {
|
|
122
|
+
fontSize: 14,
|
|
123
|
+
fontWeight: 400,
|
|
124
|
+
marginBottom: theme.spacing(1),
|
|
125
|
+
children: existingImagesLabel
|
|
126
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
127
|
+
display: "flex",
|
|
128
|
+
flexDirection: "row",
|
|
129
|
+
flexWrap: "wrap",
|
|
130
|
+
children: existingPhotos.map((url, index) => renderThumbnail({
|
|
131
|
+
src: url,
|
|
132
|
+
alt: url,
|
|
133
|
+
id: `existing-photo-remove-${index}`,
|
|
134
|
+
onRemove: onExistingPhotoRemoved ? () => onExistingPhotoRemoved(index) : undefined
|
|
135
|
+
}))
|
|
136
|
+
})]
|
|
137
|
+
}), filesData.length > 0 && multipleSelection && /*#__PURE__*/_jsxs(Box, {
|
|
83
138
|
marginBottom: theme.spacing(2),
|
|
84
|
-
children:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
size: "small",
|
|
95
|
-
style: {
|
|
96
|
-
position: 'absolute',
|
|
97
|
-
top: -10,
|
|
98
|
-
right: -10,
|
|
99
|
-
backgroundColor: theme.palette.TwClrBgDanger
|
|
100
|
-
}
|
|
101
|
-
}), /*#__PURE__*/_jsx("img", {
|
|
102
|
-
height: "120px",
|
|
139
|
+
children: [newImagesLabel && /*#__PURE__*/_jsx(Typography, {
|
|
140
|
+
fontSize: 14,
|
|
141
|
+
fontWeight: 400,
|
|
142
|
+
marginBottom: theme.spacing(1),
|
|
143
|
+
children: newImagesLabel
|
|
144
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
145
|
+
display: "flex",
|
|
146
|
+
flexDirection: "row",
|
|
147
|
+
flexWrap: "wrap",
|
|
148
|
+
children: filesData.map((fileData, index) => renderThumbnail({
|
|
103
149
|
src: fileData,
|
|
104
150
|
alt: files[index]?.name,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
display: 'flex',
|
|
109
|
-
maxWidth: '120px',
|
|
110
|
-
maxHeight: '120px'
|
|
111
|
-
}
|
|
112
|
-
})]
|
|
113
|
-
}, index))
|
|
151
|
+
onRemove: () => removeFileAtIndex(index)
|
|
152
|
+
}))
|
|
153
|
+
})]
|
|
114
154
|
})]
|
|
115
155
|
}), /*#__PURE__*/_jsx(FileChooser, {
|
|
116
156
|
acceptFileType: "image/jpeg,image/png",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/Annotation.tsx"],"names":[],"mappings":"AAUA,OAAO,yBAAyB,CAA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E,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,4CAiL7D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -36,7 +36,7 @@ const Annotation = props => {
|
|
|
36
36
|
position,
|
|
37
37
|
cameraPosition,
|
|
38
38
|
bodyText,
|
|
39
|
-
|
|
39
|
+
imageUrls,
|
|
40
40
|
icon,
|
|
41
41
|
title,
|
|
42
42
|
label,
|
|
@@ -69,7 +69,7 @@ const Annotation = props => {
|
|
|
69
69
|
title,
|
|
70
70
|
label,
|
|
71
71
|
bodyText,
|
|
72
|
-
|
|
72
|
+
imageUrls,
|
|
73
73
|
cameraPosition
|
|
74
74
|
});
|
|
75
75
|
useEffect(() => {
|
|
@@ -84,10 +84,10 @@ const Annotation = props => {
|
|
|
84
84
|
title,
|
|
85
85
|
label,
|
|
86
86
|
bodyText,
|
|
87
|
-
|
|
87
|
+
imageUrls,
|
|
88
88
|
cameraPosition
|
|
89
89
|
};
|
|
90
|
-
}, [isEdit, onSelect, onView, onScreenPositionUpdate, position, cameraPosition, title, label, bodyText,
|
|
90
|
+
}, [isEdit, onSelect, onView, onScreenPositionUpdate, position, cameraPosition, title, label, bodyText, imageUrls]);
|
|
91
91
|
|
|
92
92
|
// Create a stable callback that reads from refs, because this is read from TfAnnotationManager when the annotation is added to the scene
|
|
93
93
|
const handleClick = useCallback((screenX, screenY) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationEditPane.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/AnnotationEditPane.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AnnotationEditPane.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/AnnotationEditPane.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0GAA0G;IAC1G,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CAC1C;AAED,QAAA,MAAM,kBAAkB,GAAI,0FAQzB,uBAAuB,mDA4LzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -14,6 +14,7 @@ const AnnotationEditPane = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const theme = useTheme();
|
|
16
16
|
const showImageUpload = !!onImagesChange && !!maxImages && maxImages > 0;
|
|
17
|
+
const remainingImageSlots = Math.max(0, (maxImages ?? 0) - (annotation?.imageUrls?.length ?? 0));
|
|
17
18
|
|
|
18
19
|
// Recolor PhotoChooser's Terraware tokens to match the dark edit pane instead of its default light card.
|
|
19
20
|
const photoChooserTheme = useMemo(() => ({
|
|
@@ -52,6 +53,12 @@ const AnnotationEditPane = ({
|
|
|
52
53
|
label: value
|
|
53
54
|
});
|
|
54
55
|
}, [onUpdate]);
|
|
56
|
+
const handleRemoveExistingImage = useCallback(index => {
|
|
57
|
+
const remaining = (annotation?.imageUrls ?? []).filter((_, i) => i !== index);
|
|
58
|
+
onUpdate({
|
|
59
|
+
imageUrls: remaining
|
|
60
|
+
});
|
|
61
|
+
}, [annotation, onUpdate]);
|
|
55
62
|
const handleFocus = useCallback(() => {
|
|
56
63
|
onTextFieldFocus?.(true);
|
|
57
64
|
}, [onTextFieldFocus]);
|
|
@@ -162,8 +169,12 @@ const AnnotationEditPane = ({
|
|
|
162
169
|
replaceFileText: strings.images?.replaceFileText,
|
|
163
170
|
photoSelectedText: strings.images?.photoSelectedText,
|
|
164
171
|
multipleSelection: (maxImages ?? 0) > 1,
|
|
165
|
-
maxPhotos:
|
|
166
|
-
onPhotosChanged: files => onImagesChange?.(files)
|
|
172
|
+
maxPhotos: remainingImageSlots,
|
|
173
|
+
onPhotosChanged: files => onImagesChange?.(files),
|
|
174
|
+
existingPhotos: annotation.imageUrls,
|
|
175
|
+
onExistingPhotoRemoved: handleRemoveExistingImage,
|
|
176
|
+
existingImagesLabel: strings.images?.existingImagesLabel,
|
|
177
|
+
newImagesLabel: strings.images?.newImagesLabel
|
|
167
178
|
})
|
|
168
179
|
})]
|
|
169
180
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/AnnotationPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,UAAU,oBAAoB;IAC5B,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IAInC,eAAe,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAuDD,QAAA,MAAM,eAAe,GAAI,0CAA0C,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AnnotationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/AnnotationPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,UAAU,oBAAoB;IAC5B,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IAInC,eAAe,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAuDD,QAAA,MAAM,eAAe,GAAI,0CAA0C,oBAAoB,mDAsItF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -108,7 +108,7 @@ const AnnotationPanel = ({
|
|
|
108
108
|
}
|
|
109
109
|
const panelStyle = {
|
|
110
110
|
...PANEL_STYLE,
|
|
111
|
-
...(annotation.
|
|
111
|
+
...(annotation.imageUrls?.[0] ? {
|
|
112
112
|
width: 'fit-content',
|
|
113
113
|
maxWidth: '60vw'
|
|
114
114
|
} : {
|
|
@@ -150,8 +150,8 @@ const AnnotationPanel = ({
|
|
|
150
150
|
ref: panelRef,
|
|
151
151
|
"data-testid": "annotation-panel",
|
|
152
152
|
style: panelStyle,
|
|
153
|
-
children: [annotation.
|
|
154
|
-
src: annotation.
|
|
153
|
+
children: [annotation.imageUrls?.[0] && /*#__PURE__*/_jsx("img", {
|
|
154
|
+
src: annotation.imageUrls[0],
|
|
155
155
|
alt: annotation.title,
|
|
156
156
|
style: IMAGE_STYLE
|
|
157
157
|
}), /*#__PURE__*/_jsxs("div", {
|