mn-angular-lib 2.0.24 → 2.0.26
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/package.json
CHANGED
|
@@ -794,6 +794,13 @@ type ColumnBase<T> = {
|
|
|
794
794
|
* a date that comes first but is not the row's name, an image that should not be text.
|
|
795
795
|
*/
|
|
796
796
|
mobile?: MnColumnMobileSlot;
|
|
797
|
+
/**
|
|
798
|
+
* Whether this row has no value for the column. Below 640px an empty value is left off the
|
|
799
|
+
* composed row and the detail sheet, label included. A string cell needs nothing: a blank or
|
|
800
|
+
* lone-dash value is caught already. Set it on a template cell, whose markup the table cannot
|
|
801
|
+
* read, when that template draws a placeholder ("-") for "nothing".
|
|
802
|
+
*/
|
|
803
|
+
isEmpty?: (row: T) => boolean;
|
|
797
804
|
/** Customizes the loading-skeleton placeholder shown in this column's cells while data loads. */
|
|
798
805
|
skeleton?: ColumnSkeleton;
|
|
799
806
|
};
|
|
@@ -1040,7 +1047,11 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
1040
1047
|
* run the consumer's row handler as on a wide table, open the detail sheet, or nothing.
|
|
1041
1048
|
*/
|
|
1042
1049
|
rowTap(row: T): MnTableRowTap;
|
|
1043
|
-
/**
|
|
1050
|
+
/**
|
|
1051
|
+
* Whether a row needs its own ⋯ button for the sheet, because a tap already does something
|
|
1052
|
+
* else. A row that opens the consumer's own detail (`onRowClick`) gets one only for actions:
|
|
1053
|
+
* a sheet with nothing but the same record next to that detail was two views of one row.
|
|
1054
|
+
*/
|
|
1044
1055
|
showsRowMore(row: T): boolean;
|
|
1045
1056
|
/** Whether a row shows its actions as a ⋯ menu: inside a modal, where there is no sheet. */
|
|
1046
1057
|
showsRowMenu(row: T): boolean;
|
|
@@ -1062,17 +1073,28 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
1062
1073
|
*/
|
|
1063
1074
|
runDetailAction(action: MnTableRowAction<T>, row: T): Promise<void>;
|
|
1064
1075
|
/**
|
|
1065
|
-
* The text a composed row shows for a string column:
|
|
1066
|
-
* form
|
|
1076
|
+
* The text a composed row shows for a string column: the full cell. Not `cellSm` — that is the
|
|
1077
|
+
* short form an app wrote for a squeezed grid column (an e-mail cut to ten characters, a status
|
|
1078
|
+
* reduced to an icon), and a composed row has the room the grid column lacked.
|
|
1067
1079
|
*/
|
|
1068
1080
|
rowCellText(column: ColumnDefinition<T>, row: T): string;
|
|
1069
|
-
/** The template a composed row renders for a column
|
|
1081
|
+
/** The template a composed row renders for a column; null for a string column. */
|
|
1070
1082
|
rowCellTemplate(column: ColumnDefinition<T>): TemplateRef<unknown> | null;
|
|
1071
1083
|
/**
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1084
|
+
* Whether a cell is empty for this row: what the column's `isEmpty` says, else for a string
|
|
1085
|
+
* cell blank or the lone dash an app writes for "nothing". Such a value is left off the
|
|
1086
|
+
* composed row and the detail sheet ("Beschrijving: -" said nothing). A template cell without
|
|
1087
|
+
* `isEmpty` is never judged empty — its markup is the app's.
|
|
1088
|
+
*/
|
|
1089
|
+
rowValueEmpty(column: ColumnDefinition<T>, row: T): boolean;
|
|
1090
|
+
/** The second-line columns that have something to show for this row. */
|
|
1091
|
+
rowMeta(row: T): ColumnDefinition<T>[];
|
|
1092
|
+
/**
|
|
1093
|
+
* The column name a composed row shows beside a second-line or right-side value: with no
|
|
1094
|
+
* header row, "Lid", "1-12-2023" or "535" alone does not say what it is. Empty for a template
|
|
1095
|
+
* cell — a badge or an icon carries its own meaning, and its markup is the app's.
|
|
1074
1096
|
*/
|
|
1075
|
-
|
|
1097
|
+
rowSlotLabel(column: ColumnDefinition<T>): string;
|
|
1076
1098
|
/** A row's name as text, for accessible names: its title cell, else the selection label. */
|
|
1077
1099
|
rowLabel(row: T): string;
|
|
1078
1100
|
/** Accessible name of a row's ⋯ button. */
|
|
@@ -1081,9 +1103,22 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
1081
1103
|
get sortableColumns(): ColumnDefinition<T>[];
|
|
1082
1104
|
/**
|
|
1083
1105
|
* Whether the toolbar shows the filter button: below 640px, when there is a filter to set or
|
|
1084
|
-
* a sort to choose — the header row that held both is gone there.
|
|
1106
|
+
* a sort to choose — the header row that held both is gone there. Not over an empty or
|
|
1107
|
+
* one-row list, where there is nothing to narrow or order, unless a filter or sort is
|
|
1108
|
+
* already set (then the button is how to undo it).
|
|
1085
1109
|
*/
|
|
1086
1110
|
get showsFilterButton(): boolean;
|
|
1111
|
+
/**
|
|
1112
|
+
* Whether the search field shows: as always on a wide table, but below 640px not over an empty
|
|
1113
|
+
* or one-row list (there is nothing to find), unless a search is already typed or rows are
|
|
1114
|
+
* still loading.
|
|
1115
|
+
*/
|
|
1116
|
+
get showsSearch(): boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* Whether the pagination strip shows. Below 640px not for a single page: "Page 1 of 1" under
|
|
1119
|
+
* an empty or short list is chrome with nothing to do. Above it the strip stays as it was.
|
|
1120
|
+
*/
|
|
1121
|
+
get showsPagination(): boolean;
|
|
1087
1122
|
/** How many column filters are set, shown as a count on the filter button. */
|
|
1088
1123
|
get activeFilterCount(): number;
|
|
1089
1124
|
/**
|