@adiba-banking-cloud/backoffice 0.0.65 → 0.0.66
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.
|
@@ -13246,10 +13246,9 @@ const Drawer = _ref => {
|
|
|
13246
13246
|
}, page))));
|
|
13247
13247
|
};
|
|
13248
13248
|
|
|
13249
|
-
const _excluded$1 = ["
|
|
13249
|
+
const _excluded$1 = ["fields", "isEditable", "layout"];
|
|
13250
13250
|
const SimpleForm = _ref => {
|
|
13251
13251
|
let {
|
|
13252
|
-
component = "",
|
|
13253
13252
|
fields,
|
|
13254
13253
|
isEditable = true,
|
|
13255
13254
|
layout = []
|
|
@@ -13287,8 +13286,8 @@ const SimpleForm = _ref => {
|
|
|
13287
13286
|
if (typeof field === "function") {
|
|
13288
13287
|
return field();
|
|
13289
13288
|
}
|
|
13290
|
-
if (["Textarea", "TextInput", "PasswordInput", "NumberInput"].includes(component)) {
|
|
13291
|
-
const Component = components[component];
|
|
13289
|
+
if (["Textarea", "TextInput", "PasswordInput", "NumberInput"].includes(field.component)) {
|
|
13290
|
+
const Component = components[field.component];
|
|
13292
13291
|
return /*#__PURE__*/React.createElement(Component, _extends({}, field, inputProps));
|
|
13293
13292
|
}
|
|
13294
13293
|
return null;
|
|
@@ -13225,10 +13225,9 @@ const Drawer = _ref => {
|
|
|
13225
13225
|
}, page))));
|
|
13226
13226
|
};
|
|
13227
13227
|
|
|
13228
|
-
const _excluded$1 = ["
|
|
13228
|
+
const _excluded$1 = ["fields", "isEditable", "layout"];
|
|
13229
13229
|
const SimpleForm = _ref => {
|
|
13230
13230
|
let {
|
|
13231
|
-
component = "",
|
|
13232
13231
|
fields,
|
|
13233
13232
|
isEditable = true,
|
|
13234
13233
|
layout = []
|
|
@@ -13266,8 +13265,8 @@ const SimpleForm = _ref => {
|
|
|
13266
13265
|
if (typeof field === "function") {
|
|
13267
13266
|
return field();
|
|
13268
13267
|
}
|
|
13269
|
-
if (["Textarea", "TextInput", "PasswordInput", "NumberInput"].includes(component)) {
|
|
13270
|
-
const Component = components[component];
|
|
13268
|
+
if (["Textarea", "TextInput", "PasswordInput", "NumberInput"].includes(field.component)) {
|
|
13269
|
+
const Component = components[field.component];
|
|
13271
13270
|
return /*#__PURE__*/React.createElement(Component, _extends({}, field, inputProps));
|
|
13272
13271
|
}
|
|
13273
13272
|
return null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { NumberInputProps, PasswordInputProps, TextareaProps, TextInputProps } from "@mantine/core";
|
|
2
2
|
type FormInput = string | FormInputObject | Function;
|
|
3
|
-
export
|
|
3
|
+
export interface FormInputObject {
|
|
4
|
+
component: "Textarea" | "TextInput" | "PasswordInput" | "NumberInput";
|
|
5
|
+
field: TextInputProps | TextareaProps | PasswordInputProps | NumberInputProps;
|
|
6
|
+
}
|
|
4
7
|
export interface SimpleFormProps {
|
|
5
|
-
component?: "Textarea" | "TextInput" | "PasswordInput" | "NumberInput";
|
|
6
8
|
fields: FormInput[];
|
|
7
9
|
layout?: number[];
|
|
8
10
|
onSubmit?: (values: any) => void;
|
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.66",
|
|
5
5
|
"description": "An ADIBA component library for backoffice and dashboard applications",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "build/index.cjs.js",
|