@adiba-banking-cloud/backoffice 0.2.15 → 0.2.17

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C4ThDka1.js');
3
+ var index = require('./index-GLMbtNOW.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  m.forEach(function (e) {
@@ -12169,7 +12169,7 @@ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t
12169
12169
  }
12170
12170
 
12171
12171
  // Fallback: use dynamic import (async, but will work in Vite/Storybook)
12172
- Promise.resolve().then(function () { return require('./heatmap-DV0YYVRl.js'); }).then(function (n) { return n.heatmap; }).then(heatmapModule => {
12172
+ Promise.resolve().then(function () { return require('./heatmap-ycJ4lVJy.js'); }).then(function (n) { return n.heatmap; }).then(heatmapModule => {
12173
12173
  const moduleFn = typeof heatmapModule === "function" ? heatmapModule : (heatmapModule === null || heatmapModule === void 0 ? void 0 : heatmapModule.default) || heatmapModule;
12174
12174
  if (typeof moduleFn === "function") {
12175
12175
  moduleFn(Highcharts);
@@ -14729,7 +14729,7 @@ const Drawer = _ref => {
14729
14729
  }, page))));
14730
14730
  };
14731
14731
 
14732
- const _excluded$2 = ["fields", "isEditable", "layout", "hasSubmit", "hasReset", "buttonSize"];
14732
+ const _excluded$2 = ["fields", "isEditable", "layout", "hasSubmit", "hasReset", "buttonSize", "submitButtonIcon", "cancelButtonIcon", "submitButtonLabel", "cancelButtonLabel"];
14733
14733
  function ownKeys$3(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; }
14734
14734
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14735
14735
  const SimpleForm = _ref => {
@@ -14739,7 +14739,11 @@ const SimpleForm = _ref => {
14739
14739
  layout = [],
14740
14740
  hasSubmit,
14741
14741
  hasReset,
14742
- buttonSize = "lg"
14742
+ buttonSize = "lg",
14743
+ submitButtonIcon = true,
14744
+ cancelButtonIcon = true,
14745
+ submitButtonLabel = "Save",
14746
+ cancelButtonLabel = "Cancel"
14743
14747
  } = _ref,
14744
14748
  rest = _objectWithoutProperties(_ref, _excluded$2);
14745
14749
  const components = {
@@ -14824,7 +14828,11 @@ const SimpleForm = _ref => {
14824
14828
  }), /*#__PURE__*/React.createElement(FormButtons, {
14825
14829
  hasSubmit,
14826
14830
  hasReset,
14827
- buttonSize
14831
+ buttonSize,
14832
+ submitButtonLabel,
14833
+ cancelButtonLabel,
14834
+ submitButtonIcon,
14835
+ cancelButtonIcon
14828
14836
  })));
14829
14837
  };
14830
14838
  const santize = field => {
@@ -14847,7 +14855,11 @@ const FormButtons = _ref3 => {
14847
14855
  let {
14848
14856
  hasSubmit = false,
14849
14857
  hasReset = false,
14850
- buttonSize
14858
+ buttonSize,
14859
+ submitButtonLabel = "Save",
14860
+ cancelButtonLabel = "Cancel",
14861
+ submitButtonIcon = true,
14862
+ cancelButtonIcon = true
14851
14863
  } = _ref3;
14852
14864
  return /*#__PURE__*/React.createElement(core.Group, {
14853
14865
  mt: "lg",
@@ -14856,11 +14868,12 @@ const FormButtons = _ref3 => {
14856
14868
  gap: 10,
14857
14869
  w: "100%",
14858
14870
  display: hasSubmit || hasReset ? "flex" : "none"
14859
- }, /*#__PURE__*/React.createElement(core.Button, {
14871
+ }, /*#__PURE__*/React.createElement(core.Button, _extends({}, cancelButtonIcon && {
14860
14872
  leftSection: /*#__PURE__*/React.createElement(Icons, {
14861
14873
  name: "CloseCircle",
14862
14874
  size: 16
14863
- }),
14875
+ })
14876
+ }, {
14864
14877
  variant: "filled",
14865
14878
  color: "red",
14866
14879
  size: buttonSize,
@@ -14871,15 +14884,16 @@ const FormButtons = _ref3 => {
14871
14884
  display: hasReset ? "block" : "none"
14872
14885
  },
14873
14886
  flex: 1
14874
- }, /*#__PURE__*/React.createElement(core.Text, {
14887
+ }), /*#__PURE__*/React.createElement(core.Text, {
14875
14888
  fw: 400,
14876
14889
  fz: "sm",
14877
14890
  c: "white"
14878
- }, "Cancel")), /*#__PURE__*/React.createElement(core.Button, {
14891
+ }, cancelButtonLabel)), /*#__PURE__*/React.createElement(core.Button, _extends({}, submitButtonIcon && {
14879
14892
  leftSection: /*#__PURE__*/React.createElement(Icons, {
14880
14893
  name: "TickCircle",
14881
14894
  size: 16
14882
- }),
14895
+ })
14896
+ }, {
14883
14897
  variant: "filled",
14884
14898
  color: "adiba.5",
14885
14899
  size: buttonSize,
@@ -14890,11 +14904,11 @@ const FormButtons = _ref3 => {
14890
14904
  display: hasSubmit ? "block" : "none"
14891
14905
  },
14892
14906
  flex: 1
14893
- }, /*#__PURE__*/React.createElement(core.Text, {
14907
+ }), /*#__PURE__*/React.createElement(core.Text, {
14894
14908
  fw: 300,
14895
14909
  fz: "sm",
14896
14910
  c: "white"
14897
- }, "Save")));
14911
+ }, submitButtonLabel)));
14898
14912
  };
14899
14913
 
14900
14914
  const MaskedTilePanel = _ref => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C4ThDka1.js');
3
+ var index = require('./index-GLMbtNOW.js');
4
4
  require('@babel/runtime/helpers/objectWithoutProperties');
5
5
  require('@babel/runtime/helpers/defineProperty');
6
6
  require('@mantine/modals');
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from './index-p43mak97.js';
1
+ import { g as getDefaultExportFromCjs } from './index-Bz7ccczO.js';
2
2
 
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -12148,7 +12148,7 @@ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t
12148
12148
  }
12149
12149
 
12150
12150
  // Fallback: use dynamic import (async, but will work in Vite/Storybook)
12151
- import('./heatmap-CXJh19wA.js').then(function (n) { return n.h; }).then(heatmapModule => {
12151
+ import('./heatmap-Cg02CARF.js').then(function (n) { return n.h; }).then(heatmapModule => {
12152
12152
  const moduleFn = typeof heatmapModule === "function" ? heatmapModule : (heatmapModule === null || heatmapModule === void 0 ? void 0 : heatmapModule.default) || heatmapModule;
12153
12153
  if (typeof moduleFn === "function") {
12154
12154
  moduleFn(Highcharts);
@@ -14708,7 +14708,7 @@ const Drawer = _ref => {
14708
14708
  }, page))));
14709
14709
  };
14710
14710
 
14711
- const _excluded$2 = ["fields", "isEditable", "layout", "hasSubmit", "hasReset", "buttonSize"];
14711
+ const _excluded$2 = ["fields", "isEditable", "layout", "hasSubmit", "hasReset", "buttonSize", "submitButtonIcon", "cancelButtonIcon", "submitButtonLabel", "cancelButtonLabel"];
14712
14712
  function ownKeys$3(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; }
14713
14713
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14714
14714
  const SimpleForm = _ref => {
@@ -14718,7 +14718,11 @@ const SimpleForm = _ref => {
14718
14718
  layout = [],
14719
14719
  hasSubmit,
14720
14720
  hasReset,
14721
- buttonSize = "lg"
14721
+ buttonSize = "lg",
14722
+ submitButtonIcon = true,
14723
+ cancelButtonIcon = true,
14724
+ submitButtonLabel = "Save",
14725
+ cancelButtonLabel = "Cancel"
14722
14726
  } = _ref,
14723
14727
  rest = _objectWithoutProperties(_ref, _excluded$2);
14724
14728
  const components = {
@@ -14803,7 +14807,11 @@ const SimpleForm = _ref => {
14803
14807
  }), /*#__PURE__*/React__default.createElement(FormButtons, {
14804
14808
  hasSubmit,
14805
14809
  hasReset,
14806
- buttonSize
14810
+ buttonSize,
14811
+ submitButtonLabel,
14812
+ cancelButtonLabel,
14813
+ submitButtonIcon,
14814
+ cancelButtonIcon
14807
14815
  })));
14808
14816
  };
14809
14817
  const santize = field => {
@@ -14826,7 +14834,11 @@ const FormButtons = _ref3 => {
14826
14834
  let {
14827
14835
  hasSubmit = false,
14828
14836
  hasReset = false,
14829
- buttonSize
14837
+ buttonSize,
14838
+ submitButtonLabel = "Save",
14839
+ cancelButtonLabel = "Cancel",
14840
+ submitButtonIcon = true,
14841
+ cancelButtonIcon = true
14830
14842
  } = _ref3;
14831
14843
  return /*#__PURE__*/React__default.createElement(Group, {
14832
14844
  mt: "lg",
@@ -14835,11 +14847,12 @@ const FormButtons = _ref3 => {
14835
14847
  gap: 10,
14836
14848
  w: "100%",
14837
14849
  display: hasSubmit || hasReset ? "flex" : "none"
14838
- }, /*#__PURE__*/React__default.createElement(Button, {
14850
+ }, /*#__PURE__*/React__default.createElement(Button, _extends({}, cancelButtonIcon && {
14839
14851
  leftSection: /*#__PURE__*/React__default.createElement(Icons, {
14840
14852
  name: "CloseCircle",
14841
14853
  size: 16
14842
- }),
14854
+ })
14855
+ }, {
14843
14856
  variant: "filled",
14844
14857
  color: "red",
14845
14858
  size: buttonSize,
@@ -14850,15 +14863,16 @@ const FormButtons = _ref3 => {
14850
14863
  display: hasReset ? "block" : "none"
14851
14864
  },
14852
14865
  flex: 1
14853
- }, /*#__PURE__*/React__default.createElement(Text, {
14866
+ }), /*#__PURE__*/React__default.createElement(Text, {
14854
14867
  fw: 400,
14855
14868
  fz: "sm",
14856
14869
  c: "white"
14857
- }, "Cancel")), /*#__PURE__*/React__default.createElement(Button, {
14870
+ }, cancelButtonLabel)), /*#__PURE__*/React__default.createElement(Button, _extends({}, submitButtonIcon && {
14858
14871
  leftSection: /*#__PURE__*/React__default.createElement(Icons, {
14859
14872
  name: "TickCircle",
14860
14873
  size: 16
14861
- }),
14874
+ })
14875
+ }, {
14862
14876
  variant: "filled",
14863
14877
  color: "adiba.5",
14864
14878
  size: buttonSize,
@@ -14869,11 +14883,11 @@ const FormButtons = _ref3 => {
14869
14883
  display: hasSubmit ? "block" : "none"
14870
14884
  },
14871
14885
  flex: 1
14872
- }, /*#__PURE__*/React__default.createElement(Text, {
14886
+ }), /*#__PURE__*/React__default.createElement(Text, {
14873
14887
  fw: 300,
14874
14888
  fz: "sm",
14875
14889
  c: "white"
14876
- }, "Save")));
14890
+ }, submitButtonLabel)));
14877
14891
  };
14878
14892
 
14879
14893
  const MaskedTilePanel = _ref => {
@@ -1,4 +1,4 @@
1
- export { A as ApplicationMenu, p as ApplicationPanel, k as AvatarLabelPanel, B as BasicHeatmap, C as CalendarHeatmap, o as ConnectionPanel, u as CreditCard, a2 as DEFAULT_API_TIMEOUT, a0 as DEFAULT_PAGE_SIZE, v as DetailCard, D as DonutChart, Q as Drawer, e as DynamicLogo, f as DynamicShigaLogo, E as EqualizerColumn, G as ErrorModal, F as File, d as Icons, r as InfoGrid, H as InfoModal, I as InterpolatedHeatmap, L as LabelPanel, O as LoadingModal, a1 as MAX_PAGE_SIZE, V as MaskedTilePanel, X as MerchantCard, a5 as ModalContentWrapper, M as MultiAxisArea, m as PageTitle, w as PaymentMethod, x as PaymentMethodAdd, P as PieChart, j as SearchPanel, h as SideMenu, b as SimpleArea, S as SimpleColumn, R as SimpleForm, J as SimpleModal, i as SimplePanel, y as SimpleTable, l as SimpleText, c as StackedArea, a as StackedColumn, t as StatusAlert, q as SubscriptionPlans, K as SuccessModal, Y as TableStateView, W as TilePanel, n as TitleWithIndex, T as TitledPanel, N as TwoFactorModal, U as UserMenu, s as UserProfileCard, a4 as apiClient, a3 as createApiClient, a7 as extractBetweenBraces, a8 as extractOutsideBraces, z as theme, _ as useManagedModals, Z as useModal, $ as useUrlFilters, a6 as withProviders } from './index-p43mak97.js';
1
+ export { A as ApplicationMenu, p as ApplicationPanel, k as AvatarLabelPanel, B as BasicHeatmap, C as CalendarHeatmap, o as ConnectionPanel, u as CreditCard, a2 as DEFAULT_API_TIMEOUT, a0 as DEFAULT_PAGE_SIZE, v as DetailCard, D as DonutChart, Q as Drawer, e as DynamicLogo, f as DynamicShigaLogo, E as EqualizerColumn, G as ErrorModal, F as File, d as Icons, r as InfoGrid, H as InfoModal, I as InterpolatedHeatmap, L as LabelPanel, O as LoadingModal, a1 as MAX_PAGE_SIZE, V as MaskedTilePanel, X as MerchantCard, a5 as ModalContentWrapper, M as MultiAxisArea, m as PageTitle, w as PaymentMethod, x as PaymentMethodAdd, P as PieChart, j as SearchPanel, h as SideMenu, b as SimpleArea, S as SimpleColumn, R as SimpleForm, J as SimpleModal, i as SimplePanel, y as SimpleTable, l as SimpleText, c as StackedArea, a as StackedColumn, t as StatusAlert, q as SubscriptionPlans, K as SuccessModal, Y as TableStateView, W as TilePanel, n as TitleWithIndex, T as TitledPanel, N as TwoFactorModal, U as UserMenu, s as UserProfileCard, a4 as apiClient, a3 as createApiClient, a7 as extractBetweenBraces, a8 as extractOutsideBraces, z as theme, _ as useManagedModals, Z as useModal, $ as useUrlFilters, a6 as withProviders } from './index-Bz7ccczO.js';
2
2
  import '@babel/runtime/helpers/objectWithoutProperties';
3
3
  import '@babel/runtime/helpers/defineProperty';
4
4
  import '@mantine/modals';
@@ -8,6 +8,10 @@ export interface SimpleFormProps {
8
8
  fields: FormInput[];
9
9
  layout?: number[];
10
10
  buttonSize?: "sm" | "md" | "lg";
11
+ submitButtonLabel?: string;
12
+ cancelButtonLabel?: string;
13
+ submitButtonIcon?: boolean;
14
+ cancelButtonIcon?: boolean;
11
15
  onSubmit?: (values: any) => void;
12
16
  onCancel?: () => void;
13
17
  hasReset?: boolean;
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.2.15",
4
+ "version": "0.2.17",
5
5
  "description": "An ADIBA component library for backoffice and dashboard applications",
6
6
  "license": "ISC",
7
7
  "main": "build/index.cjs.js",