@hisptz/dhis2-analytics 2.1.36 → 2.2.0
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/components/Map/DHIS2Map.js +3 -1
- package/dist/components/Map/DHIS2Map.js.map +1 -1
- package/dist/components/Map/components/MapControls/components/TimelineControl/index.js +236 -0
- package/dist/components/Map/components/MapControls/components/TimelineControl/index.js.map +1 -0
- package/dist/components/Map/components/MapControls/index.js +17 -12
- package/dist/components/Map/components/MapControls/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +62 -55
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js +14 -2
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.js +19 -0
- package/dist/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.js.map +1 -0
- package/dist/components/Map/components/MapProvider/hooks/index.js +4 -0
- package/dist/components/Map/components/MapProvider/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/index.js +22 -5
- package/dist/components/Map/components/MapProvider/index.js.map +1 -1
- package/dist/components/Map/index.js +21 -0
- package/dist/components/Map/state/index.js +9 -0
- package/dist/components/Map/state/index.js.map +1 -1
- package/dist/components/Map/utils/helpers.js +74 -0
- package/dist/components/Map/utils/helpers.js.map +1 -1
- package/dist/esm/components/Map/DHIS2Map.js +3 -1
- package/dist/esm/components/Map/DHIS2Map.js.map +1 -1
- package/dist/esm/components/Map/components/MapControls/components/TimelineControl/index.js +234 -0
- package/dist/esm/components/Map/components/MapControls/components/TimelineControl/index.js.map +1 -0
- package/dist/esm/components/Map/components/MapControls/index.js +17 -12
- package/dist/esm/components/Map/components/MapControls/index.js.map +1 -1
- package/dist/esm/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +66 -59
- package/dist/esm/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -1
- package/dist/esm/components/Map/components/MapProvider/components/MapLayerProvider/index.js +15 -3
- package/dist/esm/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -1
- package/dist/esm/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.js +17 -0
- package/dist/esm/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.js.map +1 -0
- package/dist/esm/components/Map/components/MapProvider/hooks/index.js +5 -2
- package/dist/esm/components/Map/components/MapProvider/hooks/index.js.map +1 -1
- package/dist/esm/components/Map/components/MapProvider/index.js +22 -5
- package/dist/esm/components/Map/components/MapProvider/index.js.map +1 -1
- package/dist/esm/components/Map/index.js +3 -0
- package/dist/esm/components/Map/state/index.js +9 -1
- package/dist/esm/components/Map/state/index.js.map +1 -1
- package/dist/esm/components/Map/utils/helpers.js +72 -1
- package/dist/esm/components/Map/utils/helpers.js.map +1 -1
- package/dist/types/components/Map/DHIS2Map.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapArea/interfaces/index.d.ts +5 -2
- package/dist/types/components/Map/components/MapArea/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapControls/components/TimelineControl/index.d.ts +26 -0
- package/dist/types/components/Map/components/MapControls/components/TimelineControl/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapControls/index.d.ts +3 -4
- package/dist/types/components/Map/components/MapControls/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.d.ts +8 -0
- package/dist/types/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapProvider/hooks/index.d.ts +1 -0
- package/dist/types/components/Map/components/MapProvider/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapProvider/index.d.ts.map +1 -1
- package/dist/types/components/Map/index.d.ts +3 -0
- package/dist/types/components/Map/index.d.ts.map +1 -1
- package/dist/types/components/Map/interfaces/index.d.ts +2 -0
- package/dist/types/components/Map/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/state/index.d.ts +8 -0
- package/dist/types/components/Map/state/index.d.ts.map +1 -1
- package/dist/types/components/Map/utils/helpers.d.ts +7 -0
- package/dist/types/components/Map/utils/helpers.d.ts.map +1 -1
- package/package.json +10 -6
package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Map/components/MapProvider/components/MapLayerProvider/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAe7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,wBAAgB,iBAAiB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,gBAAgB,GAChB,EAAE;IACF,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;CACvC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Map/components/MapProvider/components/MapLayerProvider/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAe7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,wBAAgB,iBAAiB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,gBAAgB,GAChB,EAAE;IACF,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;CACvC,2CAsJA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DHIS2PeriodType } from "../../../../utils/helpers.js";
|
|
3
|
+
export declare function MapPeriodFilterProvider({ children, initialActivePeriod, initialPeriodType, }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
initialActivePeriod?: string | null;
|
|
6
|
+
initialPeriodType?: DHIS2PeriodType | null;
|
|
7
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Map/components/MapProvider/components/MapPeriodFilterProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,wBAAgB,uBAAuB,CAAC,EACvC,QAAQ,EACR,mBAA0B,EAC1B,iBAAwB,GACxB,EAAE;IACF,QAAQ,EAAE,SAAS,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAC3C,8CASA"}
|
|
@@ -13,4 +13,5 @@ export declare function useMapLayers(): {
|
|
|
13
13
|
layers: import("../../../index.js").CustomMapLayer[];
|
|
14
14
|
updateLayer: (id: string, updatedLayer: import("../../../index.js").CustomMapLayer) => void;
|
|
15
15
|
};
|
|
16
|
+
export declare function useMapPeriodFilter(): import("../../../state/index.js").MapPeriodFilterState;
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/components/MapProvider/hooks/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/components/MapProvider/hooks/index.ts"],"names":[],"mappings":"AAQA,wBAAgB,sBAAsB;;;EAErC;AAED,wBAAgB,aAAa;;;;;;cAE5B;AAED,wBAAgB,YAAY;;;EAE3B;AAED,wBAAgB,kBAAkB,2DAEjC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MapProviderProps } from "../../interfaces";
|
|
2
|
-
export declare function MapProvider({ children, orgUnitSelection, periodSelection, }: MapProviderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
import type { MapProviderProps } from "../../interfaces";
|
|
2
|
+
export declare function MapProvider({ children, orgUnitSelection, periodSelection, renderingStrategy, }: MapProviderProps): import("react/jsx-runtime.js").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/components/MapProvider/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/components/MapProvider/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAc,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAyBrE,wBAAgB,WAAW,CAAC,EAC3B,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,iBAA4B,GAC5B,EAAE,gBAAgB,qDAgGlB"}
|
|
@@ -7,4 +7,7 @@ export * from "./constants/colors.js";
|
|
|
7
7
|
export * from "./components/MapArea/interfaces";
|
|
8
8
|
export * from "./components/MapLayer/interfaces";
|
|
9
9
|
export * from "./utils";
|
|
10
|
+
export * from "./components/MapProvider/hooks/index.js";
|
|
11
|
+
export * from "./components/MapControls/components/TimelineControl/index.js";
|
|
12
|
+
export * from "./state/index.js";
|
|
10
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Map/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uEAAuE,CAAC;AACtF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Map/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uEAAuE,CAAC;AACtF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,cAAc,yCAAyC,CAAC;AACxD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,kBAAkB,CAAC"}
|
|
@@ -17,6 +17,7 @@ export interface MapProviderProps {
|
|
|
17
17
|
analyticsOptions?: {
|
|
18
18
|
displayProperty?: "SHORTNAME" | "NAME";
|
|
19
19
|
};
|
|
20
|
+
renderingStrategy?: "TIMELINE" | "SINGLE";
|
|
20
21
|
}
|
|
21
22
|
export interface MapAnalyticsOptions {
|
|
22
23
|
displayProperty?: "SHORTNAME" | "NAME";
|
|
@@ -61,6 +62,7 @@ export interface MapProps {
|
|
|
61
62
|
};
|
|
62
63
|
mapOptions?: MapContainerProps;
|
|
63
64
|
analyticsOptions?: MapAnalyticsOptions;
|
|
65
|
+
renderingStrategy?: "TIMELINE" | "SINGLE";
|
|
64
66
|
base?: {
|
|
65
67
|
url?: string;
|
|
66
68
|
attribution?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,GAAG,IAAI,UAAU,EACjB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,eAAe,CAAC,EAAE;QACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,CAAC,EAAE;YAAE,KAAK,EAAE,IAAI,CAAC;YAAC,GAAG,EAAE,IAAI,CAAA;SAAE,CAAC;KACnC,CAAC;IACF,gBAAgB,CAAC,EAAE;QAClB,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;KACvC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WA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AAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE;QACL,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;QAC7B,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;CACF"}
|
|
@@ -2,6 +2,13 @@ import type { OrgUnitSelection } from "@hisptz/dhis2-utils";
|
|
|
2
2
|
import { BasePeriod } from "@hisptz/dhis2-utils";
|
|
3
3
|
import { CustomMapLayer } from "../components/MapLayer/interfaces";
|
|
4
4
|
import { MapOrgUnit } from "../interfaces";
|
|
5
|
+
import type { DHIS2PeriodType } from "../utils/helpers.js";
|
|
6
|
+
export interface MapPeriodFilterState {
|
|
7
|
+
activePeriod: string | null;
|
|
8
|
+
setActivePeriod: (periodId: string) => void;
|
|
9
|
+
periodType: DHIS2PeriodType | null;
|
|
10
|
+
setPeriodType: (type: DHIS2PeriodType) => void;
|
|
11
|
+
}
|
|
5
12
|
export declare const MapOrgUnitContext: import("react").Context<{
|
|
6
13
|
orgUnitSelection: OrgUnitSelection;
|
|
7
14
|
orgUnits?: MapOrgUnit[];
|
|
@@ -17,4 +24,5 @@ export declare const MapLayersContext: import("react").Context<{
|
|
|
17
24
|
layers: CustomMapLayer[];
|
|
18
25
|
updateLayer: (id: string, updatedLayer: CustomMapLayer) => void;
|
|
19
26
|
}>;
|
|
27
|
+
export declare const MapPeriodFilterContext: import("react").Context<MapPeriodFilterState>;
|
|
20
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/state/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/state/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACpC,aAAa,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CAC/C;AAED,eAAO,MAAM,iBAAiB;sBACX,gBAAgB;eACvB,UAAU,EAAE;EAItB,CAAC;AAEH,eAAO,MAAM,gBAAgB;cAEhB,UAAU,EAAE;YACd;QAAE,KAAK,EAAE,IAAI,CAAC;QAAC,GAAG,EAAE,IAAI,CAAA;KAAE;cAKnC,CAAC;AAEH,eAAO,MAAM,gBAAgB;YACpB,cAAc,EAAE;iBACX,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,KAAK,IAAI;EAI9D,CAAC;AAEH,eAAO,MAAM,sBAAsB,+CAKjC,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import L from "leaflet";
|
|
2
|
+
export type DHIS2PeriodType = "Daily" | "Weekly" | "Monthly" | "BiMonthly" | "Quarterly" | "SixMonthly" | "Yearly";
|
|
3
|
+
export declare function dateToDHIS2PeriodId(date: Date, periodType: DHIS2PeriodType): string;
|
|
4
|
+
export declare function inferPeriodType(periodId: string): DHIS2PeriodType | null;
|
|
5
|
+
export declare function computeTimelinePeriods(range: {
|
|
6
|
+
start: Date;
|
|
7
|
+
end: Date;
|
|
8
|
+
}, periodType: DHIS2PeriodType): string[];
|
|
2
9
|
export declare const getLongestTextLength: (array: Array<any>, key: string | number) => any;
|
|
3
10
|
export declare function getIconUrl(icon: string, { baseUrl }: {
|
|
4
11
|
baseUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/utils/helpers.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,SAAS,CAAC;AAExB,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,GAAG,MAAM,QAOnE,CAAC;AAEV,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,UAExE;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,SAAS,CAIvD"}
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/utils/helpers.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,SAAS,CAAC;AAExB,MAAM,MAAM,eAAe,GACxB,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,WAAW,GACX,YAAY,GACZ,QAAQ,CAAC;AAEZ,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CA0BnF;AAcD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CASxE;AAED,wBAAgB,sBAAsB,CACrC,KAAK,EAAE;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,EACjC,UAAU,EAAE,eAAe,GACzB,MAAM,EAAE,CAQV;AAED,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,GAAG,MAAM,QAOnE,CAAC;AAEV,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,UAExE;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,SAAS,CAIvD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hisptz/dhis2-analytics",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -48,22 +48,27 @@
|
|
|
48
48
|
"tsup": "^8.4.0",
|
|
49
49
|
"typescript": "^5.3.3",
|
|
50
50
|
"usehooks-ts": "^2.16.0",
|
|
51
|
-
"@repo/
|
|
52
|
-
"@repo/
|
|
51
|
+
"@repo/typescript-config": "0.0.2",
|
|
52
|
+
"@repo/eslint-config": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@react-leaflet/core": "^2.1.0",
|
|
56
56
|
"@react-pdf/renderer": "^4.0.0",
|
|
57
57
|
"@tanstack/react-table": "^8.19.3",
|
|
58
|
+
"@types/d3-axis": "^3.0.6",
|
|
59
|
+
"@types/d3-selection": "^3.0.11",
|
|
58
60
|
"async-es": "^3.2.5",
|
|
61
|
+
"d3-axis": "^3.0.0",
|
|
59
62
|
"d3-color": "^3.1.0",
|
|
60
63
|
"d3-scale": "^4.0.2",
|
|
64
|
+
"d3-selection": "^3.0.0",
|
|
61
65
|
"file-saver": "^2.0.5",
|
|
62
66
|
"geolib": "^3.3.4",
|
|
63
67
|
"jotai-devtools": "^0.10.1",
|
|
64
68
|
"leaflet": "^1.9.4",
|
|
65
69
|
"leaflet-easyprint": "^2.1.9",
|
|
66
70
|
"leaflet.fullscreen": "^4.0.0",
|
|
71
|
+
"leaflet.timeline.control": "^1.0.2",
|
|
67
72
|
"luxon": "^3.4.4",
|
|
68
73
|
"react-circular-progressbar": "^2.1.0",
|
|
69
74
|
"react-dnd": "^16.0.1",
|
|
@@ -76,11 +81,10 @@
|
|
|
76
81
|
"react-to-print": "^3.0.1",
|
|
77
82
|
"screenfull": "^6.0.2",
|
|
78
83
|
"xlsx": "^0.18.5",
|
|
79
|
-
"@hisptz/dhis2-
|
|
80
|
-
"@hisptz/dhis2-
|
|
84
|
+
"@hisptz/dhis2-ui": "2.0.53",
|
|
85
|
+
"@hisptz/dhis2-utils": "2.0.19"
|
|
81
86
|
},
|
|
82
87
|
"peerDependencies": {
|
|
83
|
-
"@dhis2/app-runtime": ">=3",
|
|
84
88
|
"@tanstack/react-query": ">=4",
|
|
85
89
|
"classnames": ">=2",
|
|
86
90
|
"highcharts": ">=12",
|