@hisptz/dhis2-analytics 2.0.25 → 2.0.27

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.
@@ -10,6 +10,18 @@ const supportedDataSources = zod.z.enum([
10
10
  "customFunction",
11
11
  "sqlView"
12
12
  ]);
13
+ const scorecardSharing = zod.z.object({
14
+ owner: zod.z.string(),
15
+ external: zod.z.boolean(),
16
+ users: zod.z.record(
17
+ zod.z.string(),
18
+ zod.z.object({ access: zod.z.string(), id: zod.z.string() })
19
+ ),
20
+ userGroups: zod.z.record(
21
+ zod.z.string(),
22
+ zod.z.object({ access: zod.z.string(), id: zod.z.string() })
23
+ )
24
+ });
13
25
  const legendDefinitionSchema = zod.z.object({
14
26
  id: zod.z.string(),
15
27
  color: zod.z.string(),
@@ -17,17 +29,17 @@ const legendDefinitionSchema = zod.z.object({
17
29
  isDefault: zod.z.boolean().optional()
18
30
  });
19
31
  const scorecardViewOptionsSchema = zod.z.object({
20
- averageColumn: zod.z.boolean(),
21
- averageDisplayType: zod.z.enum(["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]),
22
- averageRow: zod.z.boolean(),
23
- emptyRows: zod.z.boolean(),
24
- highlightedIndicators: zod.z.boolean(),
25
- itemNumber: zod.z.boolean(),
26
- legend: zod.z.boolean(),
27
- showHierarchy: zod.z.boolean(),
28
- title: zod.z.boolean(),
29
- arrows: zod.z.boolean(),
30
- showDataInRows: zod.z.boolean(),
32
+ averageColumn: zod.z.boolean().optional(),
33
+ averageDisplayType: zod.z.enum(["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]).optional(),
34
+ averageRow: zod.z.boolean().optional(),
35
+ emptyRows: zod.z.boolean().optional(),
36
+ highlightedIndicators: zod.z.boolean().optional(),
37
+ itemNumber: zod.z.boolean().optional(),
38
+ legend: zod.z.boolean().optional(),
39
+ showHierarchy: zod.z.boolean().optional(),
40
+ title: zod.z.boolean().optional(),
41
+ arrows: zod.z.boolean().optional(),
42
+ showDataInRows: zod.z.boolean().optional(),
31
43
  disableExpanding: zod.z.boolean().optional()
32
44
  });
33
45
  const organisationUnitSelectionSchema = zod.z.object({
@@ -104,7 +116,8 @@ zod.z.object({
104
116
  dataGroups: zod.z.array(dataGroupSchema)
105
117
  }),
106
118
  highlightedIndicators: zod.z.array(dataSourceSchema),
107
- additionalLabels: zod.z.array(zod.z.string()).optional()
119
+ additionalLabels: zod.z.array(zod.z.string()).optional(),
120
+ sharing: scorecardSharing
108
121
  });
109
122
  zod.z.object({
110
123
  orgUnitSelection: organisationUnitSelectionSchema,
@@ -176,6 +189,7 @@ exports.orgUnitLevelLegendSchema = orgUnitLevelLegendSchema;
176
189
  exports.organisationUnitSelectionSchema = organisationUnitSelectionSchema;
177
190
  exports.periodSelectionSchema = periodSelectionSchema;
178
191
  exports.scorecardAnalyticsData = scorecardAnalyticsData;
192
+ exports.scorecardSharing = scorecardSharing;
179
193
  exports.scorecardTableCellData = scorecardTableCellData;
180
194
  exports.scorecardTableData = scorecardTableData;
181
195
  exports.scorecardViewOptionsSchema = scorecardViewOptionsSchema;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/Scorecard/schemas/config.ts"],"names":["ScorecardTableOrientation","ScorecardTableDimension","ScorecardDraggableItems"],"mappings":"AAAA,SAAS,SAAS;AAGX,MAAM,uBAAuB,EAAE,KAAK;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAIM,MAAM,yBAAyB,EAAE,OAAO;AAAA,EAC9C,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,WAAW,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAIM,MAAM,6BAA6B,EAAE,OAAO;AAAA,EAClD,eAAe,EAAE,QAAQ;AAAA,EACzB,oBAAoB,EAAE,KAAK,CAAC,OAAO,iBAAiB,eAAe,C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AAAA,EAC9C,aAAa,EAAE;AAAA,IACd,iBAAiB,OAAO;AAAA,MACvB,MAAM,EAAE,OAAO;AAAA,QACd,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,QAC9B,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,MAC9B,CAAC;AAAA,IACF,CAAC;AAAA,EACF;AAAA,EACA,SAAS,EAAE,OAAO;AAAA,IACjB,KAAK,EAAE,OAAO;AAAA,IACd,MAAM,EAAE,OAAO;AAAA,IACf,WAAW,EAAE,OAAO;AAAA,EACrB,CAAC;AAAA,EACD,QAAQ,EAAE,OAAO;AAClB,CAAC;AAMM,IAAK,4BAAL,kBAAKA,+BAAL;AACN,EAAAA,2BAAA,sBAAmB;AACnB,EAAAA,2BAAA,sBAAmB;AAFR,SAAAA;AAAA,GAAA;AAKL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,WAAQ;AACR,EAAAA,yBAAA,eAAY;AACZ,EAAAA,yBAAA,aAAU;AACV,EAAAA,yBAAA,UAAO;AAJI,SAAAA;AAAA,GAAA;AAOL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,QAAK;AACL,EAAAA,yBAAA,UAAO;AAFI,SAAAA;AAAA,GAAA","sourcesContent":["import { z } from \"zod\";\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport const supportedDataSources = z.enum([\n\t\"indicator\",\n\t\"programIndicator\",\n\t\"dataSet\",\n\t\"dataElement\",\n\t\"customFunction\",\n\t\"sqlView\",\n]);\n\nexport type SupportedDataSources = z.infer<typeof supportedDataSources>;\n\nexport const legendDefinitionSchema = z.object({\n\tid: z.string(),\n\tcolor: z.string(),\n\tname: z.string(),\n\tisDefault: z.boolean().optional(),\n});\n\nexport type LegendDefinition = z.infer<typeof legendDefinitionSchema>;\n\nexport const scorecardViewOptionsSchema = z.object({\n\taverageColumn: z.boolean(),\n\taverageDisplayType: z.enum([\"ALL\", \"ABOVE_AVERAGE\", \"BELOW_AVERAGE\"]),\n\taverageRow: z.boolean(),\n\temptyRows: z.boolean(),\n\thighlightedIndicators: z.boolean(),\n\titemNumber: z.boolean(),\n\tlegend: z.boolean(),\n\tshowHierarchy: z.boolean(),\n\ttitle: z.boolean(),\n\tarrows: z.boolean(),\n\tshowDataInRows: z.boolean(),\n\tdisableExpanding: z.boolean().optional(),\n});\n\nexport type ScorecardViewOptions = z.infer<typeof scorecardViewOptionsSchema>;\n\nexport const organisationUnitSelectionSchema = z.object({\n\tuserOrgUnit: z.boolean().optional(),\n\tuserSubUnit: z.boolean().optional(),\n\tuserSubX2Unit: z.boolean().optional(),\n\torgUnits: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\tgroups: z.array(z.string()).optional(),\n\tlevels: z.array(z.string()).optional(),\n});\n\nexport type OrgUnitSelection = z.infer<typeof organisationUnitSelectionSchema>;\n\nexport const periodSelectionSchema = z.object({\n\tperiods: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\ttype: z.string().optional(),\n});\n\nexport type PeriodSelection = z.infer<typeof periodSelectionSchema>;\n\nexport const legendSchema = z.object({\n\tlegendDefinitionId: z.string(),\n\tid: z.string(),\n\tstartValue: z.union([z.string(), z.number()]),\n\tendValue: z.union([z.string(), z.number()]),\n});\n\nexport type ScorecardLegend = z.infer<typeof legendSchema>;\n\nexport const specificTargetSchema = z.object({\n\ttype: z.enum([\"periods\", \"orgUnit\"]),\n\titems: z.array(z.string()),\n\tlegends: z.array(legendSchema),\n});\n\nexport type SpecificTarget = z.infer<typeof specificTargetSchema>;\n\nexport const orgUnitLevelLegendSchema = z.record(\n\tz.string(),\n\tz.array(legendSchema),\n);\n\nexport type OrgUnitLevelLegend = z.infer<typeof orgUnitLevelLegendSchema>;\n\nexport const dataSourceSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tlabel: z.string().optional(),\n\ttype: supportedDataSources,\n\tdisplayArrows: z.boolean(),\n\thighIsGood: z.boolean(),\n\teffectiveGap: z.number(),\n\tshowColors: z.boolean(),\n\tweight: z.number(),\n\tlegends: z.union([z.array(legendSchema), orgUnitLevelLegendSchema]),\n\tspecificTargets: z.array(specificTargetSchema).optional(),\n\tspecificTargetsSet: z.boolean().optional(),\n\tdescription: z.string().optional(),\n});\n\nexport type ScorecardDataSource = z.infer<typeof dataSourceSchema>;\n\nexport const dataHolderSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataSources: z.array(dataSourceSchema),\n});\n\nexport type ScorecardDataHolder = z.infer<typeof dataHolderSchema>;\n\nexport const dataGroupSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataHolders: z.array(dataHolderSchema),\n\tstyle: z.object({}),\n\ttitle: z.string(),\n});\n\nexport type ScorecardDataGroup = z.infer<typeof dataGroupSchema>;\n\nconst scorecardConfig = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tsubtitle: z.string().optional(),\n\tcustomHeader: z.string().optional(),\n\tdescription: z.string().optional(),\n\tlegendDefinitions: z.array(legendDefinitionSchema),\n\toptions: scorecardViewOptionsSchema,\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\tdataSelection: z.object({\n\t\tdataGroups: z.array(dataGroupSchema),\n\t}),\n\thighlightedIndicators: z.array(dataSourceSchema),\n\tadditionalLabels: z.array(z.string()).optional(),\n});\n\nexport type ScorecardConfig = z.infer<typeof scorecardConfig>;\n\nconst scorecardStateSchema = z.object({\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\toptions: scorecardViewOptionsSchema,\n\tnested: z.boolean().optional(),\n\thasOnePeriod: z.boolean().optional(),\n});\n\nexport type ScorecardState = z.infer<typeof scorecardStateSchema>;\n\nexport const scorecardAnalyticsData = z.object({\n\tdx: z.string().optional(),\n\tpe: z.string().optional(),\n\tou: z.string().optional(),\n\tvalue: z.string().optional(),\n});\n\nexport type ScorecardAnalyticsData = z.infer<typeof scorecardAnalyticsData>;\n\nexport const scorecardTableData = z.object({\n\tlabel: z.string(),\n\tdataValues: z.array(scorecardAnalyticsData),\n\tdataHolder: dataHolderSchema.optional(),\n\torgUnit: z\n\t\t.object({\n\t\t\tuid: z.string(),\n\t\t\tname: z.string(),\n\t\t\thierarchy: z.string(),\n\t\t})\n\t\t.optional(),\n\texpand: z.boolean().optional(),\n});\n\nexport type ScorecardTableData = z.infer<typeof scorecardTableData> & RowData;\n\nexport const scorecardTableCellData = z.object({\n\tdataSources: z.array(\n\t\tdataSourceSchema.extend({\n\t\t\tdata: z.object({\n\t\t\t\tprevious: z.number().optional(),\n\t\t\t\tcurrent: z.number().optional(),\n\t\t\t}),\n\t\t}),\n\t),\n\torgUnit: z.object({\n\t\tuid: z.string(),\n\t\tname: z.string(),\n\t\thierarchy: z.string(),\n\t}),\n\tperiod: z.string(),\n});\n\nexport type ScorecardTableCellData = z.infer<typeof scorecardTableCellData>;\n\nexport type SanitizedScorecardTableData = z.infer<typeof scorecardTableData>;\n\nexport enum ScorecardTableOrientation {\n\tORG_UNIT_VS_DATA = \"orgUnitsVsData\",\n\tDATA_VS_ORG_UNIT = \"dataVsOrgUnits\",\n}\n\nexport enum ScorecardTableDimension {\n\tGROUP = \"group\",\n\tORG_UNITS = \"orgUnits\",\n\tPERIODS = \"periods\",\n\tDATA = \"data\",\n}\n\nexport enum ScorecardDraggableItems {\n\tou = \"ou\",\n\tdata = \"data\",\n}\n"]}
1
+ {"version":3,"sources":["../../../../src/components/Scorecard/schemas/config.ts"],"names":["ScorecardTableOrientation","ScorecardTableDimension","ScorecardDraggableItems"],"mappings":"AAAA,SAAS,SAAS;AAGX,MAAM,uBAAuB,EAAE,KAAK;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEM,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACxC,OAAO,EAAE,OAAO;AAAA,EAChB,UAAU,EAAE,QAAQ;A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FR,SAAAA;AAAA,GAAA;AAKL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,WAAQ;AACR,EAAAA,yBAAA,eAAY;AACZ,EAAAA,yBAAA,aAAU;AACV,EAAAA,yBAAA,UAAO;AAJI,SAAAA;AAAA,GAAA;AAOL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,QAAK;AACL,EAAAA,yBAAA,UAAO;AAFI,SAAAA;AAAA,GAAA","sourcesContent":["import { z } from \"zod\";\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport const supportedDataSources = z.enum([\n\t\"indicator\",\n\t\"programIndicator\",\n\t\"dataSet\",\n\t\"dataElement\",\n\t\"customFunction\",\n\t\"sqlView\",\n]);\n\nexport const scorecardSharing = z.object({\n\towner: z.string(),\n\texternal: z.boolean(),\n\tusers: z.record(\n\t\tz.string(),\n\t\tz.object({ access: z.string(), id: z.string() }),\n\t),\n\tuserGroups: z.record(\n\t\tz.string(),\n\t\tz.object({ access: z.string(), id: z.string() }),\n\t),\n});\n\nexport type ScorecardSharing = z.infer<typeof scorecardSharing>;\n\nexport type SupportedDataSources = z.infer<typeof supportedDataSources>;\n\nexport const legendDefinitionSchema = z.object({\n\tid: z.string(),\n\tcolor: z.string(),\n\tname: z.string(),\n\tisDefault: z.boolean().optional(),\n});\n\nexport type LegendDefinition = z.infer<typeof legendDefinitionSchema>;\n\nexport const scorecardViewOptionsSchema = z.object({\n\taverageColumn: z.boolean().optional(),\n\taverageDisplayType: z\n\t\t.enum([\"ALL\", \"ABOVE_AVERAGE\", \"BELOW_AVERAGE\"])\n\t\t.optional(),\n\taverageRow: z.boolean().optional(),\n\temptyRows: z.boolean().optional(),\n\thighlightedIndicators: z.boolean().optional(),\n\titemNumber: z.boolean().optional(),\n\tlegend: z.boolean().optional(),\n\tshowHierarchy: z.boolean().optional(),\n\ttitle: z.boolean().optional(),\n\tarrows: z.boolean().optional(),\n\tshowDataInRows: z.boolean().optional(),\n\tdisableExpanding: z.boolean().optional(),\n});\n\nexport type ScorecardViewOptions = z.infer<typeof scorecardViewOptionsSchema>;\n\nexport const organisationUnitSelectionSchema = z.object({\n\tuserOrgUnit: z.boolean().optional(),\n\tuserSubUnit: z.boolean().optional(),\n\tuserSubX2Unit: z.boolean().optional(),\n\torgUnits: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\tgroups: z.array(z.string()).optional(),\n\tlevels: z.array(z.string()).optional(),\n});\n\nexport type OrgUnitSelection = z.infer<typeof organisationUnitSelectionSchema>;\n\nexport const periodSelectionSchema = z.object({\n\tperiods: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\ttype: z.string().optional(),\n});\n\nexport type PeriodSelection = z.infer<typeof periodSelectionSchema>;\n\nexport const legendSchema = z.object({\n\tlegendDefinitionId: z.string(),\n\tid: z.string(),\n\tstartValue: z.union([z.string(), z.number()]),\n\tendValue: z.union([z.string(), z.number()]),\n});\n\nexport type ScorecardLegend = z.infer<typeof legendSchema>;\n\nexport const specificTargetSchema = z.object({\n\ttype: z.enum([\"periods\", \"orgUnit\"]),\n\titems: z.array(z.string()),\n\tlegends: z.array(legendSchema),\n});\n\nexport type SpecificTarget = z.infer<typeof specificTargetSchema>;\n\nexport const orgUnitLevelLegendSchema = z.record(\n\tz.string(),\n\tz.array(legendSchema),\n);\n\nexport type OrgUnitLevelLegend = z.infer<typeof orgUnitLevelLegendSchema>;\n\nexport const dataSourceSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tlabel: z.string().optional(),\n\ttype: supportedDataSources,\n\tdisplayArrows: z.boolean(),\n\thighIsGood: z.boolean(),\n\teffectiveGap: z.number(),\n\tshowColors: z.boolean(),\n\tweight: z.number(),\n\tlegends: z.union([z.array(legendSchema), orgUnitLevelLegendSchema]),\n\tspecificTargets: z.array(specificTargetSchema).optional(),\n\tspecificTargetsSet: z.boolean().optional(),\n\tdescription: z.string().optional(),\n});\n\nexport type ScorecardDataSource = z.infer<typeof dataSourceSchema>;\n\nexport const dataHolderSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataSources: z.array(dataSourceSchema),\n});\n\nexport type ScorecardDataHolder = z.infer<typeof dataHolderSchema>;\n\nexport const dataGroupSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataHolders: z.array(dataHolderSchema),\n\tstyle: z.object({}),\n\ttitle: z.string(),\n});\n\nexport type ScorecardDataGroup = z.infer<typeof dataGroupSchema>;\n\nconst scorecardConfig = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tsubtitle: z.string().optional(),\n\tcustomHeader: z.string().optional(),\n\tdescription: z.string().optional(),\n\tlegendDefinitions: z.array(legendDefinitionSchema),\n\toptions: scorecardViewOptionsSchema,\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\tdataSelection: z.object({\n\t\tdataGroups: z.array(dataGroupSchema),\n\t}),\n\thighlightedIndicators: z.array(dataSourceSchema),\n\tadditionalLabels: z.array(z.string()).optional(),\n\tsharing: scorecardSharing,\n});\n\nexport type ScorecardConfig = z.infer<typeof scorecardConfig>;\n\nconst scorecardStateSchema = z.object({\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\toptions: scorecardViewOptionsSchema,\n\tnested: z.boolean().optional(),\n\thasOnePeriod: z.boolean().optional(),\n});\n\nexport type ScorecardState = z.infer<typeof scorecardStateSchema>;\n\nexport const scorecardAnalyticsData = z.object({\n\tdx: z.string().optional(),\n\tpe: z.string().optional(),\n\tou: z.string().optional(),\n\tvalue: z.string().optional(),\n});\n\nexport type ScorecardAnalyticsData = z.infer<typeof scorecardAnalyticsData>;\n\nexport const scorecardTableData = z.object({\n\tlabel: z.string(),\n\tdataValues: z.array(scorecardAnalyticsData),\n\tdataHolder: dataHolderSchema.optional(),\n\torgUnit: z\n\t\t.object({\n\t\t\tuid: z.string(),\n\t\t\tname: z.string(),\n\t\t\thierarchy: z.string(),\n\t\t})\n\t\t.optional(),\n\texpand: z.boolean().optional(),\n});\n\nexport type ScorecardTableData = z.infer<typeof scorecardTableData> & RowData;\n\nexport const scorecardTableCellData = z.object({\n\tdataSources: z.array(\n\t\tdataSourceSchema.extend({\n\t\t\tdata: z.object({\n\t\t\t\tprevious: z.number().optional(),\n\t\t\t\tcurrent: z.number().optional(),\n\t\t\t}),\n\t\t}),\n\t),\n\torgUnit: z.object({\n\t\tuid: z.string(),\n\t\tname: z.string(),\n\t\thierarchy: z.string(),\n\t}),\n\tperiod: z.string(),\n});\n\nexport type ScorecardTableCellData = z.infer<typeof scorecardTableCellData>;\n\nexport type SanitizedScorecardTableData = z.infer<typeof scorecardTableData>;\n\nexport enum ScorecardTableOrientation {\n\tORG_UNIT_VS_DATA = \"orgUnitsVsData\",\n\tDATA_VS_ORG_UNIT = \"dataVsOrgUnits\",\n}\n\nexport enum ScorecardTableDimension {\n\tGROUP = \"group\",\n\tORG_UNITS = \"orgUnits\",\n\tPERIODS = \"periods\",\n\tDATA = \"data\",\n}\n\nexport enum ScorecardDraggableItems {\n\tou = \"ou\",\n\tdata = \"data\",\n}\n"]}
@@ -8,6 +8,18 @@ const supportedDataSources = z.enum([
8
8
  "customFunction",
9
9
  "sqlView"
10
10
  ]);
11
+ const scorecardSharing = z.object({
12
+ owner: z.string(),
13
+ external: z.boolean(),
14
+ users: z.record(
15
+ z.string(),
16
+ z.object({ access: z.string(), id: z.string() })
17
+ ),
18
+ userGroups: z.record(
19
+ z.string(),
20
+ z.object({ access: z.string(), id: z.string() })
21
+ )
22
+ });
11
23
  const legendDefinitionSchema = z.object({
12
24
  id: z.string(),
13
25
  color: z.string(),
@@ -15,17 +27,17 @@ const legendDefinitionSchema = z.object({
15
27
  isDefault: z.boolean().optional()
16
28
  });
17
29
  const scorecardViewOptionsSchema = z.object({
18
- averageColumn: z.boolean(),
19
- averageDisplayType: z.enum(["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]),
20
- averageRow: z.boolean(),
21
- emptyRows: z.boolean(),
22
- highlightedIndicators: z.boolean(),
23
- itemNumber: z.boolean(),
24
- legend: z.boolean(),
25
- showHierarchy: z.boolean(),
26
- title: z.boolean(),
27
- arrows: z.boolean(),
28
- showDataInRows: z.boolean(),
30
+ averageColumn: z.boolean().optional(),
31
+ averageDisplayType: z.enum(["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]).optional(),
32
+ averageRow: z.boolean().optional(),
33
+ emptyRows: z.boolean().optional(),
34
+ highlightedIndicators: z.boolean().optional(),
35
+ itemNumber: z.boolean().optional(),
36
+ legend: z.boolean().optional(),
37
+ showHierarchy: z.boolean().optional(),
38
+ title: z.boolean().optional(),
39
+ arrows: z.boolean().optional(),
40
+ showDataInRows: z.boolean().optional(),
29
41
  disableExpanding: z.boolean().optional()
30
42
  });
31
43
  const organisationUnitSelectionSchema = z.object({
@@ -102,7 +114,8 @@ z.object({
102
114
  dataGroups: z.array(dataGroupSchema)
103
115
  }),
104
116
  highlightedIndicators: z.array(dataSourceSchema),
105
- additionalLabels: z.array(z.string()).optional()
117
+ additionalLabels: z.array(z.string()).optional(),
118
+ sharing: scorecardSharing
106
119
  });
107
120
  z.object({
108
121
  orgUnitSelection: organisationUnitSelectionSchema,
@@ -162,6 +175,6 @@ var ScorecardDraggableItems = /* @__PURE__ */ ((ScorecardDraggableItems2) => {
162
175
  return ScorecardDraggableItems2;
163
176
  })(ScorecardDraggableItems || {});
164
177
 
165
- export { ScorecardDraggableItems, ScorecardTableDimension, ScorecardTableOrientation, dataGroupSchema, dataHolderSchema, dataSourceSchema, legendDefinitionSchema, legendSchema, orgUnitLevelLegendSchema, organisationUnitSelectionSchema, periodSelectionSchema, scorecardAnalyticsData, scorecardTableCellData, scorecardTableData, scorecardViewOptionsSchema, specificTargetSchema, supportedDataSources };
178
+ export { ScorecardDraggableItems, ScorecardTableDimension, ScorecardTableOrientation, dataGroupSchema, dataHolderSchema, dataSourceSchema, legendDefinitionSchema, legendSchema, orgUnitLevelLegendSchema, organisationUnitSelectionSchema, periodSelectionSchema, scorecardAnalyticsData, scorecardSharing, scorecardTableCellData, scorecardTableData, scorecardViewOptionsSchema, specificTargetSchema, supportedDataSources };
166
179
  //# sourceMappingURL=out.js.map
167
180
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Scorecard/schemas/config.ts"],"names":["ScorecardTableOrientation","ScorecardTableDimension","ScorecardDraggableItems"],"mappings":"AAAA,SAAS,SAAS;AAGX,MAAM,uBAAuB,EAAE,KAAK;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAIM,MAAM,yBAAyB,EAAE,OAAO;AAAA,EAC9C,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,WAAW,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAIM,MAAM,6BAA6B,EAAE,OAAO;AAAA,EAClD,eAAe,EAAE,QAAQ;AAAA,EACzB,oBAAoB,EAAE,KAAK,CAAC,OAAO,iBAAiB,eAAe,CAAC;AAAA,EACpE,YAAY,EAAE,QAAQ;AAAA,EACtB,WAAW,EAAE,QAAQ;AAAA,EACrB,uBAAuB,EAAE,QAAQ;AAAA,EACjC,YAAY,EAAE,QAAQ;AAAA,EACtB,QAAQ,EAAE,QAAQ;AAAA,EAClB,eAAe,EAAE,QAAQ;AAAA,EACzB,OAAO,EAAE,QAAQ;AAAA,EACjB,QAAQ,EAAE,QAAQ;AAAA,EAClB,gBAAgB,EAAE,QAAQ;AAAA,EAC1B,kBAAkB,EAAE,QAAQ,EAAE,SAAS;AACxC,CAAC;AAIM,MAAM,kCAAkC,EAAE,OAAO;AAAA,EACvD,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,eAAe,EA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;AAAA,GAAA;AAKL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,WAAQ;AACR,EAAAA,yBAAA,eAAY;AACZ,EAAAA,yBAAA,aAAU;AACV,EAAAA,yBAAA,UAAO;AAJI,SAAAA;AAAA,GAAA;AAOL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,QAAK;AACL,EAAAA,yBAAA,UAAO;AAFI,SAAAA;AAAA,GAAA","sourcesContent":["import { z } from \"zod\";\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport const supportedDataSources = z.enum([\n\t\"indicator\",\n\t\"programIndicator\",\n\t\"dataSet\",\n\t\"dataElement\",\n\t\"customFunction\",\n\t\"sqlView\",\n]);\n\nexport type SupportedDataSources = z.infer<typeof supportedDataSources>;\n\nexport const legendDefinitionSchema = z.object({\n\tid: z.string(),\n\tcolor: z.string(),\n\tname: z.string(),\n\tisDefault: z.boolean().optional(),\n});\n\nexport type LegendDefinition = z.infer<typeof legendDefinitionSchema>;\n\nexport const scorecardViewOptionsSchema = z.object({\n\taverageColumn: z.boolean(),\n\taverageDisplayType: z.enum([\"ALL\", \"ABOVE_AVERAGE\", \"BELOW_AVERAGE\"]),\n\taverageRow: z.boolean(),\n\temptyRows: z.boolean(),\n\thighlightedIndicators: z.boolean(),\n\titemNumber: z.boolean(),\n\tlegend: z.boolean(),\n\tshowHierarchy: z.boolean(),\n\ttitle: z.boolean(),\n\tarrows: z.boolean(),\n\tshowDataInRows: z.boolean(),\n\tdisableExpanding: z.boolean().optional(),\n});\n\nexport type ScorecardViewOptions = z.infer<typeof scorecardViewOptionsSchema>;\n\nexport const organisationUnitSelectionSchema = z.object({\n\tuserOrgUnit: z.boolean().optional(),\n\tuserSubUnit: z.boolean().optional(),\n\tuserSubX2Unit: z.boolean().optional(),\n\torgUnits: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\tgroups: z.array(z.string()).optional(),\n\tlevels: z.array(z.string()).optional(),\n});\n\nexport type OrgUnitSelection = z.infer<typeof organisationUnitSelectionSchema>;\n\nexport const periodSelectionSchema = z.object({\n\tperiods: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\ttype: z.string().optional(),\n});\n\nexport type PeriodSelection = z.infer<typeof periodSelectionSchema>;\n\nexport const legendSchema = z.object({\n\tlegendDefinitionId: z.string(),\n\tid: z.string(),\n\tstartValue: z.union([z.string(), z.number()]),\n\tendValue: z.union([z.string(), z.number()]),\n});\n\nexport type ScorecardLegend = z.infer<typeof legendSchema>;\n\nexport const specificTargetSchema = z.object({\n\ttype: z.enum([\"periods\", \"orgUnit\"]),\n\titems: z.array(z.string()),\n\tlegends: z.array(legendSchema),\n});\n\nexport type SpecificTarget = z.infer<typeof specificTargetSchema>;\n\nexport const orgUnitLevelLegendSchema = z.record(\n\tz.string(),\n\tz.array(legendSchema),\n);\n\nexport type OrgUnitLevelLegend = z.infer<typeof orgUnitLevelLegendSchema>;\n\nexport const dataSourceSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tlabel: z.string().optional(),\n\ttype: supportedDataSources,\n\tdisplayArrows: z.boolean(),\n\thighIsGood: z.boolean(),\n\teffectiveGap: z.number(),\n\tshowColors: z.boolean(),\n\tweight: z.number(),\n\tlegends: z.union([z.array(legendSchema), orgUnitLevelLegendSchema]),\n\tspecificTargets: z.array(specificTargetSchema).optional(),\n\tspecificTargetsSet: z.boolean().optional(),\n\tdescription: z.string().optional(),\n});\n\nexport type ScorecardDataSource = z.infer<typeof dataSourceSchema>;\n\nexport const dataHolderSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataSources: z.array(dataSourceSchema),\n});\n\nexport type ScorecardDataHolder = z.infer<typeof dataHolderSchema>;\n\nexport const dataGroupSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataHolders: z.array(dataHolderSchema),\n\tstyle: z.object({}),\n\ttitle: z.string(),\n});\n\nexport type ScorecardDataGroup = z.infer<typeof dataGroupSchema>;\n\nconst scorecardConfig = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tsubtitle: z.string().optional(),\n\tcustomHeader: z.string().optional(),\n\tdescription: z.string().optional(),\n\tlegendDefinitions: z.array(legendDefinitionSchema),\n\toptions: scorecardViewOptionsSchema,\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\tdataSelection: z.object({\n\t\tdataGroups: z.array(dataGroupSchema),\n\t}),\n\thighlightedIndicators: z.array(dataSourceSchema),\n\tadditionalLabels: z.array(z.string()).optional(),\n});\n\nexport type ScorecardConfig = z.infer<typeof scorecardConfig>;\n\nconst scorecardStateSchema = z.object({\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\toptions: scorecardViewOptionsSchema,\n\tnested: z.boolean().optional(),\n\thasOnePeriod: z.boolean().optional(),\n});\n\nexport type ScorecardState = z.infer<typeof scorecardStateSchema>;\n\nexport const scorecardAnalyticsData = z.object({\n\tdx: z.string().optional(),\n\tpe: z.string().optional(),\n\tou: z.string().optional(),\n\tvalue: z.string().optional(),\n});\n\nexport type ScorecardAnalyticsData = z.infer<typeof scorecardAnalyticsData>;\n\nexport const scorecardTableData = z.object({\n\tlabel: z.string(),\n\tdataValues: z.array(scorecardAnalyticsData),\n\tdataHolder: dataHolderSchema.optional(),\n\torgUnit: z\n\t\t.object({\n\t\t\tuid: z.string(),\n\t\t\tname: z.string(),\n\t\t\thierarchy: z.string(),\n\t\t})\n\t\t.optional(),\n\texpand: z.boolean().optional(),\n});\n\nexport type ScorecardTableData = z.infer<typeof scorecardTableData> & RowData;\n\nexport const scorecardTableCellData = z.object({\n\tdataSources: z.array(\n\t\tdataSourceSchema.extend({\n\t\t\tdata: z.object({\n\t\t\t\tprevious: z.number().optional(),\n\t\t\t\tcurrent: z.number().optional(),\n\t\t\t}),\n\t\t}),\n\t),\n\torgUnit: z.object({\n\t\tuid: z.string(),\n\t\tname: z.string(),\n\t\thierarchy: z.string(),\n\t}),\n\tperiod: z.string(),\n});\n\nexport type ScorecardTableCellData = z.infer<typeof scorecardTableCellData>;\n\nexport type SanitizedScorecardTableData = z.infer<typeof scorecardTableData>;\n\nexport enum ScorecardTableOrientation {\n\tORG_UNIT_VS_DATA = \"orgUnitsVsData\",\n\tDATA_VS_ORG_UNIT = \"dataVsOrgUnits\",\n}\n\nexport enum ScorecardTableDimension {\n\tGROUP = \"group\",\n\tORG_UNITS = \"orgUnits\",\n\tPERIODS = \"periods\",\n\tDATA = \"data\",\n}\n\nexport enum ScorecardDraggableItems {\n\tou = \"ou\",\n\tdata = \"data\",\n}\n"]}
1
+ {"version":3,"sources":["../../../../../src/components/Scorecard/schemas/config.ts"],"names":["ScorecardTableOrientation","ScorecardTableDimension","ScorecardDraggableItems"],"mappings":"AAAA,SAAS,SAAS;AAGX,MAAM,uBAAuB,EAAE,KAAK;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEM,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACxC,OAAO,EAAE,OAAO;AAAA,EAChB,UAAU,EAAE,QAAQ;AAAA,EACpB,OAAO,EAAE;AAAA,IACR,EAAE,OAAO;AAAA,IACT,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC;AAAA,EAChD;AAAA,EACA,YAAY,EAAE;AAAA,IACb,EAAE,OAAO;AAAA,IACT,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC;AAAA,EAChD;AACD,CAAC;AAMM,MAAM,yBAAyB,EAAE,OAAO;AAAA,EAC9C,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,WAAW,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAIM,MAAM,6BAA6B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C1C,YAAY,iBAAiB,SAAS;AAAA,EACtC,SAAS,EACP,OAAO;AAAA,IACP,KAAK,EAAE,OAAO;AAAA,IACd,MAAM,EAAE,OAAO;AAAA,IACf,WAAW,EAAE,OAAO;AAAA,EACrB,CAAC,EACA,SAAS;AAAA,EACX,QAAQ,EAAE,QAAQ,EAAE,SAAS;AAC9B,CAAC;AAIM,MAAM,yBAAyB,EAAE,OAAO;AAAA,EAC9C,aAAa,EAAE;AAAA,IACd,iBAAiB,OAAO;AAAA,MACvB,MAAM,EAAE,OAAO;AAAA,QACd,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,QAC9B,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,MAC9B,CAAC;AAAA,IACF,CAAC;AAAA,EACF;AAAA,EACA,SAAS,EAAE,OAAO;AAAA,IACjB,KAAK,EAAE,OAAO;AAAA,IACd,MAAM,EAAE,OAAO;AAAA,IACf,WAAW,EAAE,OAAO;AAAA,EACrB,CAAC;AAAA,EACD,QAAQ,EAAE,OAAO;AAClB,CAAC;AAMM,IAAK,4BAAL,kBAAKA,+BAAL;AACN,EAAAA,2BAAA,sBAAmB;AACnB,EAAAA,2BAAA,sBAAmB;AAFR,SAAAA;AAAA,GAAA;AAKL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,WAAQ;AACR,EAAAA,yBAAA,eAAY;AACZ,EAAAA,yBAAA,aAAU;AACV,EAAAA,yBAAA,UAAO;AAJI,SAAAA;AAAA,GAAA;AAOL,IAAK,0BAAL,kBAAKC,6BAAL;AACN,EAAAA,yBAAA,QAAK;AACL,EAAAA,yBAAA,UAAO;AAFI,SAAAA;AAAA,GAAA","sourcesContent":["import { z } from \"zod\";\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport const supportedDataSources = z.enum([\n\t\"indicator\",\n\t\"programIndicator\",\n\t\"dataSet\",\n\t\"dataElement\",\n\t\"customFunction\",\n\t\"sqlView\",\n]);\n\nexport const scorecardSharing = z.object({\n\towner: z.string(),\n\texternal: z.boolean(),\n\tusers: z.record(\n\t\tz.string(),\n\t\tz.object({ access: z.string(), id: z.string() }),\n\t),\n\tuserGroups: z.record(\n\t\tz.string(),\n\t\tz.object({ access: z.string(), id: z.string() }),\n\t),\n});\n\nexport type ScorecardSharing = z.infer<typeof scorecardSharing>;\n\nexport type SupportedDataSources = z.infer<typeof supportedDataSources>;\n\nexport const legendDefinitionSchema = z.object({\n\tid: z.string(),\n\tcolor: z.string(),\n\tname: z.string(),\n\tisDefault: z.boolean().optional(),\n});\n\nexport type LegendDefinition = z.infer<typeof legendDefinitionSchema>;\n\nexport const scorecardViewOptionsSchema = z.object({\n\taverageColumn: z.boolean().optional(),\n\taverageDisplayType: z\n\t\t.enum([\"ALL\", \"ABOVE_AVERAGE\", \"BELOW_AVERAGE\"])\n\t\t.optional(),\n\taverageRow: z.boolean().optional(),\n\temptyRows: z.boolean().optional(),\n\thighlightedIndicators: z.boolean().optional(),\n\titemNumber: z.boolean().optional(),\n\tlegend: z.boolean().optional(),\n\tshowHierarchy: z.boolean().optional(),\n\ttitle: z.boolean().optional(),\n\tarrows: z.boolean().optional(),\n\tshowDataInRows: z.boolean().optional(),\n\tdisableExpanding: z.boolean().optional(),\n});\n\nexport type ScorecardViewOptions = z.infer<typeof scorecardViewOptionsSchema>;\n\nexport const organisationUnitSelectionSchema = z.object({\n\tuserOrgUnit: z.boolean().optional(),\n\tuserSubUnit: z.boolean().optional(),\n\tuserSubX2Unit: z.boolean().optional(),\n\torgUnits: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\tgroups: z.array(z.string()).optional(),\n\tlevels: z.array(z.string()).optional(),\n});\n\nexport type OrgUnitSelection = z.infer<typeof organisationUnitSelectionSchema>;\n\nexport const periodSelectionSchema = z.object({\n\tperiods: z.array(\n\t\tz.object({\n\t\t\tid: z.string(),\n\t\t}),\n\t),\n\ttype: z.string().optional(),\n});\n\nexport type PeriodSelection = z.infer<typeof periodSelectionSchema>;\n\nexport const legendSchema = z.object({\n\tlegendDefinitionId: z.string(),\n\tid: z.string(),\n\tstartValue: z.union([z.string(), z.number()]),\n\tendValue: z.union([z.string(), z.number()]),\n});\n\nexport type ScorecardLegend = z.infer<typeof legendSchema>;\n\nexport const specificTargetSchema = z.object({\n\ttype: z.enum([\"periods\", \"orgUnit\"]),\n\titems: z.array(z.string()),\n\tlegends: z.array(legendSchema),\n});\n\nexport type SpecificTarget = z.infer<typeof specificTargetSchema>;\n\nexport const orgUnitLevelLegendSchema = z.record(\n\tz.string(),\n\tz.array(legendSchema),\n);\n\nexport type OrgUnitLevelLegend = z.infer<typeof orgUnitLevelLegendSchema>;\n\nexport const dataSourceSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tlabel: z.string().optional(),\n\ttype: supportedDataSources,\n\tdisplayArrows: z.boolean(),\n\thighIsGood: z.boolean(),\n\teffectiveGap: z.number(),\n\tshowColors: z.boolean(),\n\tweight: z.number(),\n\tlegends: z.union([z.array(legendSchema), orgUnitLevelLegendSchema]),\n\tspecificTargets: z.array(specificTargetSchema).optional(),\n\tspecificTargetsSet: z.boolean().optional(),\n\tdescription: z.string().optional(),\n});\n\nexport type ScorecardDataSource = z.infer<typeof dataSourceSchema>;\n\nexport const dataHolderSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataSources: z.array(dataSourceSchema),\n});\n\nexport type ScorecardDataHolder = z.infer<typeof dataHolderSchema>;\n\nexport const dataGroupSchema = z.object({\n\tid: z.union([z.number(), z.string()]),\n\tdataHolders: z.array(dataHolderSchema),\n\tstyle: z.object({}),\n\ttitle: z.string(),\n});\n\nexport type ScorecardDataGroup = z.infer<typeof dataGroupSchema>;\n\nconst scorecardConfig = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tsubtitle: z.string().optional(),\n\tcustomHeader: z.string().optional(),\n\tdescription: z.string().optional(),\n\tlegendDefinitions: z.array(legendDefinitionSchema),\n\toptions: scorecardViewOptionsSchema,\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\tdataSelection: z.object({\n\t\tdataGroups: z.array(dataGroupSchema),\n\t}),\n\thighlightedIndicators: z.array(dataSourceSchema),\n\tadditionalLabels: z.array(z.string()).optional(),\n\tsharing: scorecardSharing,\n});\n\nexport type ScorecardConfig = z.infer<typeof scorecardConfig>;\n\nconst scorecardStateSchema = z.object({\n\torgUnitSelection: organisationUnitSelectionSchema,\n\tperiodSelection: periodSelectionSchema,\n\toptions: scorecardViewOptionsSchema,\n\tnested: z.boolean().optional(),\n\thasOnePeriod: z.boolean().optional(),\n});\n\nexport type ScorecardState = z.infer<typeof scorecardStateSchema>;\n\nexport const scorecardAnalyticsData = z.object({\n\tdx: z.string().optional(),\n\tpe: z.string().optional(),\n\tou: z.string().optional(),\n\tvalue: z.string().optional(),\n});\n\nexport type ScorecardAnalyticsData = z.infer<typeof scorecardAnalyticsData>;\n\nexport const scorecardTableData = z.object({\n\tlabel: z.string(),\n\tdataValues: z.array(scorecardAnalyticsData),\n\tdataHolder: dataHolderSchema.optional(),\n\torgUnit: z\n\t\t.object({\n\t\t\tuid: z.string(),\n\t\t\tname: z.string(),\n\t\t\thierarchy: z.string(),\n\t\t})\n\t\t.optional(),\n\texpand: z.boolean().optional(),\n});\n\nexport type ScorecardTableData = z.infer<typeof scorecardTableData> & RowData;\n\nexport const scorecardTableCellData = z.object({\n\tdataSources: z.array(\n\t\tdataSourceSchema.extend({\n\t\t\tdata: z.object({\n\t\t\t\tprevious: z.number().optional(),\n\t\t\t\tcurrent: z.number().optional(),\n\t\t\t}),\n\t\t}),\n\t),\n\torgUnit: z.object({\n\t\tuid: z.string(),\n\t\tname: z.string(),\n\t\thierarchy: z.string(),\n\t}),\n\tperiod: z.string(),\n});\n\nexport type ScorecardTableCellData = z.infer<typeof scorecardTableCellData>;\n\nexport type SanitizedScorecardTableData = z.infer<typeof scorecardTableData>;\n\nexport enum ScorecardTableOrientation {\n\tORG_UNIT_VS_DATA = \"orgUnitsVsData\",\n\tDATA_VS_ORG_UNIT = \"dataVsOrgUnits\",\n}\n\nexport enum ScorecardTableDimension {\n\tGROUP = \"group\",\n\tORG_UNITS = \"orgUnits\",\n\tPERIODS = \"periods\",\n\tDATA = \"data\",\n}\n\nexport enum ScorecardDraggableItems {\n\tou = \"ou\",\n\tdata = \"data\",\n}\n"]}
@@ -3,17 +3,17 @@ import type { ScorecardConfig } from "../schemas/config";
3
3
  export declare function useScorecardConfig(): {
4
4
  id: string;
5
5
  options: {
6
- legend: boolean;
7
- title: boolean;
8
- averageColumn: boolean;
9
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
10
- averageRow: boolean;
11
- emptyRows: boolean;
12
- highlightedIndicators: boolean;
13
- itemNumber: boolean;
14
- showHierarchy: boolean;
15
- arrows: boolean;
16
- showDataInRows: boolean;
6
+ legend?: boolean | undefined;
7
+ title?: boolean | undefined;
8
+ averageColumn?: boolean | undefined;
9
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
10
+ averageRow?: boolean | undefined;
11
+ emptyRows?: boolean | undefined;
12
+ highlightedIndicators?: boolean | undefined;
13
+ itemNumber?: boolean | undefined;
14
+ showHierarchy?: boolean | undefined;
15
+ arrows?: boolean | undefined;
16
+ showDataInRows?: boolean | undefined;
17
17
  disableExpanding?: boolean | undefined;
18
18
  };
19
19
  title: string;
@@ -117,6 +117,18 @@ export declare function useScorecardConfig(): {
117
117
  }[];
118
118
  }[];
119
119
  };
120
+ sharing: {
121
+ external: boolean;
122
+ owner: string;
123
+ users: Record<string, {
124
+ id: string;
125
+ access: string;
126
+ }>;
127
+ userGroups: Record<string, {
128
+ id: string;
129
+ access: string;
130
+ }>;
131
+ };
120
132
  description?: string | undefined;
121
133
  subtitle?: string | undefined;
122
134
  customHeader?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Scorecard/components/ConfigProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKzD,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUjC;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAMA,CAAC"}
1
+ {"version":3,"file":"ConfigProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Scorecard/components/ConfigProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKzD,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUjC;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAMA,CAAC"}
@@ -3,17 +3,17 @@ import type { ScorecardState } from "../schemas/config";
3
3
  export type ScorecardSetState = Dispatch<SetStateAction<ScorecardState>>;
4
4
  export declare function useScorecardState(): {
5
5
  options: {
6
- legend: boolean;
7
- title: boolean;
8
- averageColumn: boolean;
9
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
10
- averageRow: boolean;
11
- emptyRows: boolean;
12
- highlightedIndicators: boolean;
13
- itemNumber: boolean;
14
- showHierarchy: boolean;
15
- arrows: boolean;
16
- showDataInRows: boolean;
6
+ legend?: boolean | undefined;
7
+ title?: boolean | undefined;
8
+ averageColumn?: boolean | undefined;
9
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
10
+ averageRow?: boolean | undefined;
11
+ emptyRows?: boolean | undefined;
12
+ highlightedIndicators?: boolean | undefined;
13
+ itemNumber?: boolean | undefined;
14
+ showHierarchy?: boolean | undefined;
15
+ arrows?: boolean | undefined;
16
+ showDataInRows?: boolean | undefined;
17
17
  disableExpanding?: boolean | undefined;
18
18
  };
19
19
  orgUnitSelection: {
@@ -1,6 +1,53 @@
1
1
  import { z } from "zod";
2
2
  import type { RowData } from "@tanstack/react-table";
3
3
  export declare const supportedDataSources: z.ZodEnum<["indicator", "programIndicator", "dataSet", "dataElement", "customFunction", "sqlView"]>;
4
+ export declare const scorecardSharing: z.ZodObject<{
5
+ owner: z.ZodString;
6
+ external: z.ZodBoolean;
7
+ users: z.ZodRecord<z.ZodString, z.ZodObject<{
8
+ access: z.ZodString;
9
+ id: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string;
12
+ access: string;
13
+ }, {
14
+ id: string;
15
+ access: string;
16
+ }>>;
17
+ userGroups: z.ZodRecord<z.ZodString, z.ZodObject<{
18
+ access: z.ZodString;
19
+ id: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ id: string;
22
+ access: string;
23
+ }, {
24
+ id: string;
25
+ access: string;
26
+ }>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ external: boolean;
29
+ owner: string;
30
+ users: Record<string, {
31
+ id: string;
32
+ access: string;
33
+ }>;
34
+ userGroups: Record<string, {
35
+ id: string;
36
+ access: string;
37
+ }>;
38
+ }, {
39
+ external: boolean;
40
+ owner: string;
41
+ users: Record<string, {
42
+ id: string;
43
+ access: string;
44
+ }>;
45
+ userGroups: Record<string, {
46
+ id: string;
47
+ access: string;
48
+ }>;
49
+ }>;
50
+ export type ScorecardSharing = z.infer<typeof scorecardSharing>;
4
51
  export type SupportedDataSources = z.infer<typeof supportedDataSources>;
5
52
  export declare const legendDefinitionSchema: z.ZodObject<{
6
53
  id: z.ZodString;
@@ -20,43 +67,43 @@ export declare const legendDefinitionSchema: z.ZodObject<{
20
67
  }>;
21
68
  export type LegendDefinition = z.infer<typeof legendDefinitionSchema>;
22
69
  export declare const scorecardViewOptionsSchema: z.ZodObject<{
23
- averageColumn: z.ZodBoolean;
24
- averageDisplayType: z.ZodEnum<["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]>;
25
- averageRow: z.ZodBoolean;
26
- emptyRows: z.ZodBoolean;
27
- highlightedIndicators: z.ZodBoolean;
28
- itemNumber: z.ZodBoolean;
29
- legend: z.ZodBoolean;
30
- showHierarchy: z.ZodBoolean;
31
- title: z.ZodBoolean;
32
- arrows: z.ZodBoolean;
33
- showDataInRows: z.ZodBoolean;
70
+ averageColumn: z.ZodOptional<z.ZodBoolean>;
71
+ averageDisplayType: z.ZodOptional<z.ZodEnum<["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]>>;
72
+ averageRow: z.ZodOptional<z.ZodBoolean>;
73
+ emptyRows: z.ZodOptional<z.ZodBoolean>;
74
+ highlightedIndicators: z.ZodOptional<z.ZodBoolean>;
75
+ itemNumber: z.ZodOptional<z.ZodBoolean>;
76
+ legend: z.ZodOptional<z.ZodBoolean>;
77
+ showHierarchy: z.ZodOptional<z.ZodBoolean>;
78
+ title: z.ZodOptional<z.ZodBoolean>;
79
+ arrows: z.ZodOptional<z.ZodBoolean>;
80
+ showDataInRows: z.ZodOptional<z.ZodBoolean>;
34
81
  disableExpanding: z.ZodOptional<z.ZodBoolean>;
35
82
  }, "strip", z.ZodTypeAny, {
36
- legend: boolean;
37
- title: boolean;
38
- averageColumn: boolean;
39
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
40
- averageRow: boolean;
41
- emptyRows: boolean;
42
- highlightedIndicators: boolean;
43
- itemNumber: boolean;
44
- showHierarchy: boolean;
45
- arrows: boolean;
46
- showDataInRows: boolean;
83
+ legend?: boolean | undefined;
84
+ title?: boolean | undefined;
85
+ averageColumn?: boolean | undefined;
86
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
87
+ averageRow?: boolean | undefined;
88
+ emptyRows?: boolean | undefined;
89
+ highlightedIndicators?: boolean | undefined;
90
+ itemNumber?: boolean | undefined;
91
+ showHierarchy?: boolean | undefined;
92
+ arrows?: boolean | undefined;
93
+ showDataInRows?: boolean | undefined;
47
94
  disableExpanding?: boolean | undefined;
48
95
  }, {
49
- legend: boolean;
50
- title: boolean;
51
- averageColumn: boolean;
52
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
53
- averageRow: boolean;
54
- emptyRows: boolean;
55
- highlightedIndicators: boolean;
56
- itemNumber: boolean;
57
- showHierarchy: boolean;
58
- arrows: boolean;
59
- showDataInRows: boolean;
96
+ legend?: boolean | undefined;
97
+ title?: boolean | undefined;
98
+ averageColumn?: boolean | undefined;
99
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
100
+ averageRow?: boolean | undefined;
101
+ emptyRows?: boolean | undefined;
102
+ highlightedIndicators?: boolean | undefined;
103
+ itemNumber?: boolean | undefined;
104
+ showHierarchy?: boolean | undefined;
105
+ arrows?: boolean | undefined;
106
+ showDataInRows?: boolean | undefined;
60
107
  disableExpanding?: boolean | undefined;
61
108
  }>;
62
109
  export type ScorecardViewOptions = z.infer<typeof scorecardViewOptionsSchema>;
@@ -894,43 +941,43 @@ declare const scorecardConfig: z.ZodObject<{
894
941
  isDefault?: boolean | undefined;
895
942
  }>, "many">;
896
943
  options: z.ZodObject<{
897
- averageColumn: z.ZodBoolean;
898
- averageDisplayType: z.ZodEnum<["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]>;
899
- averageRow: z.ZodBoolean;
900
- emptyRows: z.ZodBoolean;
901
- highlightedIndicators: z.ZodBoolean;
902
- itemNumber: z.ZodBoolean;
903
- legend: z.ZodBoolean;
904
- showHierarchy: z.ZodBoolean;
905
- title: z.ZodBoolean;
906
- arrows: z.ZodBoolean;
907
- showDataInRows: z.ZodBoolean;
944
+ averageColumn: z.ZodOptional<z.ZodBoolean>;
945
+ averageDisplayType: z.ZodOptional<z.ZodEnum<["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]>>;
946
+ averageRow: z.ZodOptional<z.ZodBoolean>;
947
+ emptyRows: z.ZodOptional<z.ZodBoolean>;
948
+ highlightedIndicators: z.ZodOptional<z.ZodBoolean>;
949
+ itemNumber: z.ZodOptional<z.ZodBoolean>;
950
+ legend: z.ZodOptional<z.ZodBoolean>;
951
+ showHierarchy: z.ZodOptional<z.ZodBoolean>;
952
+ title: z.ZodOptional<z.ZodBoolean>;
953
+ arrows: z.ZodOptional<z.ZodBoolean>;
954
+ showDataInRows: z.ZodOptional<z.ZodBoolean>;
908
955
  disableExpanding: z.ZodOptional<z.ZodBoolean>;
909
956
  }, "strip", z.ZodTypeAny, {
910
- legend: boolean;
911
- title: boolean;
912
- averageColumn: boolean;
913
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
914
- averageRow: boolean;
915
- emptyRows: boolean;
916
- highlightedIndicators: boolean;
917
- itemNumber: boolean;
918
- showHierarchy: boolean;
919
- arrows: boolean;
920
- showDataInRows: boolean;
957
+ legend?: boolean | undefined;
958
+ title?: boolean | undefined;
959
+ averageColumn?: boolean | undefined;
960
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
961
+ averageRow?: boolean | undefined;
962
+ emptyRows?: boolean | undefined;
963
+ highlightedIndicators?: boolean | undefined;
964
+ itemNumber?: boolean | undefined;
965
+ showHierarchy?: boolean | undefined;
966
+ arrows?: boolean | undefined;
967
+ showDataInRows?: boolean | undefined;
921
968
  disableExpanding?: boolean | undefined;
922
969
  }, {
923
- legend: boolean;
924
- title: boolean;
925
- averageColumn: boolean;
926
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
927
- averageRow: boolean;
928
- emptyRows: boolean;
929
- highlightedIndicators: boolean;
930
- itemNumber: boolean;
931
- showHierarchy: boolean;
932
- arrows: boolean;
933
- showDataInRows: boolean;
970
+ legend?: boolean | undefined;
971
+ title?: boolean | undefined;
972
+ averageColumn?: boolean | undefined;
973
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
974
+ averageRow?: boolean | undefined;
975
+ emptyRows?: boolean | undefined;
976
+ highlightedIndicators?: boolean | undefined;
977
+ itemNumber?: boolean | undefined;
978
+ showHierarchy?: boolean | undefined;
979
+ arrows?: boolean | undefined;
980
+ showDataInRows?: boolean | undefined;
934
981
  disableExpanding?: boolean | undefined;
935
982
  }>;
936
983
  orgUnitSelection: z.ZodObject<{
@@ -1532,20 +1579,66 @@ declare const scorecardConfig: z.ZodObject<{
1532
1579
  specificTargetsSet?: boolean | undefined;
1533
1580
  }>, "many">;
1534
1581
  additionalLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1582
+ sharing: z.ZodObject<{
1583
+ owner: z.ZodString;
1584
+ external: z.ZodBoolean;
1585
+ users: z.ZodRecord<z.ZodString, z.ZodObject<{
1586
+ access: z.ZodString;
1587
+ id: z.ZodString;
1588
+ }, "strip", z.ZodTypeAny, {
1589
+ id: string;
1590
+ access: string;
1591
+ }, {
1592
+ id: string;
1593
+ access: string;
1594
+ }>>;
1595
+ userGroups: z.ZodRecord<z.ZodString, z.ZodObject<{
1596
+ access: z.ZodString;
1597
+ id: z.ZodString;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ id: string;
1600
+ access: string;
1601
+ }, {
1602
+ id: string;
1603
+ access: string;
1604
+ }>>;
1605
+ }, "strip", z.ZodTypeAny, {
1606
+ external: boolean;
1607
+ owner: string;
1608
+ users: Record<string, {
1609
+ id: string;
1610
+ access: string;
1611
+ }>;
1612
+ userGroups: Record<string, {
1613
+ id: string;
1614
+ access: string;
1615
+ }>;
1616
+ }, {
1617
+ external: boolean;
1618
+ owner: string;
1619
+ users: Record<string, {
1620
+ id: string;
1621
+ access: string;
1622
+ }>;
1623
+ userGroups: Record<string, {
1624
+ id: string;
1625
+ access: string;
1626
+ }>;
1627
+ }>;
1535
1628
  }, "strip", z.ZodTypeAny, {
1536
1629
  id: string;
1537
1630
  options: {
1538
- legend: boolean;
1539
- title: boolean;
1540
- averageColumn: boolean;
1541
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
1542
- averageRow: boolean;
1543
- emptyRows: boolean;
1544
- highlightedIndicators: boolean;
1545
- itemNumber: boolean;
1546
- showHierarchy: boolean;
1547
- arrows: boolean;
1548
- showDataInRows: boolean;
1631
+ legend?: boolean | undefined;
1632
+ title?: boolean | undefined;
1633
+ averageColumn?: boolean | undefined;
1634
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
1635
+ averageRow?: boolean | undefined;
1636
+ emptyRows?: boolean | undefined;
1637
+ highlightedIndicators?: boolean | undefined;
1638
+ itemNumber?: boolean | undefined;
1639
+ showHierarchy?: boolean | undefined;
1640
+ arrows?: boolean | undefined;
1641
+ showDataInRows?: boolean | undefined;
1549
1642
  disableExpanding?: boolean | undefined;
1550
1643
  };
1551
1644
  title: string;
@@ -1649,6 +1742,18 @@ declare const scorecardConfig: z.ZodObject<{
1649
1742
  }[];
1650
1743
  }[];
1651
1744
  };
1745
+ sharing: {
1746
+ external: boolean;
1747
+ owner: string;
1748
+ users: Record<string, {
1749
+ id: string;
1750
+ access: string;
1751
+ }>;
1752
+ userGroups: Record<string, {
1753
+ id: string;
1754
+ access: string;
1755
+ }>;
1756
+ };
1652
1757
  description?: string | undefined;
1653
1758
  subtitle?: string | undefined;
1654
1759
  customHeader?: string | undefined;
@@ -1656,17 +1761,17 @@ declare const scorecardConfig: z.ZodObject<{
1656
1761
  }, {
1657
1762
  id: string;
1658
1763
  options: {
1659
- legend: boolean;
1660
- title: boolean;
1661
- averageColumn: boolean;
1662
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
1663
- averageRow: boolean;
1664
- emptyRows: boolean;
1665
- highlightedIndicators: boolean;
1666
- itemNumber: boolean;
1667
- showHierarchy: boolean;
1668
- arrows: boolean;
1669
- showDataInRows: boolean;
1764
+ legend?: boolean | undefined;
1765
+ title?: boolean | undefined;
1766
+ averageColumn?: boolean | undefined;
1767
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
1768
+ averageRow?: boolean | undefined;
1769
+ emptyRows?: boolean | undefined;
1770
+ highlightedIndicators?: boolean | undefined;
1771
+ itemNumber?: boolean | undefined;
1772
+ showHierarchy?: boolean | undefined;
1773
+ arrows?: boolean | undefined;
1774
+ showDataInRows?: boolean | undefined;
1670
1775
  disableExpanding?: boolean | undefined;
1671
1776
  };
1672
1777
  title: string;
@@ -1770,6 +1875,18 @@ declare const scorecardConfig: z.ZodObject<{
1770
1875
  }[];
1771
1876
  }[];
1772
1877
  };
1878
+ sharing: {
1879
+ external: boolean;
1880
+ owner: string;
1881
+ users: Record<string, {
1882
+ id: string;
1883
+ access: string;
1884
+ }>;
1885
+ userGroups: Record<string, {
1886
+ id: string;
1887
+ access: string;
1888
+ }>;
1889
+ };
1773
1890
  description?: string | undefined;
1774
1891
  subtitle?: string | undefined;
1775
1892
  customHeader?: string | undefined;
@@ -1830,60 +1947,60 @@ declare const scorecardStateSchema: z.ZodObject<{
1830
1947
  type?: string | undefined;
1831
1948
  }>;
1832
1949
  options: z.ZodObject<{
1833
- averageColumn: z.ZodBoolean;
1834
- averageDisplayType: z.ZodEnum<["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]>;
1835
- averageRow: z.ZodBoolean;
1836
- emptyRows: z.ZodBoolean;
1837
- highlightedIndicators: z.ZodBoolean;
1838
- itemNumber: z.ZodBoolean;
1839
- legend: z.ZodBoolean;
1840
- showHierarchy: z.ZodBoolean;
1841
- title: z.ZodBoolean;
1842
- arrows: z.ZodBoolean;
1843
- showDataInRows: z.ZodBoolean;
1950
+ averageColumn: z.ZodOptional<z.ZodBoolean>;
1951
+ averageDisplayType: z.ZodOptional<z.ZodEnum<["ALL", "ABOVE_AVERAGE", "BELOW_AVERAGE"]>>;
1952
+ averageRow: z.ZodOptional<z.ZodBoolean>;
1953
+ emptyRows: z.ZodOptional<z.ZodBoolean>;
1954
+ highlightedIndicators: z.ZodOptional<z.ZodBoolean>;
1955
+ itemNumber: z.ZodOptional<z.ZodBoolean>;
1956
+ legend: z.ZodOptional<z.ZodBoolean>;
1957
+ showHierarchy: z.ZodOptional<z.ZodBoolean>;
1958
+ title: z.ZodOptional<z.ZodBoolean>;
1959
+ arrows: z.ZodOptional<z.ZodBoolean>;
1960
+ showDataInRows: z.ZodOptional<z.ZodBoolean>;
1844
1961
  disableExpanding: z.ZodOptional<z.ZodBoolean>;
1845
1962
  }, "strip", z.ZodTypeAny, {
1846
- legend: boolean;
1847
- title: boolean;
1848
- averageColumn: boolean;
1849
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
1850
- averageRow: boolean;
1851
- emptyRows: boolean;
1852
- highlightedIndicators: boolean;
1853
- itemNumber: boolean;
1854
- showHierarchy: boolean;
1855
- arrows: boolean;
1856
- showDataInRows: boolean;
1963
+ legend?: boolean | undefined;
1964
+ title?: boolean | undefined;
1965
+ averageColumn?: boolean | undefined;
1966
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
1967
+ averageRow?: boolean | undefined;
1968
+ emptyRows?: boolean | undefined;
1969
+ highlightedIndicators?: boolean | undefined;
1970
+ itemNumber?: boolean | undefined;
1971
+ showHierarchy?: boolean | undefined;
1972
+ arrows?: boolean | undefined;
1973
+ showDataInRows?: boolean | undefined;
1857
1974
  disableExpanding?: boolean | undefined;
1858
1975
  }, {
1859
- legend: boolean;
1860
- title: boolean;
1861
- averageColumn: boolean;
1862
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
1863
- averageRow: boolean;
1864
- emptyRows: boolean;
1865
- highlightedIndicators: boolean;
1866
- itemNumber: boolean;
1867
- showHierarchy: boolean;
1868
- arrows: boolean;
1869
- showDataInRows: boolean;
1976
+ legend?: boolean | undefined;
1977
+ title?: boolean | undefined;
1978
+ averageColumn?: boolean | undefined;
1979
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
1980
+ averageRow?: boolean | undefined;
1981
+ emptyRows?: boolean | undefined;
1982
+ highlightedIndicators?: boolean | undefined;
1983
+ itemNumber?: boolean | undefined;
1984
+ showHierarchy?: boolean | undefined;
1985
+ arrows?: boolean | undefined;
1986
+ showDataInRows?: boolean | undefined;
1870
1987
  disableExpanding?: boolean | undefined;
1871
1988
  }>;
1872
1989
  nested: z.ZodOptional<z.ZodBoolean>;
1873
1990
  hasOnePeriod: z.ZodOptional<z.ZodBoolean>;
1874
1991
  }, "strip", z.ZodTypeAny, {
1875
1992
  options: {
1876
- legend: boolean;
1877
- title: boolean;
1878
- averageColumn: boolean;
1879
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
1880
- averageRow: boolean;
1881
- emptyRows: boolean;
1882
- highlightedIndicators: boolean;
1883
- itemNumber: boolean;
1884
- showHierarchy: boolean;
1885
- arrows: boolean;
1886
- showDataInRows: boolean;
1993
+ legend?: boolean | undefined;
1994
+ title?: boolean | undefined;
1995
+ averageColumn?: boolean | undefined;
1996
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
1997
+ averageRow?: boolean | undefined;
1998
+ emptyRows?: boolean | undefined;
1999
+ highlightedIndicators?: boolean | undefined;
2000
+ itemNumber?: boolean | undefined;
2001
+ showHierarchy?: boolean | undefined;
2002
+ arrows?: boolean | undefined;
2003
+ showDataInRows?: boolean | undefined;
1887
2004
  disableExpanding?: boolean | undefined;
1888
2005
  };
1889
2006
  orgUnitSelection: {
@@ -1906,17 +2023,17 @@ declare const scorecardStateSchema: z.ZodObject<{
1906
2023
  hasOnePeriod?: boolean | undefined;
1907
2024
  }, {
1908
2025
  options: {
1909
- legend: boolean;
1910
- title: boolean;
1911
- averageColumn: boolean;
1912
- averageDisplayType: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE";
1913
- averageRow: boolean;
1914
- emptyRows: boolean;
1915
- highlightedIndicators: boolean;
1916
- itemNumber: boolean;
1917
- showHierarchy: boolean;
1918
- arrows: boolean;
1919
- showDataInRows: boolean;
2026
+ legend?: boolean | undefined;
2027
+ title?: boolean | undefined;
2028
+ averageColumn?: boolean | undefined;
2029
+ averageDisplayType?: "ALL" | "ABOVE_AVERAGE" | "BELOW_AVERAGE" | undefined;
2030
+ averageRow?: boolean | undefined;
2031
+ emptyRows?: boolean | undefined;
2032
+ highlightedIndicators?: boolean | undefined;
2033
+ itemNumber?: boolean | undefined;
2034
+ showHierarchy?: boolean | undefined;
2035
+ arrows?: boolean | undefined;
2036
+ showDataInRows?: boolean | undefined;
1920
2037
  disableExpanding?: boolean | undefined;
1921
2038
  };
1922
2039
  orgUnitSelection: {
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/components/Scorecard/schemas/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,eAAO,MAAM,oBAAoB,qGAO/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAA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z/dhis2-analytics",
3
- "version": "2.0.25",
3
+ "version": "2.0.27",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -44,8 +44,8 @@
44
44
  "tsup": "^8.0.1",
45
45
  "typescript": "^5.3.3",
46
46
  "usehooks-ts": "^2.9.2",
47
- "@repo/eslint-config": "0.0.0",
48
- "@repo/typescript-config": "0.0.0"
47
+ "@repo/typescript-config": "0.0.0",
48
+ "@repo/eslint-config": "0.0.0"
49
49
  },
50
50
  "dependencies": {
51
51
  "@dnd-kit/core": "^6.1.0",
@@ -69,7 +69,7 @@
69
69
  "react-spring": "^9.6.1",
70
70
  "screenfull": "^6.0.2",
71
71
  "zod": "^3.23.8",
72
- "@hisptz/dhis2-ui": "2.0.20",
72
+ "@hisptz/dhis2-ui": "2.0.21",
73
73
  "@hisptz/dhis2-utils": "2.0.7"
74
74
  },
75
75
  "peerDependencies": {