@adiba-banking-cloud/backoffice 0.0.34 → 0.0.35

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,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
+ var modals = require('@mantine/modals');
4
+ var React = require('react');
5
+ var core = require('@mantine/core');
3
6
  var _extends = require('@babel/runtime/helpers/extends');
4
7
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
- var React = require('react');
6
8
  var HighchartsReact = require('highcharts-react-official');
7
9
  var HighchartsRounded = require('highcharts-rounded-corners');
8
10
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
9
11
  var IconSax = require('iconsax-react');
10
- var core = require('@mantine/core');
11
12
  var reactRouterDom = require('react-router-dom');
12
13
  var hooks = require('@mantine/hooks');
13
14
  require('@fontsource/poppins/100.css');
@@ -13132,6 +13133,69 @@ const TwoFactorVerificationModal = _ref => {
13132
13133
  }, "Close modal"));
13133
13134
  };
13134
13135
 
13136
+ const useModal = () => {
13137
+ const ConfirmationModal = () => modals.modals.openConfirmModal({
13138
+ title: 'Confirmation',
13139
+ children: 'This is a confirmation modal',
13140
+ onConfirm: () => {
13141
+ console.log('Confirmed');
13142
+ }
13143
+ });
13144
+ const ErrorModal = () => modals.modals.openContextModal({
13145
+ modal: 'ErrorModal',
13146
+ title: 'Error',
13147
+ innerProps: {
13148
+ modalBody: 'This is an error modal'
13149
+ }
13150
+ });
13151
+ const InfoModal = () => modals.modals.openContextModal({
13152
+ modal: 'InfoModal',
13153
+ title: 'Info',
13154
+ innerProps: {
13155
+ modalBody: 'This is an info modal'
13156
+ }
13157
+ });
13158
+ const SimpleModal = () => modals.modals.openContextModal({
13159
+ modal: 'SimpleModal',
13160
+ title: 'Simple',
13161
+ innerProps: {
13162
+ modalBody: 'This is a simple modal'
13163
+ }
13164
+ });
13165
+ const SuccessModal = () => modals.modals.openContextModal({
13166
+ modal: 'SuccessModal',
13167
+ title: 'Success',
13168
+ innerProps: {
13169
+ modalBody: 'This is a success modal'
13170
+ }
13171
+ });
13172
+ const TwoFactorVerificationModal = () => modals.modals.openContextModal({
13173
+ modal: 'TwoFactorVerificationModal',
13174
+ title: 'Two Factor Verification',
13175
+ innerProps: {
13176
+ modalBody: 'This is a two factor verification modal'
13177
+ }
13178
+ });
13179
+ return {
13180
+ ConfirmationModal,
13181
+ ErrorModal,
13182
+ InfoModal,
13183
+ SimpleModal,
13184
+ SuccessModal,
13185
+ TwoFactorVerificationModal
13186
+ };
13187
+ };
13188
+
13189
+ const useManagedModals = () => {
13190
+ return {
13191
+ ErrorModal: ErrorModal,
13192
+ InfoModal: InfoModal,
13193
+ SimpleModal: SimpleModal,
13194
+ SuccessModal: SuccessModal,
13195
+ TwoFactorVerificationModal: TwoFactorVerificationModal
13196
+ };
13197
+ };
13198
+
13135
13199
  exports.ApplicationMenu = ApplicationMenu;
13136
13200
  exports.ApplicationPanel = ApplicationPanel;
13137
13201
  exports.AvatarLabelPanel = AvatarLabelPanel;
@@ -13164,3 +13228,5 @@ exports.TitledPanel = TitledPanel;
13164
13228
  exports.TwoFactorVerificationModal = TwoFactorVerificationModal;
13165
13229
  exports.UserMenu = UserMenu;
13166
13230
  exports.theme = theme;
13231
+ exports.useManagedModals = useManagedModals;
13232
+ exports.useModal = useModal;
@@ -1,11 +1,12 @@
1
+ import { modals } from '@mantine/modals';
2
+ import React, { useRef, useMemo, useEffect } from 'react';
3
+ import { Center, Image, Space, Popover, Button, Stack, Divider, Group, Text, Menu, Avatar, Badge, NavLink, Card, TextInput, ActionIcon, Box, Title, createTheme, SegmentedControl, Breadcrumbs, Anchor, ColorSwatch, AspectRatio, Overlay, rem, SimpleGrid, Indicator, Table } from '@mantine/core';
1
4
  import _extends from '@babel/runtime/helpers/extends';
2
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
- import React, { useRef, useMemo, useEffect } from 'react';
4
6
  import HighchartsReact from 'highcharts-react-official';
5
7
  import HighchartsRounded from 'highcharts-rounded-corners';
6
8
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
7
9
  import * as IconSax from 'iconsax-react';
8
- import { Center, Image, Space, Popover, Button, Stack, Divider, Group, Text, Menu, Avatar, Badge, NavLink, Card, TextInput, ActionIcon, Box, Title, createTheme, SegmentedControl, Breadcrumbs, Anchor, ColorSwatch, AspectRatio, Overlay, rem, SimpleGrid, Indicator, Table } from '@mantine/core';
9
10
  import { Link } from 'react-router-dom';
10
11
  import { useDisclosure } from '@mantine/hooks';
11
12
  import '@fontsource/poppins/100.css';
@@ -13111,4 +13112,67 @@ const TwoFactorVerificationModal = _ref => {
13111
13112
  }, "Close modal"));
13112
13113
  };
13113
13114
 
13114
- export { ApplicationMenu, ApplicationPanel, AvatarLabelPanel, ConnectionPanel, DonutChart, DynamicLogo, DynamicShigaLogo, EqualizerColumn, ErrorModal, File, Icons, InfoModal, LabelPanel, PageTitle, PaymentMethod, PaymentMethodAdd, SearchPanel, SideMenu, SimpleArea, SimpleColumn, SimpleModal, SimplePanel, SimpleTable, SimpleText, StackedColumn, SubscriptionPlans, SuccessModal, TitleWithIndex, TitledPanel, TwoFactorVerificationModal, UserMenu, theme };
13115
+ const useModal = () => {
13116
+ const ConfirmationModal = () => modals.openConfirmModal({
13117
+ title: 'Confirmation',
13118
+ children: 'This is a confirmation modal',
13119
+ onConfirm: () => {
13120
+ console.log('Confirmed');
13121
+ }
13122
+ });
13123
+ const ErrorModal = () => modals.openContextModal({
13124
+ modal: 'ErrorModal',
13125
+ title: 'Error',
13126
+ innerProps: {
13127
+ modalBody: 'This is an error modal'
13128
+ }
13129
+ });
13130
+ const InfoModal = () => modals.openContextModal({
13131
+ modal: 'InfoModal',
13132
+ title: 'Info',
13133
+ innerProps: {
13134
+ modalBody: 'This is an info modal'
13135
+ }
13136
+ });
13137
+ const SimpleModal = () => modals.openContextModal({
13138
+ modal: 'SimpleModal',
13139
+ title: 'Simple',
13140
+ innerProps: {
13141
+ modalBody: 'This is a simple modal'
13142
+ }
13143
+ });
13144
+ const SuccessModal = () => modals.openContextModal({
13145
+ modal: 'SuccessModal',
13146
+ title: 'Success',
13147
+ innerProps: {
13148
+ modalBody: 'This is a success modal'
13149
+ }
13150
+ });
13151
+ const TwoFactorVerificationModal = () => modals.openContextModal({
13152
+ modal: 'TwoFactorVerificationModal',
13153
+ title: 'Two Factor Verification',
13154
+ innerProps: {
13155
+ modalBody: 'This is a two factor verification modal'
13156
+ }
13157
+ });
13158
+ return {
13159
+ ConfirmationModal,
13160
+ ErrorModal,
13161
+ InfoModal,
13162
+ SimpleModal,
13163
+ SuccessModal,
13164
+ TwoFactorVerificationModal
13165
+ };
13166
+ };
13167
+
13168
+ const useManagedModals = () => {
13169
+ return {
13170
+ ErrorModal: ErrorModal,
13171
+ InfoModal: InfoModal,
13172
+ SimpleModal: SimpleModal,
13173
+ SuccessModal: SuccessModal,
13174
+ TwoFactorVerificationModal: TwoFactorVerificationModal
13175
+ };
13176
+ };
13177
+
13178
+ export { ApplicationMenu, ApplicationPanel, AvatarLabelPanel, ConnectionPanel, DonutChart, DynamicLogo, DynamicShigaLogo, EqualizerColumn, ErrorModal, File, Icons, InfoModal, LabelPanel, PageTitle, PaymentMethod, PaymentMethodAdd, SearchPanel, SideMenu, SimpleArea, SimpleColumn, SimpleModal, SimplePanel, SimpleTable, SimpleText, StackedColumn, SubscriptionPlans, SuccessModal, TitleWithIndex, TitledPanel, TwoFactorVerificationModal, UserMenu, theme, useManagedModals, useModal };
@@ -1 +1,3 @@
1
1
  export * from "./components";
2
+ export * from "./shared/hooks/modals/useModal";
3
+ export * from "./shared/hooks/modals/useManagedModals";
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.34",
4
+ "version": "0.0.35",
5
5
  "description": "An ADIBA component library for backoffice and dashboard applications",
6
6
  "license": "ISC",
7
7
  "main": "build/index.cjs.js",