@boarteam/boar-pack-common-frontend 2.5.0 → 2.5.1-alpha.1
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boarteam/boar-pack-common-frontend",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1-alpha.1",
|
|
4
4
|
"description": "Common frontend package for Boar Pack",
|
|
5
5
|
"repository": "git@github.com:boarteam/boar-pack.git",
|
|
6
6
|
"author": "Andrew Balakirev <balakirev.andrey@gmail.com>",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"yalc:push": "yalc push"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "38350d83b4625b1c128b1d99643af23e9b3a3f62"
|
|
50
50
|
}
|
|
@@ -36,7 +36,7 @@ export type TDescriptionsProps<Entity, CreateDto, UpdateDto, TPathParams = objec
|
|
|
36
36
|
requestBody: UpdateDto,
|
|
37
37
|
index?: number,
|
|
38
38
|
} & TPathParams) => Promise<Entity>,
|
|
39
|
-
onCreate
|
|
39
|
+
onCreate?: (data: Partial<Entity>) => Promise<void>;
|
|
40
40
|
onDelete?: ({}: Partial<Entity> & TPathParams) => Promise<void>,
|
|
41
41
|
pathParams?: TPathParams,
|
|
42
42
|
idColumnName?: string & keyof Entity,
|
|
@@ -129,6 +129,7 @@ export function applyKeywordToSearch(
|
|
|
129
129
|
export type TIndexableRecord = {
|
|
130
130
|
dataIndex?: Key | Key[];
|
|
131
131
|
children?: TIndexableRecord[] | React.ReactNode;
|
|
132
|
+
editable?: false;
|
|
132
133
|
};
|
|
133
134
|
|
|
134
135
|
export function collectFieldsFromColumns<T>(
|
|
@@ -149,7 +150,9 @@ export function buildFieldsFromColumnsForDescriptionsDisplay<T>(
|
|
|
149
150
|
if ('children' in col && Array.isArray(col.children)) {
|
|
150
151
|
buildFieldsFromColumnsForDescriptionsDisplay(col.children, idColumnName, fields);
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
+
if (col.editable !== false) {
|
|
154
|
+
fields.add(String(Array.isArray(col.dataIndex) ? col.dataIndex[0] : col.dataIndex));
|
|
155
|
+
}
|
|
153
156
|
});
|
|
154
157
|
|
|
155
158
|
return fields;
|