@adiba-banking-cloud/backoffice 0.2.1 → 0.2.3
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-D-qDlLOI.js → heatmap-QyWScAOZ.js} +1 -1
- package/build/index.cjs.js/{index-CWyl7EKZ.js → index-BHsXwqJB.js} +64 -16
- package/build/index.cjs.js/index.js +3 -1
- package/build/index.esm.js/{heatmap-CtdCSRhG.js → heatmap-CZ2o0bqY.js} +1 -1
- package/build/index.esm.js/{index-D7Cza3cb.js → index-BlLQ1b_6.js} +63 -17
- package/build/index.esm.js/index.js +1 -1
- package/build/typings/index.d.ts +1 -0
- package/build/typings/shared/utils/index.d.ts +1 -0
- package/build/typings/shared/utils/stringHelpers.d.ts +2 -0
- package/package.json +1 -1
|
@@ -12172,7 +12172,7 @@ const initChart$1 = props => {
|
|
|
12172
12172
|
}
|
|
12173
12173
|
|
|
12174
12174
|
// Fallback: use dynamic import (async, but will work in Vite/Storybook)
|
|
12175
|
-
Promise.resolve().then(function () { return require('./heatmap-
|
|
12175
|
+
Promise.resolve().then(function () { return require('./heatmap-QyWScAOZ.js'); }).then(function (n) { return n.heatmap; }).then(heatmapModule => {
|
|
12176
12176
|
const moduleFn = typeof heatmapModule === "function" ? heatmapModule : heatmapModule?.default || heatmapModule;
|
|
12177
12177
|
if (typeof moduleFn === "function") {
|
|
12178
12178
|
moduleFn(Highcharts);
|
|
@@ -13735,19 +13735,32 @@ const SimpleTable = _ref => {
|
|
|
13735
13735
|
actionFn,
|
|
13736
13736
|
isStriped
|
|
13737
13737
|
} = _ref;
|
|
13738
|
-
columns
|
|
13739
|
-
const
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13738
|
+
// Memoize the final columns array to avoid mutations on every render
|
|
13739
|
+
const finalColumns = React.useMemo(() => {
|
|
13740
|
+
// Create a new array to avoid mutating the original
|
|
13741
|
+
const sortedColumns = [...columns].sort((a, b) => a.order - b.order);
|
|
13742
|
+
const indexColumn = {
|
|
13743
|
+
order: -99,
|
|
13744
|
+
id: "index",
|
|
13745
|
+
label: "Id"
|
|
13746
|
+
};
|
|
13747
|
+
const actionColumn = {
|
|
13748
|
+
order: 99999,
|
|
13749
|
+
id: "action",
|
|
13750
|
+
label: ""
|
|
13751
|
+
};
|
|
13752
|
+
|
|
13753
|
+
// Build final array without mutations
|
|
13754
|
+
const result = [];
|
|
13755
|
+
if (withIndex) {
|
|
13756
|
+
result.push(indexColumn);
|
|
13757
|
+
}
|
|
13758
|
+
result.push(...sortedColumns);
|
|
13759
|
+
if (withAction && actionFn) {
|
|
13760
|
+
result.push(actionColumn);
|
|
13761
|
+
}
|
|
13762
|
+
return result;
|
|
13763
|
+
}, [columns, withIndex, withAction, actionFn]);
|
|
13751
13764
|
const isStripedProps = {
|
|
13752
13765
|
striped: "even",
|
|
13753
13766
|
highlightOnHover: true,
|
|
@@ -13756,7 +13769,7 @@ const SimpleTable = _ref => {
|
|
|
13756
13769
|
};
|
|
13757
13770
|
return /*#__PURE__*/React.createElement(core.Table, isStriped && isStripedProps, /*#__PURE__*/React.createElement(core.Table.Thead, null, /*#__PURE__*/React.createElement(core.Table.Tr, {
|
|
13758
13771
|
bg: isStriped ? "gray.1" : "transparent"
|
|
13759
|
-
},
|
|
13772
|
+
}, finalColumns.map((column, index) => {
|
|
13760
13773
|
return /*#__PURE__*/React.createElement(SimpleHeader, _extends({
|
|
13761
13774
|
key: `column-${index}`
|
|
13762
13775
|
}, column));
|
|
@@ -13764,7 +13777,7 @@ const SimpleTable = _ref => {
|
|
|
13764
13777
|
return /*#__PURE__*/React.createElement(SimpleBody, {
|
|
13765
13778
|
key: index,
|
|
13766
13779
|
row,
|
|
13767
|
-
columns,
|
|
13780
|
+
columns: finalColumns,
|
|
13768
13781
|
withAction,
|
|
13769
13782
|
withIndex,
|
|
13770
13783
|
actionFn,
|
|
@@ -14735,6 +14748,39 @@ function withProviders(Component) {
|
|
|
14735
14748
|
return WrappedComponent;
|
|
14736
14749
|
}
|
|
14737
14750
|
|
|
14751
|
+
/**
|
|
14752
|
+
* String utility functions for text manipulation
|
|
14753
|
+
*/
|
|
14754
|
+
const StringHelpers = {
|
|
14755
|
+
/**
|
|
14756
|
+
* Extracts text between curly braces from a string
|
|
14757
|
+
* @param input - Input string that may contain text in braces
|
|
14758
|
+
* @returns The text between braces, or empty string if not found
|
|
14759
|
+
* @example
|
|
14760
|
+
* extractBetweenBraces("Hello {world}") // returns "world"
|
|
14761
|
+
* extractBetweenBraces("No braces") // returns ""
|
|
14762
|
+
*/
|
|
14763
|
+
extractBetweenBraces: input => {
|
|
14764
|
+
const regex = /^[^{]*\{([^}]*)\}[^{]*$/;
|
|
14765
|
+
const match = input.match(regex);
|
|
14766
|
+
return match ? match[1] : "";
|
|
14767
|
+
},
|
|
14768
|
+
/**
|
|
14769
|
+
* Removes text within curly braces from a string
|
|
14770
|
+
* @param input - Input string that may contain text in braces
|
|
14771
|
+
* @returns The string with braces and their content removed, trimmed
|
|
14772
|
+
* @example
|
|
14773
|
+
* extractOutsideBraces("Hello {world}") // returns "Hello"
|
|
14774
|
+
* extractOutsideBraces("No braces") // returns "No braces"
|
|
14775
|
+
*/
|
|
14776
|
+
extractOutsideBraces: input => {
|
|
14777
|
+
const regex = /\{[^}]*\}/g;
|
|
14778
|
+
return input.replace(regex, "").trim();
|
|
14779
|
+
}
|
|
14780
|
+
};
|
|
14781
|
+
const extractBetweenBraces = StringHelpers.extractBetweenBraces;
|
|
14782
|
+
const extractOutsideBraces = StringHelpers.extractOutsideBraces;
|
|
14783
|
+
|
|
14738
14784
|
exports.ApplicationMenu = ApplicationMenu;
|
|
14739
14785
|
exports.ApplicationPanel = ApplicationPanel;
|
|
14740
14786
|
exports.AvatarLabelPanel = AvatarLabelPanel;
|
|
@@ -14781,6 +14827,8 @@ exports.TwoFactorModal = TwoFactorModal;
|
|
|
14781
14827
|
exports.UserMenu = UserMenu;
|
|
14782
14828
|
exports.apiClient = apiClient;
|
|
14783
14829
|
exports.createApiClient = createApiClient;
|
|
14830
|
+
exports.extractBetweenBraces = extractBetweenBraces;
|
|
14831
|
+
exports.extractOutsideBraces = extractOutsideBraces;
|
|
14784
14832
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
14785
14833
|
exports.theme = theme;
|
|
14786
14834
|
exports.useManagedModals = useManagedModals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHsXwqJB.js');
|
|
4
4
|
require('@mantine/modals');
|
|
5
5
|
require('react');
|
|
6
6
|
require('@mantine/core');
|
|
@@ -74,6 +74,8 @@ exports.TwoFactorModal = index.TwoFactorModal;
|
|
|
74
74
|
exports.UserMenu = index.UserMenu;
|
|
75
75
|
exports.apiClient = index.apiClient;
|
|
76
76
|
exports.createApiClient = index.createApiClient;
|
|
77
|
+
exports.extractBetweenBraces = index.extractBetweenBraces;
|
|
78
|
+
exports.extractOutsideBraces = index.extractOutsideBraces;
|
|
77
79
|
exports.theme = index.theme;
|
|
78
80
|
exports.useManagedModals = index.useManagedModals;
|
|
79
81
|
exports.useModal = index.useModal;
|
|
@@ -12151,7 +12151,7 @@ const initChart$1 = props => {
|
|
|
12151
12151
|
}
|
|
12152
12152
|
|
|
12153
12153
|
// Fallback: use dynamic import (async, but will work in Vite/Storybook)
|
|
12154
|
-
import('./heatmap-
|
|
12154
|
+
import('./heatmap-CZ2o0bqY.js').then(function (n) { return n.h; }).then(heatmapModule => {
|
|
12155
12155
|
const moduleFn = typeof heatmapModule === "function" ? heatmapModule : heatmapModule?.default || heatmapModule;
|
|
12156
12156
|
if (typeof moduleFn === "function") {
|
|
12157
12157
|
moduleFn(Highcharts);
|
|
@@ -13714,19 +13714,32 @@ const SimpleTable = _ref => {
|
|
|
13714
13714
|
actionFn,
|
|
13715
13715
|
isStriped
|
|
13716
13716
|
} = _ref;
|
|
13717
|
-
columns
|
|
13718
|
-
const
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13717
|
+
// Memoize the final columns array to avoid mutations on every render
|
|
13718
|
+
const finalColumns = useMemo(() => {
|
|
13719
|
+
// Create a new array to avoid mutating the original
|
|
13720
|
+
const sortedColumns = [...columns].sort((a, b) => a.order - b.order);
|
|
13721
|
+
const indexColumn = {
|
|
13722
|
+
order: -99,
|
|
13723
|
+
id: "index",
|
|
13724
|
+
label: "Id"
|
|
13725
|
+
};
|
|
13726
|
+
const actionColumn = {
|
|
13727
|
+
order: 99999,
|
|
13728
|
+
id: "action",
|
|
13729
|
+
label: ""
|
|
13730
|
+
};
|
|
13731
|
+
|
|
13732
|
+
// Build final array without mutations
|
|
13733
|
+
const result = [];
|
|
13734
|
+
if (withIndex) {
|
|
13735
|
+
result.push(indexColumn);
|
|
13736
|
+
}
|
|
13737
|
+
result.push(...sortedColumns);
|
|
13738
|
+
if (withAction && actionFn) {
|
|
13739
|
+
result.push(actionColumn);
|
|
13740
|
+
}
|
|
13741
|
+
return result;
|
|
13742
|
+
}, [columns, withIndex, withAction, actionFn]);
|
|
13730
13743
|
const isStripedProps = {
|
|
13731
13744
|
striped: "even",
|
|
13732
13745
|
highlightOnHover: true,
|
|
@@ -13735,7 +13748,7 @@ const SimpleTable = _ref => {
|
|
|
13735
13748
|
};
|
|
13736
13749
|
return /*#__PURE__*/React__default.createElement(Table, isStriped && isStripedProps, /*#__PURE__*/React__default.createElement(Table.Thead, null, /*#__PURE__*/React__default.createElement(Table.Tr, {
|
|
13737
13750
|
bg: isStriped ? "gray.1" : "transparent"
|
|
13738
|
-
},
|
|
13751
|
+
}, finalColumns.map((column, index) => {
|
|
13739
13752
|
return /*#__PURE__*/React__default.createElement(SimpleHeader, _extends({
|
|
13740
13753
|
key: `column-${index}`
|
|
13741
13754
|
}, column));
|
|
@@ -13743,7 +13756,7 @@ const SimpleTable = _ref => {
|
|
|
13743
13756
|
return /*#__PURE__*/React__default.createElement(SimpleBody, {
|
|
13744
13757
|
key: index,
|
|
13745
13758
|
row,
|
|
13746
|
-
columns,
|
|
13759
|
+
columns: finalColumns,
|
|
13747
13760
|
withAction,
|
|
13748
13761
|
withIndex,
|
|
13749
13762
|
actionFn,
|
|
@@ -14714,4 +14727,37 @@ function withProviders(Component) {
|
|
|
14714
14727
|
return WrappedComponent;
|
|
14715
14728
|
}
|
|
14716
14729
|
|
|
14717
|
-
|
|
14730
|
+
/**
|
|
14731
|
+
* String utility functions for text manipulation
|
|
14732
|
+
*/
|
|
14733
|
+
const StringHelpers = {
|
|
14734
|
+
/**
|
|
14735
|
+
* Extracts text between curly braces from a string
|
|
14736
|
+
* @param input - Input string that may contain text in braces
|
|
14737
|
+
* @returns The text between braces, or empty string if not found
|
|
14738
|
+
* @example
|
|
14739
|
+
* extractBetweenBraces("Hello {world}") // returns "world"
|
|
14740
|
+
* extractBetweenBraces("No braces") // returns ""
|
|
14741
|
+
*/
|
|
14742
|
+
extractBetweenBraces: input => {
|
|
14743
|
+
const regex = /^[^{]*\{([^}]*)\}[^{]*$/;
|
|
14744
|
+
const match = input.match(regex);
|
|
14745
|
+
return match ? match[1] : "";
|
|
14746
|
+
},
|
|
14747
|
+
/**
|
|
14748
|
+
* Removes text within curly braces from a string
|
|
14749
|
+
* @param input - Input string that may contain text in braces
|
|
14750
|
+
* @returns The string with braces and their content removed, trimmed
|
|
14751
|
+
* @example
|
|
14752
|
+
* extractOutsideBraces("Hello {world}") // returns "Hello"
|
|
14753
|
+
* extractOutsideBraces("No braces") // returns "No braces"
|
|
14754
|
+
*/
|
|
14755
|
+
extractOutsideBraces: input => {
|
|
14756
|
+
const regex = /\{[^}]*\}/g;
|
|
14757
|
+
return input.replace(regex, "").trim();
|
|
14758
|
+
}
|
|
14759
|
+
};
|
|
14760
|
+
const extractBetweenBraces = StringHelpers.extractBetweenBraces;
|
|
14761
|
+
const extractOutsideBraces = StringHelpers.extractOutsideBraces;
|
|
14762
|
+
|
|
14763
|
+
export { extractOutsideBraces as $, ApplicationMenu as A, BasicHeatmap as B, CalendarHeatmap as C, DonutChart as D, EqualizerColumn as E, File as F, SimpleForm as G, MaskedTilePanel as H, InterpolatedHeatmap as I, TilePanel as J, useModal as K, LabelPanel as L, MultiAxisArea as M, useManagedModals as N, useUrlFilters as O, PageTitle as P, DEFAULT_PAGE_SIZE as Q, MAX_PAGE_SIZE as R, SimpleColumn as S, TitledPanel as T, UserMenu as U, DEFAULT_API_TIMEOUT as V, createApiClient as W, apiClient as X, ModalContentWrapper as Y, withProviders as Z, extractBetweenBraces as _, StackedColumn as a, SimpleArea as b, StackedArea as c, Icons as d, DynamicLogo as e, DynamicShigaLogo as f, getDefaultExportFromCjs as g, SideMenu as h, SimplePanel as i, SearchPanel as j, AvatarLabelPanel as k, SimpleText as l, TitleWithIndex as m, ConnectionPanel as n, ApplicationPanel as o, SubscriptionPlans as p, PaymentMethod as q, PaymentMethodAdd as r, SimpleTable as s, theme as t, ErrorModal as u, InfoModal as v, SimpleModal as w, SuccessModal as x, TwoFactorModal as y, Drawer as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApplicationMenu, o as ApplicationPanel, k as AvatarLabelPanel, B as BasicHeatmap, C as CalendarHeatmap, n as ConnectionPanel, V as DEFAULT_API_TIMEOUT, Q as DEFAULT_PAGE_SIZE, D as DonutChart, z as Drawer, e as DynamicLogo, f as DynamicShigaLogo, E as EqualizerColumn, u as ErrorModal, F as File, d as Icons, v as InfoModal, I as InterpolatedHeatmap, L as LabelPanel, R as MAX_PAGE_SIZE, H as MaskedTilePanel, Y as ModalContentWrapper, M as MultiAxisArea, P as PageTitle, q as PaymentMethod, r as PaymentMethodAdd, j as SearchPanel, h as SideMenu, b as SimpleArea, S as SimpleColumn, G as SimpleForm, w as SimpleModal, i as SimplePanel, s as SimpleTable, l as SimpleText, c as StackedArea, a as StackedColumn, p as SubscriptionPlans, x as SuccessModal, J as TilePanel, m as TitleWithIndex, T as TitledPanel, y as TwoFactorModal, U as UserMenu, X as apiClient, W as createApiClient, t as theme, N as useManagedModals, K as useModal, O as useUrlFilters, Z as withProviders } from './index-
|
|
1
|
+
export { A as ApplicationMenu, o as ApplicationPanel, k as AvatarLabelPanel, B as BasicHeatmap, C as CalendarHeatmap, n as ConnectionPanel, V as DEFAULT_API_TIMEOUT, Q as DEFAULT_PAGE_SIZE, D as DonutChart, z as Drawer, e as DynamicLogo, f as DynamicShigaLogo, E as EqualizerColumn, u as ErrorModal, F as File, d as Icons, v as InfoModal, I as InterpolatedHeatmap, L as LabelPanel, R as MAX_PAGE_SIZE, H as MaskedTilePanel, Y as ModalContentWrapper, M as MultiAxisArea, P as PageTitle, q as PaymentMethod, r as PaymentMethodAdd, j as SearchPanel, h as SideMenu, b as SimpleArea, S as SimpleColumn, G as SimpleForm, w as SimpleModal, i as SimplePanel, s as SimpleTable, l as SimpleText, c as StackedArea, a as StackedColumn, p as SubscriptionPlans, x as SuccessModal, J as TilePanel, m as TitleWithIndex, T as TitledPanel, y as TwoFactorModal, U as UserMenu, X as apiClient, W as createApiClient, _ as extractBetweenBraces, $ as extractOutsideBraces, t as theme, N as useManagedModals, K as useModal, O as useUrlFilters, Z as withProviders } from './index-BlLQ1b_6.js';
|
|
2
2
|
import '@mantine/modals';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@mantine/core';
|
package/build/typings/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./stringHelpers";
|
package/package.json
CHANGED