@harbortouch/skytab-analytics-report-utils 0.14.0 → 0.14.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/dist/index.cjs +3 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -787,7 +787,8 @@ var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
|
|
|
787
787
|
var getReportExportFileName = ({
|
|
788
788
|
reportType,
|
|
789
789
|
startDate,
|
|
790
|
-
endDate
|
|
790
|
+
endDate,
|
|
791
|
+
format
|
|
791
792
|
}) => {
|
|
792
793
|
const formatDate2 = (date) => {
|
|
793
794
|
return [
|
|
@@ -797,7 +798,7 @@ var getReportExportFileName = ({
|
|
|
797
798
|
].join("-");
|
|
798
799
|
};
|
|
799
800
|
const filename = REPORT_DEFAULT_NAME_MAP[reportType].replace(/\s+/g, "_") ?? "Report";
|
|
800
|
-
return `${filename}_${formatDate2(startDate)}_to_${formatDate2(endDate)}
|
|
801
|
+
return `${filename}_${formatDate2(startDate)}_to_${formatDate2(endDate)}.${format}`.toLocaleLowerCase();
|
|
801
802
|
};
|
|
802
803
|
|
|
803
804
|
// src/columns/index.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1246,10 +1246,11 @@ declare const Report: {
|
|
|
1246
1246
|
};
|
|
1247
1247
|
type ReportType = (typeof Report)[keyof typeof Report];
|
|
1248
1248
|
declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
|
|
1249
|
-
declare const getReportExportFileName: ({ reportType, startDate, endDate, }: {
|
|
1249
|
+
declare const getReportExportFileName: ({ reportType, startDate, endDate, format, }: {
|
|
1250
1250
|
reportType: ReportType;
|
|
1251
1251
|
startDate: Date;
|
|
1252
1252
|
endDate: Date;
|
|
1253
|
+
format: "csv" | "xlsx" | "pdf";
|
|
1253
1254
|
}) => string;
|
|
1254
1255
|
|
|
1255
1256
|
declare function getColumnAlignment(type?: FieldType): ColumnAlignment;
|
package/dist/index.d.ts
CHANGED
|
@@ -1246,10 +1246,11 @@ declare const Report: {
|
|
|
1246
1246
|
};
|
|
1247
1247
|
type ReportType = (typeof Report)[keyof typeof Report];
|
|
1248
1248
|
declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
|
|
1249
|
-
declare const getReportExportFileName: ({ reportType, startDate, endDate, }: {
|
|
1249
|
+
declare const getReportExportFileName: ({ reportType, startDate, endDate, format, }: {
|
|
1250
1250
|
reportType: ReportType;
|
|
1251
1251
|
startDate: Date;
|
|
1252
1252
|
endDate: Date;
|
|
1253
|
+
format: "csv" | "xlsx" | "pdf";
|
|
1253
1254
|
}) => string;
|
|
1254
1255
|
|
|
1255
1256
|
declare function getColumnAlignment(type?: FieldType): ColumnAlignment;
|
package/dist/index.js
CHANGED
|
@@ -724,7 +724,8 @@ var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
|
|
|
724
724
|
var getReportExportFileName = ({
|
|
725
725
|
reportType,
|
|
726
726
|
startDate,
|
|
727
|
-
endDate
|
|
727
|
+
endDate,
|
|
728
|
+
format
|
|
728
729
|
}) => {
|
|
729
730
|
const formatDate2 = (date) => {
|
|
730
731
|
return [
|
|
@@ -734,7 +735,7 @@ var getReportExportFileName = ({
|
|
|
734
735
|
].join("-");
|
|
735
736
|
};
|
|
736
737
|
const filename = REPORT_DEFAULT_NAME_MAP[reportType].replace(/\s+/g, "_") ?? "Report";
|
|
737
|
-
return `${filename}_${formatDate2(startDate)}_to_${formatDate2(endDate)}
|
|
738
|
+
return `${filename}_${formatDate2(startDate)}_to_${formatDate2(endDate)}.${format}`.toLocaleLowerCase();
|
|
738
739
|
};
|
|
739
740
|
|
|
740
741
|
// src/columns/index.ts
|