@bigbinary/neeto-fields-frontend 1.3.21 → 1.3.23
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/README.md +38 -0
- package/dist/index.cjs.js +620 -3986
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +679 -4043
- package/dist/index.js.map +1 -1
- package/package.json +79 -76
- package/types.d.ts +11 -0
package/README.md
CHANGED
|
@@ -520,6 +520,42 @@ const buildColumnDataForFields = (fields, onFieldValueUpdateSuccess) =>
|
|
|
520
520
|
}));
|
|
521
521
|
```
|
|
522
522
|
|
|
523
|
+
### 6. `FieldDeleteAlert`
|
|
524
|
+
|
|
525
|
+
<div align="center">
|
|
526
|
+
<img src="https://github.com/bigbinary/neeto-fields-nano/assets/35305344/6518b206-58f3-4375-bc68-7134ad68c168" alt="Field delete alert" width="500"/>
|
|
527
|
+
</div>
|
|
528
|
+
|
|
529
|
+
The `FieldDeleteAlert` component handles delete operation on fields. It accepts the following props:
|
|
530
|
+
|
|
531
|
+
#### Props:
|
|
532
|
+
|
|
533
|
+
1. `selectedField`: The field that needs to be deleted.
|
|
534
|
+
2. `ownerId`: The ID of the owner in case the owner is not an organization.
|
|
535
|
+
3. `resourceTypeName`: The type of resource.
|
|
536
|
+
4. `isDeleteAlertOpen`: Boolean state which specifies whether the alert is open.
|
|
537
|
+
5. `isDeleting`: Boolean state indicating whether the field is being deleted.
|
|
538
|
+
6. `handleDelete`: The callback function responsible for deleting the specified field.
|
|
539
|
+
7. `handleAlertClose`: The callback function to be executed on closing the alert.
|
|
540
|
+
|
|
541
|
+
#### Usage:
|
|
542
|
+
|
|
543
|
+
```jsx
|
|
544
|
+
import { FieldDeleteAlert } from "@biginary/neeto-fields-frontend";
|
|
545
|
+
|
|
546
|
+
const [isDeleteAlertOpen, setIsDeleteAlertOpen] = useState(false);
|
|
547
|
+
|
|
548
|
+
<FieldDeleteAlert
|
|
549
|
+
selectedField={field}
|
|
550
|
+
ownerId={formId}
|
|
551
|
+
resourceTypeName="submission"
|
|
552
|
+
isDeleteAlertOpen={isDeleteAlertOpen}
|
|
553
|
+
isDeleting={isDeleting}
|
|
554
|
+
handleDelete={handleDelete}
|
|
555
|
+
handleAlertClose={() => setIsDeleteAlertOpen(false)}
|
|
556
|
+
/>;
|
|
557
|
+
```
|
|
558
|
+
|
|
523
559
|
## Functions
|
|
524
560
|
|
|
525
561
|
The package exports the `neetoFieldsUtils`, which contains two utility
|
|
@@ -722,6 +758,8 @@ https://www.youtube.com/watch?v=QBiYGP0Rhe0
|
|
|
722
758
|
```shell
|
|
723
759
|
yarn release
|
|
724
760
|
```
|
|
761
|
+
### Instructions for development
|
|
762
|
+
Check the [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) for step-by-step instructions to develop the frontend package.
|
|
725
763
|
|
|
726
764
|
### Setup dummy host app
|
|
727
765
|
|