@gtkx/components 2.0.0-beta.5 → 2.0.0-beta.7
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/README.md +43 -40
- package/dist/column-view.d.ts.map +1 -1
- package/dist/column-view.js +1 -0
- package/dist/column-view.js.map +1 -1
- package/dist/internal/cells.d.ts +11 -1
- package/dist/internal/cells.d.ts.map +1 -1
- package/dist/internal/cells.js +122 -24
- package/dist/internal/cells.js.map +1 -1
- package/dist/internal/collection-model.d.ts +5 -5
- package/dist/internal/collection-model.d.ts.map +1 -1
- package/dist/internal/collection-model.js +35 -35
- package/dist/internal/collection-model.js.map +1 -1
- package/dist/list-view.d.ts.map +1 -1
- package/dist/list-view.js +1 -0
- package/dist/list-view.js.map +1 -1
- package/dist/types.d.ts +11 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -8
- package/src/column-view.tsx +1 -0
- package/src/internal/cells.tsx +198 -38
- package/src/internal/collection-model.ts +41 -41
- package/src/list-view.tsx +1 -0
- package/src/types.ts +13 -1
package/src/list-view.tsx
CHANGED
package/src/types.ts
CHANGED
|
@@ -90,6 +90,16 @@ type ItemSizeProps = {
|
|
|
90
90
|
estimatedItemWidth?: number | undefined;
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
/** The flat-collection hint shared by {@link ListView} and {@link ColumnView}. */
|
|
94
|
+
type FlatnessProps = {
|
|
95
|
+
/**
|
|
96
|
+
* Declares every item a leaf, so the view skips tree discovery when synchronising a large collection
|
|
97
|
+
* instead of scanning each item for `children`. Must not be set when any item has children: those
|
|
98
|
+
* items would render as plain rows that never expand.
|
|
99
|
+
*/
|
|
100
|
+
isFlat?: boolean | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
93
103
|
/** Controlled selection shared by the multi-item collection views. */
|
|
94
104
|
type SelectionProps = {
|
|
95
105
|
/**
|
|
@@ -172,6 +182,7 @@ type ColumnViewOwnProps<T, S> = SelectionProps &
|
|
|
172
182
|
ExpansionProps &
|
|
173
183
|
SortProps &
|
|
174
184
|
SourceProps<T, S> &
|
|
185
|
+
FlatnessProps &
|
|
175
186
|
Omit<ItemSizeProps, "estimatedItemWidth"> & {
|
|
176
187
|
/** Columns to render, in order; each carries its own cell renderer. */
|
|
177
188
|
columns: ColumnViewColumn<T>[];
|
|
@@ -242,7 +253,8 @@ type GridViewProps<T = unknown> = Omit<GtkGridViewProps, "model" | "factory" | k
|
|
|
242
253
|
type ListViewOwnProps<T, S> = ItemSizeProps &
|
|
243
254
|
SelectionProps &
|
|
244
255
|
ExpansionProps &
|
|
245
|
-
SourceProps<T, S> &
|
|
256
|
+
SourceProps<T, S> &
|
|
257
|
+
FlatnessProps & {
|
|
246
258
|
/** Renders the contents of one row. */
|
|
247
259
|
renderItem: ListItemRenderer<T>;
|
|
248
260
|
/** Renders the header shown above each section. */
|