treege 0.19.0 → 0.20.0

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,5 +1,6 @@
1
1
  interface ViewerJSONProps {
2
- value: any;
2
+ value: unknown;
3
+ onChange?: (value: any) => void;
3
4
  }
4
- declare const ViewerJSON: ({ value }: ViewerJSONProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const ViewerJSON: ({ value, onChange }: ViewerJSONProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export default ViewerJSON;
@@ -1,4 +1,5 @@
1
1
  declare const useViewerJSONAction: () => {
2
+ copyToClipboard: (value: unknown) => () => void;
2
3
  formatJSON: (value: any) => string;
3
4
  getDownloadLink: (value: any) => string;
4
5
  handleClose: () => void;
@@ -2,6 +2,7 @@ declare const useTreeGrid: () => {
2
2
  closeModal: () => void;
3
3
  getTitleModalDelete: () => "Are you sure to delete « {{name}} »";
4
4
  getTitleModalMutation: () => "Add a field" | "Add a field to « {{name}} »" | "Edit field « {{name}} »";
5
+ handleChangeTree: (tree: any) => false | undefined;
5
6
  isDeleteModal: boolean;
6
7
  isModalMutationOpen: boolean;
7
8
  };
@@ -1,5 +1,6 @@
1
1
  declare const BUTTON_EN: {
2
2
  readonly close: "Close";
3
+ readonly copyToClipboard: "Copy tree to clipboard";
3
4
  readonly createTree: "Create Tree";
4
5
  readonly downloadJSONFile: "Download JSON File";
5
6
  readonly reset: "Reset";
@@ -5,6 +5,7 @@ declare const SNACK_MESSAGE_EN: {
5
5
  readonly updateTree: "An error has occurred. Please try again";
6
6
  };
7
7
  readonly success: {
8
+ readonly copyToClipboard: "Copied to clipboard";
8
9
  readonly saveTree: "Tree registered";
9
10
  readonly updateTree: "Tree updated";
10
11
  };
@@ -1,5 +1,6 @@
1
1
  declare const BUTTON_FR: {
2
2
  readonly close: "Fermer";
3
+ readonly copyToClipboard: "Copier l'arbre dans le presse-papiers";
3
4
  readonly createTree: "Créer un arbre";
4
5
  readonly downloadJSONFile: "Télécharger le fichier JSON";
5
6
  readonly reset: "Réinitialiser";
@@ -5,6 +5,7 @@ declare const SNACK_MESSAGE_FR: {
5
5
  readonly updateTree: "Une erreur est survenue veuillez réessayer";
6
6
  };
7
7
  readonly success: {
8
+ readonly copyToClipboard: "Copié dans le presse-papiers";
8
9
  readonly saveTree: "Arbre enregistré";
9
10
  readonly updateTree: "Arbre mis à jour";
10
11
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "treege",
3
3
  "description": "Form decision tree generator",
4
4
  "license": "ISC",
5
- "version": "0.19.0",
5
+ "version": "0.20.0",
6
6
  "type": "module",
7
7
  "types": "./dist/main.d.ts",
8
8
  "main": "./dist/main.umd.cjs",