@onekeyfe/react-native-native-list 6.7.0-alpha.327 → 6.7.0-alpha.336
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/docs/SPEC.md +390 -9
- package/lib/module/NativeList.js +2 -0
- package/lib/module/NativeList.web.js +140 -29
- package/lib/module/validation.js +143 -34
- package/lib/module/web/NativeListWebEngine.js +356 -62
- package/lib/module/web/templates/ActivityRowRenderer.js +484 -5
- package/lib/module/web/templates/MarketRowRenderer.js +8 -3
- package/lib/module/web/templates/MarketTableRowRenderer.js +577 -0
- package/lib/module/web/templates/MediaTileRowRenderer.js +260 -5
- package/lib/module/web/templates/RowRendererRegistry.js +5 -3
- package/lib/module/web/templates/SectionHeaderRowRenderer.js +34 -1
- package/lib/typescript/src/NativeList.types.d.ts +11 -1
- package/lib/typescript/src/NativeList.web.d.ts +2 -2
- package/lib/typescript/src/models.d.ts +71 -1
- package/lib/typescript/src/web/NativeListWebEngine.d.ts +26 -1
- package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +3 -3
- package/lib/typescript/src/web/templates/MarketTableRowRenderer.d.ts +17 -0
- package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +3 -3
- package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +1 -1
- package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +3 -1
- package/package.json +3 -3
- package/src/NativeList.tsx +2 -0
- package/src/NativeList.types.ts +12 -1
- package/src/NativeList.web.tsx +191 -38
- package/src/models.ts +93 -0
- package/src/validation.ts +348 -58
- package/src/web/NativeListWebEngine.ts +603 -95
- package/src/web/templates/ActivityRowRenderer.ts +723 -7
- package/src/web/templates/MarketRowRenderer.ts +19 -3
- package/src/web/templates/MarketTableRowRenderer.ts +755 -0
- package/src/web/templates/MediaTileRowRenderer.ts +313 -5
- package/src/web/templates/RowRendererRegistry.ts +10 -5
- package/src/web/templates/SectionHeaderRowRenderer.ts +42 -1
|
@@ -198,8 +198,18 @@ function createMarketRow(
|
|
|
198
198
|
? 'none'
|
|
199
199
|
: style?.image?.contentFit ?? image.style.objectFit;
|
|
200
200
|
} else {
|
|
201
|
-
image.style.width =
|
|
202
|
-
|
|
201
|
+
image.style.width =
|
|
202
|
+
String(
|
|
203
|
+
row.leading.kind === 'token'
|
|
204
|
+
? row.leading.networkImage?.width ?? 16
|
|
205
|
+
: 16
|
|
206
|
+
) + 'px';
|
|
207
|
+
image.style.height =
|
|
208
|
+
String(
|
|
209
|
+
row.leading.kind === 'token'
|
|
210
|
+
? row.leading.networkImage?.height ?? 16
|
|
211
|
+
: 16
|
|
212
|
+
) + 'px';
|
|
203
213
|
if (borderColor) {
|
|
204
214
|
image.style.right = '-5px';
|
|
205
215
|
image.style.bottom = '-5px';
|
|
@@ -314,8 +324,14 @@ function createMarketRow(
|
|
|
314
324
|
weight: 400,
|
|
315
325
|
alignment: 'start',
|
|
316
326
|
});
|
|
327
|
+
if (row.subtitlePrefix.hoverActionKey) {
|
|
328
|
+
prefix.dataset.nativeListHoverAction =
|
|
329
|
+
row.subtitlePrefix.hoverActionKey;
|
|
330
|
+
prefix.dataset.nativeListAnchorSource = 'row';
|
|
331
|
+
prefix.tabIndex = 0;
|
|
332
|
+
}
|
|
317
333
|
prefix.style.display = 'block';
|
|
318
|
-
prefix.style.flex = '
|
|
334
|
+
prefix.style.flex = '0 1 auto';
|
|
319
335
|
prefix.style.minWidth = '0';
|
|
320
336
|
prefix.style.overflow = 'hidden';
|
|
321
337
|
prefix.style.textOverflow = 'ellipsis';
|