@mamrp/components 1.0.34 → 1.0.36
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/charts/index.d.mts +146 -0
- package/dist/charts/index.d.ts +146 -0
- package/dist/charts/index.js +193 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/index.mjs +164 -0
- package/dist/charts/index.mjs.map +1 -0
- package/dist/index.d.mts +10 -63
- package/dist/index.d.ts +10 -63
- package/dist/index.js +15 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -133
- package/dist/index.mjs.map +1 -1
- package/dist/selectors/index.d.mts +227 -0
- package/dist/selectors/index.d.ts +227 -0
- package/dist/selectors/index.js +509 -0
- package/dist/selectors/index.js.map +1 -0
- package/dist/selectors/index.mjs +470 -0
- package/dist/selectors/index.mjs.map +1 -0
- package/package.json +13 -3
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Props$1 {
|
|
4
|
+
labels: string[];
|
|
5
|
+
datasets: {
|
|
6
|
+
label: string;
|
|
7
|
+
data: number[];
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
borderColor?: string;
|
|
10
|
+
borderWidth?: number;
|
|
11
|
+
type?: "line";
|
|
12
|
+
order?: number;
|
|
13
|
+
tension?: number;
|
|
14
|
+
pointRadius?: number;
|
|
15
|
+
fill?: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
height?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 📊 BarChart — کامپوننت نمودار میلهای (Bar/Combo)
|
|
21
|
+
*
|
|
22
|
+
* @component BarChart
|
|
23
|
+
*
|
|
24
|
+
* @param {string[]} labels - آرایهای از برچسبها برای محور افقی (X).
|
|
25
|
+
* @param {Array<{
|
|
26
|
+
* label: string,
|
|
27
|
+
* data: number[],
|
|
28
|
+
* backgroundColor: string,
|
|
29
|
+
* borderColor?: string,
|
|
30
|
+
* borderWidth?: number,
|
|
31
|
+
* type?: "line",
|
|
32
|
+
* order?: number,
|
|
33
|
+
* tension?: number,
|
|
34
|
+
* pointRadius?: number,
|
|
35
|
+
* fill?: boolean
|
|
36
|
+
* }>} datasets - آرایهای از آبجکتهای داده برای هر سری نمودار.
|
|
37
|
+
* - label: عنوان دادهها (نمایش در legend)
|
|
38
|
+
* - data: آرایهای از مقادیر هر سری
|
|
39
|
+
* - backgroundColor: رنگ میله یا خط
|
|
40
|
+
* - borderColor: (اختیاری) رنگ خط دور میله یا خط
|
|
41
|
+
* - borderWidth: (اختیاری) ضخامت خط دور میله یا خط
|
|
42
|
+
* - type: (اختیاری) اگر "line" باشد، سری به صورت خطی نمایش داده میشود (نمودار ترکیبی)
|
|
43
|
+
* - order: (اختیاری) ترتیب رسم سری (سری با order بالاتر روی بقیه قرار میگیرد)
|
|
44
|
+
* - tension: (اختیاری) میزان خمیدگی خط (برای سریهای خطی)
|
|
45
|
+
* - pointRadius: (اختیاری) شعاع نقاط روی خط (برای سریهای خطی)
|
|
46
|
+
* - fill: (اختیاری) پر شدن زیر خط (برای سریهای خطی)
|
|
47
|
+
*
|
|
48
|
+
* @param {number} [height] - ارتفاع نمودار (پیشفرض: 600 پیکسل)
|
|
49
|
+
*
|
|
50
|
+
* @description
|
|
51
|
+
* این کامپوننت یک نمودار میلهای (Bar) یا ترکیبی Bar/Line با قابلیت شخصیسازی کامل است.
|
|
52
|
+
* - پشتیبانی از فونت وزیر و راستچین
|
|
53
|
+
* - ریسپانسیو و مناسب صفحات فارسی
|
|
54
|
+
* - امکان نمایش چند سری داده به صورت میلهای و خطی همزمان (Combo)
|
|
55
|
+
* - شخصیسازی رنگ، ضخامت، ترتیب و استایل هر سری
|
|
56
|
+
*
|
|
57
|
+
* @returns {JSX.Element} یک نمودار میلهای یا ترکیبی با دادههای ورودی
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```jsx
|
|
61
|
+
* <BarChart
|
|
62
|
+
* labels={["شنبه", "یکشنبه", "دوشنبه"]}
|
|
63
|
+
* datasets={[
|
|
64
|
+
* {
|
|
65
|
+
* label: "فروش",
|
|
66
|
+
* data: [10, 20, 15],
|
|
67
|
+
* backgroundColor: "rgba(75,192,192,0.7)",
|
|
68
|
+
* },
|
|
69
|
+
* {
|
|
70
|
+
* label: "میانگین",
|
|
71
|
+
* data: [12, 18, 14],
|
|
72
|
+
* borderColor: "red",
|
|
73
|
+
* backgroundColor: "transparent",
|
|
74
|
+
* type: "line",
|
|
75
|
+
* order: 0,
|
|
76
|
+
* borderWidth: 3,
|
|
77
|
+
* tension: 0.4,
|
|
78
|
+
* pointRadius: 4,
|
|
79
|
+
* fill: false,
|
|
80
|
+
* },
|
|
81
|
+
* ]}
|
|
82
|
+
* height={400}
|
|
83
|
+
* />
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare function BarChart({ labels, datasets, height }: Props$1): React.JSX.Element;
|
|
87
|
+
|
|
88
|
+
interface Props {
|
|
89
|
+
labels: string[];
|
|
90
|
+
datasets: {
|
|
91
|
+
label: string;
|
|
92
|
+
data: number[];
|
|
93
|
+
backgroundColor: string | string[];
|
|
94
|
+
borderWidth?: number;
|
|
95
|
+
}[];
|
|
96
|
+
height?: number;
|
|
97
|
+
disableLogo?: boolean;
|
|
98
|
+
logoSRC?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 📊 PieChart — کامپوننت نمودار دایرهای (Pie)
|
|
102
|
+
*
|
|
103
|
+
* @component PieChart
|
|
104
|
+
*
|
|
105
|
+
* @param {string[]} labels - آرایهای از برچسبها برای هر بخش نمودار.
|
|
106
|
+
* @param {Array<{
|
|
107
|
+
* label: string,
|
|
108
|
+
* data: number[],
|
|
109
|
+
* backgroundColor: string[],
|
|
110
|
+
* borderWidth?: number
|
|
111
|
+
* }>} datasets - آرایهای شامل یک آبجکت داده برای مقداردهی بخشهای نمودار.
|
|
112
|
+
* - label: عنوان دادهها (نمایش در legend)
|
|
113
|
+
* - data: آرایهای از مقادیر هر بخش
|
|
114
|
+
* - backgroundColor: آرایهای از رنگها برای هر بخش
|
|
115
|
+
* - borderWidth: (اختیاری) ضخامت خط دور هر بخش
|
|
116
|
+
* @param {number} [height] - ارتفاع نمودار (پیشفرض: 600 پیکسل)
|
|
117
|
+
*
|
|
118
|
+
* @description
|
|
119
|
+
* این کامپوننت یک نمودار دایرهای با قابلیت شخصیسازی رنگ، داده و فونت (هماهنگ با وزیر) است.
|
|
120
|
+
* - ریسپانسیو و مناسب صفحات فارسی
|
|
121
|
+
* - امکان نمایش لوگو یا کامپوننت دلخواه در مرکز نمودار
|
|
122
|
+
*
|
|
123
|
+
* @returns {JSX.Element} یک نمودار دایرهای با دادههای ورودی
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```jsx
|
|
127
|
+
* <PieChart
|
|
128
|
+
* labels={["بخش اول", "بخش دوم", "بخش سوم"]}
|
|
129
|
+
* datasets={[
|
|
130
|
+
* {
|
|
131
|
+
* label: "مقدار",
|
|
132
|
+
* data: [10, 20, 30],
|
|
133
|
+
* backgroundColor: [
|
|
134
|
+
* "rgba(75,192,192,1)",
|
|
135
|
+
* "rgba(255,99,132,1)",
|
|
136
|
+
* "rgba(153,102,255,1)",
|
|
137
|
+
* ],
|
|
138
|
+
* borderWidth: 2,
|
|
139
|
+
* },
|
|
140
|
+
* ]}
|
|
141
|
+
* />
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
declare function PieChart({ labels, datasets, height, disableLogo, logoSRC }: Props): React.JSX.Element;
|
|
145
|
+
|
|
146
|
+
export { BarChart, PieChart };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Props$1 {
|
|
4
|
+
labels: string[];
|
|
5
|
+
datasets: {
|
|
6
|
+
label: string;
|
|
7
|
+
data: number[];
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
borderColor?: string;
|
|
10
|
+
borderWidth?: number;
|
|
11
|
+
type?: "line";
|
|
12
|
+
order?: number;
|
|
13
|
+
tension?: number;
|
|
14
|
+
pointRadius?: number;
|
|
15
|
+
fill?: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
height?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 📊 BarChart — کامپوننت نمودار میلهای (Bar/Combo)
|
|
21
|
+
*
|
|
22
|
+
* @component BarChart
|
|
23
|
+
*
|
|
24
|
+
* @param {string[]} labels - آرایهای از برچسبها برای محور افقی (X).
|
|
25
|
+
* @param {Array<{
|
|
26
|
+
* label: string,
|
|
27
|
+
* data: number[],
|
|
28
|
+
* backgroundColor: string,
|
|
29
|
+
* borderColor?: string,
|
|
30
|
+
* borderWidth?: number,
|
|
31
|
+
* type?: "line",
|
|
32
|
+
* order?: number,
|
|
33
|
+
* tension?: number,
|
|
34
|
+
* pointRadius?: number,
|
|
35
|
+
* fill?: boolean
|
|
36
|
+
* }>} datasets - آرایهای از آبجکتهای داده برای هر سری نمودار.
|
|
37
|
+
* - label: عنوان دادهها (نمایش در legend)
|
|
38
|
+
* - data: آرایهای از مقادیر هر سری
|
|
39
|
+
* - backgroundColor: رنگ میله یا خط
|
|
40
|
+
* - borderColor: (اختیاری) رنگ خط دور میله یا خط
|
|
41
|
+
* - borderWidth: (اختیاری) ضخامت خط دور میله یا خط
|
|
42
|
+
* - type: (اختیاری) اگر "line" باشد، سری به صورت خطی نمایش داده میشود (نمودار ترکیبی)
|
|
43
|
+
* - order: (اختیاری) ترتیب رسم سری (سری با order بالاتر روی بقیه قرار میگیرد)
|
|
44
|
+
* - tension: (اختیاری) میزان خمیدگی خط (برای سریهای خطی)
|
|
45
|
+
* - pointRadius: (اختیاری) شعاع نقاط روی خط (برای سریهای خطی)
|
|
46
|
+
* - fill: (اختیاری) پر شدن زیر خط (برای سریهای خطی)
|
|
47
|
+
*
|
|
48
|
+
* @param {number} [height] - ارتفاع نمودار (پیشفرض: 600 پیکسل)
|
|
49
|
+
*
|
|
50
|
+
* @description
|
|
51
|
+
* این کامپوننت یک نمودار میلهای (Bar) یا ترکیبی Bar/Line با قابلیت شخصیسازی کامل است.
|
|
52
|
+
* - پشتیبانی از فونت وزیر و راستچین
|
|
53
|
+
* - ریسپانسیو و مناسب صفحات فارسی
|
|
54
|
+
* - امکان نمایش چند سری داده به صورت میلهای و خطی همزمان (Combo)
|
|
55
|
+
* - شخصیسازی رنگ، ضخامت، ترتیب و استایل هر سری
|
|
56
|
+
*
|
|
57
|
+
* @returns {JSX.Element} یک نمودار میلهای یا ترکیبی با دادههای ورودی
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```jsx
|
|
61
|
+
* <BarChart
|
|
62
|
+
* labels={["شنبه", "یکشنبه", "دوشنبه"]}
|
|
63
|
+
* datasets={[
|
|
64
|
+
* {
|
|
65
|
+
* label: "فروش",
|
|
66
|
+
* data: [10, 20, 15],
|
|
67
|
+
* backgroundColor: "rgba(75,192,192,0.7)",
|
|
68
|
+
* },
|
|
69
|
+
* {
|
|
70
|
+
* label: "میانگین",
|
|
71
|
+
* data: [12, 18, 14],
|
|
72
|
+
* borderColor: "red",
|
|
73
|
+
* backgroundColor: "transparent",
|
|
74
|
+
* type: "line",
|
|
75
|
+
* order: 0,
|
|
76
|
+
* borderWidth: 3,
|
|
77
|
+
* tension: 0.4,
|
|
78
|
+
* pointRadius: 4,
|
|
79
|
+
* fill: false,
|
|
80
|
+
* },
|
|
81
|
+
* ]}
|
|
82
|
+
* height={400}
|
|
83
|
+
* />
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare function BarChart({ labels, datasets, height }: Props$1): React.JSX.Element;
|
|
87
|
+
|
|
88
|
+
interface Props {
|
|
89
|
+
labels: string[];
|
|
90
|
+
datasets: {
|
|
91
|
+
label: string;
|
|
92
|
+
data: number[];
|
|
93
|
+
backgroundColor: string | string[];
|
|
94
|
+
borderWidth?: number;
|
|
95
|
+
}[];
|
|
96
|
+
height?: number;
|
|
97
|
+
disableLogo?: boolean;
|
|
98
|
+
logoSRC?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 📊 PieChart — کامپوننت نمودار دایرهای (Pie)
|
|
102
|
+
*
|
|
103
|
+
* @component PieChart
|
|
104
|
+
*
|
|
105
|
+
* @param {string[]} labels - آرایهای از برچسبها برای هر بخش نمودار.
|
|
106
|
+
* @param {Array<{
|
|
107
|
+
* label: string,
|
|
108
|
+
* data: number[],
|
|
109
|
+
* backgroundColor: string[],
|
|
110
|
+
* borderWidth?: number
|
|
111
|
+
* }>} datasets - آرایهای شامل یک آبجکت داده برای مقداردهی بخشهای نمودار.
|
|
112
|
+
* - label: عنوان دادهها (نمایش در legend)
|
|
113
|
+
* - data: آرایهای از مقادیر هر بخش
|
|
114
|
+
* - backgroundColor: آرایهای از رنگها برای هر بخش
|
|
115
|
+
* - borderWidth: (اختیاری) ضخامت خط دور هر بخش
|
|
116
|
+
* @param {number} [height] - ارتفاع نمودار (پیشفرض: 600 پیکسل)
|
|
117
|
+
*
|
|
118
|
+
* @description
|
|
119
|
+
* این کامپوننت یک نمودار دایرهای با قابلیت شخصیسازی رنگ، داده و فونت (هماهنگ با وزیر) است.
|
|
120
|
+
* - ریسپانسیو و مناسب صفحات فارسی
|
|
121
|
+
* - امکان نمایش لوگو یا کامپوننت دلخواه در مرکز نمودار
|
|
122
|
+
*
|
|
123
|
+
* @returns {JSX.Element} یک نمودار دایرهای با دادههای ورودی
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```jsx
|
|
127
|
+
* <PieChart
|
|
128
|
+
* labels={["بخش اول", "بخش دوم", "بخش سوم"]}
|
|
129
|
+
* datasets={[
|
|
130
|
+
* {
|
|
131
|
+
* label: "مقدار",
|
|
132
|
+
* data: [10, 20, 30],
|
|
133
|
+
* backgroundColor: [
|
|
134
|
+
* "rgba(75,192,192,1)",
|
|
135
|
+
* "rgba(255,99,132,1)",
|
|
136
|
+
* "rgba(153,102,255,1)",
|
|
137
|
+
* ],
|
|
138
|
+
* borderWidth: 2,
|
|
139
|
+
* },
|
|
140
|
+
* ]}
|
|
141
|
+
* />
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
declare function PieChart({ labels, datasets, height, disableLogo, logoSRC }: Props): React.JSX.Element;
|
|
145
|
+
|
|
146
|
+
export { BarChart, PieChart };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/charts/index.ts
|
|
31
|
+
var charts_exports = {};
|
|
32
|
+
__export(charts_exports, {
|
|
33
|
+
BarChart: () => BarChart,
|
|
34
|
+
PieChart: () => PieChart
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(charts_exports);
|
|
37
|
+
|
|
38
|
+
// react-shim.js
|
|
39
|
+
var React = __toESM(require("react"));
|
|
40
|
+
|
|
41
|
+
// src/charts/bar/index.tsx
|
|
42
|
+
var import_react_chartjs_2 = require("react-chartjs-2");
|
|
43
|
+
var import_chart = require("chart.js");
|
|
44
|
+
var import_material = require("@mui/material");
|
|
45
|
+
import_chart.Chart.register(
|
|
46
|
+
import_chart.BarElement,
|
|
47
|
+
import_chart.LineElement,
|
|
48
|
+
import_chart.PointElement,
|
|
49
|
+
import_chart.CategoryScale,
|
|
50
|
+
import_chart.LinearScale,
|
|
51
|
+
import_chart.Tooltip,
|
|
52
|
+
import_chart.Legend
|
|
53
|
+
);
|
|
54
|
+
function BarChart({ labels, datasets, height }) {
|
|
55
|
+
const options = {
|
|
56
|
+
responsive: true,
|
|
57
|
+
maintainAspectRatio: false,
|
|
58
|
+
scales: {
|
|
59
|
+
y: {
|
|
60
|
+
ticks: {
|
|
61
|
+
font: {
|
|
62
|
+
family: "'Vazir', sans-serif",
|
|
63
|
+
size: 14
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
x: {
|
|
68
|
+
ticks: {
|
|
69
|
+
autoSkip: false,
|
|
70
|
+
font: {
|
|
71
|
+
family: "'Vazir', sans-serif",
|
|
72
|
+
size: 13
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
plugins: {
|
|
78
|
+
tooltip: {
|
|
79
|
+
bodyFont: {
|
|
80
|
+
family: "'Vazir', sans-serif",
|
|
81
|
+
size: 14
|
|
82
|
+
},
|
|
83
|
+
titleFont: {
|
|
84
|
+
family: "'Vazir', sans-serif",
|
|
85
|
+
size: 16
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
legend: {
|
|
89
|
+
labels: {
|
|
90
|
+
generateLabels: function(chart) {
|
|
91
|
+
const labels2 = import_chart.Chart.defaults.plugins.legend.labels.generateLabels(chart);
|
|
92
|
+
return labels2.map((label) => ({
|
|
93
|
+
...label,
|
|
94
|
+
text: " " + label.text + " ",
|
|
95
|
+
boxWidth: 40,
|
|
96
|
+
boxHeight: 20
|
|
97
|
+
}));
|
|
98
|
+
},
|
|
99
|
+
padding: 15,
|
|
100
|
+
usePointStyle: true,
|
|
101
|
+
font: {
|
|
102
|
+
size: 16,
|
|
103
|
+
family: "'Vazir', sans-serif"
|
|
104
|
+
},
|
|
105
|
+
boxWidth: 40,
|
|
106
|
+
paddingBottom: 10
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return /* @__PURE__ */ React.createElement(import_material.Box, { height: height ?? 600 }, /* @__PURE__ */ React.createElement(import_react_chartjs_2.Chart, { type: "bar", data: { labels, datasets }, options }));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// src/charts/pie/index.tsx
|
|
115
|
+
var import_react_chartjs_22 = require("react-chartjs-2");
|
|
116
|
+
var import_chart2 = require("chart.js");
|
|
117
|
+
var import_material2 = require("@mui/material");
|
|
118
|
+
var import_image = __toESM(require("next/image"));
|
|
119
|
+
import_chart2.Chart.register(import_chart2.ArcElement, import_chart2.Tooltip, import_chart2.Legend);
|
|
120
|
+
function PieChart({ labels, datasets, height, disableLogo, logoSRC }) {
|
|
121
|
+
const options = {
|
|
122
|
+
responsive: true,
|
|
123
|
+
maintainAspectRatio: false,
|
|
124
|
+
cutout: !disableLogo ? "59%" : "0%",
|
|
125
|
+
plugins: {
|
|
126
|
+
tooltip: {
|
|
127
|
+
bodyFont: {
|
|
128
|
+
family: "'Vazir', sans-serif",
|
|
129
|
+
size: 14
|
|
130
|
+
},
|
|
131
|
+
titleFont: {
|
|
132
|
+
family: "'Vazir', sans-serif",
|
|
133
|
+
size: 16
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
legend: {
|
|
137
|
+
labels: {
|
|
138
|
+
padding: 15,
|
|
139
|
+
usePointStyle: true,
|
|
140
|
+
font: {
|
|
141
|
+
size: 16,
|
|
142
|
+
family: "'Vazir', sans-serif"
|
|
143
|
+
},
|
|
144
|
+
boxWidth: 40,
|
|
145
|
+
paddingBottom: 10
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const CenterComponent = () => {
|
|
151
|
+
return /* @__PURE__ */ React.createElement(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
style: {
|
|
155
|
+
padding: "10px",
|
|
156
|
+
borderRadius: "8px",
|
|
157
|
+
textAlign: "center",
|
|
158
|
+
width: 220
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
/* @__PURE__ */ React.createElement(import_image.default, { alt: "", width: 220, height: 220, src: logoSRC ?? "/assets/images/pilogo.png", unoptimized: true })
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
return /* @__PURE__ */ React.createElement(import_material2.Box, { height: height ?? 600, sx: { position: "relative" } }, /* @__PURE__ */ React.createElement(
|
|
165
|
+
import_react_chartjs_22.Pie,
|
|
166
|
+
{
|
|
167
|
+
data: {
|
|
168
|
+
labels,
|
|
169
|
+
datasets
|
|
170
|
+
},
|
|
171
|
+
options
|
|
172
|
+
}
|
|
173
|
+
), !disableLogo && /* @__PURE__ */ React.createElement(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
style: {
|
|
177
|
+
position: "absolute",
|
|
178
|
+
top: "53%",
|
|
179
|
+
left: "50%",
|
|
180
|
+
transform: "translate(-50%, -50%)",
|
|
181
|
+
pointerEvents: "none"
|
|
182
|
+
// جلوگیری از دریافت event روی این لایه
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
/* @__PURE__ */ React.createElement(CenterComponent, null)
|
|
186
|
+
));
|
|
187
|
+
}
|
|
188
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
189
|
+
0 && (module.exports = {
|
|
190
|
+
BarChart,
|
|
191
|
+
PieChart
|
|
192
|
+
});
|
|
193
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/charts/index.ts","../../react-shim.js","../../src/charts/bar/index.tsx","../../src/charts/pie/index.tsx"],"sourcesContent":["export { default as BarChart } from \"./bar\";\nexport { default as PieChart } from \"./pie\";\n","import * as React from \"react\";\nexport { React };\n","import { Chart } from \"react-chartjs-2\";\nimport {\n Chart as ChartJS,\n BarElement,\n LineElement,\n PointElement,\n CategoryScale,\n LinearScale,\n Tooltip,\n Legend,\n Chart as ChartType,\n} from \"chart.js\";\nimport { Box } from \"@mui/material\";\n\nChartJS.register(\n BarElement,\n LineElement,\n PointElement,\n CategoryScale,\n LinearScale,\n Tooltip,\n Legend\n);\n\ninterface Props {\n labels: string[];\n datasets: {\n label: string;\n data: number[];\n backgroundColor: string;\n borderColor?: string;\n borderWidth?: number;\n type?: \"line\";\n order?: number;\n tension?: number;\n pointRadius?: number;\n fill?: boolean;\n }[];\n height?: number;\n}\n/**\n * 📊 BarChart — کامپوننت نمودار میلهای (Bar/Combo)\n *\n * @component BarChart\n *\n * @param {string[]} labels - آرایهای از برچسبها برای محور افقی (X).\n * @param {Array<{\n * label: string,\n * data: number[],\n * backgroundColor: string,\n * borderColor?: string,\n * borderWidth?: number,\n * type?: \"line\",\n * order?: number,\n * tension?: number,\n * pointRadius?: number,\n * fill?: boolean\n * }>} datasets - آرایهای از آبجکتهای داده برای هر سری نمودار.\n * - label: عنوان دادهها (نمایش در legend)\n * - data: آرایهای از مقادیر هر سری\n * - backgroundColor: رنگ میله یا خط\n * - borderColor: (اختیاری) رنگ خط دور میله یا خط\n * - borderWidth: (اختیاری) ضخامت خط دور میله یا خط\n * - type: (اختیاری) اگر \"line\" باشد، سری به صورت خطی نمایش داده میشود (نمودار ترکیبی)\n * - order: (اختیاری) ترتیب رسم سری (سری با order بالاتر روی بقیه قرار میگیرد)\n * - tension: (اختیاری) میزان خمیدگی خط (برای سریهای خطی)\n * - pointRadius: (اختیاری) شعاع نقاط روی خط (برای سریهای خطی)\n * - fill: (اختیاری) پر شدن زیر خط (برای سریهای خطی)\n *\n * @param {number} [height] - ارتفاع نمودار (پیشفرض: 600 پیکسل)\n *\n * @description\n * این کامپوننت یک نمودار میلهای (Bar) یا ترکیبی Bar/Line با قابلیت شخصیسازی کامل است.\n * - پشتیبانی از فونت وزیر و راستچین\n * - ریسپانسیو و مناسب صفحات فارسی\n * - امکان نمایش چند سری داده به صورت میلهای و خطی همزمان (Combo)\n * - شخصیسازی رنگ، ضخامت، ترتیب و استایل هر سری\n *\n * @returns {JSX.Element} یک نمودار میلهای یا ترکیبی با دادههای ورودی\n *\n * @example\n * ```jsx\n * <BarChart\n * labels={[\"شنبه\", \"یکشنبه\", \"دوشنبه\"]}\n * datasets={[\n * {\n * label: \"فروش\",\n * data: [10, 20, 15],\n * backgroundColor: \"rgba(75,192,192,0.7)\",\n * },\n * {\n * label: \"میانگین\",\n * data: [12, 18, 14],\n * borderColor: \"red\",\n * backgroundColor: \"transparent\",\n * type: \"line\",\n * order: 0,\n * borderWidth: 3,\n * tension: 0.4,\n * pointRadius: 4,\n * fill: false,\n * },\n * ]}\n * height={400}\n * />\n * ```\n */\nexport default function BarChart({ labels, datasets, height }: Props) {\n const options = {\n responsive: true,\n maintainAspectRatio: false,\n scales: {\n y: {\n ticks: {\n font: {\n family: \"'Vazir', sans-serif\",\n size: 14,\n },\n },\n },\n x: {\n ticks: {\n autoSkip: false,\n font: {\n family: \"'Vazir', sans-serif\",\n size: 13,\n },\n },\n },\n },\n plugins: {\n tooltip: {\n bodyFont: {\n family: \"'Vazir', sans-serif\",\n size: 14,\n },\n titleFont: {\n family: \"'Vazir', sans-serif\",\n size: 16,\n },\n },\n legend: {\n labels: {\n generateLabels: function (chart: ChartType) {\n const labels =\n ChartJS.defaults.plugins.legend.labels.generateLabels(chart);\n return labels.map((label) => ({\n ...label,\n text: \" \" + label.text + \" \",\n boxWidth: 40,\n boxHeight: 20,\n }));\n },\n padding: 15,\n usePointStyle: true,\n font: {\n size: 16,\n family: \"'Vazir', sans-serif\",\n },\n boxWidth: 40,\n paddingBottom: 10,\n },\n },\n },\n };\n\n return (\n <Box height={height ?? 600}>\n <Chart type=\"bar\" data={{ labels, datasets }} options={options} />\n </Box>\n );\n}\n","import { Pie } from \"react-chartjs-2\";\nimport { Chart as ChartJS, ArcElement, Tooltip, Legend, Chart } from \"chart.js\";\nimport { useMemo } from \"react\";\nimport { Box } from \"@mui/material\";\nimport Image from \"next/image\";\nChartJS.register(ArcElement, Tooltip, Legend);\n\ninterface Props {\n labels: string[];\n datasets: {\n label: string;\n data: number[];\n backgroundColor: string | string[];\n borderWidth?: number;\n }[];\n height?: number;\n disableLogo?: boolean;\n logoSRC?: string;\n}\n/**\n * 📊 PieChart — کامپوننت نمودار دایرهای (Pie)\n *\n * @component PieChart\n *\n * @param {string[]} labels - آرایهای از برچسبها برای هر بخش نمودار.\n * @param {Array<{\n * label: string,\n * data: number[],\n * backgroundColor: string[],\n * borderWidth?: number\n * }>} datasets - آرایهای شامل یک آبجکت داده برای مقداردهی بخشهای نمودار.\n * - label: عنوان دادهها (نمایش در legend)\n * - data: آرایهای از مقادیر هر بخش\n * - backgroundColor: آرایهای از رنگها برای هر بخش\n * - borderWidth: (اختیاری) ضخامت خط دور هر بخش\n * @param {number} [height] - ارتفاع نمودار (پیشفرض: 600 پیکسل)\n *\n * @description\n * این کامپوننت یک نمودار دایرهای با قابلیت شخصیسازی رنگ، داده و فونت (هماهنگ با وزیر) است.\n * - ریسپانسیو و مناسب صفحات فارسی\n * - امکان نمایش لوگو یا کامپوننت دلخواه در مرکز نمودار\n *\n * @returns {JSX.Element} یک نمودار دایرهای با دادههای ورودی\n *\n * @example\n * ```jsx\n * <PieChart\n * labels={[\"بخش اول\", \"بخش دوم\", \"بخش سوم\"]}\n * datasets={[\n * {\n * label: \"مقدار\",\n * data: [10, 20, 30],\n * backgroundColor: [\n * \"rgba(75,192,192,1)\",\n * \"rgba(255,99,132,1)\",\n * \"rgba(153,102,255,1)\",\n * ],\n * borderWidth: 2,\n * },\n * ]}\n * />\n * ```\n */\nexport default function PieChart({ labels, datasets, height , disableLogo,logoSRC }: Props) {\n const options = {\n responsive: true,\n maintainAspectRatio: false,\n cutout: !disableLogo ? \"59%\" : \"0%\",\n plugins: {\n tooltip: {\n bodyFont: {\n family: \"'Vazir', sans-serif\",\n size: 14,\n },\n titleFont: {\n family: \"'Vazir', sans-serif\",\n size: 16,\n },\n },\n legend: {\n labels: {\n padding: 15,\n usePointStyle: true,\n font: {\n size: 16,\n family: \"'Vazir', sans-serif\",\n },\n boxWidth: 40,\n paddingBottom: 10,\n },\n },\n },\n };\n\n // کامپوننتی که میخواهید در مرکز نمودار نمایش داده شود\n const CenterComponent = () => {\n return (\n <div\n style={{\n padding: \"10px\",\n borderRadius: \"8px\",\n textAlign: \"center\",\n width: 220,\n }}\n >\n <Image alt=\"\" width={220} height={220} src={logoSRC ?? \"/assets/images/pilogo.png\"} unoptimized/>\n </div>\n );\n };\n\n return (\n <Box height={height ?? 600} sx={{ position: \"relative\" }}>\n <Pie\n data={{\n labels: labels,\n datasets: datasets,\n }}\n options={options}\n />\n {!disableLogo && <div\n style={{\n position: \"absolute\",\n top: \"53%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n pointerEvents: \"none\", // جلوگیری از دریافت event روی این لایه\n }}\n >\n <CenterComponent />\n </div>}\n </Box>\n );\n}\n"],"mappings":"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","names":["ChartJS","labels","import_react_chartjs_2","import_chart","import_material","ChartJS","Image"]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// react-shim.js
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
// src/charts/bar/index.tsx
|
|
5
|
+
import { Chart } from "react-chartjs-2";
|
|
6
|
+
import {
|
|
7
|
+
Chart as ChartJS,
|
|
8
|
+
BarElement,
|
|
9
|
+
LineElement,
|
|
10
|
+
PointElement,
|
|
11
|
+
CategoryScale,
|
|
12
|
+
LinearScale,
|
|
13
|
+
Tooltip,
|
|
14
|
+
Legend
|
|
15
|
+
} from "chart.js";
|
|
16
|
+
import { Box } from "@mui/material";
|
|
17
|
+
ChartJS.register(
|
|
18
|
+
BarElement,
|
|
19
|
+
LineElement,
|
|
20
|
+
PointElement,
|
|
21
|
+
CategoryScale,
|
|
22
|
+
LinearScale,
|
|
23
|
+
Tooltip,
|
|
24
|
+
Legend
|
|
25
|
+
);
|
|
26
|
+
function BarChart({ labels, datasets, height }) {
|
|
27
|
+
const options = {
|
|
28
|
+
responsive: true,
|
|
29
|
+
maintainAspectRatio: false,
|
|
30
|
+
scales: {
|
|
31
|
+
y: {
|
|
32
|
+
ticks: {
|
|
33
|
+
font: {
|
|
34
|
+
family: "'Vazir', sans-serif",
|
|
35
|
+
size: 14
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
x: {
|
|
40
|
+
ticks: {
|
|
41
|
+
autoSkip: false,
|
|
42
|
+
font: {
|
|
43
|
+
family: "'Vazir', sans-serif",
|
|
44
|
+
size: 13
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
plugins: {
|
|
50
|
+
tooltip: {
|
|
51
|
+
bodyFont: {
|
|
52
|
+
family: "'Vazir', sans-serif",
|
|
53
|
+
size: 14
|
|
54
|
+
},
|
|
55
|
+
titleFont: {
|
|
56
|
+
family: "'Vazir', sans-serif",
|
|
57
|
+
size: 16
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
legend: {
|
|
61
|
+
labels: {
|
|
62
|
+
generateLabels: function(chart) {
|
|
63
|
+
const labels2 = ChartJS.defaults.plugins.legend.labels.generateLabels(chart);
|
|
64
|
+
return labels2.map((label) => ({
|
|
65
|
+
...label,
|
|
66
|
+
text: " " + label.text + " ",
|
|
67
|
+
boxWidth: 40,
|
|
68
|
+
boxHeight: 20
|
|
69
|
+
}));
|
|
70
|
+
},
|
|
71
|
+
padding: 15,
|
|
72
|
+
usePointStyle: true,
|
|
73
|
+
font: {
|
|
74
|
+
size: 16,
|
|
75
|
+
family: "'Vazir', sans-serif"
|
|
76
|
+
},
|
|
77
|
+
boxWidth: 40,
|
|
78
|
+
paddingBottom: 10
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ React.createElement(Box, { height: height ?? 600 }, /* @__PURE__ */ React.createElement(Chart, { type: "bar", data: { labels, datasets }, options }));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// src/charts/pie/index.tsx
|
|
87
|
+
import { Pie } from "react-chartjs-2";
|
|
88
|
+
import { Chart as ChartJS2, ArcElement, Tooltip as Tooltip2, Legend as Legend2 } from "chart.js";
|
|
89
|
+
import { Box as Box2 } from "@mui/material";
|
|
90
|
+
import Image from "next/image";
|
|
91
|
+
ChartJS2.register(ArcElement, Tooltip2, Legend2);
|
|
92
|
+
function PieChart({ labels, datasets, height, disableLogo, logoSRC }) {
|
|
93
|
+
const options = {
|
|
94
|
+
responsive: true,
|
|
95
|
+
maintainAspectRatio: false,
|
|
96
|
+
cutout: !disableLogo ? "59%" : "0%",
|
|
97
|
+
plugins: {
|
|
98
|
+
tooltip: {
|
|
99
|
+
bodyFont: {
|
|
100
|
+
family: "'Vazir', sans-serif",
|
|
101
|
+
size: 14
|
|
102
|
+
},
|
|
103
|
+
titleFont: {
|
|
104
|
+
family: "'Vazir', sans-serif",
|
|
105
|
+
size: 16
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
legend: {
|
|
109
|
+
labels: {
|
|
110
|
+
padding: 15,
|
|
111
|
+
usePointStyle: true,
|
|
112
|
+
font: {
|
|
113
|
+
size: 16,
|
|
114
|
+
family: "'Vazir', sans-serif"
|
|
115
|
+
},
|
|
116
|
+
boxWidth: 40,
|
|
117
|
+
paddingBottom: 10
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const CenterComponent = () => {
|
|
123
|
+
return /* @__PURE__ */ React.createElement(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
style: {
|
|
127
|
+
padding: "10px",
|
|
128
|
+
borderRadius: "8px",
|
|
129
|
+
textAlign: "center",
|
|
130
|
+
width: 220
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
/* @__PURE__ */ React.createElement(Image, { alt: "", width: 220, height: 220, src: logoSRC ?? "/assets/images/pilogo.png", unoptimized: true })
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
return /* @__PURE__ */ React.createElement(Box2, { height: height ?? 600, sx: { position: "relative" } }, /* @__PURE__ */ React.createElement(
|
|
137
|
+
Pie,
|
|
138
|
+
{
|
|
139
|
+
data: {
|
|
140
|
+
labels,
|
|
141
|
+
datasets
|
|
142
|
+
},
|
|
143
|
+
options
|
|
144
|
+
}
|
|
145
|
+
), !disableLogo && /* @__PURE__ */ React.createElement(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
style: {
|
|
149
|
+
position: "absolute",
|
|
150
|
+
top: "53%",
|
|
151
|
+
left: "50%",
|
|
152
|
+
transform: "translate(-50%, -50%)",
|
|
153
|
+
pointerEvents: "none"
|
|
154
|
+
// جلوگیری از دریافت event روی این لایه
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
/* @__PURE__ */ React.createElement(CenterComponent, null)
|
|
158
|
+
));
|
|
159
|
+
}
|
|
160
|
+
export {
|
|
161
|
+
BarChart,
|
|
162
|
+
PieChart
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=index.mjs.map
|