@pagamio/frontend-commons-lib 0.8.334 → 0.8.335
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/lib/api/swr.d.ts +1 -1
- package/lib/components/ui/Label.d.ts +1 -1
- package/lib/components/ui/Sheet.d.ts +1 -1
- package/lib/components/ui/StatCard.d.ts +3 -3
- package/lib/dashboard-visuals/hooks/useChartData.d.ts +1 -1
- package/lib/dashboard-visuals/utils/formatUtil.js +1 -0
- package/lib/pagamio-table/data-table/exportUtils.js +5 -0
- package/lib/pagamio-table/data-table/pdfExportUtils.js +3 -0
- package/package.json +2 -2
package/lib/api/swr.d.ts
CHANGED
|
@@ -42,5 +42,5 @@ export declare function useApiSWRWithMutation<ResponseData>(endpoint: Key, confi
|
|
|
42
42
|
data: ResponseData | undefined;
|
|
43
43
|
error: ApiErrorResponse | undefined;
|
|
44
44
|
isValidating: boolean;
|
|
45
|
-
isLoading: import("swr/
|
|
45
|
+
isLoading: import("swr/_internal").IsLoadingResponse<Data, Config>;
|
|
46
46
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
5
|
export default Label;
|
|
@@ -9,7 +9,7 @@ declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
|
9
9
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const sheetVariants: (props?: ({
|
|
11
11
|
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
12
|
-
} & import("class-variance-authority/
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
14
14
|
}
|
|
15
15
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,15 +3,15 @@ import * as React from 'react';
|
|
|
3
3
|
declare const statCardVariants: (props?: ({
|
|
4
4
|
variant?: "green" | "orange" | "teal" | "dark" | "light" | "primary" | "light-orange" | "light-teal" | "light-green" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare const iconContainerVariants: (props?: ({
|
|
8
8
|
variant?: "green" | "orange" | "teal" | "dark" | "light" | "primary" | "light-orange" | "light-teal" | "light-green" | null | undefined;
|
|
9
9
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare const changeIndicatorVariants: (props?: ({
|
|
12
12
|
direction?: "up" | "down" | "neutral" | null | undefined;
|
|
13
13
|
onSolid?: boolean | null | undefined;
|
|
14
|
-
} & import("class-variance-authority/
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
export interface StatCardChange {
|
|
16
16
|
/** Percentage value (e.g., 22 for 22%) */
|
|
17
17
|
value: number;
|
|
@@ -7,7 +7,7 @@ import type { MetricData } from '../types';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const useChartData: <T = MetricData[], TransformReturnType = T>(url: string, query: QueryProps, transform?: (data: T) => TransformReturnType) => {
|
|
9
9
|
data: T | TransformReturnType | undefined;
|
|
10
|
-
error: import("
|
|
10
|
+
error: import("../..").ApiErrorResponse | undefined;
|
|
11
11
|
loading: boolean;
|
|
12
12
|
isEmpty: boolean;
|
|
13
13
|
refresh: () => Promise<any>;
|
|
@@ -57,6 +57,7 @@ const formatDateValue = (value) => {
|
|
|
57
57
|
day: 'numeric',
|
|
58
58
|
hour: '2-digit',
|
|
59
59
|
minute: '2-digit',
|
|
60
|
+
hour12: false,
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
// Handle ISO date strings - more comprehensive regex
|
|
@@ -72,6 +73,7 @@ const formatDateValue = (value) => {
|
|
|
72
73
|
day: 'numeric',
|
|
73
74
|
hour: '2-digit',
|
|
74
75
|
minute: '2-digit',
|
|
76
|
+
hour12: false,
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
79
|
}
|
|
@@ -246,6 +248,7 @@ export const exportToCsv = (data, columns, options = {}) => {
|
|
|
246
248
|
day: 'numeric',
|
|
247
249
|
hour: '2-digit',
|
|
248
250
|
minute: '2-digit',
|
|
251
|
+
hour12: false,
|
|
249
252
|
})}`;
|
|
250
253
|
csvRows.push(`# ${timestamp}`);
|
|
251
254
|
}
|
|
@@ -330,6 +333,7 @@ const createWorksheetData = (title, subtitle, includeTimestamp, headers, formatt
|
|
|
330
333
|
day: 'numeric',
|
|
331
334
|
hour: '2-digit',
|
|
332
335
|
minute: '2-digit',
|
|
336
|
+
hour12: false,
|
|
333
337
|
})}`;
|
|
334
338
|
worksheetData.push([timestamp]);
|
|
335
339
|
currentRow++;
|
|
@@ -582,6 +586,7 @@ export const exportToPdf = async (data, columns, options = {}) => {
|
|
|
582
586
|
day: 'numeric',
|
|
583
587
|
hour: '2-digit',
|
|
584
588
|
minute: '2-digit',
|
|
589
|
+
hour12: false,
|
|
585
590
|
})}`, colors, logo, } = options;
|
|
586
591
|
// Create PDF document with better settings
|
|
587
592
|
const doc = new jsPDF({
|
|
@@ -14,6 +14,7 @@ export const createPdfExportOptions = (config, title) => {
|
|
|
14
14
|
day: 'numeric',
|
|
15
15
|
hour: '2-digit',
|
|
16
16
|
minute: '2-digit',
|
|
17
|
+
hour12: false,
|
|
17
18
|
})}`,
|
|
18
19
|
colors: {
|
|
19
20
|
primary: config.theme.colors.primary,
|
|
@@ -42,6 +43,7 @@ export const createXlsxExportOptions = (config, title, sheetName) => {
|
|
|
42
43
|
day: 'numeric',
|
|
43
44
|
hour: '2-digit',
|
|
44
45
|
minute: '2-digit',
|
|
46
|
+
hour12: false,
|
|
45
47
|
})}`,
|
|
46
48
|
colors: {
|
|
47
49
|
primary: config.theme.colors.primary,
|
|
@@ -67,6 +69,7 @@ export const createDefaultXlsxExportOptions = (title, sheetName) => {
|
|
|
67
69
|
day: 'numeric',
|
|
68
70
|
hour: '2-digit',
|
|
69
71
|
minute: '2-digit',
|
|
72
|
+
hour12: false,
|
|
70
73
|
})}`,
|
|
71
74
|
colors: {
|
|
72
75
|
primary: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagamio/frontend-commons-lib",
|
|
3
3
|
"description": "Pagamio library for Frontend reusable components like the form engine and table container",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.335",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": false
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"build:watch": "tsc --watch",
|
|
84
84
|
"build": "rm -rf lib && tsc && yarn build:css && yarn copy-locale-files",
|
|
85
85
|
"build:css": "postcss src/index.css -o lib/styles.css",
|
|
86
|
-
"lint": "eslint
|
|
86
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
87
87
|
"lint:fix": "eslint . --fix",
|
|
88
88
|
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss}\"",
|
|
89
89
|
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss}\"",
|