@adiba-banking-cloud/backoffice 0.0.42 → 0.0.44
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 +48 -27
- package/build/index.esm.js/index.js +48 -27
- package/build/typings/components/modals/error/Error.d.ts +4 -0
- package/build/typings/shared/hooks/modals/useManagedModals.d.ts +4 -0
- package/build/typings/shared/hooks/modals/useModal.d.ts +2 -2
- package/build/typings/shared/hooks/modals/useModal.types.d.ts +8 -0
- package/package.json +1 -1
|
@@ -13063,19 +13063,38 @@ const File = _ref => {
|
|
|
13063
13063
|
}, /*#__PURE__*/React.createElement(Icons, rightsection === null || rightsection === void 0 ? void 0 : rightsection.icon)) : undefined)));
|
|
13064
13064
|
};
|
|
13065
13065
|
|
|
13066
|
+
var ErrorAnimation = "data:null;base64,UEsDBBQAAAAIAEC21lqNk9Q5gAAAALUAAAANAAAAbWFuaWZlc3QuanNvbo2NQQ7CIBBF7zJrqYCk2K56AU9gXIyFKoYyBkYT0/Tu4sZ1d/8n7+Ut8Pa5BErQg4Id3HzyGZly/YMjjsQc/P6/xKMMqtGNrCy++L4NTGFGrpEC/XmB4KpjtTsaPV6FVG0rjEUUne0mMaFDHKVCc/ipz4ifEzlfjUR5xgjrZf0CUEsDBBQAAAAIAEC21loISOBs8wYAAK1lAAA0AAAAYW5pbWF0aW9ucy83MmQ4NDJjYi0wMTY2LTQ3YWEtOTc5Zi1mYWRhYWMwMWE0MzAuanNvbu1cW2/iRhT+K2iebcsz4ytvvb+0UqVWfUHRik3IhoYAAnpZRfnv/c7MGMZgE5wGyrpHK8Zk7ufzOd98M2b9LP4UQ5FEWaRFIO5XYqiSQEyXYhgHYoGLkoH4Swy1wt8P7jp/Qpvbh8nt42y63qDd3d2daTBeryebtRiObgIxG3+erOj787Z4OsdVBWLzWQwxiunml4fxcjL4kSoPJM3hEW2exYKSsWn1KIYyjl8Cgcl5edrkYYZe3khmcSDTMkqD+AalKPB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AAAAAAAABtYW5pZmVzdC5qc29uUEsBAhQAFAAAAAgAQLbWWghI4GzzBgAArWUAADQAAAAAAAAAAAAAAAAAqwAAAGFuaW1hdGlvbnMvNzJkODQyY2ItMDE2Ni00N2FhLTk3OWYtZmFkYWFjMDFhNDMwLmpzb25QSwUGAAAAAAIAAgCdAAAA8AcAAAAA";
|
|
13067
|
+
|
|
13066
13068
|
const ErrorModal = _ref => {
|
|
13067
13069
|
let {
|
|
13068
13070
|
context,
|
|
13069
13071
|
id,
|
|
13070
13072
|
innerProps
|
|
13071
13073
|
} = _ref;
|
|
13072
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(core.
|
|
13073
|
-
|
|
13074
|
-
|
|
13074
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(core.Stack, {
|
|
13075
|
+
align: "center",
|
|
13076
|
+
py: "md"
|
|
13077
|
+
}, /*#__PURE__*/React.createElement(core.Center, {
|
|
13078
|
+
w: 170,
|
|
13079
|
+
h: 170
|
|
13080
|
+
}, /*#__PURE__*/React.createElement(dotlottieReact.DotLottieReact, {
|
|
13081
|
+
speed: 0.8,
|
|
13082
|
+
src: ErrorAnimation,
|
|
13083
|
+
loop: false,
|
|
13084
|
+
autoplay: true
|
|
13085
|
+
})), /*#__PURE__*/React.createElement(core.Text, {
|
|
13086
|
+
fw: 300,
|
|
13087
|
+
ta: "center"
|
|
13088
|
+
}, innerProps.modalBody)), /*#__PURE__*/React.createElement(core.Button, {
|
|
13089
|
+
radius: "xl",
|
|
13090
|
+
fw: 300,
|
|
13091
|
+
size: "md",
|
|
13075
13092
|
fullWidth: true,
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13093
|
+
onClick: () => {
|
|
13094
|
+
innerProps.button.onClick();
|
|
13095
|
+
context.closeAll();
|
|
13096
|
+
}
|
|
13097
|
+
}, innerProps.button.label));
|
|
13079
13098
|
};
|
|
13080
13099
|
|
|
13081
13100
|
const InfoModal = _ref => {
|
|
@@ -13116,11 +13135,9 @@ const SuccessModal = _ref => {
|
|
|
13116
13135
|
id,
|
|
13117
13136
|
innerProps
|
|
13118
13137
|
} = _ref;
|
|
13119
|
-
return /*#__PURE__*/React.createElement(core.Stack, {
|
|
13120
|
-
gap: "md",
|
|
13138
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(core.Stack, {
|
|
13121
13139
|
align: "center",
|
|
13122
|
-
|
|
13123
|
-
pb: "md"
|
|
13140
|
+
py: "md"
|
|
13124
13141
|
}, /*#__PURE__*/React.createElement(core.Center, {
|
|
13125
13142
|
w: 170,
|
|
13126
13143
|
h: 170
|
|
@@ -13130,8 +13147,9 @@ const SuccessModal = _ref => {
|
|
|
13130
13147
|
loop: false,
|
|
13131
13148
|
autoplay: true
|
|
13132
13149
|
})), /*#__PURE__*/React.createElement(core.Text, {
|
|
13150
|
+
fw: 300,
|
|
13133
13151
|
ta: "center"
|
|
13134
|
-
}, innerProps.modalBody), /*#__PURE__*/React.createElement(core.Button, {
|
|
13152
|
+
}, innerProps.modalBody)), /*#__PURE__*/React.createElement(core.Button, {
|
|
13135
13153
|
radius: "xl",
|
|
13136
13154
|
fw: 300,
|
|
13137
13155
|
size: "md",
|
|
@@ -13165,14 +13183,11 @@ const ConfirmModal = _ref => {
|
|
|
13165
13183
|
children
|
|
13166
13184
|
} = _ref;
|
|
13167
13185
|
return /*#__PURE__*/React.createElement(core.Stack, {
|
|
13168
|
-
gap: "md",
|
|
13169
13186
|
align: "center",
|
|
13170
|
-
|
|
13171
|
-
pb: "md"
|
|
13187
|
+
py: "md"
|
|
13172
13188
|
}, /*#__PURE__*/React.createElement(core.Center, {
|
|
13173
13189
|
w: 150,
|
|
13174
|
-
h: 150
|
|
13175
|
-
p: 25
|
|
13190
|
+
h: 150
|
|
13176
13191
|
}, /*#__PURE__*/React.createElement(dotlottieReact.DotLottieReact, {
|
|
13177
13192
|
speed: 0.8,
|
|
13178
13193
|
src: ConfirmAnimation,
|
|
@@ -13222,13 +13237,19 @@ const useModal = () => {
|
|
|
13222
13237
|
labels
|
|
13223
13238
|
}, rest));
|
|
13224
13239
|
};
|
|
13225
|
-
const ErrorModal =
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13240
|
+
const ErrorModal = _ref2 => {
|
|
13241
|
+
let {
|
|
13242
|
+
title,
|
|
13243
|
+
message
|
|
13244
|
+
} = _ref2;
|
|
13245
|
+
return modals.modals.openContextModal({
|
|
13246
|
+
modal: "ErrorModal",
|
|
13247
|
+
title: title,
|
|
13248
|
+
innerProps: {
|
|
13249
|
+
modalBody: message
|
|
13250
|
+
}
|
|
13251
|
+
});
|
|
13252
|
+
};
|
|
13232
13253
|
const InfoModal = () => modals.modals.openContextModal({
|
|
13233
13254
|
modal: "InfoModal",
|
|
13234
13255
|
title: "Info",
|
|
@@ -13236,11 +13257,11 @@ const useModal = () => {
|
|
|
13236
13257
|
modalBody: "This is an info modal"
|
|
13237
13258
|
}
|
|
13238
13259
|
});
|
|
13239
|
-
const SimpleModal =
|
|
13260
|
+
const SimpleModal = _ref3 => {
|
|
13240
13261
|
let {
|
|
13241
13262
|
title,
|
|
13242
13263
|
message
|
|
13243
|
-
} =
|
|
13264
|
+
} = _ref3;
|
|
13244
13265
|
return modals.modals.openContextModal({
|
|
13245
13266
|
modal: "SimpleModal",
|
|
13246
13267
|
title: title,
|
|
@@ -13249,7 +13270,7 @@ const useModal = () => {
|
|
|
13249
13270
|
}
|
|
13250
13271
|
});
|
|
13251
13272
|
};
|
|
13252
|
-
const SuccessModal =
|
|
13273
|
+
const SuccessModal = _ref4 => {
|
|
13253
13274
|
let {
|
|
13254
13275
|
title,
|
|
13255
13276
|
message = "This operation was successful!",
|
|
@@ -13257,7 +13278,7 @@ const useModal = () => {
|
|
|
13257
13278
|
label: "OK Thanks",
|
|
13258
13279
|
onClick: e => {}
|
|
13259
13280
|
}
|
|
13260
|
-
} =
|
|
13281
|
+
} = _ref4;
|
|
13261
13282
|
return modals.modals.openContextModal({
|
|
13262
13283
|
modal: "SuccessModal",
|
|
13263
13284
|
title: title,
|
|
@@ -13042,19 +13042,38 @@ const File = _ref => {
|
|
|
13042
13042
|
}, /*#__PURE__*/React.createElement(Icons, rightsection === null || rightsection === void 0 ? void 0 : rightsection.icon)) : undefined)));
|
|
13043
13043
|
};
|
|
13044
13044
|
|
|
13045
|
+
var ErrorAnimation = "data:null;base64,UEsDBBQAAAAIAEC21lqNk9Q5gAAAALUAAAANAAAAbWFuaWZlc3QuanNvbo2NQQ7CIBBF7zJrqYCk2K56AU9gXIyFKoYyBkYT0/Tu4sZ1d/8n7+Ut8Pa5BErQg4Id3HzyGZly/YMjjsQc/P6/xKMMqtGNrCy++L4NTGFGrpEC/XmB4KpjtTsaPV6FVG0rjEUUne0mMaFDHKVCc/ipz4ifEzlfjUR5xgjrZf0CUEsDBBQAAAAIAEC21loISOBs8wYAAK1lAAA0AAAAYW5pbWF0aW9ucy83MmQ4NDJjYi0wMTY2LTQ3YWEtOTc5Zi1mYWRhYWMwMWE0MzAuanNvbu1cW2/iRhT+K2iebcsz4ytvvb+0UqVWfUHRik3IhoYAAnpZRfnv/c7MGMZgE5wGyrpHK8Zk7ufzOd98M2b9LP4UQ5FEWaRFIO5XYqiSQEyXYhgHYoGLkoH4Swy1wt8P7jp/Qpvbh8nt42y63qDd3d2daTBeryebtRiObgIxG3+erOj787Z4OsdVBWLzWQwxiunml4fxcjL4kSoPJM3hEW2exYKSsWn1KIYyjl8Cgcl5edrkYYZe3khmcSDTMkqD+AalKPBL4yDUiS0xg3jtYrSzn5sXaojxUbSmyVkbaM7i0woTnG6sUZiWNUVMZsiuekQm9fgsppTxNw0bZVkemBS4oMFIBpImYYy0NaSpgdTV8HNQc44sES/Rwwf5IV4i16YYtykXnWCSmZnUSKZRjLtoLyiZGCQIBViF+eYvNMIekLaCvUXfzWbT5Xoy+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cAAAAA";
|
|
13046
|
+
|
|
13045
13047
|
const ErrorModal = _ref => {
|
|
13046
13048
|
let {
|
|
13047
13049
|
context,
|
|
13048
13050
|
id,
|
|
13049
13051
|
innerProps
|
|
13050
13052
|
} = _ref;
|
|
13051
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
13052
|
-
|
|
13053
|
-
|
|
13053
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
13054
|
+
align: "center",
|
|
13055
|
+
py: "md"
|
|
13056
|
+
}, /*#__PURE__*/React.createElement(Center, {
|
|
13057
|
+
w: 170,
|
|
13058
|
+
h: 170
|
|
13059
|
+
}, /*#__PURE__*/React.createElement(DotLottieReact, {
|
|
13060
|
+
speed: 0.8,
|
|
13061
|
+
src: ErrorAnimation,
|
|
13062
|
+
loop: false,
|
|
13063
|
+
autoplay: true
|
|
13064
|
+
})), /*#__PURE__*/React.createElement(Text, {
|
|
13065
|
+
fw: 300,
|
|
13066
|
+
ta: "center"
|
|
13067
|
+
}, innerProps.modalBody)), /*#__PURE__*/React.createElement(Button, {
|
|
13068
|
+
radius: "xl",
|
|
13069
|
+
fw: 300,
|
|
13070
|
+
size: "md",
|
|
13054
13071
|
fullWidth: true,
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13072
|
+
onClick: () => {
|
|
13073
|
+
innerProps.button.onClick();
|
|
13074
|
+
context.closeAll();
|
|
13075
|
+
}
|
|
13076
|
+
}, innerProps.button.label));
|
|
13058
13077
|
};
|
|
13059
13078
|
|
|
13060
13079
|
const InfoModal = _ref => {
|
|
@@ -13095,11 +13114,9 @@ const SuccessModal = _ref => {
|
|
|
13095
13114
|
id,
|
|
13096
13115
|
innerProps
|
|
13097
13116
|
} = _ref;
|
|
13098
|
-
return /*#__PURE__*/React.createElement(Stack, {
|
|
13099
|
-
gap: "md",
|
|
13117
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
13100
13118
|
align: "center",
|
|
13101
|
-
|
|
13102
|
-
pb: "md"
|
|
13119
|
+
py: "md"
|
|
13103
13120
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
13104
13121
|
w: 170,
|
|
13105
13122
|
h: 170
|
|
@@ -13109,8 +13126,9 @@ const SuccessModal = _ref => {
|
|
|
13109
13126
|
loop: false,
|
|
13110
13127
|
autoplay: true
|
|
13111
13128
|
})), /*#__PURE__*/React.createElement(Text, {
|
|
13129
|
+
fw: 300,
|
|
13112
13130
|
ta: "center"
|
|
13113
|
-
}, innerProps.modalBody), /*#__PURE__*/React.createElement(Button, {
|
|
13131
|
+
}, innerProps.modalBody)), /*#__PURE__*/React.createElement(Button, {
|
|
13114
13132
|
radius: "xl",
|
|
13115
13133
|
fw: 300,
|
|
13116
13134
|
size: "md",
|
|
@@ -13144,14 +13162,11 @@ const ConfirmModal = _ref => {
|
|
|
13144
13162
|
children
|
|
13145
13163
|
} = _ref;
|
|
13146
13164
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
13147
|
-
gap: "md",
|
|
13148
13165
|
align: "center",
|
|
13149
|
-
|
|
13150
|
-
pb: "md"
|
|
13166
|
+
py: "md"
|
|
13151
13167
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
13152
13168
|
w: 150,
|
|
13153
|
-
h: 150
|
|
13154
|
-
p: 25
|
|
13169
|
+
h: 150
|
|
13155
13170
|
}, /*#__PURE__*/React.createElement(DotLottieReact, {
|
|
13156
13171
|
speed: 0.8,
|
|
13157
13172
|
src: ConfirmAnimation,
|
|
@@ -13201,13 +13216,19 @@ const useModal = () => {
|
|
|
13201
13216
|
labels
|
|
13202
13217
|
}, rest));
|
|
13203
13218
|
};
|
|
13204
|
-
const ErrorModal =
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13219
|
+
const ErrorModal = _ref2 => {
|
|
13220
|
+
let {
|
|
13221
|
+
title,
|
|
13222
|
+
message
|
|
13223
|
+
} = _ref2;
|
|
13224
|
+
return modals.openContextModal({
|
|
13225
|
+
modal: "ErrorModal",
|
|
13226
|
+
title: title,
|
|
13227
|
+
innerProps: {
|
|
13228
|
+
modalBody: message
|
|
13229
|
+
}
|
|
13230
|
+
});
|
|
13231
|
+
};
|
|
13211
13232
|
const InfoModal = () => modals.openContextModal({
|
|
13212
13233
|
modal: "InfoModal",
|
|
13213
13234
|
title: "Info",
|
|
@@ -13215,11 +13236,11 @@ const useModal = () => {
|
|
|
13215
13236
|
modalBody: "This is an info modal"
|
|
13216
13237
|
}
|
|
13217
13238
|
});
|
|
13218
|
-
const SimpleModal =
|
|
13239
|
+
const SimpleModal = _ref3 => {
|
|
13219
13240
|
let {
|
|
13220
13241
|
title,
|
|
13221
13242
|
message
|
|
13222
|
-
} =
|
|
13243
|
+
} = _ref3;
|
|
13223
13244
|
return modals.openContextModal({
|
|
13224
13245
|
modal: "SimpleModal",
|
|
13225
13246
|
title: title,
|
|
@@ -13228,7 +13249,7 @@ const useModal = () => {
|
|
|
13228
13249
|
}
|
|
13229
13250
|
});
|
|
13230
13251
|
};
|
|
13231
|
-
const SuccessModal =
|
|
13252
|
+
const SuccessModal = _ref4 => {
|
|
13232
13253
|
let {
|
|
13233
13254
|
title,
|
|
13234
13255
|
message = "This operation was successful!",
|
|
@@ -13236,7 +13257,7 @@ const useModal = () => {
|
|
|
13236
13257
|
label: "OK Thanks",
|
|
13237
13258
|
onClick: e => {}
|
|
13238
13259
|
}
|
|
13239
|
-
} =
|
|
13260
|
+
} = _ref4;
|
|
13240
13261
|
return modals.openContextModal({
|
|
13241
13262
|
modal: "SuccessModal",
|
|
13242
13263
|
title: title,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ContextModalProps } from "@mantine/modals";
|
|
2
2
|
export declare const ErrorModal: ({ context, id, innerProps, }: ContextModalProps<{
|
|
3
3
|
modalBody: string;
|
|
4
|
+
button: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
4
8
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const useManagedModals: () => {
|
|
2
2
|
ErrorModal: ({ context, id, innerProps, }: import("@mantine/modals").ContextModalProps<{
|
|
3
3
|
modalBody: string;
|
|
4
|
+
button: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
4
8
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
InfoModal: ({ context, id, innerProps, }: import("@mantine/modals").ContextModalProps<{
|
|
6
10
|
modalBody: string;
|
|
@@ -2,9 +2,9 @@ import { OpenConfirmModal } from "@mantine/modals/lib/context";
|
|
|
2
2
|
import { SimpleModalProps, SuccessModalProps } from "./useModal.types";
|
|
3
3
|
export declare const useModal: () => {
|
|
4
4
|
ConfirmationModal: ({ title, children, onConfirm, labels, ...rest }: OpenConfirmModal) => string;
|
|
5
|
-
ErrorModal: () => string;
|
|
5
|
+
ErrorModal: ({ title, message }: SimpleModalProps) => string;
|
|
6
6
|
InfoModal: () => string;
|
|
7
7
|
SimpleModal: ({ title, message }: SimpleModalProps) => string;
|
|
8
|
-
SuccessModal: ({ title, message, button }: SuccessModalProps) => string;
|
|
8
|
+
SuccessModal: ({ title, message, button, }: SuccessModalProps) => string;
|
|
9
9
|
TwoFactorVerificationModal: () => string;
|
|
10
10
|
};
|
|
@@ -6,6 +6,14 @@ export type SuccessModalProps = {
|
|
|
6
6
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
+
export type ErrorModalProps = {
|
|
10
|
+
title?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
button: {
|
|
13
|
+
label?: string;
|
|
14
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
9
17
|
export type SimpleModalProps = {
|
|
10
18
|
title?: string;
|
|
11
19
|
message?: React.ReactNode;
|
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.44",
|
|
5
5
|
"description": "An ADIBA component library for backoffice and dashboard applications",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "build/index.cjs.js",
|