@oxyhq/services 22.6.2 → 22.6.3

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.
Files changed (38) hide show
  1. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +99 -77
  2. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  3. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +33 -40
  4. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  5. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +92 -88
  6. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  7. package/lib/commonjs/ui/screens/FileManagementScreen.js +169 -310
  8. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  9. package/lib/module/ui/components/fileManagement/FileViewer.js +100 -78
  10. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  11. package/lib/module/ui/components/fileManagement/UploadPreview.js +34 -41
  12. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  13. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +94 -90
  14. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  15. package/lib/module/ui/screens/FileManagementScreen.js +171 -313
  16. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  17. package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  18. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  19. package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  20. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  21. package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  22. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  23. package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  24. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/ui/components/fileManagement/FileViewer.tsx +82 -68
  27. package/src/ui/components/fileManagement/UploadPreview.tsx +34 -29
  28. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +14 -12
  29. package/src/ui/screens/FileManagementScreen.tsx +123 -300
  30. package/lib/commonjs/ui/components/fileManagement/styles.js +0 -832
  31. package/lib/commonjs/ui/components/fileManagement/styles.js.map +0 -1
  32. package/lib/module/ui/components/fileManagement/styles.js +0 -828
  33. package/lib/module/ui/components/fileManagement/styles.js.map +0 -1
  34. package/lib/typescript/commonjs/ui/components/fileManagement/styles.d.ts +0 -825
  35. package/lib/typescript/commonjs/ui/components/fileManagement/styles.d.ts.map +0 -1
  36. package/lib/typescript/module/ui/components/fileManagement/styles.d.ts +0 -825
  37. package/lib/typescript/module/ui/components/fileManagement/styles.d.ts.map +0 -1
  38. package/src/ui/components/fileManagement/styles.ts +0 -823
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import React, { useEffect, useMemo, useState, useCallback } from 'react';
4
- import { View, Text } from 'react-native';
5
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
4
+ import { View, Text, useWindowDimensions } from 'react-native';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  /**
7
7
  * Responsive justified photo grid that stretches to the provided containerWidth.
8
8
  * Uses flex rows with proportional children widths instead of absolute pixel widths so it always fills.
@@ -20,15 +20,21 @@ const JustifiedPhotoGrid = ({
20
20
  maxRowHeight = 300,
21
21
  dateFormatLocale = 'en-US'
22
22
  }) => {
23
- // Responsive width measurement if not explicitly provided
23
+ // Responsive width measurement if not explicitly provided. Never gate the
24
+ // whole grid on measurement — onLayout is unreliable on web (same class of
25
+ // bug fixed in PhotoPickerSection). Fall back to window width until measured.
26
+ const {
27
+ width: windowWidth
28
+ } = useWindowDimensions();
24
29
  const [measuredWidth, setMeasuredWidth] = useState(null);
25
- const effectiveWidth = explicitWidth ?? measuredWidth ?? 0; // 0 until measured
26
-
30
+ const resolvedExplicitWidth = explicitWidth != null && explicitWidth > 0 ? explicitWidth : null;
31
+ const resolvedMeasuredWidth = measuredWidth != null && measuredWidth > 0 ? measuredWidth : null;
32
+ const effectiveWidth = resolvedExplicitWidth ?? resolvedMeasuredWidth ?? windowWidth;
27
33
  const onLayoutContainer = useCallback(e => {
28
- if (explicitWidth) return; // ignore if controlled
34
+ if (resolvedExplicitWidth != null) return; // ignore if controlled
29
35
  const w = e.nativeEvent.layout.width;
30
36
  setMeasuredWidth(prev => prev === w ? prev : w);
31
- }, [explicitWidth]);
37
+ }, [resolvedExplicitWidth]);
32
38
  // Ensure dimensions are loaded for displayed photos
33
39
  useEffect(() => {
34
40
  loadPhotoDimensions(photos);
@@ -59,94 +65,92 @@ const JustifiedPhotoGrid = ({
59
65
  width: '100%'
60
66
  },
61
67
  onLayout: onLayoutContainer,
62
- children: effectiveWidth === 0 && !explicitWidth ? null : /*#__PURE__*/_jsx(_Fragment, {
63
- children: sortedDates.map(date => {
64
- const dayPhotos = photosByDate[date];
65
- // createJustifiedRows should build rows such that the "ideal" height (availableWidth / totalAspect) stays within min/max.
66
- // We pass the effective container width.
67
- const dateWidth = dateWidths[date] ?? effectiveWidth; // fallback to overall width until measured
68
- const rows = dateWidth > 0 ? createJustifiedRows(dayPhotos, dateWidth) : [];
69
- return /*#__PURE__*/_jsxs(View, {
68
+ children: sortedDates.map(date => {
69
+ const dayPhotos = photosByDate[date];
70
+ // createJustifiedRows should build rows such that the "ideal" height (availableWidth / totalAspect) stays within min/max.
71
+ // We pass the effective container width.
72
+ const dateWidth = dateWidths[date] ?? effectiveWidth; // fallback to overall width until measured
73
+ const rows = dateWidth > 0 ? createJustifiedRows(dayPhotos, dateWidth) : [];
74
+ return /*#__PURE__*/_jsxs(View, {
75
+ style: {
76
+ marginBottom: 24,
77
+ width: '100%'
78
+ },
79
+ onLayout: e => onLayoutDate(date, e.nativeEvent.layout.width),
80
+ children: [/*#__PURE__*/_jsx(Text, {
81
+ style: {
82
+ fontSize: 14,
83
+ fontWeight: '600',
84
+ marginBottom: 12,
85
+ color: textColor
86
+ },
87
+ children: new Date(date).toLocaleDateString(dateFormatLocale, {
88
+ weekday: 'long',
89
+ year: 'numeric',
90
+ month: 'long',
91
+ day: 'numeric'
92
+ })
93
+ }), /*#__PURE__*/_jsx(View, {
70
94
  style: {
71
- marginBottom: 24,
72
95
  width: '100%'
73
96
  },
74
- onLayout: e => onLayoutDate(date, e.nativeEvent.layout.width),
75
- children: [/*#__PURE__*/_jsx(Text, {
76
- style: {
77
- fontSize: 14,
78
- fontWeight: '600',
79
- marginBottom: 12,
80
- color: textColor
81
- },
82
- children: new Date(date).toLocaleDateString(dateFormatLocale, {
83
- weekday: 'long',
84
- year: 'numeric',
85
- month: 'long',
86
- day: 'numeric'
87
- })
88
- }), /*#__PURE__*/_jsx(View, {
89
- style: {
90
- width: '100%'
91
- },
92
- children: rows.map((row, rowIndex) => {
93
- // Compute total aspect ratios using loaded dimensions (fallback 4/3)
94
- const aspects = row.map(p => {
95
- const dims = photoDimensions[p.id];
96
- return dims ? dims.width / dims.height : 4 / 3;
97
- });
98
- const totalAspect = aspects.reduce((a, b) => a + b, 0);
99
- const gapsTotal = gap * (row.length - 1);
100
- const availableWidth = dateWidth - gapsTotal;
101
- // Ideal height that perfectly fills width when preserving aspect ratios
102
- const idealHeight = availableWidth / totalAspect;
103
- // We rely on row construction keeping idealHeight within min/max bounds; if not, clamp but then distribute leftover/overflow.
104
- let rowHeight = idealHeight;
105
- let widthAdjustment = 0; // difference to distribute if clamped
106
- if (idealHeight < minRowHeight) {
107
- rowHeight = minRowHeight;
108
- widthAdjustment = availableWidth - rowHeight * totalAspect; // negative means overflow
109
- } else if (idealHeight > maxRowHeight) {
110
- rowHeight = maxRowHeight;
111
- widthAdjustment = availableWidth - rowHeight * totalAspect;
112
- }
97
+ children: rows.map((row, rowIndex) => {
98
+ // Compute total aspect ratios using loaded dimensions (fallback 4/3)
99
+ const aspects = row.map(p => {
100
+ const dims = photoDimensions[p.id];
101
+ return dims ? dims.width / dims.height : 4 / 3;
102
+ });
103
+ const totalAspect = aspects.reduce((a, b) => a + b, 0);
104
+ const gapsTotal = gap * (row.length - 1);
105
+ const availableWidth = dateWidth - gapsTotal;
106
+ // Ideal height that perfectly fills width when preserving aspect ratios
107
+ const idealHeight = availableWidth / totalAspect;
108
+ // We rely on row construction keeping idealHeight within min/max bounds; if not, clamp but then distribute leftover/overflow.
109
+ let rowHeight = idealHeight;
110
+ let widthAdjustment = 0; // difference to distribute if clamped
111
+ if (idealHeight < minRowHeight) {
112
+ rowHeight = minRowHeight;
113
+ widthAdjustment = availableWidth - rowHeight * totalAspect; // negative means overflow
114
+ } else if (idealHeight > maxRowHeight) {
115
+ rowHeight = maxRowHeight;
116
+ widthAdjustment = availableWidth - rowHeight * totalAspect;
117
+ }
113
118
 
114
- // Pre-compute widths maintaining aspect ratios
115
- let widths = aspects.map(ar => ar * rowHeight);
116
- // If we have widthAdjustment (due to clamping) distribute proportionally so row still fills exactly
117
- if (widthAdjustment !== 0) {
118
- const widthSum = widths.reduce((a, b) => a + b, 0);
119
- widths = widths.map(w => w + w / widthSum * widthAdjustment);
120
- }
119
+ // Pre-compute widths maintaining aspect ratios
120
+ let widths = aspects.map(ar => ar * rowHeight);
121
+ // If we have widthAdjustment (due to clamping) distribute proportionally so row still fills exactly
122
+ if (widthAdjustment !== 0) {
123
+ const widthSum = widths.reduce((a, b) => a + b, 0);
124
+ widths = widths.map(w => w + w / widthSum * widthAdjustment);
125
+ }
121
126
 
122
- // To combat rounding issues, adjust last item width to fill precisely
123
- const widthSumRounded = widths.reduce((a, b) => a + b, 0);
124
- const roundingDiff = availableWidth - widthSumRounded;
125
- if (Math.abs(roundingDiff) > 0.5) {
126
- widths[widths.length - 1] += roundingDiff; // minimal correction
127
- }
128
- return /*#__PURE__*/_jsx(View, {
129
- style: {
130
- flexDirection: 'row',
131
- width: '100%',
132
- marginBottom: 4
133
- },
134
- children: row.map((p, i) => {
135
- const photoWidth = widths[i];
136
- return /*#__PURE__*/_jsx(View, {
137
- style: {
138
- width: photoWidth,
139
- height: rowHeight,
140
- marginRight: i === row.length - 1 ? 0 : gap
141
- },
142
- children: renderJustifiedPhotoItem(p, photoWidth, rowHeight, i === row.length - 1)
143
- }, p.id);
144
- })
145
- }, rowIndex);
146
- })
147
- })]
148
- }, date);
149
- })
127
+ // To combat rounding issues, adjust last item width to fill precisely
128
+ const widthSumRounded = widths.reduce((a, b) => a + b, 0);
129
+ const roundingDiff = availableWidth - widthSumRounded;
130
+ if (Math.abs(roundingDiff) > 0.5) {
131
+ widths[widths.length - 1] += roundingDiff; // minimal correction
132
+ }
133
+ return /*#__PURE__*/_jsx(View, {
134
+ style: {
135
+ flexDirection: 'row',
136
+ width: '100%',
137
+ marginBottom: 4
138
+ },
139
+ children: row.map((p, i) => {
140
+ const photoWidth = widths[i];
141
+ return /*#__PURE__*/_jsx(View, {
142
+ style: {
143
+ width: photoWidth,
144
+ height: rowHeight,
145
+ marginRight: i === row.length - 1 ? 0 : gap
146
+ },
147
+ children: renderJustifiedPhotoItem(p, photoWidth, rowHeight, i === row.length - 1)
148
+ }, p.id);
149
+ })
150
+ }, rowIndex);
151
+ })
152
+ })]
153
+ }, date);
150
154
  })
151
155
  });
152
156
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useMemo","useState","useCallback","View","Text","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","JustifiedPhotoGrid","photos","photoDimensions","loadPhotoDimensions","createJustifiedRows","renderJustifiedPhotoItem","textColor","containerWidth","explicitWidth","gap","minRowHeight","maxRowHeight","dateFormatLocale","measuredWidth","setMeasuredWidth","effectiveWidth","onLayoutContainer","e","w","nativeEvent","layout","width","prev","map","p","id","join","photosByDate","reduce","groups","photo","date","Date","uploadDate","toDateString","push","sortedDates","Object","keys","sort","a","b","getTime","dateWidths","setDateWidths","onLayoutDate","style","onLayout","children","dayPhotos","dateWidth","rows","marginBottom","fontSize","fontWeight","color","toLocaleDateString","weekday","year","month","day","row","rowIndex","aspects","dims","height","totalAspect","gapsTotal","length","availableWidth","idealHeight","rowHeight","widthAdjustment","widths","ar","widthSum","widthSumRounded","roundingDiff","Math","abs","flexDirection","i","photoWidth","marginRight","memo"],"sourceRoot":"../../../../../src","sources":["ui/components/photogrid/JustifiedPhotoGrid.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACxE,SAASC,IAAI,EAAEC,IAAI,QAAgC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAqBlE;AACA;AACA;AACA;AACA,MAAMC,kBAAqD,GAAGA,CAAC;EAC3DC,MAAM;EACNC,eAAe;EACfC,mBAAmB;EACnBC,mBAAmB;EACnBC,wBAAwB;EACxBC,SAAS;EACTC,cAAc,EAAEC,aAAa;EAC7BC,GAAG,GAAG,CAAC;EACPC,YAAY,GAAG,GAAG;EAClBC,YAAY,GAAG,GAAG;EAClBC,gBAAgB,GAAG;AACvB,CAAC,KAAK;EACF;EACA,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGxB,QAAQ,CAAgB,IAAI,CAAC;EACvE,MAAMyB,cAAc,GAAGP,aAAa,IAAIK,aAAa,IAAI,CAAC,CAAC,CAAC;;EAE5D,MAAMG,iBAAiB,GAAGzB,WAAW,CAAE0B,CAAoB,IAAK;IAC5D,IAAIT,aAAa,EAAE,OAAO,CAAC;IAC3B,MAAMU,CAAC,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM,CAACC,KAAK;IACpCP,gBAAgB,CAACQ,IAAI,IAAKA,IAAI,KAAKJ,CAAC,GAAGI,IAAI,GAAGJ,C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C,GAHpE5C,CAAC,CAACC,EAIL,CAAC;gBAEf,CAAC;cAAC,GAXKqC,QAYL,CAAC;YAEf,CAAC;UAAC,CACA,CAAC;QAAA,GA7DF/B,IA8DH,CAAC;MAEf,CAAC;IAAC,CACJ;EACL,CACC,CAAC;AAEf,CAAC;AAED,4BAAe5C,KAAK,CAACiG,IAAI,CAACpF,kBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useMemo","useState","useCallback","View","Text","useWindowDimensions","jsx","_jsx","jsxs","_jsxs","JustifiedPhotoGrid","photos","photoDimensions","loadPhotoDimensions","createJustifiedRows","renderJustifiedPhotoItem","textColor","containerWidth","explicitWidth","gap","minRowHeight","maxRowHeight","dateFormatLocale","width","windowWidth","measuredWidth","setMeasuredWidth","resolvedExplicitWidth","resolvedMeasuredWidth","effectiveWidth","onLayoutContainer","e","w","nativeEvent","layout","prev","map","p","id","join","photosByDate","reduce","groups","photo","date","Date","uploadDate","toDateString","push","sortedDates","Object","keys","sort","a","b","getTime","dateWidths","setDateWidths","onLayoutDate","style","onLayout","children","dayPhotos","dateWidth","rows","marginBottom","fontSize","fontWeight","color","toLocaleDateString","weekday","year","month","day","row","rowIndex","aspects","dims","height","totalAspect","gapsTotal","length","availableWidth","idealHeight","rowHeight","widthAdjustment","widths","ar","widthSum","widthSumRounded","roundingDiff","Math","abs","flexDirection","i","photoWidth","marginRight","memo"],"sourceRoot":"../../../../../src","sources":["ui/components/photogrid/JustifiedPhotoGrid.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACxE,SAASC,IAAI,EAAEC,IAAI,EAAEC,mBAAmB,QAAgC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAqBvF;AACA;AACA;AACA;AACA,MAAMC,kBAAqD,GAAGA,CAAC;EAC3DC,MAAM;EACNC,eAAe;EACfC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