@esic-lab/data-core-ui 0.0.55 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +83 -5
- package/dist/index.d.ts +83 -5
- package/dist/index.js +24 -4
- package/dist/index.mjs +24 -4
- package/package.json +2 -3
- package/dist/index.cjs +0 -4084
- package/dist/index.d.cts +0 -573
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ import { InputNumberProps, SelectProps } from 'antd';
|
|
|
7
7
|
import { Color } from 'antd/es/color-picker';
|
|
8
8
|
import { MessageInstance } from 'antd/es/message/interface';
|
|
9
9
|
import { ItemType } from 'antd/es/breadcrumb/Breadcrumb';
|
|
10
|
+
import { ReactNode as ReactNode$1 } from '@tabler/icons-react';
|
|
10
11
|
|
|
11
12
|
type ColorScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
12
13
|
type BaseColor = "primary" | "gray" | "green" | "red" | "yellow" | "blue";
|
|
@@ -442,9 +443,10 @@ interface SortFilterProps {
|
|
|
442
443
|
declare function SortFilter({ showYear, showQuarter, showMonth, onSortClick, onFilterClick, }: SortFilterProps): react_jsx_runtime.JSX.Element;
|
|
443
444
|
|
|
444
445
|
interface FileUploaderProps {
|
|
445
|
-
onUpload: (file:
|
|
446
|
+
onUpload: (file: any) => Promise<void>;
|
|
446
447
|
onRemove?: (index: number) => Promise<void>;
|
|
447
448
|
onError?: (message: string) => void;
|
|
449
|
+
onClickFile?: (file: any) => void;
|
|
448
450
|
accept?: string[];
|
|
449
451
|
maxSize?: number;
|
|
450
452
|
disabled?: boolean;
|
|
@@ -452,8 +454,12 @@ interface FileUploaderProps {
|
|
|
452
454
|
description?: string;
|
|
453
455
|
label?: string;
|
|
454
456
|
value?: File[] | any[];
|
|
457
|
+
uploadText?: string;
|
|
458
|
+
uploaderWidth?: string;
|
|
459
|
+
attachWidth?: string;
|
|
460
|
+
readOnly?: boolean;
|
|
455
461
|
}
|
|
456
|
-
declare function FileUploader({ onUpload, onError, onRemove, accept, maxSize, disabled, mode, description, label, value, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
462
|
+
declare function FileUploader({ onUpload, onError, onRemove, onClickFile, accept, maxSize, disabled, mode, description, label, value, uploadText, uploaderWidth, attachWidth, readOnly, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
457
463
|
|
|
458
464
|
declare function setMessageApi(api: MessageInstance): void;
|
|
459
465
|
declare function messageSuccess(content: string): void;
|
|
@@ -522,16 +528,22 @@ interface IndicatorProps {
|
|
|
522
528
|
}[];
|
|
523
529
|
type: "OUTPUT" | "OUTCOME";
|
|
524
530
|
arrayData: IndicatorArray[];
|
|
531
|
+
canEdit?: boolean;
|
|
525
532
|
setArrayData: (data: IndicatorArray[]) => void;
|
|
533
|
+
onDeleteClick?: (payload: {
|
|
534
|
+
index: number;
|
|
535
|
+
item: IndicatorArray;
|
|
536
|
+
confirm: () => void;
|
|
537
|
+
}) => void;
|
|
526
538
|
}
|
|
527
539
|
interface IndicatorArray {
|
|
528
540
|
indicatorType: "OUTPUT" | "OUTCOME";
|
|
529
541
|
inputType: "TEXT" | "NUMBER";
|
|
530
542
|
textValue: string;
|
|
531
|
-
numberValue?:
|
|
543
|
+
numberValue?: number;
|
|
532
544
|
unit?: string;
|
|
533
545
|
}
|
|
534
|
-
declare function Indicator({ option, type, arrayData, setArrayData, }: IndicatorProps): react_jsx_runtime.JSX.Element;
|
|
546
|
+
declare function Indicator({ option, type, arrayData, setArrayData, canEdit, onDeleteClick, }: IndicatorProps): react_jsx_runtime.JSX.Element;
|
|
535
547
|
|
|
536
548
|
interface optionSelect {
|
|
537
549
|
value: string;
|
|
@@ -542,4 +554,70 @@ declare const FilterPopUp: (filter: {
|
|
|
542
554
|
handleSearch: (listFiler: string[]) => void;
|
|
543
555
|
}) => react_jsx_runtime.JSX.Element;
|
|
544
556
|
|
|
545
|
-
|
|
557
|
+
interface UserData {
|
|
558
|
+
id: string;
|
|
559
|
+
name: string;
|
|
560
|
+
profile: string;
|
|
561
|
+
}
|
|
562
|
+
interface ProfileSelectProp {
|
|
563
|
+
allUser: UserData[];
|
|
564
|
+
assignUser: UserData[];
|
|
565
|
+
mode: "show" | "showAssign" | "icon";
|
|
566
|
+
className?: string;
|
|
567
|
+
onUpdateAssignUser: (user: UserData, action?: "add" | "remove") => void;
|
|
568
|
+
}
|
|
569
|
+
declare function ProfileSelect({ allUser, assignUser, mode, className, onUpdateAssignUser, }: ProfileSelectProp): react_jsx_runtime.JSX.Element;
|
|
570
|
+
|
|
571
|
+
interface QRCodeGeneratorProps {
|
|
572
|
+
url: string;
|
|
573
|
+
previewSize?: number;
|
|
574
|
+
defaultExportSize?: number;
|
|
575
|
+
fileBaseName?: string;
|
|
576
|
+
}
|
|
577
|
+
declare const QRCodeGenerator: react.FC<QRCodeGeneratorProps>;
|
|
578
|
+
|
|
579
|
+
interface TabProjectProp {
|
|
580
|
+
tabOption: {
|
|
581
|
+
key: string;
|
|
582
|
+
label: string;
|
|
583
|
+
icon: ReactNode$1;
|
|
584
|
+
}[];
|
|
585
|
+
projectId: string;
|
|
586
|
+
now: string;
|
|
587
|
+
onChange: (key: string) => void;
|
|
588
|
+
}
|
|
589
|
+
declare function TabProject({ tabOption, now, onChange }: TabProjectProp): react_jsx_runtime.JSX.Element;
|
|
590
|
+
|
|
591
|
+
type Datum = {
|
|
592
|
+
x: string;
|
|
593
|
+
y: number;
|
|
594
|
+
};
|
|
595
|
+
type Props = {
|
|
596
|
+
data: Datum[];
|
|
597
|
+
height?: number;
|
|
598
|
+
margin?: {
|
|
599
|
+
top: number;
|
|
600
|
+
right: number;
|
|
601
|
+
bottom: number;
|
|
602
|
+
left: number;
|
|
603
|
+
};
|
|
604
|
+
yLabel?: string;
|
|
605
|
+
xLabel?: string;
|
|
606
|
+
colorPalette?: string[];
|
|
607
|
+
};
|
|
608
|
+
declare const BarChart: ({ data, height, margin, yLabel, xLabel, colorPalette, }: Props) => react_jsx_runtime.JSX.Element;
|
|
609
|
+
|
|
610
|
+
interface PieChartProps {
|
|
611
|
+
title?: string;
|
|
612
|
+
description?: string;
|
|
613
|
+
data: {
|
|
614
|
+
label: string;
|
|
615
|
+
value: number;
|
|
616
|
+
}[];
|
|
617
|
+
width: number;
|
|
618
|
+
height: number;
|
|
619
|
+
colorPalette?: string[];
|
|
620
|
+
}
|
|
621
|
+
declare const PieChart: react.FC<PieChartProps>;
|
|
622
|
+
|
|
623
|
+
export { AntDModal, AntDataTable, BarChart, Breadcrumbs, Calendar, Checkbox, CheckboxGroup, ColorPalettePickerBasic, ColorPickerBasic, DataTable, DatePickerBasic, DatePickerRange, FileUploader, FilterPopUp, GhostButton, HeadingPage, Indicator, InputField, InputFieldNumber, KpiSection, Loader, MenuNavBar, type MenuNavBarProps, PieChart, PrimaryButton, ProfileSelect, ProgressBar, QRCodeGenerator, Radio, RadioGroup, SecondaryButton, SelectCustom, SelectField, SelectFieldGroup, SelectFieldStatus, SelectFieldStatusReport, SelectFieldTag, Sidebar, SortFilter, Switch, SwitchSelect, TabProject, TabSelectionButton, TextAreaInput, TextInput, TopNavBar, messageError, messageInfo, messageLoading, messageSuccess, messageWarning, setMessageApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { InputNumberProps, SelectProps } from 'antd';
|
|
|
7
7
|
import { Color } from 'antd/es/color-picker';
|
|
8
8
|
import { MessageInstance } from 'antd/es/message/interface';
|
|
9
9
|
import { ItemType } from 'antd/es/breadcrumb/Breadcrumb';
|
|
10
|
+
import { ReactNode as ReactNode$1 } from '@tabler/icons-react';
|
|
10
11
|
|
|
11
12
|
type ColorScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
12
13
|
type BaseColor = "primary" | "gray" | "green" | "red" | "yellow" | "blue";
|
|
@@ -442,9 +443,10 @@ interface SortFilterProps {
|
|
|
442
443
|
declare function SortFilter({ showYear, showQuarter, showMonth, onSortClick, onFilterClick, }: SortFilterProps): react_jsx_runtime.JSX.Element;
|
|
443
444
|
|
|
444
445
|
interface FileUploaderProps {
|
|
445
|
-
onUpload: (file:
|
|
446
|
+
onUpload: (file: any) => Promise<void>;
|
|
446
447
|
onRemove?: (index: number) => Promise<void>;
|
|
447
448
|
onError?: (message: string) => void;
|
|
449
|
+
onClickFile?: (file: any) => void;
|
|
448
450
|
accept?: string[];
|
|
449
451
|
maxSize?: number;
|
|
450
452
|
disabled?: boolean;
|
|
@@ -452,8 +454,12 @@ interface FileUploaderProps {
|
|
|
452
454
|
description?: string;
|
|
453
455
|
label?: string;
|
|
454
456
|
value?: File[] | any[];
|
|
457
|
+
uploadText?: string;
|
|
458
|
+
uploaderWidth?: string;
|
|
459
|
+
attachWidth?: string;
|
|
460
|
+
readOnly?: boolean;
|
|
455
461
|
}
|
|
456
|
-
declare function FileUploader({ onUpload, onError, onRemove, accept, maxSize, disabled, mode, description, label, value, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
462
|
+
declare function FileUploader({ onUpload, onError, onRemove, onClickFile, accept, maxSize, disabled, mode, description, label, value, uploadText, uploaderWidth, attachWidth, readOnly, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
457
463
|
|
|
458
464
|
declare function setMessageApi(api: MessageInstance): void;
|
|
459
465
|
declare function messageSuccess(content: string): void;
|
|
@@ -522,16 +528,22 @@ interface IndicatorProps {
|
|
|
522
528
|
}[];
|
|
523
529
|
type: "OUTPUT" | "OUTCOME";
|
|
524
530
|
arrayData: IndicatorArray[];
|
|
531
|
+
canEdit?: boolean;
|
|
525
532
|
setArrayData: (data: IndicatorArray[]) => void;
|
|
533
|
+
onDeleteClick?: (payload: {
|
|
534
|
+
index: number;
|
|
535
|
+
item: IndicatorArray;
|
|
536
|
+
confirm: () => void;
|
|
537
|
+
}) => void;
|
|
526
538
|
}
|
|
527
539
|
interface IndicatorArray {
|
|
528
540
|
indicatorType: "OUTPUT" | "OUTCOME";
|
|
529
541
|
inputType: "TEXT" | "NUMBER";
|
|
530
542
|
textValue: string;
|
|
531
|
-
numberValue?:
|
|
543
|
+
numberValue?: number;
|
|
532
544
|
unit?: string;
|
|
533
545
|
}
|
|
534
|
-
declare function Indicator({ option, type, arrayData, setArrayData, }: IndicatorProps): react_jsx_runtime.JSX.Element;
|
|
546
|
+
declare function Indicator({ option, type, arrayData, setArrayData, canEdit, onDeleteClick, }: IndicatorProps): react_jsx_runtime.JSX.Element;
|
|
535
547
|
|
|
536
548
|
interface optionSelect {
|
|
537
549
|
value: string;
|
|
@@ -542,4 +554,70 @@ declare const FilterPopUp: (filter: {
|
|
|
542
554
|
handleSearch: (listFiler: string[]) => void;
|
|
543
555
|
}) => react_jsx_runtime.JSX.Element;
|
|
544
556
|
|
|
545
|
-
|
|
557
|
+
interface UserData {
|
|
558
|
+
id: string;
|
|
559
|
+
name: string;
|
|
560
|
+
profile: string;
|
|
561
|
+
}
|
|
562
|
+
interface ProfileSelectProp {
|
|
563
|
+
allUser: UserData[];
|
|
564
|
+
assignUser: UserData[];
|
|
565
|
+
mode: "show" | "showAssign" | "icon";
|
|
566
|
+
className?: string;
|
|
567
|
+
onUpdateAssignUser: (user: UserData, action?: "add" | "remove") => void;
|
|
568
|
+
}
|
|
569
|
+
declare function ProfileSelect({ allUser, assignUser, mode, className, onUpdateAssignUser, }: ProfileSelectProp): react_jsx_runtime.JSX.Element;
|
|
570
|
+
|
|
571
|
+
interface QRCodeGeneratorProps {
|
|
572
|
+
url: string;
|
|
573
|
+
previewSize?: number;
|
|
574
|
+
defaultExportSize?: number;
|
|
575
|
+
fileBaseName?: string;
|
|
576
|
+
}
|
|
577
|
+
declare const QRCodeGenerator: react.FC<QRCodeGeneratorProps>;
|
|
578
|
+
|
|
579
|
+
interface TabProjectProp {
|
|
580
|
+
tabOption: {
|
|
581
|
+
key: string;
|
|
582
|
+
label: string;
|
|
583
|
+
icon: ReactNode$1;
|
|
584
|
+
}[];
|
|
585
|
+
projectId: string;
|
|
586
|
+
now: string;
|
|
587
|
+
onChange: (key: string) => void;
|
|
588
|
+
}
|
|
589
|
+
declare function TabProject({ tabOption, now, onChange }: TabProjectProp): react_jsx_runtime.JSX.Element;
|
|
590
|
+
|
|
591
|
+
type Datum = {
|
|
592
|
+
x: string;
|
|
593
|
+
y: number;
|
|
594
|
+
};
|
|
595
|
+
type Props = {
|
|
596
|
+
data: Datum[];
|
|
597
|
+
height?: number;
|
|
598
|
+
margin?: {
|
|
599
|
+
top: number;
|
|
600
|
+
right: number;
|
|
601
|
+
bottom: number;
|
|
602
|
+
left: number;
|
|
603
|
+
};
|
|
604
|
+
yLabel?: string;
|
|
605
|
+
xLabel?: string;
|
|
606
|
+
colorPalette?: string[];
|
|
607
|
+
};
|
|
608
|
+
declare const BarChart: ({ data, height, margin, yLabel, xLabel, colorPalette, }: Props) => react_jsx_runtime.JSX.Element;
|
|
609
|
+
|
|
610
|
+
interface PieChartProps {
|
|
611
|
+
title?: string;
|
|
612
|
+
description?: string;
|
|
613
|
+
data: {
|
|
614
|
+
label: string;
|
|
615
|
+
value: number;
|
|
616
|
+
}[];
|
|
617
|
+
width: number;
|
|
618
|
+
height: number;
|
|
619
|
+
colorPalette?: string[];
|
|
620
|
+
}
|
|
621
|
+
declare const PieChart: react.FC<PieChartProps>;
|
|
622
|
+
|
|
623
|
+
export { AntDModal, AntDataTable, BarChart, Breadcrumbs, Calendar, Checkbox, CheckboxGroup, ColorPalettePickerBasic, ColorPickerBasic, DataTable, DatePickerBasic, DatePickerRange, FileUploader, FilterPopUp, GhostButton, HeadingPage, Indicator, InputField, InputFieldNumber, KpiSection, Loader, MenuNavBar, type MenuNavBarProps, PieChart, PrimaryButton, ProfileSelect, ProgressBar, QRCodeGenerator, Radio, RadioGroup, SecondaryButton, SelectCustom, SelectField, SelectFieldGroup, SelectFieldStatus, SelectFieldStatusReport, SelectFieldTag, Sidebar, SortFilter, Switch, SwitchSelect, TabProject, TabSelectionButton, TextAreaInput, TextInput, TopNavBar, messageError, messageInfo, messageLoading, messageSuccess, messageWarning, setMessageApi };
|
package/dist/index.js
CHANGED
|
@@ -4588,11 +4588,32 @@ var BarChart = ({
|
|
|
4588
4588
|
(enter) => enter.append("text").attr("class", "x-axis-label").attr("fill", "currentColor").attr("x", width).attr("y", height - margin.bottom).attr("text-anchor", "middle").style("font-size", "14px").style("font-family", "Arial").text((d) => d),
|
|
4589
4589
|
(update) => update.text((d) => d).attr("x", width)
|
|
4590
4590
|
);
|
|
4591
|
-
const t =
|
|
4591
|
+
const t = d3.transition().duration(400);
|
|
4592
4592
|
const bars = g.selectAll("rect.bar").data(data, (d) => d.x);
|
|
4593
4593
|
bars.join(
|
|
4594
|
-
(enter) =>
|
|
4595
|
-
//
|
|
4594
|
+
// (enter) =>
|
|
4595
|
+
// enter
|
|
4596
|
+
// .append("rect")
|
|
4597
|
+
// .attr("class", "bar")
|
|
4598
|
+
// .attr("x", (d) => margin.left)
|
|
4599
|
+
// .attr("width", x.bandwidth())
|
|
4600
|
+
// .attr("y", () => margin.top + y(0))
|
|
4601
|
+
// .attr("height", () => innerH - y(0))
|
|
4602
|
+
// .attr("rx", 5) // rounded corners
|
|
4603
|
+
// .attr("ry", 5) // rounded corners
|
|
4604
|
+
// .style("fill", (d, i) => colorPalette[i % colorPalette.length]) // Apply color based on index
|
|
4605
|
+
// .append("title")
|
|
4606
|
+
// .text((d) => `${d.x}: ${d.y}`)
|
|
4607
|
+
// .merge(bars) // merge the existing bars after joining
|
|
4608
|
+
// .attr("width", x.bandwidth())
|
|
4609
|
+
// .attr("y", (d) => y(d.y))
|
|
4610
|
+
// .attr("height", (d) => innerH - y(d.y))
|
|
4611
|
+
// .call((enter) => enter.raise()), // Bring the new bars to the front
|
|
4612
|
+
(enter) => {
|
|
4613
|
+
const rects = enter.append("rect").attr("class", "bar").attr("x", (d) => margin.left).attr("width", x.bandwidth()).attr("y", () => margin.top + y(0)).attr("height", () => innerH - y(0)).attr("rx", 5).attr("ry", 5).style("fill", (d, i) => colorPalette[i % colorPalette.length]);
|
|
4614
|
+
rects.append("title").text((d) => `${d.x}: ${d.y}`);
|
|
4615
|
+
return rects.merge(bars).attr("width", x.bandwidth()).attr("y", (d) => y(d.y)).attr("height", (d) => innerH - y(d.y)).call((g2) => g2.raise());
|
|
4616
|
+
},
|
|
4596
4617
|
(update) => update.call((update2) => update2.raise()).transition(t).attr("x", (d) => x(d.x) ?? 0).attr("width", x.bandwidth()).attr("y", (d) => y(d.y)).attr("height", (d) => innerH - y(d.y)).style("fill", (d, i) => colorPalette[i % colorPalette.length]),
|
|
4597
4618
|
// Update color on update
|
|
4598
4619
|
(exit) => exit.transition(t).attr("y", margin.top + y(0)).attr("height", innerH - y(0)).remove()
|
|
@@ -4607,7 +4628,6 @@ var BarChart = ({
|
|
|
4607
4628
|
render();
|
|
4608
4629
|
}, [data, height, margin, xDomain.toString(), yDomain.toString()]);
|
|
4609
4630
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { ref: containerRef, style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("svg", { ref: svgRef, role: "img", "aria-label": "Bar chart", style: { display: "block", width: "100%", height }, children: [
|
|
4610
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("title", { children: "Bar chart" }),
|
|
4611
4631
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("g", { ref: gRef, transform: `translate(${margin.left},${margin.top})` }),
|
|
4612
4632
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("g", { ref: xAxisRef }),
|
|
4613
4633
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("g", { ref: yAxisRef })
|
package/dist/index.mjs
CHANGED
|
@@ -4531,11 +4531,32 @@ var BarChart = ({
|
|
|
4531
4531
|
(enter) => enter.append("text").attr("class", "x-axis-label").attr("fill", "currentColor").attr("x", width).attr("y", height - margin.bottom).attr("text-anchor", "middle").style("font-size", "14px").style("font-family", "Arial").text((d) => d),
|
|
4532
4532
|
(update) => update.text((d) => d).attr("x", width)
|
|
4533
4533
|
);
|
|
4534
|
-
const t =
|
|
4534
|
+
const t = d3.transition().duration(400);
|
|
4535
4535
|
const bars = g.selectAll("rect.bar").data(data, (d) => d.x);
|
|
4536
4536
|
bars.join(
|
|
4537
|
-
(enter) =>
|
|
4538
|
-
//
|
|
4537
|
+
// (enter) =>
|
|
4538
|
+
// enter
|
|
4539
|
+
// .append("rect")
|
|
4540
|
+
// .attr("class", "bar")
|
|
4541
|
+
// .attr("x", (d) => margin.left)
|
|
4542
|
+
// .attr("width", x.bandwidth())
|
|
4543
|
+
// .attr("y", () => margin.top + y(0))
|
|
4544
|
+
// .attr("height", () => innerH - y(0))
|
|
4545
|
+
// .attr("rx", 5) // rounded corners
|
|
4546
|
+
// .attr("ry", 5) // rounded corners
|
|
4547
|
+
// .style("fill", (d, i) => colorPalette[i % colorPalette.length]) // Apply color based on index
|
|
4548
|
+
// .append("title")
|
|
4549
|
+
// .text((d) => `${d.x}: ${d.y}`)
|
|
4550
|
+
// .merge(bars) // merge the existing bars after joining
|
|
4551
|
+
// .attr("width", x.bandwidth())
|
|
4552
|
+
// .attr("y", (d) => y(d.y))
|
|
4553
|
+
// .attr("height", (d) => innerH - y(d.y))
|
|
4554
|
+
// .call((enter) => enter.raise()), // Bring the new bars to the front
|
|
4555
|
+
(enter) => {
|
|
4556
|
+
const rects = enter.append("rect").attr("class", "bar").attr("x", (d) => margin.left).attr("width", x.bandwidth()).attr("y", () => margin.top + y(0)).attr("height", () => innerH - y(0)).attr("rx", 5).attr("ry", 5).style("fill", (d, i) => colorPalette[i % colorPalette.length]);
|
|
4557
|
+
rects.append("title").text((d) => `${d.x}: ${d.y}`);
|
|
4558
|
+
return rects.merge(bars).attr("width", x.bandwidth()).attr("y", (d) => y(d.y)).attr("height", (d) => innerH - y(d.y)).call((g2) => g2.raise());
|
|
4559
|
+
},
|
|
4539
4560
|
(update) => update.call((update2) => update2.raise()).transition(t).attr("x", (d) => x(d.x) ?? 0).attr("width", x.bandwidth()).attr("y", (d) => y(d.y)).attr("height", (d) => innerH - y(d.y)).style("fill", (d, i) => colorPalette[i % colorPalette.length]),
|
|
4540
4561
|
// Update color on update
|
|
4541
4562
|
(exit) => exit.transition(t).attr("y", margin.top + y(0)).attr("height", innerH - y(0)).remove()
|
|
@@ -4550,7 +4571,6 @@ var BarChart = ({
|
|
|
4550
4571
|
render();
|
|
4551
4572
|
}, [data, height, margin, xDomain.toString(), yDomain.toString()]);
|
|
4552
4573
|
return /* @__PURE__ */ jsx45("div", { ref: containerRef, style: { width: "100%" }, children: /* @__PURE__ */ jsxs39("svg", { ref: svgRef, role: "img", "aria-label": "Bar chart", style: { display: "block", width: "100%", height }, children: [
|
|
4553
|
-
/* @__PURE__ */ jsx45("title", { children: "Bar chart" }),
|
|
4554
4574
|
/* @__PURE__ */ jsx45("g", { ref: gRef, transform: `translate(${margin.left},${margin.top})` }),
|
|
4555
4575
|
/* @__PURE__ */ jsx45("g", { ref: xAxisRef }),
|
|
4556
4576
|
/* @__PURE__ */ jsx45("g", { ref: yAxisRef })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esic-lab/data-core-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
42
42
|
"storybook": "storybook dev -p 6006",
|
|
43
43
|
"build-storybook": "storybook build",
|
|
44
|
-
"build": "tsup src/index.ts --format esm,cjs --out-dir dist && npm run copy-assets",
|
|
45
|
-
"build:dts": "tsup src/index.ts --dts --dts-resolve --out-dir dist",
|
|
44
|
+
"build": "tsup src/index.ts --dts --dts-resolve --format esm,cjs --out-dir dist && npm run copy-assets",
|
|
46
45
|
"copy-assets": "xcopy src\\assets dist\\assets /E /I /Y",
|
|
47
46
|
"type-check": "tsc --noEmit"
|
|
48
47
|
},
|