@adiba-banking-cloud/backoffice 0.0.106 → 0.2.0
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/{heatmap-BJmii0aO.js → heatmap-c3tdleHx.js} +1 -1
- package/build/index.cjs.js/{index-BLpjQkzt.js → index-QwR6crYB.js} +129 -1
- package/build/index.cjs.js/index.js +10 -1
- package/build/index.esm.js/{heatmap-yNnNxsAY.js → heatmap-Dfb5-pNh.js} +1 -1
- package/build/index.esm.js/{index-CWjYoFnK.js → index-9HtrJaD9.js} +403 -281
- package/build/index.esm.js/index.js +4 -1
- package/build/typings/index.d.ts +2 -0
- package/build/typings/shared/api/client.d.ts +24 -0
- package/build/typings/shared/api/constants.d.ts +12 -0
- package/build/typings/shared/api/index.d.ts +3 -0
- package/build/typings/shared/api/types.d.ts +16 -0
- package/build/typings/shared/components/ModalContentWrapper.d.ts +9 -0
- package/build/typings/shared/components/index.d.ts +1 -0
- package/package.json +5 -1
|
@@ -19,6 +19,9 @@ require('@fontsource/poppins/500.css');
|
|
|
19
19
|
require('@fontsource/poppins/600.css');
|
|
20
20
|
require('@fontsource/poppins/700.css');
|
|
21
21
|
require('@fontsource/poppins/800.css');
|
|
22
|
+
var axios = require('axios');
|
|
23
|
+
var dates = require('@mantine/dates');
|
|
24
|
+
require('@mantine/dates/styles.css');
|
|
22
25
|
|
|
23
26
|
function _interopNamespaceDefault(e) {
|
|
24
27
|
var n = Object.create(null);
|
|
@@ -52,6 +55,7 @@ function _mergeNamespaces(n, m) {
|
|
|
52
55
|
return Object.freeze(n);
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
55
59
|
var IconSax__namespace = /*#__PURE__*/_interopNamespaceDefault(IconSax);
|
|
56
60
|
|
|
57
61
|
function getDefaultExportFromCjs (x) {
|
|
@@ -12166,7 +12170,7 @@ const initChart$1 = props => {
|
|
|
12166
12170
|
}
|
|
12167
12171
|
|
|
12168
12172
|
// Fallback: use dynamic import (async, but will work in Vite/Storybook)
|
|
12169
|
-
Promise.resolve().then(function () { return require('./heatmap-
|
|
12173
|
+
Promise.resolve().then(function () { return require('./heatmap-c3tdleHx.js'); }).then(function (n) { return n.heatmap; }).then(heatmapModule => {
|
|
12170
12174
|
const moduleFn = typeof heatmapModule === "function" ? heatmapModule : heatmapModule?.default || heatmapModule;
|
|
12171
12175
|
if (typeof moduleFn === "function") {
|
|
12172
12176
|
moduleFn(Highcharts);
|
|
@@ -14426,12 +14430,132 @@ const useManagedModals = () => {
|
|
|
14426
14430
|
};
|
|
14427
14431
|
};
|
|
14428
14432
|
|
|
14433
|
+
/**
|
|
14434
|
+
* Default pagination page size
|
|
14435
|
+
*/
|
|
14436
|
+
const DEFAULT_PAGE_SIZE = 10;
|
|
14437
|
+
|
|
14438
|
+
/**
|
|
14439
|
+
* Maximum allowed page size for pagination
|
|
14440
|
+
*/
|
|
14441
|
+
const MAX_PAGE_SIZE = 100;
|
|
14442
|
+
|
|
14443
|
+
/**
|
|
14444
|
+
* Default API request timeout in milliseconds
|
|
14445
|
+
*/
|
|
14446
|
+
const DEFAULT_API_TIMEOUT = 30000;
|
|
14447
|
+
|
|
14448
|
+
class ApiClient {
|
|
14449
|
+
constructor(config) {
|
|
14450
|
+
const {
|
|
14451
|
+
baseURL = "/",
|
|
14452
|
+
timeout = DEFAULT_API_TIMEOUT,
|
|
14453
|
+
headers = {
|
|
14454
|
+
"Content-Type": "application/json"
|
|
14455
|
+
}
|
|
14456
|
+
} = config;
|
|
14457
|
+
this.client = axios.create({
|
|
14458
|
+
baseURL,
|
|
14459
|
+
timeout,
|
|
14460
|
+
headers
|
|
14461
|
+
});
|
|
14462
|
+
this.setupInterceptors();
|
|
14463
|
+
}
|
|
14464
|
+
setupInterceptors() {
|
|
14465
|
+
// Request interceptor
|
|
14466
|
+
this.client.interceptors.request.use(config => {
|
|
14467
|
+
// Add auth token, logging, etc. if needed
|
|
14468
|
+
return config;
|
|
14469
|
+
}, error => Promise.reject(error));
|
|
14470
|
+
|
|
14471
|
+
// Response interceptor
|
|
14472
|
+
this.client.interceptors.response.use(response => {
|
|
14473
|
+
return response;
|
|
14474
|
+
}, error => {
|
|
14475
|
+
// Handle errors globally
|
|
14476
|
+
return Promise.reject(this.handleError(error));
|
|
14477
|
+
});
|
|
14478
|
+
}
|
|
14479
|
+
handleError(error) {
|
|
14480
|
+
if (error && typeof error === "object" && "response" in error) {
|
|
14481
|
+
const axiosError = error;
|
|
14482
|
+
if (axiosError.response) {
|
|
14483
|
+
return {
|
|
14484
|
+
status: "error",
|
|
14485
|
+
code: axiosError.response.status,
|
|
14486
|
+
message: axiosError.response.data?.message || "An error occurred",
|
|
14487
|
+
error: axiosError.response.data?.error || axiosError.message || "An unexpected error occurred"
|
|
14488
|
+
};
|
|
14489
|
+
}
|
|
14490
|
+
}
|
|
14491
|
+
const errorMessage = error instanceof Error ? error.message : "An unexpected error occurred";
|
|
14492
|
+
return {
|
|
14493
|
+
status: "error",
|
|
14494
|
+
code: 500,
|
|
14495
|
+
message: "Network error",
|
|
14496
|
+
error: errorMessage
|
|
14497
|
+
};
|
|
14498
|
+
}
|
|
14499
|
+
async get(url, config) {
|
|
14500
|
+
const response = await this.client.get(url, config);
|
|
14501
|
+
return response.data;
|
|
14502
|
+
}
|
|
14503
|
+
async post(url, data, config) {
|
|
14504
|
+
const response = await this.client.post(url, data, config);
|
|
14505
|
+
return response.data;
|
|
14506
|
+
}
|
|
14507
|
+
async put(url, data, config) {
|
|
14508
|
+
const response = await this.client.put(url, data, config);
|
|
14509
|
+
return response.data;
|
|
14510
|
+
}
|
|
14511
|
+
async delete(url, config) {
|
|
14512
|
+
const response = await this.client.delete(url, config);
|
|
14513
|
+
return response.data;
|
|
14514
|
+
}
|
|
14515
|
+
}
|
|
14516
|
+
|
|
14517
|
+
/**
|
|
14518
|
+
* Factory function to create a configured API client instance
|
|
14519
|
+
* @param config - Configuration options for the API client
|
|
14520
|
+
* @returns Configured ApiClient instance
|
|
14521
|
+
*/
|
|
14522
|
+
function createApiClient() {
|
|
14523
|
+
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14524
|
+
return new ApiClient(config);
|
|
14525
|
+
}
|
|
14526
|
+
|
|
14527
|
+
/**
|
|
14528
|
+
* Default API client instance with default configuration
|
|
14529
|
+
* For custom configuration, use createApiClient() instead
|
|
14530
|
+
*/
|
|
14531
|
+
const apiClient = createApiClient();
|
|
14532
|
+
|
|
14533
|
+
/**
|
|
14534
|
+
* Wrapper component for modal content to ensure MantineProvider context is available
|
|
14535
|
+
* This is needed because modals rendered by the appshell may not have access to the pilet's provider
|
|
14536
|
+
*/
|
|
14537
|
+
const ModalContentWrapper = _ref => {
|
|
14538
|
+
let {
|
|
14539
|
+
children
|
|
14540
|
+
} = _ref;
|
|
14541
|
+
return /*#__PURE__*/React__namespace.createElement(core.MantineProvider, {
|
|
14542
|
+
theme: theme
|
|
14543
|
+
}, /*#__PURE__*/React__namespace.createElement(dates.DatesProvider, {
|
|
14544
|
+
settings: {
|
|
14545
|
+
locale: "en",
|
|
14546
|
+
timezone: "UTC"
|
|
14547
|
+
}
|
|
14548
|
+
}, children));
|
|
14549
|
+
};
|
|
14550
|
+
|
|
14429
14551
|
exports.ApplicationMenu = ApplicationMenu;
|
|
14430
14552
|
exports.ApplicationPanel = ApplicationPanel;
|
|
14431
14553
|
exports.AvatarLabelPanel = AvatarLabelPanel;
|
|
14432
14554
|
exports.BasicHeatmap = BasicHeatmap;
|
|
14433
14555
|
exports.CalendarHeatmap = CalendarHeatmap;
|
|
14434
14556
|
exports.ConnectionPanel = ConnectionPanel;
|
|
14557
|
+
exports.DEFAULT_API_TIMEOUT = DEFAULT_API_TIMEOUT;
|
|
14558
|
+
exports.DEFAULT_PAGE_SIZE = DEFAULT_PAGE_SIZE;
|
|
14435
14559
|
exports.DonutChart = DonutChart;
|
|
14436
14560
|
exports.Drawer = Drawer;
|
|
14437
14561
|
exports.DynamicLogo = DynamicLogo;
|
|
@@ -14443,7 +14567,9 @@ exports.Icons = Icons;
|
|
|
14443
14567
|
exports.InfoModal = InfoModal;
|
|
14444
14568
|
exports.InterpolatedHeatmap = InterpolatedHeatmap;
|
|
14445
14569
|
exports.LabelPanel = LabelPanel;
|
|
14570
|
+
exports.MAX_PAGE_SIZE = MAX_PAGE_SIZE;
|
|
14446
14571
|
exports.MaskedTilePanel = MaskedTilePanel;
|
|
14572
|
+
exports.ModalContentWrapper = ModalContentWrapper;
|
|
14447
14573
|
exports.MultiAxisArea = MultiAxisArea;
|
|
14448
14574
|
exports.PageTitle = PageTitle;
|
|
14449
14575
|
exports.PaymentMethod = PaymentMethod;
|
|
@@ -14466,6 +14592,8 @@ exports.TitleWithIndex = TitleWithIndex;
|
|
|
14466
14592
|
exports.TitledPanel = TitledPanel;
|
|
14467
14593
|
exports.TwoFactorModal = TwoFactorModal;
|
|
14468
14594
|
exports.UserMenu = UserMenu;
|
|
14595
|
+
exports.apiClient = apiClient;
|
|
14596
|
+
exports.createApiClient = createApiClient;
|
|
14469
14597
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
14470
14598
|
exports.theme = theme;
|
|
14471
14599
|
exports.useManagedModals = useManagedModals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-QwR6crYB.js');
|
|
4
4
|
require('@mantine/modals');
|
|
5
5
|
require('react');
|
|
6
6
|
require('@mantine/core');
|
|
@@ -20,6 +20,9 @@ require('@fontsource/poppins/500.css');
|
|
|
20
20
|
require('@fontsource/poppins/600.css');
|
|
21
21
|
require('@fontsource/poppins/700.css');
|
|
22
22
|
require('@fontsource/poppins/800.css');
|
|
23
|
+
require('axios');
|
|
24
|
+
require('@mantine/dates');
|
|
25
|
+
require('@mantine/dates/styles.css');
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
|
|
@@ -29,6 +32,8 @@ exports.AvatarLabelPanel = index.AvatarLabelPanel;
|
|
|
29
32
|
exports.BasicHeatmap = index.BasicHeatmap;
|
|
30
33
|
exports.CalendarHeatmap = index.CalendarHeatmap;
|
|
31
34
|
exports.ConnectionPanel = index.ConnectionPanel;
|
|
35
|
+
exports.DEFAULT_API_TIMEOUT = index.DEFAULT_API_TIMEOUT;
|
|
36
|
+
exports.DEFAULT_PAGE_SIZE = index.DEFAULT_PAGE_SIZE;
|
|
32
37
|
exports.DonutChart = index.DonutChart;
|
|
33
38
|
exports.Drawer = index.Drawer;
|
|
34
39
|
exports.DynamicLogo = index.DynamicLogo;
|
|
@@ -40,7 +45,9 @@ exports.Icons = index.Icons;
|
|
|
40
45
|
exports.InfoModal = index.InfoModal;
|
|
41
46
|
exports.InterpolatedHeatmap = index.InterpolatedHeatmap;
|
|
42
47
|
exports.LabelPanel = index.LabelPanel;
|
|
48
|
+
exports.MAX_PAGE_SIZE = index.MAX_PAGE_SIZE;
|
|
43
49
|
exports.MaskedTilePanel = index.MaskedTilePanel;
|
|
50
|
+
exports.ModalContentWrapper = index.ModalContentWrapper;
|
|
44
51
|
exports.MultiAxisArea = index.MultiAxisArea;
|
|
45
52
|
exports.PageTitle = index.PageTitle;
|
|
46
53
|
exports.PaymentMethod = index.PaymentMethod;
|
|
@@ -63,6 +70,8 @@ exports.TitleWithIndex = index.TitleWithIndex;
|
|
|
63
70
|
exports.TitledPanel = index.TitledPanel;
|
|
64
71
|
exports.TwoFactorModal = index.TwoFactorModal;
|
|
65
72
|
exports.UserMenu = index.UserMenu;
|
|
73
|
+
exports.apiClient = index.apiClient;
|
|
74
|
+
exports.createApiClient = index.createApiClient;
|
|
66
75
|
exports.theme = index.theme;
|
|
67
76
|
exports.useManagedModals = index.useManagedModals;
|
|
68
77
|
exports.useModal = index.useModal;
|