@controleonline/ui-customers 1.0.85 → 1.0.86
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/package.json
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
} from 'react-native';
|
|
8
8
|
import { useStore } from '@store';
|
|
9
9
|
import DefaultUpload from '@controleonline/ui-default/src/react/components/upload/DefaultUpload';
|
|
10
|
-
import DefaultFile from '@controleonline/ui-default/src/react/components/files/DefaultFile';
|
|
11
10
|
import { extractFileId } from '@controleonline/ui-default/src/react/components/upload/fileUpload';
|
|
12
11
|
import { useMessage } from '@controleonline/ui-common/src/react/components/MessageService';
|
|
13
12
|
import { resolveThemePalette, withOpacity } from '@controleonline/../../src/styles/branding';
|
|
@@ -215,46 +214,6 @@ const MediaTab = ({ client, onChanged = null }) => {
|
|
|
215
214
|
},
|
|
216
215
|
]}
|
|
217
216
|
>
|
|
218
|
-
<View
|
|
219
|
-
style={[
|
|
220
|
-
styles.mediaPreviewFrame,
|
|
221
|
-
styles.mediaPreviewTransparencyGrid,
|
|
222
|
-
{
|
|
223
|
-
borderColor: withOpacity(palette.primary || '#2563EB', 0.14),
|
|
224
|
-
},
|
|
225
|
-
]}>
|
|
226
|
-
{(() => {
|
|
227
|
-
const rawFile = currentMedia?.file;
|
|
228
|
-
const fileId = extractFileId(rawFile);
|
|
229
|
-
const file =
|
|
230
|
-
rawFile && typeof rawFile === 'object' && !Array.isArray(rawFile)
|
|
231
|
-
? rawFile
|
|
232
|
-
: fileId
|
|
233
|
-
? {id: fileId, '@id': `/files/${fileId}`}
|
|
234
|
-
: null;
|
|
235
|
-
if (!file) {
|
|
236
|
-
return (
|
|
237
|
-
<View style={styles.mediaEmptyState}>
|
|
238
|
-
<Text
|
|
239
|
-
style={[
|
|
240
|
-
styles.mediaEmptyText,
|
|
241
|
-
{color: palette.textSecondary || '#64748B'},
|
|
242
|
-
]}>
|
|
243
|
-
Sem imagem
|
|
244
|
-
</Text>
|
|
245
|
-
</View>
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
return (
|
|
249
|
-
<DefaultFile
|
|
250
|
-
file={file}
|
|
251
|
-
company={client}
|
|
252
|
-
resizeMode="cover"
|
|
253
|
-
style={styles.mediaPreviewImage}
|
|
254
|
-
/>
|
|
255
|
-
);
|
|
256
|
-
})()}
|
|
257
|
-
</View>
|
|
258
217
|
<DefaultUpload
|
|
259
218
|
relationStoreName="people"
|
|
260
219
|
relationField="people"
|
|
@@ -360,38 +319,6 @@ const styles = StyleSheet.create({
|
|
|
360
319
|
fontSize: 12,
|
|
361
320
|
fontWeight: '700',
|
|
362
321
|
},
|
|
363
|
-
// app-community#813: preview 320x320
|
|
364
|
-
mediaPreviewFrame: {
|
|
365
|
-
width: 320,
|
|
366
|
-
height: 320,
|
|
367
|
-
maxWidth: 320,
|
|
368
|
-
alignSelf: 'center',
|
|
369
|
-
borderRadius: 14,
|
|
370
|
-
borderWidth: 1,
|
|
371
|
-
overflow: 'hidden',
|
|
372
|
-
alignItems: 'center',
|
|
373
|
-
justifyContent: 'center',
|
|
374
|
-
},
|
|
375
|
-
mediaPreviewTransparencyGrid: {
|
|
376
|
-
// RN StyleSheet (web) rejects multi-value backgroundPosition / CSS backgroundImage gradients.
|
|
377
|
-
// Keep solid preview background; checkerboard was cosmetic only.
|
|
378
|
-
backgroundColor: '#F8FAFC',
|
|
379
|
-
},
|
|
380
|
-
mediaPreviewImage: {
|
|
381
|
-
width: 320,
|
|
382
|
-
height: 320,
|
|
383
|
-
},
|
|
384
|
-
mediaEmptyState: {
|
|
385
|
-
width: 320,
|
|
386
|
-
height: 320,
|
|
387
|
-
alignItems: 'center',
|
|
388
|
-
justifyContent: 'center',
|
|
389
|
-
gap: 8,
|
|
390
|
-
},
|
|
391
|
-
mediaEmptyText: {
|
|
392
|
-
fontSize: 13,
|
|
393
|
-
fontWeight: '500',
|
|
394
|
-
},
|
|
395
322
|
mediaHelpText: {
|
|
396
323
|
fontSize: 12,
|
|
397
324
|
lineHeight: 18,
|