@adiba-banking-cloud/backoffice 0.0.28 → 0.0.30
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/build/index.cjs.js/index.js +249 -27
- package/build/index.esm.js/index.js +249 -28
- package/build/typings/components/charts/area/Area.d.ts +3 -0
- package/build/typings/components/charts/area/Area.default.d.ts +2 -0
- package/build/typings/components/charts/area/Area.stories.d.ts +6 -0
- package/build/typings/components/charts/area/Area.types.d.ts +59 -0
- package/build/typings/components/index.d.ts +1 -0
- package/build/typings/shared/libs/charts.d.ts +24 -0
- package/package.json +1 -1
|
@@ -11170,7 +11170,7 @@ function requireHighcharts() {
|
|
|
11170
11170
|
var highchartsExports = requireHighcharts();
|
|
11171
11171
|
var Highcharts = /*@__PURE__*/getDefaultExportFromCjs(highchartsExports);
|
|
11172
11172
|
|
|
11173
|
-
const initChart = props => {
|
|
11173
|
+
const initChart$1 = props => {
|
|
11174
11174
|
return {
|
|
11175
11175
|
chart: {
|
|
11176
11176
|
type: "column",
|
|
@@ -11210,8 +11210,90 @@ const initChart = props => {
|
|
|
11210
11210
|
};
|
|
11211
11211
|
};
|
|
11212
11212
|
|
|
11213
|
-
|
|
11214
|
-
|
|
11213
|
+
const computeBoundary = items => {
|
|
11214
|
+
return Math.ceil(Math.max(...items) * 1.1 / 10) * 10;
|
|
11215
|
+
};
|
|
11216
|
+
const computeDelta = (items, boundary) => {
|
|
11217
|
+
return items.map(item => {
|
|
11218
|
+
if (!boundary) return 100;
|
|
11219
|
+
return boundary - item;
|
|
11220
|
+
});
|
|
11221
|
+
};
|
|
11222
|
+
const parseColorToRgb = colorString => {
|
|
11223
|
+
if (colorString.startsWith("#")) {
|
|
11224
|
+
const hex = colorString.slice(1);
|
|
11225
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
11226
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
11227
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
11228
|
+
return {
|
|
11229
|
+
r,
|
|
11230
|
+
g,
|
|
11231
|
+
b
|
|
11232
|
+
};
|
|
11233
|
+
} else if (colorString.startsWith("rgb")) {
|
|
11234
|
+
var _colorString$match;
|
|
11235
|
+
const parts = (_colorString$match = colorString.match(/\d+/g)) === null || _colorString$match === void 0 ? void 0 : _colorString$match.map(Number);
|
|
11236
|
+
if (parts !== null && parts !== void 0 && parts.length) return {
|
|
11237
|
+
r: parts[0],
|
|
11238
|
+
g: parts[1],
|
|
11239
|
+
b: parts[2]
|
|
11240
|
+
};
|
|
11241
|
+
}
|
|
11242
|
+
console.warn("Color format '".concat(colorString, "' not fully recognized. Using black as fallback."));
|
|
11243
|
+
return {
|
|
11244
|
+
r: 0,
|
|
11245
|
+
g: 0,
|
|
11246
|
+
b: 0
|
|
11247
|
+
};
|
|
11248
|
+
};
|
|
11249
|
+
|
|
11250
|
+
/**
|
|
11251
|
+
* Creates a Highcharts linear gradient fillColor configuration for an Area/AreaSpline series.
|
|
11252
|
+
* The gradient flows vertically from the baseColor (at the series line) down to the x-axis,
|
|
11253
|
+
* fading to a transparent version of the baseColor.
|
|
11254
|
+
*
|
|
11255
|
+
* @param {string} baseColor The primary color for the gradient (e.g., '#FF0000', 'rgb(0,128,255)').
|
|
11256
|
+
* @param {object} [options] Configuration options for the gradient.
|
|
11257
|
+
* @param {number} [options.startOpacity=0.7] The opacity of the `baseColor` at the top (near the series line, position 0).
|
|
11258
|
+
* Value should be between 0 (fully transparent) and 1 (fully opaque).
|
|
11259
|
+
* @param {number} [options.endOpacity=0.0] The opacity of the transparent end color at the bottom (near the x-axis, position 1).
|
|
11260
|
+
* Value should be between 0 (fully transparent) and 1 (fully opaque).
|
|
11261
|
+
* @returns {Highcharts.GradientColorObject} A Highcharts `fillColor` configuration object.
|
|
11262
|
+
*/
|
|
11263
|
+
const createAreaFillGradient = function (baseColor) {
|
|
11264
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11265
|
+
const {
|
|
11266
|
+
startOpacity = 0.2,
|
|
11267
|
+
endOpacity = 0.08
|
|
11268
|
+
} = options;
|
|
11269
|
+
const parsedColor = parseColorToRgb(baseColor);
|
|
11270
|
+
"rgba(".concat(parsedColor.r, ", ").concat(parsedColor.g, ", ").concat(parsedColor.b, ", 1)");
|
|
11271
|
+
|
|
11272
|
+
// Color string for the top of the gradient (base color with specified start opacity)
|
|
11273
|
+
const rgbaStart = "rgba(".concat(parsedColor.r, ", ").concat(parsedColor.g, ", ").concat(parsedColor.b, ", ").concat(startOpacity, ")");
|
|
11274
|
+
|
|
11275
|
+
// Color string for the bottom of the gradient (always transparent version of base color)
|
|
11276
|
+
const rgbaEnd = "rgba(".concat(parsedColor.r, ", ").concat(parsedColor.g, ", ").concat(parsedColor.b, ", ").concat(endOpacity, ")");
|
|
11277
|
+
return {
|
|
11278
|
+
linearGradient: {
|
|
11279
|
+
x1: 0,
|
|
11280
|
+
// Gradient starts at the left edge
|
|
11281
|
+
y1: 0,
|
|
11282
|
+
// Gradient starts at the top edge
|
|
11283
|
+
x2: 0,
|
|
11284
|
+
// Gradient ends at the left edge (same x as start)
|
|
11285
|
+
y2: 1 // Gradient ends at the bottom edge (so it's a vertical gradient)
|
|
11286
|
+
},
|
|
11287
|
+
stops: [[0, rgbaStart],
|
|
11288
|
+
// First stop: at the top (0% of gradient vector)
|
|
11289
|
+
[0.9, rgbaEnd],
|
|
11290
|
+
// Second stop: at the bottom (100% of gradient vector)
|
|
11291
|
+
[1, "transparent"]]
|
|
11292
|
+
};
|
|
11293
|
+
};
|
|
11294
|
+
|
|
11295
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11296
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11215
11297
|
|
|
11216
11298
|
// Initialize Highcharts with rounded corners
|
|
11217
11299
|
if (typeof window !== "undefined") {
|
|
@@ -11220,13 +11302,8 @@ if (typeof window !== "undefined") {
|
|
|
11220
11302
|
const Column = props => {
|
|
11221
11303
|
const chartRef = React.useRef(null);
|
|
11222
11304
|
const chartOptions = React.useMemo(() => {
|
|
11223
|
-
const
|
|
11224
|
-
|
|
11225
|
-
};
|
|
11226
|
-
const column = _objectSpread(_objectSpread({}, props), {
|
|
11227
|
-
chart
|
|
11228
|
-
});
|
|
11229
|
-
return _objectSpread(_objectSpread({}, initChart(column)), initSeries(column));
|
|
11305
|
+
const column = _objectSpread$1({}, props);
|
|
11306
|
+
return _objectSpread$1(_objectSpread$1({}, initChart$1(column)), initSeries$1(column));
|
|
11230
11307
|
}, [props]);
|
|
11231
11308
|
React.useEffect(() => {
|
|
11232
11309
|
if (chartRef.current && chartRef.current.chart) {
|
|
@@ -11272,7 +11349,7 @@ const StackedColumn = props => {
|
|
|
11272
11349
|
equalizer: false
|
|
11273
11350
|
}));
|
|
11274
11351
|
};
|
|
11275
|
-
const initSeries = props => {
|
|
11352
|
+
const initSeries$1 = props => {
|
|
11276
11353
|
const renderXAxis = categories => ({
|
|
11277
11354
|
categories,
|
|
11278
11355
|
labels: {
|
|
@@ -11282,7 +11359,7 @@ const initSeries = props => {
|
|
|
11282
11359
|
}
|
|
11283
11360
|
}
|
|
11284
11361
|
});
|
|
11285
|
-
const renderYAxis = (
|
|
11362
|
+
const renderYAxis = (equalizer, series) => ({
|
|
11286
11363
|
allowDecimals: false,
|
|
11287
11364
|
title: {
|
|
11288
11365
|
text: null
|
|
@@ -11329,7 +11406,7 @@ const initSeries = props => {
|
|
|
11329
11406
|
enableMouseTracking: false,
|
|
11330
11407
|
showInLegend: false
|
|
11331
11408
|
});
|
|
11332
|
-
const mainSeries = _objectSpread(_objectSpread({}, fillSeries(boundary)), {
|
|
11409
|
+
const mainSeries = _objectSpread$1(_objectSpread$1({}, fillSeries(boundary)), {
|
|
11333
11410
|
name: props.yAxisLabel[0],
|
|
11334
11411
|
color: seriesColors ? seriesColors[0] : "gray",
|
|
11335
11412
|
data: seriesData[0],
|
|
@@ -11369,7 +11446,7 @@ const initSeries = props => {
|
|
|
11369
11446
|
pointWidth: undefined
|
|
11370
11447
|
}
|
|
11371
11448
|
};
|
|
11372
|
-
const plot = _objectSpread(_objectSpread({}, {
|
|
11449
|
+
const plot = _objectSpread$1(_objectSpread$1({}, {
|
|
11373
11450
|
column: {
|
|
11374
11451
|
borderWidth: 0,
|
|
11375
11452
|
borderRadius: 10
|
|
@@ -11379,20 +11456,154 @@ const initSeries = props => {
|
|
|
11379
11456
|
};
|
|
11380
11457
|
return {
|
|
11381
11458
|
xAxis: renderXAxis(props.xAxisLabel),
|
|
11382
|
-
yAxis: renderYAxis(props.
|
|
11459
|
+
yAxis: renderYAxis(props.equalizer, props.series),
|
|
11383
11460
|
plotOptions: renderPlot(props.equalizer),
|
|
11384
11461
|
series: renderSeries(props.series, props === null || props === void 0 ? void 0 : props.colors, props.equalizer)
|
|
11385
11462
|
};
|
|
11386
11463
|
};
|
|
11387
|
-
|
|
11388
|
-
|
|
11464
|
+
|
|
11465
|
+
const initChart = props => {
|
|
11466
|
+
return {
|
|
11467
|
+
chart: {
|
|
11468
|
+
type: "areaspline",
|
|
11469
|
+
backgroundColor: (props === null || props === void 0 ? void 0 : props.bgColor) || "rgba(255, 255, 255, 0)",
|
|
11470
|
+
plotBackgroundColor: (props === null || props === void 0 ? void 0 : props.plotBgColor) || "rgba(255, 255, 255, 0)"
|
|
11471
|
+
},
|
|
11472
|
+
tooltip: {
|
|
11473
|
+
backgroundColor: "#0F193D",
|
|
11474
|
+
borderColor: "black",
|
|
11475
|
+
borderRadius: 5,
|
|
11476
|
+
borderWidth: 1,
|
|
11477
|
+
style: {
|
|
11478
|
+
color: "white"
|
|
11479
|
+
},
|
|
11480
|
+
format: props.series.length > 1 ? "<b>{key}</b><br/>{series.name}: <b>{y}</b><br/>" + "Total: <b>{point.stackTotal}</b>" : "<b>{key}</b><br/>{series.name}: {y}<br/>"
|
|
11481
|
+
},
|
|
11482
|
+
credits: {
|
|
11483
|
+
enabled: false
|
|
11484
|
+
},
|
|
11485
|
+
exporting: {
|
|
11486
|
+
enabled: false
|
|
11487
|
+
},
|
|
11488
|
+
title: {
|
|
11489
|
+
text: props.title || null
|
|
11490
|
+
},
|
|
11491
|
+
labels: {
|
|
11492
|
+
style: {
|
|
11493
|
+
color: "#575E77"
|
|
11494
|
+
}
|
|
11495
|
+
},
|
|
11496
|
+
legend: {
|
|
11497
|
+
enabled: props.withLegend,
|
|
11498
|
+
align: "right",
|
|
11499
|
+
verticalAlign: "top"
|
|
11500
|
+
}
|
|
11501
|
+
};
|
|
11389
11502
|
};
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11503
|
+
|
|
11504
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11505
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11506
|
+
const Area = props => {
|
|
11507
|
+
const chartRef = React.useRef(null);
|
|
11508
|
+
const chartOptions = React.useMemo(() => {
|
|
11509
|
+
const area = _objectSpread({}, props);
|
|
11510
|
+
return _objectSpread(_objectSpread({}, initChart(area)), initSeries(area));
|
|
11511
|
+
}, [props]);
|
|
11512
|
+
React.useEffect(() => {
|
|
11513
|
+
if (chartRef.current && chartRef.current.chart) {
|
|
11514
|
+
chartRef.current.chart.update(chartOptions, true);
|
|
11515
|
+
}
|
|
11516
|
+
}, [chartOptions]);
|
|
11517
|
+
return /*#__PURE__*/React.createElement(HighchartsReact, {
|
|
11518
|
+
highcharts: Highcharts,
|
|
11519
|
+
ref: chartRef,
|
|
11520
|
+
options: chartOptions
|
|
11394
11521
|
});
|
|
11395
11522
|
};
|
|
11523
|
+
const SimpleArea = props => {
|
|
11524
|
+
const chartOptions = {
|
|
11525
|
+
xAxisLabel: props.xAxisLabel,
|
|
11526
|
+
yAxisLabel: [props.yAxisLabel],
|
|
11527
|
+
series: [props.series],
|
|
11528
|
+
withLegend: props.withLegend,
|
|
11529
|
+
withCrossHair: props.withCrossHair,
|
|
11530
|
+
bgColor: props.bgColor,
|
|
11531
|
+
plotBgColor: props.plotBgColor,
|
|
11532
|
+
colors: [props.color || "gray"],
|
|
11533
|
+
title: props.title
|
|
11534
|
+
};
|
|
11535
|
+
return /*#__PURE__*/React.createElement(Area, chartOptions);
|
|
11536
|
+
};
|
|
11537
|
+
const initSeries = props => {
|
|
11538
|
+
const renderXAxis = () => {
|
|
11539
|
+
var _props$colors;
|
|
11540
|
+
const crosshair = props.withCrossHair ? {
|
|
11541
|
+
color: props !== null && props !== void 0 && (_props$colors = props.colors) !== null && _props$colors !== void 0 && _props$colors.length ? props === null || props === void 0 ? void 0 : props.colors[0] : "#ccc",
|
|
11542
|
+
width: 2,
|
|
11543
|
+
dashStyle: "Dot",
|
|
11544
|
+
snap: true
|
|
11545
|
+
} : undefined;
|
|
11546
|
+
const categories = props.xAxisLabel;
|
|
11547
|
+
const labels = {
|
|
11548
|
+
style: {
|
|
11549
|
+
textTransform: "uppercase",
|
|
11550
|
+
color: "#575E77"
|
|
11551
|
+
}
|
|
11552
|
+
};
|
|
11553
|
+
return {
|
|
11554
|
+
categories,
|
|
11555
|
+
crosshair,
|
|
11556
|
+
labels
|
|
11557
|
+
};
|
|
11558
|
+
};
|
|
11559
|
+
const renderYAxis = () => {
|
|
11560
|
+
const defaults = {
|
|
11561
|
+
allowDecimals: false,
|
|
11562
|
+
title: {
|
|
11563
|
+
text: null
|
|
11564
|
+
},
|
|
11565
|
+
gridLineDashStyle: "Dot",
|
|
11566
|
+
gridLineWidth: 2
|
|
11567
|
+
};
|
|
11568
|
+
const labels = {
|
|
11569
|
+
color: "#575E77"
|
|
11570
|
+
};
|
|
11571
|
+
return _objectSpread(_objectSpread({}, defaults), {
|
|
11572
|
+
labels
|
|
11573
|
+
});
|
|
11574
|
+
};
|
|
11575
|
+
const renderPlot = () => {
|
|
11576
|
+
const areaspline = {
|
|
11577
|
+
lineWidth: 1,
|
|
11578
|
+
color: "#C8700B",
|
|
11579
|
+
pointPlacement: "on",
|
|
11580
|
+
marker: {
|
|
11581
|
+
enabled: false
|
|
11582
|
+
}
|
|
11583
|
+
};
|
|
11584
|
+
return {
|
|
11585
|
+
areaspline
|
|
11586
|
+
};
|
|
11587
|
+
};
|
|
11588
|
+
const renderSeries = () => {
|
|
11589
|
+
const series = props.series.map((value, key) => {
|
|
11590
|
+
var _props$colors2, _props$colors3;
|
|
11591
|
+
return {
|
|
11592
|
+
name: props.yAxisLabel[key],
|
|
11593
|
+
color: (_props$colors2 = props.colors) !== null && _props$colors2 !== void 0 && _props$colors2.length ? props.colors[key] : "#C8700B",
|
|
11594
|
+
data: value,
|
|
11595
|
+
fillColor: createAreaFillGradient((_props$colors3 = props.colors) !== null && _props$colors3 !== void 0 && _props$colors3.length ? props.colors[key] : "#C8700B")
|
|
11596
|
+
};
|
|
11597
|
+
});
|
|
11598
|
+
return series;
|
|
11599
|
+
};
|
|
11600
|
+
return {
|
|
11601
|
+
xAxis: renderXAxis(),
|
|
11602
|
+
yAxis: renderYAxis(),
|
|
11603
|
+
plotOptions: renderPlot(),
|
|
11604
|
+
series: renderSeries()
|
|
11605
|
+
};
|
|
11606
|
+
};
|
|
11396
11607
|
|
|
11397
11608
|
const Icons = _ref => {
|
|
11398
11609
|
let {
|
|
@@ -11612,8 +11823,12 @@ const UserMenuTarget = _ref => {
|
|
|
11612
11823
|
}, /*#__PURE__*/React.createElement(core.Group, {
|
|
11613
11824
|
gap: "sm"
|
|
11614
11825
|
}, /*#__PURE__*/React.createElement(core.Avatar, {
|
|
11615
|
-
|
|
11616
|
-
|
|
11826
|
+
src: avatar,
|
|
11827
|
+
radius: 'md',
|
|
11828
|
+
key: name,
|
|
11829
|
+
name: name,
|
|
11830
|
+
color: "initials",
|
|
11831
|
+
bd: '0.5px solid adiba.2'
|
|
11617
11832
|
}), /*#__PURE__*/React.createElement(core.Stack, {
|
|
11618
11833
|
gap: 0,
|
|
11619
11834
|
align: "flex-start",
|
|
@@ -11931,11 +12146,17 @@ const AvatarLabelPanel = _ref2 => {
|
|
|
11931
12146
|
}), /*#__PURE__*/React.createElement(core.Group, {
|
|
11932
12147
|
align: "flex-start",
|
|
11933
12148
|
py: "sm"
|
|
11934
|
-
}, /*#__PURE__*/React.createElement(core.
|
|
11935
|
-
w: labelWidth
|
|
12149
|
+
}, /*#__PURE__*/React.createElement(core.Box, {
|
|
12150
|
+
w: labelWidth,
|
|
12151
|
+
pl: 'md'
|
|
11936
12152
|
}, /*#__PURE__*/React.createElement(core.Avatar, {
|
|
11937
12153
|
size: avatarSize,
|
|
11938
|
-
src: avatar
|
|
12154
|
+
src: avatar,
|
|
12155
|
+
radius: 'md',
|
|
12156
|
+
key: name,
|
|
12157
|
+
name: name,
|
|
12158
|
+
color: "initials",
|
|
12159
|
+
bd: '0.5px solid adiba.2'
|
|
11939
12160
|
})), /*#__PURE__*/React.createElement(core.Stack, {
|
|
11940
12161
|
py: 10,
|
|
11941
12162
|
gap: "md",
|
|
@@ -12298,7 +12519,7 @@ const ApplicationPanel = _ref => {
|
|
|
12298
12519
|
src: coverImage,
|
|
12299
12520
|
fallbackSrc: img$a
|
|
12300
12521
|
}), /*#__PURE__*/React.createElement(core.Overlay, {
|
|
12301
|
-
gradient: "linear-gradient(45deg, rgba(255,255,255,0.
|
|
12522
|
+
gradient: "linear-gradient(45deg, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0.05) 100%)"
|
|
12302
12523
|
}))), /*#__PURE__*/React.createElement(core.Card.Section, {
|
|
12303
12524
|
p: "md"
|
|
12304
12525
|
}, /*#__PURE__*/React.createElement(core.Stack, {
|
|
@@ -12676,6 +12897,7 @@ exports.PaymentMethod = PaymentMethod;
|
|
|
12676
12897
|
exports.PaymentMethodAdd = PaymentMethodAdd;
|
|
12677
12898
|
exports.SearchPanel = SearchPanel;
|
|
12678
12899
|
exports.SideMenu = SideMenu;
|
|
12900
|
+
exports.SimpleArea = SimpleArea;
|
|
12679
12901
|
exports.SimpleColumn = SimpleColumn;
|
|
12680
12902
|
exports.SimplePanel = SimplePanel;
|
|
12681
12903
|
exports.SimpleTable = SimpleTable;
|
|
@@ -11149,7 +11149,7 @@ function requireHighcharts() {
|
|
|
11149
11149
|
var highchartsExports = requireHighcharts();
|
|
11150
11150
|
var Highcharts = /*@__PURE__*/getDefaultExportFromCjs(highchartsExports);
|
|
11151
11151
|
|
|
11152
|
-
const initChart = props => {
|
|
11152
|
+
const initChart$1 = props => {
|
|
11153
11153
|
return {
|
|
11154
11154
|
chart: {
|
|
11155
11155
|
type: "column",
|
|
@@ -11189,8 +11189,90 @@ const initChart = props => {
|
|
|
11189
11189
|
};
|
|
11190
11190
|
};
|
|
11191
11191
|
|
|
11192
|
-
|
|
11193
|
-
|
|
11192
|
+
const computeBoundary = items => {
|
|
11193
|
+
return Math.ceil(Math.max(...items) * 1.1 / 10) * 10;
|
|
11194
|
+
};
|
|
11195
|
+
const computeDelta = (items, boundary) => {
|
|
11196
|
+
return items.map(item => {
|
|
11197
|
+
if (!boundary) return 100;
|
|
11198
|
+
return boundary - item;
|
|
11199
|
+
});
|
|
11200
|
+
};
|
|
11201
|
+
const parseColorToRgb = colorString => {
|
|
11202
|
+
if (colorString.startsWith("#")) {
|
|
11203
|
+
const hex = colorString.slice(1);
|
|
11204
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
11205
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
11206
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
11207
|
+
return {
|
|
11208
|
+
r,
|
|
11209
|
+
g,
|
|
11210
|
+
b
|
|
11211
|
+
};
|
|
11212
|
+
} else if (colorString.startsWith("rgb")) {
|
|
11213
|
+
var _colorString$match;
|
|
11214
|
+
const parts = (_colorString$match = colorString.match(/\d+/g)) === null || _colorString$match === void 0 ? void 0 : _colorString$match.map(Number);
|
|
11215
|
+
if (parts !== null && parts !== void 0 && parts.length) return {
|
|
11216
|
+
r: parts[0],
|
|
11217
|
+
g: parts[1],
|
|
11218
|
+
b: parts[2]
|
|
11219
|
+
};
|
|
11220
|
+
}
|
|
11221
|
+
console.warn("Color format '".concat(colorString, "' not fully recognized. Using black as fallback."));
|
|
11222
|
+
return {
|
|
11223
|
+
r: 0,
|
|
11224
|
+
g: 0,
|
|
11225
|
+
b: 0
|
|
11226
|
+
};
|
|
11227
|
+
};
|
|
11228
|
+
|
|
11229
|
+
/**
|
|
11230
|
+
* Creates a Highcharts linear gradient fillColor configuration for an Area/AreaSpline series.
|
|
11231
|
+
* The gradient flows vertically from the baseColor (at the series line) down to the x-axis,
|
|
11232
|
+
* fading to a transparent version of the baseColor.
|
|
11233
|
+
*
|
|
11234
|
+
* @param {string} baseColor The primary color for the gradient (e.g., '#FF0000', 'rgb(0,128,255)').
|
|
11235
|
+
* @param {object} [options] Configuration options for the gradient.
|
|
11236
|
+
* @param {number} [options.startOpacity=0.7] The opacity of the `baseColor` at the top (near the series line, position 0).
|
|
11237
|
+
* Value should be between 0 (fully transparent) and 1 (fully opaque).
|
|
11238
|
+
* @param {number} [options.endOpacity=0.0] The opacity of the transparent end color at the bottom (near the x-axis, position 1).
|
|
11239
|
+
* Value should be between 0 (fully transparent) and 1 (fully opaque).
|
|
11240
|
+
* @returns {Highcharts.GradientColorObject} A Highcharts `fillColor` configuration object.
|
|
11241
|
+
*/
|
|
11242
|
+
const createAreaFillGradient = function (baseColor) {
|
|
11243
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11244
|
+
const {
|
|
11245
|
+
startOpacity = 0.2,
|
|
11246
|
+
endOpacity = 0.08
|
|
11247
|
+
} = options;
|
|
11248
|
+
const parsedColor = parseColorToRgb(baseColor);
|
|
11249
|
+
"rgba(".concat(parsedColor.r, ", ").concat(parsedColor.g, ", ").concat(parsedColor.b, ", 1)");
|
|
11250
|
+
|
|
11251
|
+
// Color string for the top of the gradient (base color with specified start opacity)
|
|
11252
|
+
const rgbaStart = "rgba(".concat(parsedColor.r, ", ").concat(parsedColor.g, ", ").concat(parsedColor.b, ", ").concat(startOpacity, ")");
|
|
11253
|
+
|
|
11254
|
+
// Color string for the bottom of the gradient (always transparent version of base color)
|
|
11255
|
+
const rgbaEnd = "rgba(".concat(parsedColor.r, ", ").concat(parsedColor.g, ", ").concat(parsedColor.b, ", ").concat(endOpacity, ")");
|
|
11256
|
+
return {
|
|
11257
|
+
linearGradient: {
|
|
11258
|
+
x1: 0,
|
|
11259
|
+
// Gradient starts at the left edge
|
|
11260
|
+
y1: 0,
|
|
11261
|
+
// Gradient starts at the top edge
|
|
11262
|
+
x2: 0,
|
|
11263
|
+
// Gradient ends at the left edge (same x as start)
|
|
11264
|
+
y2: 1 // Gradient ends at the bottom edge (so it's a vertical gradient)
|
|
11265
|
+
},
|
|
11266
|
+
stops: [[0, rgbaStart],
|
|
11267
|
+
// First stop: at the top (0% of gradient vector)
|
|
11268
|
+
[0.9, rgbaEnd],
|
|
11269
|
+
// Second stop: at the bottom (100% of gradient vector)
|
|
11270
|
+
[1, "transparent"]]
|
|
11271
|
+
};
|
|
11272
|
+
};
|
|
11273
|
+
|
|
11274
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11275
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11194
11276
|
|
|
11195
11277
|
// Initialize Highcharts with rounded corners
|
|
11196
11278
|
if (typeof window !== "undefined") {
|
|
@@ -11199,13 +11281,8 @@ if (typeof window !== "undefined") {
|
|
|
11199
11281
|
const Column = props => {
|
|
11200
11282
|
const chartRef = useRef(null);
|
|
11201
11283
|
const chartOptions = useMemo(() => {
|
|
11202
|
-
const
|
|
11203
|
-
|
|
11204
|
-
};
|
|
11205
|
-
const column = _objectSpread(_objectSpread({}, props), {
|
|
11206
|
-
chart
|
|
11207
|
-
});
|
|
11208
|
-
return _objectSpread(_objectSpread({}, initChart(column)), initSeries(column));
|
|
11284
|
+
const column = _objectSpread$1({}, props);
|
|
11285
|
+
return _objectSpread$1(_objectSpread$1({}, initChart$1(column)), initSeries$1(column));
|
|
11209
11286
|
}, [props]);
|
|
11210
11287
|
useEffect(() => {
|
|
11211
11288
|
if (chartRef.current && chartRef.current.chart) {
|
|
@@ -11251,7 +11328,7 @@ const StackedColumn = props => {
|
|
|
11251
11328
|
equalizer: false
|
|
11252
11329
|
}));
|
|
11253
11330
|
};
|
|
11254
|
-
const initSeries = props => {
|
|
11331
|
+
const initSeries$1 = props => {
|
|
11255
11332
|
const renderXAxis = categories => ({
|
|
11256
11333
|
categories,
|
|
11257
11334
|
labels: {
|
|
@@ -11261,7 +11338,7 @@ const initSeries = props => {
|
|
|
11261
11338
|
}
|
|
11262
11339
|
}
|
|
11263
11340
|
});
|
|
11264
|
-
const renderYAxis = (
|
|
11341
|
+
const renderYAxis = (equalizer, series) => ({
|
|
11265
11342
|
allowDecimals: false,
|
|
11266
11343
|
title: {
|
|
11267
11344
|
text: null
|
|
@@ -11308,7 +11385,7 @@ const initSeries = props => {
|
|
|
11308
11385
|
enableMouseTracking: false,
|
|
11309
11386
|
showInLegend: false
|
|
11310
11387
|
});
|
|
11311
|
-
const mainSeries = _objectSpread(_objectSpread({}, fillSeries(boundary)), {
|
|
11388
|
+
const mainSeries = _objectSpread$1(_objectSpread$1({}, fillSeries(boundary)), {
|
|
11312
11389
|
name: props.yAxisLabel[0],
|
|
11313
11390
|
color: seriesColors ? seriesColors[0] : "gray",
|
|
11314
11391
|
data: seriesData[0],
|
|
@@ -11348,7 +11425,7 @@ const initSeries = props => {
|
|
|
11348
11425
|
pointWidth: undefined
|
|
11349
11426
|
}
|
|
11350
11427
|
};
|
|
11351
|
-
const plot = _objectSpread(_objectSpread({}, {
|
|
11428
|
+
const plot = _objectSpread$1(_objectSpread$1({}, {
|
|
11352
11429
|
column: {
|
|
11353
11430
|
borderWidth: 0,
|
|
11354
11431
|
borderRadius: 10
|
|
@@ -11358,20 +11435,154 @@ const initSeries = props => {
|
|
|
11358
11435
|
};
|
|
11359
11436
|
return {
|
|
11360
11437
|
xAxis: renderXAxis(props.xAxisLabel),
|
|
11361
|
-
yAxis: renderYAxis(props.
|
|
11438
|
+
yAxis: renderYAxis(props.equalizer, props.series),
|
|
11362
11439
|
plotOptions: renderPlot(props.equalizer),
|
|
11363
11440
|
series: renderSeries(props.series, props === null || props === void 0 ? void 0 : props.colors, props.equalizer)
|
|
11364
11441
|
};
|
|
11365
11442
|
};
|
|
11366
|
-
|
|
11367
|
-
|
|
11443
|
+
|
|
11444
|
+
const initChart = props => {
|
|
11445
|
+
return {
|
|
11446
|
+
chart: {
|
|
11447
|
+
type: "areaspline",
|
|
11448
|
+
backgroundColor: (props === null || props === void 0 ? void 0 : props.bgColor) || "rgba(255, 255, 255, 0)",
|
|
11449
|
+
plotBackgroundColor: (props === null || props === void 0 ? void 0 : props.plotBgColor) || "rgba(255, 255, 255, 0)"
|
|
11450
|
+
},
|
|
11451
|
+
tooltip: {
|
|
11452
|
+
backgroundColor: "#0F193D",
|
|
11453
|
+
borderColor: "black",
|
|
11454
|
+
borderRadius: 5,
|
|
11455
|
+
borderWidth: 1,
|
|
11456
|
+
style: {
|
|
11457
|
+
color: "white"
|
|
11458
|
+
},
|
|
11459
|
+
format: props.series.length > 1 ? "<b>{key}</b><br/>{series.name}: <b>{y}</b><br/>" + "Total: <b>{point.stackTotal}</b>" : "<b>{key}</b><br/>{series.name}: {y}<br/>"
|
|
11460
|
+
},
|
|
11461
|
+
credits: {
|
|
11462
|
+
enabled: false
|
|
11463
|
+
},
|
|
11464
|
+
exporting: {
|
|
11465
|
+
enabled: false
|
|
11466
|
+
},
|
|
11467
|
+
title: {
|
|
11468
|
+
text: props.title || null
|
|
11469
|
+
},
|
|
11470
|
+
labels: {
|
|
11471
|
+
style: {
|
|
11472
|
+
color: "#575E77"
|
|
11473
|
+
}
|
|
11474
|
+
},
|
|
11475
|
+
legend: {
|
|
11476
|
+
enabled: props.withLegend,
|
|
11477
|
+
align: "right",
|
|
11478
|
+
verticalAlign: "top"
|
|
11479
|
+
}
|
|
11480
|
+
};
|
|
11368
11481
|
};
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11482
|
+
|
|
11483
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11484
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11485
|
+
const Area = props => {
|
|
11486
|
+
const chartRef = useRef(null);
|
|
11487
|
+
const chartOptions = useMemo(() => {
|
|
11488
|
+
const area = _objectSpread({}, props);
|
|
11489
|
+
return _objectSpread(_objectSpread({}, initChart(area)), initSeries(area));
|
|
11490
|
+
}, [props]);
|
|
11491
|
+
useEffect(() => {
|
|
11492
|
+
if (chartRef.current && chartRef.current.chart) {
|
|
11493
|
+
chartRef.current.chart.update(chartOptions, true);
|
|
11494
|
+
}
|
|
11495
|
+
}, [chartOptions]);
|
|
11496
|
+
return /*#__PURE__*/React.createElement(HighchartsReact, {
|
|
11497
|
+
highcharts: Highcharts,
|
|
11498
|
+
ref: chartRef,
|
|
11499
|
+
options: chartOptions
|
|
11373
11500
|
});
|
|
11374
11501
|
};
|
|
11502
|
+
const SimpleArea = props => {
|
|
11503
|
+
const chartOptions = {
|
|
11504
|
+
xAxisLabel: props.xAxisLabel,
|
|
11505
|
+
yAxisLabel: [props.yAxisLabel],
|
|
11506
|
+
series: [props.series],
|
|
11507
|
+
withLegend: props.withLegend,
|
|
11508
|
+
withCrossHair: props.withCrossHair,
|
|
11509
|
+
bgColor: props.bgColor,
|
|
11510
|
+
plotBgColor: props.plotBgColor,
|
|
11511
|
+
colors: [props.color || "gray"],
|
|
11512
|
+
title: props.title
|
|
11513
|
+
};
|
|
11514
|
+
return /*#__PURE__*/React.createElement(Area, chartOptions);
|
|
11515
|
+
};
|
|
11516
|
+
const initSeries = props => {
|
|
11517
|
+
const renderXAxis = () => {
|
|
11518
|
+
var _props$colors;
|
|
11519
|
+
const crosshair = props.withCrossHair ? {
|
|
11520
|
+
color: props !== null && props !== void 0 && (_props$colors = props.colors) !== null && _props$colors !== void 0 && _props$colors.length ? props === null || props === void 0 ? void 0 : props.colors[0] : "#ccc",
|
|
11521
|
+
width: 2,
|
|
11522
|
+
dashStyle: "Dot",
|
|
11523
|
+
snap: true
|
|
11524
|
+
} : undefined;
|
|
11525
|
+
const categories = props.xAxisLabel;
|
|
11526
|
+
const labels = {
|
|
11527
|
+
style: {
|
|
11528
|
+
textTransform: "uppercase",
|
|
11529
|
+
color: "#575E77"
|
|
11530
|
+
}
|
|
11531
|
+
};
|
|
11532
|
+
return {
|
|
11533
|
+
categories,
|
|
11534
|
+
crosshair,
|
|
11535
|
+
labels
|
|
11536
|
+
};
|
|
11537
|
+
};
|
|
11538
|
+
const renderYAxis = () => {
|
|
11539
|
+
const defaults = {
|
|
11540
|
+
allowDecimals: false,
|
|
11541
|
+
title: {
|
|
11542
|
+
text: null
|
|
11543
|
+
},
|
|
11544
|
+
gridLineDashStyle: "Dot",
|
|
11545
|
+
gridLineWidth: 2
|
|
11546
|
+
};
|
|
11547
|
+
const labels = {
|
|
11548
|
+
color: "#575E77"
|
|
11549
|
+
};
|
|
11550
|
+
return _objectSpread(_objectSpread({}, defaults), {
|
|
11551
|
+
labels
|
|
11552
|
+
});
|
|
11553
|
+
};
|
|
11554
|
+
const renderPlot = () => {
|
|
11555
|
+
const areaspline = {
|
|
11556
|
+
lineWidth: 1,
|
|
11557
|
+
color: "#C8700B",
|
|
11558
|
+
pointPlacement: "on",
|
|
11559
|
+
marker: {
|
|
11560
|
+
enabled: false
|
|
11561
|
+
}
|
|
11562
|
+
};
|
|
11563
|
+
return {
|
|
11564
|
+
areaspline
|
|
11565
|
+
};
|
|
11566
|
+
};
|
|
11567
|
+
const renderSeries = () => {
|
|
11568
|
+
const series = props.series.map((value, key) => {
|
|
11569
|
+
var _props$colors2, _props$colors3;
|
|
11570
|
+
return {
|
|
11571
|
+
name: props.yAxisLabel[key],
|
|
11572
|
+
color: (_props$colors2 = props.colors) !== null && _props$colors2 !== void 0 && _props$colors2.length ? props.colors[key] : "#C8700B",
|
|
11573
|
+
data: value,
|
|
11574
|
+
fillColor: createAreaFillGradient((_props$colors3 = props.colors) !== null && _props$colors3 !== void 0 && _props$colors3.length ? props.colors[key] : "#C8700B")
|
|
11575
|
+
};
|
|
11576
|
+
});
|
|
11577
|
+
return series;
|
|
11578
|
+
};
|
|
11579
|
+
return {
|
|
11580
|
+
xAxis: renderXAxis(),
|
|
11581
|
+
yAxis: renderYAxis(),
|
|
11582
|
+
plotOptions: renderPlot(),
|
|
11583
|
+
series: renderSeries()
|
|
11584
|
+
};
|
|
11585
|
+
};
|
|
11375
11586
|
|
|
11376
11587
|
const Icons = _ref => {
|
|
11377
11588
|
let {
|
|
@@ -11591,8 +11802,12 @@ const UserMenuTarget = _ref => {
|
|
|
11591
11802
|
}, /*#__PURE__*/React.createElement(Group, {
|
|
11592
11803
|
gap: "sm"
|
|
11593
11804
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
11594
|
-
|
|
11595
|
-
|
|
11805
|
+
src: avatar,
|
|
11806
|
+
radius: 'md',
|
|
11807
|
+
key: name,
|
|
11808
|
+
name: name,
|
|
11809
|
+
color: "initials",
|
|
11810
|
+
bd: '0.5px solid adiba.2'
|
|
11596
11811
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
11597
11812
|
gap: 0,
|
|
11598
11813
|
align: "flex-start",
|
|
@@ -11910,11 +12125,17 @@ const AvatarLabelPanel = _ref2 => {
|
|
|
11910
12125
|
}), /*#__PURE__*/React.createElement(Group, {
|
|
11911
12126
|
align: "flex-start",
|
|
11912
12127
|
py: "sm"
|
|
11913
|
-
}, /*#__PURE__*/React.createElement(
|
|
11914
|
-
w: labelWidth
|
|
12128
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
12129
|
+
w: labelWidth,
|
|
12130
|
+
pl: 'md'
|
|
11915
12131
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
11916
12132
|
size: avatarSize,
|
|
11917
|
-
src: avatar
|
|
12133
|
+
src: avatar,
|
|
12134
|
+
radius: 'md',
|
|
12135
|
+
key: name,
|
|
12136
|
+
name: name,
|
|
12137
|
+
color: "initials",
|
|
12138
|
+
bd: '0.5px solid adiba.2'
|
|
11918
12139
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
11919
12140
|
py: 10,
|
|
11920
12141
|
gap: "md",
|
|
@@ -12277,7 +12498,7 @@ const ApplicationPanel = _ref => {
|
|
|
12277
12498
|
src: coverImage,
|
|
12278
12499
|
fallbackSrc: img$a
|
|
12279
12500
|
}), /*#__PURE__*/React.createElement(Overlay, {
|
|
12280
|
-
gradient: "linear-gradient(45deg, rgba(255,255,255,0.
|
|
12501
|
+
gradient: "linear-gradient(45deg, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0.05) 100%)"
|
|
12281
12502
|
}))), /*#__PURE__*/React.createElement(Card.Section, {
|
|
12282
12503
|
p: "md"
|
|
12283
12504
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -12640,4 +12861,4 @@ const File = _ref => {
|
|
|
12640
12861
|
}, /*#__PURE__*/React.createElement(Icons, rightsection === null || rightsection === void 0 ? void 0 : rightsection.icon)) : undefined)));
|
|
12641
12862
|
};
|
|
12642
12863
|
|
|
12643
|
-
export { ApplicationMenu, ApplicationPanel, AvatarLabelPanel, ConnectionPanel, DynamicLogo, DynamicShigaLogo, EqualizerColumn, File, Icons, LabelPanel, PageTitle, PaymentMethod, PaymentMethodAdd, SearchPanel, SideMenu, SimpleColumn, SimplePanel, SimpleTable, SimpleText, StackedColumn, SubscriptionPlans, TitleWithIndex, TitledPanel, UserMenu, theme };
|
|
12864
|
+
export { ApplicationMenu, ApplicationPanel, AvatarLabelPanel, ConnectionPanel, DynamicLogo, DynamicShigaLogo, EqualizerColumn, File, Icons, LabelPanel, PageTitle, PaymentMethod, PaymentMethodAdd, SearchPanel, SideMenu, SimpleArea, SimpleColumn, SimplePanel, SimpleTable, SimpleText, StackedColumn, SubscriptionPlans, TitleWithIndex, TitledPanel, UserMenu, theme };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import "@mantine/core/styles.css";
|
|
3
|
+
import { SimpleArea } from "./Area";
|
|
4
|
+
declare const _default: Meta<typeof SimpleArea>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const SimpleAreaChart: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Area.types").SimpleAreaChartProps>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface AreaChartConfig {
|
|
2
|
+
chart: object;
|
|
3
|
+
tooltip: object;
|
|
4
|
+
credits: object;
|
|
5
|
+
exporting: object;
|
|
6
|
+
title: object;
|
|
7
|
+
labels: object;
|
|
8
|
+
legend: object;
|
|
9
|
+
}
|
|
10
|
+
export interface AreaChartProps {
|
|
11
|
+
bgColor?: string;
|
|
12
|
+
plotBgColor?: string;
|
|
13
|
+
colors?: string[];
|
|
14
|
+
title?: string;
|
|
15
|
+
xAxisLabel: string[];
|
|
16
|
+
yAxisLabel: string[];
|
|
17
|
+
series: number[][];
|
|
18
|
+
withLegend: boolean;
|
|
19
|
+
withCrossHair: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface SimpleAreaChartProps {
|
|
22
|
+
bgColor?: string;
|
|
23
|
+
plotBgColor?: string;
|
|
24
|
+
color?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
xAxisLabel: string[];
|
|
27
|
+
yAxisLabel: string;
|
|
28
|
+
series: number[];
|
|
29
|
+
withLegend: boolean;
|
|
30
|
+
withCrossHair: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface ChartSeriesArea {
|
|
33
|
+
xAxis: {
|
|
34
|
+
categories: string[];
|
|
35
|
+
labels: object;
|
|
36
|
+
crosshair?: {
|
|
37
|
+
color: string;
|
|
38
|
+
width: number;
|
|
39
|
+
dashStyle: string;
|
|
40
|
+
snap: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
yAxis: {
|
|
44
|
+
allowDecimals: boolean;
|
|
45
|
+
title: object;
|
|
46
|
+
gridLineDashStyle?: string;
|
|
47
|
+
gridLineWidth?: number;
|
|
48
|
+
labels: object;
|
|
49
|
+
};
|
|
50
|
+
series: AreaChartSeries[];
|
|
51
|
+
plotOptions: object;
|
|
52
|
+
}
|
|
53
|
+
export interface AreaChartSeries {
|
|
54
|
+
name: string;
|
|
55
|
+
data: number[];
|
|
56
|
+
color: string;
|
|
57
|
+
enableMouseTracking?: boolean;
|
|
58
|
+
showInLegend?: boolean;
|
|
59
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { SimpleColumn, EqualizerColumn, StackedColumn, } from "./charts/column/Column";
|
|
2
|
+
export { SimpleArea } from "./charts/area/Area";
|
|
2
3
|
export { Icons } from "./general/icons/Icons";
|
|
3
4
|
export { DynamicLogo, DynamicShigaLogo } from "./general/logos/Logos";
|
|
4
5
|
export { ApplicationMenu } from "./menus/application/Application";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const computeBoundary: (items: number[]) => number;
|
|
2
|
+
export declare const computeDelta: (items: number[], boundary: number) => number[];
|
|
3
|
+
export declare const parseColorToRgb: (colorString: string) => {
|
|
4
|
+
r: number;
|
|
5
|
+
g: number;
|
|
6
|
+
b: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Creates a Highcharts linear gradient fillColor configuration for an Area/AreaSpline series.
|
|
10
|
+
* The gradient flows vertically from the baseColor (at the series line) down to the x-axis,
|
|
11
|
+
* fading to a transparent version of the baseColor.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} baseColor The primary color for the gradient (e.g., '#FF0000', 'rgb(0,128,255)').
|
|
14
|
+
* @param {object} [options] Configuration options for the gradient.
|
|
15
|
+
* @param {number} [options.startOpacity=0.7] The opacity of the `baseColor` at the top (near the series line, position 0).
|
|
16
|
+
* Value should be between 0 (fully transparent) and 1 (fully opaque).
|
|
17
|
+
* @param {number} [options.endOpacity=0.0] The opacity of the transparent end color at the bottom (near the x-axis, position 1).
|
|
18
|
+
* Value should be between 0 (fully transparent) and 1 (fully opaque).
|
|
19
|
+
* @returns {Highcharts.GradientColorObject} A Highcharts `fillColor` configuration object.
|
|
20
|
+
*/
|
|
21
|
+
export declare const createAreaFillGradient: (baseColor: string, options?: {
|
|
22
|
+
startOpacity?: number;
|
|
23
|
+
endOpacity?: number;
|
|
24
|
+
}) => Highcharts.GradientColorObject;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adiba-banking-cloud/backoffice",
|
|
3
3
|
"author": "TUROG Technologies",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.30",
|
|
5
5
|
"description": "An ADIBA component library for backoffice and dashboard applications",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "build/index.cjs.js",
|