@onekeyfe/react-native-native-list 6.7.0-alpha.354 → 6.7.0-alpha.362
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/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +0 -7
- package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +7 -240
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +4 -7
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +3 -6
- package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +0 -12
- package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +7 -87
- package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +1 -135
- package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +14 -43
- package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +0 -25
- package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +2 -17
- package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +0 -22
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +0 -2
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +0 -2
- package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +2 -3
- package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +0 -69
- package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +1 -55
- package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +21 -585
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +0 -1
- package/docs/ROW_TEMPLATES.md +9 -60
- package/docs/SPEC.md +5 -317
- package/docs/STYLE_SPEC.md +0 -6
- package/ios/HybridNativeList.swift +0 -10
- package/ios/NativeListAccessoryStack.swift +37 -220
- package/ios/NativeListActivityDetailsView.swift +8 -18
- package/ios/NativeListActivityRenderer.swift +2 -8
- package/ios/NativeListDataRowRenderer.swift +8 -105
- package/ios/NativeListDesignAssets.swift +0 -3
- package/ios/NativeListIdentityRenderer.swift +4 -119
- package/ios/NativeListLeadingVisual.swift +14 -49
- package/ios/NativeListMessageRenderer.swift +1 -34
- package/ios/NativeListModels.swift +2 -16
- package/ios/NativeListRendererRegistry.swift +0 -1
- package/ios/NativeListResolvedText.swift +1 -2
- package/ios/NativeListRowHost.swift +0 -14
- package/ios/NativeListSectionHeaderRenderer.swift +0 -88
- package/ios/RNCNativeListView.swift +29 -331
- package/ios/tests/NativeListActivityPresentationTests.swift +0 -56
- package/ios/tests/NativeListLifecycleTests.swift +3 -890
- package/lib/module/NativeList.js +21 -39
- package/lib/module/NativeList.web.js +4 -51
- package/lib/module/models.js +0 -1
- package/lib/module/selection.js +1 -1
- package/lib/module/validation.js +8 -320
- package/lib/module/web/NativeListWebEngine.js +18 -373
- package/lib/module/web/templates/ActivityRowRenderer.js +7 -8
- package/lib/module/web/templates/DataRowRenderer.js +5 -40
- package/lib/module/web/templates/IdentityRowRenderer.js +4 -90
- package/lib/module/web/templates/MessageRowRenderer.js +2 -18
- package/lib/module/web/templates/RowContainerStyle.js +0 -1
- package/lib/module/web/templates/RowRendererRegistry.js +0 -3
- package/lib/module/web/templates/SectionHeaderRowRenderer.js +2 -36
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +0 -9
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +0 -2
- package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +0 -5
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +0 -6
- package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +0 -7
- package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +0 -6
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +0 -1
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +0 -11
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +0 -2
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +0 -2
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +0 -2
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +0 -3
- package/lib/nitrogen/generated/shared/json/NativeListConfig.json +0 -1
- package/lib/typescript/src/NativeList.nitro.d.ts +0 -1
- package/lib/typescript/src/NativeList.types.d.ts +0 -8
- package/lib/typescript/src/models.d.ts +9 -101
- package/lib/typescript/src/validation.d.ts +0 -10
- package/lib/typescript/src/web/NativeListWebEngine.d.ts +0 -26
- package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +1 -1
- package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +3 -9
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +0 -9
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +0 -2
- package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +0 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +0 -6
- package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +0 -7
- package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +0 -6
- package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +0 -1
- package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +0 -11
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +0 -2
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +0 -2
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +0 -2
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +0 -3
- package/nitrogen/generated/shared/json/NativeListConfig.json +0 -1
- package/package.json +3 -3
- package/react-native-native-list.podspec +0 -1
- package/src/NativeList.nitro.ts +0 -1
- package/src/NativeList.tsx +24 -72
- package/src/NativeList.types.ts +0 -9
- package/src/NativeList.web.tsx +8 -72
- package/src/models.ts +3 -113
- package/src/selection.ts +0 -1
- package/src/validation.ts +6 -721
- package/src/web/NativeListWebEngine.ts +19 -568
- package/src/web/templates/ActivityRowRenderer.ts +6 -14
- package/src/web/templates/DataRowRenderer.ts +20 -93
- package/src/web/templates/IdentityRowRenderer.ts +5 -150
- package/src/web/templates/MessageRowRenderer.ts +7 -23
- package/src/web/templates/RowContainerStyle.ts +0 -2
- package/src/web/templates/RowRendererRegistry.ts +1 -11
- package/src/web/templates/SectionHeaderRowRenderer.ts +4 -47
- package/android/src/main/java/com/onekey/nativelist/NativeListButtonGroupRenderer.kt +0 -102
- package/ios/NativeListButtonGroupRenderer.swift +0 -89
- package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/icon.svg +0 -4
- package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/icon.svg +0 -3
- package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/icon.svg +0 -3
- package/lib/module/web/templates/ButtonGroupRowRenderer.js +0 -47
- package/lib/typescript/src/web/templates/ButtonGroupRowRenderer.d.ts +0 -14
- package/src/web/templates/ButtonGroupRowRenderer.ts +0 -58
package/lib/module/NativeList.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Platform, View } from 'react-native';
|
|
|
8
8
|
import { callback, getHostComponent } from 'react-native-nitro-modules';
|
|
9
9
|
import { isSelectableRow } from "./selection.js";
|
|
10
10
|
import { normalizeIndexScroll, normalizeKeyScroll, normalizePositionScroll, resolveLocationIndex, scrollFailure, validateOffset } from "./scrolling.js";
|
|
11
|
-
import {
|
|
11
|
+
import { applyRowPatches, containNativeListInput, emptyNativeListSnapshot, serializePatches, validatePatches, validateSnapshot } from "./validation.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const NativeListConfig = require('../nitrogen/generated/shared/json/NativeListConfig.json');
|
|
14
14
|
const NativeListHost = getHostComponent('NativeList', () => NativeListConfig);
|
|
@@ -31,8 +31,6 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
31
31
|
listHeader,
|
|
32
32
|
listFooter,
|
|
33
33
|
listEmpty,
|
|
34
|
-
listSidecar,
|
|
35
|
-
sidecarLayout,
|
|
36
34
|
topOverlay,
|
|
37
35
|
topScrollEdgeEffect,
|
|
38
36
|
scrollPositionThresholds,
|
|
@@ -59,36 +57,20 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
59
57
|
}, forwardedRef) {
|
|
60
58
|
const snapshotRef = useRef(emptyNativeListSnapshot());
|
|
61
59
|
const initializedSnapshot = useRef(false);
|
|
62
|
-
const
|
|
63
|
-
const sidecarWidth = sidecarLayout?.width;
|
|
64
|
-
const sidecarGap = sidecarLayout?.gap;
|
|
65
|
-
const sidecarMaxContentWidth = sidecarLayout?.maxContentWidth;
|
|
66
|
-
const hasContainerSlots = Boolean(listHeader || listEmpty || listFooter || listSidecar);
|
|
60
|
+
const hasContainerSlots = Boolean(listHeader || listEmpty || listFooter);
|
|
67
61
|
const prepareSnapshot = useCallback(next => {
|
|
68
|
-
const accepted = validateSnapshot(
|
|
62
|
+
const accepted = validateSnapshot(next);
|
|
69
63
|
if (hasContainerSlots && accepted.layout.orientation === 'horizontal') throw new Error('NativeList container slots require vertical orientation');
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const width = sidecarWidth;
|
|
73
|
-
const gap = sidecarGap ?? NaN;
|
|
74
|
-
const maxContentWidth = sidecarMaxContentWidth ?? NaN;
|
|
75
|
-
if (accepted.layout.kind !== 'linear' || !Number.isFinite(width) || width <= 0 || !Number.isFinite(gap) || gap < 0 || !Number.isFinite(maxContentWidth) || maxContentWidth <= width + gap) throw new Error('Invalid NativeList sidecar layout');
|
|
76
|
-
}
|
|
77
|
-
return ownValidatedNativeSnapshot(accepted);
|
|
78
|
-
}, [hasContainerSlots, hasSidecar, sidecarWidth, sidecarGap, sidecarMaxContentWidth]);
|
|
64
|
+
return accepted;
|
|
65
|
+
}, [hasContainerSlots]);
|
|
79
66
|
const snapshot = useMemo(() => containNativeListInput(() => prepareSnapshot(inputSnapshot)) ?? snapshotRef.current, [inputSnapshot, prepareSnapshot]);
|
|
80
67
|
const fontFamiliesJson = useNativeListFontFamiliesJson();
|
|
81
|
-
const [slotHeights, setSlotHeights] = useState([0, 0, 0
|
|
82
|
-
const [viewportWidth, setViewportWidth] = useState(0);
|
|
68
|
+
const [slotHeights, setSlotHeights] = useState([0, 0, 0]);
|
|
83
69
|
const [topOverlayHeight, setTopOverlayHeight] = useState(0);
|
|
84
70
|
const hasTopOverlay = Platform?.OS === 'ios' && parseInt(String(Platform.Version), 10) >= 26 && (topScrollEdgeEffect === 'hard' || topScrollEdgeEffect === 'soft') && topOverlay != null;
|
|
85
71
|
const containerSlotHeightsJson = JSON.stringify(slotHeights);
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const slotInset = sidecarLayout ? Math.max(0, (viewportWidth - bandWidth) / 2) : defaultSlotInset;
|
|
89
|
-
const sidecarSpace = sidecarLayout ? sidecarLayout.width + sidecarLayout.gap : 0;
|
|
90
|
-
const slotContents = [listHeader, listEmpty, listFooter, listSidecar];
|
|
91
|
-
const sidecarLayoutJson = sidecarLayout ? JSON.stringify(sidecarLayout) : '';
|
|
72
|
+
const slotInset = snapshot.layout.contentPaddingHorizontal ?? snapshot.layout.contentPadding ?? 0;
|
|
73
|
+
const slotContents = [listHeader, listEmpty, listFooter];
|
|
92
74
|
const normalizedKeyboardShouldPersistTaps = keyboardShouldPersistTaps === true ? 'always' : keyboardShouldPersistTaps === false ? 'never' : keyboardShouldPersistTaps;
|
|
93
75
|
const nativeRef = useRef(null);
|
|
94
76
|
const callbacksRef = useRef({
|
|
@@ -218,7 +200,14 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
218
200
|
}
|
|
219
201
|
},
|
|
220
202
|
applyPatches(patches) {
|
|
221
|
-
const accepted = containNativeListInput(() =>
|
|
203
|
+
const accepted = containNativeListInput(() => {
|
|
204
|
+
const normalized = validatePatches(patches);
|
|
205
|
+
return {
|
|
206
|
+
patches: normalized,
|
|
207
|
+
snapshot: applyRowPatches(snapshotRef.current, normalized),
|
|
208
|
+
json: serializePatches(normalized)
|
|
209
|
+
};
|
|
210
|
+
});
|
|
222
211
|
if (!accepted || accepted.patches.length === 0) return;
|
|
223
212
|
const nextSnapshot = accepted.snapshot;
|
|
224
213
|
const native = nativeRef.current;
|
|
@@ -233,15 +222,14 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
233
222
|
if (avatarModelRef.current?.applyPatches(accepted.patches, dispatch)) updateAvatarPrefetchRef.current();
|
|
234
223
|
},
|
|
235
224
|
reconcileSelection(selectedKeys) {
|
|
236
|
-
|
|
237
|
-
nativeRef.current?.reconcileSelection(JSON.stringify(capturedKeys));
|
|
225
|
+
nativeRef.current?.reconcileSelection(JSON.stringify(selectedKeys));
|
|
238
226
|
const current = snapshotRef.current;
|
|
239
|
-
if (current.selection && (current.selection.mode !== 'single' ||
|
|
227
|
+
if (current.selection && (current.selection.mode !== 'single' || selectedKeys.length <= 1) && selectedKeys.every(key => current.rows.some(row => row.key === key && isSelectableRow(row)))) {
|
|
240
228
|
snapshotRef.current = {
|
|
241
229
|
...current,
|
|
242
230
|
selection: {
|
|
243
231
|
...current.selection,
|
|
244
|
-
selectedKeys
|
|
232
|
+
selectedKeys
|
|
245
233
|
}
|
|
246
234
|
};
|
|
247
235
|
}
|
|
@@ -354,15 +342,10 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
354
342
|
}), []);
|
|
355
343
|
return /*#__PURE__*/_jsxs(NativeListHost, {
|
|
356
344
|
...viewProps,
|
|
357
|
-
onLayout: event => {
|
|
358
|
-
setViewportWidth(event.nativeEvent.layout.width);
|
|
359
|
-
viewProps.onLayout?.(event);
|
|
360
|
-
},
|
|
361
345
|
...nativeCallbacks,
|
|
362
346
|
fontFamiliesJson: fontFamiliesJson,
|
|
363
347
|
snapshotJson: snapshotJson,
|
|
364
348
|
containerSlotHeightsJson: containerSlotHeightsJson,
|
|
365
|
-
sidecarLayoutJson: sidecarLayoutJson,
|
|
366
349
|
topScrollEdgeEffect: hasTopOverlay ? topScrollEdgeEffect ?? 'none' : 'none',
|
|
367
350
|
topOverlayHeight: hasTopOverlay ? topOverlayHeight : 0,
|
|
368
351
|
scrollPositionThresholdsJson: scrollPositionThresholdsJson,
|
|
@@ -372,9 +355,8 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
372
355
|
collapsable: false,
|
|
373
356
|
style: {
|
|
374
357
|
position: 'absolute',
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
width: index === 3 ? sidecarLayout?.width : undefined,
|
|
358
|
+
left: slotInset,
|
|
359
|
+
right: slotInset,
|
|
378
360
|
top: 0
|
|
379
361
|
},
|
|
380
362
|
onLayout: event => {
|
|
@@ -26,8 +26,6 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
26
26
|
listHeader,
|
|
27
27
|
listEmpty,
|
|
28
28
|
listFooter,
|
|
29
|
-
listSidecar,
|
|
30
|
-
sidecarLayout,
|
|
31
29
|
topOverlay: _topOverlay,
|
|
32
30
|
topScrollEdgeEffect: _topScrollEdgeEffect,
|
|
33
31
|
webScrollHost,
|
|
@@ -71,8 +69,6 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
71
69
|
emptyBottomPadding: !snapshot.rows.length && hasEmptySlot ? snapshot.layout.contentPaddingBottom ?? snapshot.layout.contentPadding ?? 0 : 0,
|
|
72
70
|
padding: snapshot.layout.contentPaddingHorizontal ?? snapshot.layout.contentPadding ?? 0
|
|
73
71
|
}));
|
|
74
|
-
const [viewportWidth, setViewportWidth] = useState(0);
|
|
75
|
-
const [sidecarHeight, setSidecarHeight] = useState(0);
|
|
76
72
|
const synchronizeSlots = next => {
|
|
77
73
|
const hasRows = next.rows.length > 0;
|
|
78
74
|
const padding = next.layout.contentPaddingHorizontal ?? next.layout.contentPadding ?? 0;
|
|
@@ -103,24 +99,12 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
103
99
|
const [ownedScrollHost, setOwnedScrollHost] = useState(null);
|
|
104
100
|
const useSlotLayoutRef = useRef(false);
|
|
105
101
|
useSlotLayoutRef.current ||= webScrollHost !== undefined || listHeader !== undefined || listEmpty !== undefined || listFooter !== undefined;
|
|
106
|
-
useSlotLayoutRef.current ||= listSidecar !== undefined;
|
|
107
102
|
const useSlotLayout = useSlotLayoutRef.current;
|
|
108
103
|
const resolvedScrollHost = webScrollHost === undefined ? useSlotLayout ? ownedScrollHost : undefined : webScrollHost;
|
|
109
104
|
const engineRef = useRef(undefined);
|
|
110
105
|
const webVirtualizationEnabledRef = useRef(webVirtualizationEnabled);
|
|
111
106
|
webVirtualizationEnabledRef.current = webVirtualizationEnabled;
|
|
112
|
-
const validatedSnapshot = useMemo(() => containNativeListInput(() =>
|
|
113
|
-
if (listSidecar !== undefined !== (sidecarLayout !== undefined)) throw new Error('listSidecar and sidecarLayout must be supplied together');
|
|
114
|
-
if (sidecarLayout) {
|
|
115
|
-
const {
|
|
116
|
-
width,
|
|
117
|
-
gap,
|
|
118
|
-
maxContentWidth
|
|
119
|
-
} = sidecarLayout;
|
|
120
|
-
if (snapshot.layout.kind !== 'linear' || !Number.isFinite(width) || width <= 0 || !Number.isFinite(gap) || gap < 0 || !Number.isFinite(maxContentWidth) || maxContentWidth <= width + gap) throw new Error('Invalid NativeList sidecar layout');
|
|
121
|
-
}
|
|
122
|
-
return normalizeWebSnapshot(snapshot, hasEmptySlot, useSlotLayout);
|
|
123
|
-
}) ?? acceptedSnapshotRef.current, [snapshot, hasEmptySlot, useSlotLayout, listSidecar, sidecarLayout]);
|
|
107
|
+
const validatedSnapshot = useMemo(() => containNativeListInput(() => normalizeWebSnapshot(snapshot, hasEmptySlot, useSlotLayout)) ?? acceptedSnapshotRef.current, [snapshot, hasEmptySlot, useSlotLayout]);
|
|
124
108
|
const snapshotRef = useRef(validatedSnapshot);
|
|
125
109
|
const snapshotPropRef = useRef(validatedSnapshot);
|
|
126
110
|
// An imperative snapshot survives host mounting until the snapshot prop changes.
|
|
@@ -313,7 +297,7 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
313
297
|
});
|
|
314
298
|
const padding = slotState.padding;
|
|
315
299
|
const content = /*#__PURE__*/_jsxs(View, {
|
|
316
|
-
ref:
|
|
300
|
+
ref: setBoundsRef,
|
|
317
301
|
style: {
|
|
318
302
|
position: 'relative',
|
|
319
303
|
flexShrink: 0,
|
|
@@ -337,45 +321,14 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
337
321
|
},
|
|
338
322
|
children: listEmpty
|
|
339
323
|
}) : null, listFooter !== undefined ? /*#__PURE__*/_jsx(View, {
|
|
340
|
-
testID: "native-list-footer-slot",
|
|
341
324
|
style: {
|
|
342
325
|
paddingHorizontal: padding
|
|
343
326
|
},
|
|
344
327
|
children: listFooter
|
|
345
328
|
}) : null]
|
|
346
329
|
});
|
|
347
|
-
const bandWidth = sidecarLayout ? Math.min(viewportWidth, sidecarLayout.maxContentWidth) : 0;
|
|
348
|
-
const sidecarMargin = Math.max(0, (viewportWidth - bandWidth) / 2);
|
|
349
|
-
const leftWidth = Math.max(0, bandWidth - (sidecarLayout?.width ?? 0) - (sidecarLayout?.gap ?? 0));
|
|
350
|
-
const scrollContent = sidecarLayout ? /*#__PURE__*/_jsxs(View, {
|
|
351
|
-
ref: setBoundsRef,
|
|
352
|
-
style: {
|
|
353
|
-
position: 'relative',
|
|
354
|
-
minHeight: sidecarHeight
|
|
355
|
-
},
|
|
356
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
357
|
-
style: {
|
|
358
|
-
marginStart: sidecarMargin,
|
|
359
|
-
width: leftWidth
|
|
360
|
-
},
|
|
361
|
-
children: content
|
|
362
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
363
|
-
style: {
|
|
364
|
-
position: 'absolute',
|
|
365
|
-
end: sidecarMargin,
|
|
366
|
-
top: 0,
|
|
367
|
-
width: sidecarLayout.width
|
|
368
|
-
},
|
|
369
|
-
onLayout: event => setSidecarHeight(event.nativeEvent.layout.height),
|
|
370
|
-
children: listSidecar
|
|
371
|
-
})]
|
|
372
|
-
}) : content;
|
|
373
330
|
return /*#__PURE__*/_jsx(View, {
|
|
374
331
|
...viewProps,
|
|
375
|
-
onLayout: event => {
|
|
376
|
-
setViewportWidth(event.nativeEvent.layout.width);
|
|
377
|
-
viewProps.onLayout?.(event);
|
|
378
|
-
},
|
|
379
332
|
style: [viewProps.style, {
|
|
380
333
|
position: 'relative',
|
|
381
334
|
minHeight: 0
|
|
@@ -387,8 +340,8 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
|
|
|
387
340
|
inset: 0,
|
|
388
341
|
overflow: 'scroll'
|
|
389
342
|
},
|
|
390
|
-
children:
|
|
391
|
-
}) :
|
|
343
|
+
children: content
|
|
344
|
+
}) : content
|
|
392
345
|
});
|
|
393
346
|
});
|
|
394
347
|
//# sourceMappingURL=NativeList.web.js.map
|
package/lib/module/models.js
CHANGED
|
@@ -24,7 +24,6 @@ export const ROW_BOX_STYLE_KEYS_BY_TYPE = {
|
|
|
24
24
|
metricCard: ['horizontalPadding', 'verticalPadding', 'leadingGap', 'lineGap', 'image'],
|
|
25
25
|
sectionHeader: ['horizontalPadding', 'verticalPadding', 'lineGap', 'trailingGap'],
|
|
26
26
|
action: ['horizontalPadding', 'verticalPadding', 'leadingGap', 'trailingGap', 'image'],
|
|
27
|
-
buttonGroup: [],
|
|
28
27
|
system: ['horizontalPadding', 'verticalPadding', 'lineGap']
|
|
29
28
|
};
|
|
30
29
|
|
package/lib/module/selection.js
CHANGED
|
@@ -4,7 +4,7 @@ export function isSelectableRow(row) {
|
|
|
4
4
|
return !row.disabled && (row.type === 'identity' || row.type === 'rail' || row.type === 'activity' || row.type === 'message' || row.type === 'dataRow' || row.type === 'mediaTile' || row.type === 'metricCard');
|
|
5
5
|
}
|
|
6
6
|
export function isRowPressEnabled(row) {
|
|
7
|
-
return !row.disabled && !row.pressDisabled &&
|
|
7
|
+
return !row.disabled && !row.pressDisabled && (row.type !== 'system' || row.variant === 'retry');
|
|
8
8
|
}
|
|
9
9
|
function deltaBetween(before, after, source, sourceKey) {
|
|
10
10
|
return {
|