@balena/ui-shared-components 14.0.1-build-update-analytics-client-539b9f6d0e02c74e902c1f24a6c68a4c220a38a8-1 → 14.0.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.
|
@@ -7,5 +7,10 @@ interface FilterMutation extends JSONSchema {
|
|
|
7
7
|
$or?: any[];
|
|
8
8
|
}
|
|
9
9
|
export declare const convertToPineClientFilter: (parentKeys: string[], filter: FilterMutation | FilterMutation[]) => PineFilterObject | undefined;
|
|
10
|
-
export declare const orderbyBuilder: <T>(sortInfo: TableSortOptions<T> | null, customSort: RJSTContext<T>["customSort"]) =>
|
|
10
|
+
export declare const orderbyBuilder: <T>(sortInfo: TableSortOptions<T> | null, customSort: RJSTContext<T>["customSort"]) => ({
|
|
11
|
+
[x: string]: import("../components/Table/utils").Order;
|
|
12
|
+
id?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
id: import("../components/Table/utils").Order;
|
|
15
|
+
})[] | null;
|
|
11
16
|
export {};
|
|
@@ -190,7 +190,7 @@ export const orderbyBuilder = (sortInfo, customSort) => {
|
|
|
190
190
|
// The refScheme will reference the property path, e.g., owns_items[0].uuid.
|
|
191
191
|
const customOrderByKey = (_b = (_a = customSort === null || customSort === void 0 ? void 0 : customSort[`${field}_${refScheme}`]) !== null && _a !== void 0 ? _a : customSort === null || customSort === void 0 ? void 0 : customSort[field]) !== null && _b !== void 0 ? _b : (typeof sortInfo.sortable === 'string' ? sortInfo.sortable : undefined);
|
|
192
192
|
if (typeof customOrderByKey === 'string') {
|
|
193
|
-
return [
|
|
193
|
+
return [{ [customOrderByKey]: direction }, { id: direction }];
|
|
194
194
|
}
|
|
195
195
|
if (Array.isArray(customOrderByKey)) {
|
|
196
196
|
if (customOrderByKey.length === 0 ||
|
|
@@ -198,8 +198,8 @@ export const orderbyBuilder = (sortInfo, customSort) => {
|
|
|
198
198
|
throw new Error(`Field ${field} error: custom sort for this field must be of type string or a non empty string array, ${customOrderByKey.join(',')} is not accepted.`);
|
|
199
199
|
}
|
|
200
200
|
return [
|
|
201
|
-
...customOrderByKey.map((k) =>
|
|
202
|
-
|
|
201
|
+
...customOrderByKey.map((k) => ({ [k]: direction })),
|
|
202
|
+
{ id: direction },
|
|
203
203
|
];
|
|
204
204
|
}
|
|
205
205
|
if (customOrderByKey != null && typeof customOrderByKey !== 'string') {
|
|
@@ -209,5 +209,5 @@ export const orderbyBuilder = (sortInfo, customSort) => {
|
|
|
209
209
|
if (refScheme) {
|
|
210
210
|
fieldPath += `/${refScheme.replace(/\[(.*?)\]/g, '').replace(/\./g, '/')}`;
|
|
211
211
|
}
|
|
212
|
-
return [
|
|
212
|
+
return [{ [fieldPath]: direction }, { id: direction }];
|
|
213
213
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/ui-shared-components",
|
|
3
|
-
"version": "14.0.1
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ajv": "^8.17.1",
|
|
32
32
|
"ajv-formats": "^3.0.1",
|
|
33
33
|
"ajv-keywords": "^5.1.0",
|
|
34
|
-
"analytics-client": "^3.1.
|
|
34
|
+
"analytics-client": "^3.1.0",
|
|
35
35
|
"color": "^5.0.0",
|
|
36
36
|
"color-hash": "^2.0.2",
|
|
37
37
|
"date-fns": "^4.1.0",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
},
|
|
133
133
|
"homepage": "https://github.com/balena-io/ui-shared-components#readme",
|
|
134
134
|
"versionist": {
|
|
135
|
-
"publishedAt": "2025-09-
|
|
135
|
+
"publishedAt": "2025-09-05T09:43:23.628Z"
|
|
136
136
|
},
|
|
137
137
|
"overrides": {
|
|
138
138
|
"storybook": "$storybook"
|