@multiplatform.one/table 7.28.1 → 7.29.0
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/dist/cjs/components/DataTable/CellContent.cjs +77 -0
- package/dist/cjs/components/DataTable/CellContent.native.js +88 -0
- package/dist/cjs/components/DataTable/CellContent.native.js.map +1 -0
- package/dist/cjs/components/DataTable/DataTableInfiniteTail.cjs +90 -0
- package/dist/cjs/components/DataTable/DataTableInfiniteTail.native.js +99 -0
- package/dist/cjs/components/DataTable/DataTableInfiniteTail.native.js.map +1 -0
- package/dist/cjs/components/DataTable/DataTableRoot.cjs +17 -47
- package/dist/cjs/components/DataTable/DataTableRoot.native.js +17 -56
- package/dist/cjs/components/DataTable/DataTableRoot.native.js.map +1 -1
- package/dist/cjs/components/DataTable/NativeInfiniteSentinel.cjs +62 -0
- package/dist/cjs/components/DataTable/NativeInfiniteSentinel.native.js +67 -0
- package/dist/cjs/components/DataTable/NativeInfiniteSentinel.native.js.map +1 -0
- package/dist/cjs/components/DataTable/index.native.js +75 -15
- package/dist/cjs/components/DataTable/index.native.js.map +1 -1
- package/dist/cjs/components/DataTableBulkActions/index.cjs +70 -51
- package/dist/cjs/components/DataTableBulkActions/index.native.js +84 -63
- package/dist/cjs/components/DataTableBulkActions/index.native.js.map +1 -1
- package/dist/cjs/components/DataTableCell/index.cjs +3 -1
- package/dist/cjs/components/DataTableCell/index.native.js +3 -1
- package/dist/cjs/components/DataTableCell/index.native.js.map +1 -1
- package/dist/cjs/components/DataTableDateFilter/index.cjs +2 -1
- package/dist/cjs/components/DataTableDateFilter/index.native.js +2 -1
- package/dist/cjs/components/DataTableDateFilter/index.native.js.map +1 -1
- package/dist/cjs/components/DataTableExport/index.cjs +2 -1
- package/dist/cjs/components/DataTableExport/index.native.js +2 -1
- package/dist/cjs/components/DataTableExport/index.native.js.map +1 -1
- package/dist/cjs/components/DataTableGrouping/index.cjs +2 -2
- package/dist/cjs/components/DataTableGrouping/index.native.js +2 -2
- package/dist/cjs/components/DataTableViewOptions/index.cjs +1 -1
- package/dist/cjs/components/DataTableViewOptions/index.native.js +1 -1
- package/dist/cjs/components/DataTableViewOptions/index.native.js.map +1 -1
- package/dist/cjs/components/KnobDialog.cjs +2 -1
- package/dist/cjs/components/KnobDialog.native.js +4 -2
- package/dist/cjs/components/KnobDialog.native.js.map +1 -1
- package/dist/cjs/components/TableInput/RowDetailEditor.cjs +1 -1
- package/dist/cjs/components/TableInput/index.native.js +1 -0
- package/dist/cjs/components/TableInput/index.native.js.map +1 -1
- package/dist/esm/components/DataTable/CellContent.mjs +52 -0
- package/dist/esm/components/DataTable/CellContent.mjs.map +1 -0
- package/dist/esm/components/DataTable/CellContent.native.js +60 -0
- package/dist/esm/components/DataTable/CellContent.native.js.map +1 -0
- package/dist/esm/components/DataTable/DataTableInfiniteTail.mjs +65 -0
- package/dist/esm/components/DataTable/DataTableInfiniteTail.mjs.map +1 -0
- package/dist/esm/components/DataTable/DataTableInfiniteTail.native.js +71 -0
- package/dist/esm/components/DataTable/DataTableInfiniteTail.native.js.map +1 -0
- package/dist/esm/components/DataTable/DataTableRoot.mjs +18 -48
- package/dist/esm/components/DataTable/DataTableRoot.mjs.map +1 -1
- package/dist/esm/components/DataTable/DataTableRoot.native.js +18 -57
- package/dist/esm/components/DataTable/DataTableRoot.native.js.map +1 -1
- package/dist/esm/components/DataTable/NativeInfiniteSentinel.mjs +36 -0
- package/dist/esm/components/DataTable/NativeInfiniteSentinel.mjs.map +1 -0
- package/dist/esm/components/DataTable/NativeInfiniteSentinel.native.js +38 -0
- package/dist/esm/components/DataTable/NativeInfiniteSentinel.native.js.map +1 -0
- package/dist/esm/components/DataTable/index.native.js +77 -17
- package/dist/esm/components/DataTable/index.native.js.map +1 -1
- package/dist/esm/components/DataTableBulkActions/index.mjs +71 -52
- package/dist/esm/components/DataTableBulkActions/index.mjs.map +1 -1
- package/dist/esm/components/DataTableBulkActions/index.native.js +85 -64
- package/dist/esm/components/DataTableBulkActions/index.native.js.map +1 -1
- package/dist/esm/components/DataTableCell/index.mjs +3 -1
- package/dist/esm/components/DataTableCell/index.mjs.map +1 -1
- package/dist/esm/components/DataTableCell/index.native.js +3 -1
- package/dist/esm/components/DataTableCell/index.native.js.map +1 -1
- package/dist/esm/components/DataTableDateFilter/index.mjs +2 -1
- package/dist/esm/components/DataTableDateFilter/index.mjs.map +1 -1
- package/dist/esm/components/DataTableDateFilter/index.native.js +2 -1
- package/dist/esm/components/DataTableDateFilter/index.native.js.map +1 -1
- package/dist/esm/components/DataTableExport/index.mjs +2 -1
- package/dist/esm/components/DataTableExport/index.mjs.map +1 -1
- package/dist/esm/components/DataTableExport/index.native.js +2 -1
- package/dist/esm/components/DataTableExport/index.native.js.map +1 -1
- package/dist/esm/components/DataTableGrouping/index.mjs +2 -2
- package/dist/esm/components/DataTableGrouping/index.native.js +2 -2
- package/dist/esm/components/DataTableViewOptions/index.mjs +2 -2
- package/dist/esm/components/DataTableViewOptions/index.mjs.map +1 -1
- package/dist/esm/components/DataTableViewOptions/index.native.js +2 -2
- package/dist/esm/components/DataTableViewOptions/index.native.js.map +1 -1
- package/dist/esm/components/KnobDialog.mjs +2 -1
- package/dist/esm/components/KnobDialog.mjs.map +1 -1
- package/dist/esm/components/KnobDialog.native.js +4 -2
- package/dist/esm/components/KnobDialog.native.js.map +1 -1
- package/dist/esm/components/TableInput/RowDetailEditor.mjs +2 -2
- package/dist/esm/components/TableInput/RowDetailEditor.mjs.map +1 -1
- package/dist/esm/components/TableInput/index.native.js +1 -0
- package/dist/esm/components/TableInput/index.native.js.map +1 -1
- package/dist/jsx/components/DataTable/CellContent.mjs +52 -0
- package/dist/jsx/components/DataTable/CellContent.mjs.map +1 -0
- package/dist/jsx/components/DataTable/CellContent.native.js +88 -0
- package/dist/jsx/components/DataTable/CellContent.native.js.map +1 -0
- package/dist/jsx/components/DataTable/DataTableInfiniteTail.mjs +65 -0
- package/dist/jsx/components/DataTable/DataTableInfiniteTail.mjs.map +1 -0
- package/dist/jsx/components/DataTable/DataTableInfiniteTail.native.js +99 -0
- package/dist/jsx/components/DataTable/DataTableInfiniteTail.native.js.map +1 -0
- package/dist/jsx/components/DataTable/DataTableRoot.mjs +18 -48
- package/dist/jsx/components/DataTable/DataTableRoot.mjs.map +1 -1
- package/dist/jsx/components/DataTable/DataTableRoot.native.js +17 -56
- package/dist/jsx/components/DataTable/DataTableRoot.native.js.map +1 -1
- package/dist/jsx/components/DataTable/NativeInfiniteSentinel.mjs +36 -0
- package/dist/jsx/components/DataTable/NativeInfiniteSentinel.mjs.map +1 -0
- package/dist/jsx/components/DataTable/NativeInfiniteSentinel.native.js +67 -0
- package/dist/jsx/components/DataTable/NativeInfiniteSentinel.native.js.map +1 -0
- package/dist/jsx/components/DataTable/index.native.js +75 -15
- package/dist/jsx/components/DataTable/index.native.js.map +1 -1
- package/dist/jsx/components/DataTableBulkActions/index.mjs +71 -52
- package/dist/jsx/components/DataTableBulkActions/index.mjs.map +1 -1
- package/dist/jsx/components/DataTableBulkActions/index.native.js +84 -63
- package/dist/jsx/components/DataTableBulkActions/index.native.js.map +1 -1
- package/dist/jsx/components/DataTableCell/index.mjs +3 -1
- package/dist/jsx/components/DataTableCell/index.mjs.map +1 -1
- package/dist/jsx/components/DataTableCell/index.native.js +3 -1
- package/dist/jsx/components/DataTableCell/index.native.js.map +1 -1
- package/dist/jsx/components/DataTableDateFilter/index.mjs +2 -1
- package/dist/jsx/components/DataTableDateFilter/index.mjs.map +1 -1
- package/dist/jsx/components/DataTableDateFilter/index.native.js +2 -1
- package/dist/jsx/components/DataTableDateFilter/index.native.js.map +1 -1
- package/dist/jsx/components/DataTableExport/index.mjs +2 -1
- package/dist/jsx/components/DataTableExport/index.mjs.map +1 -1
- package/dist/jsx/components/DataTableExport/index.native.js +2 -1
- package/dist/jsx/components/DataTableExport/index.native.js.map +1 -1
- package/dist/jsx/components/DataTableGrouping/index.mjs +2 -2
- package/dist/jsx/components/DataTableGrouping/index.native.js +2 -2
- package/dist/jsx/components/DataTableViewOptions/index.mjs +2 -2
- package/dist/jsx/components/DataTableViewOptions/index.mjs.map +1 -1
- package/dist/jsx/components/DataTableViewOptions/index.native.js +1 -1
- package/dist/jsx/components/DataTableViewOptions/index.native.js.map +1 -1
- package/dist/jsx/components/KnobDialog.mjs +2 -1
- package/dist/jsx/components/KnobDialog.mjs.map +1 -1
- package/dist/jsx/components/KnobDialog.native.js +4 -2
- package/dist/jsx/components/KnobDialog.native.js.map +1 -1
- package/dist/jsx/components/TableInput/RowDetailEditor.mjs +2 -2
- package/dist/jsx/components/TableInput/RowDetailEditor.mjs.map +1 -1
- package/dist/jsx/components/TableInput/index.native.js +1 -0
- package/dist/jsx/components/TableInput/index.native.js.map +1 -1
- package/package.json +12 -12
- package/src/components/DataTable/CellContent.tsx +73 -0
- package/src/components/DataTable/DataTableInfiniteTail.tsx +94 -0
- package/src/components/DataTable/DataTableRoot.tsx +37 -81
- package/src/components/DataTable/NativeInfiniteSentinel.tsx +45 -0
- package/src/components/DataTable/cellWeight.native.spec.tsx +82 -0
- package/src/components/DataTable/cellWeight.spec.tsx +147 -0
- package/src/components/DataTable/index.native.tsx +108 -19
- package/src/components/DataTable/nativeRoot.spec.tsx +180 -0
- package/src/components/DataTableBulkActions/index.tsx +100 -71
- package/src/components/DataTableCell/index.tsx +3 -2
- package/src/components/DataTableDateFilter/index.tsx +2 -10
- package/src/components/DataTableExport/index.tsx +2 -1
- package/src/components/DataTableFilters/DataTableFilters.stories.tsx +7 -19
- package/src/components/DataTableGrouping/index.tsx +2 -2
- package/src/components/DataTablePagination/DataTablePagination.stories.tsx +12 -46
- package/src/components/DataTableViewOptions/index.tsx +2 -2
- package/src/components/KnobDialog.tsx +2 -0
- package/src/components/TableInput/RowDetailEditor.tsx +2 -2
- package/src/components/TableInput/index.native.tsx +1 -0
- package/types/components/DataTable/CellContent.d.ts +19 -0
- package/types/components/DataTable/CellContent.d.ts.map +1 -0
- package/types/components/DataTable/DataTableInfiniteTail.d.ts +22 -0
- package/types/components/DataTable/DataTableInfiniteTail.d.ts.map +1 -0
- package/types/components/DataTable/DataTableRoot.d.ts.map +1 -1
- package/types/components/DataTable/NativeInfiniteSentinel.d.ts +17 -0
- package/types/components/DataTable/NativeInfiniteSentinel.d.ts.map +1 -0
- package/types/components/DataTable/index.native.d.ts +1 -1
- package/types/components/DataTable/index.native.d.ts.map +1 -1
- package/types/components/DataTableBulkActions/index.d.ts.map +1 -1
- package/types/components/DataTableCell/index.d.ts.map +1 -1
- package/types/components/DataTableDateFilter/index.d.ts.map +1 -1
- package/types/components/DataTableExport/index.d.ts.map +1 -1
- package/types/components/KnobDialog.d.ts.map +1 -1
- package/types/components/TableInput/index.native.d.ts.map +1 -1
|
@@ -4,7 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { Button, zIndex } from "@multiplatform.one/forms";
|
|
6
6
|
import { ConfirmDialog, DropdownMenu } from "@multiplatform.one/components";
|
|
7
|
-
import { Text, View, XStack } from "tamagui";
|
|
7
|
+
import { Text, View, XStack, isWeb, useMedia } from "tamagui";
|
|
8
8
|
import type { BulkAction } from "../../types";
|
|
9
9
|
import { iconSizeForToken } from "../../utils/chromeIcons";
|
|
10
10
|
import { withInterp } from "../../utils/withInterp";
|
|
@@ -53,6 +53,10 @@ export function DataTableBulkActions<T = any>(props: DataTableBulkActionsProps<T
|
|
|
53
53
|
// on-fill foreground) measured 1.88:1 as dark-scheme page text.
|
|
54
54
|
const countColor = useAccentOnSurface();
|
|
55
55
|
const placement = placementProp ?? (knobProps.bulkBarPlacement === "bottom" ? "bottom" : "top");
|
|
56
|
+
// Below $sm the actions do not fit one row beside the count and Clear:
|
|
57
|
+
// the count and Clear share the first line and the actions wrap beneath.
|
|
58
|
+
const { sm } = useMedia();
|
|
59
|
+
const stacked = !sm;
|
|
56
60
|
|
|
57
61
|
// DG-TBL-03 scope switch: with page scope, once the visible page is fully
|
|
58
62
|
// selected offer expanding the selection to every matching (filtered) row.
|
|
@@ -121,88 +125,113 @@ export function DataTableBulkActions<T = any>(props: DataTableBulkActionsProps<T
|
|
|
121
125
|
return null;
|
|
122
126
|
}
|
|
123
127
|
|
|
128
|
+
const summary = (
|
|
129
|
+
<>
|
|
130
|
+
{showSelectionCount && (
|
|
131
|
+
<Text {...knobProps.label} fontWeight="400" color={countColor}>
|
|
132
|
+
{/* D-15: one whole-sentence key per variant (never concatenated
|
|
133
|
+
fragments — word order is locale-owned); withInterp fills the
|
|
134
|
+
params when no i18n instance is mounted (house table pattern). */}
|
|
135
|
+
{filteredOutCount > 0
|
|
136
|
+
? withInterp(
|
|
137
|
+
t("{{n}} selected (+{{hidden}} filtered out)", {
|
|
138
|
+
n: selectedItems.length,
|
|
139
|
+
hidden: filteredOutCount,
|
|
140
|
+
}),
|
|
141
|
+
{ n: selectedItems.length, hidden: filteredOutCount },
|
|
142
|
+
)
|
|
143
|
+
: withInterp(t("{{n}} selected", { n: selectedItems.length }), {
|
|
144
|
+
n: selectedItems.length,
|
|
145
|
+
})}
|
|
146
|
+
</Text>
|
|
147
|
+
)}
|
|
148
|
+
|
|
149
|
+
{showSelectAllMatching && (
|
|
150
|
+
<Button
|
|
151
|
+
size={knobProps.sizeToken}
|
|
152
|
+
onPress={() => ctx?.table.toggleAllRowsSelected(true)}
|
|
153
|
+
aria-label={`Select all ${matchingCount} matching rows`}
|
|
154
|
+
{...knobProps.borderRadius}
|
|
155
|
+
>
|
|
156
|
+
{`Select all ${matchingCount}`}
|
|
157
|
+
</Button>
|
|
158
|
+
)}
|
|
159
|
+
</>
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
const clearButton = (
|
|
163
|
+
<Button
|
|
164
|
+
size={knobProps.sizeToken}
|
|
165
|
+
onPress={onClearSelection}
|
|
166
|
+
aria-label="Clear selection"
|
|
167
|
+
{...knobProps.borderRadius}
|
|
168
|
+
>
|
|
169
|
+
Clear
|
|
170
|
+
</Button>
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
const actionGroup = (
|
|
174
|
+
<XStack {...knobProps.gap} flexWrap="wrap" {...(stacked ? {} : { flex: 1 })}>
|
|
175
|
+
{visibleActions.map((action) => (
|
|
176
|
+
<Button
|
|
177
|
+
key={action.id}
|
|
178
|
+
size={knobProps.sizeToken}
|
|
179
|
+
error={action.variant === "destructive"}
|
|
180
|
+
disabled={action.disabled}
|
|
181
|
+
// DG-ST-03: reason renders via the Button explain affordance;
|
|
182
|
+
// executing is derived busy state (spinner), not a bare disable.
|
|
183
|
+
disabledReason={action.disabledReason}
|
|
184
|
+
loading={isExecuting === action.id}
|
|
185
|
+
onPress={() => handleExecuteAction(action)}
|
|
186
|
+
{...knobProps.borderRadius}
|
|
187
|
+
>
|
|
188
|
+
{action.label}
|
|
189
|
+
</Button>
|
|
190
|
+
))}
|
|
191
|
+
|
|
192
|
+
{overflowActions.length > 0 && (
|
|
193
|
+
<BulkActionsOverflowMenu
|
|
194
|
+
actions={overflowActions}
|
|
195
|
+
selectedItems={selectedItems}
|
|
196
|
+
onExecuteAction={handleExecuteAction}
|
|
197
|
+
isExecuting={isExecuting}
|
|
198
|
+
/>
|
|
199
|
+
)}
|
|
200
|
+
</XStack>
|
|
201
|
+
);
|
|
202
|
+
|
|
124
203
|
return (
|
|
125
204
|
<>
|
|
126
205
|
<View
|
|
127
|
-
flexDirection="row"
|
|
128
|
-
alignItems="center"
|
|
206
|
+
flexDirection={stacked ? "column" : "row"}
|
|
207
|
+
alignItems={stacked ? "stretch" : "center"}
|
|
129
208
|
{...knobProps.borderRadius}
|
|
130
209
|
{...knobProps.panelPadding}
|
|
131
210
|
gap="$3"
|
|
132
211
|
backgroundColor="$color2"
|
|
133
212
|
borderColor="$color6"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
213
|
+
// Tamagui turns "sticky" into "absolute" on native, which floats the
|
|
214
|
+
// bar over the first rows; native keeps it in flow instead.
|
|
215
|
+
{...(isWeb
|
|
216
|
+
? {
|
|
217
|
+
position: "sticky" as const,
|
|
218
|
+
top: placement === "top" ? 0 : undefined,
|
|
219
|
+
bottom: placement === "bottom" ? 0 : undefined,
|
|
220
|
+
}
|
|
221
|
+
: {})}
|
|
137
222
|
zIndex={zIndex.stickyHeader}
|
|
138
223
|
data-bulk-bar-placement={placement}
|
|
139
224
|
>
|
|
140
|
-
{
|
|
141
|
-
<
|
|
142
|
-
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
t("{{n}} selected (+{{hidden}} filtered out)", {
|
|
148
|
-
n: selectedItems.length,
|
|
149
|
-
hidden: filteredOutCount,
|
|
150
|
-
}),
|
|
151
|
-
{ n: selectedItems.length, hidden: filteredOutCount },
|
|
152
|
-
)
|
|
153
|
-
: withInterp(t("{{n}} selected", { n: selectedItems.length }), {
|
|
154
|
-
n: selectedItems.length,
|
|
155
|
-
})}
|
|
156
|
-
</Text>
|
|
157
|
-
)}
|
|
158
|
-
|
|
159
|
-
{showSelectAllMatching && (
|
|
160
|
-
<Button
|
|
161
|
-
size={knobProps.sizeToken}
|
|
162
|
-
onPress={() => ctx?.table.toggleAllRowsSelected(true)}
|
|
163
|
-
aria-label={`Select all ${matchingCount} matching rows`}
|
|
164
|
-
{...knobProps.borderRadius}
|
|
165
|
-
>
|
|
166
|
-
{`Select all ${matchingCount}`}
|
|
167
|
-
</Button>
|
|
225
|
+
{stacked ? (
|
|
226
|
+
<XStack alignItems="center" justifyContent="space-between" gap="$3">
|
|
227
|
+
{summary}
|
|
228
|
+
{clearButton}
|
|
229
|
+
</XStack>
|
|
230
|
+
) : (
|
|
231
|
+
summary
|
|
168
232
|
)}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
{visibleActions.map((action) => (
|
|
172
|
-
<Button
|
|
173
|
-
key={action.id}
|
|
174
|
-
size={knobProps.sizeToken}
|
|
175
|
-
error={action.variant === "destructive"}
|
|
176
|
-
disabled={action.disabled}
|
|
177
|
-
// DG-ST-03: reason renders via the Button explain affordance;
|
|
178
|
-
// executing is derived busy state (spinner), not a bare disable.
|
|
179
|
-
disabledReason={action.disabledReason}
|
|
180
|
-
loading={isExecuting === action.id}
|
|
181
|
-
onPress={() => handleExecuteAction(action)}
|
|
182
|
-
{...knobProps.borderRadius}
|
|
183
|
-
>
|
|
184
|
-
{action.label}
|
|
185
|
-
</Button>
|
|
186
|
-
))}
|
|
187
|
-
|
|
188
|
-
{overflowActions.length > 0 && (
|
|
189
|
-
<BulkActionsOverflowMenu
|
|
190
|
-
actions={overflowActions}
|
|
191
|
-
selectedItems={selectedItems}
|
|
192
|
-
onExecuteAction={handleExecuteAction}
|
|
193
|
-
isExecuting={isExecuting}
|
|
194
|
-
/>
|
|
195
|
-
)}
|
|
196
|
-
</XStack>
|
|
197
|
-
|
|
198
|
-
<Button
|
|
199
|
-
size={knobProps.sizeToken}
|
|
200
|
-
onPress={onClearSelection}
|
|
201
|
-
aria-label="Clear selection"
|
|
202
|
-
{...knobProps.borderRadius}
|
|
203
|
-
>
|
|
204
|
-
Clear
|
|
205
|
-
</Button>
|
|
233
|
+
{actionGroup}
|
|
234
|
+
{stacked ? null : clearButton}
|
|
206
235
|
</View>
|
|
207
236
|
|
|
208
237
|
{/* LC-16: confirm routes through the canonical DestructiveAction→ConfirmDialog
|
|
@@ -52,9 +52,10 @@ import { CellModalEditor } from "./CellModalEditor";
|
|
|
52
52
|
import { CellOptionsEditor } from "./CellOptionsEditor";
|
|
53
53
|
import { Star } from "@phosphor-icons/react";
|
|
54
54
|
import { RichTextEditor } from "@multiplatform.one/rich-text";
|
|
55
|
+
import { Text } from "@multiplatform.one/components";
|
|
55
56
|
import { useResolvedKnobs, ensureCompositeFocusRing } from "@multiplatform.one/theme";
|
|
56
57
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
57
|
-
import {
|
|
58
|
+
import { View, isWeb } from "tamagui";
|
|
58
59
|
import type { DataTableFieldProps, DataTableField } from "../../types";
|
|
59
60
|
import { alignToFlex, getDefaultColumnAlign } from "../../utils/columnAlign";
|
|
60
61
|
import { formatMoney } from "../../utils/money";
|
|
@@ -191,7 +192,7 @@ export function DataTableCell({
|
|
|
191
192
|
typeof rowCurrency === "string" && rowCurrency ? rowCurrency : currency;
|
|
192
193
|
return (
|
|
193
194
|
<CellWrapper justify={cellJustify}>
|
|
194
|
-
<Text numberOfLines={1} aria-label={cellName}>
|
|
195
|
+
<Text numberOfLines={1} aria-label={cellName} fontSize={knobProps.label.fontSize}>
|
|
195
196
|
{formatMoney(value, resolvedCurrency, locale)}
|
|
196
197
|
</Text>
|
|
197
198
|
</CellWrapper>
|
|
@@ -9,16 +9,8 @@ import {
|
|
|
9
9
|
import { formatAbsoluteDate, parseCalendarDate, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
10
10
|
import React, { useState, useMemo } from "react";
|
|
11
11
|
import { Button, DatePicker, FloatingPanel } from "@multiplatform.one/forms";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
Separator,
|
|
15
|
-
Text,
|
|
16
|
-
View,
|
|
17
|
-
XStack,
|
|
18
|
-
YStack,
|
|
19
|
-
getTokens,
|
|
20
|
-
getVariableValue,
|
|
21
|
-
} from "tamagui";
|
|
12
|
+
import { Separator, Text, View, XStack, YStack, getTokens, getVariableValue } from "tamagui";
|
|
13
|
+
import { ScrollView } from "@multiplatform.one/components";
|
|
22
14
|
import { t } from "../../shared/t";
|
|
23
15
|
import { iconSizeForToken } from "../../utils/chromeIcons";
|
|
24
16
|
|
|
@@ -9,7 +9,8 @@ import { downloadBlob } from "@multiplatform.one/platform";
|
|
|
9
9
|
import { formatCalendarDate, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
10
10
|
import { useState } from "react";
|
|
11
11
|
import { Button, Checkbox, FloatingPanel, Input } from "@multiplatform.one/forms";
|
|
12
|
-
import {
|
|
12
|
+
import { Separator, Text, XStack, YStack, isWeb } from "tamagui";
|
|
13
|
+
import { ScrollView } from "@multiplatform.one/components";
|
|
13
14
|
import type { DataTableField } from "../../types";
|
|
14
15
|
import { iconSizeForToken } from "../../utils/chromeIcons";
|
|
15
16
|
import { getViewLeafRows } from "../../utils/viewData";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Card } from "@multiplatform.one/components";
|
|
1
2
|
import { action } from "@multiplatform.one/storybook";
|
|
2
3
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
4
|
import { Text, View, YStack } from "tamagui";
|
|
@@ -331,18 +332,12 @@ export const InteractiveDemo: Story = {
|
|
|
331
332
|
onClearFilters={handleClearFilters}
|
|
332
333
|
/>
|
|
333
334
|
|
|
334
|
-
<
|
|
335
|
-
style={{
|
|
336
|
-
padding: "16px",
|
|
337
|
-
background: "#f5f5f5",
|
|
338
|
-
borderRadius: "4px",
|
|
339
|
-
}}
|
|
340
|
-
>
|
|
335
|
+
<Card>
|
|
341
336
|
<Text fontSize="$4" fontWeight="bold">
|
|
342
337
|
Current Filters:
|
|
343
338
|
</Text>
|
|
344
339
|
<pre style={{ fontSize: "12px", margin: 0 }}>{JSON.stringify(filters, null, 2)}</pre>
|
|
345
|
-
</
|
|
340
|
+
</Card>
|
|
346
341
|
</YStack>
|
|
347
342
|
);
|
|
348
343
|
};
|
|
@@ -417,16 +412,9 @@ export const Accessibility: Story = {
|
|
|
417
412
|
filters: sampleFilters,
|
|
418
413
|
},
|
|
419
414
|
render: (args) => (
|
|
420
|
-
<
|
|
415
|
+
<YStack gap="$4">
|
|
421
416
|
<DataTableFilters {...args} />
|
|
422
|
-
<
|
|
423
|
-
style={{
|
|
424
|
-
marginTop: "20px",
|
|
425
|
-
padding: "16px",
|
|
426
|
-
background: "#f8f9fa",
|
|
427
|
-
borderRadius: "4px",
|
|
428
|
-
}}
|
|
429
|
-
>
|
|
417
|
+
<Card>
|
|
430
418
|
<Text fontSize="$4" fontWeight="bold">
|
|
431
419
|
Accessibility Features:
|
|
432
420
|
</Text>
|
|
@@ -437,8 +425,8 @@ export const Accessibility: Story = {
|
|
|
437
425
|
<li>Focus management between filter controls</li>
|
|
438
426
|
<li>Proper semantic markup for filter badges</li>
|
|
439
427
|
</ul>
|
|
440
|
-
</
|
|
441
|
-
</
|
|
428
|
+
</Card>
|
|
429
|
+
</YStack>
|
|
442
430
|
),
|
|
443
431
|
};
|
|
444
432
|
|
|
@@ -434,7 +434,7 @@ function GroupHeader<T = any>({
|
|
|
434
434
|
<Text {...knobProps.label} fontWeight="400" numberOfLines={1}>
|
|
435
435
|
{label}
|
|
436
436
|
</Text>
|
|
437
|
-
<Text fontSize={metaSize} color="$
|
|
437
|
+
<Text fontSize={metaSize} color="$color11">
|
|
438
438
|
({countLabel})
|
|
439
439
|
</Text>
|
|
440
440
|
</XStack>
|
|
@@ -443,7 +443,7 @@ function GroupHeader<T = any>({
|
|
|
443
443
|
<XStack gap="$3" flexWrap="wrap" justifyContent="flex-end">
|
|
444
444
|
{aggregations.map((agg, index) => (
|
|
445
445
|
<XStack key={index} alignItems="baseline" gap="$1">
|
|
446
|
-
<Text fontSize={metaSize} color="$
|
|
446
|
+
<Text fontSize={metaSize} color="$color11">
|
|
447
447
|
{`${agg.label || `${agg.function}(${agg.column})`}:`}
|
|
448
448
|
</Text>
|
|
449
449
|
<Text {...knobProps.label} fontWeight="400">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Card } from "@multiplatform.one/components";
|
|
1
2
|
import { action } from "@multiplatform.one/storybook";
|
|
2
3
|
import type { GuardrailSpecimenParameter } from "@multiplatform.one/theme";
|
|
3
4
|
import { Preset } from "@multiplatform.one/theme";
|
|
@@ -283,14 +284,7 @@ export const NavigationDemo: Story = {
|
|
|
283
284
|
onPaginationChange={handlePaginationChange}
|
|
284
285
|
/>
|
|
285
286
|
|
|
286
|
-
<
|
|
287
|
-
gap="$2"
|
|
288
|
-
style={{
|
|
289
|
-
padding: "16px",
|
|
290
|
-
background: "#e8f4fd",
|
|
291
|
-
borderRadius: "4px",
|
|
292
|
-
}}
|
|
293
|
-
>
|
|
287
|
+
<Card>
|
|
294
288
|
<Text fontSize="$5" fontWeight="600">
|
|
295
289
|
Navigation Controls:
|
|
296
290
|
</Text>
|
|
@@ -344,7 +338,7 @@ export const NavigationDemo: Story = {
|
|
|
344
338
|
Last
|
|
345
339
|
</Button>
|
|
346
340
|
</XStack>
|
|
347
|
-
</
|
|
341
|
+
</Card>
|
|
348
342
|
</YStack>
|
|
349
343
|
);
|
|
350
344
|
};
|
|
@@ -377,14 +371,7 @@ export const PageSizeDemo: Story = {
|
|
|
377
371
|
onPaginationChange={handlePaginationChange}
|
|
378
372
|
/>
|
|
379
373
|
|
|
380
|
-
<
|
|
381
|
-
gap="$2"
|
|
382
|
-
style={{
|
|
383
|
-
padding: "16px",
|
|
384
|
-
background: "#f0f9ff",
|
|
385
|
-
borderRadius: "4px",
|
|
386
|
-
}}
|
|
387
|
-
>
|
|
374
|
+
<Card>
|
|
388
375
|
<Text fontSize="$5" fontWeight="600">
|
|
389
376
|
Page Size Options:
|
|
390
377
|
</Text>
|
|
@@ -394,20 +381,13 @@ export const PageSizeDemo: Story = {
|
|
|
394
381
|
key={size}
|
|
395
382
|
onPress={() => handlePaginationChange({ pageIndex: 0, pageSize: size })}
|
|
396
383
|
size="$2"
|
|
397
|
-
{
|
|
398
|
-
padding: "$1",
|
|
399
|
-
backgroundColor: pagination.pageSize === size ? "$blue10" : "$gray2",
|
|
400
|
-
color: pagination.pageSize === size ? "white" : "$gray12",
|
|
401
|
-
borderWidth: 1,
|
|
402
|
-
borderColor: "$gray6",
|
|
403
|
-
borderRadius: "$2",
|
|
404
|
-
} as any)}
|
|
384
|
+
accent={pagination.pageSize === size}
|
|
405
385
|
>
|
|
406
386
|
{size}
|
|
407
387
|
</Button>
|
|
408
388
|
))}
|
|
409
389
|
</XStack>
|
|
410
|
-
</
|
|
390
|
+
</Card>
|
|
411
391
|
</YStack>
|
|
412
392
|
);
|
|
413
393
|
};
|
|
@@ -454,14 +434,7 @@ export const PageJumpDemo: Story = {
|
|
|
454
434
|
onPaginationChange={handlePaginationChange}
|
|
455
435
|
/>
|
|
456
436
|
|
|
457
|
-
<
|
|
458
|
-
gap="$2"
|
|
459
|
-
style={{
|
|
460
|
-
padding: "16px",
|
|
461
|
-
background: "#fff3cd",
|
|
462
|
-
borderRadius: "4px",
|
|
463
|
-
}}
|
|
464
|
-
>
|
|
437
|
+
<Card>
|
|
465
438
|
<Text fontSize="$5" fontWeight="600">
|
|
466
439
|
Page Jump:
|
|
467
440
|
</Text>
|
|
@@ -483,7 +456,7 @@ export const PageJumpDemo: Story = {
|
|
|
483
456
|
Go
|
|
484
457
|
</Button>
|
|
485
458
|
</XStack>
|
|
486
|
-
</
|
|
459
|
+
</Card>
|
|
487
460
|
</YStack>
|
|
488
461
|
);
|
|
489
462
|
};
|
|
@@ -508,16 +481,9 @@ export const Accessibility: Story = {
|
|
|
508
481
|
...Basic.args,
|
|
509
482
|
},
|
|
510
483
|
render: (args) => (
|
|
511
|
-
<
|
|
484
|
+
<YStack gap="$4">
|
|
512
485
|
<DataTablePagination {...args} />
|
|
513
|
-
<
|
|
514
|
-
style={{
|
|
515
|
-
marginTop: "20px",
|
|
516
|
-
padding: "16px",
|
|
517
|
-
background: "#f8f9fa",
|
|
518
|
-
borderRadius: "4px",
|
|
519
|
-
}}
|
|
520
|
-
>
|
|
486
|
+
<Card>
|
|
521
487
|
<Text fontSize="$5" fontWeight="600">
|
|
522
488
|
Accessibility Features:
|
|
523
489
|
</Text>
|
|
@@ -529,8 +495,8 @@ export const Accessibility: Story = {
|
|
|
529
495
|
<Text>• Focus management between controls</Text>
|
|
530
496
|
<Text>• Proper semantic markup for pagination info</Text>
|
|
531
497
|
</YStack>
|
|
532
|
-
</
|
|
533
|
-
</
|
|
498
|
+
</Card>
|
|
499
|
+
</YStack>
|
|
534
500
|
),
|
|
535
501
|
};
|
|
536
502
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
import { getGroupPosition, stackRadiusProps, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
9
9
|
import React, { useState } from "react";
|
|
10
10
|
import { Button, FloatingPanel, Input, Slider, Switch } from "@multiplatform.one/forms";
|
|
11
|
-
import { DropdownMenu } from "@multiplatform.one/components";
|
|
12
|
-
import {
|
|
11
|
+
import { DropdownMenu, ScrollView } from "@multiplatform.one/components";
|
|
12
|
+
import { Separator, Text, View, XStack, YStack, useTheme } from "tamagui";
|
|
13
13
|
import type { TableView } from "../../types";
|
|
14
14
|
import { t } from "../../shared/t";
|
|
15
15
|
import { iconSizeForToken } from "../../utils/chromeIcons";
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* borderRadius, elevation, and sizing across the table package.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { DialogShowFocus } from "@multiplatform.one/components";
|
|
9
10
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
10
11
|
import type React from "react";
|
|
11
12
|
import { Dialog } from "tamagui";
|
|
@@ -62,6 +63,7 @@ export function KnobDialogContent({ children, minWidth }: KnobDialogContentProps
|
|
|
62
63
|
{...(minWidth ? { minWidth } : {})}
|
|
63
64
|
>
|
|
64
65
|
{children}
|
|
66
|
+
<DialogShowFocus />
|
|
65
67
|
</Dialog.Content>
|
|
66
68
|
</Dialog.Portal>
|
|
67
69
|
);
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
* viewing with a single "Close".
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { DialogContent, DialogOverlay } from "@multiplatform.one/components";
|
|
12
|
+
import { DialogContent, DialogOverlay, ScrollView } from "@multiplatform.one/components";
|
|
13
13
|
import { Button } from "@multiplatform.one/forms";
|
|
14
14
|
import { TableCellContext } from "@multiplatform.one/table-primitives";
|
|
15
15
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
16
16
|
import { PencilSimpleIcon } from "@phosphor-icons/react";
|
|
17
17
|
import { useCallback, useRef, useState } from "react";
|
|
18
|
-
import { Dialog,
|
|
18
|
+
import { Dialog, Text, XStack, YStack } from "tamagui";
|
|
19
19
|
import type {
|
|
20
20
|
DataTableColumn,
|
|
21
21
|
DataTableData,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FontSizeTokens } from "tamagui";
|
|
2
|
+
/**
|
|
3
|
+
* A custom cell's output with every bare string or number riding house Text
|
|
4
|
+
* (LC-82 TEXT-RIDES-TEXT, AN-8), on web and native alike (MPO-446).
|
|
5
|
+
*
|
|
6
|
+
* tanstack's default cell and the common `cell: (info) => info.getValue()`
|
|
7
|
+
* return primitives, and flexRender turns a function renderer into an
|
|
8
|
+
* element, which hides the primitive from the caller. On web the value then
|
|
9
|
+
* lands as a text node in the cell's View and takes neither the fontWeight
|
|
10
|
+
* nor the bodyFont knob; on native RN drops it outright. So a plain function
|
|
11
|
+
* renderer is called here and what it returns is wrapped. Class and exotic
|
|
12
|
+
* components still go through flexRender.
|
|
13
|
+
*/
|
|
14
|
+
export declare function CellContent({ cellDef, ctx, fontSize, }: {
|
|
15
|
+
cellDef: unknown;
|
|
16
|
+
ctx: unknown;
|
|
17
|
+
fontSize: FontSizeTokens;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=CellContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellContent.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/CellContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA0C9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,GAAG,EACH,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;CAC1B,2CAMA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infinite mode tail, shared by the web and native roots: the load-more
|
|
3
|
+
* trigger each platform supplies, an append skeleton bounded by the actual
|
|
4
|
+
* load (no infinite spinner), and an honest, announced end-of-data state
|
|
5
|
+
* (DG-ST-01/04).
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactNode } from "react";
|
|
8
|
+
import type { DataTableInfiniteState } from "../../types";
|
|
9
|
+
export interface DataTableInfiniteTailProps {
|
|
10
|
+
infinite: DataTableInfiniteState;
|
|
11
|
+
/** Rows on screen now, for "Showing N of M". */
|
|
12
|
+
visibleCount: number;
|
|
13
|
+
/** False when the virtualizer draws its own skeleton row. */
|
|
14
|
+
showAppendSkeleton: boolean;
|
|
15
|
+
rowHeightPx: number;
|
|
16
|
+
fontSize: any;
|
|
17
|
+
gapProps?: Record<string, unknown>;
|
|
18
|
+
/** The platform's load-more trigger; absent once the data is exhausted. */
|
|
19
|
+
sentinel?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function DataTableInfiniteTail({ infinite, visibleCount, showAppendSkeleton, rowHeightPx, fontSize, gapProps, sentinel, }: DataTableInfiniteTailProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=DataTableInfiniteTail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableInfiniteTail.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInfiniteTail.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,0BAA0B,2CA0D5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRoot.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAcH,OAAO,KAA4D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableRoot.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAcH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAQjF,OAAO,KAAK,EAIV,cAAc,EAEf,MAAM,aAAa,CAAC;AAkDrB,MAAM,WAAW,kBAAkB,CACjC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACvD,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC7B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EACrF,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,eAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,cAAc,EAC1B,WAAmB,EACnB,aAAmB,EACnB,WAAW,EACX,eAAuB,EACvB,gBAAwB,EACxB,aAAqB,EACrB,eAAsB,EACtB,gBAAgB,EAChB,aAAoB,EACpB,gBAAuB,EACvB,eAAe,EACf,cAAwB,EACxB,QAAQ,EACR,cAAc,EACd,sBAA6B,EAC7B,oBAA4B,EAC5B,oBAA4B,EAC5B,kBAAyB,EACzB,WAAmB,EACnB,YAAsB,EACtB,MAAe,EACf,oBAA4B,EAC5B,oBAAoB,EACpB,sBAA0B,EAC1B,kBAA0B,EAC1B,kBAAkB,EAClB,UAAU,EACV,mBAA2B,EAC3B,gBAAoB,EACpB,cAAsB,EACtB,wBAAgC,EAChC,UAAU,EACV,QAAQ,EACR,kBAA0B,EAC1B,cAAc,EAAE,kBAAkB,EAClC,WAAW,EACX,QAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,IAAI,EAAE,QAAQ,EACd,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,OAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,aAAa,EAAE,cAAc,EAC7B,SAAS,EACT,IAAI,EACJ,OAAe,EACf,QAAgB,EAChB,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,eAAe,EACnC,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,KAAK,CAAC,2CA0oE3B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native load-more trigger for DataTable's infinite mode.
|
|
3
|
+
*
|
|
4
|
+
* Web watches its sentinel with an IntersectionObserver. React Native has
|
|
5
|
+
* none, and the table never sees its host's scroll events: the backoffice
|
|
6
|
+
* list scrolls the whole screen in a ScrollView the table sits inside. So
|
|
7
|
+
* the sentinel asks where it is on screen, on a short interval while more
|
|
8
|
+
* pages exist, and fires once it comes within `leadPx` of the window's
|
|
9
|
+
* bottom edge, the same lead web gives its observer.
|
|
10
|
+
*/
|
|
11
|
+
export declare const NATIVE_SENTINEL_POLL_MS = 250;
|
|
12
|
+
export interface NativeInfiniteSentinelProps {
|
|
13
|
+
onVisible: () => void;
|
|
14
|
+
leadPx: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function NativeInfiniteSentinel({ onVisible, leadPx }: NativeInfiniteSentinelProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=NativeInfiniteSentinel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeInfiniteSentinel.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/NativeInfiniteSentinel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,2BAA2B,2CAuBxF"}
|
|
@@ -17,7 +17,7 @@ export { DataTableContext } from "./DataTableContext";
|
|
|
17
17
|
export { DataTableStateContext, useDataTableState } from "./DataTableStateContext";
|
|
18
18
|
export type { DataTableStateContextValue } from "./DataTableStateContext";
|
|
19
19
|
export type { DataTableRootProps } from "./DataTableRoot";
|
|
20
|
-
declare function DataTableRoot<TData extends Record<string, any> = Record<string, any>>({ data, columns, initialState, onStateChange, onRetry, isLoading: isLoadingProp, isFetching: isFetchingProp, syncWithUrl, urlDebounceMs, urlStrategy, manualFiltering, manualPagination, manualSorting, enableFiltering, enableSorting, enablePagination, pageSizeOptions, enableColumnVisibility, enableColumnOrdering, enableColumnResizing, enableGlobalSearch, enableViews, layout, enableVirtualization, virtualizationHeight, virtualizationOverscan, enableRowExpansion, renderSubComponent, enableRowSelection, selectAllScope: selectAllScopeProp, enableColumnPinning, maxPinnedColumns, enableKeyboardNavigation: _enableKeyboardNavigation, onRowPress, rowLabel, readOnly, onCellChange, name, form: formProp, showRowNumbers, showAddRow, showDeleteRow, minRows, maxRows, defaultRow, onDataChange, rowCount, pageCount, renderToolbar, renderPagination, renderFilters, className: _className, size, compact, disabled, accent, error, warning, success, children, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, ...props }: DataTableRootProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DataTableRoot<TData extends Record<string, any> = Record<string, any>>({ data, columns, initialState, controlledState, onStateChange, onRetry, isLoading: isLoadingProp, isFetching: isFetchingProp, syncWithUrl, urlDebounceMs, urlStrategy, manualFiltering, manualPagination, manualSorting, enableFiltering, filterableFields, enableSorting, enablePagination, pageSizeOptions, paginationMode, loadPage, rowAccumulator, enableColumnVisibility, enableColumnOrdering, enableColumnResizing, enableGlobalSearch, enableViews, columnLayout, layout, enableVirtualization, virtualizationHeight, virtualizationOverscan, enableRowExpansion, renderSubComponent, getSubRows, enableRowSelection, selectAllScope: selectAllScopeProp, bulkActions, enableColumnPinning, maxPinnedColumns, enableGrouping, enableKeyboardNavigation: _enableKeyboardNavigation, onRowPress, rowLabel, readOnly, onCellChange, name, form: formProp, showRowNumbers, showAddRow, showDeleteRow, minRows, maxRows, defaultRow, onDataChange, rowCount, pageCount, renderToolbar, renderPagination, renderFilters, className: _className, size, compact, disabled, accent, error, warning, success, children, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, ...props }: DataTableRootProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export declare const DataTable: typeof DataTableRoot & {
|
|
22
22
|
Toolbar: typeof DataTableToolbar;
|
|
23
23
|
Filters: typeof DataTableFilters;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.native.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.native.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwBH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAYzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA0D1D,iBAAS,aAAa,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAC9E,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,eAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,cAAc,EAC1B,WAAmB,EACnB,aAAmB,EACnB,WAAW,EACX,eAAuB,EACvB,gBAAwB,EACxB,aAAqB,EACrB,eAAsB,EACtB,gBAAgB,EAChB,aAAoB,EACpB,gBAAuB,EACvB,eAAe,EACf,cAAwB,EACxB,QAAQ,EACR,cAAc,EACd,sBAA6B,EAC7B,oBAA4B,EAC5B,oBAA4B,EAC5B,kBAAyB,EACzB,WAAmB,EACnB,YAAsB,EACtB,MAAe,EACf,oBAA4B,EAC5B,oBAAoB,EACpB,sBAA0B,EAC1B,kBAA0B,EAC1B,kBAAkB,EAClB,UAAU,EACV,kBAA0B,EAC1B,cAAc,EAAE,kBAAkB,EAClC,WAAW,EACX,mBAA2B,EAC3B,gBAAoB,EACpB,cAAsB,EACtB,wBAAwB,EAAE,yBAAiC,EAC3D,UAAU,EACV,QAAQ,EACR,QAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,IAAI,EAAE,QAAQ,EACd,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,OAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,SAAS,EAAE,UAAU,EACrB,IAAI,EACJ,OAAe,EACf,QAAgB,EAChB,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,eAAe,EACnC,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,KAAK,CAAC,2CAu+B3B;AAED,eAAO,MAAM,SAAS;;;;;;;;;;CAUpB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTableBulkActions/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG;IAChD,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACvB,iFAAiF;IACjF,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC9B;AAED,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTableBulkActions/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG;IAChD,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACvB,iFAAiF;IACjF,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC9B;AAED,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAAC,CAAC,kDAwOhF;AA8CD,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,GAAG;IAC7C,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,GAAG;IAC5C,aAAa,EAAE,CAAC,EAAE,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAClC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,EACvC,IAAI,EACJ,YAA8B,EAC9B,gBAAqB,EACrB,iBAAiB,GAClB,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CA2DtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTableCell/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTableCell/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkDH,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKvE,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,KAAK,EAAE,GAAG,CAAC;IACX,uEAAuE;IACvE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,kCAAkC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAe,EACf,UAAe,EACf,QAAQ,EACR,QAAgB,EAChB,QAAgB,EAChB,QAAQ,EACR,WAAW,EACX,QAAQ,EAAE,SAAS,EACnB,OAAO,EACP,IAAI,EACJ,OAAO,EACP,WAAW,EAAE,YAAY,EACzB,cAAc,EAAE,eAAe,GAChC,EAAE,kBAAkB,2CAs0BpB"}
|