@hisptz/dhis2-scorecard 1.0.7 → 1.0.9
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/Scorecard.js +1 -2
- package/dist/Scorecard.js.map +1 -1
- package/dist/components/ScorecardHeader.js +6 -1
- package/dist/components/ScorecardHeader.js.map +1 -1
- package/dist/components/ScorecardLegendsView/ScorecardLegendsView.js +5 -0
- package/dist/components/ScorecardLegendsView/ScorecardLegendsView.js.map +1 -1
- package/dist/components/ScorecardTable/components/MetaFooterCell.js +10 -12
- package/dist/components/ScorecardTable/components/MetaFooterCell.js.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -1
- package/dist/esm/Scorecard.js +1 -2
- package/dist/esm/Scorecard.js.map +1 -1
- package/dist/esm/components/ScorecardHeader.js +1 -0
- package/dist/esm/components/ScorecardHeader.js.map +1 -1
- package/dist/esm/components/ScorecardLegendsView/ScorecardLegendsView.js +5 -0
- package/dist/esm/components/ScorecardLegendsView/ScorecardLegendsView.js.map +1 -1
- package/dist/esm/components/ScorecardTable/components/MetaFooterCell.js +10 -12
- package/dist/esm/components/ScorecardTable/components/MetaFooterCell.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/types/Scorecard.d.ts.map +1 -1
- package/dist/types/components/ScorecardHeader.d.ts.map +1 -1
- package/dist/types/components/ScorecardLegendsView/ScorecardLegendsView.d.ts.map +1 -1
- package/dist/types/components/ScorecardTable/components/MetaFooterCell.d.ts +3 -1
- package/dist/types/components/ScorecardTable/components/MetaFooterCell.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/Scorecard.js
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var TableStateProvider = require('./components/TableStateProvider');
|
|
5
5
|
var ScorecardTable = require('./components/ScorecardTable');
|
|
6
|
-
var DataProvider = require('./components/DataProvider');
|
|
7
6
|
var reactDndHtml5Backend = require('react-dnd-html5-backend');
|
|
8
7
|
var reactDnd = require('react-dnd');
|
|
9
8
|
|
|
10
9
|
function Scorecard({ tableProps }) {
|
|
11
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableStateProvider.TableStateProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(reactDnd.DndProvider, { backend: reactDndHtml5Backend.HTML5Backend, children: /* @__PURE__ */ jsxRuntime.jsx(ScorecardTable.ScorecardTable, { ...tableProps ?? {} }) }) });
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
exports.Scorecard = Scorecard;
|
package/dist/Scorecard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Scorecard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/Scorecard.tsx"],"names":[],"mappings":"AAiBI;AAhBJ,SAAS,0BAA0B;AACnC;AAAA,EACC;AAAA,OAEM;AACP,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAMrB,SAAS,UAAU,EAAE,WAAW,GAAuC;AAC7E,SACC,oBAAC,sBACA,8BAAC,eAAY,SAAS,cACrB,8BAAC,kBAAgB,GAAI,cAAc,CAAC,GAAI,GACzC,GACD;AAEF","sourcesContent":["import React from \"react\";\nimport { TableStateProvider } from \"./components/TableStateProvider\";\nimport {\n\tScorecardTable,\n\ttype ScorecardTableProps,\n} from \"./components/ScorecardTable\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\nimport { DndProvider } from \"react-dnd\";\n\nexport interface ScorecardProps {\n\ttableProps?: ScorecardTableProps;\n}\n\nexport function Scorecard({ tableProps }: ScorecardProps): React.ReactElement {\n\treturn (\n\t\t<TableStateProvider>\n\t\t\t<DndProvider backend={HTML5Backend}>\n\t\t\t\t<ScorecardTable {...(tableProps ?? {})} />\n\t\t\t</DndProvider>\n\t\t</TableStateProvider>\n\t);\n}\n"]}
|
|
@@ -7,6 +7,11 @@ var state = require('../state');
|
|
|
7
7
|
var dhis2Utils = require('@hisptz/dhis2-utils');
|
|
8
8
|
var lodash = require('lodash');
|
|
9
9
|
var ui = require('@dhis2/ui');
|
|
10
|
+
var JsxParser = require('react-jsx-parser');
|
|
11
|
+
|
|
12
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
var JsxParser__default = /*#__PURE__*/_interopDefault(JsxParser);
|
|
10
15
|
|
|
11
16
|
function ScorecardHeader() {
|
|
12
17
|
const config = ConfigProvider.useScorecardConfig();
|
|
@@ -30,7 +35,7 @@ function ScorecardHeader() {
|
|
|
30
35
|
/*
|
|
31
36
|
// @ts-ignore */
|
|
32
37
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
-
|
|
38
|
+
JsxParser__default.default,
|
|
34
39
|
{
|
|
35
40
|
autoCloseVoidElements: true,
|
|
36
41
|
className: "w-100",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/ScorecardHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/components/ScorecardHeader.tsx"],"names":[],"mappings":"AAuCK,cAqBC,YArBD;AAvCL,SAAS,0BAA0B;AACnC,SAAS,eAAe;AACxB,SAAS,sCAAsC;AAE/C,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,OAAO,eAAe;AAEf,SAAS,kBAAkB;AACjC,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,cAAc,OAAO,SAAS,IAAI,UAAU,CAAC;AAErD,QAAM,kBACL,+BAAgD,iBAAiB;AAClE,QAAM,YAAY,+BAAwC;AAAA,IACzD;AAAA,IACA;AAAA,EACD,CAAC;AAED,QAAM,UAAU,QAAQ,MAAM,gBAAgB,SAAS,CAAC,eAAe,CAAC;AAExE,QAAM,SAAS,QAAQ,MAAM;AAC5B,QAAI,QAAQ,SAAS,GAAG;AACvB;AAAA,IACD;AACA,WAAO,cAAc,cAAc,KAAK,OAAO,GAAG,EAAY;AAAA,EAC/D,GAAG,CAAC,OAAO,CAAC;AAEZ,MAAI,CAAC,WAAW;AACf,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,SAAI,WAAU,qBAAoB,IAAI,oBACtC,8BAAC,SAAI,WAAU,OACb;AAAA;AAAA;AAAA,IAGA;AAAA,MAAC;AAAA;AAAA,QACA,uBAAqB;AAAA,QACrB,WAAU;AAAA,QACV,SAAS,QAAQ;AAAA,QACjB,UAAU;AAAA,UACT;AAAA,UACA;AAAA,UACA,QAAQ,QAAQ,WAAW,IAAI,QAAQ,OAAO;AAAA,QAC/C;AAAA,QACA,KAAK;AAAA;AAAA,IACN;AAAA,MAEA;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,SAAS;AAAA,QACT,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,KAAK;AAAA,MACN;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO,EAAE,QAAQ,EAAE;AAAA,YACnB,IAAI;AAAA,YAEH;AAAA;AAAA,cAAO;AAAA,cACP,GACA,QAAQ,WAAW,IAAI,MAAM,QAAQ,IAAI,KAAK,EAC/C;AAAA;AAAA;AAAA,QACD;AAAA,QACA,oBAAC,QAAG,OAAO,EAAE,OAAO,OAAO,SAAS,QAAQ,EAAE,GAC5C,oBACF;AAAA;AAAA;AAAA,EACD,GAEF,GACD;AAEF","sourcesContent":["import { useScorecardConfig } from \"./ConfigProvider\";\nimport { useMemo } from \"react\";\nimport { useScorecardStateSelectorValue } from \"../state\";\nimport type { PeriodSelection } from \"../schemas/config\";\nimport { PeriodUtility } from \"@hisptz/dhis2-utils\";\nimport { head } from \"lodash\";\nimport { colors } from \"@dhis2/ui\";\nimport JsxParser from \"react-jsx-parser\";\n\nexport function ScorecardHeader() {\n\tconst config = useScorecardConfig();\n\tconst { customHeader, title, subtitle } = config ?? {};\n\n\tconst periodSelection =\n\t\tuseScorecardStateSelectorValue<PeriodSelection>(\"periodSelection\");\n\tconst showTitle = useScorecardStateSelectorValue<boolean>([\n\t\t\"options\",\n\t\t\"title\",\n\t]);\n\n\tconst periods = useMemo(() => periodSelection.periods, [periodSelection]);\n\n\tconst period = useMemo(() => {\n\t\tif (periods.length > 1) {\n\t\t\treturn;\n\t\t}\n\t\treturn PeriodUtility.getPeriodById(head(periods)?.id as string);\n\t}, [periods]);\n\n\tif (!showTitle) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"row space-between\" id={\"scorecard-header\"}>\n\t\t\t<div className=\"row\">\n\t\t\t\t{customHeader ? (\n\t\t\t\t\t/*\n // @ts-ignore */\n\t\t\t\t\t<JsxParser\n\t\t\t\t\t\tautoCloseVoidElements\n\t\t\t\t\t\tclassName=\"w-100\"\n\t\t\t\t\t\tonError={console.error}\n\t\t\t\t\t\tbindings={{\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tsubtitle,\n\t\t\t\t\t\t\tperiod: periods.length === 1 ? period?.name : \"\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tjsx={customHeader}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\t\tflexDirection: \"column\",\n\t\t\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\t\t\tjustifyContent: \"center\",\n\t\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\tstyle={{ margin: 8 }}\n\t\t\t\t\t\t\tid={\"data-test-score-card-title\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}{\" \"}\n\t\t\t\t\t\t\t{`${\n\t\t\t\t\t\t\t\tperiods.length === 1 ? ` - ${period?.name}` : \"\"\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t<h3 style={{ color: colors.grey600, margin: 0 }}>\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -6,10 +6,15 @@ var SpecificTargetLegendsView = require('./components/SpecificTargetLegendsView'
|
|
|
6
6
|
var LegendView = require('./components/LegendView');
|
|
7
7
|
var ConfigProvider = require('../ConfigProvider');
|
|
8
8
|
var react = require('react');
|
|
9
|
+
var state = require('../../state');
|
|
9
10
|
|
|
10
11
|
const ScorecardLegendsView = react.memo(function ScorecardLegendsView2() {
|
|
11
12
|
const config = ConfigProvider.useScorecardConfig();
|
|
12
13
|
const legendDefinitions = config.legendDefinitions;
|
|
14
|
+
const showLegends = state.useScorecardViewOptionValue("legend");
|
|
15
|
+
if (!showLegends) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
13
18
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14
19
|
"div",
|
|
15
20
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ScorecardLegendsView/ScorecardLegendsView.tsx"],"names":["ScorecardLegendsView"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ScorecardLegendsView/ScorecardLegendsView.tsx"],"names":["ScorecardLegendsView"],"mappings":"AAkCK,cAID,YAJC;AAlCL,SAAS,wBAAwB;AACjC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AACnC,SAAS,YAAY;AACrB,SAAS,mCAAmC;AAErC,MAAM,uBAAuB,KAAK,SAASA,wBAAuB;AACxE,QAAM,SAAS,mBAAmB;AAClC,QAAM,oBAAoB,OAAQ;AAClC,QAAM,cAAc,4BAA4B,QAAQ;AAExD,MAAI,CAAC,aAAa;AACjB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,KAAK;AAAA,QACL,SAAS;AAAA,QACT,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,MACjB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO;AAAA,cACN,SAAS;AAAA,cACT,KAAK;AAAA,cACL,qBAAqB,UAAU,kBAAkB,MAAM;AAAA,YACxD;AAAA,YAEC,4BAAkB,IAAI,CAAC,SACvB,oBAAC,cAAW,QAAQ,QAAW,KAAK,EAAI,CACxC;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,SACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO;AAAA,cACN,KAAK;AAAA,cACL,aAAa;AAAA,cACb,SAAS;AAAA,cACT,YAAY;AAAA,cACZ,gBAAgB;AAAA,YACjB;AAAA,YAEA;AAAA,kCAAC,oBAAiB;AAAA,cAClB,oBAAC,6BAA0B;AAAA;AAAA;AAAA,QAC5B,GACD;AAAA;AAAA;AAAA,EACD;AAEF,CAAC","sourcesContent":["import { ArrowLegendsView } from \"./components/ArrowLegendView\";\nimport { SpecificTargetLegendsView } from \"./components/SpecificTargetLegendsView\";\nimport { LegendView } from \"./components/LegendView\";\nimport { useScorecardConfig } from \"../ConfigProvider\";\nimport { memo } from \"react\";\nimport { useScorecardViewOptionValue } from \"../../state\";\n\nexport const ScorecardLegendsView = memo(function ScorecardLegendsView() {\n\tconst config = useScorecardConfig();\n\tconst legendDefinitions = config!.legendDefinitions;\n\tconst showLegends = useScorecardViewOptionValue(\"legend\");\n\n\tif (!showLegends) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tgap: 16,\n\t\t\t\tpadding: \"0 16px\",\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tjustifyContent: \"space-between\",\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: \"grid\",\n\t\t\t\t\tgap: 8,\n\t\t\t\t\tgridTemplateColumns: `repeat(${legendDefinitions.length}, auto)`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{legendDefinitions.map((item) => (\n\t\t\t\t\t<LegendView legend={item} key={item.id} />\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t\tjustifySelf: \"flex-end\",\n\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\t\tjustifyContent: \"space-between\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<ArrowLegendsView />\n\t\t\t\t\t<SpecificTargetLegendsView />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n});\n"]}
|
|
@@ -3,28 +3,26 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var ui = require('@dhis2/ui');
|
|
5
5
|
var i18n = require('@dhis2/d2-i18n');
|
|
6
|
-
var
|
|
6
|
+
var react = require('react');
|
|
7
7
|
|
|
8
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
|
|
10
10
|
var i18n__default = /*#__PURE__*/_interopDefault(i18n);
|
|
11
11
|
|
|
12
|
-
function MetaFooterCell(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
function MetaFooterCell({
|
|
13
|
+
column,
|
|
14
|
+
table
|
|
15
|
+
}) {
|
|
16
|
+
const colSpan = react.useMemo(() => {
|
|
17
|
+
return table.getVisibleLeafColumns().findIndex(({ id }) => id === column.id) + 1;
|
|
18
|
+
}, [table.getVisibleLeafColumns(), column.id]);
|
|
17
19
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18
20
|
ui.DataTableCell,
|
|
19
21
|
{
|
|
20
22
|
bordered: true,
|
|
21
|
-
width:
|
|
22
|
-
style: {
|
|
23
|
-
width: "fit-content",
|
|
24
|
-
minWidth: 300
|
|
25
|
-
},
|
|
23
|
+
width: `${column.getSize()}px`,
|
|
26
24
|
align: "center",
|
|
27
|
-
colSpan:
|
|
25
|
+
colSpan: colSpan.toString(),
|
|
28
26
|
fixed: true,
|
|
29
27
|
left: "0",
|
|
30
28
|
children: /* @__PURE__ */ jsxRuntime.jsx("b", { style: { padding: "8px 0" }, children: i18n__default.default.t("Average") })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ScorecardTable/components/MetaFooterCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ScorecardTable/components/MetaFooterCell.tsx"],"names":[],"mappings":"AA6BG;AA7BH,SAAS,qBAAqB;AAC9B,OAAO,UAAU;AAGjB,SAAS,eAAe;AAEjB,SAAS,eAAe;AAAA,EAC9B;AAAA,EACA;AACD,GAA2C;AAC1C,QAAM,UAAU,QAAQ,MAAM;AAC7B,WACC,MACE,sBAAsB,EACtB,UAAU,CAAC,EAAE,GAAG,MAAM,OAAO,OAAO,EAAE,IAAI;AAAA,EAE9C,GAAG,CAAC,MAAM,sBAAsB,GAAG,OAAO,EAAE,CAAC;AAE7C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,UAAQ;AAAA,MACR,OAAO,GAAG,OAAO,QAAQ,CAAC;AAAA,MAC1B,OAAM;AAAA,MACN,SAAS,QAAQ,SAAS;AAAA,MAC1B,OAAK;AAAA,MAGL,MAAK;AAAA,MAEL,8BAAC,OAAE,OAAO,EAAE,SAAS,QAAQ,GAAI,eAAK,EAAE,SAAS,GAAE;AAAA;AAAA,EACpD;AAEF","sourcesContent":["import { DataTableCell } from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport type { ScorecardTableData } from \"../../../schemas/config\";\nimport type { HeaderContext } from \"@tanstack/react-table\";\nimport { useMemo } from \"react\";\n\nexport function MetaFooterCell({\n\tcolumn,\n\ttable,\n}: HeaderContext<ScorecardTableData, any>) {\n\tconst colSpan = useMemo(() => {\n\t\treturn (\n\t\t\ttable\n\t\t\t\t.getVisibleLeafColumns()\n\t\t\t\t.findIndex(({ id }) => id === column.id) + 1\n\t\t);\n\t}, [table.getVisibleLeafColumns(), column.id]);\n\n\treturn (\n\t\t<DataTableCell\n\t\t\tbordered\n\t\t\twidth={`${column.getSize()}px`}\n\t\t\talign=\"center\"\n\t\t\tcolSpan={colSpan.toString()}\n\t\t\tfixed\n\t\t\t/*\n // @ts-ignore */\n\t\t\tleft=\"0\"\n\t\t>\n\t\t\t<b style={{ padding: \"8px 0\" }}>{i18n.t(\"Average\")}</b>\n\t\t</DataTableCell>\n\t);\n}\n"]}
|
package/dist/components/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var ScorecardContext = require('./ScorecardContext');
|
|
4
4
|
var ConfigProvider = require('./ConfigProvider');
|
|
5
5
|
var MetaProvider = require('./MetaProvider');
|
|
6
|
+
var DataProvider = require('./DataProvider');
|
|
6
7
|
var ScorecardPrint = require('./ScorecardPrint/ScorecardPrint');
|
|
7
8
|
var ScorecardHeader = require('./ScorecardHeader');
|
|
8
9
|
var ScorecardLegendsView = require('./ScorecardLegendsView');
|
|
@@ -29,6 +30,12 @@ Object.keys(MetaProvider).forEach(function (k) {
|
|
|
29
30
|
get: function () { return MetaProvider[k]; }
|
|
30
31
|
});
|
|
31
32
|
});
|
|
33
|
+
Object.keys(DataProvider).forEach(function (k) {
|
|
34
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return DataProvider[k]; }
|
|
37
|
+
});
|
|
38
|
+
});
|
|
32
39
|
Object.keys(ScorecardPrint).forEach(function (k) {
|
|
33
40
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
34
41
|
enumerable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./ScorecardContext\";\nexport * from \"./ConfigProvider\";\nexport * from \"./MetaProvider\";\nexport * from \"./ScorecardPrint/ScorecardPrint\";\nexport * from \"./ScorecardHeader\";\nexport * from \"./ScorecardLegendsView\";\nexport * from \"./StateProvider\";\nexport * from \"./TableStateProvider\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./ScorecardContext\";\nexport * from \"./ConfigProvider\";\nexport * from \"./MetaProvider\";\nexport * from \"./DataProvider\";\nexport * from \"./ScorecardPrint/ScorecardPrint\";\nexport * from \"./ScorecardHeader\";\nexport * from \"./ScorecardLegendsView\";\nexport * from \"./StateProvider\";\nexport * from \"./TableStateProvider\";\n"]}
|
package/dist/esm/Scorecard.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { TableStateProvider } from './components/TableStateProvider';
|
|
3
3
|
import { ScorecardTable } from './components/ScorecardTable';
|
|
4
|
-
import { ScorecardDataProvider } from './components/DataProvider';
|
|
5
4
|
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
6
5
|
import { DndProvider } from 'react-dnd';
|
|
7
6
|
|
|
8
7
|
function Scorecard({ tableProps }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
+
return /* @__PURE__ */ jsx(TableStateProvider, { children: /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, children: /* @__PURE__ */ jsx(ScorecardTable, { ...tableProps ?? {} }) }) });
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
export { Scorecard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Scorecard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Scorecard.tsx"],"names":[],"mappings":"AAiBI;AAhBJ,SAAS,0BAA0B;AACnC;AAAA,EACC;AAAA,OAEM;AACP,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAMrB,SAAS,UAAU,EAAE,WAAW,GAAuC;AAC7E,SACC,oBAAC,sBACA,8BAAC,eAAY,SAAS,cACrB,8BAAC,kBAAgB,GAAI,cAAc,CAAC,GAAI,GACzC,GACD;AAEF","sourcesContent":["import React from \"react\";\nimport { TableStateProvider } from \"./components/TableStateProvider\";\nimport {\n\tScorecardTable,\n\ttype ScorecardTableProps,\n} from \"./components/ScorecardTable\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\nimport { DndProvider } from \"react-dnd\";\n\nexport interface ScorecardProps {\n\ttableProps?: ScorecardTableProps;\n}\n\nexport function Scorecard({ tableProps }: ScorecardProps): React.ReactElement {\n\treturn (\n\t\t<TableStateProvider>\n\t\t\t<DndProvider backend={HTML5Backend}>\n\t\t\t\t<ScorecardTable {...(tableProps ?? {})} />\n\t\t\t</DndProvider>\n\t\t</TableStateProvider>\n\t);\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import { useScorecardStateSelectorValue } from '../state';
|
|
|
5
5
|
import { PeriodUtility } from '@hisptz/dhis2-utils';
|
|
6
6
|
import { head } from 'lodash';
|
|
7
7
|
import { colors } from '@dhis2/ui';
|
|
8
|
+
import JsxParser from 'react-jsx-parser';
|
|
8
9
|
|
|
9
10
|
function ScorecardHeader() {
|
|
10
11
|
const config = useScorecardConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ScorecardHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ScorecardHeader.tsx"],"names":[],"mappings":"AAuCK,cAqBC,YArBD;AAvCL,SAAS,0BAA0B;AACnC,SAAS,eAAe;AACxB,SAAS,sCAAsC;AAE/C,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,OAAO,eAAe;AAEf,SAAS,kBAAkB;AACjC,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,cAAc,OAAO,SAAS,IAAI,UAAU,CAAC;AAErD,QAAM,kBACL,+BAAgD,iBAAiB;AAClE,QAAM,YAAY,+BAAwC;AAAA,IACzD;AAAA,IACA;AAAA,EACD,CAAC;AAED,QAAM,UAAU,QAAQ,MAAM,gBAAgB,SAAS,CAAC,eAAe,CAAC;AAExE,QAAM,SAAS,QAAQ,MAAM;AAC5B,QAAI,QAAQ,SAAS,GAAG;AACvB;AAAA,IACD;AACA,WAAO,cAAc,cAAc,KAAK,OAAO,GAAG,EAAY;AAAA,EAC/D,GAAG,CAAC,OAAO,CAAC;AAEZ,MAAI,CAAC,WAAW;AACf,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,SAAI,WAAU,qBAAoB,IAAI,oBACtC,8BAAC,SAAI,WAAU,OACb;AAAA;AAAA;AAAA,IAGA;AAAA,MAAC;AAAA;AAAA,QACA,uBAAqB;AAAA,QACrB,WAAU;AAAA,QACV,SAAS,QAAQ;AAAA,QACjB,UAAU;AAAA,UACT;AAAA,UACA;AAAA,UACA,QAAQ,QAAQ,WAAW,IAAI,QAAQ,OAAO;AAAA,QAC/C;AAAA,QACA,KAAK;AAAA;AAAA,IACN;AAAA,MAEA;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,SAAS;AAAA,QACT,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,KAAK;AAAA,MACN;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO,EAAE,QAAQ,EAAE;AAAA,YACnB,IAAI;AAAA,YAEH;AAAA;AAAA,cAAO;AAAA,cACP,GACA,QAAQ,WAAW,IAAI,MAAM,QAAQ,IAAI,KAAK,EAC/C;AAAA;AAAA;AAAA,QACD;AAAA,QACA,oBAAC,QAAG,OAAO,EAAE,OAAO,OAAO,SAAS,QAAQ,EAAE,GAC5C,oBACF;AAAA;AAAA;AAAA,EACD,GAEF,GACD;AAEF","sourcesContent":["import { useScorecardConfig } from \"./ConfigProvider\";\nimport { useMemo } from \"react\";\nimport { useScorecardStateSelectorValue } from \"../state\";\nimport type { PeriodSelection } from \"../schemas/config\";\nimport { PeriodUtility } from \"@hisptz/dhis2-utils\";\nimport { head } from \"lodash\";\nimport { colors } from \"@dhis2/ui\";\nimport JsxParser from \"react-jsx-parser\";\n\nexport function ScorecardHeader() {\n\tconst config = useScorecardConfig();\n\tconst { customHeader, title, subtitle } = config ?? {};\n\n\tconst periodSelection =\n\t\tuseScorecardStateSelectorValue<PeriodSelection>(\"periodSelection\");\n\tconst showTitle = useScorecardStateSelectorValue<boolean>([\n\t\t\"options\",\n\t\t\"title\",\n\t]);\n\n\tconst periods = useMemo(() => periodSelection.periods, [periodSelection]);\n\n\tconst period = useMemo(() => {\n\t\tif (periods.length > 1) {\n\t\t\treturn;\n\t\t}\n\t\treturn PeriodUtility.getPeriodById(head(periods)?.id as string);\n\t}, [periods]);\n\n\tif (!showTitle) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"row space-between\" id={\"scorecard-header\"}>\n\t\t\t<div className=\"row\">\n\t\t\t\t{customHeader ? (\n\t\t\t\t\t/*\n // @ts-ignore */\n\t\t\t\t\t<JsxParser\n\t\t\t\t\t\tautoCloseVoidElements\n\t\t\t\t\t\tclassName=\"w-100\"\n\t\t\t\t\t\tonError={console.error}\n\t\t\t\t\t\tbindings={{\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tsubtitle,\n\t\t\t\t\t\t\tperiod: periods.length === 1 ? period?.name : \"\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tjsx={customHeader}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\t\tflexDirection: \"column\",\n\t\t\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\t\t\tjustifyContent: \"center\",\n\t\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\tstyle={{ margin: 8 }}\n\t\t\t\t\t\t\tid={\"data-test-score-card-title\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}{\" \"}\n\t\t\t\t\t\t\t{`${\n\t\t\t\t\t\t\t\tperiods.length === 1 ? ` - ${period?.name}` : \"\"\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t<h3 style={{ color: colors.grey600, margin: 0 }}>\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -4,10 +4,15 @@ import { SpecificTargetLegendsView } from './components/SpecificTargetLegendsVie
|
|
|
4
4
|
import { LegendView } from './components/LegendView';
|
|
5
5
|
import { useScorecardConfig } from '../ConfigProvider';
|
|
6
6
|
import { memo } from 'react';
|
|
7
|
+
import { useScorecardViewOptionValue } from '../../state';
|
|
7
8
|
|
|
8
9
|
const ScorecardLegendsView = memo(function ScorecardLegendsView2() {
|
|
9
10
|
const config = useScorecardConfig();
|
|
10
11
|
const legendDefinitions = config.legendDefinitions;
|
|
12
|
+
const showLegends = useScorecardViewOptionValue("legend");
|
|
13
|
+
if (!showLegends) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
11
16
|
return /* @__PURE__ */ jsxs(
|
|
12
17
|
"div",
|
|
13
18
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ScorecardLegendsView/ScorecardLegendsView.tsx"],"names":["ScorecardLegendsView"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ScorecardLegendsView/ScorecardLegendsView.tsx"],"names":["ScorecardLegendsView"],"mappings":"AAkCK,cAID,YAJC;AAlCL,SAAS,wBAAwB;AACjC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AACnC,SAAS,YAAY;AACrB,SAAS,mCAAmC;AAErC,MAAM,uBAAuB,KAAK,SAASA,wBAAuB;AACxE,QAAM,SAAS,mBAAmB;AAClC,QAAM,oBAAoB,OAAQ;AAClC,QAAM,cAAc,4BAA4B,QAAQ;AAExD,MAAI,CAAC,aAAa;AACjB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,KAAK;AAAA,QACL,SAAS;AAAA,QACT,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,MACjB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO;AAAA,cACN,SAAS;AAAA,cACT,KAAK;AAAA,cACL,qBAAqB,UAAU,kBAAkB,MAAM;AAAA,YACxD;AAAA,YAEC,4BAAkB,IAAI,CAAC,SACvB,oBAAC,cAAW,QAAQ,QAAW,KAAK,EAAI,CACxC;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,SACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO;AAAA,cACN,KAAK;AAAA,cACL,aAAa;AAAA,cACb,SAAS;AAAA,cACT,YAAY;AAAA,cACZ,gBAAgB;AAAA,YACjB;AAAA,YAEA;AAAA,kCAAC,oBAAiB;AAAA,cAClB,oBAAC,6BAA0B;AAAA;AAAA;AAAA,QAC5B,GACD;AAAA;AAAA;AAAA,EACD;AAEF,CAAC","sourcesContent":["import { ArrowLegendsView } from \"./components/ArrowLegendView\";\nimport { SpecificTargetLegendsView } from \"./components/SpecificTargetLegendsView\";\nimport { LegendView } from \"./components/LegendView\";\nimport { useScorecardConfig } from \"../ConfigProvider\";\nimport { memo } from \"react\";\nimport { useScorecardViewOptionValue } from \"../../state\";\n\nexport const ScorecardLegendsView = memo(function ScorecardLegendsView() {\n\tconst config = useScorecardConfig();\n\tconst legendDefinitions = config!.legendDefinitions;\n\tconst showLegends = useScorecardViewOptionValue(\"legend\");\n\n\tif (!showLegends) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tgap: 16,\n\t\t\t\tpadding: \"0 16px\",\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tjustifyContent: \"space-between\",\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: \"grid\",\n\t\t\t\t\tgap: 8,\n\t\t\t\t\tgridTemplateColumns: `repeat(${legendDefinitions.length}, auto)`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{legendDefinitions.map((item) => (\n\t\t\t\t\t<LegendView legend={item} key={item.id} />\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t\tjustifySelf: \"flex-end\",\n\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\t\tjustifyContent: \"space-between\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<ArrowLegendsView />\n\t\t\t\t\t<SpecificTargetLegendsView />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n});\n"]}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { DataTableCell } from '@dhis2/ui';
|
|
3
3
|
import i18n from '@dhis2/d2-i18n';
|
|
4
|
-
import {
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
5
|
|
|
6
|
-
function MetaFooterCell(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function MetaFooterCell({
|
|
7
|
+
column,
|
|
8
|
+
table
|
|
9
|
+
}) {
|
|
10
|
+
const colSpan = useMemo(() => {
|
|
11
|
+
return table.getVisibleLeafColumns().findIndex(({ id }) => id === column.id) + 1;
|
|
12
|
+
}, [table.getVisibleLeafColumns(), column.id]);
|
|
11
13
|
return /* @__PURE__ */ jsx(
|
|
12
14
|
DataTableCell,
|
|
13
15
|
{
|
|
14
16
|
bordered: true,
|
|
15
|
-
width:
|
|
16
|
-
style: {
|
|
17
|
-
width: "fit-content",
|
|
18
|
-
minWidth: 300
|
|
19
|
-
},
|
|
17
|
+
width: `${column.getSize()}px`,
|
|
20
18
|
align: "center",
|
|
21
|
-
colSpan:
|
|
19
|
+
colSpan: colSpan.toString(),
|
|
22
20
|
fixed: true,
|
|
23
21
|
left: "0",
|
|
24
22
|
children: /* @__PURE__ */ jsx("b", { style: { padding: "8px 0" }, children: i18n.t("Average") })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/ScorecardTable/components/MetaFooterCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ScorecardTable/components/MetaFooterCell.tsx"],"names":[],"mappings":"AA6BG;AA7BH,SAAS,qBAAqB;AAC9B,OAAO,UAAU;AAGjB,SAAS,eAAe;AAEjB,SAAS,eAAe;AAAA,EAC9B;AAAA,EACA;AACD,GAA2C;AAC1C,QAAM,UAAU,QAAQ,MAAM;AAC7B,WACC,MACE,sBAAsB,EACtB,UAAU,CAAC,EAAE,GAAG,MAAM,OAAO,OAAO,EAAE,IAAI;AAAA,EAE9C,GAAG,CAAC,MAAM,sBAAsB,GAAG,OAAO,EAAE,CAAC;AAE7C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,UAAQ;AAAA,MACR,OAAO,GAAG,OAAO,QAAQ,CAAC;AAAA,MAC1B,OAAM;AAAA,MACN,SAAS,QAAQ,SAAS;AAAA,MAC1B,OAAK;AAAA,MAGL,MAAK;AAAA,MAEL,8BAAC,OAAE,OAAO,EAAE,SAAS,QAAQ,GAAI,eAAK,EAAE,SAAS,GAAE;AAAA;AAAA,EACpD;AAEF","sourcesContent":["import { DataTableCell } from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport type { ScorecardTableData } from \"../../../schemas/config\";\nimport type { HeaderContext } from \"@tanstack/react-table\";\nimport { useMemo } from \"react\";\n\nexport function MetaFooterCell({\n\tcolumn,\n\ttable,\n}: HeaderContext<ScorecardTableData, any>) {\n\tconst colSpan = useMemo(() => {\n\t\treturn (\n\t\t\ttable\n\t\t\t\t.getVisibleLeafColumns()\n\t\t\t\t.findIndex(({ id }) => id === column.id) + 1\n\t\t);\n\t}, [table.getVisibleLeafColumns(), column.id]);\n\n\treturn (\n\t\t<DataTableCell\n\t\t\tbordered\n\t\t\twidth={`${column.getSize()}px`}\n\t\t\talign=\"center\"\n\t\t\tcolSpan={colSpan.toString()}\n\t\t\tfixed\n\t\t\t/*\n // @ts-ignore */\n\t\t\tleft=\"0\"\n\t\t>\n\t\t\t<b style={{ padding: \"8px 0\" }}>{i18n.t(\"Average\")}</b>\n\t\t</DataTableCell>\n\t);\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './ScorecardContext';
|
|
2
2
|
export * from './ConfigProvider';
|
|
3
3
|
export * from './MetaProvider';
|
|
4
|
+
export * from './DataProvider';
|
|
4
5
|
export * from './ScorecardPrint/ScorecardPrint';
|
|
5
6
|
export * from './ScorecardHeader';
|
|
6
7
|
export * from './ScorecardLegendsView';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./ScorecardContext\";\nexport * from \"./ConfigProvider\";\nexport * from \"./MetaProvider\";\nexport * from \"./ScorecardPrint/ScorecardPrint\";\nexport * from \"./ScorecardHeader\";\nexport * from \"./ScorecardLegendsView\";\nexport * from \"./StateProvider\";\nexport * from \"./TableStateProvider\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./ScorecardContext\";\nexport * from \"./ConfigProvider\";\nexport * from \"./MetaProvider\";\nexport * from \"./DataProvider\";\nexport * from \"./ScorecardPrint/ScorecardPrint\";\nexport * from \"./ScorecardHeader\";\nexport * from \"./ScorecardLegendsView\";\nexport * from \"./StateProvider\";\nexport * from \"./TableStateProvider\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scorecard.d.ts","sourceRoot":"","sources":["../../src/Scorecard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"Scorecard.d.ts","sourceRoot":"","sources":["../../src/Scorecard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,6BAA6B,CAAC;AAIrC,MAAM,WAAW,cAAc;IAC9B,UAAU,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAQ5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScorecardHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ScorecardHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScorecardHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ScorecardHeader.tsx"],"names":[],"mappings":"AASA,wBAAgB,eAAe,mDAoE9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScorecardLegendsView.d.ts","sourceRoot":"","sources":["../../../../src/components/ScorecardLegendsView/ScorecardLegendsView.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ScorecardLegendsView.d.ts","sourceRoot":"","sources":["../../../../src/components/ScorecardLegendsView/ScorecardLegendsView.tsx"],"names":[],"mappings":";AAOA,eAAO,MAAM,oBAAoB,8CA8C/B,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ScorecardTableData } from "../../../schemas/config";
|
|
2
|
+
import type { HeaderContext } from "@tanstack/react-table";
|
|
3
|
+
export declare function MetaFooterCell({ column, table, }: HeaderContext<ScorecardTableData, any>): import("react/jsx-runtime").JSX.Element;
|
|
2
4
|
//# sourceMappingURL=MetaFooterCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetaFooterCell.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScorecardTable/components/MetaFooterCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetaFooterCell.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScorecardTable/components/MetaFooterCell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,wBAAgB,cAAc,CAAC,EAC9B,MAAM,EACN,KAAK,GACL,EAAE,aAAa,CAAC,kBAAkB,EAAE,GAAG,CAAC,2CAuBxC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./ScorecardContext";
|
|
2
2
|
export * from "./ConfigProvider";
|
|
3
3
|
export * from "./MetaProvider";
|
|
4
|
+
export * from "./DataProvider";
|
|
4
5
|
export * from "./ScorecardPrint/ScorecardPrint";
|
|
5
6
|
export * from "./ScorecardHeader";
|
|
6
7
|
export * from "./ScorecardLegendsView";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hisptz/dhis2-scorecard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"react-dnd": "^16.0.1",
|
|
58
58
|
"react-dnd-html5-backend": "^16.0.1",
|
|
59
59
|
"react-error-boundary": "^4.0.12",
|
|
60
|
+
"react-jsx-parser": "^2.2.0",
|
|
60
61
|
"react-to-print": "^3.0.1",
|
|
61
62
|
"recoil": "^0.7.7",
|
|
62
63
|
"xlsx": "^0.18.5",
|