diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index b5ac79bd..00000000
--- a/.babelrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "presets": [
- [ "react-app", { "absoluteRuntime": false } ]
- ],
- "plugins": ["@babel/plugin-proposal-optional-chaining"]
-}
diff --git a/.gitignore b/.gitignore
index 808fe5bc..b21621e4 100755
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ dist
secret.*
secret.story.*
*.secret.*
+.idea
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..7abb13d0
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,7 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# GitHub Copilot persisted chat sessions
+/copilot/chatSessions
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 00000000..aebca74c
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 00000000..79ee123c
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..03d9549e
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..3668dc8c
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..89e2640f
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/prettier.xml b/.idea/prettier.xml
new file mode 100644
index 00000000..0c83ac4e
--- /dev/null
+++ b/.idea/prettier.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/react-image-annotate.iml b/.idea/react-image-annotate.iml
new file mode 100644
index 00000000..eb31ed69
--- /dev/null
+++ b/.idea/react-image-annotate.iml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 00000000..f633ce67
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,4 @@
+.idea
+.github
+node_modules
+src
diff --git a/.prettierrc b/.prettierrc
index cce9d3c0..732e2200 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,3 +1,3 @@
{
- "semi": false
+ "semi": true
}
diff --git a/.storybook/addons.js b/.storybook/addons.js
deleted file mode 100644
index 6aed412d..00000000
--- a/.storybook/addons.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import '@storybook/addon-actions/register';
-import '@storybook/addon-links/register';
diff --git a/.storybook/config.js b/.storybook/config.js
deleted file mode 100644
index 25199345..00000000
--- a/.storybook/config.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// @flow
-
-import React from "react"
-import Theme from "../src/Theme"
-import { configure, addDecorator } from "@storybook/react"
-import { action } from "@storybook/addon-actions"
-import SettingsProvider from "../src/SettingsProvider"
-
-addDecorator(storyFn => {storyFn()})
-// addDecorator(storyFn => {storyFn()})
-
-function loadStories() {
- require("../src/stories")
-}
-
-configure(loadStories, module)
diff --git a/README.md b/README.md
index cd58b6be..166aa50c 100755
--- a/README.md
+++ b/README.md
@@ -1,12 +1,15 @@
# React Image Annotate
-[](https://badge.fury.io/js/react-image-annotate)
+[](https://www.npmjs.com/package/@idapgroup/react-image-annotate)
-The best image/video annotation tool ever. [Check out the demo here](https://universaldatatool.github.io/react-image-annotate/). Or the [code sandbox here](https://codesandbox.io/s/react-image-annotate-example-38tsc?file=/src/App.js:0-403).
+Fork of react-image-annotate - The best image/video annotation tool
+ever. [Check out the demo here](https://universaldatatool.github.io/react-image-annotate/). Or
+the [code sandbox here](https://codesandbox.io/s/react-image-annotate-example-38tsc?file=/src/App.js:0-403).
-## Sponsors
+Implemented features in fork:
-[](https://wao.ai)
+- added typescript
+- updated react to v.18
## Features
@@ -20,11 +23,11 @@ The best image/video annotation tool ever. [Check out the demo here](https://uni
## Usage
-`npm install react-image-annotate`
+`npm i @idapgroup/react-image-annotate`
```javascript
import React from "react";
-import ReactImageAnnotate from "react-image-annotate";
+import ReactImageAnnotate from "@idapgroup/react-image-annotate";
const App = () => (
` | Allowed "tags" (mutually inclusive classifications) for regions. | |
-| `regionClsList` | `Array` | Allowed "classes" (mutually exclusive classifications) for regions. | |
-| `imageTagList` | `Array` | Allowed tags for entire image. | |
-| `imageClsList` | `Array` | Allowed classes for entire image. | |
-| `enabledTools` | `Array` | Tools allowed to be used. e.g. "select", "create-point", "create-box", "create-polygon" | Everything. |
-| `showTags` | `boolean` | Show tags and allow tags on regions. | `true` |
-| `selectedImage` | `string` | URL of initially selected image. | |
-| `images` | `Array` | Array of images to load into annotator | |
-| `showPointDistances` | `boolean` | Show distances between points. | `false` |
-| `pointDistancePrecision` | `number` | Precision on displayed points (e.g. 3 => 0.123) | |
-| `onExit` | `MainLayoutState => any` | Called when "Save" is called. | |
-| `RegionEditLabel` | `Node` | React Node overriding the form to update the region (see [`RegionLabel`](https://github.com/waoai/react-image-annotate/blob/master/src/RegionLabel/index.js)) | |
-| `allowComments` | `boolean` | Show a textarea to add comments on each annotation. | `false` |
-| `hidePrev` | `boolean` | Hide `Previous Image` button from the header bar. | `false` |
-| `hideNext` | `boolean` | Hide `Next Image` button from the header bar. | `false` |
-| `hideClone` | `boolean` | Hide `Clone` button from the header bar. | `false` |
-| `hideSettings` | `boolean` | Hide `Settings` button from the header bar. | `false` |
-| `hideFullScreen` | `boolean` | Hide `FullScreen/Window` button from the header bar. | `false` |
-| `hideSave` | `boolean` | Hide `Save` button from the header bar. | `false` |
+| Prop | Type (\* = required) | Description | Default |
+|----------------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
+| `taskDescription` | \*`string` | Markdown description for what to do in the image. | |
+| `allowedArea` | `{ x: number, y: number, w: number, h: number }` | Area that is available for annotation. | Entire image. |
+| `regionTagList` | `Array` | Allowed "tags" (mutually inclusive classifications) for regions. | |
+| `regionClsList` | `Array` | Allowed "classes" (mutually exclusive classifications) for regions. | |
+| `regionTagSingleSelection` | `boolean` | Allowed select only one tag for image. | |
+| `regionAllowedActions` | `{remove?:boolean, lock?:boolean, visibility?: boolean` | Allowed actions for region in regions list. | Everything. |
+| `imageTagList` | `Array` | Allowed tags for entire image. | |
+| `imageClsList` | `Array` | Allowed classes for entire image. | |
+| `enabledTools` | `Array` | Tools allowed to be used. e.g. "select", "create-point", "create-box", "create-polygon" | Everything. |
+| `showTags` | `boolean` | Show tags and allow tags on regions. | `true` |
+| `selectedImage` | `string` | URL of initially selected image. | |
+| `images` | `Array` | Array of images to load into annotator | |
+| `showPointDistances` | `boolean` | Show distances between points. | `false` |
+| `pointDistancePrecision` | `number` | Precision on displayed points (e.g. 3 => 0.123) | |
+| `onExit` | `MainLayoutState => any` | Called when "Save" is called. | |
+| `RegionEditLabel` | `Node` | React Node overriding the form to update the region (see [`RegionLabel`](https://github.com/waoai/react-image-annotate/blob/master/src/RegionLabel/index.js)) | |
+| `allowComments` | `boolean` | Show a textarea to add comments on each annotation. | `false` |
+| `hidePrev` | `boolean` | Hide `Previous Image` button from the header bar. | `false` |
+| `hideNext` | `boolean` | Hide `Next Image` button from the header bar. | `false` |
+| `hideClone` | `boolean` | Hide `Clone` button from the header bar. | `false` |
+| `hideSettings` | `boolean` | Hide `Settings` button from the header bar. | `false` |
+| `hideFullScreen` | `boolean` | Hide `FullScreen/Window` button from the header bar. | `false` |
+| `hideSave` | `boolean` | Hide `Save` button from the header bar. | `false` |
## Developers
### Development
-This project uses [react-storybook](https://storybook.js.org/). To begin developing run the following commands in the cloned repo.
+This project uses [react-storybook](https://storybook.js.org/). To begin developing run the following commands in the
+cloned repo.
1. `yarn install`
-2. `yarn storybook`
+2. `yarn add react react-dom`
+3. For production build need remove `react` and `react-dom` packages and
+ run `yarn build` - it fix the issue with `react` and `react-dom` versions in your project.
A browser tab will automatically open with the project components.
-See more details in the [contributing guidelines](https://github.com/waoai/react-image-annotate/wiki/Setup-for-Development).
+See more details in
+the [contributing guidelines](https://github.com/waoai/react-image-annotate/wiki/Setup-for-Development).
### Icons
diff --git a/public/index.html b/index.html
similarity index 92%
rename from public/index.html
rename to index.html
index 3c872092..fd447762 100644
--- a/public/index.html
+++ b/index.html
@@ -4,6 +4,7 @@
+
+