@controleonline/ui-customers 1.0.84 → 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,
|
|
@@ -488,10 +488,11 @@ const ClientDetails = ({ route, navigation }) => {
|
|
|
488
488
|
imageUrl={clientAvatarImageUrl}
|
|
489
489
|
name={String(client?.name || '').replace(/\s+/g, ' ').trim()}
|
|
490
490
|
size={64}
|
|
491
|
-
backgroundColor={
|
|
492
|
-
borderColor={
|
|
493
|
-
borderWidth={
|
|
494
|
-
textColor={
|
|
491
|
+
backgroundColor={detailsStyles.listAvatarBrand.backgroundColor}
|
|
492
|
+
borderColor={detailsStyles.listAvatarBrand.borderColor}
|
|
493
|
+
borderWidth={1}
|
|
494
|
+
textColor={detailsStyles.listAvatarText.color}
|
|
495
|
+
iconColor={detailsStyles.listAvatarText.color}
|
|
495
496
|
useGravatar={false}
|
|
496
497
|
usePeopleImage={false}
|
|
497
498
|
/>
|
|
@@ -10,6 +10,8 @@ const resolvePalette = themeColors => ({
|
|
|
10
10
|
cardBorder: themeColors.cardBorder,
|
|
11
11
|
cardText: themeColors.cardText,
|
|
12
12
|
cardIcon: themeColors.cardIcon,
|
|
13
|
+
cardIconBackground: themeColors.cardIconBackground || themeColors.cardBackground,
|
|
14
|
+
cardIconColor: themeColors.cardIconColor || themeColors.cardIcon || themeColors.listItemText,
|
|
13
15
|
cardShadow: themeColors.cardShadow,
|
|
14
16
|
listItemBackground: themeColors.listItemBackground,
|
|
15
17
|
listItemText: themeColors.listItemText,
|
|
@@ -324,12 +326,12 @@ export const createDetailsStyles = themeColors => {
|
|
|
324
326
|
},
|
|
325
327
|
|
|
326
328
|
listAvatarBrand: {
|
|
327
|
-
backgroundColor: palette.
|
|
328
|
-
borderColor: palette.
|
|
329
|
+
backgroundColor: palette.cardIconBackground,
|
|
330
|
+
borderColor: palette.cardBorder || palette.cardIconBackground,
|
|
329
331
|
},
|
|
330
332
|
|
|
331
333
|
listAvatarText: {
|
|
332
|
-
color: palette.
|
|
334
|
+
color: palette.cardIconColor,
|
|
333
335
|
},
|
|
334
336
|
|
|
335
337
|
locationButton: {
|