@bahmni/reports-app 0.0.1-dev.438 → 0.0.1-dev.440

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.
Files changed (41) hide show
  1. package/dist/{DocumentsTable-CBaZduLC-BcyxF2oD.js → DocumentsTable-CirHKvw9-B17dhopQ.js} +14 -14
  2. package/dist/{FormsTable-BYeW3DRV-CGqSvvSG.js → FormsTable-CqUGhZ65-37vUnsEl.js} +89 -89
  3. package/dist/{LNWAZHJI-DyBrB8Jh.js → LNWAZHJI-Dgr1eokx.js} +7 -7
  4. package/dist/{MWZ6AO7Z-CnfRmymN.js → MWZ6AO7Z-CmWg6Vdd.js} +7 -7
  5. package/dist/{Observations-Brw1YHvF-DqIzuBZd.js → Observations-BhAU90jX-BQEet5Rt.js} +57 -57
  6. package/dist/ReportsPage-DCLNH4F3.js +666 -0
  7. package/dist/{YPM2AS64-aFRyAdNu.js → YPM2AS64-D43fwMxU.js} +138 -138
  8. package/dist/components/PrivilegeGuard/PrivilegeGuard.d.ts +0 -8
  9. package/dist/components/PrivilegeGuard/PrivilegeGuard.d.ts.map +1 -1
  10. package/dist/components/ReportList/ReportList.d.ts +4 -0
  11. package/dist/components/ReportList/ReportList.d.ts.map +1 -0
  12. package/dist/components/ReportList/ReportsTable.d.ts +13 -0
  13. package/dist/components/ReportList/ReportsTable.d.ts.map +1 -0
  14. package/dist/components/ReportList/TableFilters.d.ts +19 -0
  15. package/dist/components/ReportList/TableFilters.d.ts.map +1 -0
  16. package/dist/components/ReportList/appConfigSchema.json.d.ts +28 -0
  17. package/dist/components/ReportList/constants.d.ts +10 -0
  18. package/dist/components/ReportList/constants.d.ts.map +1 -0
  19. package/dist/components/ReportList/models.d.ts +43 -0
  20. package/dist/components/ReportList/models.d.ts.map +1 -0
  21. package/dist/components/ReportList/schema.json.d.ts +44 -0
  22. package/dist/components/ReportList/utils.d.ts +32 -0
  23. package/dist/components/ReportList/utils.d.ts.map +1 -0
  24. package/dist/constants/app.d.ts +2 -0
  25. package/dist/constants/app.d.ts.map +1 -1
  26. package/dist/hooks/useReportTableState.d.ts +19 -0
  27. package/dist/hooks/useReportTableState.d.ts.map +1 -0
  28. package/dist/hooks/useReportsAppConfig.d.ts +3 -0
  29. package/dist/hooks/useReportsAppConfig.d.ts.map +1 -0
  30. package/dist/hooks/useReportsConfig.d.ts +3 -0
  31. package/dist/hooks/useReportsConfig.d.ts.map +1 -0
  32. package/dist/hooks/useRunReport.d.ts +7 -0
  33. package/dist/hooks/useRunReport.d.ts.map +1 -0
  34. package/dist/{index-DCwfYxKs.js → index-CSBzaxP9.js} +39769 -37869
  35. package/dist/index.css +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/locales/locale_en.json +40 -1
  38. package/dist/locales/locale_es.json +40 -1
  39. package/dist/pages/ReportsPage.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/ReportsPage-B7UpjdUg.js +0 -109
@@ -2,14 +2,6 @@ import { default as React, ReactNode } from 'react';
2
2
  interface PrivilegeGuardProps {
3
3
  children: ReactNode;
4
4
  }
5
- /**
6
- * Guards the reports app routes behind the `app:reports` privilege.
7
- *
8
- * `UserPrivilegeProvider` starts with `userPrivileges = null` and
9
- * `isLoading = false`, so `userPrivileges === null` (not `isLoading`) is the
10
- * signal that privileges have not settled yet. Checking `hasPrivilege`
11
- * before that settles would redirect every user on first paint.
12
- */
13
5
  export declare const PrivilegeGuard: React.FC<PrivilegeGuardProps>;
14
6
  export {};
15
7
  //# sourceMappingURL=PrivilegeGuard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrivilegeGuard.d.ts","sourceRoot":"","sources":["../../../src/components/PrivilegeGuard/PrivilegeGuard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAaxD,CAAC"}
1
+ {"version":3,"file":"PrivilegeGuard.d.ts","sourceRoot":"","sources":["../../../src/components/PrivilegeGuard/PrivilegeGuard.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAIpD,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAiDxD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare const ReportList: React.FC;
3
+ export default ReportList;
4
+ //# sourceMappingURL=ReportList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportList.d.ts","sourceRoot":"","sources":["../../../src/components/ReportList/ReportList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAsB5D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EA0I9B,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { AppliedFilters, FormatKey, ReportDefinition } from './models';
3
+ interface ReportsTableProps {
4
+ reports: Array<ReportDefinition & {
5
+ id: string;
6
+ }>;
7
+ appliedFilters: AppliedFilters;
8
+ availableFormats: FormatKey[];
9
+ defaultPaperSize?: string;
10
+ }
11
+ export declare const ReportsTable: React.NamedExoticComponent<ReportsTableProps>;
12
+ export default ReportsTable;
13
+ //# sourceMappingURL=ReportsTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportsTable.d.ts","sourceRoot":"","sources":["../../../src/components/ReportList/ReportsTable.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5E,UAAU,iBAAiB;IACzB,OAAO,EAAE,KAAK,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,SAAS,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,+CAwKxB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { DatePreset } from './constants';
3
+ import { FormatKey } from './models';
4
+ interface TableFiltersProps {
5
+ startDate: Date | null;
6
+ endDate: Date | null;
7
+ format: FormatKey | null;
8
+ selectedPreset: DatePreset | null;
9
+ availableFormats: FormatKey[];
10
+ onStartDateChange: (date: Date | null) => void;
11
+ onEndDateChange: (date: Date | null) => void;
12
+ onFormatChange: (format: FormatKey | null) => void;
13
+ onPresetChange: (preset: DatePreset | null) => void;
14
+ onReset: () => void;
15
+ onApply: () => void;
16
+ }
17
+ export declare const TableFilters: React.FC<TableFiltersProps>;
18
+ export default TableFilters;
19
+ //# sourceMappingURL=TableFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFilters.d.ts","sourceRoot":"","sources":["../../../src/components/ReportList/TableFilters.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,UAAU,iBAAiB;IACzB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,UAAU,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,SAAS,EAAE,CAAC;IAC9B,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwFpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,28 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Reports App Configuration",
4
+ "type": "object",
5
+ "properties": {
6
+ "config": {
7
+ "type": "object",
8
+ "properties": {
9
+ "supportedFormats": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string"
13
+ },
14
+ "description": "List of supported report formats"
15
+ },
16
+ "paperSize": {
17
+ "type": "string",
18
+ "description": "Default paper size for generated reports (e.g., A4)"
19
+ }
20
+ },
21
+ "additionalProperties": true
22
+ }
23
+ },
24
+ "additionalProperties": true
25
+ }
26
+ ;
27
+
28
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { FormatKey } from './models';
2
+ export declare const FORMAT_I18N_KEYS: Record<FormatKey, string>;
3
+ export type DatePreset = 'TODAY' | 'THIS_MONTH' | 'LAST_7_DAYS';
4
+ export declare const DATE_PRESETS: DatePreset[];
5
+ export declare const DATE_PRESET_I18N_KEYS: Record<DatePreset, string>;
6
+ export declare const QUERY_KEYS: {
7
+ readonly reportsConfig: readonly ["reportsConfig"];
8
+ readonly reportsAppConfig: readonly ["reportsAppConfig"];
9
+ };
10
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/ReportList/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAOtD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,aAAa,CAAC;AAEhE,eAAO,MAAM,YAAY,EAAE,UAAU,EAIpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI5D,CAAC;AAEF,eAAO,MAAM,UAAU;;;CAGb,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { FormatKey } from '@bahmni/services';
2
+ export type { FormatKey };
3
+ export interface ReportConfig {
4
+ dateRangeRequired?: boolean;
5
+ paperSize?: string;
6
+ macroTemplatePath?: string;
7
+ [key: string]: unknown;
8
+ }
9
+ export interface ReportDefinition {
10
+ name: string;
11
+ type: string;
12
+ requiredPrivilege?: string;
13
+ config?: ReportConfig;
14
+ }
15
+ export type ReportsConfig = Record<string, ReportDefinition>;
16
+ export interface ReportsAppConfig {
17
+ config?: {
18
+ supportedFormats?: string[];
19
+ paperSize?: string;
20
+ };
21
+ }
22
+ export interface ReportFilters {
23
+ startDate: Date | null;
24
+ endDate: Date | null;
25
+ format: FormatKey | null;
26
+ }
27
+ /** `version` bumps on every Apply/Reset so rows re-sync even when values are unchanged. */
28
+ export interface AppliedFilters extends ReportFilters {
29
+ version: number;
30
+ }
31
+ export interface ReportValidationError {
32
+ field?: 'format' | 'startDate' | 'endDate';
33
+ message: string;
34
+ }
35
+ export interface GroupedReports {
36
+ dateRangeReports: Array<ReportDefinition & {
37
+ id: string;
38
+ }>;
39
+ noDateRangeReports: Array<ReportDefinition & {
40
+ id: string;
41
+ }>;
42
+ }
43
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/components/ReportList/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE;QACP,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;CAC1B;AAED,2FAA2F;AAC3F,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,kBAAkB,EAAE,KAAK,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D"}
@@ -0,0 +1,44 @@
1
+ declare const _default: {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Reports Configuration",
4
+ "type": "object",
5
+ "additionalProperties": {
6
+ "type": "object",
7
+ "required": ["name", "type"],
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "Display name of the report"
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "description": "Report generator type"
16
+ },
17
+ "requiredPrivilege": {
18
+ "type": "string",
19
+ "description": "Privilege required to view/run this report"
20
+ },
21
+ "config": {
22
+ "type": "object",
23
+ "properties": {
24
+ "dateRangeRequired": {
25
+ "type": "boolean",
26
+ "description": "Whether this report requires a date range (defaults to true)"
27
+ },
28
+ "paperSize": {
29
+ "type": "string",
30
+ "description": "Paper size for PDF generation (e.g., A4)"
31
+ },
32
+ "macroTemplatePath": {
33
+ "type": "string",
34
+ "description": "Path to macro template for custom Excel reports"
35
+ }
36
+ },
37
+ "additionalProperties": true
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ;
43
+
44
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { UserPrivilege } from '@bahmni/services';
2
+ import { DatePreset } from './constants';
3
+ import { FormatKey, GroupedReports, ReportDefinition, ReportsConfig, ReportValidationError } from './models';
4
+ export declare const hasVisiblePrivilege: (userPrivileges: UserPrivilege[] | null, requiredPrivilege?: string) => boolean;
5
+ export declare const filterReportsByPrivilege: (reports: Array<ReportDefinition & {
6
+ id: string;
7
+ }>, userPrivileges: UserPrivilege[] | null) => Array<ReportDefinition & {
8
+ id: string;
9
+ }>;
10
+ export declare const requiresDateRange: (report: ReportDefinition) => boolean;
11
+ export declare const groupReportsByDateRequirement: (reports: Array<ReportDefinition & {
12
+ id: string;
13
+ }>) => GroupedReports;
14
+ export declare const resolveSupportedFormats: (configuredFormats?: string[]) => FormatKey[];
15
+ export declare const presetToRange: (preset: DatePreset) => [Date, Date];
16
+ export declare const formatItemToString: (t: (key: string) => string) => (fmt: FormatKey | null) => string;
17
+ export interface ValidateReportRunInput {
18
+ report: ReportDefinition & {
19
+ id: string;
20
+ };
21
+ requiresDateRange: boolean;
22
+ format: FormatKey | null;
23
+ startDate: Date | null;
24
+ endDate: Date | null;
25
+ }
26
+ export declare const validateReportRun: (input: ValidateReportRunInput, t: (key: string, options?: {
27
+ reportName?: string;
28
+ }) => string) => ReportValidationError | null;
29
+ export declare const reportsConfigToArray: (config: ReportsConfig) => Array<ReportDefinition & {
30
+ id: string;
31
+ }>;
32
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/ReportList/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,mBAAmB,GAC9B,gBAAgB,aAAa,EAAE,GAAG,IAAI,EACtC,oBAAoB,MAAM,KACzB,OAGF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,SAAS,KAAK,CAAC,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EACjD,gBAAgB,aAAa,EAAE,GAAG,IAAI,KACrC,KAAK,CAAC,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAGvC,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,QAAQ,gBAAgB,KAAG,OACjB,CAAC;AAE7C,eAAO,MAAM,6BAA6B,GACxC,SAAS,KAAK,CAAC,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,KAChD,cAGD,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAClC,oBAAoB,MAAM,EAAE,KAC3B,SAAS,EAQX,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,UAAU,KAAG,CAAC,IAAI,EAAE,IAAI,CAU7D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC5B,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,MAC1B,KAAK,SAAS,GAAG,IAAI,KAAG,MACY,CAAC;AAExC,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAC5B,OAAO,sBAAsB,EAC7B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,MAAM,KAC5D,qBAAqB,GAAG,IAmD1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,aAAa,KACpB,KAAK,CAAC,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAIrC,CAAC"}
@@ -2,4 +2,6 @@ export declare const BAHMNI_REPORTS_NAMESPACE = "reports";
2
2
  export declare const REPORTS_PRIVILEGE = "app:reports";
3
3
  export declare const REPORTS_TAB_PATH = "/reports/";
4
4
  export declare const MY_REPORTS_TAB_PATH = "/reports/my-reports";
5
+ export declare const REPORTS_JSON_CONFIG_URL = "/bahmni_config/openmrs/apps/reports/reports.json";
6
+ export declare const REPORTS_APP_CONFIG_URL = "/bahmni_config/openmrs/apps/reports/app.json";
5
7
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAI/C,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,mBAAmB,wBAAwB,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAI/C,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,eAAO,MAAM,uBAAuB,qDACgB,CAAC;AACrD,eAAO,MAAM,sBAAsB,iDACa,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AppliedFilters, ReportDefinition, ReportFilters } from '../components/ReportList/models';
2
+ export interface RowErrors {
3
+ format?: string;
4
+ startDate?: string;
5
+ endDate?: string;
6
+ }
7
+ export declare const useReportTableState: (reports: Array<ReportDefinition & {
8
+ id: string;
9
+ }>, appliedFilters: AppliedFilters, defaultPaperSize?: string) => {
10
+ rowFilters: (id: string) => ReportFilters;
11
+ errors: (id: string) => RowErrors;
12
+ isRunning: (id: string) => boolean;
13
+ updateRow: (id: string, patch: Partial<ReportFilters>) => void;
14
+ clearRowFieldError: (id: string, field: keyof RowErrors) => void;
15
+ handleRunReport: (report: ReportDefinition & {
16
+ id: string;
17
+ }) => void;
18
+ };
19
+ //# sourceMappingURL=useReportTableState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReportTableState.d.ts","sourceRoot":"","sources":["../../src/hooks/useReportTableState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAEd,gBAAgB,EAChB,aAAa,EACd,MAAM,iCAAiC,CAAC;AAOzC,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,GAC9B,SAAS,KAAK,CAAC,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EACjD,gBAAgB,cAAc,EAC9B,mBAAmB,MAAM;qBAcD,MAAM,KAAG,aAAa;iBAqG/B,MAAM;oBACH,MAAM;oBA/FD,MAAM,SAAS,OAAO,CAAC,aAAa,CAAC;6BAM5B,MAAM,SAAS,MAAM,SAAS;8BAO7B,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE;CAuFnE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ReportsAppConfig } from '../components/ReportList/models';
2
+ export declare const useReportsAppConfig: () => import('@tanstack/react-query').UseQueryResult<ReportsAppConfig, Error>;
3
+ //# sourceMappingURL=useReportsAppConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReportsAppConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useReportsAppConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,eAAO,MAAM,mBAAmB,+EAc5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ReportsConfig } from '../components/ReportList/models';
2
+ export declare const useReportsConfig: () => import('@tanstack/react-query').UseQueryResult<ReportsConfig, Error>;
3
+ //# sourceMappingURL=useReportsConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReportsConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useReportsConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAIrE,eAAO,MAAM,gBAAgB,4EAKzB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReportDefinition, FormatKey } from '../components/ReportList/models';
2
+ export declare const useRunReport: () => {
3
+ runReport: (report: ReportDefinition & {
4
+ id: string;
5
+ }, format: FormatKey, startDate?: Date | null, endDate?: Date | null, defaultPaperSize?: string) => boolean;
6
+ };
7
+ //# sourceMappingURL=useRunReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRunReport.d.ts","sourceRoot":"","sources":["../../src/hooks/useRunReport.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACV,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,YAAY;wBAGX,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,UACjC,SAAS,cACL,IAAI,GAAG,IAAI,YACb,IAAI,GAAG,IAAI,qBACF,MAAM,KACxB,OAAO;CAwCb,CAAC"}